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 |
|---|---|---|---|---|---|
sankalpg/Essentia_tonicDebug_TEMP | src/python/essentia/extractor/segmentation_simple.py | 10 | 2872 | # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 (FSF), either version 3 of the ... | agpl-3.0 |
shubhdev/edx-platform | common/test/acceptance/tests/studio/test_studio_settings_details.py | 4 | 7591 | """
Acceptance tests for Studio's Settings Details pages
"""
from unittest import skip
from .base_studio_test import StudioCourseTest
from ...fixtures.course import CourseFixture
from ...pages.studio.settings import SettingsPage
from ...pages.studio.overview import CourseOutlinePage
from ...tests.studio.base_studio_te... | agpl-3.0 |
torresj/cafe | contacto.py | 2 | 7363 | # -*- coding: utf-8 -*-
"""
Created on Sun Nov 3 13:07:55 2013
@author: jaime
"""
import web
from web.contrib.template import render_mako
from web import form
import pymongo
import feedparser
import time
from keys import *
import tweepy
render = render_mako(
directories=['plantillas'],
input_encodin... | gpl-2.0 |
hynekcer/django | tests/foreign_object/test_empty_join.py | 232 | 1498 | from django.test import TestCase
from .models import SlugPage
class RestrictedConditionsTests(TestCase):
def setUp(self):
slugs = [
'a',
'a/a',
'a/b',
'a/b/a',
'x',
'x/y/z',
]
SlugPage.objects.bulk_create([SlugPage(sl... | bsd-3-clause |
ppyordanov/HCI_4_Future_Cities | Server/src/virtualenv/Lib/site-packages/pip/_vendor/requests/packages/urllib3/fields.py | 1 | 5990 | # urllib3/fields.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import email.utils
import mimetypes
from .packages import six
def guess_content_type(filename... | mit |
malja/cvut-python | cviceni07/frequency.py | 1 | 1393 | import sys
from collections import Counter
def loadFile( filename ):
words = []
with open(filename) as file:
for line in file:
# Kvůli poslednímu slovu
line += " "
word = ""
for char in line:
if not char.isalpha():
... | mit |
erikdejonge/newsrivr | daemons/d_checkdoubleusernames.py | 1 | 3053 | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import str
from d_utils import *
def clog(s):
s= str(s)
print('\033[%96m'+strfti... | gpl-2.0 |
nikoonia/gem5v | configs/common/Benchmarks.py | 36 | 6206 | # Copyright (c) 2006-2007 The Regents of The University of Michigan
# 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 ... | bsd-3-clause |
fjbatresv/odoo | addons/website_sale_delivery/controllers/main.py | 124 | 1551 | # -*- coding: utf-8 -*-
import openerp
from openerp import http
from openerp.http import request
import openerp.addons.website_sale.controllers.main
class website_sale(openerp.addons.website_sale.controllers.main.website_sale):
@http.route(['/shop/payment'], type='http', auth="public", website=True)
def paym... | agpl-3.0 |
bcarroll/authmgr | python-3.6.2-Win64/Lib/site-packages/werkzeug/contrib/securecookie.py | 91 | 12174 | # -*- coding: utf-8 -*-
r"""
werkzeug.contrib.securecookie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module implements a cookie that is not alterable from the client
because it adds a checksum the server checks for. You can use it as
session replacement if all you have is a user id or something to mark
... | bsd-3-clause |
jeremiahmarks/Todo.txt-python | tests/base.py | 2 | 3810 | # TODO.TXT-CLI-python test script
# Copyright (C) 2011-2012 Sigmavirus24, Jeff Stein
#
# 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) an... | gpl-3.0 |
Kha/flask-admin | examples/layout_bootstrap3/app.py | 43 | 6109 | import os
import os.path as op
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import flask_admin as admin
from flask_admin.contrib.sqla import ModelView
# Create application
app = Flask(__name__)
# Create dummy secrey key so we can use sessions
app.config['SECRET_KEY'] = '123456790'
# Create in-me... | bsd-3-clause |
testmana2/test | Helpviewer/HelpSearchWidget.py | 2 | 4654 | # -*- coding: utf-8 -*-
# Copyright (c) 2009 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a window for showing the QtHelp index.
"""
from __future__ import unicode_literals
from PyQt5.QtCore import pyqtSignal, Qt, QEvent, QUrl
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QTextBr... | gpl-3.0 |
Judystudy/gooderp_addons | sell/report/sell_summary_goods.py | 6 | 6707 | # -*- coding: utf-8 -*-
from odoo import fields, models, api
import odoo.addons.decimal_precision as dp
import datetime
class SellSummaryGoods(models.Model):
_name = 'sell.summary.goods'
_inherit = 'report.base'
_description = u'销售汇总表(按商品)'
id_lists = fields.Text(u'移动明细行id列表')
goods_categ = fiel... | agpl-3.0 |
zerkrx/zerkbox | lib/youtube_dl/extractor/disney.py | 21 | 6696 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
int_or_none,
unified_strdate,
compat_str,
determine_ext,
ExtractorError,
)
class DisneyIE(InfoExtractor):
_VALID_URL = r'''(?x)
https?://(?P<domain>(?:[^/]+\.)?(?... | gpl-3.0 |
mastizada/kuma | kuma/wiki/migrations/0023_attachment_m2m.py | 5 | 17911 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'DocumentAttachment'
db.create_table('wiki_documentattachment', (
('id', self.gf('djang... | mpl-2.0 |
hernandito/SickRage | lib/sqlalchemy/dialects/postgresql/zxjdbc.py | 79 | 1395 | # postgresql/zxjdbc.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: postgresql+zxjdbc
:name: zxJDBC for Jython
:dbapi: zxjdb... | gpl-3.0 |
sserrot/champion_relationships | venv/Lib/site-packages/win32/lib/pywintypes.py | 6 | 7120 | # Magic utility that "redirects" to pywintypesxx.dll
import imp, sys, os
def __import_pywin32_system_module__(modname, globs):
# This has been through a number of iterations. The problem: how to
# locate pywintypesXX.dll when it may be in a number of places, and how
# to avoid ever loading it twice. This... | mit |
yavalvas/yav_com | build/matplotlib/examples/user_interfaces/embedding_in_wx2.py | 9 | 2706 | #!/usr/bin/env python
"""
An example of how to use wx or wxagg in an application with the new
toolbar - comment out the setA_toolbar line for no toolbar
"""
# Used to guarantee to use at least Wx2.8
import wxversion
wxversion.ensureMinimal('2.8')
from numpy import arange, sin, pi
import matplotlib
# uncomment the f... | mit |
cbschaff/NBP | src/models/beacon10.py | 1 | 1853 | """
Copyright (C) 2017 Charles Schaff, David Yunis, Ayan Chakrabarti,
Matthew R. Walter. See LICENSE.txt for details.
"""
# Beacon model 10: fixed beacons of 8 channels in alternating clusters (of different subsets of 16)
import tensorflow as tf
import numpy as np
# Use with 8 channels
wn=1
def beacon(self):
N... | gpl-3.0 |
msreis/SigNetSim | signetsim/views/auth/ActivateAccountView.py | 2 | 2778 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br)
#
# This file is part of libSigNetSim.
#
# libSigNetSim 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 Fou... | agpl-3.0 |
pyzaba/pyzaba | lib/requests/packages/charade/charsetprober.py | 3127 | 1902 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | bsd-3-clause |
Jin-W-FS/chinese-words-segmentation-test | WordDict.py | 1 | 1045 | #!/usr/bin/env python
# *- coding: utf-8 -*-
PUNCTUATIONS = (set(u'''`~!@#$%^&*()_+-={}[]|\:";'<>?,./ ''') |
set(u'''~`!@#¥%……&*()——+-=『』【】、‘’“”:;《》?,。/''')) - \
set(u'''_''') # not punctuation
class WordDict(dict):
def __init__(self, *args, **kwargs):
dict.__init__(self, ... | gpl-2.0 |
SU-ECE-17-7/ibeis | ibeis/web/routes.py | 1 | 58514 | # -*- coding: utf-8 -*-
"""
Dependencies: flask, tornado
"""
from __future__ import absolute_import, division, print_function
import random
import math
from flask import request, current_app, url_for
from ibeis.control import controller_inject
from ibeis import constants as const
from ibeis.constants import KEY_DEFAULT... | apache-2.0 |
rlaboiss/pelican-plugins | post_stats/readability.py | 73 | 1362 | # -*- coding: utf-8 -*-
# Adadpted from here: http://acdx.net/calculating-the-flesch-kincaid-level-in-python/
# See here for details: http://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_test
from __future__ import division
import re
def mean(seq):
return sum(seq) / len(seq)
def syllables(word):
... | agpl-3.0 |
shrimo/PyQt4 | examples/webkit/previewer/ui_previewer.py | 6 | 3467 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'previewer.ui'
#
# Created: Mon Nov 29 17:09:55 2010
# by: PyQt4 UI code generator snapshot-4.8.2-241fbaf4620d
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString... | gpl-2.0 |
zstyblik/infernal-twin | build/reportlab/tests/test_platypus_accum.py | 14 | 3168 | from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocation
setOutDir(__name__)
import os,unittest
from reportlab.platypus import Spacer, SimpleDocTemplate, Table, TableStyle, LongTable
from reportlab.platypus.doctemplate import PageAccumulator
from reportlab.platypus.paragraph import P... | gpl-3.0 |
kiall/designate-py3 | tools/install_venv.py | 11 | 2341 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2010 OpenStack Foundation
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this... | apache-2.0 |
mangalaman93/docker-py | docker/utils/types.py | 43 | 2304 | import six
class LogConfigTypesEnum(object):
_values = (
'json-file',
'syslog',
'journald',
'gelf',
'fluentd',
'none'
)
JSON, SYSLOG, JOURNALD, GELF, FLUENTD, NONE = _values
class DictType(dict):
def __init__(self, init):
for k, v in six.iterit... | apache-2.0 |
alander/StarCluster | starcluster/commands/removenode.py | 19 | 5236 | # Copyright 2009-2014 Justin Riley
#
# This file is part of StarCluster.
#
# StarCluster is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later ... | gpl-3.0 |
mbrugg/MC-EWIO64-ORG | board/pxa255_idp/pxa_reg_calcs.py | 65 | 11003 | #!/usr/bin/python
# (C) Copyright 2004
# BEC Systems <http://bec-systems.com>
# Cliff Brake <cliff.brake@gmail.com>
# 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 Li... | gpl-2.0 |
cgcgbcbc/django-xadmin | xadmin/plugins/themes.py | 25 | 2797 | #coding:utf-8
import urllib
from django.template import loader
from django.core.cache import cache
from django.utils.translation import ugettext as _
from xadmin.sites import site
from xadmin.models import UserSettings
from xadmin.views import BaseAdminPlugin, BaseAdminView
from xadmin.util import static, json
THEME_C... | bsd-3-clause |
myerpengine/odoo | openerp/modules/migration.py | 64 | 7546 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2013 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... | agpl-3.0 |
dstroppa/openstack-smartos-nova-grizzly | nova/tests/test_test.py | 25 | 1731 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 |
andmos/ansible | lib/ansible/modules/cloud/google/gcp_sql_database.py | 9 | 9612 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 |
Jannes123/inasafe | safe/impact_functions/inundation/flood_polygon_population/test/test_flood_polygon_population.py | 2 | 3475 | # coding=utf-8
"""
InaSAFE Disaster risk assessment tool developed by AusAid and World Bank
- *Flood Vector on Population Test Cases.**
Contact : ole.moller.nielsen@gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as pub... | gpl-3.0 |
gautam1858/tensorflow | tensorflow/python/framework/subscribe_test.py | 22 | 13362 | # Copyright 2015 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 |
tequa/ammisoft | ammimain/WinPython-64bit-2.7.13.1Zero/python-2.7.13.amd64/Lib/site-packages/pip/_vendor/requests/packages/urllib3/connection.py | 511 | 11617 | from __future__ import absolute_import
import datetime
import logging
import os
import sys
import socket
from socket import error as SocketError, timeout as SocketTimeout
import warnings
from .packages import six
try: # Python 3
from http.client import HTTPConnection as _HTTPConnection
from http.client import... | bsd-3-clause |
j0lly/molecule | test/unit/verifier/test_ansible_lint.py | 3 | 1797 | # Copyright (c) 2015-2016 Cisco Systems, 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... | mit |
glove747/liberty-neutron | neutron/db/migration/alembic_migrations/versions/liberty/expand/48153cb5f051_qos_db_changes.py | 32 | 2545 | # Copyright 2015 Huawei Technologies India Pvt Ltd, 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 ... | apache-2.0 |
Zentyal/samba | source4/scripting/devel/repl_cleartext_pwd.py | 43 | 16362 | #!/usr/bin/env python
#
# Copyright Stefan Metzmacher 2011-2012
#
# 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.
#
# Th... | gpl-3.0 |
163gal/Time-Line | libs/wx/py/PySlices.py | 10 | 3159 | #!/usr/bin/env python
"""PySlices is a python block code editor / shell and namespace browser application."""
# The next two lines, and the other code below that makes use of
# ``__main__`` and ``original``, serve the purpose of cleaning up the
# main namespace to look as much as possible like the regular Python
# she... | gpl-3.0 |
lenovo-yt2-dev/android_kernel_lenovo_baytrail | tools/perf/scripts/python/failed-syscalls-by-pid.py | 11180 | 2058 | # failed 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 failed system call totals, broken down by pid.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.pa... | gpl-2.0 |
rlutz/xorn | tests/cpython/storage/get_obdata.py | 1 | 1953 | # Copyright (C) 2013-2019 Roland Lutz
#
# 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 program is distributed ... | gpl-2.0 |
qguv/config | weechat/community/wee-slack/wee_slack.py | 1 | 197049 | # Copyright (c) 2014-2016 Ryan Huber <rhuber@gmail.com>
# Copyright (c) 2015-2018 Tollef Fog Heen <tfheen@err.no>
# Copyright (c) 2015-2020 Trygve Aaberge <trygveaa@gmail.com>
# Released under the MIT license.
from __future__ import print_function, unicode_literals
from collections import OrderedDict
from datetime im... | gpl-3.0 |
partofthething/home-assistant | homeassistant/components/fortios/device_tracker.py | 24 | 2933 | """
Support to use FortiOS device like FortiGate as device tracker.
This component is part of the device_tracker platform.
"""
import logging
from fortiosapi import FortiOSAPI
import voluptuous as vol
from homeassistant.components.device_tracker import (
DOMAIN,
PLATFORM_SCHEMA,
DeviceScanner,
)
from hom... | mit |
msarana/selenium_python | ENV/Lib/site-packages/pip/_vendor/html5lib/treewalkers/dom.py | 505 | 1421 | from __future__ import absolute_import, division, unicode_literals
from xml.dom import Node
from . import _base
class TreeWalker(_base.NonRecursiveTreeWalker):
def getNodeDetails(self, node):
if node.nodeType == Node.DOCUMENT_TYPE_NODE:
return _base.DOCTYPE, node.name, node.publicId, node.sy... | apache-2.0 |
elliott10/qemu-instru-tracer | scripts/qemu-gdb.py | 286 | 2813 | #!/usr/bin/python
# GDB debugging support
#
# Copyright 2012 Red Hat, Inc. and/or its affiliates
#
# Authors:
# Avi Kivity <avi@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
#
# Contributions after 2012-01-13 are licensed under the... | gpl-2.0 |
Ictp/indico | doc/api/source/event_api_docs.py | 2 | 2619 | import StringIO
import os, sys, re, types
from zope.interface import Interface, interface
import conf
PATH = '../../../indico/'
from MaKaC import common
from indico.core.extpoint import IListener, IContributor
def iterate_sources(dir, exclude=[]):
"""
iterates through all *.py files inside a dir, recursiv... | gpl-3.0 |
MatusKysel/Medusa | tools/perf/scripts/python/sctop.py | 1996 | 2102 | # system call top
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Periodically displays system-wide system call totals, broken down by
# syscall. If a [comm] arg is specified, only syscalls called by
# [comm] are displayed. If an [interval] arg is specified,... | gpl-2.0 |
towerjoo/mindsbook | django/contrib/messages/storage/cookie.py | 89 | 5873 | from django.conf import settings
from django.contrib.messages import constants
from django.contrib.messages.storage.base import BaseStorage, Message
from django.http import CompatCookie
from django.utils import simplejson as json
from django.utils.crypto import salted_hmac, constant_time_compare
class MessageEncoder(... | bsd-3-clause |
qiyuangong/leetcode | python/404_Sum_of_Left_Leaves.py | 2 | 1068 | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
# def sumOfLeftLeaves(self, root):
# """
# :type root: TreeNode
# :rtype: int
# """
#... | mit |
taigaio/taiga-back | taiga/importers/asana/api.py | 1 | 5842 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-present Taiga Agile LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later ver... | agpl-3.0 |
htwenhe/DJOA | env/Lib/site-packages/django/conf/locale/cy/formats.py | 504 | 1822 | # -*- 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 = 'j F Y' # '25 Hy... | mit |
baruch/libsigrokdecode | decoders/usb_packet/pd.py | 10 | 12962 | ##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2011 Gareth McMullin <gareth@blacksphere.co.nz>
## Copyright (C) 2012-2014 Uwe Hermann <uwe@hermann-uwe.de>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as pu... | gpl-3.0 |
spennihana/h2o-3 | h2o-py/tests/testdir_hdfs/pyunit_NOFEATURE_INTERNAL_HDFS_import_folder_csv_orc_same_milsongs.py | 4 | 1316 | from __future__ import print_function
import sys
sys.path.insert(1,"../../")
import h2o
import time
from tests import pyunit_utils
#----------------------------------------------------------------------
# This test is used to show what happens if we split the same datasets
# into one part csv, one part orc
#-----------... | apache-2.0 |
mayapurmedia/tovp | tovp/contributions/migrations/0030_auto_20150514_1332.py | 2 | 1154 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import model_utils.fields
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('contributions', '0029_auto_20150514_1331'),
]
operations = [
migratio... | mit |
abdellatifkarroum/odoo | addons/crm_partner_assign/wizard/__init__.py | 389 | 1038 | # -*- 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 |
mfalaize/carnet-entretien | compta/forms.py | 2 | 3602 | from django import forms
from django.utils.translation import ugettext_lazy as _
from compta.models import Budget, OperationEpargne, Operation, CategorieEpargne
class BudgetForm(forms.ModelForm):
class Meta:
model = Budget
fields = ['categorie', 'compte_associe', 'budget', 'solde_en_une_fois']
... | gpl-3.0 |
dyrock/trafficserver | tests/gold_tests/thread_config/thread_32_0.test.py | 2 | 2467 | '''
'''
# 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");... | apache-2.0 |
erwilan/ansible | contrib/inventory/ovirt4.py | 70 | 7682 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# 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, ... | gpl-3.0 |
ThinkOpen-Solutions/odoo | addons/account/project/wizard/account_analytic_chart.py | 362 | 2100 | # -*- 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 |
darktears/chromium-crosswalk | tools/grit/grit/tool/diff_structures.py | 62 | 3923 | #!/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.
'''The 'grit sdiff' tool.
'''
import os
import getopt
import tempfile
from grit.node import structure
from grit.tool import inter... | bsd-3-clause |
hequn8128/flink | flink-python/pyflink/table/sources.py | 10 | 2202 | ################################################################################
# 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... | apache-2.0 |
jedie/pypyjs-standalone | website/js/pypy.js-0.3.0/lib/modules/test/test_netrc.py | 50 | 4636 | import netrc, os, unittest, sys, textwrap
from test import test_support
temp_filename = test_support.TESTFN
class NetrcTestCase(unittest.TestCase):
def make_nrc(self, test_data):
test_data = textwrap.dedent(test_data)
mode = 'w'
if sys.platform != 'cygwin':
mode += 't'
... | mit |
AndresVillan/pyafipws | formatos/formato_sql.py | 4 | 15333 | #!/usr/bin/python
# -*- coding: latin-1 -*-
# 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, or (at your option) any later
# version.
#
# This program is distributed in the hope... | gpl-3.0 |
diagramsoftware/odoo | addons/edi/models/__init__.py | 442 | 1116 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
kermitfr/kermit-webui | src/webui/platforms/oc4j/applications.py | 1 | 2735 | '''
Created on Oct 25, 2011
@author: mmornati
'''
from webui.servers.models import Server
from guardian.shortcuts import get_objects_for_user
import logging
from webui.platforms.oc4j.utils import extract_appli_info, check_contains,\
extract_appli_details
from webui.platforms.abstracts import Application
from webui... | gpl-3.0 |
GovCERT-CZ/dionaea | modules/python/util/logsql2postgres.py | 3 | 10245 | #!/opt/dionaea/bin/python3
# sudo su postgres
# createdb --owner=xmpp logsql
# psql -U xmpp logsql < modules/python/util/xmpp/pg_schema.sql
import sqlite3
import postgresql.driver as pg_driver
import optparse
def copy(name, lite, pg, src, dst):
print("[+] {0}".format(name))
pg.execute("DELETE FROM {0}".form... | gpl-2.0 |
Teamxrtc/webrtc-streaming-node | third_party/webrtc/src/chromium/src/tools/perf/page_sets/extension_profile_shared_state.py | 8 | 1202 | # Copyright 2015 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 shutil
from profile_creators import extension_profile_extender
from profile_creators import profile_generator
from telemetry.page import shared_page_... | mit |
namccart/gnuradio | grc/python/epy_block_io.py | 5 | 2648 |
import inspect
import collections
from gnuradio import gr
import pmt
TYPE_MAP = {
'complex64': 'complex', 'complex': 'complex',
'float32': 'float', 'float': 'float',
'int32': 'int', 'uint32': 'int',
'int16': 'short', 'uint16': 'short',
'int8': 'byte', 'uint8': 'byte',
}
BlockIO = collections.na... | gpl-3.0 |
garg10may/youtube-dl | youtube_dl/extractor/telemb.py | 177 | 2964 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import remove_start
class TeleMBIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?telemb\.be/(?P<display_id>.+?)_d_(?P<id>\d+)\.html'
_TESTS = [
{
'url': 'http://www.telemb... | unlicense |
FireWalkerX/eyeOS-FOSS-V.2.0 | devtools/qooxdoo-sdk/tool/pylib/graph/classes/Digraph.py | 4 | 19100 | # Copyright (c) 2007-2009 Pedro Matiello <pmatiello@gmail.com>
# Nathan Davis <davisn90210@gmail.com>
# Zsolt Haraszti <zsolt@drawwell.net>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# f... | agpl-3.0 |
geosolutions-it/wps-remote | src/wpsremote/xmpp_data/configs/myservice/code/test.py | 1 | 3686 | # (c) 2016 Open Source Geospatial Foundation - all rights reserved
# (c) 2014 - 2015 Centre for Maritime Research and Experimentation (CMRE)
# (c) 2013 - 2014 German Aerospace Center (DLR)
# This code is licensed under the GPL 2.0 license, available at the root
# application directory.
import subprocess
import logging... | gpl-2.0 |
majdigital/bigworldgraph | backend/bwg/wikidata_mixins.py | 1 | 13085 | # -*- coding: utf-8 -*-
"""
This module provides two different way to access Wikidata:
* Through the Wikimedia API with ``Pywikibot`` as a wrapper
* Over a scraper using ``BeautifulSoup4``
Currently, accessing the data via the API is faster than the scraper.
"""
# STD
import abc
import hashlib
import thre... | mit |
pong3489/TEST_Mission | Lib/site-packages/numpy/lib/utils.py | 54 | 36175 | import os
import sys
import types
import re
from numpy.core.numerictypes import issubclass_, issubsctype, issubdtype
from numpy.core import product, ndarray, ufunc
__all__ = ['issubclass_', 'get_numpy_include', 'issubsctype', 'issubdtype',
'deprecate', 'deprecate_with_doc', 'get_numarray_include',
'ge... | gpl-3.0 |
errx/django | django/conf/locale/sr/formats.py | 394 | 2011 | # -*- 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 = 'j. F Y.'
TIME_FORMAT = 'H:i'
DATE... | bsd-3-clause |
wolverineav/neutron | neutron/services/metering/drivers/noop/noop_driver.py | 53 | 1594 | # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# 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 applicabl... | apache-2.0 |
Nicolou/grrSallesRepetition | fckeditor/editor/filemanager/connectors/py/fckcommands.py | 14 | 6293 | #!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.or... | gpl-2.0 |
codeforsanjose/trash-pickup-portal | data/env/lib/python2.7/site-packages/setuptools/extension.py | 229 | 1649 | import sys
import re
import functools
import distutils.core
import distutils.errors
import distutils.extension
from .dist import _get_unpatched
from . import msvc9_support
_Extension = _get_unpatched(distutils.core.Extension)
msvc9_support.patch_for_specialized_compiler()
def _have_cython():
"""
Return True... | mit |
Evil-Green/Lonas_KL-GT-I9300-1 | Documentation/target/tcm_mod_builder.py | 3119 | 42754 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: nab@kernel.org
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... | gpl-2.0 |
SEMCOG/synthpop | synthpop/test/test_categorizer.py | 4 | 3418 | import pytest
import numpy as np
from ..census_helpers import Census
from .. import categorizer as cat
@pytest.fixture
def c():
return Census("827402c2958dcf515e4480b7b2bb93d1025f9389")
@pytest.fixture
def acs_data(c):
population = ['B01001_001E']
sex = ['B01001_002E', 'B01001_026E']
race = ['B02001... | bsd-3-clause |
ginkgobioworks/edge | src/edge/models/genome_updater.py | 1 | 2960 | from contextlib import contextmanager
from edge.models.fragment import Fragment
class Genome_Updater(object):
"""
Mixin with helpers for updating genome.
"""
@contextmanager
def annotate_fragment_by_name(self, name):
f = [x for x in self.fragments.all() if x.name == name]
if len(f... | mit |
shuggiefisher/django-on-google-app-engine-base | django/db/models/fields/subclassing.py | 229 | 4356 | """
Convenience routines for creating non-trivial Field subclasses, as well as
backwards compatibility utilities.
Add SubfieldBase as the __metaclass__ for your Field subclass, implement
to_python() and the other necessary methods and everything will work seamlessly.
"""
from inspect import getargspec
from warnings i... | bsd-3-clause |
neale/CS-program | 434-MachineLearning/final_project/linearClassifier/sklearn/decomposition/tests/test_incremental_pca.py | 297 | 8265 | """Tests for Incremental PCA."""
import numpy as np
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_raises
from sklearn import datasets
from sklearn.decomposition import PCA, IncrementalPCA
iris = datasets.load... | unlicense |
tthtlc/volatility | volatility/plugins/overlays/linux/linux64.py | 44 | 1595 | # Volatility
# Copyright (c) 2011 Michael Cohen <scudette@gmail.com>
#
# This file is part of Volatility.
#
# Volatility 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
# (a... | gpl-2.0 |
ujjvala-addsol/addsol_hr | openerp/addons/account/account_financial_report.py | 339 | 7636 | # -*- 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 |
Dany3R9/ns-3-dev-ndnSIM | src/dsdv/bindings/callbacks_list.py | 151 | 1222 | callback_classes = [
['void', 'ns3::Ptr<ns3::Packet const>', 'ns3::Ipv4Header const&', 'ns3::Socket::SocketErrno', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Ipv4Route>', 'ns3::Ptr<ns3::Packet const>', 'ns3::Ipv4Header const&', 'ns3::empty', 'ns3... | gpl-2.0 |
lindsayad/sympy | sympy/interactive/tests/test_ipythonprinting.py | 11 | 6263 | """Tests that the IPython printing module is properly loaded. """
from sympy.core.compatibility import u
from sympy.interactive.session import init_ipython_session
from sympy.external import import_module
from sympy.utilities.pytest import raises
# run_cell was added in IPython 0.11
ipython = import_module("IPython",... | bsd-3-clause |
tinkerinestudio/Tinkerine-Suite | TinkerineSuite/python/Lib/site-packages/wx-2.8-msw-unicode/wx/lib/agw/ribbon/art_aui.py | 6 | 55653 | """
L{RibbonAUIArtProvider} is responsible for drawing all the components of the ribbon
interface using an AUI-compatible appearance.
Description
===========
This allows a ribbon bar to have a pluggable look-and-feel, while retaining the same
underlying behaviour. As a single art provider is used for all ribbon comp... | agpl-3.0 |
iarroyof/distributionalSemanticStabilityThesis | mklObj.py | 2 | 55729 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
__author__ = 'Ignacio Arroyo-Fernandez'
from modshogun import *
from tools.load import LoadMatrix
from sklearn.metrics import r2_score
import random
from math import sqrt
import numpy
from os import getcwd
from sys import stderr
from pdb import set_trace as... | gpl-2.0 |
dharmabumstead/ansible | lib/ansible/modules/clustering/k8s/k8s_raw.py | 18 | 4093 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2018, Chris Houseknecht <@chouseknecht>
# 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 |
EnTeQuAk/django-allauth | allauth/socialaccount/providers/facebook/south_migrations/0003_tosocialaccount.py | 82 | 8978 | # encoding: utf-8
from south.v2 import DataMigration
class Migration(DataMigration):
depends_on = (('socialaccount', '0002_genericmodels'),)
def forwards(self, orm):
# Migrate FB apps
app_id_to_sapp = {}
for app in orm.FacebookApp.objects.all():
sapp = orm['socialaccount.S... | mit |
asimonov-im/boinc | sched/assimilator.py | 28 | 10954 | #!/usr/bin/env python
'''
Generic Assimilator framework
'''
import os, re, signal, sys, time, hashlib
import boinc_path_config
from Boinc import database, boinc_db, boinc_project_path, configxml, sched_messages
# Peter Norvig's Abstract base class hack
def abstract():
"""
This function is not necessary, but p... | gpl-3.0 |
ligaturee/ansible-modules-extras | cloud/centurylink/clc_server.py | 49 | 50314 | #!/usr/bin/python
#
# Copyright (c) 2015 CenturyLink
#
# 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 la... | gpl-3.0 |
jyotikamboj/container | django/contrib/gis/db/backends/postgis/creation.py | 87 | 3505 | from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation
class PostGISCreation(DatabaseCreation):
geom_index_type = 'GIST'
geom_index_ops = 'GIST_GEOMETRY_OPS'
geom_index_ops_nd = 'GIST_GEOMETRY_OPS_ND'
def sql_indexes_for_field(self, model, f, style):
"Return any spatial ... | mit |
pli3/enigma2-pli | lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 9 | 3144 | import os
from Components.config import config
from Tools.Directories import pathExists, fileExists
from Plugins.Plugin import PluginDescriptor
from Components.Harddisk import harddiskmanager
detected_DVD = None
def main(session, **kwargs):
from Screens import DVD
session.open(DVD.DVDPlayer)
def play(session, **kw... | gpl-2.0 |
mandeepdhami/horizon | openstack_dashboard/dashboards/admin/metering/views.py | 51 | 6870 | # 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
# distributed under t... | apache-2.0 |
robertodr/autocmake | autocmake/generate.py | 5 | 8504 | def gen_cmake_command(config):
"""
Generate CMake command.
"""
from autocmake.extract import extract_list
s = []
s.append("\n\ndef gen_cmake_command(options, arguments):")
s.append(' """')
s.append(" Generate CMake command based on options and arguments.")
s.append(' """')
... | bsd-3-clause |
devanlai/pyOCD | pyOCD/target/target_kinetis.py | 5 | 6593 | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013 ARM Limited
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.