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 |
|---|---|---|---|---|---|
axonchisel/ax_metrics | py/axonchisel/metrics/foundation/metricdef/mdefl.py | 1 | 9203 | """
Ax_Metrics - MDefL Metric Definition Language Parser
------------------------------------------------------------------------------
Author: Dan Kamins <dos at axonchisel dot net>
Copyright (c) 2014 Dan Kamins, AxonChisel.net
"""
# ----------------------------------------------------------------------------
imp... | mit |
jtyr/ansible-modules-extras | notification/sns.py | 31 | 6005 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Michael J. Schultz <mjschultz@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 ... | gpl-3.0 |
tysonclugg/django | django/db/models/fields/files.py | 19 | 17906 | import datetime
import posixpath
from django import forms
from django.core import checks
from django.core.files.base import File
from django.core.files.images import ImageFile
from django.core.files.storage import default_storage
from django.db.models import signals
from django.db.models.fields import Field
from djang... | bsd-3-clause |
isrohutamahopetechnik/ardupilot | mk/PX4/Tools/genmsg/src/genmsg/msgs.py | 161 | 12254 | # Software License Agreement (BSD License)
#
# Copyright (c) 2008, Willow Garage, 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... | gpl-3.0 |
berrange/nova | nova/virt/hyperv/vmutils.py | 8 | 29325 | # Copyright (c) 2010 Cloud.com, Inc
# Copyright 2012 Cloudbase Solutions Srl / Pedro Navarro Perez
# 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
#
# ... | apache-2.0 |
steventimberman/masterDebater | env/lib/python2.7/site-packages/django/db/backends/postgresql/creation.py | 58 | 2275 | import sys
from django.db.backends.base.creation import BaseDatabaseCreation
class DatabaseCreation(BaseDatabaseCreation):
def _quote_name(self, name):
return self.connection.ops.quote_name(name)
def _get_database_create_suffix(self, encoding=None, template=None):
suffix = ""
if enc... | mit |
ASAZING/android_kernel_huawei_y210 | 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 |
ecolitan/fatics | venv/lib/python2.7/site-packages/twisted/application/app.py | 13 | 22166 | # -*- test-case-name: twisted.test.test_application,twisted.test.test_twistd -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
import sys, os, pdb, getpass, traceback, signal
from operator import attrgetter
from twisted.python import runtime, log, usage, failure, util, logfile
from twisted.p... | agpl-3.0 |
bonsai-team/matam | scripts/fastq_get_pairs.py | 3 | 4310 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
fastq_get_pairs
Description: Retrieve paired and singleton reads from a single fastq file
fastq_get_pairs.py -i input.fq
-----------------------------------------------------------------------
Author: This software is written and maintained by Pierre Pericard
(p... | agpl-3.0 |
philanthropy-u/edx-platform | lms/djangoapps/grades/migrations/0013_persistentsubsectiongradeoverride.py | 21 | 1201 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from coursewarehistoryextended.fields import UnsignedBigIntOneToOneField
class Migration(migrations.Migration):
dependencies = [
('grades', '0012_computegradessetting'),
]
operations = [
... | agpl-3.0 |
farhi-naz/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py | 124 | 2302 | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause |
pferreir/indico-backup | indico/tests/python/unit/indico_tests/modules_tests/scheduler_tests/tasks_test.py | 1 | 2783 | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico 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; eith... | gpl-3.0 |
PersonalGenomesOrg/open-humans | data_import/templatetags/data_import.py | 2 | 1245 | from django import template
from django.apps import apps
from private_sharing.models import project_membership_visible
from public_data.models import is_public
register = template.Library()
@register.simple_tag
def source_is_connected(source, user):
"""
Return True if the given source is connected (has the ... | mit |
kirillzhuravlev/numpy | numpy/ma/tests/test_regression.py | 113 | 2470 | from __future__ import division, absolute_import, print_function
import warnings
import numpy as np
from numpy.testing import (assert_, TestCase, assert_array_equal,
assert_allclose, run_module_suite)
from numpy.compat import sixu
rlevel = 1
class TestRegression(TestCase):
def test_m... | bsd-3-clause |
salaria/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 |
aospx-kitkat/platform_external_chromium_org | chrome/test/functional/multiprofile.py | 50 | 13257 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import re
import pyauto_functional
import pyauto
class MultiprofileTest(pyauto.PyUITest):
"""Tests for Multi-Profile / Multi-u... | bsd-3-clause |
wolfskaempf/ga_statistics | lib/python2.7/site-packages/crispy_forms/layout.py | 10 | 15081 | import warnings
from django.conf import settings
from django.template import Context, Template
from django.template.loader import render_to_string
from django.utils.html import conditional_escape
from crispy_forms.compatibility import string_types, text_type
from crispy_forms.utils import render_field, flatatt
TEMPL... | mit |
DryFlyRyan/BrewsBrothersChillerFrontEnd | node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py | 1789 | 10585 | # Copyright (c) 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Xcode-ninja wrapper project file generator.
This updates the data structures passed to the Xcode gyp generator to build
with ninja instead. The Xcode project i... | mit |
Lamecarlate/gourmet | gourmet/gglobals.py | 6 | 6335 | import os, os.path, gobject, re, gtk
import tempfile
from gdebug import debug
from OptionParser import args
from util import windows
tmpdir = tempfile.gettempdir()
if args.gourmetdir:
gourmetdir = args.gourmetdir
debug("User specified gourmetdir %s"%gourmetdir,0)
else:
if os.name =='nt':
# Under W... | gpl-2.0 |
aosagie/spark | examples/src/main/python/ml/onehot_encoder_example.py | 31 | 1638 | #
# 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 |
simbits/Lumiere | bulb/bulb.py | 1 | 5877 | #!/usr/bin/env python
from pyomxplayer import OMXPlayer
import RPi.GPIO as GPIO
import pprint
import random
import socket
import struct
import sys
import time
import traceback
DRAWERS = 9
MCAST_GRP = '224.19.79.1'
MCAST_PORT = 9999
MOVIE_PATH = '/usr/share/lumiere/media'
MOVIE_SUFFIX = 'mp4'
MOVIE_LIST = [ '%s/%d.%s... | mit |
medspx/QGIS | python/plugins/processing/gui/PointSelectionPanel.py | 8 | 3303 | # -*- coding: utf-8 -*-
"""
***************************************************************************
PointSelectionPanel.py
---------------------
Date : February 2016
Copyright : (C) 2016 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
****... | gpl-2.0 |
timokoola/finnegan | fwtweeter.py | 1 | 2453 | #!/usr/bin/python
import tweepy, sys, os
from collections import Counter
import re
import argparse # requires 2.7
import time
class TweepyHelper:
def __init__(self,keyfile):
f = open(keyfile)
lines = f.readlines()
f.close()
consumerkey = lines[0].split("#")[0]
consumersecre... | apache-2.0 |
ianatpn/nupictest | examples/opf/experiments/anomaly/temporal/saw_200/description.py | 3 | 14514 | # ----------------------------------------------------------------------
# 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... | gpl-3.0 |
poguez/datacats | datacats/cli/purge.py | 8 | 2153 | # Copyright 2014-2015 Boxkite Inc.
# This file is part of the DataCats package and is released under
# the terms of the GNU Affero General Public License version 3.0.
# See LICENSE.txt or http://www.fsf.org/licensing/licenses/agpl-3.0.html
from shutil import rmtree
from datacats.environment import Environment, Datac... | agpl-3.0 |
klonage/nlt-gcs | Lib/site-packages/scipy/special/utils/makenpz.py | 57 | 2159 | #!/bin/bash
"""
makenpz.py DIRECTORY
Build a npz containing all data files in the directory.
"""
import os
import numpy as np
from optparse import OptionParser
def main():
p = OptionParser()
options, args = p.parse_args()
if len(args) != 1:
p.error("no valid directory given")
inp = args[0]
... | gpl-3.0 |
chengdh/openerp-ktv | openerp/addons/auction/report/buyer_form_report.py | 9 | 2671 | # -*- 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 |
simonwydooghe/ansible | lib/ansible/plugins/connection/__init__.py | 26 | 16411 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.com>
# (c) 2017, Peter Sprygada <psprygad@redhat.com>
# (c) 2017 Ansible Project
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import fcntl
import os
import shlex
from abc... | gpl-3.0 |
40223119/2015w13-1 | static/Brython3.1.3-20150514-095342/Lib/socket.py | 730 | 14913 | # Wrapper module for _socket, providing some additional facilities
# implemented in Python.
"""\
This module provides socket operations and some related functions.
On Unix, it supports IP (Internet Protocol) and Unix domain sockets.
On other systems, it only supports IP. Functions specific for a
socket are available a... | gpl-3.0 |
anthonypdawson/LazyLibrarian | lazylibrarian/webServe.py | 1 | 15735 | import os, cherrypy, urllib
from cherrypy.lib.static import serve_file
from mako.template import Template
from mako.lookup import TemplateLookup
from mako import exceptions
import threading, time
import lazylibrarian
from lazylibrarian import logger, importer, database, postprocess, formatter
from lazylibrarian.sear... | gpl-3.0 |
iw3hxn/server | openerp/pychart/afm/AvantGarde_DemiOblique.py | 15 | 1530 | # -*- coding: utf-8 -*-
# AFM font AvantGarde-DemiOblique (path: /usr/share/fonts/afms/adobe/pagdo8a.afm).
# Derived from Ghostscript distribution.
# Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code.
import dir
dir.afm["AvantGarde-DemiOblique"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500... | agpl-3.0 |
apporc/nova | nova/db/sqlalchemy/migrate_repo/versions/234_add_expire_reservations_index.py | 146 | 1511 | # 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 applicable law or agreed to in... | apache-2.0 |
andrewruba/YangLab | SlideBook spl file converter/spl_reader python 3.py | 1 | 7317 | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 15 12:40:19 2017
@author: Andrew Ruba
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
(a... | gpl-3.0 |
multikatt/CouchPotatoServer | libs/pyasn1/debug.py | 161 | 3044 | import time
import logging
from pyasn1.compat.octets import octs2ints
from pyasn1 import error
from pyasn1 import __version__
flagNone = 0x0000
flagEncoder = 0x0001
flagDecoder = 0x0002
flagAll = 0xffff
flagMap = {
'encoder': flagEncoder,
'decoder': flagDecoder,
'all': flagAll
}
class Prin... | gpl-3.0 |
Vagab0nd/SiCKRAGE | lib3/imdb/Movie.py | 1 | 13758 | # Copyright 2004-2018 Davide Alberani <da@erlug.linux.it>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This pro... | gpl-3.0 |
Therp/odoo | addons/account_bank_statement_extensions/account_bank_statement.py | 179 | 6737 | # -*- 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 |
bbbenja/SickRage | lib/unidecode/x00c.py | 252 | 4102 | data = (
'[?]', # 0x00
'N', # 0x01
'N', # 0x02
'H', # 0x03
'[?]', # 0x04
'a', # 0x05
'aa', # 0x06
'i', # 0x07
'ii', # 0x08
'u', # 0x09
'uu', # 0x0a
'R', # 0x0b
'L', # 0x0c
'[?]', # 0x0d
'e', # 0x0e
'ee', # 0x0f
'ai', # 0x10
'[?]', # 0x11
'o', # 0x12
'oo', # 0x... | gpl-3.0 |
BiznetGIO/horizon | openstack_dashboard/dashboards/admin/hypervisors/tables.py | 10 | 3108 | # Copyright 2013 B1 Systems GmbH
#
# 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 |
rouault/Quantum-GIS | python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py | 16 | 11572 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : TopoViewer plugin for DB Manager
Description : Create a project to display topology schema on Qgis
Date : Sep 23, 2011
copyright : (C) 2011 by Giuseppe Suc... | gpl-2.0 |
dotancohen/fleshwound | fleshwound.py | 1 | 3040 | #!/usr/bin/python3
"""
Python script for finding PHP vulnerabilities and coding errors.
TODO
KNOWN ISSUES
Only supports variable assignment on a single line.
Only supports function declaration on a single line.
Does not support code outside functions after function declarations start.
Does not support variables ... | apache-2.0 |
benbox69/pyload | module/plugins/crypter/QuickshareCzFolder.py | 15 | 1039 | # -*- coding: utf-8 -*-
import re
from module.plugins.internal.Crypter import Crypter
class QuickshareCzFolder(Crypter):
__name__ = "QuickshareCzFolder"
__type__ = "crypter"
__version__ = "0.12"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?quickshare\.cz/slozka-\d+'
__confi... | gpl-3.0 |
defivelo/django-parler | example/example/settings.py | 6 | 3432 | # Django settings for example project.
import django
from os.path import join, dirname, realpath
SRC_DIR = dirname(dirname(realpath(__file__)))
# Add parent path,
# Allow starting the app without installing the module.
import sys
sys.path.insert(0, dirname(SRC_DIR))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
... | apache-2.0 |
ivirshup/bioconda-recipes | recipes/biopet-sampleconfig/0.1/biopet-sampleconfig.py | 24 | 3375 | #!/usr/bin/env python
#
# Wrapper script for starting the biopet-sampleconfig JAR package
#
# This script is written for use with the Conda package manager and is copied
# from the peptide-shaker wrapper. Only the parameters are changed.
# (https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-shaker... | mit |
xifle/home-assistant | script/gen_requirements_all.py | 6 | 3683 | #!/usr/bin/env python3
"""Generate an updated requirements_all.txt."""
import importlib
import os
import pkgutil
import re
import sys
COMMENT_REQUIREMENTS = (
'RPi.GPIO',
'rpi-rf',
'Adafruit_Python_DHT',
'fritzconnection',
'pybluez',
'bluepy',
'python-lirc',
'gattlib',
'pyuserinput'... | mit |
jeffery-do/Vizdoombot | doom/lib/python3.5/site-packages/scipy/optimize/_root.py | 109 | 26007 | """
Unified interfaces to root finding algorithms.
Functions
---------
- root : find a root of a vector function.
"""
from __future__ import division, print_function, absolute_import
__all__ = ['root']
import numpy as np
from scipy._lib.six import callable
from warnings import warn
from .optimize import MemoizeJa... | mit |
neerajvashistha/pa-dude | lib/python2.7/site-packages/django/contrib/gis/gdal/prototypes/raster.py | 320 | 4013 | """
This module houses the ctypes function prototypes for GDAL DataSource (raster)
related data structures.
"""
from ctypes import POINTER, c_char_p, c_double, c_int, c_void_p
from functools import partial
from django.contrib.gis.gdal.libgdal import GDAL_VERSION, std_call
from django.contrib.gis.gdal.prototypes.genera... | mit |
latusrepo/propmtime | test_propmtime/test_run.py | 2 | 1532 |
import time
import os
from balsa import get_logger
import propmtime
import test_propmtime
log = get_logger("test_propmtime")
def get_mtimes(root_folder, file_path):
root_mtime = os.path.getmtime(root_folder)
file_mtime = os.path.getmtime(file_path)
log.info('%s mtime : %f' % (root_folder, root_mtime))... | mit |
ariabuckles/pyobjc-framework-Cocoa | PyObjCTest/test_cfnotificationcenter.py | 3 | 4469 | from PyObjCTools.TestSupport import *
from CoreFoundation import *
try:
long
except NameError:
long = int
class TestNotificationCenter (TestCase):
def testTypes(self):
self.assertIsCFType(CFNotificationCenterRef)
def testTypeID(self):
self.assertIsInstance(CFNotificationCenterGetTy... | mit |
googleinterns/cabby | cabby/geo/visualize.py | 1 | 3273 | # coding=utf-8
# Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | apache-2.0 |
knowsWhereHisTowelIs/pi-pyth-serv-socketio | lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/retry.py | 360 | 10664 | from __future__ import absolute_import
import time
import logging
from ..exceptions import (
ConnectTimeoutError,
MaxRetryError,
ProtocolError,
ReadTimeoutError,
ResponseError,
)
from ..packages import six
log = logging.getLogger(__name__)
class Retry(object):
""" Retry configuration.
... | mit |
craigderington/studentloan5 | studentloan5/Lib/site-packages/django/contrib/admin/validation.py | 82 | 23810 | from django.contrib.admin.utils import NotRelationField, get_fields_from_path
from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured
from django.db import models
from django.forms.models import (
BaseModelForm, BaseModelFormSet, _get_foreign_key,
)
"""
Does basic ModelAdmin option validation. C... | bsd-3-clause |
AkihikoITOH/capybara | capybara/virtualenv/lib/python2.7/site-packages/setuptools/command/bdist_rpm.py | 1049 | 1508 | import distutils.command.bdist_rpm as orig
class bdist_rpm(orig.bdist_rpm):
"""
Override the default bdist_rpm behavior to do the following:
1. Run egg_info to ensure the name and version are properly calculated.
2. Always run 'install' using --single-version-externally-managed to
disable eggs... | mit |
TrevorLowing/PyGames | pysollib/tk/playeroptionsdialog.py | 2 | 6800 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
##---------------------------------------------------------------------------##
##
## Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
## Copyright (C) 2003 Mt. Hood Playing Card Co.
## Copyright (C) 2005-2009 Skomoroh
##
## This program is free ... | gpl-2.0 |
matheus2740/alpha_empire | dgvm/ipc/protocol.py | 1 | 2779 | __author__ = 'salvia'
import pickle
class ICPProtocolException(Exception):
pass
class BaseIPCProtocol(object):
"""
Class which handles how the data is passed through the socket.
This base class implements a very simple mechanism of pickling objects and
prefixing the message with `HEADER_SIZE` h... | gpl-3.0 |
bopo/tablib | tablib/packages/openpyxl/writer/theme.py | 116 | 10933 | # -*- coding: utf-8 -*-
# file openpyxl/writer/theme.py
# Copyright (c) 2010 openpyxl
#
# 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 ... | mit |
mxOBS/deb-pkg_trusty_chromium-browser | third_party/webpagereplay/sslproxy.py | 2 | 3073 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | bsd-3-clause |
bgris/ODL_bgris | lib/python3.5/site-packages/pygments/lexers/data.py | 25 | 18771 | # -*- coding: utf-8 -*-
"""
pygments.lexers.data
~~~~~~~~~~~~~~~~~~~~
Lexers for data file format.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, ExtendedRegexLexer, LexerContext, \
... | gpl-3.0 |
Shiroy/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/example/origin_check_wsh.py | 516 | 1992 | # Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | mpl-2.0 |
ujjwalwahi/odoo | openerp/report/printscreen/__init__.py | 381 | 1203 | # -*- 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 |
painnick/linkToEver | slackutil.py | 1 | 1426 | import logging
import time
import slackweb
WEBHOOK = None
logging.config.fileConfig('log.config')
logger = logging.getLogger('slackLogger')
def message(title, link):
attachments = [
{
'fallback': 'Save links to Evernote.',
'color': 'good',
'title': title,
... | gpl-3.0 |
pabulumm/neighbors | lib/python3.4/site-packages/django/utils/termcolors.py | 76 | 7612 | """
termcolors.py
"""
from django.utils import six
color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white')
foreground = {color_names[x]: '3%s' % x for x in range(8)}
background = {color_names[x]: '4%s' % x for x in range(8)}
RESET = '0'
opt_dict = {'bold': '1', 'underscore': '4', 'blink... | bsd-3-clause |
spiegela/elasticsearch | dev-tools/create_bwc_index_with_conficting_mappings.py | 217 | 2963 | import create_bwc_index
import logging
import os
import random
import shutil
import subprocess
import sys
import tempfile
def fetch_version(version):
logging.info('fetching ES version %s' % version)
if subprocess.call([sys.executable, os.path.join(os.path.split(sys.argv[0])[0], 'get-bwc-version.py'), version]) != ... | apache-2.0 |
sideeffects/stats_houdini | houdini_stats/migrations/0001_initial.py | 1 | 7835 | # encoding: utf-8
import datetime
import south.db
from south.db import dbs
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'MachineConfig'
db = dbs['stats']
db.dry_run = south.db.db.dry_run
... | mit |
chriskmanx/qmole | QMOLEDEV/boost_1_49_0/tools/build/v2/tools/notfile.py | 71 | 1728 | # Status: ported.
# Base revision: 64429.
#
# Copyright (c) 2005-2010 Vladimir Prus.
#
# Use, modification and distribution is subject to the Boost Software
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)
import b2.build.type as type
import b2.build.generat... | gpl-3.0 |
rwl/muntjac | muntjac/demo/sampler/features/commons/BrowserInformation.py | 1 | 1077 |
from muntjac.demo.sampler.APIResource import APIResource
from muntjac.demo.sampler.Feature import Feature, Version
from muntjac.terminal.gwt.server.web_browser import WebBrowser
class BrowserInformation(Feature):
def getDescription(self):
return ('Browser differences are mostly hidden by Muntjac but in ... | apache-2.0 |
BrotherPhil/django | django/conf/locale/eo/formats.py | 504 | 2335 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j\-\a \d\e F Y' # '26-a ... | bsd-3-clause |
Anonymous-X6/django | tests/introspection/models.py | 216 | 1112 | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Reporter(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
email = models.EmailField(... | bsd-3-clause |
barrachri/epcon | p3/management/commands/attendify_schedule_xlsx.py | 2 | 9581 | # -*- coding: utf-8 -*-
""" Update an Attendify schedule XLSX file with the currently accepted
talks.
Usage: manage.py attendify_schedule_xlsx ep2016 schedule.xlsx
Note that for Attendify you have to download the schedule before
running this script, since they add meta data to the downloaded
file ... | bsd-2-clause |
spulec/moto | tests/test_cloudformation/fixtures/route53_health_check.py | 2 | 1093 | from __future__ import unicode_literals
template = {
"Resources": {
"HostedZone": {
"Type": "AWS::Route53::HostedZone",
"Properties": {"Name": "my_zone"},
},
"my_health_check": {
"Type": "AWS::Route53::HealthCheck",
"Properties": {
... | apache-2.0 |
minhphung171093/GreenERP_V8 | openerp/workflow/__init__.py | 378 | 3793 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2014 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 |
shankisg/twisted-intro | twisted/plugins/fastpoetry_plugin.py | 11 | 2309 | # This is the Twisted Fast Poetry Server, version 3.0
from zope.interface import implements
from twisted.python import usage, log
from twisted.plugin import IPlugin
from twisted.internet.protocol import ServerFactory, Protocol
from twisted.application import internet, service
# Normally we would import these classe... | mit |
aviciimaxwell/odoo | addons/purchase_double_validation/purchase_double_validation_installer.py | 432 | 2315 | # -*- 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 |
perryjohnson/biplaneblade | sandia_blade_lib/plot_MK.py | 1 | 6585 | """Plot the mass and stiffness data from Sandia and VABS.
First, data from mass and stiffness matrices for the Sandia blade are written
to the file 'sandia_blade/blade_props_from_VABS.csv'
Then, these data are plotted against published data from Griffith & Resor 2011.
Usage
-----
Open an IPython terminal an... | gpl-3.0 |
Softmotions/edx-platform | common/lib/xmodule/xmodule/tests/test_lti_unit.py | 98 | 22100 | # -*- coding: utf-8 -*-
"""Test for LTI Xmodule functional logic."""
import datetime
from django.utils.timezone import UTC
from mock import Mock, patch, PropertyMock
import textwrap
from lxml import etree
from webob.request import Request
from copy import copy
import urllib
from xmodule.fields import Timedelta
from x... | agpl-3.0 |
fusion809/fusion809.github.io-old | vendor/bundle/ruby/2.2.0/gems/pygments.rb-0.6.3/vendor/pygments-main/pygments/unistring.py | 49 | 404702 | # -*- coding: utf-8 -*-
"""
pygments.unistring
~~~~~~~~~~~~~~~~~~
Strings of all Unicode characters of a certain category.
Used for matching in Unicode-aware languages. Run to regenerate.
Inspired by chartypes_create.py from the MoinMoin project.
:copyright: Copyright 2006-2014 by the Pygment... | gpl-3.0 |
ar7z1/ansible | lib/ansible/modules/network/meraki/meraki_mr_l3_firewall.py | 35 | 9202 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
# 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 = {
... | gpl-3.0 |
mcltn/ansible | lib/ansible/plugins/action/copy.py | 48 | 12949 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@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 License, or
# (at your option) an... | gpl-3.0 |
schlos/eden | modules/tests/org/change_user_roles.py | 27 | 4661 | """ Sahana Eden Automated Test - ORG010 Change User Roles
@copyright: 2011-2012 (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 wi... | mit |
codetorex/spritex | setup.py | 1 | 1345 | #!/usr/bin/env python
from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = ""
packages = [
'editor'
]
requires = [
'numpy>=1.12.1'
'Kivy>=1.10.0'
'pillow>=2.1.0'
'cython'
]
setup(
... | mit |
astronaut1712/taiga-back | tests/integration/test_hooks_github.py | 13 | 17297 | import pytest
from unittest import mock
from django.core.urlresolvers import reverse
from django.core import mail
from taiga.base.utils import json
from taiga.hooks.github import event_hooks
from taiga.hooks.github.api import GitHubViewSet
from taiga.hooks.exceptions import ActionSyntaxException
from taiga.projects.... | agpl-3.0 |
iTagir/kubernetes | staging/src/k8s.io/client-go/_vendor/github.com/ugorji/go/codec/test.py | 1516 | 4019 | #!/usr/bin/env python
# This will create golden files in a directory passed to it.
# A Test calls this internally to create the golden files
# So it can process them (so we don't have to checkin the files).
# Ensure msgpack-python and cbor are installed first, using:
# sudo apt-get install python-dev
# sudo apt-g... | apache-2.0 |
Antiun/odoo | addons/l10n_gt/__openerp__.py | 260 | 2305 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009-2010 Soluciones Tecnologócias Prisma S.A. All Rights Reserved.
# José Rodrigo Fernández Menegazzo, Soluciones Tecnologócias Prisma S.A.
# (http://www.solucionesprisma.com)
#
# This program is ... | agpl-3.0 |
Sinkmanu/auth-system-chronos | Chronos Auth System/tools/Chronos Auth System/tools/urwid/font.py | 8 | 25430 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Urwid BigText fonts
# Copyright (C) 2004-2006 Ian Ward
#
# 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.1... | gpl-3.0 |
taranjeet/EvalAI | apps/web/migrations/0002_added_team_model.py | 5 | 1151 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-02-06 09:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('web', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | bsd-3-clause |
perdona/sorl-thumbnail | tests/thumbnail_tests/test_parsers.py | 17 | 1229 | # -*- coding: utf-8 -*-
import unittest
from sorl.thumbnail.helpers import ThumbnailError
from sorl.thumbnail.parsers import parse_crop, parse_geometry
class CropParserTestCase(unittest.TestCase):
def test_alias_crop(self):
crop = parse_crop('center', (500, 500), (400, 400))
self.assertEqual(crop... | bsd-3-clause |
giorgiop/scikit-learn | examples/mixture/plot_gmm_sin.py | 103 | 6101 | """
=================================
Gaussian Mixture Model Sine Curve
=================================
This example demonstrates the behavior of Gaussian mixture models fit on data
that was not sampled from a mixture of Gaussian random variables. The dataset
is formed by 100 points loosely spaced following a noisy ... | bsd-3-clause |
eatbyte/depot_tools | third_party/boto/auth_handler.py | 106 | 2059 | # Copyright 2010 Google Inc.
#
# 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, dis-
# trib... | bsd-3-clause |
alexallah/django | django/middleware/clickjacking.py | 82 | 1733 | """
Clickjacking Protection Middleware.
This module provides a middleware that implements protection against a
malicious site loading resources from your site in a hidden frame.
"""
from django.conf import settings
from django.utils.deprecation import MiddlewareMixin
class XFrameOptionsMiddleware(MiddlewareMixin):
... | bsd-3-clause |
fbellini/AliPhysics | PWGJE/EMCALJetTasks/Tracks/analysis/base/struct/DataContainers.py | 41 | 12989 | #**************************************************************************
#* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
#* *
#* Author: The ALICE Off-line Project. *
#* Contributors ... | bsd-3-clause |
sublime1809/django | django/core/management/utils.py | 20 | 2832 | from __future__ import unicode_literals
import os
from subprocess import PIPE, Popen
import sys
from django.utils.encoding import force_text, DEFAULT_LOCALE_ENCODING
from django.utils import six
from .base import CommandError
def popen_wrapper(args, os_err_exc_type=CommandError):
"""
Friendly wrapper aroun... | bsd-3-clause |
2014cdag10/2014cdag10 | wsgi/static/Brython2.1.0-20140419-113919/Lib/formatter.py | 751 | 14930 | """Generic output formatting.
Formatter objects transform an abstract flow of formatting events into
specific output events on writer objects. Formatters manage several stack
structures to allow various properties of a writer object to be changed and
restored; writers need not be able to handle relative changes nor an... | gpl-2.0 |
exploreodoo/datStruct | odoo/addons/crm/__openerp__.py | 258 | 4199 | # -*- 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... | gpl-2.0 |
nilsonmorales/Puppyes-nightrc | usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/ard.py | 6 | 2195 | import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
)
class ARDIE(InfoExtractor):
_VALID_URL = r'^(?:https?://)?(?:(?:www\.)?ardmediathek\.de|mediathek\.daserste\.de)/(?:.*/)(?P<video_id>[^/\?]+)(?:\?.*)?'
_TITLE = r'<h1(?: class="boxTopHeadline")?>(?P<title>.*)</h1>'
_ME... | gpl-3.0 |
Atlas7/deepdive | examples/tutorial_example/step3-more-data/experiment-reports/v00001/code/udf/ext_people.py | 161 | 1752 | #! /usr/bin/env python
# Sample input data (piped into STDIN):
'''
118238@10 Sen.~^~Barack~^~Obama~^~and~^~his~^~wife~^~,~^~Michelle~^~Obama~^~,~^~have~^~released~^~eight~^~years~^~of~^~joint~^~returns~^~. O~^~PERSON~^~PERSON~^~O~^~O~^~O~^~O~^~PERSON~^~PERSON~^~O~^~O~^~O~^~DURATION~^~DURATION~^~O~^~O~^~O~^~O
118238@12... | apache-2.0 |
MadCat34/Sick-Beard | lib/requests/packages/oauthlib/oauth2/draft25/__init__.py | 74 | 22862 | """
oauthlib.oauth2.draft_25
~~~~~~~~~~~~~~
This module is an implementation of various logic needed
for signing and checking OAuth 2.0 draft 25 requests.
"""
from tokens import prepare_bearer_uri, prepare_bearer_headers
from tokens import prepare_bearer_body, prepare_mac_header
from parameters import prepare_grant_ur... | gpl-3.0 |
ajayuranakar/django-blog | lib/python2.7/site-packages/setuptools/dist.py | 65 | 32132 | __all__ = ['Distribution']
import re
import sys
from distutils.core import Distribution as _Distribution
from setuptools.depends import Require
from setuptools.command.install import install
from setuptools.command.sdist import sdist
from setuptools.command.install_lib import install_lib
from setuptools.compat import ... | gpl-3.0 |
arnif/CouchPotatoServer | libs/requests/packages/oauthlib/oauth1/rfc5849/parameters.py | 186 | 4817 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
"""
oauthlib.parameters
~~~~~~~~~~~~~~~~~~~
This module contains methods related to `section 3.5`_ of the OAuth 1.0a spec.
.. _`section 3.5`: http://tools.ietf.org/html/rfc5849#section-3.5
"""
from urlparse import urlparse, urlunparse
from . import util... | gpl-3.0 |
annahs/atmos_research | util_move_ptxt_data_to_mySQL_table.py | 1 | 6036 | import sys
import os
import numpy as np
from pprint import pprint
from datetime import datetime
import mysql.connector
import pickle
import math
instrument = 'UBCSP2' #'UBCSP2' #ECSP2
instrument_locn = 'WHI' #'WHI' POLAR6
#this script will run through all the .ptxt files for the WHI data and put the info into the m... | mit |
marcoitur/FreeCAD | src/Mod/Path/PathScripts/dumper_post.py | 20 | 3812 | #***************************************************************************
#* (c) sliptonic (shopinthewoods@gmail.com) 2014 *
#* *
#* This file is part of the FreeCAD CAx development system. *
#* ... | lgpl-2.1 |
cognitiveclass/edx-platform | openedx/core/djangoapps/profile_images/tests/helpers.py | 117 | 1742 | """
Helper methods for use in profile image tests.
"""
from contextlib import contextmanager
import os
from tempfile import NamedTemporaryFile
from django.core.files.uploadedfile import UploadedFile
from PIL import Image
@contextmanager
def make_image_file(dimensions=(320, 240), extension=".jpeg", force_size=None):
... | agpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.