repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
CDKAssoc/ns3
refs/heads/master
.waf-1.7.13-5a064c2686fe54de4e11018d22148cfc/waflib/Tools/python.py
89
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys from waflib import Utils,Options,Errors,Logs from waflib.TaskGen import extension,before_method,after_method,feature from waflib.Configure import conf FRAG=''' #...
aexeagmbh/swampdragon
refs/heads/master
swampdragon/serializers/field_serializers.py
13
from datetime import date from decimal import Decimal from django.db.models.fields.files import ImageFieldFile, FileField class BaseSerializer(object): def serialize(self, value): return value class DateSerializer(BaseSerializer): def serialize(self, value): return str(value) class Decimal...
jackxiang/jaikuengine
refs/heads/master
components/tests.py
36
"""Loads tests from components All tests.py files inside loaded components are imported and any classes derived from unittest.TestCase are then referenced from this file itself so that they appear at the top level of the tests "module" that Django will import. """ import os import types import unittest from common...
yavuzovski/playground
refs/heads/master
python/django/RESTTest/.venv/lib/python3.4/site-packages/django/contrib/postgres/fields/ranges.py
109
import json from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange, Range from django.contrib.postgres import forms, lookups from django.db import models from django.utils import six from .utils import AttributeSetter __all__ = [ 'RangeField', 'IntegerRangeField', 'BigIntegerRangeField', 'Floa...
w1z2g3/crossbar
refs/heads/master
crossbar/router/service.py
1
##################################################################################### # # Copyright (C) Tavendo GmbH # # Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you # have purchased a commercial license), the license terms below apply. # # Should you enter into a separate licen...
Frogging101/ArchiveBot
refs/heads/master
test/integration_runner.py
3
import atexit import glob import logging import os import random import re import signal import subprocess import sys import time import irc.client class Client(irc.client.SimpleIRCClient): def __init__(self): irc.client.SimpleIRCClient.__init__(self) self.flags = { 'queued': False, ...
arbrandes/edx-platform
refs/heads/master
lms/djangoapps/certificates/migrations/0004_certificategenerationhistory.py
4
import django.utils.timezone import model_utils.fields from django.conf import settings from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
gurneyalex/OpenUpgrade
refs/heads/master
addons/purchase/edi/purchase_order.py
439
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
steedos/odoo7
refs/heads/master
openerp/addons/account_analytic_plans/wizard/analytic_plan_create_model.py
52
# -*- 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...
polaris/boids
refs/heads/master
lib/googletest-82b11b8/googletest/scripts/fuse_gtest_files.py
2577
#!/usr/bin/env python # # Copyright 2009, Google 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 copyright # notice, this list...
jaddison/ansible
refs/heads/devel
lib/ansible/plugins/lookup/subelements.py
103
# (c) 2013, 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 Foundation, either version 3 of the License, or # (at your option)...
dsaraujo/circulante
refs/heads/master
django/conf/locale/sr_Latn/formats.py
655
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y.' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y. H:i' YEAR_MONTH_F...
uwcirg/true_nth_usa_portal
refs/heads/develop
portal/config/config_persistence.py
1
import os from flask import current_app from .config import SITE_CFG from .model_persistence import ModelPersistence class ConfigPersistence(ModelPersistence): def __init__(self, target_dir): super(ConfigPersistence, self).__init__( model_class=None, target_dir=target_dir) def import_(...
leogulus/pisco_pipeline
refs/heads/master
panstarr_photometry_all.py
1
import sys, os, re, yaml, subprocess, shlex, FITS_tools import pandas as pd import numpy as np import pickle import matplotlib import matplotlib.pyplot as plt from matplotlib import image import matplotlib.cm as cm import matplotlib.image as mpimg from scipy.optimize import curve_fit import scipy.integrate as integr...
lasote/conan
refs/heads/develop
conans/test/generators/cmake_test.py
1
import re import unittest from collections import namedtuple from conans.client.generators.cmake_multi import CMakeMultiGenerator from conans.model.settings import Settings from conans.model.conan_file import ConanFile from conans.client.generators.cmake import CMakeGenerator from conans.model.build_info import CppInf...
levilucio/SyVOLT
refs/heads/master
UMLRT2Kiltera_MM/trace_link.py
1
""" __trace_link.py_____________________________________________________ Automatically generated AToM3 syntactic object (DO NOT MODIFY DIRECTLY) Author: gehan Modified: Sat Aug 30 18:23:40 2014 ____________________________________________________________________ """ from ASGNode import * from ATOM3Type import * from...
Hackplayers/Empire-mod-Hpys-tests
refs/heads/master
lib/modules/powershell/credentials/Invoke-WCMDump.py
2
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'Invoke-WCMDump', # list of one or ...
vvv1559/intellij-community
refs/heads/master
python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/p1/m1.py
80
import b __all__ = []
josherick/bokeh
refs/heads/master
sphinx/source/docs/user_guide/source_examples/chart_timeseries_with_legend.py
30
import pandas as pd from bokeh.charts import TimeSeries, show, output_file # read in some stock data from the Yahoo Finance API AAPL = pd.read_csv( "http://ichart.yahoo.com/table.csv?s=AAPL&a=0&b=1&c=2000&d=0&e=1&f=2010", parse_dates=['Date']) MSFT = pd.read_csv( "http://ichart.yahoo.com/table....
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/auth/migrations/0002_alter_permission_name_max_length.py
586
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.AlterField( model_name='permission', name='name'...
gardster/omim
refs/heads/master
3party/protobuf/python/google/protobuf/internal/api_implementation.py
80
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
mailund/CoaSim
refs/heads/master
Python/modules/CoaSim/diseaseModelling.py
1
__doc__ = ''' CoaSim/Python -- Python bindings for Coasim Copyright (C) 2006 by Thomas Mailund <mailund@mailund.dk> This module contains functions for split sequences into affected and unaffected individuals, based on various disease models. ''' from random import uniform as _uniform def _prj(indices, lst): '''E...
nive-cms/nive
refs/heads/master
nive/helper.py
1
#---------------------------------------------------------------------- # Copyright 2012, 2013 Arndt Droullier, Nive GmbH. All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, ...
sergeii/swat-motd
refs/heads/master
fabfile/server.py
12
# -*- coding: utf-8 -*- from fabric.api import * from .settings import env from .utils import here, checkout, edit_ini _kits = env.kits.keys() @task @roles('server') def all(): """Set up the compiled packages on a clean server, then launch it.""" setup() install() launch() @task @roles('server') de...
shollen/evennia
refs/heads/master
evennia/comms/models.py
2
""" Models for the in-game communication system. The comm system could take the form of channels, but can also be adopted for storing tells or in-game mail. The comsystem's main component is the Message (Msg), which carries the actual information between two parties. Msgs are stored in the database and usually not d...
SebDieBln/QGIS
refs/heads/master
python/plugins/processing/algs/grass7/ext/v_net_arcs.py
3
# -*- coding: utf-8 -*- """ *************************************************************************** v_net_arcs.py --------------------- Date : December 2015 Copyright : (C) 2015 by Médéric Ribreux Email : medspx at medspx dot fr ************************...
snailhu/myself-Repository
refs/heads/master
SmartDataApp/migrations/0048_auto__add_notification__del_field_community_notification_time__del_fie.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 'Notification' db.create_table(u'SmartDataApp_notification', ( (u'id', self.gf('d...
Korkki/django
refs/heads/master
tests/migrations/migrations_test_apps/unspecified_app_with_conflict/migrations/0002_second.py
425
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("unspecified_app_with_conflict", "0001_initial")] operations = [ migrations.DeleteModel("Tribble"), migrations.RemoveField("Auth...
hasadna/django
refs/heads/master
django/contrib/gis/gdal/tests/test_srs.py
351
from django.contrib.gis.gdal import SpatialReference, CoordTransform, OGRException, SRSException from django.utils import unittest class TestSRS: def __init__(self, wkt, **kwargs): self.wkt = wkt for key, value in kwargs.items(): setattr(self, key, value) # Some Spatial Reference exam...
jsteemann/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Tools/scripts/eptags.py
102
#! /usr/bin/env python """Create a TAGS file for Python programs, usable with GNU Emacs. usage: eptags pyfiles... The output TAGS file is usable with Emacs version 18, 19, 20. Tagged are: - functions (even inside other defs or classes) - classes eptags warns about files it cannot open. eptags will not give warning...
40223139/203739test
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/heapq.py
628
"""Heap queue algorithm (a.k.a. priority queue). Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for all k, counting elements from 0. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that a[0] is always its smallest element. Usag...
vveerava/Openstack
refs/heads/master
neutron/tests/unit/ml2/drivers/cisco/apic/test_cisco_apic_topology_agent.py
20
# Copyright (c) 2014 Cisco Systems # 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 require...
PLyczkowski/Sticky-Keymap
refs/heads/master
2.74/scripts/addons_contrib/io_directx_bel/bel/group.py
3
import bpy ''' given name < 21 if material name exists : naming_method = 0 blender default (increment name) naming_method = 1 do nothing, abort creation and use existing naming_method = 2 create new, rename existing, naming_method = 3 create new, replace existing ''' def new(name,naming_method): if name i...
dmlc/mxnet
refs/heads/master
tools/caffe_converter/caffe_parser.py
22
# 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...
GitAngel/django
refs/heads/master
django/contrib/gis/utils/wkt.py
589
""" Utilities for manipulating Geometry WKT. """ from django.utils import six def precision_wkt(geom, prec): """ Returns WKT text of the geometry according to the given precision (an integer or a string). If the precision is an integer, then the decimal places of coordinates WKT will be truncated t...
rafamoreira/dotfiles
refs/heads/master
terminator/.config/terminator/plugins/terminator-themes.py
3
import requests import terminatorlib.plugin as plugin from gi.repository import Gtk from terminatorlib.config import ConfigBase from terminatorlib.translation import _ from terminatorlib.util import get_config_dir, err, dbg, gerr AVAILABLE = ['TerminatorThemes'] class TerminatorThemes(plugin.Plugin): capabilitie...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/boto-2.38.0/boto/logs/exceptions.py
150
# -*- coding: utf-8 -*- # Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/ # # 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 th...
lmregus/Portfolio
refs/heads/master
python/design_patterns/env/lib/python3.7/site-packages/pygments/styles/sas.py
31
# -*- coding: utf-8 -*- """ pygments.styles.sas ~~~~~~~~~~~~~~~~~~~ Style inspired by SAS' enhanced program editor. Note This is not meant to be a complete style. It's merely meant to mimic SAS' program editor syntax highlighting. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHO...
wdmchaft/taskcoach
refs/heads/master
taskcoachlib/i18n/br.py
1
# -*- coding: UTF-8 -*- #This is generated code - do not edit encoding = 'UTF-8' dict = {'Use application-wide setting': 'Implij kefluniadur an arload a-bezh', 'Monthly': 'Miziek', 'Minimize priority': 'Minimiza\xc3\xb1 ar briorelezh', 'Never': 'Morse', 'HTML files (*.html)|*.html|All files (*.*)|*': 'Restro\xc3\xb9 HT...
MobinRanjbar/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/commands_sql/tests.py
58
from __future__ import unicode_literals from django.core.management.color import no_style from django.core.management.sql import (sql_create, sql_delete, sql_indexes, sql_destroy_indexes, sql_all) from django.db import connections, DEFAULT_DB_ALIAS, models from django.test import TestCase from django.utils import ...
westernx/sgmock
refs/heads/master
sgmock/fixture/__init__.py
1
from .base import Fixture # Silence pyflakes. assert Fixture
chanceraine/nupic
refs/heads/master
tests/integration/nupic/opf/opf_checkpoint_test/experiments/non_temporal_multi_step/a_plus_b/description.py
114
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2011-2015, 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 p...
ehogan/iris
refs/heads/master
docs/iris/example_tests/test_deriving_phenomena.py
11
# (C) British Crown Copyright 2010 - 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...
Lujeni/ansible
refs/heads/devel
lib/ansible/module_utils/pure.py
56
# -*- coding: utf-8 -*- # 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 lic...
jerbob92/CouchPotatoServer
refs/heads/master
libs/tornado/web.py
5
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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 a...
glenux/contrib-mypaint
refs/heads/master
gui/colors/paletteview.py
2
# This file is part of MyPaint. # Copyright (C) 2012 by Andrew Chadwick <andrewc-git@piffle.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your ...
muntasirsyed/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/databrowse/plugins/calendars.py
247
from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response from django.utils.text import capfirst from django.utils.encoding import force_unicode from dja...
robot-army/gazecontrol
refs/heads/master
net_utils.py
2
# Gaze Control - A real-time control application for Tobii Pro Glasses 2. # # Copyright 2017 Shadi El Hajj # # 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.apach...
wuhengzhi/chromium-crosswalk
refs/heads/master
third_party/WebKit/Tools/Scripts/webkitpy/common/system/logtesting.py
68
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and...
jgravois/ArcREST
refs/heads/master
src/arcrest/common/general.py
2
import datetime import time import json import arcpy import copy import os import tempfile import uuid from spatial import json_to_featureclass from geometry import Point, MultiPoint, Polygon, Polyline, SpatialReference from .._abstract.abstract import AbstractGeometry #from ..agol import featureservice as agolFeatureS...
gunan/tensorflow
refs/heads/master
tensorflow/python/keras/tests/convert_to_constants_test.py
1
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
sander76/home-assistant
refs/heads/dev
tests/components/keenetic_ndms2/__init__.py
5
"""Tests for the Keenetic NDMS2 component.""" from homeassistant.components.keenetic_ndms2 import const from homeassistant.const import ( CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_SCAN_INTERVAL, CONF_USERNAME, ) MOCK_NAME = "Keenetic Ultra 2030" MOCK_DATA = { CONF_HOST: "0.0.0.0", CONF_USE...
pbanaszkiewicz/amy
refs/heads/develop
amy/fiscal/tests/test_organization.py
1
from django.urls import reverse from django_comments.models import Comment from fiscal.forms import OrganizationCreateForm, OrganizationForm from workshops.models import Event, Organization from workshops.tests.base import TestBase class TestOrganization(TestBase): def setUp(self): super().setUp() ...
dmclee/python-mobile-connect
refs/heads/master
mc_test/mc_test/models.py
10644
from django.db import models # Create your models here.
jose36/jmdl2
refs/heads/master
servers/firedrive.py
40
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para firedrive # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from cor...
levilucio/SyVOLT
refs/heads/master
mbeddr2C_MM/transformation_from_mps/Hlayer2rule3.py
1
from core.himesis import Himesis import uuid class Hlayer2rule3(Himesis): def __init__(self): """ Creates the himesis graph representing the DSLTrans rule layer2rule3. """ # Flag this instance as compiled now self.is_compiled = True super(Hlayer2rule3, self).__init__(name='Hlayer2rule3', num_nodes=0, edg...
espadrine/opera
refs/heads/master
chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/http_lock_unittest.py
124
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above co...
akx/stackspy
refs/heads/master
stackspy/detection/__init__.py
2
# -- encoding: utf-8 -- from __future__ import with_statement
zdary/intellij-community
refs/heads/master
python/testData/inspections/PyTupleAssignmentBalanceInspection/py4360.py
30
(a, b) = <warning descr="Too many values to unpack">1, 2, 3</warning> (a, b) = <warning descr="Too many values to unpack">(1, 2, 3)</warning>
markap/TravelMap
refs/heads/master
boilerplate/external/babel/numbers.py
54
# -*- coding: utf-8 -*- # # Copyright (C) 2007 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://babel.edgewall.org/wiki/License. # # This software consists of v...
fergalbyrne/nupic
refs/heads/master
examples/opf/experiments/classification/category_TP_1/description.py
32
# ---------------------------------------------------------------------- # 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...
niphlod/pydal
refs/heads/master
pydal/parsers/__init__.py
4
from collections import defaultdict from .._compat import with_metaclass, iteritems from .._gae import gae from ..helpers._internals import Dispatcher from ..helpers.regex import REGEX_TYPE parsers = Dispatcher("parser") class for_type(object): def __init__(self, field_type): self.field_type = field_typ...
stuarth/pixie
refs/heads/master
pixie/vm/libs/pxic/writer.py
8
from pixie.vm.libs.pxic.tags import * from pixie.vm.object import runtime_error, Object, Type, InterpreterCodeInfo from rpython.rlib.runicode import unicode_encode_utf_8 from pixie.vm.string import String from pixie.vm.keyword import Keyword from pixie.vm.symbol import Symbol from pixie.vm.numbers import Integer, BigIn...
huanghao/iris-panel
refs/heads/master
iris/core/migrations/0024_auto__add_field_buildgroup_snapshot.py
7
# -*- coding: utf-8 -*- # This file is part of IRIS: Infrastructure and Release Information System # # Copyright (C) 2013-2015 Intel Corporation # # IRIS is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2.0 as published by the Free Software Foundat...
NeCTAR-RC/swift
refs/heads/nectar/icehouse
test/unit/common/middleware/test_acl.py
21
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
hackerkid/zulip
refs/heads/master
zerver/webhooks/slack/view.py
1
from django.http import HttpRequest from django.utils.translation import ugettext as _ from zerver.decorator import webhook_view from zerver.lib.actions import check_send_stream_message from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_error, json_success from zerver.models...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/tangible/hair/trandoshan/base/shared_hair_trandoshan_base.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/hair/trandoshan/base/shared_hair_trandoshan_base.iff" result.attrib...
zookeepr/zookeepr
refs/heads/master
zkpylons/controllers/product_category.py
5
import logging from pylons import request, response, session, tmpl_context as c from zkpylons.lib.helpers import redirect_to from pylons.decorators import validate from pylons.decorators.rest import dispatch_on from formencode import validators, htmlfill, ForEach, Invalid from formencode.variabledecode import NestedV...
WojciechMula/sse4-strstr
refs/heads/master
original/sse4_strstr-test.py
1
import sys, os, random filename = "<unspecified>" try: filename = sys.argv[1] string = open(filename, "r").read() except: print "can't open '%s'" % filename sys.exit(1) try: random.seed(int(sys.argv[3])) except: pass def time_command(command): os.system('/usr/bin/time -o /tmp/measure -f "%U" ' + command) f =...
aheadlead/PyTetris
refs/heads/master
controller.py
1
#!/usr/bin/env python # coding=utf-8 from Queue import Queue __author__ = 'weiyulan' from view import * from model import * from time import time, sleep from Queue import Queue class PyTerisController(object): framerate_limit = 10 def __init__(self, view, model): """ :type view: PyTetrisVi...
coreos/dev-util
refs/heads/master
host/lib/fdt.py
3
#!/usr/bin/python # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This library provides basic access to an fdt blob.""" import optparse import os import re import shutil import sys import cros...
KnowNo/reviewboard
refs/heads/master
reviewboard/diffviewer/management/commands/condensediffs.py
4
from __future__ import unicode_literals, division import sys from datetime import datetime, timedelta from django.conf import settings from django.contrib.humanize.templatetags.humanize import intcomma from django.core.management.base import NoArgsCommand from django.utils.translation import ugettext as _, ungettext_...
CSC301H-Fall2013/JuakStore
refs/heads/master
site-packages/django/utils/dates.py
488
"Commonly-used date structures" from django.utils.translation import ugettext_lazy as _, pgettext_lazy WEEKDAYS = { 0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'), 5:_('Saturday'), 6:_('Sunday') } WEEKDAYS_ABBR = { 0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu'), 4:_('Fri')...
alexkogon/ansible
refs/heads/devel
v1/ansible/module_utils/basic.py
81
# 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...
smartfile/django-1.4
refs/heads/master
django/db/backends/oracle/introspection.py
155
from django.db.backends import BaseDatabaseIntrospection import cx_Oracle import re foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)") class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type objects to Django Field types. data_types_re...
kmolab/kmolab.github.io
refs/heads/master
data/Brython-3.3.4/Lib/test/test_docxmlrpc.py
23
from xmlrpc.server import DocXMLRPCServer import http.client import sys from test import support threading = support.import_module('threading') import time import socket import unittest PORT = None def make_request_and_skipIf(condition, reason): # If we skip the test, we have to make a request because the # t...
tingtingths/PyPiePlayer
refs/heads/master
docker/conf/config.py
1
# configure here # sha-256, default: password #users = {"user": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"} #cert_file = "" #pkey_file = "" #PORT = 4343 #DEBUG = False # the above config doesn't matter if we run the app with uwsgi library_path = "/music" # Do no modify this x_accel_enabled = Tr...
cenobites/flask-jsonrpc
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2020, Cenobit Technologies, Inc. http://cenobit.es/ # 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 sour...
CarlosUrda/Curso-Python-DevcodeLa
refs/heads/master
3enraya/3enraya.py
1
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '3enraya.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui import re, random try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: d...
p0cisk/Quantum-GIS
refs/heads/master
python/plugins/processing/core/ProcessingLog.py
2
# -*- coding: utf-8 -*- """ *************************************************************************** ProcessingLog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
JingZhou0404/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py
124
# Copyright (C) 2010 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: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
EaseCloud/wechatpy
refs/heads/master
wechatpy/enterprise/client/api/menu.py
12
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from wechatpy.client.api.base import BaseWeChatAPI from wechatpy.exceptions import WeChatClientException class WeChatMenu(BaseWeChatAPI): def create(self, agent_id, menu_data): return self._post( 'menu/create', ...
ivelum/djangoql
refs/heads/master
test_project/core/tests/test_parser.py
1
# -*- coding: utf-8 -*- import unittest.util from unittest import TestCase from djangoql.ast import Comparison, Const, Expression, List, Logical, Name from djangoql.exceptions import DjangoQLParserError from djangoql.parser import DjangoQLParser # Show full contents in assertions when comparing long text strings uni...
drj11/pdftables
refs/heads/dev
pdftables/counter.py
3
""" Implement collections.Counter for the benefit of Python 2.6 """ from operator import itemgetter from heapq import nlargest from itertools import repeat, ifilter class Counter(dict): ''' Dict subclass for counting hashable objects. Sometimes called a bag or multiset. Elements are stored as diction...
fubaz/djheroku
refs/heads/master
djheroku/fixture.py
1
''' Test fixture for minimal Django conf ''' SECRET_KEY = 'a' DEBUG = True DATABASES = {'default': {}} ALLOWED_HOSTS = ['*'] INSTALLED_APPS = ['django.contrib.contenttypes']
gabriel-laet/graphql-py
refs/heads/master
graphql/core/validation/__init__.py
2
from . import rules as Rules from ..error import GraphQLError from ..language.ast import FragmentDefinition, FragmentSpread from ..language.visitor import Visitor, visit from ..type import GraphQLSchema from ..utils import TypeInfo specified_rules = [ Rules.UniqueOperationNames, Rules.LoneAnonymousOperation, ...
ntuecon/server
refs/heads/master
pyenv/Lib/site-packages/pip/_vendor/html5lib/treewalkers/base.py
355
from __future__ import absolute_import, division, unicode_literals from xml.dom import Node from ..constants import namespaces, voidElements, spaceCharacters __all__ = ["DOCUMENT", "DOCTYPE", "TEXT", "ELEMENT", "COMMENT", "ENTITY", "UNKNOWN", "TreeWalker", "NonRecursiveTreeWalker"] DOCUMENT = Node.DOCUMEN...
mihaip/NewsBlur
refs/heads/master
vendor/seacucumber/management/commands/ses_usage.py
20
""" Shows some usage levels and limits for the last and previous 24 hours. """ import datetime from django.core.management.base import BaseCommand from seacucumber.util import get_boto_ses_connection class Command(BaseCommand): """ This command shows some really vague usage and quota stats from SES. """ ...
jianlirong/incubator-hawq
refs/heads/master
tools/bin/gppylib/utils.py
12
# 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...
erwilan/ansible
refs/heads/devel
test/units/modules/network/vyos/test_vyos_config.py
77
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
bentwire/mbed
refs/heads/master
workspace_tools/host_tests/udp_link_layer_auto.py
124
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
pepeantena4040/MiSitioWeb
refs/heads/master
scripts/lib/wic/3rdparty/pykickstart/base.py
14
# # Chris Lumens <clumens@redhat.com> # # Copyright 2006, 2007, 2008 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # ...
supersven/intellij-community
refs/heads/master
python/testData/codeInsight/smartEnter/docTypeRType_after.py
83
def foo(a): """ <caret> @param a: @type a: @return: @rtype: """ pass def foo1(): """ :return : """
xinjiguaike/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/assetstore/__init__.py
124
""" Classes representing asset metadata. """ from datetime import datetime import dateutil.parser import pytz import json from contracts import contract, new_contract from opaque_keys.edx.keys import CourseKey, AssetKey from lxml import etree new_contract('AssetKey', AssetKey) new_contract('CourseKey', CourseKey) ne...
felipebetancur/scipy
refs/heads/master
scipy/weave/tests/test_blitz_tools.py
91
from __future__ import absolute_import, print_function import time import parser import warnings from numpy import (float32, float64, complex64, complex128, zeros, random, array) from numpy.testing import (TestCase, assert_equal, assert_allclose, run_module_suite) from ...
faun/django_test
refs/heads/master
build/lib/django/test/testcases.py
3
import re import sys from urlparse import urlsplit, urlunsplit from xml.dom.minidom import parseString, Node from django.conf import settings from django.core import mail from django.core.management import call_command from django.core.urlresolvers import clear_url_caches from django.db import transaction, connection,...
acil-bwh/SpearmintServer
refs/heads/master
SpearmintServer/wsgi.py
1
""" WSGI config for SpearmintServer project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "SpearmintServer.settings") fr...
jpopelka/atomic-reactor
refs/heads/master
atomic_reactor/plugins/post_pulp_sync.py
1
"""Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. Sync built image to pulp registry using Docker Registry HTTP API V2 Pulp authentication is via a key and certificate. Docker V2 registry authenti...
asherbender/mcl
refs/heads/master
mcl/event/test/test_event.py
1
import unittest from mcl.event.event import Event # ----------------------------------------------------------------------------- # Event() # ----------------------------------------------------------------------------- class EventTests(unittest.TestCase): def test_subscribe(s...
gorlemik/selenium
refs/heads/master
py/test/selenium/webdriver/support/color_tests.py
68
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...