repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
pferreir/indico-plugins
refs/heads/master
importer/indico_importer/util.py
2
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
dcroc16/skunk_works
refs/heads/master
google_appengine/lib/django-1.5/django/template/response.py
221
from django.http import HttpResponse from django.template import loader, Context, RequestContext from django.utils import six class ContentNotRenderedError(Exception): pass class SimpleTemplateResponse(HttpResponse): rendering_attrs = ['template_name', 'context_data', '_post_render_callbacks'] def __in...
sestrella/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_system_arp_table.py
13
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 Software Foundation, either version 3 of the Lic...
HAShihab/fathmm
refs/heads/master
cgi-bin/fathmm.py
1
#!/usr/bin/python -u import re import math import argparse import ConfigParser import MySQLdb import MySQLdb.cursors # def map_position(domain, substitution): """ """ if int(substitution[1:-1]) < int(domain['seq_begin']) or \ int(substitution[1:-1]) > int(domain['seq_end']): return...
frewsxcv/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/serve/serve.py
9
# -*- coding: utf-8 -*- from __future__ import print_function import argparse import json import os import signal import socket import sys import threading import time import traceback import urllib2 import uuid from collections import defaultdict, OrderedDict from multiprocessing import Process, Event from ..localp...
cslzchen/osf.io
refs/heads/develop
scripts/register_oauth_scopes.py
13
""" Register the list of OAuth2 scopes that can be requested by third parties. This populates the Postgres collection referenced by CAS when responding to authorization grant requests. The database class is minimal; the exact specification for what a scope contains lives in the python module from which this collection ...
Edraak/edraak-platform
refs/heads/master
openedx/core/djangoapps/embargo/tests/test_models.py
33
"""Test of models for embargo app""" import json from django.test import TestCase from django.db.utils import IntegrityError from opaque_keys.edx.locator import CourseLocator from ..models import ( EmbargoedCourse, EmbargoedState, IPFilter, RestrictedCourse, Country, CountryAccessRule, CourseAccessRuleHistory )...
sn1k/app_mundial
refs/heads/master
lib/python2.7/site-packages/django/templatetags/static.py
227
from django import template from django.template.base import Node from django.utils.encoding import iri_to_uri from django.utils.six.moves.urllib.parse import urljoin register = template.Library() class PrefixNode(template.Node): def __repr__(self): return "<PrefixNode for %r>" % self.name def __in...
simpleenergy/bughouse-ranking
refs/heads/master
bughouse/ratings/utils.py
1
import decimal def elo_chance_to_lose(player, opponent): """ Probability = 1 / (1 + (10 ^ -((White Rating - Black Rating) / 400))) """ diff = player - opponent return 1.0 / (1 + pow(10, (diff / 400.0))) def elo_chance_to_win(player, opponent): return 1 - elo_chance_to_lose(player, opponent) ...
Kri-7-q/glimpse_client-1
refs/heads/develop
3rdparty/breakpad/src/testing/scripts/generator/cpp/ast.py
209
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
probcomp/bayeslite
refs/heads/master
external/plex/dist/Plex/Transitions.py
1
# # Plex - Transition Maps # # This version represents state sets direcly as dicts # for speed. # from copy import copy import string from sys import maxint from types import TupleType class TransitionMap: """ A TransitionMap maps an input event to a set of states. An input event is one of: a range of cha...
numenta/nupic.fluent.server
refs/heads/master
utils/__init__.py
12133432
eltonsantos/django
refs/heads/master
django/contrib/staticfiles/templatetags/__init__.py
12133432
OpenData-Canarias/ckanext-feedNTI
refs/heads/master
ckanext/feedNTI/tests/__init__.py
12133432
jhawkesworth/ansible
refs/heads/devel
test/units/modules/network/opx/__init__.py
12133432
mrquim/mrquimrepo
refs/heads/master
repo/script.module.schism.common/lib/requests/__init__.py
71
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ Requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
samsu/neutron
refs/heads/master
db/migration/models/head.py
6
# Copyright (c) 2014 OpenStack Foundation. # 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...
nirmeshk/oh-mainline
refs/heads/master
vendor/packages/distribute/setuptools/__init__.py
132
"""Extensions to the 'distutils' for large or complex distributions""" from setuptools.extension import Extension, Library from setuptools.dist import Distribution, Feature, _get_unpatched import distutils.core, setuptools.command from setuptools.depends import Require from distutils.core import Command as _Command fro...
ogrisel/scipy
refs/heads/master
scipy/io/tests/test_mmio.py
40
#!/usr/bin/env python from __future__ import division, print_function, absolute_import from tempfile import mkdtemp, mktemp import os import shutil from numpy import array,transpose from numpy.testing import TestCase, run_module_suite, assert_array_almost_equal, \ assert_equal, rand import scipy.sparse fr...
matmutant/sl4a
refs/heads/master
python/src/Lib/json/tool.py
58
r"""Command-line tool to validate and pretty-print JSON Usage:: $ echo '{"json":"obj"}' | python -mjson.tool { "json": "obj" } $ echo '{ 1.2:3.4}' | python -mjson.tool Expecting property name: line 1 column 2 (char 2) """ import sys import json def main(): if len(sys.argv) == 1: ...
alokotosh/mm-master
refs/heads/master
mm/runner.py
658
import sys import os def run(): base = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ## FIXME: this is kind of crude; if we could create a fake pip ## module, then exec into it and update pip.__path__ properly, we ## wouldn't have to update sys.path: sys.path.insert(0, base) impo...
wtgme/labeldoc2vec
refs/heads/master
gensim/models/lsi_dispatcher.py
17
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: %(program)s SIZE_OF_JOBS_QUEUE Dispatcher process which orchestrates distributed LSI computations. Run this \ script onl...
nicholasserra/sentry
refs/heads/master
src/sentry/migrations/0043_auto__chg_field_option_value__chg_field_projectoption_value.py
36
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Option.value' db.alter_column('sentry_option', 'value', self.gf('picklefield.fields.PickledObjec...
cherrypy/cheroot
refs/heads/master
setup.py
1
#!/usr/bin/env python """Cheroot package setuptools installer.""" import setuptools if __name__ == '__main__': setuptools.setup(use_scm_version=True)
chuan9/chromium-crosswalk
refs/heads/master
third_party/google_appengine_cloudstorage/cloudstorage/storage_api.py
102
# Copyright 2012 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 by applicable law or ag...
abomyi/django
refs/heads/master
tests/migrations/migrations_test_apps/lookuperror_a/migrations/0003_a3.py
282
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lookuperror_c', '0002_c2'), ('lookuperror_b', '0002_b2'), ('lookuperror_a', '0002_a2'), ] operations = [ mig...
mdmirabal/Parcial2-Prog3
refs/heads/master
zona.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- Zona = { "Zona_1":["La Boca","Calzada de Amador"], "Zona_2":["San Felipe","Chorrillo","Santa Ana","Ancón"], "Zona_3":["Calidonia","San Miguel","Albrook","Altos de Diablo"], "Zona_4":["Punta Paitilla","Bella Vista","Universidad"] , "Zona_5":["Punta Pacífica","El Dorado","La...
ctn-archive/hunsberger-neco2014
refs/heads/master
scripts/__init__.py
12133432
ZompaSenior/fask
refs/heads/master
fask/src/fask_dj/task/migrations/__init__.py
12133432
xuxiao19910803/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_self_assessment.py
92
from datetime import datetime import json import unittest from mock import Mock, MagicMock from webob.multidict import MultiDict from pytz import UTC from xblock.fields import ScopeIds from xmodule.open_ended_grading_classes.self_assessment_module import SelfAssessmentModule from opaque_keys.edx.locations import Locati...
practo/federation
refs/heads/master
tests/federation_api/people/model/test_person.py
1
import pytest from sqlalchemy.exc import InvalidRequestError from config.db import db from federation_api.people.model import Person from tests.factories.person_factory import PersonFactory class TestPerson(): def test_new(self): person = Person.new(name='name', email='a@b.com') assert person.name...
skg-net/ansible
refs/heads/devel
test/units/template/test_tests_as_filters_warning.py
63
from ansible.template import Templar, display from units.mock.loader import DictDataLoader from jinja2.filters import FILTERS from os.path import isabs def test_tests_as_filters_warning(mocker): fake_loader = DictDataLoader({ "/path/to/my_file.txt": "foo\n", }) templar = Templar(loader=fake_loader...
zenieldanaku/pygpj
refs/heads/master
func/gen/__init__.py
15
# Dummy file to make this directory a package.
ashemedai/ansible
refs/heads/devel
lib/ansible/plugins/callback/jabber.py
67
# Ansible CallBack module for Jabber (XMPP) # Copyright (C) 2016 maxn nikolaev.makc@gmail.com # # This module 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 opti...
denis-pitul/django
refs/heads/master
django/contrib/messages/storage/session.py
478
import json from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import ( MessageDecoder, MessageEncoder, ) from django.utils import six class SessionStorage(BaseStorage): """ Stores messages in the session (that is, django.contrib.sessions). """ ...
jangorecki/h2o-3
refs/heads/master
h2o-py/h2o/two_dim_table.py
1
# -*- encoding: utf-8 -*- """ A two dimensional table having row and column headers. :copyright: (c) 2016 H2O.ai :license: Apache License Version 2.0 (see LICENSE for details) """ from __future__ import absolute_import, division, print_function, unicode_literals import copy from h2o.display import H2ODisplay from ...
0hoo/libearth
refs/heads/master
docs/conf.py
1
# -*- coding: utf-8 -*- # # libearth documentation build configuration file, created by # sphinx-quickstart on Sun Jun 23 04:04:29 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
sawankh/PowerKnowledge
refs/heads/master
src/dataCleanser/dsl/grammar/behaviour/readLine.py
6
#!/usr/bin/python # Title: readLine.py # Description: Contains the grammar and methods to read a specific line of a file # Author: Sawan J. Kapai Harpalani # Date: 2016-06-29 # Version: 0.1 # Usage: python readLine.py # Notes: # python_version: 2.6.6 # License: Copyright 200X Sawan J. Kapai Harpalani # This file is p...
philoL/ndnSIM2.3-sdc
refs/heads/master
.waf-tools/version.py
24
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- from waflib.Configure import conf from waflib import Utils import os def splitVersion(version): base = version.split('-')[0] split = [v for v in base.split('.')] return base, version, split @conf def getVersion(conf, submo...
ktonon/GameSoup
refs/heads/master
gamesoup/library/local_editing.py
1
''' Local editing allows developers the ability to upload and download Type.code as tar files. This module provides functions for packing and unpacking these files to and from the database. ''' import os import os.path import shutil import subprocess from django.conf import settings from gamesoup.library.models impor...
googlefonts/oss-fuzz
refs/heads/main
infra/build/functions/build_project.py
3
# Copyright 2020 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
andreparames/odoo
refs/heads/8.0
addons/sale/report/sale_report.py
37
# -*- 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...
AMOboxTV/AMOBox.LegoBuild
refs/heads/master
script.module.youtube.dl/lib/youtube_dl/extractor/ign.py
50
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, parse_iso8601, ) class IGNIE(InfoExtractor): """ Extractor for some of the IGN sites, like www.ign.com, es.ign.com de.ign.com. Some videos of it.ign.com are also supported "...
hltbra/story_parser
refs/heads/master
src/__init__.py
7
from parser import *
timm/timmnix
refs/heads/master
pypy3-v5.5.0-linux64/lib-python/3/msilib/schema.py
90
from . import Table _Validation = Table('_Validation') _Validation.add_field(1,'Table',11552) _Validation.add_field(2,'Column',11552) _Validation.add_field(3,'Nullable',3332) _Validation.add_field(4,'MinValue',4356) _Validation.add_field(5,'MaxValue',4356) _Validation.add_field(6,'KeyTable',7679) _Validation.add_field...
GeekTrainer/Flask
refs/heads/master
Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/pip/commands/search.py
344
import sys import textwrap import pip.download from pip.basecommand import Command, SUCCESS from pip.util import get_terminal_size from pip.log import logger from pip.backwardcompat import xmlrpclib, reduce, cmp from pip.exceptions import CommandError from pip.status_codes import NO_MATCHES_FOUND from pip._vendor imp...
bung87/django-js-reverse
refs/heads/development
django_js_reverse/views.py
1
# -*- coding: utf-8 -*- import re,sys from django.conf import settings from django.core import urlresolvers from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponse from django.template import loader from slimit import minify from .js_reverse_settings import (JS_EXCLUDE_NAMESPACES,...
rs2/pandas
refs/heads/master
pandas/tests/indexes/test_numeric.py
1
from datetime import datetime, timedelta import numpy as np import pytest from pandas._libs.tslibs import Timestamp import pandas as pd from pandas import Float64Index, Index, Int64Index, Series, UInt64Index import pandas._testing as tm from pandas.tests.indexes.common import Base class Numeric(Base): def test...
Morbotic/pronto-distro
refs/heads/master
externals/libbot-drc/bot2-procman/python/src/bot_procman/info2_t.py
19
"""LCM type definitions This file automatically generated by lcm. DO NOT MODIFY BY HAND!!!! """ import cStringIO as StringIO import struct import deputy_cmd2_t class info2_t(object): __slots__ = ["utime", "host", "cpu_load", "phys_mem_total_bytes", "phys_mem_free_bytes", "swap_total_bytes", "swap_free_bytes", "n...
astrodsg/django-stock-up
refs/heads/master
stock_manager/tests.py
24123
from django.test import TestCase # Create your tests here.
nrejack/redi
refs/heads/master
test/TestUpdateTimestamp.py
3
#!/usr/bin/env python # Contributors: # Christopher P. Barnes <senrabc@gmail.com> # Andrei Sura: github.com/indera # Mohan Das Katragadda <mohan.das142@gmail.com> # Philip Chase <philipbchase@gmail.com> # Ruchi Vivek Desai <ruchivdesai@gmail.com> # Taeber Rapczak <taeber@ufl.edu> # Nicholas Rejack <nrejack@ufl.edu> # ...
nazo/ansible
refs/heads/devel
test/units/modules/network/eos/test_eos_command.py
41
# (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 dis...
AOKP/external_chromium_org
refs/heads/kitkat
native_client_sdk/src/build_tools/sdk_tools/third_party/fancy_urllib/__init__.py
155
#!/usr/bin/env python # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Python Software # Foundation; All Rights Reserved """A HTTPSConnection/Handler with additional proxy and cert validation features. In particular, monkey patches in Python r74203 to provide support for CONNECT proxies and adds SSL cert va...
iut-ibk/DynaMind-UrbanSim
refs/heads/master
3rdparty/opus/src/randstad/gridcell/percent_development_type_SSS_within_walking_distance.py
2
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.variables.variable import Variable from variable_functions import my_attribute_label class percent_development_type_SSS_within_walking_distance(Variable): """There is exactl...
mrosenstihl/PulsePrograms
refs/heads/master
FID/fid_res.py
1
import math import scipy.signal import numpy from scipy.optimize import leastsq import numpy as N def lorenz(x,gamma,offs): return gamma/(numpy.pi*((x-offs)**2+gamma**2)) def gauss(x,sigma,offs): return 1/(sigma*numpy.sqrt(2*numpy.pi))*numpy.exp(-0.5*((x-offs)/sigma)**2) def voigt(p,x): return nu...
ludmilamarian/invenio
refs/heads/master
invenio/testsuite/test_manage.py
2
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any...
totalgood/twip
refs/heads/master
tweetget/settings.py
1
import os # to get your own keys: # 1. go to https://apps.twitter.com/ # 2. fill out form and hit create # 3. go to app and click "manage keys and access tokens" # 4. copy into your bashrc TWITTER_API_KEY = os.environ['TWITTER_API_KEY'] TWITTER_API_SECRET = os.environ['TWITTER_API_SECRET'] # Twitter allows 160 queri...
Arthurvdmerwe/AS2805_Python_Implementation
refs/heads/master
Shared/ASResponseCodes.py
3
__author__ = 'arthurvandermerwe' _AS2805ResponseText = { "00": "Approved or completed successfully", "01": "Refer to card issuer", "02": "Refer to card issuer, special condition", "03": "Invalid merchant", "04": "Pick-up card", "05": "Do not honor", "06": "Error", "07": "Pick-up card, s...
hoosteeno/fjord
refs/heads/master
vendor/packages/requests-2.7.0/requests/packages/urllib3/contrib/pyopenssl.py
488
'''SSL with SNI_-support for Python 2. Follow these instructions if you would like to verify SSL certificates in Python 2. Note, the default libraries do *not* do certificate checking; you need to do additional work to validate certificates yourself. This needs the following packages installed: * pyOpenSSL (tested wi...
flgiordano/netcash
refs/heads/master
+/google-cloud-sdk/lib/third_party/rsa/asn1.py
89
'''ASN.1 definitions. Not all ASN.1-handling code use these definitions, but when it does, they should be here. ''' from pyasn1.type import univ, namedtype, tag class PubKeyHeader(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('oid', univ.ObjectIdentifier()), namedtype....
bepitulaz/huntingdimana
refs/heads/master
env/Lib/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py
2800
######################## 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...
was4444/chromium.src
refs/heads/nw15
chrome/browser/web_dev_style/closure_lint_test.py
19
#!/usr/bin/env python # Copyright 2015 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 js_checker from os import path as os_path import re from sys import path as sys_path import unittest _HERE = os_path.dirname(os...
rzr/PyBitmessage
refs/heads/master
src/debug.py
11
# -*- coding: utf-8 -*- ''' Logging and debuging facility ============================= Levels: DEBUG Detailed information, typically of interest only when diagnosing problems. INFO Confirmation that things are working as expected. WARNING An indication that something unexpected happened, ...
Johanndutoit/PyCon2013AppEngineTutorial
refs/heads/master
lib/python2.7/site-packages/pip/runner.py
658
import sys import os def run(): base = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ## FIXME: this is kind of crude; if we could create a fake pip ## module, then exec into it and update pip.__path__ properly, we ## wouldn't have to update sys.path: sys.path.insert(0, base) impo...
yiwen-luo/LeetCode
refs/heads/master
Python/sudoku-solver.py
3
# Time: ((9!)^9) # Space: (1) # # Write a program to solve a Sudoku puzzle by filling the empty cells. # # Empty cells are indicated by the character '.'. # # You may assume that there will be only one unique solution. # class Solution: # @param board, a 9x9 2D array # Solve the Sudoku by modifying the inpu...
wiltonlazary/arangodb
refs/heads/devel
3rdParty/V8/V8-5.0.71.39/tools/swarming_client/third_party/pyasn1/pyasn1/type/tag.py
200
# ASN.1 types tags from operator import getitem from pyasn1 import error tagClassUniversal = 0x00 tagClassApplication = 0x40 tagClassContext = 0x80 tagClassPrivate = 0xC0 tagFormatSimple = 0x00 tagFormatConstructed = 0x20 tagCategoryImplicit = 0x01 tagCategoryExplicit = 0x02 tagCategoryUntagged = 0x04 class Tag: ...
apixandru/intellij-community
refs/heads/master
python/testData/resolve/FStringComprehensionTarget.py
31
xs = [f'{foo}' + foo for foo in range(10)] <ref>
CroceRossaItaliana/jorvik
refs/heads/master
base/migrations/0012_allegato_scadenza_popola.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.db import migrations, models from django.db.models import Q def forwards_func(apps, schema_editor): # We get the model from the versioned app registry; # if we directly import it, it'll be the wrong version Alleg...
cnsoft/kbengine-cocos2dx
refs/heads/cocos2dx-cnsoft
kbe/src/lib/python/Lib/test/cjkencodings_test.py
16
teststring = { 'big5': ( b"\xa6\x70\xa6\xf3\xa6\x62\x20\x50\x79\x74\x68\x6f\x6e\x20\xa4\xa4" b"\xa8\xcf\xa5\xce\xac\x4a\xa6\xb3\xaa\xba\x20\x43\x20\x6c\x69\x62" b"\x72\x61\x72\x79\x3f\x0a\xa1\x40\xa6\x62\xb8\xea\xb0\x54\xac\xec" b"\xa7\xde\xa7\xd6\xb3\x74\xb5\x6f\xae\x69\xaa\xba\xa4\xb5\xa4\xd1" b"\x2c\x20\xb6\x7d\xb5\...
xiangel/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/invalid_models/tests.py
57
import copy import sys from django.core.management.validation import get_validation_errors from django.db.models.loading import cache, load_app from django.test.utils import override_settings from django.utils import unittest from django.utils.six import StringIO class InvalidModelTestCase(unittest.TestCase): "...
rmboggs/django
refs/heads/master
tests/i18n/other2/locale/__init__.py
12133432
youngjeff/jobs
refs/heads/master
jobs/__init__.py
12133432
Maikflow/django_test
refs/heads/master
lib/python2.7/site-packages/Django-1.7.1-py2.7.egg/django/contrib/gis/tests/distapp/__init__.py
12133432
danrg/RGT-tool
refs/heads/master
src/RGT/XML/SVG/Filters/baseComponentTransferNode.py
1
from RGT.XML.SVG.basicSvgNode import BasicSvgNode from RGT.XML.SVG.Attribs.transferFunctionElementAttributes import TransferFunctionElementAttributes class BaseComponentTransferNode(BasicSvgNode, TransferFunctionElementAttributes): def __init__(self, ownerDoc, tagName): BasicSvgNode.__init__(self, o...
db4ple/mchf-github
refs/heads/active-devel
mchf-eclipse/support/ui/menu/ui_menu_structure_c2py.py
4
#!/usr/bin/python """ 2016-12-30 HB9ocq - extract uhsdr LCD-menu definition data from C-cource and transform to Python, showing on stdout WARNING: THIS BASES HEAVILY UPON (UN-)DISCIPLINE IN C SYNTAX ! ! ! WARNING: ANY CHANGE OF DEFINITIONS AND DECLARATIONS IN $INPUT_C_SRC POTENTIALLY BRE...
jeffwidman/ansible-modules-core
refs/heads/devel
network/netvisor/pn_vlag.py
30
#!/usr/bin/python """ PN CLI vlag-create/vlag-delete/vlag-modify """ # # 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...
Motaku/ansible
refs/heads/devel
test/units/parsing/test_mod_args.py
109
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
40423123/2017springcd_hw
refs/heads/gh-pages
plugin/liquid_tags/b64img.py
312
""" Image Tag --------- This implements a Liquid-style image tag for Pelican, based on the liquid img tag which is based on the octopress image tag [1]_ Syntax ------ {% b64img [class name(s)] [http[s]:/]/path/to/image [width [height]] [title text | "title text" ["alt text"]] %} Examples -------- {% b64img /images/ni...
fiuba08/robotframework
refs/heads/master
atest/testresources/testlibs/NamespaceUsingLibrary.py
38
from robot.libraries.BuiltIn import BuiltIn class NamespaceUsingLibrary(object): def __init__(self): self._importing_suite = BuiltIn().get_variable_value('${SUITE NAME}') self._easter = BuiltIn().get_library_instance('Easter') def get_importing_suite(self): return self._importing_suit...
Centril/sublime-autohide-sidebar
refs/heads/master
main.py
1
""" Autohide Sidebar or: sublime-autohide-sidebar A Sublime Text plugin that autohides the sidebar and shows it when the mouse hovers the edge of the editors window. Copyright (C) 2015, Mazdak Farrokhzad This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public...
jaywreddy/django
refs/heads/master
tests/view_tests/default_urls.py
405
from django.conf.urls import url from django.contrib import admin urlpatterns = [ # This is the same as in the default project template url(r'^admin/', admin.site.urls), ]
doismellburning/edx-platform
refs/heads/master
lms/djangoapps/verify_student/migrations/0003_auto__add_field_softwaresecurephotoverification_display.py
114
# -*- 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 field 'SoftwareSecurePhotoVerification.display' db.add_column('verify_student_softwaresecurephotove...
aequitas/csvkit
refs/heads/master
tests/test_utilities/test_sql2csv.py
21
#!/usr/bin/env python import six try: import unittest2 as unittest except ImportError: import unittest import os from csvkit.utilities.sql2csv import SQL2CSV from csvkit.utilities.csvsql import CSVSQL from tests.utils import stdin_as_string class TestSQL2CSV(unittest.TestCase): def setUp(self): ...
dursk/django
refs/heads/master
django/db/migrations/autodetector.py
140
from __future__ import unicode_literals import datetime import re from itertools import chain from django.conf import settings from django.db import models from django.db.migrations import operations from django.db.migrations.migration import Migration from django.db.migrations.operations.models import AlterModelOpti...
liorvh/golismero
refs/heads/master
thirdparty_libs/django/conf/locale/fa/formats.py
234
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # 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 = 'G:i:s' DATE...
poeschlr/kicad-3d-models-in-freecad
refs/heads/master
cadquery/FCAD_script_generator/molex/cq_models/conn_molex_kk_6410.py
1
# -*- coding: utf8 -*- #!/usr/bin/python # # CadQuery script returning Molex KK 6410 Connectors ## requirements ## freecad (v1.5 and v1.6 have been tested) ## cadquery FreeCAD plugin (v0.3.0 and v0.2.0 have been tested) ## https://github.com/jmwright/cadquery-freecad-module ## This script can be run from within the...
axbaretto/beam
refs/heads/master
sdks/python/.tox/lint/lib/python2.7/site-packages/hamcrest/library/text/stringendswith.py
6
from hamcrest.library.text.substringmatcher import SubstringMatcher from hamcrest.core.helpers.hasmethod import hasmethod __author__ = "Jon Reid" __copyright__ = "Copyright 2011 hamcrest.org" __license__ = "BSD, see License.txt" class StringEndsWith(SubstringMatcher): def __init__(self, substring): supe...
fmaguire/BayeHem
refs/heads/master
bayehem/rsem/detonate-1.11/ref-eval/boost/tools/build/v2/test/core_import_module.py
45
#!/usr/bin/python # Copyright 2003 Vladimir Prus # 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) import BoostBuild t = BoostBuild.Tester(pass_toolset=0) t.write("code", """\ module a { rule r1 ( ) { ...
codenote/chromium-test
refs/heads/master
chrome/test/pyautolib/chromeos/__init__.py
12133432
moshele/networking-mlnx
refs/heads/master
neutron/tests/unit/ml2/drivers/__init__.py
12133432
vsajip/django
refs/heads/django3
tests/regressiontests/one_to_one_regress/models.py
9
from __future__ import unicode_literals from django.db import models class Place(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=80) def __unicode__(self): return "%s the place" % self.name class Restaurant(models.Model): place = models.OneToOneFi...
wilvk/ansible
refs/heads/devel
lib/ansible/modules/cloud/linode/linode.py
41
#!/usr/bin/python # Copyright: Ansible Project # 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'], ...
SpaceKatt/CSPLN
refs/heads/master
apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/gluon/contrib/plural_rules/sl.py
44
#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for sl (Slovenian) nplurals=4 # Slovenian language has 4 forms: # 1 singular and 3 plurals # Determine plural_id for number *n* as sequence of positive # integers: 0,1,... # NOTE! For singular form ALWAYS return plural_id = 0 get_plural_id = lambd...
compiteing/flask-ponypermission
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/distlib/__init__.py
203
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2014 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import logging __version__ = '0.2.0' class DistlibException(Exception): pass try: from logging import NullHandler except Impor...
hip-odoo/odoo
refs/heads/10.0
addons/website_hr_recruitment/controllers/__init__.py
7372
import main
noelbk/neutron-juniper
refs/heads/master
neutron/plugins/embrane/l2base/fake/fake_l2_plugin.py
20
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Embrane, 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/l...
ChameleonCloud/horizon
refs/heads/chameleoncloud/train
openstack_dashboard/api/__init__.py
4
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # Copyright 2013 Big Switch Networks # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use th...
leotrubach/sourceforge-allura
refs/heads/dev
ForgeSVN/forgesvn/model/svn.py
1
import os import shutil import string import logging import subprocess from subprocess import Popen, PIPE from hashlib import sha1 from cStringIO import StringIO from datetime import datetime import tg import pysvn import pylons pylons.c = pylons.tmpl_context pylons.g = pylons.app_globals from pymongo.errors import Du...
robwarm/gpaw-symm
refs/heads/master
doc/tutorials/hubbardu/n.py
1
from ase import Atoms from gpaw import GPAW n = Atoms('N', magmoms=[3]) n.center(vacuum=3.5) # Calculation with no +U correction: n.calc = GPAW(mode='lcao', basis='dzp', txt='no_u.txt', xc='PBE') e1 = n.get_potential_energy() # Calculation with a correction U=6 eV normalized...
doduytrung/odoo-8.0
refs/heads/master
addons/hr_attendance/wizard/hr_attendance_error.py
377
# -*- 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...