repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
shuttlesworthNEO/HashHacks2.0-methOD
refs/heads/master
backend/hashhacks2/hashhacks2/urls.py
1
"""hashhacks2 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
djpnewton/bitcoin
refs/heads/master
qa/rpc-tests/test_framework/script.py
93
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # script.py # # This file is modified from python-bitcoinlib. # """Scripts Functionality to build scr...
aavilahe/coevo_analysis_pypackage
refs/heads/dev
bin/map_column_to_resnum.py
1
#!/usr/bin/env python ''' map_column_to_resnum.py --- map alignment column to resnum in PDB chain Creates a mapping from alignment column numberings to residue numbers (resnums) in a specified PDB chain. Example: chain A in 3DGE starts at resnum 246, but a corresponding alignment may cover discontinuo...
VinnieJohns/ggrc-core
refs/heads/develop
test/unit/ggrc_workflows/models/test_workflow.py
7
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Unit Tests for Workflow model and WorkflowState mixin """ from datetime import date import unittest from freezegun import freeze_time from ggrc_workflows.models import cycle_task_group_object_task as c...
ctsit/qipr_approver
refs/heads/master
qipr_approver/approver/workflows/user_crud.py
2
from approver.models import Person, Descriptor, Speciality, QI_Interest, Suffix, Address, Organization, ClinicalArea, Self_Classification, ClinicalDepartment from approver.constants import SESSION_VARS, ADDRESS_TYPE from approver.utils import extract_tags, update_tags, true_false_to_bool, extract_model from django.con...
yd0str/infernal-twin
refs/heads/master
build/reportlab/src/reportlab/pdfbase/_fontdata_widths_helveticabold.py
112
widths = {'A': 722, 'AE': 1000, 'Aacute': 722, 'Acircumflex': 722, 'Adieresis': 722, 'Agrave': 722, 'Aring': 722, 'Atilde': 722, 'B': 722, 'C': 722, 'Ccedilla': 722, 'D': 722, 'E': 667, 'Eacute': 667, 'Ecircumflex': 667, 'Edieresis': 667, 'Egrave': 667, 'Eth': 722, 'Euro': 556, 'F': 611, 'G': 778, ...
AsymmetricVentures/asym-utils
refs/heads/master
asymmetricbase/middleware/__init__.py
22
# -*- coding: utf-8 -*- # Asymmetric Base Framework - A collection of utilities for django frameworks # Copyright (C) 2013 Asymmetric Ventures Inc. # # 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 S...
panorama9/sublime-text-i18n-rails
refs/heads/master
pyyaml/parser.py
210
# The following YAML grammar is LL(1) and is parsed by a recursive descent # parser. # # stream ::= STREAM-START implicit_document? explicit_document* STREAM-END # implicit_document ::= block_node DOCUMENT-END* # explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* # block_node_or_inden...
AsgerPetersen/QGIS
refs/heads/master
python/ext-libs/future/libfuturize/fixes/fix_print_with_import.py
61
""" For the ``future`` package. Turns any print statements into functions and adds this import line: from __future__ import print_function at the top to retain compatibility with Python 2.6+. """ from libfuturize.fixes.fix_print import FixPrint from libfuturize.fixer_util import future_import class FixPrintWit...
qgis/QGIS
refs/heads/master
python/utils.py
11
# -*- coding: utf-8 -*- """ *************************************************************************** utils.py --------------------- Date : November 2009 Copyright : (C) 2009 by Martin Dobias Email : wonder dot sk at gmail dot com ************************...
tejesh95/Zubio.in
refs/heads/master
zubio/allauth/socialaccount/providers/linkedin_oauth2/models.py
4209
# Create your models here.
bartsidee/bartsidee-boxee
refs/heads/master
sources/music/external/Linux/pysqlite2/__init__.py
38
#-*- coding: ISO-8859-1 -*- # pysqlite2/__init__.py: the pysqlite2 package. # # Copyright (C) 2005 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages # arising f...
ctoher/pymatgen
refs/heads/master
dev_scripts/clean_test_files.py
20
#!/usr/bin/env python import os to_delete = [] for parent, subdir, files in os.walk("../test_files"): for fn in files: found = None for p, s, t in os.walk("../pymatgen"): for fn2 in t: if p.endswith("tests"): with open(os.path.join(p, fn2)) as f: ...
kanagasabapathi/python-for-android
refs/heads/master
python3-alpha/extra_modules/gdata/health/service.py
263
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
krisys/django
refs/heads/master
tests/model_fields/test_textfield.py
28
from django.db import models from django.test import TestCase from .models import Post class TextFieldTests(TestCase): def test_max_length_passed_to_formfield(self): """ TextField passes its max_length attribute to form fields created using their formfield() method. """ t...
aayush2911/Fibonaccio
refs/heads/master
web2py/gluon/packages/dal/pydal/adapters/oracle.py
10
# -*- coding: utf-8 -*- import base64 import datetime import re from .._globals import IDENTITY from ..drivers import cx_Oracle from .base import BaseAdapter class OracleAdapter(BaseAdapter): drivers = ('cx_Oracle',) commit_on_alter_table = False types = { 'boolean': 'CHAR(1)', 'string':...
wllmtrng/ggplot
refs/heads/master
ggplot/components/smoothers.py
12
from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from pandas.lib import Timestamp import pandas as pd import statsmodels.api as sm from statsmodels.nonparametric.smoothers_lowess import lowess as smlowess from statsmodels.sandbox.regression....
motivator/clusto
refs/heads/master
contrib/diggext/drivers/devices/common/__init__.py
6
from snmpmixin import *
mezz64/home-assistant
refs/heads/dev
script/scaffold/templates/config_flow_discovery/integration/__init__.py
32
"""The NEW_NAME integration.""" import asyncio import voluptuous as vol from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from .const import DOMAIN CONFIG_SCHEMA = vol.Schema({DOMAIN: vol.Schema({})}, extra=vol.ALLOW_EXTRA) # TODO List the platforms that you want to ...
dlopes7/muhcore
refs/heads/master
battlenet3/build/lib/battlenet/enums.py
3
RACE = { 1: 'Human', 2: 'Orc', 3: 'Dwarf', 4: 'Night Elf', 5: 'Undead', 6: 'Tauren', 7: 'Gnome', 8: 'Troll', 9: 'Goblin', 10: 'Blood Elf', 11: 'Draenei', 22: 'Worgen', 24: 'Pandaren', 25: 'Pandaren', 26: 'Pandaren', } CLASS = { 1: 'Warrior', 2: 'Palad...
toshywoshy/ansible
refs/heads/devel
test/units/modules/network/ios/test_ios_vlan.py
21
# (c) 2018 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 dis...
xavfernandez/packaging
refs/heads/master
docs/conf.py
3
# -*- coding: utf-8 -*- # Copyright 2014 Donald Stufft # # 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...
naparuba/opsbro
refs/heads/master
data/global-configuration/packs/websocket/module/wsocket.py
2
from __future__ import print_function import json from opsbro.misc.websocketserver import WebSocket, SimpleWebSocketServer from opsbro.log import LoggerFactory # Global logger for this part logger = LoggerFactory.create_logger('websocket') class WebExporter(WebSocket): def handleMessage(self): if self.da...
szimszon/filecatalog
refs/heads/master
gluon/contrib/simplejsonrpc.py
7
# -*- coding: utf-8 -*- # This program 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, or (at your option) any later # version. # # This program is distributed in the hope that it will...
joshmoore/zeroc-ice
refs/heads/master
py/test/Ice/custom/Server.py
1
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************************************...
Reagankm/KnockKnock
refs/heads/master
venv/lib/python3.4/site-packages/mpl_toolkits/mplot3d/art3d.py
8
#!/usr/bin/python # art3d.py, original mplot3d version by John Porter # Parts rewritten by Reinier Heeres <reinier@heeres.eu> # Minor additions by Ben Axelrod <baxelrod@coroware.com> ''' Module containing 3D artist code and functions to convert 2D artists into 3D versions which can be added to an Axes3D. ''' from __fu...
JorgeCoock/django
refs/heads/master
django/contrib/messages/api.py
512
from django.contrib.messages import constants from django.contrib.messages.storage import default_storage from django.http import HttpRequest __all__ = ( 'add_message', 'get_messages', 'get_level', 'set_level', 'debug', 'info', 'success', 'warning', 'error', 'MessageFailure', ) class MessageFailure(E...
JNRowe/rdial
refs/heads/main
rdial/cmdline.py
1
# """cmdline - Command line functionality for rdial.""" # Copyright © 2012-2019 James Rowe <jnrowe@gmail.com> # Nathan McGregor <nathan.mcgregor@astrium.eads.net> # Rach Holmes <rach.c.holmes@gmail.com> # # SPDX-License-Identifier: GPL-3.0+ # # This file is part of rdial. ...
spblightadv/rethinkdb
refs/heads/next
external/v8_3.30.33.16/test/cctest/testcfg.py
74
# Copyright 2008 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
dcosentino/edx-platform
refs/heads/master
common/test/data/uploads/python_lib_zip/sub/submodule.py
223
HELLO = "world"
kthordarson/CouchPotatoServer
refs/heads/master
libs/suds/mx/literal.py
179
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 in the hope that it will ...
MwanzanFelipe/rockletonfortune
refs/heads/master
lib/django/contrib/gis/db/backends/oracle/schema.py
608
from django.contrib.gis.db.models.fields import GeometryField from django.db.backends.oracle.schema import DatabaseSchemaEditor from django.db.backends.utils import truncate_name class OracleGISSchemaEditor(DatabaseSchemaEditor): sql_add_geometry_metadata = (""" INSERT INTO USER_SDO_GEOM_METADATA ...
tedelhourani/ansible
refs/heads/devel
test/units/utils/test_shlex.py
197
# (c) 2015, Marius Gedminas <marius@gedmin.as> # # 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 vers...
pong3489/TEST_Mission
refs/heads/master
Lib/site-packages/scipy/lib/blas/info.py
62
""" Wrappers to BLAS library ======================== fblas -- wrappers for Fortran [*] BLAS routines cblas -- wrappers for ATLAS BLAS routines get_blas_funcs -- query for wrapper functions. [*] If ATLAS libraries are available then Fortran routines actually use ATLAS routines and should perform equally well ...
rosswhitfield/mantid
refs/heads/master
qt/python/mantidqt/widgets/instrumentview/presenter.py
3
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2017 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # T...
yamateh/robotframework
refs/heads/master
src/robot/result/keywordremover.py
1
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # 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...
unfoldingWord-dev/uwadmin
refs/heads/master
uwadmin/__init__.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import __about__ = """ In addition to what is provided by the "zero" project, this project provides thorough integration with django-user-accounts, adding comprehensive account management functionality. It is a foundation suitable for most sites that have user ac...
archen/django
refs/heads/master
django/db/migrations/graph.py
12
from django.utils.datastructures import OrderedSet from django.db.migrations.state import ProjectState class MigrationGraph(object): """ Represents the digraph of all migrations in a project. Each migration is a node, and each dependency is an edge. There are no implicit dependencies between numbered...
ayepezv/GAD_ERP
refs/heads/master
addons/mail/models/ir_actions.py
22
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, fields, models from odoo.exceptions import UserError class ServerActions(models.Model): """ Add email option in server actions. """ _name = 'ir.actions.server' _inherit = ['ir.actio...
jylaxp/django
refs/heads/master
django/utils/module_loading.py
320
import copy import os import sys from importlib import import_module from django.utils import six def import_string(dotted_path): """ Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed. """ try: module...
radlab/sparrow
refs/heads/master
deploy/third_party/boto-2.1.1/boto/s3/bucketlistresultset.py
4
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
xxsergzzxx/python-for-android
refs/heads/master
python-modules/twisted/twisted/enterprise/adbapi.py
49
# -*- test-case-name: twisted.test.test_adbapi -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ An asynchronous mapping to U{DB-API 2.0<http://www.python.org/topics/database/DatabaseAPI-2.0.html>}. """ import sys from twisted.internet import threads from twisted.python import...
dfang/odoo
refs/heads/10.0
addons/crm/wizard/crm_lead_to_opportunity.py
11
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.exceptions import UserError from odoo.tools.translate import _ class Lead2OpportunityPartner(models.TransientModel): _name = 'crm.lead2opportunity.partner' _descr...
briancoutinho0905/2dsampling
refs/heads/master
src/mem/ruby/slicc_interface/Controller.py
39
# Copyright (c) 2009 Advanced Micro Devices, 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 of conditions...
YuriGural/erpnext
refs/heads/master
erpnext/patches/v5_0/update_account_types.py
120
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): for company in frappe.db.get_all("Company"): company = frappe.get_doc("Company", company.name) match_types = ("Stock...
redhat-cip/horizon
refs/heads/master
openstack_dashboard/dashboards/identity/groups/tables.py
53
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 requir...
UFOCoins/ufo
refs/heads/master-0.15
test/functional/multi_rpc.py
10
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiple RPC users.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
lithiumcoin/lithium
refs/heads/master
contrib/testgen/base58.py
2139
''' Bitcoin base58 encoding and decoding. Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain) ''' import hashlib # for compatibility with following code... class SHA256: new = hashlib.sha256 if str != bytes: # Python 3.x def ord(c): return c def chr(n): return byte...
Lokke/eden
refs/heads/master
tests/dbmigration/test_migrations.py
33
# Tests for each migrations made in the migration_scripts file # has been made in order to call the tests just run the this script # using # cd web2py # python web2py.py -S eden -R applications/eden/tests/dbmigration/test_migrations.py # # Choose from the menu whatever migration methods you want to test, s3migratio...
pas256/troposphere
refs/heads/master
troposphere/ses.py
3
# Copyright (c) 2012-2018, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .validators import boolean class DimensionConfiguration(AWSProperty): props = { 'DefaultDimensionValue': (basestring, True), 'DimensionName'...
saurabh6790/trufil_lib
refs/heads/master
core/doctype/defaultvalue/defaultvalue.py
34
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes class DocType: def __init__(self, d, dl): self.doc, self.doclist = d, dl def on_doctype_update(): if not webnotes.conn.sql("""show index from `tabDefaul...
watchduck/full_octahedral_group
refs/heads/master
projects/p01_cube_permutation_vector_graphics/app.py
1
from bottle import template from os import system from utils.functions import position_to_permutation_properties system('mkdir FILES') def create_file(row, col): context = position_to_permutation_properties(row, col) t = template('main', context) filename = 'FILES/cube_permutation_{row}_{col}.svg'.format...
Chronister/ananas
refs/heads/master
ananas/default/__init__.py
1
__all__ = ["roll", "tracery"] from .roll import DiceBot from .tracery import TraceryBot from .announce import AnnounceBot
hoogenm/compose
refs/heads/master
compose/timeparse.py
13
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' timeparse.py (c) Will Roberts <wildwilhelm@gmail.com> 1 February, 2014 This is a vendored and modified copy of: github.com/wroberts/pytimeparse @ cc0550d It has been modified to mimic the behaviour of https://golang.org/pkg/time/#ParseDuration ''' # MIT LICENSE # # P...
dashea/pykickstart
refs/heads/master
pykickstart/commands/volgroup.py
7
# # Chris Lumens <clumens@redhat.com> # # Copyright 2005, 2006, 2007, 2012, 2013 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 hop...
hectord/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/contrib/gis/geos/prototypes/geom.py
311
from ctypes import c_char_p, c_int, c_size_t, c_ubyte, c_uint, POINTER from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR, PREPGEOM_PTR, GEOS_PREPARE from django.contrib.gis.geos.prototypes.errcheck import \ check_geom, check_minus_one, check_sized_string, check_string, check_zero from django.contrib.gis....
betoesquivel/fil2014
refs/heads/master
build/django/django/views/generic/edit.py
106
import warnings from django.forms import models as model_forms from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseRedirect from django.utils.encoding import force_text from django.views.generic.base import TemplateResponseMixin, ContextMixin, View from django.views.generic.deta...
frankyrumple/ope
refs/heads/master
admin_app/gluon/tests/test_fileutils.py
7
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import datetime from fix_path import fix_sys_path fix_sys_path(__file__) from fileutils import parse_version class TestFileUtils(unittest.TestCase): def test_parse_version(self): # Legacy rtn = parse_version('Version 1.99.0 (2011-09...
syphar/django
refs/heads/master
django/db/utils.py
143
import os import pkgutil from importlib import import_module from threading import local from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils._os import npath, upath from django.utils.functional import cached_property from django.utils....
wiliamsouza/hystrix-py
refs/heads/master
tests/utils.py
1
from atomos.multiprocessing.atomic import AtomicFloat class MockedTime(): def __init__(self): self._time = AtomicFloat(value=0) def current_time_in_millis(self): return self._time.get() def increment(self, millis): return self._time.add_and_get(millis)
ychfan/tensorflow
refs/heads/master
tensorflow/contrib/kfac/python/ops/utils.py
4
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
lablup/sorna-common
refs/heads/20.03
src/ai/backend/common/etcd.py
1
''' An asynchronous client wrapper for etcd v3 API. It uses the etcd3 library using a thread pool executor. We plan to migrate to aioetcd3 library but it requires more work to get maturity. Fortunately, etcd3's watchers are not blocking because they are implemented using callbacks in separate threads. ''' import asyn...
PennartLoettring/Poettrix
refs/heads/master
rootfs/usr/lib/python3.4/encodings/cp949.py
816
# # cp949.py: Python Unicode Codec for CP949 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_kr, codecs import _multibytecodec as mbc codec = _codecs_kr.getcodec('cp949') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrement...
rosudrag/Freemium-winner
refs/heads/master
VirtualEnvironment/Lib/site-packages/coverage/data.py
27
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Coverage data for coverage.py.""" import glob import json import optparse import os import os.path import random import re import socket from coverage import e...
BorisJeremic/Real-ESSI-Examples
refs/heads/master
analytic_solution/test_cases/8NodeBrick/cantilever_different_Poisson/NumberOfDivision2/PoissonRatio0.35/extract_numerical_solution.py
441
#!/usr/bin/python import h5py import sys import numpy as np import os import re import random # find the path to my own python function: cur_dir=os.getcwd() sep='test_cases' test_DIR=cur_dir.split(sep,1)[0] scriptDIR=test_DIR+'compare_function' sys.path.append(scriptDIR) # import my own function for color and comparat...
gchp/django
refs/heads/master
tests/timezones/forms.py
581
from django import forms from .models import Event class EventForm(forms.Form): dt = forms.DateTimeField() class EventSplitForm(forms.Form): dt = forms.SplitDateTimeField() class EventLocalizedForm(forms.Form): dt = forms.DateTimeField(localize=True) class EventModelForm(forms.ModelForm): class...
igemsoftware/SYSU-Software2013
refs/heads/master
project/Python27/Lib/site-packages/win32/lib/netbios.py
17
import sys import win32wnet import struct # Constants generated by h2py from nb30.h NCBNAMSZ = 16 MAX_LANA = 254 NAME_FLAGS_MASK = 0x87 GROUP_NAME = 0x80 UNIQUE_NAME = 0x00 REGISTERING = 0x00 REGISTERED = 0x04 DEREGISTERED = 0x05 DUPLICATE = 0x06 DUPLICATE_DEREG = 0x07 LISTEN_OUTSTANDING = 0x01 CALL_PENDING = 0x02 SES...
hslee16/ansible-modules-extras
refs/heads/devel
cloud/amazon/sts_assume_role.py
60
#!/usr/bin/python # 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 distributed...
bentilly/heroes
refs/heads/development
lib/flask/testsuite/testing.py
561
# -*- coding: utf-8 -*- """ flask.testsuite.testing ~~~~~~~~~~~~~~~~~~~~~~~ Test client and more. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import flask import unittest from flask.testsuite import FlaskTestCase from flask._compat import text_type c...
hpandeycodeit/incubator-madlib
refs/heads/master
src/madpack/configyml.py
14
# # Routines to pull information out of YML config files: # - config/Version.yml # - config/Ports.yml # - config/Modules.yml # import yaml import re import subprocess from itertools import chain ## # A Python exception class for our use ## class MadPackConfigError(Exception): def __init__(self, value): ...
xbmc/atv2
refs/heads/atv2
xbmc/lib/libPython/Python/Lib/idlelib/FileList.py
15
import os from Tkinter import * import tkMessageBox class FileList: from EditorWindow import EditorWindow # class variable, may be overridden # e.g. by PyShellFileList def __init__(self, root): self.root = root self.dict = {} self.inversedi...
GeoffreyFrogeye/syncthing-gtk
refs/heads/master
build_windows.py
1
#!/c/Python27/python.exe """ Do './build_windows.py build' to build exe, then call 'makensis syncthing-gtk.nsis' to create instalation package. """ import os, site, sys, shutil, re from cx_Freeze import setup, Executable from cx_Freeze.freezer import Freezer, VersionInfo from win32verstamp import stamp from setup impo...
diogo149/treeano
refs/heads/master
treeano/sandbox/nodes/norm_stabilizer.py
1
""" from http://arxiv.org/abs/1511.08400 """ import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn fX = theano.config.floatX @treeano.register_node("feed_forward_norm_stabilizer") class FeedForwardNormStabilizerNode(treeano.NodeImpl): hyperparameter_names = ("cos...
ray-project/ray
refs/heads/master
rllib/models/torch/modules/relative_multi_head_attention.py
1
from typing import Union from ray.rllib.utils.framework import try_import_torch from ray.rllib.models.torch.misc import SlimFC from ray.rllib.utils.torch_ops import sequence_mask from ray.rllib.utils.typing import TensorType torch, nn = try_import_torch() class RelativePositionEmbedding(nn.Module): """Creates a...
ceremcem/zerorpc-python
refs/heads/master
tests/test_client_async.py
18
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2015 François-Xavier Bourlet (bombela+zerorpc@gmail.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files...
holmes/intellij-community
refs/heads/master
python/testData/psi/LongString.py
83
a = """""" b = """ "1.0" encoding="ascii"? """ str = re.sub(r"""\\\\""", r"""&#92;""", str)
eliseuegewarth/sibaho
refs/heads/master
empregado/migrations/0003_auto_20170130_1741.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-30 19:41 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('empregado', '0002_auto_20170130_1740'), ] operations = [ migrations.AlterFi...
regispl/cassandra
refs/heads/trunk
pylib/cqlshlib/tracing.py
86
# 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...
kouaw/CouchPotatoServer
refs/heads/develop
libs/requests/packages/charade/euckrprober.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
rahul67/hue
refs/heads/master
desktop/core/ext-py/pyasn1-0.1.8/pyasn1/codec/der/decoder.py
170
# DER decoder from pyasn1.codec.cer import decoder tagMap = decoder.tagMap typeMap = decoder.typeMap class Decoder(decoder.Decoder): supportIndefLength = False decode = Decoder(tagMap, typeMap)
lightcode/SeriesWatcher
refs/heads/master
serieswatcher/sqlobject/tests/test_new_joins.py
11
from sqlobject import * from sqlobject.tests.dbtest import * ######################################## ## Joins ######################################## class PersonJoinerNew(SQLObject): name = StringCol(length=40, alternateID=True) addressJoiners = ManyToMany('AddressJoinerNew') class AddressJoinerNew(SQLOb...
skg-net/ansible
refs/heads/devel
lib/ansible/modules/cloud/ovirt/ovirt_template.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # 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'} DOCUME...
jdpage/caesura
refs/heads/master
tests/caesura_client_tests.py
1
from nose.tools import * from caesura.client.async_client import CaesuraClient from caesura.server import CaesuraServer import asyncio PORT = 8889 loop = asyncio.get_event_loop() @nottest def aio_test(f): @make_decorator(f) def test_aio_wrapped(): return loop.run_until_complete(f()) return test_a...
bricksfx/gd_virtual_shell
refs/heads/master
python/tsTclnt.py
1
#!/usr/bin/env python from socket import * Host = 'localhost' Port = 10086 Bufsiz = 8192 addr = (Host, Port) tcpCliSock = socket(AF_INET, SOCK_STREAM) tcpCliSock.connect(addr) print 'connect succeed' while True: headout = tcpCliSock.recv(Bufsiz) print headout, command_in = raw_input("") tcpCliSock.se...
rscalzo/pyBoloSN
refs/heads/master
Stritzinger06/__init__.py
1
from .Stritzinger06 import Stritz06_MCMC __all__ = ['Stritz06_MCMC']
tsdmgz/ansible
refs/heads/devel
lib/ansible/plugins/terminal/iosxr.py
49
# # (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...
wonder-sk/QGIS
refs/heads/master
python/plugins/processing/core/SilentProgress.py
5
# -*- coding: utf-8 -*- """ *************************************************************************** SilentProgress.py --------------------- Date : April 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com *************************...
MattsFleaMarket/python-for-android
refs/heads/master
python-modules/twisted/twisted/web/microdom.py
53
# -*- test-case-name: twisted.web.test.test_xml -*- # Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Micro Document Object Model: a partial DOM implementation with SUX. This is an implementation of what we consider to be the useful subset of the DOM. The chief advantage of this l...
kopiro/titanium_mobile
refs/heads/master
support/common/mako/ext/pygmentplugin.py
42
import re try: set except NameError: from sets import Set as set from pygments.lexers.web import \ HtmlLexer, XmlLexer, JavascriptLexer, CssLexer from pygments.lexers.agile import PythonLexer from pygments.lexer import Lexer, DelegatingLexer, RegexLexer, bygroups, \ include, using, this from pygments...
FNST-OpenStack/horizon
refs/heads/master
horizon/templatetags/parse_date.py
75
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
jazzmes/ryu
refs/heads/master
ryu/lib/snortlib.py
9
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
Star2Billing/pow2wow
refs/heads/master
pow2wow/voip_res/py-asterisk/Asterisk/CLI.py
4
#!/usr/bin/env python ''' Asterisk/CLI.py: Command-line wrapper around the Asterisk Manager API. ''' __author__ = 'David M. Wilson <dw@autosols.com>' __id__ = '$Id$' import sys, os, inspect from Asterisk import Manager, BaseException, Config import Asterisk.Util class ArgumentsError(BaseException): _prefix =...
dmarteau/QGIS
refs/heads/master
tests/src/python/test_qgsrasterbandcombobox.py
43
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsRasterBandComboBox. .. note:: 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 option) any later version....
PennPanda/xen
refs/heads/rt-xen_2.1
tools/python/scripts/test_vm_create.py
40
#!/usr/bin/python vm_cfg = { 'name_label': 'APIVM', 'user_version': 1, 'is_a_template': False, 'auto_power_on': False, # TODO 'memory_static_min': 64, 'memory_static_max': 128, #'memory_dynamic_min': 64, #'memory_dynamic_max': 128, 'VCPUs_policy': 'credit', 'VCPUs...
benchmeeting/booking
refs/heads/master
db_repository/fixtures.py
1
from app import db from app.models import Item, Reservation from copy import deepcopy import datetime db.create_all() item = Item() db.session.add(item) db.session.add(deepcopy(item)) db.session.add(deepcopy(item)) db.session.commit() res = Reservation(item_id=item.id, date=datetime.datetime.now()...
Eficent/account-invoice-reporting
refs/heads/8.0
__unported__/invoice_print_report_balance_payment/report/__init__.py
11
# -*- encoding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it un...
cgar/servo
refs/heads/master
tests/wpt/css-tests/tools/pytest/_pytest/mark.py
168
""" generic mechanism for marking and selecting python functions. """ import inspect class MarkerError(Exception): """Error in use of a pytest marker/attribute.""" def pytest_namespace(): return {'mark': MarkGenerator()} def pytest_addoption(parser): group = parser.getgroup("general") group._addo...
Elbagoury/odoo
refs/heads/8.0
addons/l10n_th/__init__.py
893
# -*- 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...
Jumpscale/jumpscale_core8
refs/heads/master
lib/JumpScale/tools/cuisine/apps/CuisineBrotli.py
1
from JumpScale import j app = j.tools.cuisine._getBaseAppClass() class CuisineBrotli(app): NAME = 'bro' def build(self, reset=False): if reset is False and self.isInstalled(): return sudo = 'sudo' if self._cuisine.core.isMac: sudo = '' C = """ ...
XiaodunServerGroup/ddyedx
refs/heads/master
common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py
27
import copy from xblock.fields import Scope from collections import namedtuple from xblock.exceptions import InvalidScopeError from .definition_lazy_loader import DefinitionLazyLoader from xmodule.modulestore.inheritance import InheritanceKeyValueStore # id is a BlockUsageLocator, def_id is the definition's guid Split...