repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
mambocab/cassandra-dtest | refs/heads/master | cassandra-thrift/v11/__init__.py | 66 | __all__ = ['ttypes', 'constants', 'Cassandra']
|
xinjiguaike/edx-platform | refs/heads/master | lms/djangoapps/verify_student/migrations/0004_auto__add_verificationcheckpoint__add_unique_verificationcheckpoint_co.py | 98 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'VerificationCheckpoint'
db.create_table('verify_student_v... |
GitAngel/django | refs/heads/master | tests/bash_completion/management/commands/__init__.py | 12133432 | |
cjgibson/hkvguqktacuranriagqecvebgwbjnlakvhaqytvtbyuvxt | refs/heads/master | 48097711/043/e.py | 12133432 | |
XonqNopp/sphinx-git | refs/heads/master | tests/__init__.py | 12133432 | |
AKSW/LODStats_WWW | refs/heads/master | rdfstats/tests/functional/test_rdf_classes.py | 1 | from rdfstats.tests import *
class TestRdfClassesController(TestController):
def test_index(self):
response = self.app.get(url('rdf_classes'))
# Test response...
def test_index_as_xml(self):
response = self.app.get(url('formatted_rdf_classes', format='xml'))
def test_create(self)... |
mistercrunch/airflow | refs/heads/master | tests/utils/test_log_handlers.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... |
steedos/odoo | refs/heads/8.0 | openerp/addons/base/res/ir_property.py | 193 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... |
wandec/grr | refs/heads/master | client/client_actions/grr_rekall.py | 2 | #!/usr/bin/env python
"""Execute a Rekall plugin on the client memory.
This module implements the Rekall enabled client actions.
"""
import os
import pdb
import sys
# Initialize the Rekall plugins, so pylint: disable=unused-import
from rekall import addrspace
from rekall import config
from rekall import constants... |
vadimtk/chrome4sdp | refs/heads/master | chrome/common/extensions/docs/server2/appengine_url_fetcher.py | 78 | # 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.
import base64
import logging
import posixpath
import time
from appengine_wrappers import urlfetch
from environment import GetAppVersion
from future impo... |
gsehub/edx-platform | refs/heads/gsehub-release | openedx/core/djangoapps/site_configuration/admin.py | 24 | """
Django admin page for Site Configuration models
"""
from django.contrib import admin
from .models import SiteConfiguration, SiteConfigurationHistory
class SiteConfigurationAdmin(admin.ModelAdmin):
"""
Admin interface for the SiteConfiguration object.
"""
list_display = ('site', 'enabled', 'values... |
david-ragazzi/nupic | refs/heads/master | tests/swarming/nupic/swarming/experiments/delta/permutations.py | 8 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... |
ahmadio/edx-platform | refs/heads/master | common/lib/symmath/symmath/test_symmath_check.py | 166 | from unittest import TestCase
from .symmath_check import symmath_check
class SymmathCheckTest(TestCase):
def test_symmath_check_integers(self):
number_list = [i for i in range(-100, 100)]
self._symmath_check_numbers(number_list)
def test_symmath_check_floats(self):
number_list = [i + ... |
rwarren14/robotframework | refs/heads/master | src/robot/libraries/dialogs_py.py | 23 | # Copyright 2008-2015 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 required by applicable l... |
cetic/ansible | refs/heads/devel | lib/ansible/modules/windows/win_iis_webapplication.py | 22 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
#
# 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 t... |
Pythonify/awesome | refs/heads/master | venv/lib/python2.7/site-packages/wheel/test/test_paths.py | 565 | import wheel.paths
from distutils.command.install import SCHEME_KEYS
def test_path():
d = wheel.paths.get_install_paths('wheel')
assert len(d) == len(SCHEME_KEYS)
|
sysadminmatmoz/ingadhoc | refs/heads/8.0 | project_issue_closure_restrictions/__openerp__.py | 4 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... |
Leila20/django | refs/heads/master | tests/admin_scripts/custom_templates/app_template/api.py | 581 | # your API code
|
gabrielfalcao/lettuce | refs/heads/master | tests/integration/lib/Django-1.3/django/contrib/gis/gdal/field.py | 264 | from ctypes import byref, c_int
from datetime import date, datetime, time
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import OGRException
from django.contrib.gis.gdal.prototypes import ds as capi
# For more information, see the OGR C API source code:
# http://www.gdal.org/ogr/... |
40223227/2015cdbg6w0622-40223227- | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/formatter.py | 751 | """Generic output formatting.
Formatter objects transform an abstract flow of formatting events into
specific output events on writer objects. Formatters manage several stack
structures to allow various properties of a writer object to be changed and
restored; writers need not be able to handle relative changes nor an... |
OpenTrons/opentrons-api | refs/heads/master | api/tests/__init__.py | 12133432 | |
shawnadelic/shuup | refs/heads/master | shuup/notify/base.py | 2 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from abc import abstractmethod
imp... |
ZachRiegel/scriptbin | refs/heads/master | pypyjs/modules/_curses_panel.py | 11 | "Reimplementation of the standard extension module '_curses_panel' using cffi."
from _curses import _ensure_initialised, _check_ERR, error, ffi, lib
def _call_lib(method_name, *args):
return getattr(lib, method_name)(*args)
def _call_lib_check_ERR(method_name, *args):
return _check_ERR(_call_lib(method_nam... |
hexenxp14/django-avatar | refs/heads/master | avatar/admin.py | 31 | from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from avatar.models import Avatar
from avatar.signals import avatar_updated
from avatar.templatetags.avatar_tags import avatar
from avatar.util import get_user_model
class AvatarAdmin(admin.ModelAdmin):
list_display = ('get_a... |
hieukypc/ERP | refs/heads/master | openerp/addons/base/tests/test_func.py | 30 | # -*- coding: utf-8 -*-
import functools
import unittest
from openerp.tools.func import compose
from openerp.tools import frozendict
class TestCompose(unittest.TestCase):
def test_basic(self):
str_add = compose(str, lambda a, b: a + b)
self.assertEqual(
str_add(1, 2),
"3")
... |
unicef-zambia/zambia-ureport | refs/heads/master | zambiaureport/contrib/sites/migrations/0002_set_site_domain_and_name.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import models, migrations
def update_site_forward(apps, schema_editor):
"""Set site domain and name."""
Site = apps.get_model("sites", "Site")
Site.objects.update_or_create(
id=settings... |
x86Labs/amoco | refs/heads/release | amoco/arch/x86/spec_fpu.py | 10 | # -*- coding: utf-8 -*-
# This code is part of Amoco
# Copyright (C) 2014 Axel Tillequin (bdcht3@gmail.com)
# published under GPLv2 license
# spec_xxx files are providers for instruction objects.
from .utils import *
#------------------------------------------------------
# amoco x86 FPU (x87) instruction specs:
#-... |
cyucheng/skimr | refs/heads/master | skimr/skimr.py | 1 | #!/usr/bin/env python
"""
skimr is a web application for streamlining reading of articles online.
It currently works for articles on Medium.com but could be adapted for articles
on other websites with minor adjustments to the html cleaning function.
The framework of skimr is:
- Use selenium webdriver to scrape full ... |
tobinjt/Flexget | refs/heads/develop | flexget/components/notify/notifiers/join.py | 4 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
import logging
from flexget import plugin
from flexget.event import event
from flexget.plugin import PluginWarning
from flexget.config_schema import one_or_more
from flexget.ut... |
daenamkim/ansible | refs/heads/devel | lib/ansible/modules/network/ios/ios_ping.py | 7 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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',
'status': ['preview'],
... |
mogoweb/chromium-crosswalk | refs/heads/master | native_client_sdk/src/tools/fix_deps.py | 95 | #!/usr/bin/env python
# Copyright (c) 2013 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.
"""Fixup GCC-generated dependency files.
Modify GCC generated dependency files so they are more suitable for including
in a GNU Ma... |
mlavin/django | refs/heads/master | django/utils/http.py | 9 | import base64
import calendar
import datetime
import re
import unicodedata
import warnings
from binascii import Error as BinasciiError
from contextlib import suppress
from email.utils import formatdate
from urllib.parse import (
ParseResult, SplitResult, _coerce_args, _splitnetloc, _splitparams, quote,
quote_pl... |
aonbyte/projecteuler | refs/heads/master | src/problem1.py | 1 | #Project Euler Problem 1 @ http://projecteuler.net/problem=1
#By Michael H. / Aonbyte @ http://github.com/aonbyte
#Problem 1:
#
#If we list all the natural numbers below 10 that are multiples of 3 or 5, we
#get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the
#multiples of 3 or 5 below 1000.
de... |
zrhans/pythonanywhere | refs/heads/master | .virtualenvs/django19/lib/python3.4/site-packages/numpy/lib/tests/test__version.py | 126 | """Tests for the NumpyVersion class.
"""
from __future__ import division, absolute_import, print_function
from numpy.testing import assert_, run_module_suite, assert_raises
from numpy.lib import NumpyVersion
def test_main_versions():
assert_(NumpyVersion('1.8.0') == '1.8.0')
for ver in ['1.9.0', '2.0.0', '1... |
QuantCrimAtLeeds/PredictCode | refs/heads/master | open_cp/gui/predictors/pred_type.py | 1 | """
pred_type
~~~~~~~~~
Describe the top level prediction required. E.g.:
- Produce a prediction for each day in the assessment time range, and score
the prediction using the actual events which occurred that day.
- Or... same, but on a weekly basis.
"""
from . import comparitor
import logging
import ... |
plxaye/chromium | refs/heads/master | src/tools/metrics/histograms/update_extension_functions.py | 57 | # Copyright 2013 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.
"""Updates ExtensionFunctions enum in histograms.xml file with values read from
extension_function_histogram_value.h.
If the file was pretty-printed, the up... |
Adnn/django | refs/heads/master | tests/timezones/tests.py | 165 | from __future__ import unicode_literals
import datetime
import re
import sys
import warnings
from unittest import SkipTest, skipIf
from xml.dom.minidom import parseString
from django.contrib.auth.models import User
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured
from django... |
valentin-krasontovitsch/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/aws_ses_identity.py | 27 | #!/usr/bin/python
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
DOCUMENTATION = '''
---
module: aws_ses_identity
short_de... |
dvitme/odoomrp-wip | refs/heads/8.0 | stock_picking_wave_management/models/stock_pack.py | 27 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields
class StockPackOperati... |
ArthurMoore85/rb5-slack-bot | refs/heads/master | bot/beanstalk/__init__.py | 12133432 | |
debugger22/sympy | refs/heads/master | sympy/physics/vector/tests/__init__.py | 12133432 | |
MobinRanjbar/hue | refs/heads/master | desktop/core/ext-py/django-nose-1.3/testapp/__init__.py | 12133432 | |
cosmiclattes/TPBviz | refs/heads/master | torrent/lib/python2.7/site-packages/django/contrib/gis/gdal/prototypes/__init__.py | 12133432 | |
riptano/brisk | refs/heads/master | tools/cookbook/brisk/files/default/tokentool.py | 4 | #! /usr/bin/python
import sys, random, time
MAXRANGE = (2**127)
DEBUG = False
# MAXRANGE = 100
# DEBUG = True
originalTokens = {}
dcOffsets = {}
zoom = 2
def readInt(number, exitOnFail=False):
returnVal = None
try:
returnVal = int(number)
except:
print "Please input a valid number."
... |
altsen/diandiyun-platform | refs/heads/master | lms/djangoapps/wechat/management/commands/tests/test_dump_course.py | 16 | """Tests for Django management commands"""
import json
import shutil
from StringIO import StringIO
import tarfile
from tempfile import mkdtemp
from path import path
from django.core.management import call_command
from django.test.utils import override_settings
from django.test.testcases import TestCase
from coursew... |
Franky666/programmiersprachen-raytracer | refs/heads/master | external/boost_1_59_0/libs/python/pyste/install/pyste.py | 13 | #!/usr/bin/env python
# Copyright Bruno da Silva de Oliveira 2006. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
from Pyste import pyste
pyste.main()
|
appsembler/edx-platform | refs/heads/appsembler/tahoe/master | common/lib/xmodule/setup.py | 5 | from setuptools import find_packages, setup
XMODULES = [
"book = xmodule.backcompat_module:TranslateCustomTagDescriptor",
"chapter = xmodule.seq_module:SectionDescriptor",
"conditional = xmodule.conditional_module:ConditionalDescriptor",
"course = xmodule.course_module:CourseDescriptor",
"customtag... |
chennqqi/splayer | refs/heads/master | Thirdparty/jsoncpp/scons-tools/srcdist.py | 264 | import os
import os.path
from fnmatch import fnmatch
import targz
##def DoxyfileParse(file_contents):
## """
## Parse a Doxygen source file and return a dictionary of all the values.
## Values will be strings and lists of strings.
## """
## data = {}
##
## import shlex
## lex = shlex.shlex(instream = fil... |
goliveirab/odoo | refs/heads/8.0 | openerp/tools/yaml_tag.py | 337 | import yaml
import logging
class YamlTag(object):
"""
Superclass for constructors of custom tags defined in yaml file.
__str__ is overriden in subclass and used for serialization in module recorder.
"""
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
def __getitem__(self, key... |
OpenBfS/dokpool-plone | refs/heads/master | Plone/src/elan.theme/elan/theme/setuphandlers.py | 1 | def setupVarious(context):
# Ordinarily, GenericSetup handlers check for the existence of XML files.
# Here, we are not parsing an XML file, but we use this text file as a
# flag to check that we actually meant for this import step to be run.
# The file is found in profiles/default.
if context.rea... |
Anwesh43/numpy | refs/heads/master | doc/f2py/collectinput.py | 111 | #!/usr/bin/env python
"""
collectinput - Collects all files that are included to a main Latex document
with \input or \include commands. These commands must be
in separate lines.
Copyright 1999 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, an... |
LAsbun/scrapy_practice | refs/heads/master | scrapy_practice/__init__.py | 12133432 | |
maestro-hybrid-cloud/ceilometer | refs/heads/master | ceilometer/tests/unit/energy/__init__.py | 12133432 | |
saurabh6790/tru_app_back | refs/heads/master | controllers/__init__.py | 12133432 | |
harisibrahimkv/django | refs/heads/master | django/core/cache/backends/__init__.py | 12133432 | |
PolicyStat/selenium-old | refs/heads/master | py/selenium/webdriver/common/keys.py | 39 | # copyright 2008-2009 WebDriver committers
# Copyright 2008-2009 Google Inc.
#
# Licensed under the Apache License Version 2.0 = uthe "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 requ... |
edersondisouza/soletta | refs/heads/master | data/scripts/check-api.py | 8 | #!/usr/bin/env python3
# This file is part of the Soletta (TM) Project
#
# Copyright (C) 2015 Intel Corporation. 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
#
# ... |
ebu/PlugIt | refs/heads/master | tests/helpers/pop_server/server.py | 1 | """
Small POP server. Heavilly based on
pypopper: a file-based pop3 server (http://code.activestate.com/recipes/534131-pypopper-python-pop3-server/)
Useage:
python server.py
Will return all mail*.txt in the current folder as mail. Output is also printed.
"""
import logging
import socket
import glob
loggi... |
912/M-new | refs/heads/master | virtualenvironment/experimental/lib/python2.7/site-packages/django/db/migrations/state.py | 5 | from __future__ import unicode_literals
from django.apps import AppConfig
from django.apps.registry import Apps, apps as global_apps
from django.db import models
from django.db.models.options import DEFAULT_NAMES, normalize_together
from django.db.models.fields.related import do_pending_lookups
from django.conf import... |
diego-d5000/MisValesMd | refs/heads/master | env/lib/python2.7/site-packages/django/conf/locale/az/__init__.py | 12133432 | |
wwf5067/statsmodels | refs/heads/master | docs/sphinxext/numpy_ext/__init__.py | 12133432 | |
kuiwei/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/modulestore/tests/__init__.py | 12133432 | |
flipjack/django | refs/heads/master | oscar/models/__init__.py | 12133432 | |
blighj/django | refs/heads/master | tests/queries/__init__.py | 12133432 | |
SusanJL/iris | refs/heads/master | docs/iris/example_tests/test_SOI_filtering.py | 11 | # (C) British Crown Copyright 2012 - 2016, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... |
drakuna/odoo | refs/heads/master | addons/payment_ogone/models/__init__.py | 895 | # -*- coding: utf-8 -*-
import ogone
|
modulexcite/yowsup | refs/heads/master | yowsup/layers/protocol_contacts/test_layer.py | 68 | from yowsup.layers import YowProtocolLayerTest
from yowsup.layers.protocol_contacts import YowContactsIqProtocolLayer
from yowsup.layers.protocol_contacts.protocolentities.test_notification_contact_add import entity as addEntity
from yowsup.layers.protocol_contacts.protocolentities.test_notification_contact_update impo... |
gdgellatly/OCB1 | refs/heads/7.0 | addons/web_api/__init__.py | 12133432 | |
BQLQ/BQLQ | refs/heads/master | mezzanine-4.2.3/mezzanine/core/migrations/__init__.py | 12133432 | |
knifenomad/django | refs/heads/master | django/conf/locale/et/__init__.py | 12133432 | |
waustin/django-simple-faq | refs/heads/master | faq/migrations/0001_initial.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):
# Adding model 'Category'
db.create_table(u'faq_category', (
(u'id', self.gf('django.db.models.f... |
piyushroshan/xen-4.3 | refs/heads/master | tools/python/xen/web/protocol.py | 52 | #============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope th... |
bsmr-eve/Pyfa | refs/heads/master | eos/effects/fighterabilitylaunchbomb.py | 1 | # fighterAbilityLaunchBomb
#
# Used by:
# Fighters from group: Heavy Fighter (16 of 34)
"""
Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the
effects, and thus this effect file contains some custom information useful only to fighters.
"""
# User-frien... |
yceruto/django | refs/heads/master | django/conf/locale/sr/__init__.py | 12133432 | |
mcardillo55/django | refs/heads/master | tests/template_backends/apps/importerror/templatetags/__init__.py | 12133432 | |
gaddman/ansible | refs/heads/devel | lib/ansible/modules/remote_management/redfish/__init__.py | 12133432 | |
stephentyrone/swift | refs/heads/master | benchmark/scripts/generate_harness/generate_harness.py | 17 | #!/usr/bin/env python
# ===--- generate_harness.py ---------------------------------------------===//
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See ... |
jf87/smap | refs/heads/master | python/smap/drivers/file.py | 1 | """
Copyright (c) 2011, 2012, Regents of the University of California
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 l... |
jumpstarter-io/horizon | refs/heads/master | openstack_dashboard/dashboards/project/routers/ports/tabs.py | 86 | # Copyright 2012, Nachi Ueno, NTT MCL, 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 applic... |
yashsharan/sympy | refs/heads/master | doc/src/conf.py | 7 | # -*- coding: utf-8 -*-
#
# SymPy documentation build configuration file, created by
# sphinx-quickstart.py on Sat Mar 22 19:34:32 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickle... |
clld/clldutils | refs/heads/master | tests/test_markup.py | 1 | import io
from operator import itemgetter
import pytest
from clldutils.markup import Table, iter_markdown_tables, iter_markdown_sections
def test_Table():
t = Table()
assert t.render() == ''
t = Table('a', 'b', rows=[[1, 2], [3, 4]])
assert t.render() == \
'| a | b |\n|----:|----:|\n| 1 | 2... |
andresguisado/andresguisado.github.io | refs/heads/master | node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/manni.py | 364 | # -*- coding: utf-8 -*-
"""
pygments.styles.manni
~~~~~~~~~~~~~~~~~~~~~
A colorful style, inspired by the terminal highlighting style.
This is a port of the style used in the `php port`_ of pygments
by Manni. The style is called 'default' there.
:copyright: Copyright 2006-2013 by the Pygments... |
gdos/legume | refs/heads/master | tests/test_keepalive.py | 2 | # legume. Copyright 2009-2013 Dale Reidy. All rights reserved.
# See LICENSE for details.
import sys
sys.path.append('..')
import legume.timing as time
import unittest
import legume
from greenbar import GreenBarRunner
def getRandomPort():
import random
return random.randint(16000, 50000)
cl... |
franciscogarate/pyliferisk | refs/heads/master | Examples/Example_4_5b.py | 1 | #!/usr/bin/python
from pyliferisk import *
from pyliferisk.mortalitytables import INM05
import numpy as np
import pandas as pd
rfr = pd.read_excel('EIOPA_RFR_20161231_Term_Structures.xlsx', sheet_name='RFR_spot_no_VA',
skiprows=9, usecols='C:C', names=['Euro'])
tariff = Actuarial(nt=INM05, i=0.05)
reserve = Mo... |
hockeybuggy/pyactiveresource | refs/heads/master | pyactiveresource/__init__.py | 386048 | |
sergeii/swat4stats.com | refs/heads/master | tracker/management/commands/importdata.py | 1 | # -*- coding: utf-8 -*-
from __future__ import (unicode_literals, absolute_import)
import os
import sys
import datetime
from django.core.management.base import BaseCommand, CommandError
from django.core.exceptions import ObjectDoesNotExist
from django import db
from django.utils import timezone
import mock
from juli... |
HiSPARC/publicdb | refs/heads/master | publicdb/inforecords/migrations/0006_increase_country_name_length.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-01-29 23:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inforecords', '0005_fix_ip_fields_bug'),
]
operations = [
migrations.AlterF... |
rtindru/django | refs/heads/master | tests/admin_views/models.py | 9 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import os
import tempfile
from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from django.core.e... |
monkeyi/monkeyfarm | refs/heads/master | www/app.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging; logging.basicConfig(level=logging.INFO)
#import pdb
import asyncio, os, json, time
from datetime import datetime
from aiohttp import web
from jinja2 import Environment, FileSystemLoader
import orm
from coroweb import add_routes, add_static, add_route
f... |
xfournet/intellij-community | refs/heads/master | python/testData/quickFixes/PyAugmentAssignmentQuickFixTest/simple_after.py | 83 | var += 3
|
nebril/fuel-web | refs/heads/master | nailgun/nailgun/settings.py | 7 | # -*- coding: utf-8 -*-
# Copyright 2013 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... |
narthollis/eve-shoppinglist | refs/heads/master | shoppinglist/dns/reversename.py | 75 | # Copyright (C) 2006, 2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... |
JorgeCoock/django | refs/heads/master | setup.py | 195 | import os
import sys
from distutils.sysconfig import get_python_lib
from setuptools import find_packages, setup
# Warn if we are installing over top of an existing installation. This can
# cause issues where files that were deleted from a more recent Django are
# still present in site-packages. See #18115.
overlay_wa... |
AnishShah/tensorflow | refs/heads/master | tensorflow/contrib/tensor_forest/python/ops/tensor_forest_ops.py | 166 | # Copyright 2016 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... |
ejeschke/ginga | refs/heads/master | ginga/opengl/glsl/req.py | 3 | # This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
# OpenGL version requirements to use these shaders
major = 4
minor = 5
|
Deepakkothandan/ansible | refs/heads/devel | lib/ansible/modules/web_infrastructure/ansible_tower/tower_team.py | 15 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
# 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... |
sigma-random/asuswrt-merlin | refs/heads/master | release/src/router/asusnatnl/pjproject-1.12/tests/pjsua/scripts-run/100_simple.py | 59 | # $Id: 100_simple.py 2028 2008-06-16 13:04:44Z bennylp $
#
# Just about the simple pjsua command line parameter, which should
# never fail in any circumstances
from inc_cfg import *
test_param = TestParam(
"Basic run",
[
InstanceParam("pjsua", "--null-audio --rtp-port 0")
]
)
|
praba230890/frappe | refs/heads/develop | frappe/model/docfield.py | 61 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
"""docfield utililtes"""
import frappe
def rename(doctype, fieldname, newname):
"""rename docfield"""
df = frappe.db.sql("""select * from tabDocField where parent=%s and field... |
40123210/w17b_exam | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/string.py | 734 | """A collection of string constants.
Public module variables:
whitespace -- a string containing all ASCII whitespace
ascii_lowercase -- a string containing all ASCII lowercase letters
ascii_uppercase -- a string containing all ASCII uppercase letters
ascii_letters -- a string containing all ASCII letters
digits -- a ... |
camptocamp/ngo-addons-backport | refs/heads/master | addons/account_check_writing/__openerp__.py | 58 | # -*- 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.