repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
briehl/narrative
refs/heads/develop
src/biokbase/narrative/common/url_config.py
2
import os import json from .util import kbase_env class Struct: def __init__(self, **args): self._urls = {} self._urls.update(args) def get_url(self, key): return self._urls.get(key, None) def __getattr__(self, key): return self._urls.get(key, None) def __str__(self)...
jhcepas/npr
refs/heads/master
ete_dev/evol/utils.py
2
#!/usr/bin/python # Author: Francois-Jose Serra # Creation Date: 2010/04/22 16:05:46 # from __future__ import division # unnecessary? from ete_dev import Tree from math import log, exp def get_rooting(tol, seed_species, agename = False): ''' returns dict of species age for a given TOL and a given see...
40423117/2017springcd_hw
refs/heads/gh-pages
plugin/liquid_tags/vimeo.py
288
""" Vimeo Tag --------- This implements a Liquid-style vimeo tag for Pelican, based on the youtube tag which is in turn based on the jekyll / octopress youtube tag [1]_ Syntax ------ {% vimeo id [width height] %} Example ------- {% vimeo 10739054 640 480 %} Output ------ <div style="width:640px; height:480px;"> ...
adrienbrault/home-assistant
refs/heads/dev
homeassistant/components/automation/logbook.py
5
"""Describe logbook events.""" from homeassistant.components.logbook import LazyEventPartialState from homeassistant.const import ATTR_ENTITY_ID, ATTR_NAME from homeassistant.core import HomeAssistant, callback from . import ATTR_SOURCE, DOMAIN, EVENT_AUTOMATION_TRIGGERED @callback def async_describe_events(hass: Ho...
chajadan/dragonfly
refs/heads/master
dragonfly/apps/family/loader.py
5
# # This file is part of Dragonfly. # (c) Copyright 2007, 2008 by Christo Butcher # Licensed under the LGPL. # # Dragonfly is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation, either version 3...
jejimenez/django
refs/heads/master
tests/responses/tests.py
226
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.http import HttpResponse from django.http.response import HttpResponseBase from django.test import SimpleTestCase UTF8 = 'utf-8' ISO88591 = 'iso-8859-1' class HttpResponseBaseTests(SimpleTestCase): def ...
ikoula/cloudstack
refs/heads/master
test/selenium/cspages/dashboard/dashboardpage.py
7
# 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...
adamheins/stercus
refs/heads/master
compiler/stercus/lexer.py
1
#!/usr/bin/env python """ Stercus Language Lexer """ import argparse from constants import BRACKETS def lex(src): """ Convert the Stercus source code into a list of tokens. """ lexed_src = '' for char in src: if char in BRACKETS['ALL']: lexed_src += ' ' + char + ' ' else: ...
qsnake/py2js
refs/heads/master
tests/functions/divfloor.py
5
x = 23423 y = 213 z = x // y print z
mrshu/scikit-learn
refs/heads/master
sklearn/decomposition/sparse_pca.py
1
"""Matrix factorization with Sparse PCA""" # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD import warnings import numpy as np from ..utils import check_random_state, array2d from ..linear_model import ridge_regression from ..base import BaseEstimator, TransformerMixin from .dict_learning im...
JioEducation/edx-platform
refs/heads/master
common/lib/capa/capa/safe_exec/lazymod.py
193
"""A module proxy for delayed importing of modules. From http://barnesc.blogspot.com/2006/06/automatic-python-imports-with-autoimp.html, in the public domain. """ import sys class LazyModule(object): """A lazy module proxy.""" def __init__(self, modname): self.__dict__['__name__'] = modname ...
VapourApps/va_master
refs/heads/master
va_master/host_drivers/digitalocean_driver.py
1
try: from . import base from .base import Step, StepResult except: import base from base import Step, StepResult from base import bytes_to_int, int_to_bytes from tornado.httpclient import AsyncHTTPClient, HTTPRequest import digitalocean from digitalocean import Manager import tornado.gen import json...
tbinjiayou/Odoo
refs/heads/master
addons/crm/base_partner_merge.py
75
#!/usr/bin/env python from __future__ import absolute_import from email.utils import parseaddr import functools import htmlentitydefs import itertools import logging import operator import psycopg2 import re from ast import literal_eval from openerp.tools import mute_logger # Validation Library https://pypi.python.org...
andyraib/data-storage
refs/heads/master
python_scripts/env/lib/python3.6/site-packages/matplotlib/tri/__init__.py
23
""" Unstructured triangular grid functions. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six from .triangulation import * from .tricontour import * from .tritools import * from .trifinder import * from .triinterpolate import * from .trirefine ...
elviscat/DBDS
refs/heads/master
DBDS_Step1.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # DBDS_Step1.py # Author: Elvis Hsin-Hui Wu # Date June 25, 2014 # Batch execute pyDruids.py and store analysis results in designated folder # Usage: python DBDS_Step1.py -s example.nex from Bio.Nexus import Nexus from Bio import SeqIO import os, sys def delFolderConten...
pelya/commandergenius
refs/heads/sdl_android
project/jni/python/src/Lib/lib2to3/fixes/fix_xreadlines.py
53
"""Fix "for x in f.xreadlines()" -> "for x in f". This fixer will also convert g(f.xreadlines) into g(f.__iter__).""" # Author: Collin Winter # Local imports from .. import fixer_base from ..fixer_util import Name class FixXreadlines(fixer_base.BaseFix): PATTERN = """ power< call=any+ trailer< '.' 'xreadlin...
tisba/bigcouch
refs/heads/master
couchjs/scons/scons-local-2.0.1/SCons/Tool/hpcc.py
61
"""SCons.Tool.hpcc Tool-specific initialization for HP aCC and cc. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Founda...
gm2211/vpnAlfredWorkflow
refs/heads/develop
src/alp/request/requests/packages/charade/codingstatemachine.py
206
######################## 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. ...
desecho/hoa
refs/heads/master
hoa_project/hoa_project/settings.py
1
# Django settings for hoa_project project. import os, django DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. ...
mjmeyer2013/is210-week-05-warmup
refs/heads/master
tests/test_smoke.py
245
#!/usr/bin/env python # -*- coding: utf-8 -*- """Smoke test for test suite.""" # Import Python libs import unittest class SmokeTestCase(unittest.TestCase): """Test cases to ensure that the test suite is operational.""" def test_true(self): """Tests that True is True.""" self.assertTrue(True)...
hyperized/ansible
refs/heads/devel
hacking/build_library/build_ansible/command_plugins/generate_man.py
68
# coding: utf-8 # Copyright: (c) 2019, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import argparse import os.path import pathlib impo...
mayankcu/Django-social
refs/heads/master
venv/Lib/encodings/cp1250.py
593
""" Python Character Mapping Codec cp1250 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
mcannamela/fooskill
refs/heads/master
stochastics/tests/__init__.py
26
__author__ = 'michael'
kevin-hannegan/vps-droplet
refs/heads/master
website/lib/python2.7/site-packages/werkzeug/local.py
159
# -*- coding: utf-8 -*- """ werkzeug.local ~~~~~~~~~~~~~~ This module implements context-local objects. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import copy from functools import update_wrapper from werkzeug.wsgi impo...
jphire/solmuhub-testbed
refs/heads/master
create-results/profiler.py
1
import os import sys import json import numpy as np import scipy as sp import scipy.stats ''' This script is used to get the averages and confidence intervals of latency, CPU and memory usages. Results are saved in a timestamped folder. Example usage: $ python avg.py 512 5 Where 512 represents image size and 5 is...
interhui/py_task
refs/heads/master
task/task.py
3
# coding=utf-8 ''' task @author: Huiyugeng ''' import time from job import job_listener class Task(): def __init__(self, name, job, trigger, job_listener = None): self.serial = str(time.time()) + name self.name = name self.job = job self.job_listener = job_listener s...
ftrader-bitcoinabc/bitcoin-abc
refs/heads/master
test/functional/test_framework/test_node.py
1
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Class for bitcoind node under test""" import contextlib import decimal from enum import Enum import er...
0k/odoo
refs/heads/master
addons/website/models/ir_ui_view.py
5
# -*- coding: utf-8 -*- import copy from lxml import etree, html from openerp import SUPERUSER_ID, tools from openerp.addons.website.models import website from openerp.http import request from openerp.osv import osv, fields class view(osv.osv): _inherit = "ir.ui.view" _columns = { 'page': fields.bool...
hexinatgithub/CLRS-1
refs/heads/master
C31-Number-Theoretic-Algorithms/euclid.py
9
#!/usr/bin/env python # coding=utf-8 def gcd(a, b): while b != 0: tmp = b b = a % b a = tmp return a print gcd(69,99)
newerthcom/savagerebirth
refs/heads/master
libs/python-2.72/Doc/includes/sqlite3/row_factory.py
44
import sqlite3 def dict_factory(cursor, row): d = {} for idx, col in enumerate(cursor.description): d[col[0]] = row[idx] return d con = sqlite3.connect(":memory:") con.row_factory = dict_factory cur = con.cursor() cur.execute("select 1 as a") print cur.fetchone()["a"]
char-lie/data_mining
refs/heads/master
lab3/counter.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- from sys import stdin, argv from os import linesep from math import log from stoplist import stop_list def get_count(words): tfs = {} for key in set(words): tfs[key] = 0 for w in words: tfs[w] += 1 return tfs def group_n_grams(words, n): ...
frontibit/riestercoin
refs/heads/master
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
Ghalko/osf.io
refs/heads/develop
api_tests/applications/views/test_application_reset.py
26
import mock from nose.tools import * # flake8: noqa from website.models import ApiOAuth2Application, User from website.util import api_v2_url from tests.base import ApiTestCase from tests.factories import ApiOAuth2ApplicationFactory, AuthUserFactory def _get_application_reset_route(app): path = "applications/{...
Dallinger/Dallinger
refs/heads/master
demos/dlgr/demos/bartlett1932/models.py
1
from dallinger.nodes import Source import random class WarOfTheGhostsSource(Source): """A Source that reads in a random story from a file and transmits it.""" __mapper_args__ = {"polymorphic_identity": "war_of_the_ghosts_source"} def _contents(self): """Define the contents of new Infos. ...
cwahbong/dargparse
refs/heads/master
dargparse/tests/simple_dargparse_test.py
2
__author__ = 'abdul' import dargparse import datetime import unittest from dargparse import dargparse from datetime import datetime from unittest import TestCase ############################################################################### # Constants ##############################################################...
gwillen/elements
refs/heads/alpha
qa/rpc-tests/walletbackup.py
131
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Exercise the wallet backup code. Ported from walletbackup.sh. Test case is: 4 nodes. 1 2 and 3 send ...
BehavioralInsightsTeam/edx-platform
refs/heads/release-bit
pavelib/paver_tests/test_js_test.py
9
"""Unit tests for the Paver JavaScript testing tasks.""" import ddt from mock import patch from paver.easy import call_task import pavelib.js_test from pavelib.utils.envs import Env from .utils import PaverTestCase @ddt.ddt class TestPaverJavaScriptTestTasks(PaverTestCase): """ Test the Paver JavaScript te...
happylyang/django-adminplus
refs/heads/master
adminplus/tests.py
2
from django.template.loader import render_to_string from django.test import TestCase from django.views.generic import View from adminplus.sites import AdminSitePlus class AdminPlusTests(TestCase): def test_decorator(self): """register_view works as a decorator.""" site = AdminSitePlus() ...
xkmato/yowsup
refs/heads/master
yowsup/layers/protocol_chatstate/test_layer.py
68
from yowsup.layers import YowProtocolLayerTest from yowsup.layers.protocol_chatstate import YowChatstateProtocolLayer from yowsup.layers.protocol_chatstate.protocolentities import IncomingChatstateProtocolEntity, OutgoingChatstateProtocolEntity class YowChatStateProtocolLayerTest(YowProtocolLayerTest, YowChatstateProt...
kbsezginel/raspberry-pi
refs/heads/master
FlaskApp/usa_weather.py
1
import json import requests import time def usa_weather(city='pittsburgh', state='pa', unit='C', precision=1): """ Get weekly forecast for given state and city using Yahoo public weather API. """ # Change to your location url = requests.get('https://query.yahooapis.com/v1/public/yql?q=select item....
arriam-lab2/amquery
refs/heads/develop
amquery/cli.py
1
""" Command line interface module """ import click import amquery.api as api CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) @click.group() @click.option('--jobs', '-j', type=int, default=1, help='Number of jobs to start in parallel') def cli(jobs): """ Amquery """ api.default_setup(jo...
markjin1990/solr
refs/heads/master
lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/htmlentity.py
7
# 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 ...
dmitrijus/hltd
refs/heads/master
lib/urllib3-1.10/urllib3_hltd/exceptions.py
214
## 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__(self, pool, message): self.pool ...
liavkoren/djangoDev
refs/heads/master
tests/many_to_one_null/models.py
38
""" 16. Many-to-one relationships that can be null To define a many-to-one relationship that can have a null foreign key, use ``ForeignKey()`` with ``null=True`` . """ from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Reporter(models.Model)...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/config.py
56
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
matthewrmshin/cylc
refs/heads/master
lib/cylc/network/scan.py
2
#!/usr/bin/env python3 # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2019 NIWA & British Crown (Met Office) & Contributors. # # 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...
Hellowlol/PyTunes
refs/heads/master
libs/cherrypy/test/test_httplib.py
42
"""Tests for cherrypy/lib/httputil.py.""" import unittest from cherrypy.lib import httputil class UtilityTests(unittest.TestCase): def test_urljoin(self): # Test all slash+atom combinations for SCRIPT_NAME and PATH_INFO self.assertEqual(httputil.urljoin("/sn/", "/pi/"), "/sn/pi/") se...
gusano/supercollider
refs/heads/develop
editors/sced/sced/__init__.py
46
# sced (SuperCollider mode for gedit) # Copyright 2009 Artem Popov and other contributors (see AUTHORS) # # sced 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, ...
mahak/keystone
refs/heads/master
keystone/common/sql/migrate_repo/versions/104_drop_user_name_domainid_constraint.py
2
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
brianloveswords/django-badger
refs/heads/master
setup.py
1
from setuptools import setup setup( name='django-badger', version='0.0.1', description='Django app for managing and awarding badgers', long_description=open('README.rst').read(), author='Leslie Michael Orchard', author_email='me@lmorchard.com', url='http://github.com/lmorchard/django-badge...
dcowden/cadquery-freecad-module
refs/heads/master
CadQuery/Libs/pyqode/core/dialogs/encodings.py
3
""" This module contains some dialogs to help you manage encodings in you application. """ import locale from pyqode.core.api import encodings from pyqode.qt import QtCore, QtWidgets, QtGui from pyqode.core.cache import Cache from pyqode.core._forms import dlg_preferred_encodings_editor_ui class DlgPreferredEncoding...
open-keychain/SafeSlinger-AppEngine
refs/heads/openkeychain-master
safeslinger-demo/python/syncData.py
2
# The MIT License (MIT) # # Copyright (c) 2010-2015 Carnegie Mellon University # # 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...
cuckoobox/cuckoo
refs/heads/master
cuckoo/data/analyzer/linux/lib/core/startup.py
1
# Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import logging from lib.common.constants import PATHS from lib.common.results import NetlogHandler log = logging.getLogger() def create_fo...
leonsim/me
refs/heads/master
webapp/views/thread/__init__.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- import simplejson as json from quixote.errors import TraversalError, AccessError from libs.template import st, stf from webapp.models.group import Thread from webapp.views import check_access _q_exports = [] @check_access def _q_lookup(req, id): thread = Thread.get(id) ...
ahwolf/ChicagoEnergyMap
refs/heads/master
fabfile/provision.py
1
""" Functions for provisioning environments with fabtools (eat shit puppet!) """ # standard library import sys import copy import os from distutils.util import strtobool # 3rd party import fabric from fabric.api import env, task, local, run, settings, cd, sudo, lcd import fabtools from fabtools.vagrant import vagrant_...
replicatorg/ReplicatorG
refs/heads/master
skein_engines/skeinforge-50/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py
7
""" This page is in the table of contents. Splodge turns the extruder on just before the start of a thread. This is to give the extrusion a bit anchoring at the beginning. The splodge manual page is at: http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Splodge ==Operation== The default 'Activate Splodge' check...
ModdedPA/android_external_chromium_org
refs/heads/kitkat
chrome/test/functional/pyauto_functional.py
56
#!/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. """Setup for PyAuto functional tests. Use the following in your scripts to run them standalone: # This should be at the top impor...
gustavo-guimaraes/siga
refs/heads/master
backend/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py
1093
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # Copyright 2009 Raymond Hettinger, released under the MIT License. # http://code.activestate.com/recipes/576693/ try: from thread import get_ident as _get_ide...
kerstin/moviepy
refs/heads/master
moviepy/audio/fx/audio_fadeout.py
18
from moviepy.decorators import audio_video_fx, requires_duration import numpy as np @audio_video_fx @requires_duration def audio_fadeout(clip, duration): """ Return a sound clip where the sound fades out progressively over ``duration`` seconds at the end of the clip. """ def fading(gf,t): ...
olivierdalang/QGIS
refs/heads/master
python/plugins/processing/algs/gdal/GridDataMetrics.py
16
# -*- coding: utf-8 -*- """ *************************************************************************** GridDataMetrics.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *********...
cherrydocker/minos
refs/heads/master
client/deploy_kafka.py
5
#!/usr/bin/env python import argparse import os import parallel_deploy import service_config import subprocess import sys import urlparse import deploy_utils from log import Log ALL_JOBS = ["kafka", "kafkascribe"] def _get_kafka_service_config(args): args.kafka_config = deploy_utils.get_service_config(args) def...
ramaseshan/Spirit
refs/heads/master
spirit/topic/managers.py
6
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.shortcuts import get_object_or_404 from django.db.models import Q, Prefetch from ..comment.bookmark.models import CommentBookmark class TopicQuerySet(models.QuerySet): def unremoved(self): return s...
seibert/numba
refs/heads/master
numba/tests/test_sets.py
1
import unittest from collections import namedtuple import contextlib import itertools import math import random import sys import numpy as np from numba.core.compiler import compile_isolated, Flags, errors from numba import jit from numba.core import types import unittest from numba.tests.support import (TestCase, e...
rodxavier/open-pse-initiative
refs/heads/master
django_project/api/renderers/csv_renderers.py
1
from rest_framework_csv.renderers import CSVRenderer from api.serializers import QuoteSerializer class QuoteCSVRenderer(CSVRenderer): headers = QuoteSerializer().get_fields()
yceruto/django
refs/heads/master
tests/schema/tests.py
2
from __future__ import absolute_import import datetime import unittest from django.test import TransactionTestCase from django.db import connection, DatabaseError, IntegrityError from django.db.models.fields import IntegerField, TextField, CharField, SlugField from django.db.models.fields.related import ManyToManyFiel...
ITCase/sacrud_deform
refs/heads/master
setup.py
2
import os from setuptools import setup here = os.path.dirname(os.path.realpath(__file__)) def read(name): with open(os.path.join(here, name)) as f: return f.read() setup( name='sacrud_deform', version="0.1.6", url='http://github.com/sacrud/sacrud_deform/', author='Svintsov Dmitry', ...
wangxuan007/flasky
refs/heads/master
venv/lib/python2.7/site-packages/sqlalchemy/sql/compiler.py
20
# sql/compiler.py # Copyright (C) 2005-2016 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 """Base SQL and DDL compiler implementations. Classes provided include: :class:`.c...
qma/pants
refs/heads/master
src/python/pants/cache/restful_artifact_cache.py
3
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
mikrosimage/rez
refs/heads/20160619_master.mikros.1
src/rez/vendor/enum/__init__.py
33
"""Python Enumerations""" import sys as _sys __all__ = ['Enum', 'IntEnum', 'unique'] pyver = float('%s.%s' % _sys.version_info[:2]) try: any except NameError: def any(iterable): for element in iterable: if element: return True return False try: from collectio...
furushchev/mongodb_store
refs/heads/hydro-devel
mongodb_log/scripts/mongodb_log.py
2
#!/usr/bin/python ########################################################################### # mongodb_log.py - Python based ROS to MongoDB logger (multi-process) # # Created: Sun Dec 05 19:45:51 2010 # Copyright 2010-2012 Tim Niemueller [www.niemueller.de] # 2010-2011 Carnegie Mellon University # ...
jm-begon/scikit-learn
refs/heads/master
examples/datasets/plot_digits_last_image.py
386
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= The Digit Dataset ========================================================= This dataset is made up of 1797 8x8 images. Each image, like the one shown below, is of a hand-written digit. In order to utilize an 8x8 f...
alon/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py
142
import WebIDL def WebIDLTest(parser, harness): parser.parse(""" callback interface TestCallbackInterface { attribute boolean bool; }; """) results = parser.finish() iface = results[0] harness.ok(iface.isCallback(), "Interface should be a callback") parser = parser....
gymnasium/edx-platform
refs/heads/open-release/hawthorn.master
cms/djangoapps/contentstore/debug_file_uploader.py
25
import time from django.core.files.uploadhandler import FileUploadHandler class DebugFileUploader(FileUploadHandler): def __init__(self, request=None): super(DebugFileUploader, self).__init__(request) self.count = 0 def receive_data_chunk(self, raw_data, start): time.sleep(1) ...
davidfraser/genshi
refs/heads/master
genshi/tests/__init__.py
23
# -*- coding: utf-8 -*- # # Copyright (C) 2006 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consists of ...
cstavr/synnefo
refs/heads/develop
snf-astakos-app/astakos/im/tests/management/user_activation_send.py
10
# Copyright (C) 2010-2014 GRNET S.A. # # 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. # # This program is distributed i...
RamonGuiuGou/l10n-spain
refs/heads/9.0
l10n_es_partner/wizard/l10n_es_partner_wizard.py
4
# -*- coding: utf-8 -*- # © 2013-2016 Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3). from openerp import models, fields, api, _ from openerp import tools from ..gen_src.gen_data_banks import gen_bank_data_xml import tempfile import os class L10nEsPartnerImportWizard(models.Transient...
astrofrog/glue-3d-viewer
refs/heads/master
glue_vispy_viewers/extern/vispy/visuals/collections/raw_polygon_collection.py
7
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- import numpy as np fr...
userzimmermann/robotframework-python3
refs/heads/master
src/robot/testdoc.py
1
#!/usr/bin/env python # Copyright 2008-2014 Nokia Solutions and Networks # # 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 r...
sbuss/voteswap
refs/heads/master
lib/django/contrib/gis/db/backends/oracle/models.py
475
""" The GeometryColumns and SpatialRefSys models for the Oracle spatial backend. It should be noted that Oracle Spatial does not have database tables named according to the OGC standard, so the closest analogs are used. For example, the `USER_SDO_GEOM_METADATA` is used for the GeometryColumns model and the `SDO_...
sean-/ansible
refs/heads/devel
v1/ansible/utils/string_functions.py
150
def isprintable(instring): if isinstance(instring, str): #http://stackoverflow.com/a/3637294 import string printset = set(string.printable) isprintable = set(instring).issubset(printset) return isprintable else: return True def count_newlines_from_end(str): i...
smartdata-x/robots
refs/heads/master
pylib/Twisted/twisted/test/testutils.py
56
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ I{Private} test utilities for use throughout Twisted's test suite. Unlike C{proto_helpers}, this is no exception to the don't-use-it-outside-Twisted-we-won't-maintain-compatibility rule! @note: Maintainers be aware: things in this module sho...
russcollier/SamplesAndNuggets
refs/heads/master
python/threadpool_example.py
1
import logging import urllib.request from datetime import datetime from multiprocessing import Manager, Value from multiprocessing.pool import ThreadPool class EntryPoint: Log = logging.getLogger(__name__) def __init__(self): self.__total_size = Value('i', 0) self.__sizes_by_file ...
ARLahan/authomatic
refs/heads/master
examples/django/example/simple/models.py
10644
from django.db import models # Create your models here.
donghaoren/iVisDesigner
refs/heads/master
server/proxy/models.py
10644
from django.db import models # Create your models here.
gboone/wedding.harmsboone.org
refs/heads/master
rsvp/migrations/0010_auto__chg_field_room_room_type.py
1
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Room.room_type' db.alter_column(u'rsvp_room', 'room_type', self.gf('django.db.models.fiel...
dsweet04/rekall
refs/heads/master
tools/layout_expert/layout_expert/c_ast/pre_ast.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2016 Google Inc. All Rights Reserved. # # Authors: # Arkadiusz Socała <as277575@mimuw.edu.pl> # Michael Cohen <scudette@google.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the...
dmitry-sobolev/ansible
refs/heads/devel
contrib/inventory/apstra_aos.py
25
#!/usr/bin/env python # # (c) 2017 Apstra Inc, <community@apstra.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...
moria/zulip
refs/heads/master
manage.py
109
#!/usr/bin/env python import os import sys import logging import subprocess if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings") from django.conf import settings logger = logging.getLogger("zulip.management") subprocess.check_call([os.path.join(os.path.dirna...
Chaffelson/whoville
refs/heads/master
whoville/cloudbreak/models/flex_subscription_response.py
1
# coding: utf-8 """ Cloudbreak API Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud...
nicproulx/mne-python
refs/heads/placeholder
examples/io/plot_read_epochs.py
15
""" ================================== Reading epochs from a raw FIF file ================================== This script shows how to read the epochs from a raw file given a list of events. For illustration, we compute the evoked responses for both MEG and EEG data by averaging all the epochs. """ # Authors: Alexandr...
Eigenstate/msmbuilder
refs/heads/master
msmbuilder/example_datasets/brownian1d.py
7
"""Very simple datasets of brownian dynamics in one dimension.""" # Author: Robert McGibbon <rmcgibbo@gmail.com> # Contributors: # Copyright (c) 2014, Stanford University # All rights reserved. # ----------------------------------------------------------------------------- # Imports # ---------------------------------...
paplorinc/intellij-community
refs/heads/master
python/testData/inspections/PyUnresolvedReferencesInspection/DateTodayReturnType/a.py
83
from datetime import date print(date.today().strftime('%y'))
rven/odoo
refs/heads/14.0-fix-partner-merge-mail-activity
addons/account_edi_ubl/__init__.py
1262
from . import models
coala/corobo
refs/heads/master
plugins/constants.py
1
API_DOCS = 'https://api.coala.io/en/latest' USER_DOCS = 'https://docs.coala.io/en/latest' MAX_MSG_LEN = 1000 MAX_LINES = 20 PRIVATE_CMDS = ['assign_cmd', 'create_issue_cmd', 'invite_cmd', 'mark_cmd', 'pr_stats', 'unassign_cmd', 'pitchfork', 'the_rules', 'wa', 'answer', 'lmgtfy', 'ghet...
sloanyang/aquantic
refs/heads/master
Tools/Scripts/webkitpy/tool/grammar.py
217
# Copyright (c) 2009 Google Inc. All rights reserved. # Copyright (c) 2009 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above...
jianjian0dandan/Zhihu_Spider
refs/heads/master
zhihu/zhihu/pipelines.py
4
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html from scrapy.contrib.exporter import JsonLinesItemExporter, JsonItemExporter, XmlItemExporter from zhihu.items import ZhihuItem, ZhiHuA, ZhiHuQ, ZhiHuU f...
jiachenning/odoo
refs/heads/8.0
addons/base_report_designer/wizard/base_report_designer_modify.py
314
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
indykish/servo
refs/heads/master
tests/wpt/web-platform-tests/serve.py
164
#!/usr/bin/env python from tools.serve import serve def main(): serve.main()
adrienbrault/home-assistant
refs/heads/dev
homeassistant/components/cloud/client.py
3
"""Interface implementation for cloud client.""" from __future__ import annotations import asyncio import logging from pathlib import Path from typing import Any import aiohttp from hass_nabucasa.client import CloudClient as Interface from homeassistant.components.alexa import ( errors as alexa_errors, smart...
gnotaras/django-postgresql-manager
refs/heads/master
example/testproject/urls.py
5
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'testproject.views.home', name='home'), # url(r'^testproject/', include('testprojec...