repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
cahirwpz/wifire-os
refs/heads/master
sys/debug/klog.py
1
import gdb import os.path from .cmd import SimpleCommand from .struct import GdbStructMeta, enum, cstr, BinTime from .utils import TextTable, global_var, relpath class LogEntry(metaclass=GdbStructMeta): __ctype__ = 'struct klog_entry' __cast__ = {'kl_tid': int, 'kl_timestamp': BinTime, 'kl_file': cstr, ...
BaesFr/Sick-Beard
refs/heads/development
sickbeard/providers/womble.py
27
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
dvolgyes/perceptionmd
refs/heads/master
perceptionmd/utils/utils.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import gc as garbage_collector from contextlib import contextmanager from functools import wraps import importlib import itertools import numpy as np import shutil import tempfile import os import six """ This i...
kamailio/kamcli
refs/heads/master
kamcli/commands/cmd_dialog.py
1
import click from sqlalchemy import create_engine from kamcli.ioutils import ioutils_dbres_print from kamcli.cli import pass_context from kamcli.iorpc import command_ctl @click.group( "dialog", help="Manage dialog module (active calls tracking)", short_help="Manage dialog module", ) @pass_context def cli(...
agry/NGECore2
refs/heads/master
scripts/object/tangible/meatlump/event/meatlump_weapon_palette_01_12.py
85615
import sys def setup(core, object): return
dkodnik/Ant
refs/heads/master
addons/edi/models/res_partner.py
437
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
MziRintu/kitsune
refs/heads/master
kitsune/kpi/migrations/0001_initial.py
19
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Metric', fields=[ ('id', models.AutoField(verbo...
VielSoft/odoo
refs/heads/8.0
addons/hr_holidays/wizard/hr_holidays_summary_employees.py
337
# -*- 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...
SCOAP3/invenio
refs/heads/master
invenio/modules/oauth2server/registry.py
16
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
chriscrosscutler/scikit-image
refs/heads/master
setup.py
11
#! /usr/bin/env python descr = """Image Processing SciKit Image processing algorithms for SciPy, including IO, morphology, filtering, warping, color manipulation, object detection, etc. Please refer to the online documentation at http://scikit-image.org/ """ DISTNAME = 'scikit-image' DESCRIPTION = 'Image processing...
jsoref/django
refs/heads/master
django/db/backends/postgresql_psycopg2/creation.py
465
from ..postgresql.creation import * # NOQA
qdk0901/openwrt-ar9331
refs/heads/master
scripts/dl_cleanup.py
202
#!/usr/bin/env python """ # OpenWRT download directory cleanup utility. # Delete all but the very last version of the program tarballs. # # Copyright (C) 2010 Michael Buesch <mb@bu3sch.de> # Copyright (C) 2013 OpenWrt.org """ import sys import os import re import getopt # Commandline options opt_dryrun = False def ...
mtp1376/youtube-dl
refs/heads/master
youtube_dl/extractor/xvideos.py
36
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, ) from ..utils import ( clean_html, ExtractorError, ) class XVideosIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?xvideos\.com/video(?P<id>[0-9]+)(?:.*)' _TEST = ...
google-research/google-research
refs/heads/master
pruning_identified_exemplars/pruning_tools/pruning.py
1
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
Andypsamp/CODfinalJUNIT
refs/heads/master
beets/util/__init__.py
7
# This file is part of beets. # Copyright 2015, Adrian Sampson. # # 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, ...
Jeongseob/xen-coboost-sched
refs/heads/master
tools/python/xen/xm/tests/test_create.py
44
import os import os.path import tempfile import unittest import xen.xend.XendOptions xen.xend.XendOptions.XendOptions.config_default = '/dev/null' import xen.xm.create from xen.util import auxbin class test_create(unittest.TestCase): def assertEqualModuloNulls_(self, a, b): for k, v in a.iteritems(): ...
roninek/python101
refs/heads/master
docs/bazy/orm/ormpw02.py
2
#! /usr/bin/env python # -*- coding: utf-8 -*- import os from peewee import * if os.path.exists('test.db'): os.remove('test.db') # tworzymy instancję bazy używanej przez modele baza = SqliteDatabase('test.db') # ':memory:' class BazaModel(Model): """Klasa bazowa""" class Meta: database = baza ...
NeovaHealth/odoo
refs/heads/8.0
addons/account_asset/account_asset.py
29
# -*- encoding: 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 G...
farseerfc/pacman-fc
refs/heads/master
test/pacman/tests/fileconflict002.py
15
self.description = "Fileconflict with symlinks (2)" p1 = pmpkg("pkg1") p1.files = ["dir/", "dir/realdir/", "dir/realdir/file", "dir/symdir -> realdir"] self.addpkg(p1) p2 = pmpkg("pkg2") p2.files = ["dir/", "dir/symdir/", "dir/symdir/file"] self.addpkg(p2) ...
hendradarwin/VTK
refs/heads/master
Common/Core/Testing/Python/TestVariant.py
21
"""Test vtkVariant support in VTK-Python The following vtkVariant features have to be tested: - Construction from various types - Automatic arg conversion for methods with vtkVariant args - Access of various types - Operators < <= == > >= - Use of vtkVariant as a dict key The following features are not supported - Th...
CristianBB/SickRage
refs/heads/develop
lib/hachoir_metadata/archive.py
73
from hachoir_metadata.metadata_item import QUALITY_BEST, QUALITY_FASTEST from hachoir_metadata.safe import fault_tolerant, getValue from hachoir_metadata.metadata import ( RootMetadata, Metadata, MultipleMetadata, registerExtractor) from hachoir_parser.archive import (Bzip2Parser, CabFile, GzipParser, TarFile, ...
dax/jcl
refs/heads/master
src/jcl/tests/__init__.py
1
"""JCL test module""" __revision__ = "" import unittest import os import tempfile import sys import types import libxml2 import logging from sqlobject.dbconnection import TheURIOpener import jcl.model if sys.platform == "win32": DB_DIR = "/c|/temp/" else: DB_DIR = "/tmp/" __logger = logging.getLogger("jcl.t...
Luthien123/aleph
refs/heads/master
aleph/views/sessions_api.py
2
from flask import session, Blueprint, redirect, request from flask.ext.login import login_user, logout_user, current_user from werkzeug.exceptions import BadRequest from apikit import jsonify from aleph import authz from aleph.providers import PROVIDERS, Stub from aleph.core import db, url_for from aleph.model import ...
openstack/networking-bagpipe-l2
refs/heads/master
networking_bagpipe/version.py
3
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
HiDevLab/shopifier
refs/heads/master
shopifier/admin/migrations/0004_auto_20161221_1923.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-12-21 13:23 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('shopifier_admin', '0003_auto_20161221_1920'), ] ...
meles5/qutebrowser
refs/heads/master
scripts/dev/__init__.py
32
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: """Various scripts used for developing qutebrowser."""
diloreto/mercury
refs/heads/master
www/css/ionicons/builder/scripts/generate_font.py
348
# Font generation script from FontCustom # https://github.com/FontCustom/fontcustom/ # http://fontcustom.com/ import fontforge import os import md5 import subprocess import tempfile import json import copy SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__)) INPUT_SVG_DIR = os.path.join(SCRIPT_PATH, '..', '..', '...
kirienko/gourmet
refs/heads/master
src/gourmet/gtk_extras/ratingWidget.py
1
import os.path import tempfile from gi.repository import Gdk, GdkPixbuf, GObject, Gtk from PIL import Image import gourmet.gglobals as gglobals from gourmet.i18n import _ PLUS_ONE_KEYS = ['plus', 'greater', #'Up', #'Right', ] MINUS_ONE_KEYS = ['minu...
HiSPARC/station-software
refs/heads/master
user/python/Lib/site-packages/google/protobuf/internal/generator_test.py
71
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
dkentw/robotframework
refs/heads/master
atest/testresources/testlibs/SameNamesAsInBuiltIn.py
38
class SameNamesAsInBuiltIn: def noop(self): """Using this keyword without libname causes an error"""
numpy/numpy-refactor
refs/heads/refactor
numpy/distutils/fcompiler/hpux.py
75
from numpy.distutils.fcompiler import FCompiler compilers = ['HPUXFCompiler'] class HPUXFCompiler(FCompiler): compiler_type = 'hpux' description = 'HP Fortran 90 Compiler' version_pattern = r'HP F90 (?P<version>[^\s*,]*)' executables = { 'version_cmd' : ["<F90>", "+version"], 'comp...
shudwi/CrimeMap
refs/heads/master
Sadar/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-29 19:12 from __future__ import unicode_literals from django.db import migrations, models import geoposition.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel(...
rangadi/incubator-beam
refs/heads/master
sdks/python/apache_beam/utils/proto_utils.py
5
# # 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...
gnowledge/ISON
refs/heads/master
gstudio/views/user.py
1
# Copyright (c) 2011, 2012 Free Software Foundation # 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 vers...
diydrones/dronekit-python
refs/heads/master
dronekit/util.py
3
from __future__ import print_function import logging import sys def errprinter(*args): logger(*args) def logger(*args): print(*args, file=sys.stderr) sys.stderr.flush() class ErrprinterHandler(logging.Handler): """Logging handler to support the deprecated `errprinter` argument to connect()""" ...
cevap/ion
refs/heads/master
test/functional/feature_reindex.py
4
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test running bitcoind with -reindex and -reindex-chainstate options. - Start a single node and generat...
zwb800/home-assistant
refs/heads/master
homeassistant/components/switch/demo.py
7
""" homeassistant.components.switch.demo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Demo platform that has two fake switches. """ from homeassistant.components.switch import SwitchDevice from homeassistant.const import DEVICE_DEFAULT_NAME # pylint: disable=unused-argument def setup_platform(hass, config, add_devices_callb...
lebabouin/CouchPotatoServer-develop
refs/heads/master
couchpotato/core/providers/nzb/omgwtfnzbs/main.py
7
from couchpotato.core.event import fireEvent from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode from couchpotato.core.helpers.rss import RSS from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.providers.nzb.base import NZBProvider from ...
abought/osf.io
refs/heads/develop
tests/test_prereg.py
22
from nose.tools import * # noqa from modularodm import Q from website.prereg import prereg_landing_page as landing_page, drafts_for_user from website.project.model import ensure_schemas, MetaSchema from tests.base import OsfTestCase from tests import factories class PreregLandingPageTestCase(OsfTestCase): def...
ryanGT/sympy
refs/heads/master
sympy/concrete/tests/test_products.py
5
from sympy import symbols, product, factorial, rf, Rational, sqrt, cos, Product a, k, n = symbols('akn', integer=True) def test_simple_products(): assert product(2, (k, a, n)) == 2**(n-a+1) assert product(k, (k, 1, n)) == factorial(n) assert product(k**3, (k, 1, n)) == factorial(n)**3 assert product(...
bearstech/ansible
refs/heads/devel
lib/ansible/modules/network/dellos9/dellos9_facts.py
8
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # Copyright (c) 2016 Dell Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_versio...
ZeYt/mitmproxy
refs/heads/master
examples/redirect_requests.py
11
""" This example shows two ways to redirect flows to other destinations. """ from libmproxy.models import HTTPResponse from netlib.http import Headers def request(context, flow): # pretty_host(hostheader=True) takes the Host: header of the request into account, # which is useful in transparent mode where we us...
rrooij/youtube-dl
refs/heads/master
youtube_dl/extractor/markiza.py
24
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( orderedSet, parse_duration, try_get, ) class MarkizaIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?videoarchiv\.markiza\.sk/(?:video/(?:[^/]...
SportySpice/Collections
refs/heads/master
src/paths/visual/browse_kodi_folder.py
1
from src.li.visual.ViewStyle import ViewStyle from src.li.visual.TextSettings import TextSettings from src.li.types.AddToCollectionVisual import AddToCollectionVisual from src.li.types.KodiFolderVisual import KodiFolderVisual #from src.li.types.KodiVideoVisual import KodiVideoVisual from src.li.types.VideoVisual import...
TangentMicroServices/AuthenticationService
refs/heads/master
registration/admin.py
13848
from django.contrib import admin # Register your models here.
aabbox/kbengine
refs/heads/master
kbe/src/lib/python/Lib/lib2to3/tests/data/fixers/no_fixer_cls.py
357
# This is empty so trying to fetch the fixer class gives an AttributeError
ThiefMaster/indico
refs/heads/master
indico/modules/attachments/controllers/management/base.py
2
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import mimetypes from flask import flash, render_template, request, session from indico.core import sign...
caihaibin/Blog
refs/heads/master
externals/markdown/blockprocessors.py
20
""" CORE MARKDOWN BLOCKPARSER ============================================================================= This parser handles basic parsing of Markdown blocks. It doesn't concern itself with inline elements such as **bold** or *italics*, but rather just catches blocks, lists, quotes, etc. The BlockParser is made ...
firebase/bolt
refs/heads/master
tools/ensure-secret.py
2
#!/usr/bin/env python # ensure-secret.py --- Initialize a js module file with Firebase secret. # # Copyright 2015 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...
prakritish/ansible
refs/heads/devel
lib/ansible/utils/helpers.py
34
# (c) 2016, Ansible by Red Hat <info@ansible.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) any later v...
shiora/The-Perfect-Pokemon-Team-Balancer
refs/heads/master
libs/env/Lib/site-packages/markdown/extensions/admonition.py
65
""" Admonition extension for Python-Markdown ======================================== Adds rST-style admonitions. Inspired by [rST][] feature with the same name. The syntax is (followed by an indented block with the contents): !!! [type] [optional explicit title] Where `type` is used as a CSS class name of the d...
Yong-Lee/django
refs/heads/master
tests/app_loading/tests.py
288
from __future__ import unicode_literals import os from django.apps import apps from django.test import SimpleTestCase from django.test.utils import extend_sys_path from django.utils import six from django.utils._os import upath class EggLoadingTest(SimpleTestCase): def setUp(self): self.egg_dir = '%s/e...
frreiss/tensorflow-fred
refs/heads/master
tensorflow/python/keras/layers/multi_head_attention_test.py
2
# Copyright 2019 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...
Arafatk/sympy
refs/heads/master
sympy/printing/conventions.py
94
""" A few practical conventions common to all printers. """ from __future__ import print_function, division import re import collections def split_super_sub(text): """Split a symbol name into a name, superscripts and subscripts The first part of the symbol name is considered to be its actual 'nam...
leiferikb/bitpop
refs/heads/master
build/third_party/buildbot_slave_8_4/buildslave/scripts/logwatcher.py
12
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
andyclymer/ControlBoard
refs/heads/master
buildExtension.py
1
import os from mojo.extensions import ExtensionBundle basePath = os.path.dirname(__file__) extensionPath = os.path.join(basePath, "ControlBoard.roboFontExt") libPath = os.path.join(basePath, "lib") htmlPath = os.path.join(basePath, "html") resourcesPath = os.path.join(basePath, "resources") B = ExtensionBundle() B...
SUSE/azure-sdk-for-python
refs/heads/master
azure-mgmt-storage/azure/mgmt/storage/v2016_12_01/__init__.py
40
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/draft_schematic/bio_engineer/creature/creature_rancor.py
85615
import sys def setup(core, object): return
flumotion-mirror/flumotion
refs/heads/master
flumotion/component/misc/kuscheduler/kuscheduler.py
3
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # # This file may be distributed and/or modified under the terms of # the GNU Lesser General Pub...
arborh/tensorflow
refs/heads/master
tensorflow/python/distribute/combinations.py
3
# Copyright 2018 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...
tequa/ammisoft
refs/heads/master
ammimain/WinPython-64bit-2.7.13.1Zero/python-2.7.13.amd64/Lib/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py
515
from __future__ import absolute_import # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class PoolError(HTTPError): "Base exception for errors caused within a pool." def __init__(se...
mavenlin/tensorflow
refs/heads/master
tensorflow/contrib/boosted_trees/python/ops/ensemble_optimizer_ops.py
17
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
pheanex/ansible-modules-extras
refs/heads/devel
cloud/amazon/ec2_win_password.py
62
#!/usr/bin/python DOCUMENTATION = ''' --- module: ec2_win_password short_description: gets the default administrator password for ec2 windows instances description: - Gets the default administrator password from any EC2 Windows instance. The instance is referenced by its id (e.g. i-XXXXXXX). This module has a dep...
bcl/anaconda
refs/heads/master
pyanaconda/users.py
2
# # users.py: Code for creating user accounts and setting the root password # # Copyright (C) 2006, 2007, 2008 Red Hat, Inc. All rights reserved. # # 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 Foundati...
valisc/reverse-game-of-life
refs/heads/master
reverse_game_of_life/classifier/global_classifier.py
1
import numpy as np import time from sklearn.ensemble import RandomForestClassifier from sklearn import clone from ..conway_board import DEAD,ALIVE from ..tools import transform_board,inverse_transform from .classifier import Classifier class GlobalClassifier(Classifier): ''' Predict each cell 1 at a time but use...
araines/moto
refs/heads/master
tests/test_s3/test_s3_lifecycle.py
18
from __future__ import unicode_literals import boto from boto.exception import S3ResponseError from boto.s3.lifecycle import Lifecycle, Transition, Expiration, Rule import sure # noqa from moto import mock_s3 @mock_s3 def test_lifecycle_create(): conn = boto.s3.connect_to_region("us-west-1") bucket = conn...
aavrug/askbot-devel
refs/heads/master
askbot/utils/url_utils.py
3
from django.core.urlresolvers import reverse from django.conf import settings def get_login_url(): """returns internal login url if django_authopenid is used, or the corresponding django setting """ if 'askbot.deps.django_authopenid' in settings.INSTALLED_APPS: return reverse('user_signin'...
infoelliex/addons-yelizariev
refs/heads/8.0
web_sessions_management/__init__.py
16
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # ThinkOpen Solutions Brasil # Copyright (C) Thinkopen Solutions <http://www.tkobr.com>. # # This...
SmartInfrastructures/fuel-web-dev
refs/heads/master
nailgun/nailgun/test/unit/test_graph_serializer.py
1
# -*- coding: utf-8 -*- # Copyright 2014 Mirantis, 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 requi...
arkem/pyflag
refs/heads/main
utilities/incremental_load.py
1
#!/usr/bin/python # ****************************************************** # Michael Cohen <scudette@users.sourceforge.net> # # ****************************************************** # Version: FLAG $Version: 0.87-pre1 Date: Thu Jun 12 00:48:38 EST 2008$ # ****************************************************** # # * T...
carriercomm/wallstreetbot
refs/heads/master
twitter_analyze.py
1
# TODO-get more tweets # TODO-tweets from reliable accounts # TODO-take into account retweets,likes,time,followers # analyze google searches to predict stock market # remove tweets from other languages? from __future__ import division import tweepy import shutil from tweepy.streaming import StreamListener from tweepy ...
akosyakov/intellij-community
refs/heads/master
python/testData/copyPaste/Selection2.after.py
332
if True: a = 1 b = 2 def f(): if True: a = 1 b = 2
sertac/django
refs/heads/master
tests/prefetch_related/models.py
255
import uuid from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible # Basic tests @python_2_unicode_compatible class Author(models....
DONIKAN/django
refs/heads/master
tests/test_client_regress/models.py
513
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager from django.db import models class CustomUser(AbstractBaseUser): email = models.EmailField(verbose_name='email address', max_length=255, unique=True) custom_objects = BaseUserManager() USERNAME_FIELD = 'email' class Meta: ...
OpenBfS/dokpool-plone
refs/heads/master
Plone/src/docpool.config/docpool/config/local/base_de.py
2
# -*- coding: utf-8 -*- from docpool.base.config import BASE_APP from docpool.base.content.documentpool import APPLICATIONS_KEY from docpool.config import _ from docpool.config.utils import CHILDREN from docpool.config.utils import createPloneObjects from docpool.config.utils import ID from docpool.config.utils import ...
chaserhkj/musicbox
refs/heads/master
NEMbox/menu.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: omi # @Date: 2014-08-24 21:51:57 # @Last Modified by: omi # @Last Modified time: 2015-08-02 20:55:11 ''' 网易云音乐 Menu ''' import curses import locale import sys import os import time import webbrowser import platform from api import NetEase from player impor...
henrykh/django-imager
refs/heads/master
imager/tests.py
1
import factory from django.test import Client from django.test import TestCase from django.core import mail from django.core.files.uploadedfile import SimpleUploadedFile from django.contrib.auth.models import User from imager_images.models import Photo import os import glob THE_FILE = SimpleUploadedFile('test.png', '...
joeythesaint/yocto-autobuilder
refs/heads/master
lib/python2.7/site-packages/autobuilder/buildsteps/SendErrorReport.py
2
''' Created on Jan 6, 2013 __author__ = "Elizabeth 'pidge' Flanagan" __copyright__ = "Copyright 2012-2013, Intel Corp." __credits__ = ["Elizabeth Flanagan"] __license__ = "GPL" __version__ = "2.0" __maintainer__ = "Elizabeth Flanagan" __email__ = "elizabeth.flanagan@intel.com" ''' from buildbot.steps.shell import Sh...
wenhuizhang/neutron
refs/heads/master
neutron/db/migration/alembic_migrations/versions/4dbe243cd84d_nsxv.py
47
# Copyright 2015 OpenStack Foundation # # 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 ...
gfreed/android_external_chromium-org
refs/heads/android-4.4
native_client_sdk/src/build_tools/generate_notice.py
111
#!/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. """Build the NOTICE file distributed with the NaCl SDK from a set of given license files.""" import optparse import os import sys ...
eeshangarg/oh-mainline
refs/heads/master
vendor/packages/docutils/test/functional/tests/misc_rst_html4css1.py
18
# Source and destination file names. test_source = "link_in_substitution.txt" test_destination = "misc_rst_html4css1.html" # Keyword parameters passed to publish_file. reader_name = "standalone" parser_name = "rst" writer_name = "html4css1" # Settings # test for encoded attribute value: settings_overrides['stylesheet...
trichter/sito
refs/heads/master
bin/noise/calc_strong_motion.py
1
#!/usr/bin/env python from glob import glob from operator import itemgetter from matplotlib.dates import date2num, num2date import numpy as np import pylab as plt from sito import read from obspy.core import UTCDateTime as UTC from sito.data import IPOC import yaml import obspy.arclink import scipy.stats as spstats im...
fbagirov/scikit-learn
refs/heads/master
benchmarks/bench_sparsify.py
323
""" Benchmark SGD prediction time with dense/sparse coefficients. Invoke with ----------- $ kernprof.py -l sparsity_benchmark.py $ python -m line_profiler sparsity_benchmark.py.lprof Typical output -------------- input data sparsity: 0.050000 true coef sparsity: 0.000100 test data sparsity: 0.027400 model sparsity:...
florian-dacosta/OpenUpgrade
refs/heads/master
addons/point_of_sale/report/pos_invoice.py
62
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
ppanczyk/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_ironic.py
19
#!/usr/bin/python # coding: utf-8 -*- # (c) 2014, Hewlett-Packard Development Company, L.P. # # This module 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...
yahman72/robotframework
refs/heads/master
atest/testdata/keywords/named_args/DynamicLibrary.py
25
#!/usr/bin/env python # -*- coding: utf-8 -*- from helper import pretty KEYWORDS = { 'Escaped Default Value': ['d1=${notvariable}', 'd2=\\\\', 'd3=\n', 'd4=\t'], 'Four Kw Args': ['a=default', 'b=default', 'c=default', 'd=default'], 'Mandatory, Named And Varargs': ['a', 'b=default', '*varargs'], 'Manda...
namitsingal/woof
refs/heads/master
woof/green_consumer.py
2
from gevent import monkey; monkey.patch_all() import threading, logging, gevent, time import signal from kafka import KafkaConsumer from kafka.common import KafkaUnavailableError log = logging.getLogger("kafka") class GreenFeedConsumer(threading.Thread): """ Greenlet based feed consumer All callbacks are ...
arenadata/ambari
refs/heads/branch-adh-1.6
ambari-server/src/main/resources/stacks/ADH/1.5/services/RANGER/package/scripts/params.py
1
#!/usr/bin/env python """ 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");...
dchilds7/Deysha-Star-Formation
refs/heads/master
vispy/testing/_runners.py
6
# -*- coding: utf-8 -*- # vispy: testskip # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """Test running functions""" from __future__ import print_function import sys import os import warnings from os import path as op from copy import deepcopy ...
mohamedhagag/community-addons
refs/heads/8.0
project_task_materials_stock/models/project.py
8
# -*- coding: utf-8 -*- # (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel # (c) 2015 Antiun Ingeniería S.L. - Carlos Dauden # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api, exceptions, _ from openerp.tools.float_utils import float_round class ProjectTaskType(mo...
SUSE/teuthology
refs/heads/master
teuthology/task/print.py
3
""" Print task A task that logs whatever is given to it as an argument. Can be used like any other task (under sequential, etc...).j For example, the following would cause the strings "String" and "Another string" to appear in the teuthology.log before and after the chef task runs, respectively. tasks: - print: "Str...
koljonen/pgcli
refs/heads/master
tests/test_rowlimit.py
1
from pgcli.main import PGCli from mock import Mock DEFAULT = PGCli().row_limit LIMIT = DEFAULT + 1000 over_default = Mock() over_default.configure_mock(rowcount=DEFAULT + 10) over_limit = Mock() over_limit.configure_mock(rowcount=LIMIT + 10) low_count = Mock() low_count.configure_mock(rowcount=1) def test_defaul...
acenario/Payable
refs/heads/master
lib/python2.7/site-packages/django/contrib/postgres/apps.py
484
from django.apps import AppConfig from django.db.backends.signals import connection_created from django.db.models import CharField, TextField from django.utils.translation import ugettext_lazy as _ from .lookups import Unaccent from .signals import register_hstore_handler class PostgresConfig(AppConfig): name = ...
akosyakov/intellij-community
refs/heads/master
python/helpers/profiler/thriftpy3/transport/TSocket.py
51
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
webuildcity/wbc
refs/heads/master
testing/default.local.py
1
SECRET_KEY = 'this is a not very secret key' SITE_URL = 'http://localhost:8000' DATABASES = { # 'default': { # 'ENGINE': 'django.db.backends.postgresql_psycopg2', # 'NAME': '', # 'USER': '', # 'PASSWORD': '', # 'HOST': '', # 'PORT': '', # } # 'default': { ...
JasonGross/mozjs
refs/heads/master
media/webrtc/trunk/tools/gyp/test/defines/gyptest-defines.py
106
#!/usr/bin/env python # Copyright (c) 2011 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. """ Verifies build of an executable with C++ defines. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('defines.gyp') test.build...
szabolcsbalogh/bha
refs/heads/master
shield_daemon.py
1
#!env/bin/python import os import signal import json import sys from tornado import ioloop import tornado.web from tornado.ioloop import PeriodicCallback import tornado.options import tornado.log import daemonize from shield.shield_io import ShieldIO from shield.shield_api import api from shield.shield_loop import Sh...
agvergara/Python
refs/heads/master
X-Serv-Practica-Hoteles/practica_final/hoteles/apps.py
2
from __future__ import unicode_literals from django.apps import AppConfig class HotelesConfig(AppConfig): name = 'hoteles'
patriciolobos/desa8
refs/heads/master
openerp/addons/hr_holidays/wizard/__init__.py
442
# -*- 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...
dabercro/CrombieTools
refs/heads/master
scripts/checkxs.py
1
#! /usr/bin/python """ Usage: %s FILE [FILE ...] Checks MC Configuration file cross sections with the central database. If there are mismatches, a new suggested configuration file is generated. This file has the same name as the original file with the suffix '.new' appended. Author: Daniel Abercrombie <dabercro@mit....