repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/splom/hoverlabel/_font.py
2
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="font", parent_name="splom.hoverlabel", **kwargs): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
ubiar/odoo
refs/heads/8.0
addons/lunch/wizard/lunch_validation.py
440
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
djabber/Dashboard
refs/heads/master
bottle/dash/lib/python2.7/site-packages/setuptools/command/install_egg_info.py
357
from setuptools import Command from setuptools.archive_util import unpack_archive from distutils import log, dir_util import os, shutil, pkg_resources class install_egg_info(Command): """Install an .egg-info directory for the package""" description = "Install an .egg-info directory for the package" user_...
ZuluPro/libcloud
refs/heads/trunk
libcloud/test/storage/test_local.py
39
# 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 use ...
jusdng/odoo
refs/heads/8.0
addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
309
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # Adapted by Noviat to # - enforce correct vat number # - support negative balance # - assign...
agry/NGECore2
refs/heads/master
scripts/object/tangible/furniture/decorative/wod_sm_potted_plant_03.py
85615
import sys def setup(core, object): return
ct-23/home-assistant
refs/heads/dev
homeassistant/components/media_player/mpd.py
2
""" Support to interact with a Music Player Daemon. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.mpd/ """ import logging from datetime import timedelta import voluptuous as vol from homeassistant.components.media_player import ( MEDI...
extremewaysback/django
refs/heads/master
tests/bash_completion/management/commands/test_command.py
378
from django.core.management.base import BaseCommand class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument("--list", action="store_true", dest="list", help="Print all options") def handle(self, *args, **options): pass
botify-labs/simpleflow
refs/heads/continue_as_new
swf/actors/worker.py
1
# -*- coding:utf-8 -*- import boto.exception from simpleflow import format, logging_context from swf.actors import Actor from swf.exceptions import ( DoesNotExistError, PollTimeout, RateLimitExceededError, ResponseError, ) from swf.models import ActivityTask from swf.responses import Response class ...
RTHMaK/RPGOne
refs/heads/master
Documents/skflow-master/skflow/preprocessing/tests/__init__.py
9
# Copyright 2015-present Scikit Flow 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...
wildjan/Flask
refs/heads/master
Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/jinja2/compiler.py
623
# -*- coding: utf-8 -*- """ jinja2.compiler ~~~~~~~~~~~~~~~ Compiles nodes into python code. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from itertools import chain from copy import deepcopy from keyword import iskeyword as is_python_keyword from jinja2...
suncycheng/intellij-community
refs/heads/master
python/helpers/py2only/docutils/languages/fi.py
148
# $Id: fi.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Asko Soukka <asko.soukka@iki.fi> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated f...
mustafat/odoo-1
refs/heads/8.0
addons/website_report/__openerp__.py
388
{ 'name': 'Website Report', 'category': 'Website', 'summary': 'Website Editor on reports', 'version': '1.0', 'description': """ Use the website editor to customize your reports. """, 'author': 'OpenERP SA', 'depends': ['base', 'website', 'report'], 'data': [ 'views/layout...
jcostamagna/restauranteConcurrente
refs/heads/master
test/lib/googletest/scripts/upload.py
2511
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Mierdin/py-ovsdb
refs/heads/master
main.py
1
#Imports import socket import json import time def pingOVS(HOST, PORT): #String to send in raw JSON over TCP #This particular string is the properly formatted OVSDB echo function. #The server (OVS) should return the exact same string back to us. jsonString = "{\"method\": \"echo\",\"id\": \"echo\",\"params\": []}...
vmax-feihu/hue
refs/heads/master
apps/hbase/gen-py/hbased/Hbase.py
32
# # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # Warning: module edited below. # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * from thrift.Thrift import TProcessor from t...
rollandf/codeandtalk.com
refs/heads/main
notify.py
2
import json import logging import os import sys import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from jinja2 import Environment, PackageLoader logging.basicConfig() logger = logging.getLogger() logger.setLevel(logging.DEBUG) env = Environment(loader=PackageLoader(...
noroutine/ansible
refs/heads/devel
lib/ansible/plugins/vars/__init__.py
128
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2014, Serge van Ginderachter <serge@vanginderachter.be> # # 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 Foundat...
baslr/ArangoDB
refs/heads/3.1-silent
3rdParty/V8/V8-5.0.71.39/tools/testrunner/objects/output.py
105
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
buckets1337/UOMUMM
refs/heads/master
passlib/tests/__main__.py
33
import os from nose import run run( defaultTest=os.path.dirname(__file__), )
dpiers/coderang-meteor
refs/heads/master
public/jsrepl/extern/python/reloop-closured/lib/python2.7/xml/etree/ElementTree.py
41
# # ElementTree # $Id: ElementTree.py 3440 2008-07-18 14:45:01Z fredrik $ # # light-weight XML support for Python 2.3 and later. # # history (since 1.2.6): # 2005-11-12 fl added tostringlist/fromstringlist helpers # 2006-07-05 fl merged in selected changes from the 1.3 sandbox # 2006-07-05 fl removed support for ...
Maccimo/intellij-community
refs/heads/master
python/helpers/py3only/docutils/utils/math/math2html.py
44
#! /usr/bin/env python # -*- coding: utf-8 -*- # math2html: convert LaTeX equations to HTML output. # # Copyright (C) 2009-2011 Alex Fernández # # Released under the terms of the `2-Clause BSD license'_, in short: # Copying and distribution of this file, with or without modification, # are permitted in any m...
emperrors/fetchLinuxIDC
refs/heads/master
main/diaryGenerator.py
1
#!/usr/bin/python # -*- coding: gb2312 -*- import kits.date_helper as dh # for i in range(1, 13): # print("%d=%d" % (i, dh.getMonthDayCount(2016, i))) # # for year in range(1, 2016 + 1): # print("%d = %d" % (year, dh.getMonthDayCount(year, 2))) testers = ( (1, 1, 1), (1, 1, 2), (1, 1, 3), ...
viralpandey/kivy
refs/heads/master
examples/widgets/lists/list_simple_in_kv_2.py
52
from kivy.uix.modalview import ModalView from kivy.uix.listview import ListView from kivy.uix.gridlayout import GridLayout from kivy.lang import Builder from kivy.factory import Factory # Note the special nature of indentation in the adapter declaration, where # the adapter: is on one line, then the value side must be...
Noviat/odoo
refs/heads/8.0
addons/purchase_double_validation/purchase_double_validation_installer.py
432
# -*- 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...
uclouvain/OSIS-Louvain
refs/heads/master
program_management/models/element.py
1
############################################################################## # # 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 ...
bsipocz/astropy
refs/heads/hacking
astropy/visualization/tests/__init__.py
185
# Licensed under a 3-clause BSD style license - see LICENSE.rst
syshack/KVMGT-kernel
refs/heads/master
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
amenonsen/ansible
refs/heads/devel
lib/ansible/modules/inventory/add_host.py
45
# -*- mode: python -*- # Copyright: (c) 2012, Seth Vidal (@skvidal) # Copyright: Ansible Team # 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...
aabadie/scikit-learn
refs/heads/master
sklearn/metrics/__init__.py
27
""" The :mod:`sklearn.metrics` module includes score functions, performance metrics and pairwise metrics and distance computations. """ from .ranking import auc from .ranking import average_precision_score from .ranking import coverage_error from .ranking import label_ranking_average_precision_score from .ranking imp...
t11e/django
refs/heads/master
tests/regressiontests/templates/parser.py
14
""" Testing some internals of the template processing. These are *not* examples to be copied in user code. """ token_parsing=r""" Tests for TokenParser behavior in the face of quoted strings with spaces. >>> from django.template import TokenParser Test case 1: {% tag thevar|filter sometag %} >>> p = TokenParser("t...
myriadcoin/myriadcoin
refs/heads/master
contrib/seeds/makeseeds.py
17
#!/usr/bin/env python3 # Copyright (c) 2013-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Generate seeds.txt from Pieter's DNS seeder # import re import sys import dns.resolver import collect...
nparley/mylatitude
refs/heads/master
lib/samples/fusiontables_sample/fusiontables_v1/fusiontables_v1_client.py
7
"""Generated client library for fusiontables version v1.""" # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.py import base_api from samples.fusiontables_sample.fusiontables_v1 import fusiontables_v1_messages as messages class FusiontablesV1(base_api.BaseApiClient): """Generat...
Tesora-Release/tesora-horizon
refs/heads/master
openstack_dashboard/contrib/sahara/content/data_processing/data_sources/panel.py
48
# 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 the...
mclarkk/lifxlan
refs/heads/master
lifxlan/device.py
1
# coding=utf-8 # device.py # Author: Meghan Clark # This file contains a Device object that exposes a high-level API for interacting # with a LIFX device, and which caches some of the more persistent state attributes # so that you don't always need to spam the light with packets. # # The Device object also provides the...
world-bank/unpay-core
refs/heads/master
contrib/pyminer/pyminer.py
15
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
changev/on-build-config
refs/heads/master
build-release-tools/application/release_to_atlas.py
3
#!/usr/bin/env python # Copyright 2016, EMC, Inc. """ This is a command line program that upload vagrant.boxs to atlas. usage: ./on-tools/manifest-build-tools/HWIMO-BUILD \ on-tools/manifest-build-tools/application/release_to_atlas.py \ --build-directory b/RackHD/packer \ --atlas-url https://atlas.has...
tomakant/data-science-from-scratch
refs/heads/master
code/multiple_regression.py
60
from __future__ import division from collections import Counter from functools import partial from linear_algebra import dot, vector_add from statistics import median, standard_deviation from probability import normal_cdf from gradient_descent import minimize_stochastic from simple_linear_regression import total_sum_of...
battlecat/Spirit
refs/heads/master
example/manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings.dev") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportError: raise ImportError( "Couldn't imp...
squadran2003/PYTHON-DIRECTORY-WATCHER
refs/heads/master
lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py
2993
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
Metaswitch/horizon
refs/heads/master
openstack_dashboard/contrib/sahara/content/data_processing/jobs/tables.py
25
# 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 the...
ramirocf/gem5-pipe
refs/heads/master
src/arch/x86/isa/insts/general_purpose/load_effective_address.py
91
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
vrenaville/OCB
refs/heads/8.0
addons/hw_posbox_homepage/controllers/main.py
72
# -*- coding: utf-8 -*- import logging import os import time from os import listdir import openerp from openerp import http from openerp.http import request from openerp.tools.translate import _ _logger = logging.getLogger(__name__) index_template = """ <!DOCTYPE HTML> <html> <head> <title>Odoo's PosBox<...
kiwicopple/MyMDb
refs/heads/master
venv/Lib/site-packages/pip/commands/freeze.py
345
import re import sys import pip from pip.req import InstallRequirement from pip.log import logger from pip.basecommand import Command from pip.util import get_installed_distributions from pip._vendor import pkg_resources class FreezeCommand(Command): """Output installed packages in requirements format.""" na...
mcauser/micropython
refs/heads/master
tests/multi_bluetooth/ble_gattc_discover_services.py
8
# Test BLE GAP connect/disconnect from micropython import const import time, machine, bluetooth TIMEOUT_MS = 5000 _IRQ_CENTRAL_CONNECT = const(1) _IRQ_CENTRAL_DISCONNECT = const(2) _IRQ_PERIPHERAL_CONNECT = const(7) _IRQ_PERIPHERAL_DISCONNECT = const(8) _IRQ_GATTC_SERVICE_RESULT = const(9) _IRQ_GATTC_SERVICE_DONE = ...
tareqalayan/ansible
refs/heads/devel
lib/ansible/modules/cloud/vultr/vr_server.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
s4n7h0/intelmq
refs/heads/master
intelmq/bots/parsers/bruteforceblocker/parser.py
4
from intelmq.lib.bot import Bot, sys from intelmq.lib.message import Event from intelmq.bots import utils import re class BruteForceBlockerParserBot(Bot): def process(self): report = self.receive_message() if report: regex_ip = "^[^ \t]+" regex_timestamp = "# ([^ \t]+ [^ \...
aexeagmbh/django-allauth
refs/heads/master
allauth/socialaccount/providers/bitbucket/models.py
4209
# Create your models here.
zenodo/invenio
refs/heads/zenodo-master
invenio/legacy/bibingest/ingestion_packages/default.py
13
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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,...
Konjkov/pyquante2
refs/heads/master
pyquante2/ints/integrals.py
1
""" General module for integral generation and access. """ try: from pyquante2.ctwo import ERI_hgp as ERI except: print("Couldn't find cython int routine") from pyquante2.ints.hgp import ERI_hgp as ERI from pyquante2.clibint import Libint_ERI try: from pyquante2.cone import S,T,V except: print("Co...
hotosm/osm-export-tool2
refs/heads/master
jobs/migrations/0006_remove_job_status.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('jobs', '0005_auto_20150601_1027'), ] operations = [ migrations.RemoveField( model_name='job', name='...
PriceChild/ansible
refs/heads/devel
lib/ansible/plugins/action/normal.py
58
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
SepehrMN/nest-simulator
refs/heads/master
pynest/examples/glif_psc_neuron.py
14
# -*- coding: utf-8 -*- # # glif_psc_neuron.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
jeacaveo/schmebulock
refs/heads/develop
items/migrations/0002_store.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-04 17:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('items', '0001_initial'), ] operations = [ migrations.CreateModel( ...
zguangyu/tornado
refs/heads/master
tornado/test/options_test.py
3
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, with_statement import datetime import os import sys from tornado.options import OptionParser, Error from tornado.util import basestring_type, PY3 from tornado.test.util import unittest if PY3: from io import StringIO else: ...
uclouvain/osis
refs/heads/dev
attribution/migrations/0038_auto_20191206_1519.py
2
# Generated by Django 2.2.5 on 2019-12-06 15:19 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attribution', '0037_auto_20181116_1050'), ] operations = [ migrations.AlterField( model_name='attr...
team4099/Stronghold_2016_Vision
refs/heads/master
camera.py
1
import cv2 import freenect class VideoCamera(object): def __init__(self): pass # Using OpenCV to capture from device 0. If you have trouble capturing # from a webcam, comment the line below out and use a video file # instead. # self.video = cv2.VideoCapture(0) # If yo...
KiranPadwal/integration-linux-qcomlt
refs/heads/qcomlt-3.17_dev
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
1891
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
jimmi2times/parkdrei
refs/heads/master
node_modules/node-gyp/gyp/PRESUBMIT.py
1369
# Copyright (c) 2012 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. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
taotie12010/bigfour
refs/heads/master
common/test/acceptance/pages/lms/instructor_dashboard.py
29
# -*- coding: utf-8 -*- """ Instructor (2) dashboard page. """ from bok_choy.page_object import PageObject from .course_page import CoursePage import os from bok_choy.promise import EmptyPromise, Promise from ...tests.helpers import select_option_by_text, get_selected_option_text, get_options class InstructorDashboa...
arpith/zulip
refs/heads/master
zilencer/views.py
7
from __future__ import absolute_import from django.utils.translation import ugettext as _ from django.http import HttpResponse, HttpRequest from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.views import login as django_login_page from django.http import HttpResponseRedirect from zilencer.m...
camargoanderso/thumbor
refs/heads/master
tests/__init__.py
14
#!/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 sys from os.path import join, abspath, dirname sys.path.appe...
asm-products/movie-database-service
refs/heads/master
ani/lib/python2.7/site-packages/markdown/extensions/meta.py
12
""" Meta Data Extension for Python-Markdown ======================================= This extension adds Meta Data handling to markdown. See <https://pythonhosted.org/Markdown/extensions/meta_data.html> for documentation. Original code Copyright 2007-2008 [Waylan Limberg](http://achinghead.com). All changes Copyrig...
Loudr/appengine-pipelines
refs/heads/master
python/test/util_test.py
5
#!/usr/bin/env python """Tests for util.py.""" import datetime import logging import os import sys import unittest # Fix up paths for running tests. sys.path.insert(0, "../src/") from pipeline import util from google.appengine.api import taskqueue class JsonSerializationTest(unittest.TestCase): """Test custom j...
geerlingguy/ansible
refs/heads/devel
test/support/integration/plugins/module_utils/ansible_tower.py
45
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
ErinCall/sync-engine
refs/heads/master
migrations/versions/053_canonicalize_addresses.py
8
"""canonicalize addresses Revision ID: 3795b2a97af1 Revises:358d0320397f Create Date: 2014-07-15 22:11:38.037716 """ # revision identifiers, used by Alembic. revision = '3795b2a97af1' down_revision = '358d0320397f' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade():...
syci/l10n-spain
refs/heads/8.0
l10n_es_fiscal_year_closing/__init__.py
104
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from . import models from . import wizard
ChristinaZografou/sympy
refs/heads/parabola2
sympy/functions/elementary/benchmarks/bench_exp.py
121
from __future__ import print_function, division from sympy import exp, symbols x, y = symbols('x,y') e = exp(2*x) q = exp(3*x) def timeit_exp_subs(): e.subs(q, y)
kynikos/lib.py.input-template
refs/heads/master
inputtemplate.py
1
# InputTemplate class - A template for Python input requests. # Copyright (C) 2011-2014 Dario Giovannetti <dev@dariogiovannetti.net> # # 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 vers...
wardweistra/hipfrog
refs/heads/master
glassfrog/settings/config.py
2
SECRET_KEY = 'not_so_secret' SQLALCHEMY_DATABASE_URI = 'postgresql:///glassfrog_hipchat' SQLALCHEMY_TRACK_MODIFICATIONS = False PUBLIC_URL = "http://my-public-url.com"
S03D4-164/thug
refs/heads/master
src/ActiveX/modules/RisingScanner.py
8
# Rising Online Virus Scanner Web Scan ActiveX Control # CVE-NOMATCH import logging log = logging.getLogger("Thug") def UpdateEngine(self): log.ThugLogging.log_exploit_event(self._window.url, "Rising Online Virus Scanner Web Scan ActiveX", ...
bplower/cssef
refs/heads/refactor
CssefServer/cssefserver/errors.py
1
""" This list of CSSEF errors will be expanded and modified as more errors are added. Authentication Errors: ---------------------- Allotted error codes: 30 - 49 - 30 - IncorrectCredentials - 31 - TokenDisallowed - 32 - TokenExpired - 33 - BadAuthSource General User Errors: -------------------- Allotted error codes:...
robsonfr/hyde
refs/heads/master
setup.py
39
from setuptools import setup, find_packages setup(name='hyde', version='0.5.3', description='Hyde is a static website generator originally inspired by Jekyll', author='Lakshmi Vyas', author_email='lakshmi.vyas@gmail.com', url='http://ringce.com/hyde', packages=find_packages(), ...
h2oloopan/easymerge
refs/heads/master
EasyMerge/tests/scrapy/extras/qpsclient.py
26
""" A spider that generate light requests to meassure QPS troughput usage: scrapy runspider qpsclient.py --loglevel=INFO --set RANDOMIZE_DOWNLOAD_DELAY=0 --set CONCURRENT_REQUESTS=50 -a qps=10 -a latency=0.3 """ from scrapy.spider import Spider from scrapy.http import Request class QPSSpider(Spider): nam...
adamwwt/chvac
refs/heads/master
venv/lib/python2.7/site-packages/sqlalchemy/types.py
21
# types.py # Copyright (C) 2005-2015 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 """Compatibility namespace for sqlalchemy.sql.types. """ __all__ = ['TypeEngine', 'TypeDe...
matthewshim-ms/Recognizers-Text
refs/heads/master
Python/libraries/recognizers-date-time/recognizers_date_time/date_time/spanish/datetimeperiod_extractor_config.py
1
from typing import List, Pattern from recognizers_number import BaseNumberExtractor, SpanishCardinalExtractor from recognizers_text.utilities import RegExpUtility from ...resources.spanish_date_time import SpanishDateTime from ..extractors import DateTimeExtractor from ..base_datetimeperiod import DateTimePeriodExtrac...
luistorresm/odoo
refs/heads/8.0
openerp/addons/test_workflow/tests/test_workflow.py
392
# -*- coding: utf-8 -*- import openerp from openerp import SUPERUSER_ID from openerp.tests import common class test_workflows(common.TransactionCase): def check_activities(self, model_name, i, names): """ Check that the record i has workitems in the given activity names. """ instance = se...
CUCWD/edx-platform
refs/heads/master
common/lib/capa/capa/safe_exec/__init__.py
285
"""Capa's specialized use of codejail.safe_exec.""" from .safe_exec import safe_exec, update_hash
tLDP/python-tldp
refs/heads/master
tldp/sources.py
1
#! /usr/bin/python # -*- coding: utf8 -*- # # Copyright (c) 2016 Linux Documentation Project from __future__ import absolute_import, division, print_function from __future__ import unicode_literals import os import sys import errno import logging from tldp.ldpcollection import LDPDocumentCollection from tldp.utils ...
Tesora-Release/tesora-trove
refs/heads/master
trove/tests/api/mgmt/quotas.py
7
# Copyright 2013 OpenStack Foundation # Copyright 2013 Rackspace Hosting # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 co...
switchkiller/ProjDjanko
refs/heads/master
lib/python2.7/site-packages/wheel/test/complex-dist/complexdist/__init__.py
566
def main(): return
HesselTjeerdsma/Cyber-Physical-Pacman-Game
refs/heads/master
Algor/flask/lib/python2.7/site-packages/hjson/tests/test_scanstring.py
2
import sys from unittest import TestCase import hjson as json import hjson.decoder from hjson.compat import b, PY3 class TestScanString(TestCase): # The bytes type is intentionally not used in most of these tests # under Python 3 because the decoder immediately coerces to str before # calling scanstring. ...
amanuel/bigcouch
refs/heads/master
couchjs/scons/scons-local-2.0.1/SCons/Scanner/D.py
61
"""SCons.Scanner.D Scanner for the Digital Mars "D" programming language. Coded by Andy Friesen 17 Nov 2003 """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and as...
ODM2/ODMToolsPython
refs/heads/master
tests/test_odmdata/test_FreeTDS.py
1
# -*- coding: utf-8 -*- from odmtools.odmdata import SessionFactory, variable, series from odmtools.odmservices import SeriesService from tests import test_util import sys from tests.test_util import build_db import urllib import sqlalchemy from sqlalchemy.orm import sessionmaker class TestFreeTDS: def setup(self...
shacknetisp/fourthevaz
refs/heads/master
modules/core/serverdbsave.py
1
# -*- coding: utf-8 -*- from configs.module import Module import running def init(options): m = Module('serverdbsave') m.set_help('Save the server databases.') m.add_timer_hook(10 * 1000, timer) return m def timer(): running.serverdb.save() for e in running.accesslist.db(): d = runni...
goodwinnk/intellij-community
refs/heads/master
python/lib/Lib/asynchat.py
103
# -*- Mode: Python; tab-width: 4 -*- # Id: asynchat.py,v 2.26 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission...
erudit/zenon
refs/heads/master
eruditorg/erudit/fedora/utils.py
1
import structlog import lxml.etree as et from .repository import api from .objects import JournalDigitalObject from eruditarticle.utils import remove_xml_namespaces logger = structlog.getLogger(__name__) def get_pids(query): """ Returns the PIDS corresponding to a given Fedora query. """ ns_type = {'type':...
SoPudge/lxfpyanswer
refs/heads/master
40threadlocal.py
1
# -*- coding: utf-8 -*- def process_student(name): std = Student(name) do_task_1(std) do_task_2(std) def do_task_1(std): do_subtask_1(std) do_subtask_2(std) def do_task_2(std): do_subtask_2(std) do_sbutask_2(std) #线程如果使用全局变量,需要加锁以防修改出错 #所以线程中推荐使用自己的局部变量,可以用一个dict存储对应的变量 import threading loca...
timabbott/zulip
refs/heads/master
zerver/migrations/0258_enable_online_push_notifications_default.py
7
# Generated by Django 1.11.26 on 2019-12-11 00:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('zerver', '0257_fix_has_link_attribute'), ] operations = [ migrations.AlterField( model_name='userprofile', name='e...
theflofly/tensorflow
refs/heads/master
tensorflow/python/ops/bitwise_ops_test.py
24
# 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...
MicroPyramid/microsocial
refs/heads/master
facebook/examples/authorization.py
343
...
jreback/pandas
refs/heads/master
pandas/tests/indexing/multiindex/test_slice.py
1
import numpy as np import pytest from pandas.errors import UnsortedIndexError import pandas as pd from pandas import DataFrame, Index, MultiIndex, Series, Timestamp import pandas._testing as tm from pandas.core.indexing import non_reducing_slice from pandas.tests.indexing.common import _mklbl class TestMultiIndexSl...
robovm/robovm-studio
refs/heads/master
python/testData/refactoring/move/importFirstWithSlash/before/src/file2.py
166
__author__ = 'catherine'
DylanLukes/django-guardian
refs/heads/devel
guardian/managers.py
8
from __future__ import unicode_literals from django.db import models from django.contrib.contenttypes.models import ContentType from guardian.exceptions import ObjectNotPersisted from guardian.models import Permission import warnings # TODO: consolidate UserObjectPermissionManager and GroupObjectPermissionManager c...
Kalenai/artblog-project
refs/heads/master
artblog/apps/blog/urls.py
1
from django.conf.urls import url from .views import BlogIndex, BlogDetail urlpatterns = [ url(r'^$', BlogIndex.as_view(), name="blog_index"), url(r'^post/(?P<slug>\S+)$', BlogDetail.as_view(), name="post_detail"), ]
abstract-open-solutions/OCB
refs/heads/8.0
addons/l10n_be_hr_payroll/l10n_be_hr_payroll.py
379
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/guppy-0.1.10/guppy/heapy/test/test_Path.py
37
#._cv_part guppy.heapy.test.test_Path from guppy.heapy.test import support import sys, unittest class TestCase(support.TestCase): def setUp(self): support.TestCase.setUp(self) self.Path = self.heapy.Path def chkrel(self, src, dst, relstr=None, clas=None): rel = self.relation(src, dst) if clas is not None...
seann1/portfolio5
refs/heads/master
.meteor/dev_bundle/python/Lib/modulefinder.py
22
"""Find modules used by a script, using introspection.""" # This module should be kept compatible with Python 2.2, see PEP 291. from __future__ import generators import dis import imp import marshal import os import sys import types import struct if hasattr(sys.__stdout__, "newlines"): READ_MODE = "U" # universa...
eBayClassifiedsGroup/sponge
refs/heads/master
orlo/stats.py
4
from __future__ import print_function from collections import OrderedDict from orlo.queries import apply_filters, filter_release_rollback, filter_release_status from orlo.app import app from orlo.orm import db, Release, Package from orlo.exceptions import InvalidUsage __author__ = 'alforbes' """ Functions related to ...
hectord/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/modeltests/test_client/urls.py
99
from django.conf.urls.defaults import * from django.views.generic.simple import redirect_to import views urlpatterns = patterns('', (r'^get_view/$', views.get_view), (r'^post_view/$', views.post_view), (r'^header_view/$', views.view_with_header), (r'^raw_post_view/$', views.raw_post_view), (r'^redi...