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 |
|---|---|---|---|---|---|
kevinr/750book-web | 750book-web-env/lib/python2.7/site-packages/debug_toolbar/utils/sqlparse/lexer.py | 18 | 11470 | # -*- coding: utf-8 -*-
# Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com
#
# This module is part of python-sqlparse and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php.
"""SQL Lexer"""
# This code is based on the SqlLexer in pygments.
# http://pygments.org/
# It's s... | mit |
camptocamp/ngo-addons-backport | addons/knowledge/res_config.py | 54 | 2119 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
WoLpH/EventGhost | plugins/Streamzap/__init__.py | 1 | 6300 | # -*- coding: utf-8 -*-
#
# This file is a plugin for EventGhost.
# Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/>
#
# EventGhost 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 v... | gpl-2.0 |
rdio/translate-toolkit | storage/xml_extract/test_unit_tree.py | 3 | 3194 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2002-2006 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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... | gpl-2.0 |
pec1985/titanium_mobile | apidoc/generators/jsca_generator.py | 31 | 13433 | #!/usr/bin/env python
#
# Copyright (c) 2010-2012 Appcelerator, Inc. All Rights Reserved.
# Licensed under the Apache Public License (version 2)
import os, sys, re
this_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(this_dir, "..")))
from common import dict_has_non_empt... | apache-2.0 |
dvitme/account-financial-tools | account_asset_management/tests/__init__.py | 35 | 1101 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# account_asset_management tests
#
# Copyright (c) 2014 ACSONE SA/NV (acsone.eu).
#
# This program is free software: you can redistribute it and/or modify
# ... | agpl-3.0 |
joedborg/fusilier | fusilier/settings.py | 1 | 3090 | """
Django settings for fusilier project.
Generated by 'django-admin startproject' using Django 1.11.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import o... | agpl-3.0 |
ujjwalwahi/odoo | addons/product_extended/wizard/__init__.py | 374 | 1078 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
#... | agpl-3.0 |
MaxTyutyunnikov/lino | obsolete/src/lino/apps/pinboard/quotes.py | 1 | 4769 | ## Copyright 2003-2006 Luc Saffre
## This file is part of the Lino project.
## Lino 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 version... | gpl-3.0 |
benchisell/curate_flask_appengine | lib/flask/testsuite/subclassing.py | 563 | 1214 | # -*- coding: utf-8 -*-
"""
flask.testsuite.subclassing
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test that certain behavior of flask can be customized by
subclasses.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
from logging import Str... | apache-2.0 |
sunny-wyb/xen-4.1.2 | dist/install/usr/lib/python2.7/site-packages/xen/web/httpserver.py | 49 | 10765 | #============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope th... | gpl-2.0 |
donyfeng/httpac | httpac.py | 1 | 4588 | #!/usr/bin/env python
import urllib.request
import urllib.parse
import http.cookiejar
import re
import time
import json
caller_url = "http://caller.ap01.aws.af.cm"
tieba_url = "http://tieba.baidu.com"
token_url = "https://passport.baidu.com/v2/api/?getapi&tpl=mn&apiver=v3&tt=1385610373352&class=login&loginty... | gpl-2.0 |
rogerthat-platform/gae-plugin-framework | src/framework/server/framework/bizz/session.py | 1 | 2118 | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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 |
MyTunesFreeMusic/privacy-policy | beetsplug/edit.py | 11 | 13723 | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016
#
# 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,... | mit |
ColumbiaCMB/kid_readout | kid_readout/equipment/agilent_33220.py | 1 | 2243 | """
Agilent 33220A Function generator
"""
import socket
import time
class FunctionGenerator(object):
def __init__(self,addr=('192.168.1.135', 5025)):
self.addr = addr
def set_load_ohms(self,ohms):
self.send("OUTPUT:LOAD %d" % ohms)
def set_dc_voltage(self,volts):
s... | bsd-2-clause |
ikvk/imap_tools | tests/messages_data/rfc2822/example06.py | 1 | 1239 | import datetime
DATA = dict(
subject='Re: Saying Hello',
from_='mary@example.net',
to=('jdoe@machine.example',),
cc=(),
bcc=(),
reply_to=('smith@home.example',),
date=datetime.datetime(1997, 11, 21, 10, 1, 10, tzinfo=datetime.timezone(datetime.timedelta(-1, 64800))),
date_str='Fri, ... | apache-2.0 |
gvaf/breakpad | src/testing/scripts/upload.py | 2511 | 51024 | #!/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... | bsd-3-clause |
barachka/odoo | addons/hr_payroll/report/__init__.py | 427 | 1161 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# d$
#
# This program is free software: you can redistribute it and/or modify
# it... | agpl-3.0 |
herove/dotfiles | sublime/Packages/SublimeCodeIntel/libs/textinfo.py | 2 | 82250 | #!/usr/bin/env python
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (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.mozil... | mit |
jose36/plugin.video.Jmdl1 | servers/userporn.py | 33 | 4917 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para userporn
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import os,re
import base64
from core import scrapertools
... | apache-2.0 |
unnikrishnankgs/va | annotator/models.py | 1 | 2852 | from django.db import models
from django.contrib.staticfiles import finders
class Video(models.Model):
annotation = models.TextField(blank=True,
help_text="A JSON blob containing all user annotation sent from client.")
source = models.CharField(max_length=1048, blank=True,
help_text=("Name of v... | bsd-2-clause |
ninuxorg/nodeshot | nodeshot/interop/sync/migrations/0001_initial.py | 5 | 2393 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django_hstore.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='LayerExternal',
fields=[
... | gpl-3.0 |
SIFTeam/enigma2 | lib/python/SIFTeam/Preferences.py | 2 | 1786 | from Screens.Screen import Screen
from Plugins.Plugin import PluginDescriptor
from Components.SystemInfo import SystemInfo
from Components.ConfigList import ConfigListScreen
from Components.config import getConfigListEntry, config, ConfigBoolean
from Components.ActionMap import ActionMap
from Components.Button import B... | gpl-2.0 |
pietern/kubernetes | examples/cluster-dns/images/frontend/client.py | 468 | 1227 | #!/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 |
jchodera/cclib | src/cclib/parser/qchemparser.py | 3 | 61059 | # -*- coding: utf-8 -*-
#
# This file is part of cclib (http://cclib.github.io), a library for parsing
# and interpreting the results of computational chemistry packages.
#
# Copyright (C) 2014-2015, the cclib development team
#
# The library is free software, distributed under the terms of
# the GNU Lesser General Pub... | lgpl-2.1 |
gemini-testing/selenium | py/selenium/webdriver/remote/command.py | 5 | 5508 | #!/usr/bin/python
#
# 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
# "Li... | apache-2.0 |
apache/airflow | airflow/api_connexion/schemas/plugin_schema.py | 3 | 1754 | # 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 u... | apache-2.0 |
santod/NuK3rn3l_m7_sense_lollipop | scripts/gcc-wrapper.py | 104 | 3924 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2012, Code Aurora Forum. 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 a... | gpl-2.0 |
FokkeZB/titanium_mobile | support/iphone/compiler.py | 14 | 26463 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Project Compiler
#
import os, sys, re, shutil, time, run, sgmllib, codecs, tempfile, subprocess
template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
sys.path.append(os.path.abspath(os.path.join(template_dir,'..')))
sys.path.append(os.pa... | apache-2.0 |
editxt/editxt | editxt/platform/__init__.py | 1 | 1745 | # -*- coding: utf-8 -*-
# EditXT
# Copyright 2007-2013 Daniel Miller <millerdev@gmail.com>
#
# This file is part of EditXT, a programmer's text editor for Mac OS X,
# which can be found at http://editxt.org/.
#
# EditXT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | gpl-3.0 |
cpn18/track-chart | gps-pi/combolog4_fft.py | 1 | 4482 | #!/usr/bin/python
import gps
import math
import datetime
import threading
#import the adxl345 module
import adxl345
import time
import greatcircle
import numpy as np
import scipy.fftpack
lock = threading.Lock()
gpstime = ""
def gps_logger():
global inSync,gpstime
logging = False
# feet
threshold = 25
# L... | gpl-3.0 |
surengrig/Milstone-XT720-kernel-upgrade | scripts/rt-tester/rt-tester.py | 904 | 5366 | #!/usr/bin/env python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
impor... | gpl-2.0 |
wido/cloudstack | test/integration/smoke/test_password_server.py | 4 | 13527 | # 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 u... | apache-2.0 |
vit2/vit-e2 | e2reactor.py | 29 | 5262 | # enigma2 reactor: based on pollreactor, which is
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Maintainer: U{Felix Domke<mailto:tmbinc@elitedvb.net>}
"""
# System imports
import select, errno, sys
# Twisted imports
from twisted.python import log, failure
from twisted.interne... | gpl-2.0 |
jayantk/pnp | experiments/dipart/scripts/visualize/generate_heatmap.py | 1 | 1411 | #!/usr/bin/python
# Generate heatmap of points
import numpy as np
import seaborn as sns
sns.set()
import matplotlib.pyplot as plt
from heatmap_data import *
# image_name=
# im = plt.imread(image_name);
# implot = plt.imshow(im);
# Load the example flights dataset and conver to long-form
# flights_long = sns.load_da... | apache-2.0 |
lukeroge/CloudBot | cloudbot/reloader.py | 33 | 2824 | import asyncio
import os.path
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler
class PluginReloader(object):
def __init__(self, bot):
"""
:type bot: cloudbot.bot.CloudBot
"""
self.observer = Observer()
self.bot = bot
s... | gpl-3.0 |
actframework/FrameworkBenchmarks | toolset/benchmark/framework_test.py | 2 | 7268 | import os
import traceback
from requests import ConnectionError
from toolset.utils.output_helper import log
# Cross-platform colored text
from colorama import Fore, Style
class FrameworkTest:
def __init__(self, name, directory, benchmarker, runTests,
args):
'''
Constructor
... | bsd-3-clause |
untitaker/vdirsyncer | docs/conf.py | 1 | 2718 | # -*- coding: utf-8 -*-
import datetime
import os
import setuptools_scm
extensions = ['sphinx.ext.autodoc']
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'vdirsyncer'
copyright = (u'2014-{}, Markus Unterwaditzer & contributors'
.format(datetime.date.today().st... | mit |
mjwestcott/projecteuler | python/problem68.py | 1 | 2098 | """
problem68.py
https://projecteuler.net/problem=68
What is the maximum 16-digit string for a 'magic' 5-gon ring?
"""
from itertools import chain
flatten = chain.from_iterable
def five_gon_rings(n):
"""Return list of solutions to the 'magic' 5-gon ring problem, each line
summing to n. The empty list will b... | mit |
ioannistsanaktsidis/inspire-next | inspire/modules/workflows/tasks/matching.py | 1 | 7191 | # -*- coding: utf-8 -*-
#
## This file is part of INSPIRE.
## Copyright (C) 2014 CERN.
##
## INSPIRE is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) an... | gpl-2.0 |
HBEE/odoo-addons | partner_school/partner.py | 8 | 1816 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import fields, models, api
class pa... | agpl-3.0 |
mupi/tecsaladeaula | timtec/settings_local_testec.py | 1 | 3024 | # -*- coding: utf-8 -*-
# configurations for the production server
# https://docs.djangoproject.com/en/dev/ref/settings/
DEBUG = False
TEMPLATE_DEBUG = DEBUG
TIMTEC_THEME = 'tecsaladeaula'
SITE_HOME = '/'
SITE_DOMAIN = 'teste.tecsaladeaula.com.br'
SITE_URL = 'https://teste.tecsaladeaula.com.br'
ALLOWED_HOSTS = [
... | agpl-3.0 |
nicolasmoreau/NodeSoftware | nodes/topbase/node/models.py | 2 | 9206 | # This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# Feel free to rename the models, but don't rename db_table values or field names.
#
# Also note: You'll have to ... | gpl-3.0 |
scripnichenko/nova | nova/objects/agent.py | 13 | 2919 | # Copyright 2014 Red Hat, 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 ag... | apache-2.0 |
Jeff-Lewis/namebench | nb_third_party/dns/rdtypes/sigbase.py | 235 | 6349 | # Copyright (C) 2004-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | apache-2.0 |
Lh4cKg/sl4a | python/src/Lib/ctypes/test/__init__.py | 90 | 7110 | import os, sys, unittest, getopt, time
use_resources = []
class ResourceDenied(Exception):
"""Test skipped because it requested a disallowed resource.
This is raised when a test calls requires() for a resource that
has not be enabled. Resources are defined by test modules.
"""
def is_resource_enabl... | apache-2.0 |
choppsv1/iTerm2 | tests/esctest/tests/decdsr.py | 31 | 7540 | from esc import NUL
import esccmd
import escio
import esclog
from escutil import AssertEQ, AssertScreenCharsInRectEqual, AssertTrue, GetScreenSize, knownBug
from esctypes import Point, Rect
class DECDSRTests(object):
def getVTLevel(self):
esccmd.DA2()
params = escio.ReadCSI('c', expected_prefix='>')
vtLe... | gpl-2.0 |
thodoris/djangoPharma | djangoPharma/env/Lib/site-packages/django/core/handlers/base.py | 96 | 10769 | from __future__ import unicode_literals
import logging
import sys
import types
import warnings
from django.conf import settings
from django.core import signals
from django.core.exceptions import ImproperlyConfigured, MiddlewareNotUsed
from django.db import connections, transaction
from django.urls import get_resolver... | apache-2.0 |
resmo/ansible | test/units/modules/network/fortios/test_fortios_vpn_ipsec_manualkey_interface.py | 21 | 12459 | # Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | gpl-3.0 |
Tomcuzz/OctaHomeAutomation | OctaHomeSettings/views.py | 1 | 14790 | from django.conf import settings
import json
from OctaHomeCore.baseviews import *
from OctaHomeCore.models import *
from OctaHomeCore.OctaFiles.menus.base import *
from OctaHomeCore.weathermodels import *
from OctaHomeCore.helpers import *
from OctaHomeCore.authmodels import *
from OctaHomeAppInterface.models import *... | mit |
treycausey/scikit-learn | examples/linear_model/plot_ransac.py | 250 | 1673 | """
===========================================
Robust linear model estimation using RANSAC
===========================================
In this example we see how to robustly fit a linear model to faulty data using
the RANSAC algorithm.
"""
import numpy as np
from matplotlib import pyplot as plt
from sklearn import ... | bsd-3-clause |
Phrozyn/MozDef | alerts/actions/dashboard_geomodel.py | 2 | 4699 | # 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/.
# Copyright (c) 2014 Mozilla Corporation
import hjson
import os
from binascii import b2a_hex
import boto3
import datetim... | mpl-2.0 |
c-base/libavg | src/test/PythonTest.py | 1 | 8073 | # -*- coding: utf-8 -*-
# libavg - Media Playback Engine.
# Copyright (C) 2003-2014 Ulrich von Zadow
#
# 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 Software Foundation; either
# version 2 of the License, o... | lgpl-2.1 |
devops2014/djangosite | django/contrib/gis/measure.py | 118 | 12286 | # Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz>
# 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 must retain the above copyright notice,
#... | bsd-3-clause |
anubhav929/eden | static/scripts/Database_migration/migration_scripts.py | 3 | 7058 |
# All the functions that does the migration have been added to migration_scripts file . migration_scripts file
# internally calls the functions of migration_helping_methods file too perform the migration . Thus in order to
# do the migration one just needs to import migration_scripts and call the method correspondin... | mit |
dsajkl/123 | lms/djangoapps/instructor/tests/test_legacy_reset.py | 6 | 2859 | """
View-level tests for resetting student state in legacy instructor dash.
"""
import json
from django.core.urlresolvers import reverse
from django.test.utils import override_settings
from courseware.tests.helpers import LoginEnrollmentTestCase
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
f... | agpl-3.0 |
gandreello/openthread | tests/scripts/thread-cert/Cert_8_2_02_JoinerRouter.py | 3 | 4557 | #!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# 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 must retain the above copyright
# ... | bsd-3-clause |
divegeek/keyczar | cpp/src/tools/swtoolkit/test/environment_tools_test.py | 18 | 10313 | #!/usr/bin/python2.4
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of... | apache-2.0 |
manjunaths/tensorflow | tensorflow/contrib/framework/python/ops/arg_scope_test.py | 115 | 7232 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
Pistachitos/Sick-Beard | lib/requests/auth.py | 55 | 13225 | # -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import re
import time
import hashlib
import logging
from base64 import b64encode
from .compat import urlparse, str
from .utils import parse_dict_header
try:
from ._oauth import ... | gpl-3.0 |
xzturn/tensorflow | tensorflow/python/kernel_tests/ctc_decoder_ops_test.py | 22 | 8909 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
Djabbz/wakatime | wakatime/packages/pygments_py3/pygments/formatters/rtf.py | 73 | 5049 | # -*- coding: utf-8 -*-
"""
pygments.formatters.rtf
~~~~~~~~~~~~~~~~~~~~~~~
A formatter that generates RTF files.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.formatter import Formatter
from pygments.util import get_i... | bsd-3-clause |
JianyuWang/neutron | neutron/db/l3_agentschedulers_db.py | 7 | 22800 | # Copyright (c) 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 |
ammarkhann/FinalSeniorCode | lib/python2.7/site-packages/cryptography/hazmat/backends/openssl/ec.py | 1 | 10656 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
from cryptography import utils
from cryptography.exceptions import (
... | mit |
shawnwanderson/cmput404-project | venv/lib/python2.7/site-packages/django/db/backends/sqlite3/creation.py | 166 | 4846 | import os
import shutil
import sys
from django.core.exceptions import ImproperlyConfigured
from django.db.backends.base.creation import BaseDatabaseCreation
from django.utils.six.moves import input
class DatabaseCreation(BaseDatabaseCreation):
def _get_test_db_name(self):
test_database_name = self.conne... | gpl-3.0 |
mtambos/online-anomaly-detection | src/mgng/ring_buffer.py | 2 | 2154 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the ho... | mit |
patochectp/navitia | source/jormungandr/jormungandr/georef.py | 2 | 5365 | # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public t... | agpl-3.0 |
Belval/pdf2image | pdf2image/parsers.py | 1 | 1820 | """
pdf2image custom buffer parsers
"""
from io import BytesIO
from PIL import Image
def parse_buffer_to_ppm(data):
"""Parse PPM file bytes to Pillow Image"""
images = []
index = 0
while index < len(data):
code, size, rgb = tuple(data[index : index + 40].split(b"\n")[0:3])
siz... | mit |
vikomall/pyrax | pyrax/clouddatabases.py | 11 | 31571 | # -*- coding: utf-8 -*-
# Copyright (c)2012 Rackspace US, 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/LIC... | apache-2.0 |
erdc/proteus | proteus/tests/cylinder2D/ibm_method/cylinder_so.py | 1 | 3701 | from __future__ import absolute_import
import proteus.default_so
from importlib import reload
reload(proteus.default_so)
from proteus.default_so import *
try:
from . import cylinder
except:
import cylinder
reload(cylinder)
from proteus.SplitOperator import Sequential_FixedStep_Simple, defaultSystem
if cylinde... | mit |
hhLeo/ucore_lab | related_info/ostep/ostep13-vsfs.py | 54 | 17070 | #! /usr/bin/env python
import random
from optparse import OptionParser
DEBUG = False
def dprint(str):
if DEBUG:
print str
printOps = True
printState = True
printFinal = True
class bitmap:
def __init__(self, size):
self.size = size
self.bmap = []
for num in range(s... | gpl-2.0 |
Edgar-Bruno/Estudos_iniciais_Python | GTK/sudoku/OrdenadasVerificar.py | 1 | 1348 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
# Verificação de repetição no eixo das abscissas
indexMatriz = 46 # Index da matriz passado no click
i = indexMatriz
dicOrdenadas = {} # Key é o index da listaMatriz, value é o existe ou não
listaMatriz = [6, 2, 4, 1, 5, 9, 7, 6, 8,
9, 7, 8, 2, 6, 3, 1, 9,... | gpl-3.0 |
2014c2g14/c2g14 | exts/w2/static/Brython2.0.0-20140209-164925/Lib/string.py | 734 | 9410 | """A collection of string constants.
Public module variables:
whitespace -- a string containing all ASCII whitespace
ascii_lowercase -- a string containing all ASCII lowercase letters
ascii_uppercase -- a string containing all ASCII uppercase letters
ascii_letters -- a string containing all ASCII letters
digits -- a ... | gpl-2.0 |
alihalabyah/ansible | lib/ansible/utils/module_docs_fragments/cloudstack.py | 85 | 2161 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 René Moser <mail@renemoser.net>
#
# 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
# (... | gpl-3.0 |
andrey-malets/web-page-replay | third_party/dns/ipv4.py | 250 | 1365 | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | apache-2.0 |
heran7/edx-platform | lms/djangoapps/courseware/features/common.py | 9 | 6423 | # pylint: disable=C0111
# pylint: disable=W0621
from __future__ import absolute_import
from lettuce import world, step
from django.contrib.auth.models import User
from student.models import CourseEnrollment
from xmodule.modulestore import Location
from xmodule.modulestore.django import modulestore
from xmodule.course... | agpl-3.0 |
xindus40223115/w16b_test | static/Brython3.1.1-20150328-091302/Lib/multiprocessing/pool.py | 694 | 23263 | #
# Module providing the `Pool` class for managing a process pool
#
# multiprocessing/pool.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
__all__ = ['Pool']
#
# Imports
#
import threading
import queue
import itertools
import collections
import time
from multiprocessing ... | gpl-3.0 |
kenwmitchell/ansible-modules-core | cloud/rackspace/rax_clb_nodes.py | 157 | 8616 | #!/usr/bin/python
# 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.
#
# Ansible is distributed... | gpl-3.0 |
abarnert/pyinterval | test/__init__.py | 1 | 2481 | # Copyright (c) 2008, Stefano Taschini <taschini@ieee.org>
# All rights reserved.
# See LICENSE for details.
class app(object):
def __init__(self, doctests = None, docfiles = None):
self.doctests = doctests or []
self.docfiles = docfiles or []
def _import(self, name):
m = __import__(n... | bsd-3-clause |
sudosurootdev/external_chromium_org | tools/telemetry/telemetry/core/backends/chrome/ios_browser_finder.py | 25 | 4184 | # 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.
"""Finds iOS browsers that can be controlled by telemetry."""
import logging
import re
import subprocess
from telemetry import decorators
from telemetry.co... | bsd-3-clause |
apache/incubator-superset | superset/db_engine_specs/teradata.py | 4 | 1793 | # 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 u... | apache-2.0 |
gimler/techism2 | gaeauth/views.py | 2 | 1405 | from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.contrib.auth import login as django_login, \
authenticate as django_authenticate, logout as django_logout, \
REDIRECT_FIELD_NAME
from google.appengine.api import users
# redirects to the google user api gene... | apache-2.0 |
miyucy/oppia | extensions/objects/models/objects.py | 1 | 13859 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | apache-2.0 |
ssanderson/numpy | numpy/f2py/tests/test_callback.py | 145 | 3040 | from __future__ import division, absolute_import, print_function
import math
import textwrap
from numpy import array
from numpy.testing import run_module_suite, assert_, assert_equal, dec
import util
class TestF77Callback(util.F2PyTest):
code = """
subroutine t(fun,a)
integer a
cf2py intent(out) ... | bsd-3-clause |
NoelMacwan/SXDTianchi | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | 1927 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 |
AndrewGrossman/django | django/utils/crypto.py | 452 | 6878 | """
Django's standard crypto functions and utilities.
"""
from __future__ import unicode_literals
import binascii
import hashlib
import hmac
import random
import struct
import time
from django.conf import settings
from django.utils import six
from django.utils.encoding import force_bytes
from django.utils.six.moves i... | bsd-3-clause |
kepstin/picard | picard/ui/ui_options_folksonomy.py | 2 | 5901 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/options_folksonomy.ui'
#
# Created: Tue May 29 19:44:14 2012
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
... | gpl-2.0 |
ghislainp/iris | lib/iris/tests/unit/fileformats/ff/test_FF2PP.py | 2 | 15777 | # (C) British Crown Copyright 2013 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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 l... | gpl-3.0 |
ycaihua/kbengine | kbe/res/scripts/common/Lib/test/test_codecs.py | 60 | 111483 | import codecs
import contextlib
import io
import locale
import sys
import unittest
import warnings
import encodings
from test import support
if sys.platform == 'win32':
VISTA_OR_LATER = (sys.getwindowsversion().major >= 6)
else:
VISTA_OR_LATER = False
try:
import ctypes
except ImportError:
ctypes = N... | lgpl-3.0 |
schlos/eden | modules/s3db/msg.py | 7 | 91452 | # -*- coding: utf-8 -*-
""" Sahana Eden Messaging Model
@copyright: 2009-2015 (c) Sahana Software Foundation
@license: MIT
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 wit... | mit |
liamgh/liamgreenhughes-sl4a-tf101 | python/src/Modules/cgen.py | 44 | 15363 | ########################################################################
# Copyright (c) 2000, BeOpen.com.
# Copyright (c) 1995-2000, Corporation for National Research Initiatives.
# Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
# All rights reserved.
#
# See the file "Misc/COPYRIGHT" for information on usag... | apache-2.0 |
robertnishihara/ray | python/ray/tune/integration/keras.py | 3 | 10398 | from collections import Counter
from typing import Dict, List, Union
from tensorflow.keras.callbacks import Callback
from ray import tune
import os
class TuneCallback(Callback):
"""Base class for Tune's Keras callbacks."""
_allowed = [
"batch_begin",
"batch_end",
"epoch_begin",
... | apache-2.0 |
ApplauseAQI/androguard | androguard/decompiler/dad/decompile.py | 6 | 17011 | # This file is part of Androguard.
#
# Copyright (c) 2012 Geoffroy Gueguen <geoffroy.gueguen@gmail.com>
# 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://... | apache-2.0 |
ilyashrn/ilyashrn.github.io | node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/_postgres_builtins.py | 269 | 9648 | # -*- coding: utf-8 -*-
"""
pygments.lexers._postgres_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Self-updating data files for PostgreSQL lexer.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import urllib
# One man's cons... | mit |
sarielsaz/sarielsaz | test/functional/test_framework/test_framework.py | 1 | 20268 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Sarielsaz Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
from collections import deque
from enum import Enum
import logging
im... | mit |
cgstudiomap/cgstudiomap | main/parts/odoo/openerp/addons/base/tests/test_menu.py | 501 | 1450 | import openerp.tests.common as common
class test_menu(common.TransactionCase):
def setUp(self):
super(test_menu,self).setUp()
self.Menus = self.registry('ir.ui.menu')
def test_00_menu_deletion(self):
"""Verify that menu deletion works properly when there are child menus, and those
... | agpl-3.0 |
alinelena/quill | tests/testrunner.py | 4 | 49478 | #!/usr/bin/env python
############################################################################
##
## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
## Contact: Alexander Bokovoy <alexander.bokovoy@nokia.com>
##
## This file is part of the Quill package.
##
## Commercial Usage
## Licensees holdin... | gpl-3.0 |
puzan/ansible | test/units/module_utils/basic/test_deprecate_warn.py | 50 | 2719 | # -*- 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.
#
# Ansible is dis... | gpl-3.0 |
capveg/ONL | components/all/vendor-config/qemu/src/python/qemu/__init__.py | 9 | 1313 | #!/usr/bin/python
############################################################
# <bsn.cl fy=2013 v=onl>
#
# Copyright 2013, 2014 Big Switch Networks, Inc.
#
# Licensed under the Eclipse Public License, Version 1.0 (the
# "License"); you may not use this file except in compliance
# with the License. You ... | epl-1.0 |
egabancho/invenio | invenio/modules/indexer/tokenizers/BibIndexDOITokenizer.py | 2 | 2014 | # -*- coding:utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2013 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 option) an... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.