repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
zdary/intellij-community
refs/heads/master
python/testData/resolve/ModuleToBuiltins.py
83
import re re.set # <ref>
EternalDeiwos/Hivemind
refs/heads/master
website/views.py
6445
from django.shortcuts import render # Create your views here.
ojake/django
refs/heads/master
tests/admin_scripts/custom_templates/project_template/manage.py
738
# The manage.py of the {{ project_name }} test project # template context: project_name = '{{ project_name }}' project_directory = '{{ project_directory }}' secret_key = '{{ secret_key }}'
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/loot/loot_schematic/streetlamp_schematic.py
85615
import sys def setup(core, object): return
JacobCallahan/CloudBot
refs/heads/master
plugins/foods.py
11
import codecs import json import os import random import asyncio import re from cloudbot import hook from cloudbot.util import textgen nick_re = re.compile("^[A-Za-z0-9_|.\-\]\[\{\}]*$", re.I) cakes = ['Chocolate', 'Ice Cream', 'Angel', 'Boston Cream', 'Birthday', 'Bundt', 'Carrot', 'Coffee', 'Devils', 'Fruit', ...
yank555-lu/Shamu-3.10-lollipop
refs/heads/3.10-m-preview-SlimLP
scripts/build-all.py
236
#! /usr/bin/env python # Copyright (c) 2009-2014, The Linux Foundation. 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 # ...
wuhengzhi/chromium-crosswalk
refs/heads/master
tools/perf/page_sets/page_cycler/intl2.py
22
# Copyright 2014 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. from telemetry.page import page as page_module from telemetry import story class Intl2Page(page_module.Page): def __init__(self, url, page_set): super...
miguelparaiso/PracticaOdoo
refs/heads/master
openerp/addons/base/module/__init__.py
462
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
jimi-c/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py
17
#!/usr/bin/python # # This is a free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This Ansible library is distributed in the hope that i...
martinwicke/tensorflow
refs/heads/master
tensorflow/python/training/supervisor.py
10
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
brandond/ansible
refs/heads/devel
lib/ansible/template/native_helpers.py
44
# Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ast import literal_eval from itertools import islice, chain i...
BeritJanssen/MelodicOccurrences
refs/heads/master
input_output.py
1
""" Copyright 2015, Berit Janssen. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is dis...
mmilkin/cchaser
refs/heads/master
migrations/versions/33c12dd6c4ef_.py
1
"""empty message Revision ID: 33c12dd6c4ef Revises: None Create Date: 2014-01-21 00:17:32.826556 """ # revision identifiers, used by Alembic. from sqlalchemy.sql import table revision = '33c12dd6c4ef' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generat...
befelix/scipy
refs/heads/master
scipy/interpolate/tests/test_bsplines.py
16
from __future__ import division, absolute_import, print_function import warnings import numpy as np from numpy.testing import (run_module_suite, TestCase, assert_equal, assert_allclose, assert_raises, assert_) from numpy.testing.decorators import knownfailureif from scipy.interpolate import (BSpline, BPoly, ...
mchristopher/PokemonGo-DesktopMap
refs/heads/master
app/pylibs/shared/pgoapi/protos/POGOProtos/Networking/Responses/GetHatchedEggsResponse_pb2.py
15
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Responses/GetHatchedEggsResponse.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message f...
lucafavatella/intellij-community
refs/heads/cli-wip
python/lib/Lib/site-packages/django/conf/locale/gl/formats.py
322
# -*- 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 = 'd F Y' TIME_FORMAT = 'H:i:s' # DATETIME_FORMAT = YEAR_MONTH_FORMAT = 'F ...
MIPS/external-chromium_org
refs/heads/dev-mips-jb-kitkat
chrome/test/pyautolib/generate_docs.py
80
#!/usr/bin/env python # Copyright (c) 2011 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 optparse import os import pydoc import shutil import sys def main(): parser = optparse.OptionParser() parser.add_optio...
gangadhar-kadam/verve_erp
refs/heads/v5.0
erpnext/manufacturing/doctype/workstation_working_hour/workstation_working_hour.py
121
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class WorkstationWorkingHour(Document): pass
winkidney/StoryGear
refs/heads/master
setup.py
1
# !/usr/bin/env python # coding: utf-8 __author__ = 'winkidney' import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) requires = [ 'django>=1.8', 'django-bootstrap3', ] setup( name='storygear', version='0.0.1', packages=find_packages('.', exclud...
alexcuellar/odoo
refs/heads/8.0
addons/portal_project_issue/tests/__init__.py
260
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
xenon92/android_kernel_nebula
refs/heads/nebula-4.4
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
nimon/GPSense
refs/heads/master
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
OLIMEX/linux-3.12.10-ti2013.12.01-am3352_som
refs/heads/master
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
kingmotley/SickRage
refs/heads/master
sickbeard/metadata/helpers.py
8
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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...
ivanhorvath/openshift-tools
refs/heads/prod
openshift/installer/vendored/openshift-ansible-3.6.173.0.59/roles/lib_openshift/library/oc_adm_policy_user.py
5
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
washimimizuku/apoidea
refs/heads/master
genesis/generate.py
1
#! /usr/bin/python # -*- coding: utf-8 -*- from amara import binderytools from Backoffice import * import os import shutil xml = binderytools.bind_file('blueprint.xml') # Move old apoidea to apoidea.old # Create apoidea backofficeDirectory = "./apoidea" if os.path.exists(backofficeDirectory): shutil.rmtree(back...
Adnn/django
refs/heads/master
tests/raw_query/tests.py
119
from __future__ import unicode_literals from datetime import date from django.db.models.query_utils import InvalidQuery from django.test import TestCase, skipUnlessDBFeature from .models import Author, Book, BookFkAsPk, Coffee, FriendlyAuthor, Reviewer class RawQueryTests(TestCase): @classmethod def setUp...
tunneln/CarnotKE
refs/heads/master
jyhton/out/test/tests/org/python/indexer/data/test.py
13
class Foo: pass Foo()
gdg-garage/knihovna-db
refs/heads/master
knihovna-server/third_party/unidecode/x087.py
252
data = ( 'Shu ', # 0x00 'Xuan ', # 0x01 'Feng ', # 0x02 'Shen ', # 0x03 'Zhen ', # 0x04 'Fu ', # 0x05 'Xian ', # 0x06 'Zhe ', # 0x07 'Wu ', # 0x08 'Fu ', # 0x09 'Li ', # 0x0a 'Lang ', # 0x0b 'Bi ', # 0x0c 'Chu ', # 0x0d 'Yuan ', # 0x0e 'You ', # 0x0f 'Jie ', # 0x10 'Da...
Debian/openjfx
refs/heads/master
modules/web/src/main/native/Tools/Scripts/webkitpy/common/watchlist/watchlistrule_unittest.py
3
# Copyright (C) 2011 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 of conditions and the ...
qtproject/pyside-pyside
refs/heads/dev
tests/QtCore/translation_test.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License U...
dkubiak789/OpenUpgrade
refs/heads/8.0
addons/fleet/fleet.py
33
# -*- 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...
DazWorrall/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_user.py
16
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks 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 # ...
jo-tez/python-linode-api
refs/heads/master
linode/objects/profile/__init__.py
1
from .personal_access_token import PersonalAccessToken from .app import AuthorizedApp from .profile import Profile from .whitelist_entry import WhitelistEntry
TNT-Samuel/Coding-Projects
refs/heads/master
DNS Server/Source/Lib/site-packages/pygments/lexers/esoteric.py
27
# -*- coding: utf-8 -*- """ pygments.lexers.esoteric ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for esoteric languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include, words from pygments.token imp...
40223135/40223135w17
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/xml/parsers/expat.py
876
"""Interface to the Expat non-validating XML parser.""" import sys from pyexpat import * # provide pyexpat submodules as xml.parsers.expat submodules sys.modules['xml.parsers.expat.model'] = model sys.modules['xml.parsers.expat.errors'] = errors
Sean3Don/ardupilot-raspilot
refs/heads/ArduCopter-Raspilot
Tools/LogAnalyzer/DataflashLog.py
28
# # Code to abstract the parsing of APM Dataflash log files, currently only used by the LogAnalyzer # # Initial code by Andrew Chapman (amchapman@gmail.com), 16th Jan 2014 # from __future__ import print_function import collections import os import numpy import bisect import sys import ctypes class Format(object): ...
melviso/phycpp
refs/heads/master
beatle/plugin/tools/ast_explorer/res/_eq.py
2
# -*- coding: utf-8 -*- _eq = [ "16 16 4 1", " c None", ". c #68BD68", "+ c #7C7C7C", "@ c #323232", " ", " .......... ", " +..........+ ", " .............. ", " .............. ", " .............. ", " ..@@@@..@@@@.. ", " .............. ", " ..@@@@..@@@@.. ", " .............. ", " .............. ...
salguarnieri/intellij-community
refs/heads/master
python/testData/refactoring/rename/epydocRenameType_after.py
83
class Shazam: pass def foo(p): """ @param p: the magic word @type p: Shazam @return: """
ravigadila/MicroSite
refs/heads/master
micro_blog/migrations/0003_post_meta_description.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('micro_blog', '0002_category_is_display'), ] operations = [ migrations.AddField( model_name='post', n...
roxyboy/bokeh
refs/heads/master
examples/plotting/server/iris.py
42
# The plot server must be running # Go to http://localhost:5006/bokeh to view this plot from bokeh.sampledata.iris import flowers from bokeh.plotting import figure, show, output_server colormap = {'setosa': 'red', 'versicolor': 'green', 'virginica': 'blue'} flowers['color'] = flowers['species'].map(lambda x: colormap...
jnewland/home-assistant
refs/heads/ci
homeassistant/components/bt_smarthub/__init__.py
36
"""The bt_smarthub component."""
luotao1/Paddle
refs/heads/develop
python/paddle/dataset/tests/test_image.py
6
# Copyright (c) 2018 PaddlePaddle 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 app...
asedunov/intellij-community
refs/heads/master
python/helpers/pockets/_version.py
30
# Package versioning solution originally found here: # http://stackoverflow.com/q/458550 # Store the version here so: # 1) we don't load dependencies by storing it in __init__.py # 2) we can import it in setup.py for the same reason # 3) we can import it into your module __version__ = '0.3.2'
flacjacket/sympy
refs/heads/master
sympy/series/tests/test_lseries.py
10
from sympy import sin, cos, exp, E, S, Order from sympy.abc import x, y def test_sin(): e = sin(x).lseries(x) assert e.next() == x assert e.next() == -x**3/6 assert e.next() == x**5/120 def test_cos(): e = cos(x).lseries(x) assert e.next() == 1 assert e.next() == -x**2/2 assert e.next(...
pselle/calibre
refs/heads/master
src/calibre/utils/date.py
12
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import re, time from datetime import datetime, time as dtime, timedelta, MINYEAR, MA...
mozilla/verbatim
refs/heads/master
vendor/lib/python/raven/scripts/runner.py
5
""" raven.scripts.runner ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging import os import sys import pwd from optparse import OptionParser from raven import Client from ...
pottzer/home-assistant
refs/heads/dev
tests/components/automation/test_mqtt.py
10
""" tests.components.automation.test_mqtt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests mqtt automation. """ import unittest import homeassistant.core as ha import homeassistant.components.automation as automation from tests.common import mock_mqtt_component, fire_mqtt_message class TestAutomationMQTT(unittest.TestCa...
liyongyue/dnsspider
refs/heads/master
dnsget_norecursive2.py
1
#coding=utf-8 import dns.resolver import re import time import json import csv def find_domain(string): domain_re=re.compile(r'(\S*?\.)+') metch=domain_re.search(string) if metch: return metch.group().lower() else: return '' def find_ip(string): ip_re=re.compile(r'(\d{1,3}\.){3}(\d{1,3})') metch=ip_re.search(...
Bashar/django
refs/heads/master
tests/signed_cookies_tests/tests.py
24
from __future__ import unicode_literals import time from django.core import signing from django.http import HttpRequest, HttpResponse from django.test import TestCase, override_settings class SignedCookieTest(TestCase): def test_can_set_and_read_signed_cookies(self): response = HttpResponse() r...
jesushinojosa1992/jesuscoin
refs/heads/master
contrib/pyminer/pyminer.py
2
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
Pablo126/SSBW
refs/heads/master
Entrega1/lib/python3.5/site-packages/registration/management/commands/cleanupregistration.py
13
""" A management command which deletes expired accounts (e.g., accounts which signed up but never activated) from the database. Calls ``RegistrationProfile.objects.delete_expired_users()``, which contains the actual logic for determining which accounts are deleted. """ from django.core.management.base import BaseCom...
DmitryADP/diff_qc750
refs/heads/master
external/webkit/Tools/Scripts/webkitpy/common/config/committervalidator.py
15
# Copyright (c) 2009 Google Inc. All rights reserved. # Copyright (c) 2009 Apple Inc. All rights reserved. # Copyright (c) 2010 Research In Motion Limited. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are...
jonyroda97/redbot-amigosprovaveis
refs/heads/develop
lib/pip/_vendor/webencodings/__init__.py
169
# coding: utf-8 """ webencodings ~~~~~~~~~~~~ This is a Python implementation of the `WHATWG Encoding standard <http://encoding.spec.whatwg.org/>`. See README for details. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ from __future__ import unicode_li...
AunShiLord/sympy
refs/heads/master
sympy/vector/coordsysrect.py
1
from sympy.core.basic import Basic from sympy.vector.scalar import BaseScalar from sympy import eye, trigsimp, ImmutableMatrix as Matrix, Symbol from sympy.core.compatibility import string_types from sympy.core.cache import cacheit from sympy.vector.orienters import (Orienter, AxisOrienter, BodyOrienter, ...
AlperSaltabas/OR_Tools_Google_API
refs/heads/master
data/nonogram_regular/nonogram_crocodile.py
74
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # 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...
weimingtom/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/unittest/test/test_runner.py
785
import io import os import sys import pickle import subprocess import unittest from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun class TestCleanUp(unittest.TestCase): def testCleanUp(self): class TestableTest(unittest.TestCase): def testNothing(self): p...
david30907d/feedback_django
refs/heads/master
spirit/core/utils/ratelimit/decorators.py
9
# -*- coding: utf-8 -*- from __future__ import unicode_literals import functools from django.contrib import messages from django.utils.translation import ugettext as _ from .ratelimit import RateLimit __all__ = ['ratelimit', ] def ratelimit(method=None, field=None, rate='5/5m'): def decorator(func): ...
georgewallace/azure-quickstart-templates
refs/heads/master
splunk-on-ubuntu/scripts/dobackup.py
119
#!/usr/bin/env python3 #      The MIT License (MIT) # #      Copyright (c) 2016 Microsoft. All rights reserved. # #      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 restr...
googleapis/gapic-generator-python
refs/heads/master
tests/snippetgen/test_snippetgen.py
1
# -*- coding: utf-8 -*- # Copyright 2021 Google LLC # # 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...
PedroTrujilloV/nest-simulator
refs/heads/master
testsuite/manualtests/cross_check_test_mip_corrdet.py
13
# -*- coding: utf-8 -*- # # cross_check_test_mip_corrdet.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 o...
knutwalker/google-closure-linter
refs/heads/master
closure_linter/checkerbase.py
104
#!/usr/bin/env python # # Copyright 2008 The Closure Linter 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 #...
yoer/hue
refs/heads/master
apps/hbase/gen-py/hbased/Hbase.py
32
# # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # Warning: module edited below. # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * from thrift.Thrift import TProcessor from t...
johancz/olympia
refs/heads/master
migrations/417-migrate-logs.py
37
from django.db import connection, transaction def run(): cursor = connection.cursor() cursor.execute('select activity_log_id from log_activity_app;') ids = [r[0] for r in cursor.fetchall()] if not ids: return cursor.execute('set foreign_key_checks = 0') cursor.execute('insert into lo...
SlimRemix/android_external_chromium_org
refs/heads/lp5.1
tools/telemetry/telemetry/core/browser_info.py
55
# Copyright 2014 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. _check_webgl_supported_script = """ (function () { var c = document.createElement('canvas'); var gl = c.getContext('webgl'); if (gl == null) { gl =...
devendermishrajio/nova
refs/heads/master
nova/tests/unit/api/openstack/compute/test_extended_ips_mac.py
26
# Copyright 2013 IBM Corp. # 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 app...
micropython/micropython
refs/heads/master
tests/unicode/unicode_ord.py
15
# test builtin ord with unicode characters print(ord("α"))
pyblish/pyblish-endpoint
refs/heads/master
pyblish_endpoint/vendor/werkzeug/wrappers.py
146
# -*- coding: utf-8 -*- """ werkzeug.wrappers ~~~~~~~~~~~~~~~~~ The wrappers are simple request and response objects which you can subclass to do whatever you want them to do. The request object contains the information transmitted by the client (webbrowser) and the response object contains al...
raoulbq/scipy
refs/heads/master
scipy/sparse/csgraph/_validation.py
137
from __future__ import division, print_function, absolute_import import numpy as np from scipy.sparse import csr_matrix, isspmatrix, isspmatrix_csc from ._tools import csgraph_to_dense, csgraph_from_dense,\ csgraph_masked_from_dense, csgraph_from_masked DTYPE = np.float64 def validate_graph(csgraph, directed, d...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.py
374
import calendar import time from email.utils import formatdate, parsedate, parsedate_tz from datetime import datetime, timedelta TIME_FMT = "%a, %d %b %Y %H:%M:%S GMT" def expire_after(delta, date=None): date = date or datetime.now() return date + delta def datetime_to_header(dt): return formatdate(c...
voostar/Jiva
refs/heads/master
web/web/urls.py
1
"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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-based v...
flavio/SoCo
refs/heads/master
soco/music_library.py
6
# -*- coding: utf-8 -*- """Access to the Music Library. The Music Library is the collection of music stored on your local network. For access to third party music streaming services, see the `music_service` module.""" from __future__ import unicode_literals import logging from . import discovery from .data_structu...
msabramo/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/redshift.py
5
#!/usr/bin/python # Copyright 2014 Jens Carl, Hothead Games 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 License, or # (at your option) any later version. # # ...
gylian/sickbeard
refs/heads/master
lib/guessit/transfo/guess_year.py
48
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
MattDevo/edk2
refs/heads/master
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis_2004.py
61
# # shift_jis_2004.py: Python Unicode Codec for SHIFT_JIS_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jis_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class...
Kingdread/qutebrowser
refs/heads/master
qutebrowser/completion/completiondelegate.py
6
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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...
adrianholovaty/django
refs/heads/master
django/contrib/localflavor/us/models.py
196
from django.utils.translation import ugettext_lazy as _ from django.db.models.fields import CharField from django.contrib.localflavor.us.us_states import STATE_CHOICES from django.contrib.localflavor.us.us_states import USPS_CHOICES class USStateField(CharField): description = _("U.S. state (two uppercase letters...
ceralena/hark
refs/heads/develop
src/hark/models/__init__.py
2
import collections import json from hark.exceptions import ( ModelInvalidException, ) class BaseModel(collections.OrderedDict): required = [] def json(self, indent=None): return json.dumps(self, indent=indent) def validate(self): if not hasattr(self, 'fields'): raise Mod...
vincepandolfo/django
refs/heads/master
django/utils/module_loading.py
145
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...
henriquelalves/phaser-boilerplate
refs/heads/master
client/jsonfy.py
1
#!/usr/bin/env python # Credits: https://unix.stackexchange.com/questions/164602/how-to-output-the-directory-structure-to-json-format import os import errno def path_hierarchy(path): hierarchy = { 'type': 'folder', 'name': os.path.basename(path), 'path': path, } try: ...
FATruden/boto
refs/heads/master
boto/manage/cmdshell.py
63
# Copyright (c) 2006-2009 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...
LeartS/odoo
refs/heads/master
addons/website_certification/certification.py
385
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
sunlianqiang/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_pulldom.py
118
import io import unittest import sys import xml.sax from xml.sax.xmlreader import AttributesImpl from xml.dom import pulldom from test.support import run_unittest, findfile tstfile = findfile("test.xml", subdir="xmltestdata") # A handy XML snippet, containing attributes, a namespace prefix, and a # self-closing ta...
whip112/Whip112
refs/heads/master
vendor/packages/logilab/astng/exceptions.py
27
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as publis...
ampax/edx-platform-backup
refs/heads/live
cms/djangoapps/course_creators/admin.py
232
""" django admin page for the course creators table """ from course_creators.models import CourseCreator, update_creator_state, send_user_notification, send_admin_notification from course_creators.views import update_course_creator_group from ratelimitbackend import admin from django.conf import settings from django....
tempbottle/restcommander
refs/heads/master
play-1.2.4/python/Lib/multiprocessing/dummy/__init__.py
60
# # Support for the API of the multiprocessing package using threads # # multiprocessing/dummy/__init__.py # # Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt # __all__ = [ 'Process', 'current_process', 'active_children', 'freeze_support', 'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Condition', ...
jscn/django
refs/heads/master
tests/annotations/tests.py
22
from __future__ import unicode_literals import datetime from decimal import Decimal from django.core.exceptions import FieldDoesNotExist, FieldError from django.db.models import ( BooleanField, CharField, Count, DateTimeField, ExpressionWrapper, F, Func, IntegerField, Sum, Value, ) from django.db.models.funct...
JOHNKYON/Lab_models
refs/heads/master
src/init.py
1
# -*- coding:utf-8 -*- import re import jieba from data import stopwords import algorithm_collection import codecs import numpy as np from sklearn.feature_extraction.text import TfidfTransformer __author__ = "JOHNKYON" def text_init(raw): """ 去除文本中的停用词,分词 :param raw: :return 分词后的list,list中的元素为2级lis...
mujiansu/pip
refs/heads/develop
tests/unit/test_wheel.py
24
"""Tests for wheel binary packages and .dist-info.""" import os import pytest from mock import patch, Mock from pip._vendor import pkg_resources from pip import pep425tags, wheel from pip.exceptions import InvalidWheelFilename, UnsupportedWheel from pip.utils import unpack_file def test_get_entrypoints(tmpdir): ...
vitan/hue
refs/heads/master
apps/help/src/help/settings.py
33
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
sparkslabs/kamaelia
refs/heads/master
Sketches/MH/Layout/Visualisation/Axon/__init__.py
18
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
nathanial/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/contrib/messages/models.py
634
# Models module required so tests are discovered.
xujun10110/shodan-python
refs/heads/master
shodan/alert.py
3
class Alert: def __init__(self): self.id = None self.name = None self.api_key = None self.filters = None self.credits = None self.created = None self.expires = None
ludoo/wpkit
refs/heads/master
attic/ngfrontman/wp_frontman/managers.py
2
from django.db import models from wp_frontman.taxonomy_sql_compiler import QuerySet, TaxonomyQuery # TODO: move to the blog model as we need each blog's capabilities #class UserManager(models.Manager): # # def users_can(self, capability): # roles = self.model.wp_blog.options['capabilities'].get(capabil...
ivoflipse/devide
refs/heads/master
modules/vtk_basic/vtkClipVolume.py
7
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkClipVolume(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, vtk.vtk...
vmthunder/volt
refs/heads/master
tools/install_venv_common.py
166
# Copyright 2013 OpenStack Foundation # Copyright 2013 IBM Corp. # # 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 ...
aricaldeira/pybrasil
refs/heads/master
pybrasil/codigo_barras/datamatrix/textencoder.py
1
"""Text encoder for 2D datamatrix barcode encoder""" __revision__ = "$Rev$" from .reedsolomon import get_reed_solomon_code import logging log = logging.getLogger("datamatrix") data_word_length = (3, 5, 8, 12, 18, 22, 30, 36, 44, 62, 86, 114, 144, 174, 204, 280, 368, 456, 576,...
dvliman/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.5/tests/modeltests/unmanaged_models/__init__.py
45382
krisys/django
refs/heads/master
tests/unmanaged_models/models.py
66
""" Models can have a ``managed`` attribute, which specifies whether the SQL code is generated for the table on various manage.py operations. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible # All of these models are created in the database by Django. @python_2_unicod...
angelapper/odoo
refs/heads/9.0
addons/website_crm_partner_assign/models/__init__.py
1273
import res_partner