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 |
|---|---|---|---|---|---|
quanticle/GorillaBot | gorillabot/plugins/util.py | 2 | 3830 | # Copyright (c) 2013-2016 Molly White
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# di... | mit |
kcpawan/django | django/contrib/auth/management/commands/createsuperuser.py | 88 | 8576 | """
Management utility to create superusers.
"""
from __future__ import unicode_literals
import getpass
import sys
from django.contrib.auth import get_user_model
from django.contrib.auth.management import get_default_username
from django.contrib.auth.password_validation import validate_password
from django.core impor... | bsd-3-clause |
vileopratama/vitech | src/addons/product_margin/wizard/product_margin.py | 47 | 2510 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from openerp.osv import fields, osv
from openerp.tools.translate import _
class product_margin(osv.osv_memory):
_name = 'product.margin'
_description = 'Product Margin'
_columns = {
'fr... | mit |
bwrsandman/OpenUpgrade | openerp/loglevels.py | 380 | 3930 | # -*- 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 |
Razzeee/xbmc | tools/EventClients/examples/python/example_button1.py | 70 | 2714 | #!/usr/bin/python
# This is a simple example showing how you can send 2 button events
# to XBMC in a queued fashion to shut it down.
# Queued button events are not repeatable.
# The basic idea is to create single packets and shoot them to XBMC
# The provided library implements some of the support commands and
# take... | gpl-2.0 |
fredjean/kubernetes | cluster/juju/return-node-ips.py | 310 | 1024 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | apache-2.0 |
blackbliss/callme | flask/lib/python2.7/site-packages/setuptools/command/install_scripts.py | 285 | 2068 | from distutils.command.install_scripts import install_scripts \
as _install_scripts
from pkg_resources import Distribution, PathMetadata, ensure_directory
import os
from distutils import log
class install_scripts(_install_scripts):
"""Do normal script install, plus any egg_info wrapper scripts"""
def ini... | mit |
jorik041/robotframework | src/robot/result/keyword.py | 21 | 2149 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | apache-2.0 |
perdona/django-pipeline | pipeline/templatetags/pipeline.py | 7 | 5018 | from __future__ import unicode_literals
from django.contrib.staticfiles.storage import staticfiles_storage
from django import template
from django.template.base import VariableDoesNotExist
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from ..collector import defaul... | mit |
krishnazure/Flask | Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/pip/commands/__init__.py | 476 | 2236 | """
Package containing all pip commands
"""
from pip.commands.bundle import BundleCommand
from pip.commands.completion import CompletionCommand
from pip.commands.freeze import FreezeCommand
from pip.commands.help import HelpCommand
from pip.commands.list import ListCommand
from pip.commands.search import SearchComman... | apache-2.0 |
x2nie/odoo | openerp/tools/amount_to_text.py | 393 | 7719 | # -*- 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 |
edx/fileconveyor | fileconveyor/processors/link_updater.py | 3 | 4994 | __author__ = "Wim Leers (work@wimleers.com)"
__version__ = "$Rev$"
__date__ = "$Date$"
__license__ = "GPL"
from processor import *
import os
import os.path
from cssutils import CSSParser
from cssutils.css import CSSStyleSheet
from cssutils import getUrls
from cssutils import replaceUrls
import logging
import sys
imp... | unlicense |
nhenezi/kuma | vendor/packages/sqlalchemy/examples/beaker_caching/fixture_data.py | 6 | 1620 | """fixture_data.py
Installs some sample data. Here we have a handful of postal codes for a few US/
Canadian cities. Then, 100 Person records are installed, each with a
randomly selected postal code.
"""
from environment import Session, Base
from model import City, Country, PostalCode, Person, Address
import rando... | mpl-2.0 |
teoliphant/numpy-refactor | numpy/core/defchararray.py | 1 | 71744 | """
This module contains a set of functions for vectorized string
operations and methods.
.. note::
The `chararray` class exists for backwards compatibility with
Numarray, it is not recommended for new development. Starting from numpy
1.4, if one needs arrays of strings, it is recommended to use arrays of
... | bsd-3-clause |
AuyaJackie/odoo | openerp/report/render/rml2txt/__init__.py | 381 | 1351 | # -*- 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 |
vaginessa/LucidGTK | src/lucidgtk/dream.py | 2 | 28255 | #
# Copyright (C) 2015 Carl Codling
#
# 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 program is distributed i... | gpl-3.0 |
madgik/exareme | Exareme-Docker/src/exareme/exareme-tools/madis/src/lib/gzip34.py | 1 | 24121 | """Functions that read and write gzipped files.
The user of the file doesn't have to worry about the compression,
but random access is not allowed."""
# based on Andrew Kuchling's minigzip.py distributed with the zlib module
import io
import os
import struct
import sys
import time
import zlib
__all__ = ["GzipFile",... | mit |
gstrauss/mcdb | contrib/python-mcdb/sample.py | 1 | 1485 | #! /usr/bin/env python
# python-mcdb "Example"
import mcdb
print
print(mcdb.__name__ + ' ' + mcdb.__version__)
print
## mcdb.make object
fn = "example.mcdb"
mk = mcdb.make(fn)
print(mk.__class__)
print("Creating %s (fd %d)" % (mk.name, mk.fd))
mk.add(b'123', b'0123456789')
mk.add(b'abc', b'def')
mk.add... | lgpl-2.1 |
numenta-ci/nupic | src/nupic/frameworks/opf/client.py | 40 | 3158 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 |
ubccr/supremm | src/supremm/statistics.py | 1 | 3535 | """ Various utilities for calculating statistics """
import math
import numpy
import scipy.stats
class Integrator(object):
""" Helper class to itegrate data """
def __init__(self, x):
self._x0 = x
self._total = numpy.zeros_like(x)
self._elapsed = 0.0
def add(self, x, y):
"... | lgpl-3.0 |
drpeteb/scipy | doc/postprocess.py | 101 | 1442 | #!/usr/bin/env python
"""
%prog MODE FILES...
Post-processes HTML and Latex files output by Sphinx.
MODE is either 'html' or 'tex'.
"""
import re, optparse
def main():
p = optparse.OptionParser(__doc__)
options, args = p.parse_args()
if len(args) < 1:
p.error('no mode given')
mode = args.po... | bsd-3-clause |
mdworks2016/work_development | Python/20_Third_Certification/venv/lib/python3.7/site-packages/pip/_vendor/distlib/resources.py | 87 | 10766 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2017 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals
import bisect
import io
import logging
import os
import pkgutil
import shutil
import sys
import ... | apache-2.0 |
valexandersaulys/airbnb_kaggle_contest | venv/lib/python3.4/site-packages/numpy/lib/shape_base.py | 17 | 25803 | from __future__ import division, absolute_import, print_function
import warnings
import numpy.core.numeric as _nx
from numpy.core.numeric import (
asarray, zeros, outer, concatenate, isscalar, array, asanyarray
)
from numpy.core.fromnumeric import product, reshape
from numpy.core import vstack, atleast_3d
_... | gpl-2.0 |
bkrukowski/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/path.py | 191 | 5046 | # Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause |
lepricon49/headphones | lib/mako/filters.py | 60 | 5999 | # mako/filters.py
# Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import re
import codecs
from mako.compat import quote_plus, unquote_plus, codepoint2name, \
... | gpl-3.0 |
alecmuffett/pymine | old/get/feed.py | 2 | 7850 | #!/usr/bin/env python
##
## Copyright 2009 Adriana Lukas & Alec Muffett
##
## 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 requi... | apache-2.0 |
jyi/ITSP | prophet-gpl/crawler/getproject_bug.py | 1 | 2392 | #GitHub project crawler
#Format:
# python getproject.py projectname project_owner
# i.e python getproject.py metalsmith segmentio
#
from pygithub3 import Github
import urllib
import json
import sys
import os
import io
import zipfile
import time
if __name__ == '__main__':
project_name = sys.argv[1]
user_na... | mit |
caesar2164/edx-platform | common/test/acceptance/tests/discussion/helpers.py | 9 | 5083 | """
Helper functions and classes for discussion tests.
"""
from uuid import uuid4
import json
from common.test.acceptance.fixtures import LMS_BASE_URL
from common.test.acceptance.fixtures.course import CourseFixture
from common.test.acceptance.fixtures.discussion import (
SingleThreadViewFixture,
Thread,
... | agpl-3.0 |
emreg00/biana | biana/BianaObjects/ExternalEntity.py | 2 | 4605 | """
BIANA: Biologic Interactions and Network Analysis
Copyright (C) 2009 Javier Garcia-Garcia, Emre Guney, Baldo Oliva
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 vers... | gpl-3.0 |
abstract-open-solutions/OCB | addons/hr_recruitment/wizard/__init__.py | 381 | 1095 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-Today OpenERP (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
doge-search/webdoge | liqian/OSU/research/research/pipelines.py | 1 | 1153 | # -- coding: utf-8 --
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import os
import urllib
import xml.dom.minidom as minidom
class xmlPipeline(object):
def __init__(self):
self.fout_xml = file(... | unlicense |
mika91/xbmc | lib/libUPnP/Neptune/Extras/Tools/Logging/NeptuneLogConsoleMulticast.py | 202 | 3159 | #!/usr/bin/env python
from struct import *
from socket import *
from optparse import OptionParser
UDP_ADDR = "0.0.0.0"
UDP_MULTICAST_ADDR = "239.255.255.100"
UDP_PORT = 7724
BUFFER_SIZE = 65536
#HEADER_KEYS = ['Logger', 'Level', 'Source-File', 'Source-Function', 'Source-Line', 'TimeStamp']
HEADER_KEYS = {
'mini': ... | gpl-2.0 |
PredictiveScienceLab/py-mcmc | demos/demo2.py | 2 | 4227 | """
This demo demonstrates how to construct a GPy model with a mean function
and train it using the pymcmc module. This model is equivalent to Bayesian
linear regression.
Author:
Ilias Bilionis
Date:
3/20/2014
"""
import numpy as np
import GPy
import pymcmc as pm
import matplotlib.pyplot as plt
# Write a... | lgpl-3.0 |
pinax/django-stripe-payments | pinax/stripe/tests/test_views.py | 2 | 16799 | from django.contrib.auth import get_user_model
from django.test import TestCase
from django.utils import timezone
import stripe
from mock import patch
from ..models import Card, Customer, Invoice, Plan, Subscription
from ..views import PaymentMethodCreateView
try:
from django.urls import reverse
except ImportErr... | mit |
lz1988/company-site | build/lib/django/contrib/gis/gdal/prototypes/srs.py | 219 | 3498 | from ctypes import c_char_p, c_int, c_void_p, POINTER
from django.contrib.gis.gdal.libgdal import lgdal, std_call
from django.contrib.gis.gdal.prototypes.generation import (const_string_output,
double_output, int_output, srs_output, string_output, void_output)
## Shortcut generation for routines with known paramet... | bsd-3-clause |
ebukoz/thrive | erpnext/education/doctype/student/test_student.py | 6 | 2415 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals
from frappe.test_runner import make_test_records
from erpnext.education.doctype.program.test_program import make_program_and_linked_courses
from erpnext.education.doctype.course.t... | gpl-3.0 |
robmadole/jig | src/jig/conf.py | 1 | 1174 | from os.path import dirname, join
from datetime import timedelta
## General settings
# What codec to use when dealing with unicode conversion
CODEC = 'utf_8'
## jig settings
# Name of the directory to create to hold jig data
# This will be created in the root of the Git repository
JIG_DIR_NAME = '.jig'
# Name of ... | bsd-2-clause |
donspaulding/adspygoogle | examples/adspygoogle/adwords/v201306/reporting/download_criteria_report.py | 3 | 1991 | #!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 |
johankaito/fufuka | microblog/venv/lib/python2.7/site-packages/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... | apache-2.0 |
paplorinc/intellij-community | python/testData/inspections/PyArgumentListInspection/initializingTypeVar.py | 18 | 1654 | from typing import TypeVar
TypeVar("T")
TypeVar("T", int)
TypeVar("T", int, str)
TypeVar("T", bound=int)
TypeVar("T", int, bound=int)
TypeVar("T", int, str, bound=int)
TypeVar("T", <warning descr="Unexpected argument">bd=int</warning>)
TypeVar("T", int, <warning descr="Unexpected argument">bd=int</warning>)
TypeVar(... | apache-2.0 |
unoduetre/MovieRecommendator | knn-with-many-points/FeaturesData.py | 1 | 8585 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys, os
import numpy as np
import importlib.machinery
class FeaturesData(object):
"""
featureIdsByName -- dict: featureName -> featureId
featuresCount -- number of features
featureNamesById -- list: featureId -> featureName
data -- list of li... | gpl-3.0 |
Alwnikrotikz/damnvid | ui/dAddURLDialog.py | 12 | 7491 | # -*- coding: utf-8 -*-
from dUI import *
class DamnAddURLDialog(wx.Dialog):
def __init__(self, parent, default):
self.parent = parent
wx.Dialog.__init__(self, parent, -1, DV.l('Add videos by URL...'))
absolutetopsizer = wx.BoxSizer(wx.HORIZONTAL)
self.SetSizer(absolutetopsizer)
innertopsizer = wx.BoxSizer(w... | gpl-3.0 |
albertoferna/compmech | doc/source/conf.cython.py | 3 | 14087 | # -*- coding: utf-8 -*-
#
# CompMech documentation build configuration file, created by
# sphinx-quickstart on Sun Jun 29 13:36:38 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | bsd-3-clause |
jazzabeanie/python_koans | python2/koans/about_tuples.py | 1 | 3354 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
class AboutTuples(Koan):
def test_creating_a_tuple(self):
count_of_three = (1, 2, 5) # so far the same a list, but () instead of []
self.assertEqual(5, count_of_three[2])
def test_tuples_are_immutable_so_item_assignment_... | mit |
ddico/odoomrp-utils | partner_group/models/partner.py | 11 | 1140 |
# -*- encoding: utf-8 -*-
##############################################################################
#
# 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 th... | agpl-3.0 |
mccdaq/mcculw | examples/ui/DaqDevDiscovery02.py | 1 | 6290 | """
File: DaqDevDiscovery02.py
Library Call Demonstrated: mcculw.ul.get_net_device_descriptor()
mcculw.ul.create_daq_device()
mcculw.ul.release_daq_device()
Purpose: Discovers a Network DAQ device and assigns board
... | mit |
0x90/pentest | bndsh.py | 6 | 1340 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Dummy python bind shell
__author__ = '090h'
__license__ = 'GPL'
import select
from pty import spawn, fork
from socket import *
from sys import exit
from os import getpid, fdopen, read
import os
if os.fork():
exit(0)
try:
watch = socket(AF_INET,SOCK_STREAM,IP... | gpl-3.0 |
Spotipo/spotipo | unifispot/modules/facebook/main.py | 1 | 18392 | import json
import arrow
import logging
import validators
import urllib
from flask_security import current_user
from functools import wraps
from facebook import get_user_from_cookie, GraphAPI,GraphAPIError
from flask import request,abort,render_template,url_for,redirect,flash,current_app
from unifispot.utils.translati... | agpl-3.0 |
BartVB/ansible-modules-core | system/group.py | 81 | 13394 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Stephen Fromm <sfromm@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | gpl-3.0 |
dnlm92/chokoretto | main/lib/unidecode/x054.py | 251 | 4583 | data = (
'Mie ', # 0x00
'Xu ', # 0x01
'Mang ', # 0x02
'Chi ', # 0x03
'Ge ', # 0x04
'Xuan ', # 0x05
'Yao ', # 0x06
'Zi ', # 0x07
'He ', # 0x08
'Ji ', # 0x09
'Diao ', # 0x0a
'Cun ', # 0x0b
'Tong ', # 0x0c
'Ming ', # 0x0d
'Hou ', # 0x0e
'Li ', # 0x0f
'Tu ', # 0x10
'Xiang ... | mit |
ShinyROM/android_kernel_asus_flo | scripts/build-all.py | 1182 | 9486 | #! /usr/bin/env python
# Copyright (c) 2009-2011, The Linux Foundation. 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
# ... | gpl-2.0 |
JensWehner/votca-scripts | xtp/xtp_kmc_jobresults_mobility.py | 2 | 9166 | #!/usr/bin/env python
import numpy as np
import csv
import sys
from operator import attrgetter
import numpy.linalg as lg
import collections as col
import argparse
class MyParser(argparse.ArgumentParser):
def error(self, message):
sys.stderr.write('error: %s\n' % message)
self.print_help()
... | apache-2.0 |
programadorjc/django | django/contrib/admin/templatetags/admin_urls.py | 553 | 1812 | from django import template
from django.contrib.admin.utils import quote
from django.core.urlresolvers import Resolver404, get_script_prefix, resolve
from django.utils.http import urlencode
from django.utils.six.moves.urllib.parse import parse_qsl, urlparse, urlunparse
register = template.Library()
@register.filter
... | bsd-3-clause |
alexmorozov/django | django/middleware/common.py | 7 | 7421 | import logging
import re
from django import http
from django.conf import settings
from django.core.exceptions import PermissionDenied
from django.core.mail import mail_managers
from django.urls import is_valid_path
from django.utils.cache import get_conditional_response, set_response_etag
from django.utils.encoding im... | bsd-3-clause |
RandallDW/Aruba_plugin | plugins/org.python.pydev.jython/Lib/distutils/dist.py | 175 | 50049 | """distutils.dist
Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
"""
__revision__ = "$Id$"
import sys, os, re
from email import message_from_file
try:
import warnings
except ImportError:
warnings = None
from distutils.errors import (DistutilsOpt... | epl-1.0 |
TriumphLLC/Gerber.Club | modules/draw/curves/intersection_beziers_curve_and_axis.py | 2 | 5077 | import bpy
from functools import reduce
from math import tan, radians
from fashion_project.modules.draw.base import Base
from fashion_project.modules.draw.counter import Counter
from fashion_project.modules.draw.points import is_one_of_points
from fashion_project.modules.utils import get_point_abs_location
from fash... | gpl-3.0 |
crasker/scrapy | tests/test_spidermiddleware_offsite.py | 23 | 2743 | from unittest import TestCase
from six.moves.urllib.parse import urlparse
from scrapy.http import Response, Request
from scrapy.spiders import Spider
from scrapy.spidermiddlewares.offsite import OffsiteMiddleware
from scrapy.utils.test import get_crawler
class TestOffsiteMiddleware(TestCase):
def setUp(self):
... | bsd-3-clause |
glovebx/odoo | addons/resource/faces/pcalendar.py | 433 | 28436 | #@+leo-ver=4
#@+node:@file pcalendar.py
#@@language python
#@<< Copyright >>
#@+node:<< Copyright >>
############################################################################
# Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH
# mreithinger@web.de
#
# This file is part of faces.
#
# faces is free softw... | agpl-3.0 |
tchx84/social-sugar | extensions/globalkey/viewsource.py | 18 | 1083 | # Copyright (C) 2008 One Laptop Per Child
# Copyright (C) 2009 Tomeu Vizoso, Simon Schampijer
#
# 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 opt... | gpl-2.0 |
Bharath-J/Mezzanine | mezzanine/project_template/project_name/settings.py | 17 | 11604 |
from __future__ import absolute_import, unicode_literals
import os
from django.utils.translation import ugettext_lazy as _
######################
# MEZZANINE SETTINGS #
######################
# The following settings are already defined with default values in
# the ``defaults.py`` module within each of Mezzanine's ... | bsd-2-clause |
Simran-B/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/pythonwin/pywin/scintilla/configui.py | 17 | 8832 | from pywin.mfc import dialog
import win32api
import win32con
import win32ui
import copy
import string
from scintillacon import *
######################################################
# Property Page for syntax formatting options
# The standard 16 color VGA palette should always be possible
paletteVGA = ( ("B... | apache-2.0 |
wqer1019/student-work | vendor/mockery/mockery/docs/conf.py | 468 | 8442 | # -*- coding: utf-8 -*-
#
# Mockery Docs documentation build configuration file, created by
# sphinx-quickstart on Mon Mar 3 14:04:26 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... | mit |
timgraham/django-cms | cms/toolbar/toolbar.py | 2 | 17720 | # -*- coding: utf-8 -*-
from collections import OrderedDict
import functools
import operator
import warnings
from cms import __version__
from cms.constants import LEFT, REFRESH_PAGE
from cms.forms.login import CMSToolbarLoginForm
from cms.models import UserSettings, Placeholder
from cms.templates import TemplatesCache... | bsd-3-clause |
aaxelb/osf.io | addons/mendeley/migrations/0002_auto_20170323_1534.py | 28 | 1594 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-03-23 20:34
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.... | apache-2.0 |
h3biomed/ansible | lib/ansible/modules/monitoring/circonus_annotation.py | 47 | 7258 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2014-2015, Epic Games, 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 |
tgbio/function | arabidopsis_call_mapp.py | 1 | 1757 | #!/usr/bin/env python
import os
import re
import subprocess
from Bio.Blast import NCBIXML
from Bio import Entrez
from Bio import SeqIO
genotypes = ["Cvi", "Ler"]
roi = {1:[[174952, 3112850], [23698501, 24905939]]} #hardwired, change to accept a variable from another script
Entrez.email = ""
print "starting with:"... | apache-2.0 |
gautam1858/tensorflow | tensorflow/python/feature_column/feature_column_lib.py | 8 | 1103 | # 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 |
michalkurka/h2o-3 | h2o-py/tests/testdir_munging/slice/pyunit_frame_slicing3.py | 2 | 1484 | #!/usr/env/bin python
# -*- encoding: utf-8 -*-
from __future__ import division, print_function
import h2o
from tests import pyunit_utils
def test_slice3():
fr = h2o.H2OFrame.from_python([
[1, -1, 0],
[2, -2, 10],
[4, -3, 50],
[8, -4, -7],
[16, -5, 12],
[32, -... | apache-2.0 |
Jgarcia-IAS/localizacion | openerp/addons/account_payment/account_move_line.py | 241 | 4455 | # -*- 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 |
willharris/django-allauth | allauth/socialaccount/providers/foursquare/views.py | 71 | 1366 | import requests
from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter,
OAuth2LoginView,
OAuth2CallbackView)
from .provider import FoursquareProvider
class FoursquareOAuth2Adapter(OAu... | mit |
candlepin/subscription-manager | src/subscription_manager/cli_command/org.py | 1 | 1817 | #
# Subscription manager command line utility.
#
# Copyright (c) 2021 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICU... | gpl-2.0 |
citrix-openstack-build/python-ceilometerclient | ceilometerclient/v2/options.py | 3 | 2858 | #
# 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
# ... | apache-2.0 |
roadmapper/ansible | lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py | 13 | 20585 | #!/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': ['stableinterf... | gpl-3.0 |
joaks1/PyMsBayes | pymsbayes/test/test_end_user.py | 1 | 9794 | #! /usr/bin/env python
"""
Test suite for end users to run to ensure the bundled tools are working.
"""
import unittest
import os
import sys
from pymsbayes import workers, fileio, manager
from pymsbayes.config import MsBayesConfig
from pymsbayes.test.support import package_paths
from pymsbayes.test.support.pymsbayes... | gpl-3.0 |
esakellari/root | interpreter/cling/tools/Jupyter/kernel/clingkernel.py | 4 | 9525 | #!/usr/bin/env python
#------------------------------------------------------------------------------
# CLING - the C++ LLVM-based InterpreterG :)
# author: Min RK
# Copyright (c) Min RK
#
# This file is dual-licensed: you can choose to license it under the University
# of Illinois Open Source License or the GNU Lesse... | lgpl-2.1 |
weigj/django-multidb | tests/regressiontests/comment_tests/tests/__init__.py | 3 | 3130 | from django.contrib.auth.models import User
from django.contrib.comments.forms import CommentForm
from django.contrib.comments.models import Comment
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site
from django.test import TestCase
from regressiontests.comment_tests... | bsd-3-clause |
tanglei528/ceilometer | ceilometer/hardware/pollsters/disk.py | 4 | 2045 | # -*- encoding: utf-8 -*-
#
# Copyright © 2013 ZHAW SoE
# Copyright © 2014 Intel Corp.
#
# Authors: Lucas Graf <graflu0@students.zhaw.ch>
# Toni Zehnder <zehndton@students.zhaw.ch>
# Lianhao Lu <lianhao.lu@intel.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use... | apache-2.0 |
andreparrish/python-for-android | python3-alpha/python3-src/Lib/distutils/tests/test_dir_util.py | 49 | 3798 | """Tests for distutils.dir_util."""
import unittest
import os
import stat
import shutil
import sys
from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree,
ensure_relative)
from distutils import log
from distutils.tests import support
from test.support import run_un... | apache-2.0 |
artefactual/archivematica-history | src/MCPClient/lib/clientScripts/archivematicaClamscan.py | 1 | 2652 | #!/usr/bin/python -OO
# This file is part of Archivematica.
#
# Copyright 2010-2012 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica 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, e... | agpl-3.0 |
yencarnacion/jaikuengine | .google_appengine/google/appengine/ext/bulkload/simpletext_connector.py | 15 | 3927 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
lbjay/cds-invenio | modules/webjournal/lib/widgets/bfe_webjournal_widget_seminars.py | 4 | 6993 | # -*- coding: utf-8 -*-
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS 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 versio... | gpl-2.0 |
clutchcoin/clutchcoin | contrib/bitrpc/bitrpc.py | 2348 | 7835 | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:8332")
else:
access = Ser... | mit |
sergio-incaser/odoo | addons/account_budget/report/analytic_account_budget_report.py | 360 | 7589 | # -*- 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 |
KimNorgaard/ansible-modules-extras | monitoring/pagerduty.py | 132 | 9390 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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 version.
... | gpl-3.0 |
beiko-lab/gengis | bin/Lib/site-packages/pyparsing.py | 19 | 154099 | # module pyparsing.py
#
# Copyright (c) 2003-2013 Paul T. McGuire
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to u... | gpl-3.0 |
uni-peter-zheng/virt-test | virttest/libvirt_xml/devices/memory.py | 9 | 3979 | """
memory device support class(es)
"""
from virttest.libvirt_xml import accessors, xcepts
from virttest.libvirt_xml.devices import base, librarian
class Memory(base.UntypedDeviceBase):
__slots__ = ('mem_model', 'target', 'source', 'address')
def __init__(self, virsh_instance=base.base.virsh):
acc... | gpl-2.0 |
evaschalde/odoo | addons/note/tests/__init__.py | 260 | 1076 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
jokajak/itweb | data/env/lib/python2.6/site-packages/sprox-0.6.10-py2.6.egg/sprox/recordviewbase.py | 1 | 2794 | from viewbase import ViewBase
from metadata import FieldsMetadata
from widgetselector import RecordViewWidgetSelector
from widgets import RecordViewWidget
class RecordViewBase(ViewBase):
"""This class allows you to create a view for a single record.
:Modifiers:
see modifiers in :mod:`sprox.viewbase`
... | gpl-3.0 |
jeffery-do/Vizdoombot | doom/lib/python3.5/site-packages/matplotlib/__init__.py | 4 | 63770 | """
This is an object-oriented plotting library.
A procedural interface is provided by the companion pyplot module,
which may be imported directly, e.g.::
import matplotlib.pyplot as plt
or using ipython::
ipython
at your terminal, followed by::
In [1]: %matplotlib
In [2]: import matplotlib.pyplot... | mit |
moylop260/odoo-dev | addons/mail/wizard/invite.py | 40 | 5467 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
quantwizard-com/pythonbacktest | pythonbacktest/strategy/strategystatemachine.py | 1 | 6411 | # this class is indended to help building state machine
# for trading strategies
import abc
from pythonbacktest.strategy import AbstractTradingStrategy
class StrategyStateMachine(AbstractTradingStrategy):
def __init__(self):
# map between state names and handling methods
self.__states_map = {}
... | apache-2.0 |
mitocw/edx-platform | cms/djangoapps/contentstore/api/tests/test_import.py | 4 | 8096 | """
Tests for the course import API views
"""
import os
import tarfile
import tempfile
from django.urls import reverse
from path import Path as path
from rest_framework import status
from rest_framework.test import APITestCase
from user_tasks.models import UserTaskStatus
from lms.djangoapps.courseware.tests.factori... | agpl-3.0 |
mozilla/stoneridge | python/src/Demo/scripts/lpwatch.py | 10 | 2838 | #! /usr/bin/env python
# Watch line printer queue(s).
# Intended for BSD 4.3 lpq.
import os
import sys
import time
DEF_PRINTER = 'psc'
DEF_DELAY = 10
def main():
delay = DEF_DELAY # XXX Use getopt() later
try:
thisuser = os.environ['LOGNAME']
except:
thisuser = os.environ['USER']
pri... | mpl-2.0 |
redbear/micropython | tests/wipy/adc.py | 69 | 1647 | '''
ADC test for the CC3200 based boards.
'''
from machine import ADC
import os
mch = os.uname().machine
if 'LaunchPad' in mch:
adc_pin = 'GP5'
adc_channel = 3
elif 'WiPy' in mch:
adc_pin = 'GP3'
adc_channel = 1
else:
raise Exception('Board not supported!')
adc = ADC(0)
print(adc)
adc = ADC()
pri... | mit |
arunhotra/tensorflow | tensorflow/models/rnn/translate/translate.py | 6 | 11864 | """Binary for training translation models and decoding from them.
Running this program without --decode will download the WMT corpus into
the directory specified as --data_dir and tokenize it in a very basic way,
and then start training a model saving checkpoints to --train_dir.
Running with --decode starts an intera... | apache-2.0 |
Nicop06/ansible | lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_launch.py | 15 | 4446 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.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_version': '1.1... | gpl-3.0 |
40223151/2014c2g9 | exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/ui/widget.py | 706 | 1774 | import random
from browser import doc
def getMousePosition(e):
if e is None:
e=win.event
if e.pageX or e.pageY:
return {'x': e.pageX, 'y': e.pageY}
if e.clientX or e.clientY:
_posx=e.clientX + doc.body.scrollLeft + doc.documentElement.scrollLeft;
_posy=e.clientY + doc.body.scr... | gpl-2.0 |
arturosevilla/repoze.what-x509 | setup.py | 1 | 2779 | # -*- coding: utf-8 -*-
# Copyright (C) 2012 Ckluster Technologies
# All Rights Reserved.
#
# This software is subject to the provision stipulated in
# http://www.ckluster.com/OPEN_LICENSE.txt.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLU... | bsd-3-clause |
codecollision/DropboxToFlickr | django/template/loader.py | 149 | 8326 | # Wrapper for loading templates from storage of some sort (e.g. filesystem, database).
#
# This uses the TEMPLATE_LOADERS setting, which is a list of loaders to use.
# Each loader is expected to have this interface:
#
# callable(name, dirs=[])
#
# name is the template name.
# dirs is an optional list of directories ... | bsd-3-clause |
kevinmost/LiteSync | venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py | 355 | 6215 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
from lxml import etree
from ..treebuilders.etree import tag_regexp
from gettext import gettext
_ = gettext
from . import _base
from .. import ihatexml
def ensure_str(s):
if s is None:
return None
... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.