code stringlengths 6 947k | repo_name stringlengths 5 100 | path stringlengths 4 226 | language stringclasses 1
value | license stringclasses 15
values | size int64 6 947k |
|---|---|---|---|---|---|
#### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_dressed_marooned_pirate_hum_f.iff"
result.attribute_template_i... | anhstudios/swganh | data/scripts/templates/object/mobile/shared_dressed_marooned_pirate_hum_f.py | Python | mit | 456 |
#!/usr/bin/env python
'''
Created by Samvel Khalatyan, May 01, 2012
Copyright 2012, All rights reserved
'''
from __future__ import division
import time
class Timer(object):
def __init__(self):
self._calls = 0
self._elapsed = 0
self._start = None
def start(self):
if not self.... | skhal/performance | python/utility/timer.py | Python | mit | 901 |
def resizeApp(app, dx, dy):
switchApp(app)
corner = find(Pattern("1273159241516.png").targetOffset(3,14))
dragDrop(corner, corner.getCenter().offset(dx, dy))
resizeApp("Safari", 50, 50)
# exists("1273159241516.png")
# click(Pattern("1273159241516.png").targetOffset(3,14).similar(0.7).firstN(2))
# with Region(10,100... | bx5974/sikuli | sikuli-ide/sample-scripts/resize-app.sikuli/resize-app.py | Python | mit | 380 |
from bibliopixel.animation.circle import Circle
from bibliopixel.colors import palettes
class Swirl(Circle):
COLOR_DEFAULTS = ('palette', palettes.get('three_sixty')),
def __init__(self, layout, angle=12, **kwds):
super().__init__(layout, **kwds)
self.angle = angle
def pre_run... | ManiacalLabs/BiblioPixelAnimations | BiblioPixelAnimations/circle/swirl.py | Python | mit | 586 |
import click
from arrow.cli import pass_context, json_loads
from arrow.decorators import custom_exception, dict_output
@click.command('get_comments')
@click.argument("feature_id", type=str)
@click.option(
"--organism",
help="Organism Common Name",
type=str
)
@click.option(
"--sequence",
help="Sequ... | erasche/python-apollo | arrow/commands/annotations/get_comments.py | Python | mit | 652 |
# Pylot | mardix/pylot | pylot/app_templates/default/__init__.py | Python | mit | 8 |
import _plotly_utils.basevalidators
class YValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="y", parent_name="volume.caps", **kwargs):
super(YValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
data_class... | plotly/python-api | packages/python/plotly/plotly/validators/volume/caps/_y.py | Python | mit | 1,174 |
import sqlalchemy as sa
from sqlalchemy import inspect
from sqlalchemy.ext import declarative as legacy_decl
from sqlalchemy.ext.declarative import instrument_declarative
from sqlalchemy.orm import Mapper
from sqlalchemy.testing import eq_
from sqlalchemy.testing import expect_deprecated_20
from sqlalchemy.testing impo... | monetate/sqlalchemy | test/ext/declarative/test_deprecations.py | Python | mit | 2,870 |
#
import time
from flask import Flask, json, request
from flask.app import setupmethod
from threading import Thread
class DaemonThread(Thread):
def start(self):
self.daemon = True
super(DaemonThread, self).start()
class WSConnection(object):
def __init__(self, app, wsid, fid):
self.app = app
self.fid = fid
... | sckoh/cloudfire | python/cfcapp.py | Python | mit | 5,964 |
from django.test.client import Client
from django.test import TestCase
from django.urls import reverse
from nose.tools import *
from django.contrib.auth import get_user_model
User = get_user_model()
from amon.apps.servers.models import server_model
class TestServerViews(TestCase):
def setUp(self):
User.... | martinrusev/amonone | amon/apps/servers/tests/views_tests.py | Python | mit | 2,693 |
from egat.testset import UnorderedTestSet
class Test2(UnorderedTestSet):
def testStep1(self):
pass
def testStep2(self):
pass
def testStep3(self):
pass
| egineering-llc/egat | examples/config_example/test2.py | Python | mit | 188 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import platform
if platform.system() == 'Windows':
from compat import *
from puke.Error import *
from puke.Task import *
from puke.Tools import *
from puke.ToolsExec import *
from puke.FileList import *
from puke.Sed import *
from puke.Console import *
from puke.E... | webitup/puke | puke/__init__.py | Python | mit | 7,759 |
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.utils import six
class AccountActivationTokenGenerator(PasswordResetTokenGenerator):
def _make_hash_value(self, user, timestamp):
return (
six.text_type(user.pk) + six.text_type(timestamp) +
six.text_type... | shashank-sharma/mythical-learning | mysite/login/tokens.py | Python | mit | 422 |
import sublime
import sublime_plugin
import json
from os.path import dirname, realpath, join
from .node_bridge import node_bridge
# monkeypatch `Region` to be iterable
sublime.Region.totuple = lambda self: (self.a, self.b)
sublime.Region.__iter__ = lambda self: self.totuple().__iter__()
BIN_PATH = join(sublime.packa... | okoala/sublime-bak | Backup/20150720091700/Babel/Babel.py | Python | mit | 1,796 |
""" A component that designates a wire. """
from graph import Node, Edge
from constraint import Constraint
class Wire(object):
""" Wire component """
def __init__(self, graph, node_a=None, node_b=None, edge_i=None):
""" Initializes a wire with two nodes. Current goes from
A to B. If nodes /... | ThatSnail/impede | impede-app/server/py/wire.py | Python | mit | 2,414 |
"""Test that boolean conditions simplify to a constant value"""
# pylint: disable=pointless-statement
from unknown import Unknown # pylint: disable=import-error
def func(_):
"""Pointless function"""
CONSTANT = 100
OTHER = 200
# Simplifies any boolean expression that is coerced into a True/False value
bool(CON... | ruchee/vimrc | vimfiles/bundle/vim-python/submodules/pylint/tests/functional/c/condition_evals_to_constant.py | Python | mit | 1,666 |
def exec_after_process(app, inp_data, out_data, param_dict, tool, stdout, stderr):
for name,data in out_data.items():
if name == "seq_file2":
data.dbkey = param_dict['dbkey_2']
app.model.context.add( data )
app.model.context.flush()
break | volpino/Yeps-EURAC | tools/filters/axt_to_lav_code.py | Python | mit | 306 |
from ampadb.support import Forms
from django import forms
from django.core.exceptions import ValidationError
from . import ies_format
from .ampacsv import InvalidFormat
from .import_fmts import IEFormats
class ExportForm(Forms.Form):
FORMAT_CHOICES = [(IEFormats.CSV, 'CSV (E-mail)'), (IEFormats.AMPACSV,
... | ampafdv/ampadb | importexport/forms.py | Python | mit | 3,163 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import math
import sys
from thumbor.point import FocalPoint
from th... | food52/thumbor | thumbor/transformer.py | Python | mit | 12,511 |
from widget import Widget
from gui_util import intersect
# Simple container, list of children is not meant to be mutable
class Container(Widget):
def __init__(self, width, height):
super(Container, self).__init__(width, height)
self.children = []
self.curFocus = 0
def draw(self, canvas... | thijsmie/madmin | gui_lib/container.py | Python | mit | 2,228 |
import pandas as pd
def handler(event, context):
return ':)'
| moesy/AWS-Lambda-ML-Microservice-Skeleton | app/main.py | Python | mit | 69 |
from functools import partial
import time
from ukt import KT_NONE
from ukt import KyotoTycoon
from huey.api import Huey
from huey.constants import EmptyData
from huey.storage import BaseStorage
from huey.utils import decode
class KyotoTycoonStorage(BaseStorage):
priority = True
def __init__(self, name='hue... | rsalmaso/huey | huey/contrib/kyototycoon.py | Python | mit | 3,659 |
from __future__ import with_statement
from nose.tools import (
eq_ as eq,
)
from filesystem.test.util import (
maketemp,
assert_raises,
)
import errno
import os
import filesystem
import filesystem.copyonwrite
def test_mkdir():
tmp = maketemp()
filesystem.copyonwrite.path(filesystem.path... | nailor/filesystem | filesystem/test/test_copyonwrite_mkdir.py | Python | mit | 686 |
import chimera.auth as auth
from chimera.auth import User
from flask import Blueprint, abort, redirect, render_template, request, flash, json, url_for
module = Blueprint('users', __name__, template_folder='templates')
def make_json(data, status=200, headers={}):
default_headers = {"Content-Type": "application/jso... | sjklein92/senior-design | chimera/users/__init__.py | Python | mit | 1,620 |
#FLM: Save Files for MakeInstances
###################################################
### THE VALUES BELOW CAN BE EDITED AS NEEDED ######
###################################################
kDefaultMMFontFileName = "mmfont.pfa"
kInstancesDataFileName = "instances"
kCompositeDataName = "temp.composite.dat"
#########... | shannpersand/cooper-type | _resources/FDK Adobe/Tools/FontLabMacros/MM Designs/SaveFilesForMakeInstances.py | Python | cc0-1.0 | 17,235 |
"""Tests for distutils.command.sdist."""
import os
import tarfile
import unittest
import warnings
import zipfile
from os.path import join
from textwrap import dedent
from test.test_support import captured_stdout, check_warnings, run_unittest
# zlib is not used here, but if it's not available
# the tests that use zipfi... | adaussy/eclipse-monkey-revival | plugins/python/org.eclipse.eclipsemonkey.lang.python/Lib/distutils/tests/test_sdist.py | Python | epl-1.0 | 16,944 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''CMU dict file parser
Copyright (C) 2010
Yosuke Matsusaka
Intelligent Systems Research Institute,
National Institute of Advanced Industrial Science and Technology (AIST),
Japan
All rights reserved.
Licensed under the Eclipse Public License -v 1.0 (EP... | yosuke/OpenHRIVoice | openhrivoice/parsecmudict.py | Python | epl-1.0 | 1,210 |
# -*- coding: utf-8 -*-
#
# (C) Pywikipedia bot team, 2004-2013
#
# Distributed under the terms of the MIT license.
#
__version__ = '$Id: 255cc3dc08b2410093f318dc48471c6f3ff691e5 $'
import re
import urllib
from datetime import timedelta, datetime
import config
import wikipedia as pywikibot
# Parent class for all ... | races1986/SafeLanguage | CEM/family.py | Python | epl-1.0 | 242,167 |
"""cellprofiler.gui.tests.__init__.py
CellProfiler is distributed under the GNU General Public License.
See the accompanying file LICENSE for details.
Copyright (c) 2003-2009 Massachusetts Institute of Technology
Copyright (c) 2009-2015 Broad Institute
All rights reserved.
Please see the AUTHORS file for credits.
W... | LeeKamentsky/CellProfiler | cellprofiler/gui/tests/__init__.py | Python | gpl-2.0 | 421 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2008 Adriano Monteiro Marques
#
# Author: Francesco Piccinno <stack.box@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;... | dennisfrancis/PacketManipulator | umit/pm/gui/core/__init__.py | Python | gpl-2.0 | 971 |
import gpib
class PARWriteError(Exception):
pass
class PARReadError(Exception):
pass
class PARCellWorking(Exception):
pass
class Poll:
COMMAND_DONE = 1
COMMAND_ERROR = 2
CURVE_DONE = 4
OVERLOAD = 16
SWEEP_DONE = 32
SRQ = 64
OUTPUT_READY = 128
class PAR... | leszektarkowski/PAR273 | server/server.py | Python | gpl-2.0 | 2,220 |
# -*- coding: utf-8 -*-
__title__ = 'transliterate.contrib.languages.hi.translit_language_pack'
__author__ = 'Artur Barseghyan'
__copyright__ = 'Copyright (c) 2013 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'
__all__ = ('HindiLanguagePack',)
from transliterate.base import TranslitLanguagePack, registry
class H... | akosiaris/transliterate | src/transliterate/contrib/languages/hi/translit_language_pack.py | Python | gpl-2.0 | 1,416 |
from __future__ import division
import logging
import time
import re
import os
import tempfile
import threading
import shutil
import stat
import xml.dom.minidom
try:
import configparser as ConfigParser
except ImportError:
import ConfigParser
from avocado.core import exceptions
from avocado.utils import iso9660... | xutian/avocado-vt | virttest/tests/unattended_install.py | Python | gpl-2.0 | 63,456 |
#!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Michael A.G. Aivazis
# California Institute of Technology
# (C) 1998-2005 All Rights Reserved
#
# <LicenseText>
#
# ~~~~~~~~~~~... | bmi-forum/bmi-pyre | pythia-0.8/packages/pyre/pyre/geometry/pml/parser/Cylinder.py | Python | gpl-2.0 | 1,012 |
# -*- coding: iso-8859-1 -*-
#
# This file is part of GNU Enterprise.
#
# GNU Enterprise 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, or (at your option) any later version.
#
# GNU Enter... | HarmonyEnterpriseSolutions/harmony-platform | src/gnue/common/utils/FileUtils.py | Python | gpl-2.0 | 1,224 |
#
# Copyright (c) 2010 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy o... | alikins/subscription-manager | src/subscription_manager/gui/networkConfig.py | Python | gpl-2.0 | 13,296 |
# functions for processing the parsed syntax tree
import sys
import decimal
import string
import logger
# list of standard functions (from <math.h>) that are
# already known to be included in the destination
# NB: this list is fairly minimal -- the actual math.h
# for a contemporary C compiler is likely to include
# m... | buck06191/BayesCMD | bparser/ast.py | Python | gpl-2.0 | 36,960 |
"""
urlresolver XBMC Addon
Copyright (C) 2011 t0mm0
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.
... | SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/script.module.urlresolver/lib/urlresolver/plugins/daclips.py | Python | gpl-2.0 | 3,494 |
# -*- coding: utf-8 -*-
#
# This file is part of EventGhost.
# Copyright © 2005-2020 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 versio... | tfroehlich82/EventGhost | eg/Classes/SerialPortChoice.py | Python | gpl-2.0 | 2,115 |
__version__ = '1.2.8'
| ricotabor/opendrop | opendrop/vendor/harvesters/__init__.py | Python | gpl-2.0 | 22 |
#!/usr/bin/env python
# encoding: utf-8
from .user import *
from .upload import *
from .post import *
from .system import *
def all():
result = []
models = []
for m in models:
result += m.__all__
return result
__all__ = all()
| luke0922/MarkdownEditor | application/models/__init__.py | Python | gpl-2.0 | 255 |
"""
//=========================================================
// OOMidi
// OpenOctave Midi and Audio Editor
// (C) Copyright 2009 Mathias Gyllengahm (lunar_shuttle@users.sf.net)
//=========================================================
"""
import Pyro.core
import time
oom=Pyro.core.getProxyForURI('PYRONAME://:... | ccherrett/oom | share/pybridge/examples/addtrack.py | Python | gpl-2.0 | 930 |
__author__ = 'jbellino'
import os
import csv
import gdal
import gdalconst
import zipfile as zf
import numpy as np
import pandas as pd
from unitconversion import *
prismGrid_shp = r'G:\archive\datasets\PRISM\shp\prismGrid_p.shp'
prismGrid_pts = r'G:\archive\datasets\PRISM\shp\prismGrid_p.txt'
prismProj = r'G:\archive\d... | inkenbrandt/EPAEN | prism/prism.py | Python | gpl-2.0 | 7,910 |
#
# This file is part of GNU Enterprise.
#
# GNU Enterprise 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, or (at your option) any later version.
#
# GNU Enterprise is distributed ... | fxia22/ASM_xf | PythonD/lib/python2.4/site-packages/display/cursing/ScrollBar.py | Python | gpl-2.0 | 5,591 |
#
# Copyright 2001 - 2016 Ludek Smid [http://www.ospace.net/]
#
# This file is part of Outer Space.
#
# Outer Space 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
# (... | ospaceteam/outerspace | client/osci/dialog/ColorDefinitionDlg.py | Python | gpl-2.0 | 6,398 |
#! /usr/bin/python
#
# This file reads through a vcf file and prints a space-separated text file, containing the coverage for each SNV (rows) and individual (columns). Alt and ref alleles are summed to total coverage at each SNV and locus.
# Usage: ~/hts_tools/get_cov_per_ind.py fltrd_pubRetStri_dipUG35_200bp.vcf > ou... | schimar/hts_tools | get_cov_per_ind.py | Python | gpl-2.0 | 1,589 |
import os
# toolchains options
ARCH='arm'
CPU='cortex-m0'
CROSS_TOOL='keil'
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
# cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
if CROSS_TOOL == 'gcc':
print '================ERROR==... | Quintin-Z/rt-thread | bsp/lpc824/rtconfig.py | Python | gpl-2.0 | 3,324 |
# #
# Copyright 2009-2016 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... | wpoely86/easybuild-framework | easybuild/tools/repository/svnrepo.py | Python | gpl-2.0 | 6,109 |
import ctypes
import os
import types
from platform_utils import paths
def load_library(libname):
if paths.is_frozen():
libfile = os.path.join(paths.embedded_data_path(), 'accessible_output2', 'lib', libname)
else:
libfile = os.path.join(paths.module_path(), 'lib', libname)
return ctypes.windll[libfile]
def get... | codeofdusk/ProjectMagenta | src/accessible_output2/__init__.py | Python | gpl-2.0 | 885 |
# This file is part of pybliographer
#
# Copyright (C) 1998-2004 Frederic GOBRY
# Email : gobry@pybliographer.org
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of t... | matthew-brett/pyblio | Pyblio/Style/Generic.py | Python | gpl-2.0 | 5,843 |
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
cmdclass = {'build_ext' : build_ext},
ext_modules=[Extension("_snaphu",
sources=["_snaphu.pyx",
"../src/snaphu.c",
"../src/snaphu_solver.c",
"../src/snaphu_util.... | bosmanoglu/adore-doris | lib/ext/snaphu-v1.4.2/cython/setup.py | Python | gpl-2.0 | 550 |
# -*- coding: utf-8 -*-
#
# This tool helps you to rebase package to the latest version
# Copyright (C) 2013-2014 Red Hat, 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
# he Free Software Foundation; either version 2 ... | uhliarik/rebase-helper | test/test_base_output.py | Python | gpl-2.0 | 3,601 |
import unittest
import warnings
from tests.baseclass import ParserTest
from pykickstart.constants import KS_MISSING_IGNORE
from pykickstart.errors import KickstartParseError
from pykickstart.version import F21, RHEL6
from pykickstart.parser import Group
class GroupsAreHashable_TestCase(ParserTest):
def runTest(se... | boonchu/pykickstart | tests/parser/packages.py | Python | gpl-2.0 | 4,941 |
import xml.etree.ElementTree as etree
import base64
from struct import unpack, pack
import sys
import io
import os
import time
import itertools
import xbmcaddon
import xbmc
import urllib2,urllib
import traceback
import urlparse
import posixpath
import re
import socket
from flvlib import tags
from flvlib import helper... | noam09/kodi | script.module.israeliveresolver/lib/interalSimpleDownloader.py | Python | gpl-3.0 | 10,978 |
import colorsys
import sys
import xml.etree.cElementTree as ET
# from io import BytesIO
from gi.repository import Gtk, Gdk, GObject, Pango
from gi.repository.GdkPixbuf import Pixbuf
from pychess.System import conf
from pychess.System.Log import log
from pychess.System.prefix import addDataPrefix
def createCombo(com... | pychess/pychess | lib/pychess/System/uistuff.py | Python | gpl-3.0 | 16,160 |
"""Tool to loop over fls_h.inc files. Based on nens/asc.py and NumPy
masked arrays. Stripped out all unnecessary flexibility.
Usage:
# Opens zipfile if path ends with zip; inside it opens the only file,
# or raises ValueError if there are several. Currently we need to no
# data value passed in because we don't get it... | lizardsystem/flooding-lib | flooding_lib/util/flshinc.py | Python | gpl-3.0 | 10,414 |
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Employee and Attendance"),
"items": [
{
"type": "doctype",
"name": "Employee",
"description": _("Employee records."),
},
{
"type": "doctype",
"name": "Employee Attendance To... | elba7r/system | erpnext/config/hr.py | Python | gpl-3.0 | 5,192 |
import math
import numpy as np
from Orange import data
def _get_variable(variable, dat, attr_name,
expected_type=None, expected_name=""):
failed = False
if isinstance(variable, data.Variable):
datvar = getattr(dat, "variable", None)
if datvar is not None and datvar is not var... | jzbontar/orange-tree | Orange/statistics/contingency.py | Python | gpl-3.0 | 10,334 |
#!/usr/bin/python
###
# Copyright (C) 2012 Shrinidhi Rao shrinidhi@clickbeetle.in
#
# 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 optio... | shrinidhi666/rbhus | etc/3dsmax2013/beforeFrame.py | Python | gpl-3.0 | 1,807 |
"""CactusBot."""
from .cactus import run, __version__
__all__ = ["__version__", "run"]
| CactusBot/CactusBot | cactusbot/__init__.py | Python | gpl-3.0 | 89 |
# -*- coding: utf-8 -*-
gettext("""La “Biblioteca Multimedia” es el lugar desde donde se clasifican nuestros contenidos multimedia, es decir, todo lo que es imágenes, audios, videos, documentos, etc. que luego podremos relacionar entre sí y con artículos, y tendrán vistas HTML en nuestro sitio web.""")
| MauHernandez/cyclope | demo/cyclope_project/locale/dbgettext/articles/article/como-funciona-la-biblioteca-biblioteca-multimedia/summary.py | Python | gpl-3.0 | 312 |
__author__ = 'Viktor Kerkez <alefnula@gmail.com>'
__date__ = '18 February 2010'
__copyright__ = 'Copyright (c) 2010 Viktor Kerkez'
| alefnula/perart | src/tea/qt/__init__.py | Python | gpl-3.0 | 139 |
../../../../../share/pyshared/twisted/names/hosts.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/twisted/names/hosts.py | Python | gpl-3.0 | 52 |
""" The Racing Kings Variation"""
from pychess.Utils.const import RACINGKINGSCHESS, VARIANTS_OTHER_NONSTANDARD, \
A8, B8, C8, D8, E8, F8, G8, H8
from pychess.Utils.Board import Board
RACINGKINGSSTART = "8/8/8/8/8/8/krbnNBRK/qrbnNBRQ w - - 0 1"
RANK8 = (A8, B8, C8, D8, E8, F8, G8, H8)
class RacingKingsBoard(Boa... | pychess/pychess | lib/pychess/Variants/racingkings.py | Python | gpl-3.0 | 1,813 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Yannick Buron
# Copyright 2015, TODAY Clouder SASU
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License with Attribution
# ... | microcom/clouder | clouder_template_docker/__openerp__.py | Python | gpl-3.0 | 1,398 |
# This file is part of Mylar.
#
# Mylar 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.
#
# Mylar is distributed in the hope that... | evilhero/mylar | mylar/parseit.py | Python | gpl-3.0 | 36,412 |
# -*- coding: utf-8 -*-
from openerp.osv import osv, fields
import openerp.addons.product.product
class res_users(osv.osv):
_inherit = 'res.users'
_columns = {
'target_sales_invoiced': fields.integer('Invoiced in Sale Orders Target'),
}
| zbqf109/goodo | openerp/addons/sale_crm/res_users.py | Python | gpl-3.0 | 261 |
#!/usr/bin/python
from gi.repository import Gtk, GObject
import time
import unittest
from testutils import setup_test_env
setup_test_env()
from softwarecenter.enums import XapianValues, ActionButtons
TIMEOUT=300
class TestCustomLists(unittest.TestCase):
def _debug(self, index, model, needle):
print ("... | vanhonit/xmario_center | test/gtk3/test_custom_lists.py | Python | gpl-3.0 | 1,958 |
#! /usr/bin/python
# Module:
# Author: Maxim Borisyak, 2014
import functools
partial = functools.partial
from pattern import MatchError
from pattern import case
from pattern import to_pattern
# Type patterns
from pattern import a_class
from pattern import a_str
from pattern import a_float
from pattern import an_in... | ZloVechno/dummy-agent | functial/__init__.py | Python | gpl-3.0 | 621 |
#!/usr/bin/env python3
from shutil import rmtree
from os import remove, path
from crawler.swiftea_bot.data import BASE_LINKS
URL = "http://aetfiws.ovh"
SUGGESTIONS = ['http://suggestions.ovh/page1.html', 'http://suggestions.ovh/page2.html']
CODE1 = """<!DOCTYPE html>
<html lang="en">
<head>
<meta char... | Swiftea/Crawler | crawler/tests/test_data.py | Python | gpl-3.0 | 2,567 |
##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2018 Jorge Solla Rubiales <jorgesolla@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 ... | StefanBruens/libsigrokdecode | decoders/cec/pd.py | Python | gpl-3.0 | 11,367 |
r"""
Description: Generates 2-D data maps from OpenFoam data saved by paraview
as a CSV file. The data has to be saved as point data and the following fields
are expected p, points:0->2, u:0->2. An aperture map is the second main input
and is used to generate the interpolation coordinates as well as convert
the flow ve... | stadelmanma/netl-AP_MAP_FLOW | apmapflow/scripts/apm_process_paraview_data.py | Python | gpl-3.0 | 6,758 |
# -*- encoding: utf -*-
from abjad import *
def test_indicatortools_Tempo__to_markup_01():
tempo = Tempo(Duration(1, 4), 60)
markup = tempo._to_markup()
assert systemtools.TestManager.compare(
markup,
r'''
\markup {
\fontsize
#-6
\gener... | mscuthbert/abjad | abjad/tools/indicatortools/test/test_indicatortools_Tempo__to_markup.py | Python | gpl-3.0 | 1,253 |
# -*- coding: utf-8 -*-
## @package color_histogram.core.hist_2d
#
# Implementation of 2D color histograms.
# @author tody
# @date 2015/08/28
import numpy as np
from color_histogram.core.color_pixels import ColorPixels
from color_histogram.core.hist_common import colorCoordinates, colorDensities, rgbCo... | EliotBryant/ShadDetector | shadDetector_testing/Colour Based Methods/ColorHistogram-master/color_histogram/core/hist_2d.py | Python | gpl-3.0 | 4,830 |
HOST = "wfSciwoncWiki:enw1989@172.31.29.101:27001,172.31.29.102:27001,172.31.29.103:27001,172.31.29.104:27001,172.31.29.105:27001,172.31.29.106:27001,172.31.29.107:27001,172.31.29.108:27001,172.31.29.109:27001/?authSource=admin"
PORT = ""
USER = ""
PASSWORD = ""
DATABASE = "wiki"
READ_PREFERENCE = "primary"
COL... | elainenaomi/sciwonc-dataflow-examples | dissertation2017/Experiment 2/instances/11_0_wikiflow_1sh_1s_annot/longestsession_8/ConfigDB_Longest_8.py | Python | gpl-3.0 | 983 |
#! /usr/bin/env python2
# coding: utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2011, Anthon van der Neut <A.van.der.Neut@ruamel.eu>'
# Copyright (C) 2011 Anthon van der Neut, Ruamel bvba
# Adapted from Leon... | jelly/calibre | src/calibre/ebooks/djvu/djvubzzdec.py | Python | gpl-3.0 | 32,959 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Deepin, Inc.
# 2011 Wang Yong
#
# Author: Wang Yong <lazycat.manatee@gmail.com>
# Maintainer: Wang Yong <lazycat.manatee@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of th... | manateelazycat/deepin-software-center | src/searchView.py | Python | gpl-3.0 | 9,264 |
3#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import io
import re
init_py = io.open('pigshare/__init__.py').read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py))
metadata['doc'] = re.findall('"""(.+)"""', init_py)[0]
requirements = [
"argparse",
"setuptools",
... | makkus/pigshare | setup.py | Python | gpl-3.0 | 1,523 |
# encoding: utf-8
#
# 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/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
# MIMICS THE requests API (http://docs.python-re... | maggienj/ActiveData | pyLibrary/env/http.py | Python | mpl-2.0 | 11,843 |
# 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/.
from __future__ import absolute_import
import datetime
import hashlib
import json
import time
import urlparse
from cont... | hwine/build-relengapi | relengapi/blueprints/tooltool/test_tooltool.py | Python | mpl-2.0 | 32,335 |
from . import test_get_weight
| akretion/delivery-carrier | base_delivery_carrier_label/tests/__init__.py | Python | agpl-3.0 | 30 |
# -*- coding: utf-8 -*-
# Copyright 2017 KMEE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from __future__ import division, print_function, unicode_literals
TIPO_COBRANCA = (
('0', u'Carteira'),
('1', u'Cheque'),
('2', u'CNAB'),
)
TIPO_COBRANCA_SPED = (
('0', u'Duplicata'),
('... | odoo-brazil/l10n-brazil-wip | l10n_br_financial/constantes.py | Python | agpl-3.0 | 388 |
##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | uclouvain/OSIS-Louvain | base/tests/factories/group_element_year.py | Python | agpl-3.0 | 2,912 |
"""
Defines the URL routes for this app.
"""
from django.conf import settings
from django.conf.urls import patterns, url
from ..profile_images.views import ProfileImageView
from .accounts.views import AccountDeactivationView, AccountViewSet
from .preferences.views import PreferencesView, PreferencesDetailView
from .v... | prarthitm/edxplatform | openedx/core/djangoapps/user_api/urls.py | Python | agpl-3.0 | 1,706 |
# -*- coding: utf-8 -*-
from __future__ import division
from openfisca_core import reforms
from openfisca_france.model.base import FloatCol, Individus, Variable
# Build function
def build_reform(tax_benefit_system):
Reform = reforms.make_reform(
key = 'revenu_de_base_cotisations',
name = u"Réfo... | openfisca/openfisca-france-extension-revenu-de-base | openfisca_france_extension_revenu_de_base/cotisations.py | Python | agpl-3.0 | 7,784 |
# -*- coding: utf-8 -*-
from django.forms import formset_factory
import pytest
from shoop.admin.modules.products.views.variation.simple_variation_forms import SimpleVariationChildForm, SimpleVariationChildFormSet
from shoop.admin.modules.products.views.variation.variable_variation_forms import VariableVariationChildren... | arth-co/shoop | shoop_tests/admin/test_product_variation.py | Python | agpl-3.0 | 2,122 |
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from json import loads
from datetime import datetime
from functools import partial
from django.db.models import Q
from django.contrib.gis.measure import Distance
from django.contrib.g... | clever-crow-consulting/otm-core | opentreemap/treemap/search.py | Python | agpl-3.0 | 15,113 |
# -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Nicolas Duhamel
#
# This file is part of weboob.
#
# weboob 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 y... | yannrouillard/weboob | modules/bp/pages/accountlist.py | Python | agpl-3.0 | 3,140 |
"""
Tests for Blocks Views
"""
import json
import ddt
from django.test import RequestFactory, TestCase
from django.core.urlresolvers import reverse
import httpretty
from student.tests.factories import UserFactory
from third_party_auth.tests.utils import ThirdPartyOAuthTestMixin, ThirdPartyOAuthTestMixinGoogle
from ... | ampax/edx-platform | lms/djangoapps/oauth_dispatch/tests/test_views.py | Python | agpl-3.0 | 9,406 |
#!/usr/bin/env python2.5
"""A test provider for the stress testing."""
# change registry this often [msec]
registryChangeTimeout = 2017
from ContextKit.flexiprovider import *
import gobject
import time
import os
def update():
t = time.time()
dt = int(1000*(t - round(t)))
gobject.timeout_add(1000 - dt, ... | dudochkin-victor/contextkit | sandbox/multithreading-tests/stress-test/provider.py | Python | lgpl-2.1 | 946 |
#!/usr/bin/env python
# Very simple serial terminal
# (C)2002-2009 Chris Liechti <cliechti@gmx.net>
# Input characters are sent directly (only LF -> CR/LF/CRLF translation is
# done), received characters are displayed as is (or escaped trough pythons
# repr, useful for debug purposes).
import sys, os, serial, thread... | jeditekunum/Cosa | build/miniterm.py | Python | lgpl-2.1 | 23,810 |
#! /usr/bin/env python
"""
Setup script to build a standalone apdumanager.exe executable on windows
using py2exe. Run: python.exe setup.py py2exe, to build executable file.
__author__ = "http://www.gemalto.com"
Copyright 2001-2012 gemalto
Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com
Th... | moreati/pyscard | smartcard/Examples/wx/apdumanager/setup.py | Python | lgpl-2.1 | 1,413 |
#!/usr/bin/python
"""Test to verify presentation of selectable list items."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
sequence.append(KeyComboAction("<Control><Shift>n"))
sequence.append(KeyComboAction("Tab"))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAct... | pvagner/orca | test/keystrokes/oowriter/ui_role_list_item.py | Python | lgpl-2.1 | 1,384 |
#!/usr/bin/python
"""Test of line navigation output of Firefox."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
#sequence.append(WaitForDocLoad())
sequence.append(PauseAction(5000))
# Work around some new quirk in Gecko that causes this test to fail if
# run via the test harness rather t... | GNOME/orca | test/keystrokes/firefox/line_nav_iframes_in_inline_block.py | Python | lgpl-2.1 | 1,242 |
###############################################################
# Copyright 2020 Lawrence Livermore National Security, LLC
# (c.f. AUTHORS, NOTICE.LLNS, COPYING)
#
# This file is part of the Flux resource manager framework.
# For details, see https://github.com/flux-framework.
#
# SPDX-License-Identifier: LGPL-3.0
####... | grondo/flux-core | src/bindings/python/flux/resource/__init__.py | Python | lgpl-3.0 | 469 |
from sys import exit
import argparse
import sobol, morris, extended_fast
parser = argparse.ArgumentParser(description='Perform sensitivity analysis on model output')
parser.add_argument('-m', '--method', type=str, choices=['sobol', 'morris', 'fast'], required=True)
parser.add_argument('-p', '--paramfile', type... | dhyams/SALib | SALib/analyze/__main__.py | Python | lgpl-3.0 | 1,927 |
import sys
from java.util import Vector
def addTemplate(core):
core.spawnService.addLairTemplate('dantooine_voritor_hunter_lair_2', 'slinking_voritor_hunter', 15, 'object/tangible/lair/base/poi_all_lair_bones.iff')
return | ProjectSWGCore/NGECore2 | scripts/mobiles/lairs/dantooine_voritor_hunter_lair_1.py | Python | lgpl-3.0 | 224 |
from __future__ import unicode_literals
import binascii
import collections
import email
import getpass
import io
import optparse
import os
import re
import shlex
import shutil
import socket
import subprocess
import sys
import itertools
import xml.etree.ElementTree
try:
import urllib.request as compat_urllib_requ... | nfedera/rg3-youtube-dl | youtube_dl/compat.py | Python | unlicense | 21,183 |
#!/usr/bin/env python
import csv
import sys
import json
import hashlib
from subprocess import Popen, PIPE
from urlparse import urlparse
DEFAULT_GROUP = "lastpass-import"
class Record:
def __init__(self, d):
self.d = d
self.password = d['password']
if d['grouping'] in [None, "", "(none)... | itorres/junk-drawer | 2015/lp2pass.py | Python | unlicense | 2,627 |
from __future__ import print_function, division, absolute_import
import unittest
from cu2qu.pens import Cu2QuPen, Cu2QuPointPen
from . import CUBIC_GLYPHS, QUAD_GLYPHS
from .utils import DummyGlyph, DummyPointGlyph
from .utils import DummyPen, DummyPointPen
from fontTools.misc.loggingTools import CapturingLogHandler
f... | googlefonts/cu2qu | tests/pens_test.py | Python | apache-2.0 | 13,027 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.