repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
SportySpice/Collections
refs/heads/master
src/li/types/YoutubeCategoryVisual.py
1
class YoutubeCategoryVisual(object): def __init__(self, textSettings, customTitle=None, ctHasPageNum=False): self.textSettings = textSettings self.customTitle = customTitle self.ctHasPageNum = ctHasPageNum def title(self, category, pageNum): if self.cus...
hyqneuron/pylearn2-maxsom
refs/heads/master
pylearn2/scripts/print_monitor_cv.py
12
#!/usr/bin/env python """ Print (average) channel values for a collection of models, such as that serialized by TrainCV. Based on print_monitor.py. usage: print_monitor_cv.py model.pkl [-a] """ from __future__ import print_function __author__ = "Steven Kearnes" __copyright__ = "Copyright 2014, Stanford University" __...
equialgo/scikit-learn
refs/heads/master
sklearn/decomposition/tests/test_nmf.py
28
import numpy as np import scipy.sparse as sp import numbers from scipy import linalg from sklearn.decomposition import NMF, non_negative_factorization from sklearn.decomposition import nmf # For testing internals from scipy.sparse import csc_matrix from sklearn.utils.testing import assert_true from sklearn.utils.te...
Cyberbio-Lab/bcbio-nextgen
refs/heads/master
bcbio/pipeline/disambiguate/run.py
2
#!/usr/bin/env python """ This is the main function to call for disambiguating between BAM files from two species that have alignments from the same source of fastq files. It is part of the explant RNA/DNA-Seq workflow where an informatics approach is used to distinguish between e.g. human and mouse or rat RNA/DNA rea...
desec-io/desec-stack
refs/heads/20210701_security_headers
api/desecapi/migrations/0013_user_needs_captcha.py
1
# Generated by Django 3.1.5 on 2021-01-19 15:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('desecapi', '0012_rrset_label_length'), ] operations = [ migrations.AddField( model_name='user', name='needs_captcha'...
xzturn/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/ackermann_test.py
21
# Copyright 2015 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...
BlindHunter/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...
dylan-reeves/home_backup
refs/heads/master
backupclient-env/Lib/encodings/cp1252.py
272
""" Python Character Mapping Codec cp1252 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
johnkeepmoving/oss-ftp
refs/heads/master
python27/win32/Lib/idlelib/RemoteObjectBrowser.py
127
from idlelib import rpc def remote_object_tree_item(item): wrapper = WrappedObjectTreeItem(item) oid = id(wrapper) rpc.objecttable[oid] = wrapper return oid class WrappedObjectTreeItem: # Lives in PYTHON subprocess def __init__(self, item): self.__item = item def __getattr__(self...
josephcslater/scipy
refs/heads/master
scipy/linalg/tests/test_solvers.py
5
from __future__ import division, print_function, absolute_import import os import numpy as np from numpy.testing import TestCase, run_module_suite from numpy.testing import assert_raises, assert_array_almost_equal from numpy.testing.noseclasses import KnownFailureTest from scipy.linalg import solve_sylvester from s...
bakkou-badri/dataminingproject
refs/heads/master
env/lib/python2.7/site-packages/pkg_resources.py
134
""" Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipul...
mrrrgn/olympia
refs/heads/master
apps/users/management/__init__.py
12133432
alfredodeza/boto
refs/heads/develop
tests/unit/manage/__init__.py
12133432
sklnet/opendroid-enigma2
refs/heads/master
lib/python/Plugins/Extensions/__init__.py
12133432
haeusser/tensorflow
refs/heads/master
tensorflow/python/util/protobuf/__init__.py
12133432
Tejal011089/huntercamp_erpnext
refs/heads/develop
erpnext/hr/doctype/leave_block_list_date/__init__.py
12133432
JacobFischer/Joueur.py
refs/heads/master
_creer/games/${underscore(game_name)}/__init__.py
1
# DO NOT MODIFY THESE IMPORTS from games.${underscore(game_name)}.ai import AI from games.${underscore(game_name)}.game import Game % for game_obj_key in sort_dict_keys(game_objs): from games.${underscore(game_name)}.${underscore(game_obj_key)} import ${game_obj_key} % endfor ${merge("# ", "init", "# if you need to in...
egafford/sahara
refs/heads/master
sahara/service/edp/oozie/engine.py
2
# Copyright (c) 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
Pluto-tv/chromium-crosswalk
refs/heads/master
third_party/libxml/src/gentest.py
298
#!/usr/bin/python -u # # generate a tester program for the API # import sys import os import string try: import libxml2 except: print "libxml2 python bindings not available, skipping testapi.c generation" sys.exit(0) if len(sys.argv) > 1: srcPref = sys.argv[1] + '/' else: srcPref = '' # # Modules ...
EvanK/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_firewall_schedule_group.py
24
#!/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...
rhurkes/chasegame
refs/heads/master
venv/lib/python2.7/site-packages/jinja2/testsuite/loader.py
411
# -*- coding: utf-8 -*- """ jinja2.testsuite.loader ~~~~~~~~~~~~~~~~~~~~~~~ Test the loaders. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys import tempfile import shutil import unittest from jinja2.testsuite import JinjaTestCase, dic...
and2egg/philharmonic
refs/heads/master
philharmonic/manager/__init__.py
2
from .imanager import IManager, ManagerFactory
heke123/chromium-crosswalk
refs/heads/master
tools/chrome_proxy/common/network_metrics_unittest.py
37
# 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. import base64 import unittest from common import network_metrics from telemetry.testing import test_page_test_results from telemetry.timeline import event ...
romain-dartigues/ansible
refs/heads/devel
lib/ansible/plugins/terminal/iosxr.py
38
# # (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...
maurofaccenda/ansible
refs/heads/devel
lib/ansible/modules/utilities/logic/async_status.py
56
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # # 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 ...
sharadbhat/Video-Sharing-Platform
refs/heads/master
Server/server.py
1
from flask import Flask, request, send_file import database import base64 import os import uuid import calendar from fuzzy_search import fuzzy from image_capture import save_image app = Flask(__name__) db = database.Database() UPLOAD_FOLDER = 'static/videos' app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER @app.route("...
mikkylok/mikky.lu
refs/heads/master
venv/lib/python2.7/site-packages/jinja2/debug.py
132
# -*- coding: utf-8 -*- """ jinja2.debug ~~~~~~~~~~~~ Implements the debug interface for Jinja. This module does some pretty ugly stuff with the Python traceback system in order to achieve tracebacks with correct line numbers, locals and contents. :copyright: (c) 2017 by the Jinja Team. :...
cloudbase/neutron-virtualbox
refs/heads/virtualbox_agent
neutron/plugins/cisco/db/network_models_v2.py
50
# Copyright 2012, Cisco Systems, 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 ...
ninjin/spearmint-lite
refs/heads/master
gp.py
1
## # Copyright (C) 2012 Jasper Snoek, Hugo Larochelle and Ryan P. Adams # # This code is written for research and educational purposes only to # supplement the paper entitled # "Practical Bayesian Optimization of Machine Learning Algorithms" # by Snoek, Larochelle and Adams # Advances in Neural Information Processing...
lostdj/Jaklin-OpenJFX
refs/heads/jaklin-master
modules/web/src/main/native/Tools/Scripts/webkitpy/style/main_unittest.py
124
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and...
GriceTurrble/python-amazon-mws
refs/heads/develop
tests/request_methods/test_finances.py
1
""" Tests for the Finances API class. """ import unittest import datetime import mws from .utils import CommonRequestTestTools, transform_date class FinancesTestCase(unittest.TestCase, CommonRequestTestTools): """ Test cases for Finances. """ # TODO: Add remaining methods for Finances def setUp(s...
diox/olympia
refs/heads/master
src/olympia/users/migrations/0004_auto_20201002_1006.py
5
# Generated by Django 2.2.14 on 2020-10-02 10:06 from django.db import migrations def clear_user_restriction_history(apps, schema_editor): fields = {'last_login_ip': '', 'ip_address': ''} UserRestrictionHistory = apps.get_model('users', 'UserRestrictionHistory') qs = UserRestrictionHistory.objects.filter...
tolimit/tp-qemu
refs/heads/master
generic/tests/save_restore.py
16
import logging import time import tempfile import os.path from autotest.client.shared import error def run(test, params, env): """ VM save / restore test: 1) Wait save_restore_start_delay seconds (default=10.0) 2) Verify VM is running 3) Pause, save VM to file (optionally in save_restore_path), v...
mrshu/lemm-sk
refs/heads/master
test_lemmsk.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import lemmsk import unittest class TestSimpleLemmatization(unittest.TestCase): def test_lemmatization(self): self.assertEqual(lemmsk.lemmatize('kuraciemu'), 'kurací') self.assertEqual(lemmsk.lemmatize('kuracieho'), 'kurací') self.assertTrue(...
xArm-Developer/xArm-Python-SDK
refs/heads/master
xarm/core/config/x_config.py
1
#!/usr/bin/env python3 # Software License Agreement (BSD License) # # Copyright (c) 2018, UFACTORY, Inc. # All rights reserved. # # Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com> import math class XCONF(object): ARM_AXIS_NUM = 7 GRIPPER_ID = 8 TGPIO_ID = 9 MAX_CMD_NUM = 1024 def ...
Jannes123/inasafe
refs/heads/develop
safe/common/test/test_version.py
10
# coding=utf-8 """InaSAFE Disaster risk assessment tool developed by AusAid - **Test class for version.py.** Contact : ole.moller.nielsen@gmail.com .. 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 Softw...
leveryd/autopwn
refs/heads/master
autopwn/__init__.py
3
#!/usr/bin/env python3 import argparse import copy import cmd import collections import operator import os import random import re import readline import shlex import subprocess import sys import threading import time from collections import OrderedDict, defaultdict from distutils.spawn import find_executable from lo...
meigrafd/Sample-Code
refs/heads/master
_pygame/sprite.py
2
import pygame from operator import truth from functools import wraps # Flag values for anchors. # TODO: use Rect's constants ANCHOR_TOPLEFT = 101 ANCHOR_TOPRIGHT = 102 ANCHOR_BOTTOMLEFT = 103 ANCHOR_BOTTOMRIGHT = 104 ANCHOR_CENTER = 105 ANCHOR_MIDTOP = 106 ANCHOR_MIDBOTTOM = 107 ANCHOR_MIDLEFT = 108 ANCHOR_MIDRIGHT =...
ltiao/scikit-learn
refs/heads/master
sklearn/neighbors/__init__.py
306
""" The :mod:`sklearn.neighbors` module implements the k-nearest neighbors algorithm. """ from .ball_tree import BallTree from .kd_tree import KDTree from .dist_metrics import DistanceMetric from .graph import kneighbors_graph, radius_neighbors_graph from .unsupervised import NearestNeighbors from .classification impo...
JFriel/honours_project
refs/heads/master
networkx/networkx/exception.py
42
# -*- coding: utf-8 -*- """ ********** Exceptions ********** Base exceptions and errors for NetworkX. """ __author__ = """Aric Hagberg (hagberg@lanl.gov)\nPieter Swart (swart@lanl.gov)\nDan Schult(dschult@colgate.edu)\nLoïc Séguin-C. <loicseguin@gmail.com>""" # Copyright (C) 2004-2015 by # Aric Hagberg <hagberg...
WillGuan105/django
refs/heads/master
tests/gis_tests/geoapp/sitemaps.py
452
from django.contrib.gis.sitemaps import KMLSitemap, KMZSitemap from .models import City, Country sitemaps = {'kml': KMLSitemap([City, Country]), 'kmz': KMZSitemap([City, Country]), }
feist/pcs
refs/heads/master
pcs/stonith.py
1
import json from pcs import ( resource, utils, ) from pcs.cli.common import parse_args from pcs.cli.common.console_report import indent, error from pcs.cli.common.errors import CmdLineInputError from pcs.cli.fencing_topology import target_type_map_cli_to_lib from pcs.cli.resource.parse_args import parse_create...
dimkal/mne-python
refs/heads/master
examples/preprocessing/plot_eog_artifact_histogram.py
11
""" ======================== Show EOG artifact timing ======================== Compute the distribution of timing for EOG artifacts. """ # Authors: Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) import numpy as np import matplotlib.pyplot as plt import mne from mne import io from mne.datasets im...
cga-harvard/cga-worldmap
refs/heads/legacy
geonode/maps/urls.py
1
from django.conf.urls.defaults import patterns, url js_info_dict = { 'packages': ('geonode.maps','geonode.capabilities'), } urlpatterns = patterns('geonode.maps.views', url(r'^$', 'maps', name='maps_home'), url(r'^new/?$', 'newmap', name="maps_new"), url(r'^new/data$', 'newmapJSON', name='maps_new...
camptocamp/ngo-addons-backport
refs/heads/master
addons/event/wizard/__init__.py
435
# -*- 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...
PokemonGoF/PokemonGo-Bot-Desktop
refs/heads/development
build/pywin/Lib/stringprep.py
278
# This file is generated by mkstringprep.py. DO NOT EDIT. """Library that exposes various tables found in the StringPrep RFC 3454. There are two kinds of tables: sets, for which a member test is provided, and mappings, for which a mapping function is provided. """ from unicodedata import ucd_3_2_0 as unicodedata ass...
tylernm14/donut-dagger
refs/heads/master
wrapper/python/streamed_job/setup.py
2
from distutils.core import setup setup( name='streamed_job', version='0.1.0', author='Tyler Martin', author_email='tylernm@gmail.com', packages=['streamed_job'], scripts=['bin/run_streamed_job.py'], url='http://www.fakeurl.nowhere', license='LICENSE.txt', description='Run a process ...
citrix-openstack/build-ryu
refs/heads/ctx-nova-network-smoke-latest
ryu/controller/handler.py
7
# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp> # # 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 # ...
octopus-platform/octopus-tools
refs/heads/master
tests/orientdb_shell_manager.py
5
import unittest from octopus.server.shell_mananger import ShellManager class TestShellManager(unittest.TestCase): def testUnreachableServer(self): self.hostname = 'localhost' self.port = '1337' shell_manager = ShellManager(self.hostname, self.port) shells = shell_manager.list() ...
boooka/GeoPowerOff
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/py.py
1323
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from bisect import bisect_left from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): if not all(isinstance(x, text_type) for x in data.keys()): raise TypeError...
blckshrk/Weboob
refs/heads/master
modules/gdfsuez/pages/history.py
3
# -*- coding: utf-8 -*- # Copyright(C) 2013 Mathieu Jourdan # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
AtScaleInc/Impala
refs/heads/master
thirdparty/thrift-0.9.0/tutorial/py/PythonServer.py
28
#!/usr/bin/env python # # 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 # "L...
oihane/odoo
refs/heads/8.0
addons/stock_account/stock_account.py
89
# -*- 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...
zioproto/radiomate
refs/heads/master
radiomate/jukeslots/main.py
2
# vim:fileencoding=utf-8:nomodified # $Id$ # # Copyright 2010 Claudio Pisa (clauz at ninux dot org) # # This file is part of RadioMate # # RadioMate 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 ...
antoinecarme/pyaf
refs/heads/master
tests/periodicities/Second/Cycle_Second_200_S_360.py
1
import tests.periodicities.period_test as per per.buildModel((360 , 'S' , 200));
xelphene/nmine
refs/heads/master
nmine/streamfind.py
1
import re from ianatlds import IANA_TLD_LIST class StreamFinder: endings = ['.'+tld for tld in IANA_TLD_LIST] re_dns = re.compile('([-.a-zA-Z0-9]+)') re_windowend = re.compile('.*?([-.a-zA-Z0-9]+)$') blacklist = ('document.do','asp.net') def __init__(self): self.pos=0 self._buf = '' self.extraTLDprovid...
nkfly/vm-hw1
refs/heads/master
roms/seabios/tools/checksum.py
131
#!/usr/bin/env python # Script to report the checksum of a file. # # Copyright (C) 2009 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. import sys def main(): data = sys.stdin.read() ords = map(ord, data) print "sum=%x\n" % sum(ords) if __na...
laulysta/nmt_transformer
refs/heads/master
transformer/Layers.py
1
''' Define the Layers ''' import torch.nn as nn from transformer.SubLayers import MultiHeadAttention, PositionwiseFeedForward __author__ = "Yu-Hsiang Huang" class EncoderLayer(nn.Module): ''' Compose with two layers ''' def __init__(self, d_model, d_inner_hid, n_head, d_k, d_v, dropout=0.1): super(En...
Kiiv/Sick-Beard
refs/heads/development
lib/requests/packages/chardet2/test.py
52
from __future__ import print_function import sys, glob sys.path.insert(0, '..') from chardet.universaldetector import UniversalDetector count = 0 u = UniversalDetector() for f in glob.glob(sys.argv[1]): print(f.ljust(60), end=' ') u.reset() for line in open(f, 'rb'): u.feed(line) if u.done:...
saghul/aiohttp
refs/heads/master
tests/test_streams.py
2
"""Tests for streams.py""" import asyncio import unittest from unittest import mock from aiohttp import streams from aiohttp import test_utils class StreamReaderTests(unittest.TestCase): DATA = b'line1\nline2\nline3\n' def setUp(self): self.loop = asyncio.new_event_loop() asyncio.set_event...
dchaplinsky/pep.org.ua
refs/heads/master
pepdb/tasks/management/commands/load_companies.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from random import randrange import requests import os.path import xml.etree.ElementTree as ET from xml.etree.ElementTree import ParseError import logging from io import TextIOWrapper, open from unicodecsv import DictReader from itertools import...
lancezlin/pylearn2
refs/heads/master
pylearn2/testing/__init__.py
49
""" Functionality for supporting unit tests. """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" import functools from theano import config def...
JioEducation/edx-platform
refs/heads/master
lms/djangoapps/instructor/features/__init__.py
12133432
petteyg/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/conf/locale/en_GB/__init__.py
12133432
chrisfranklin/badasschat
refs/heads/master
badasschat/__init__.py
12133432
kirti3192/spoken-website
refs/heads/master
cron/spoken_search/whoosh/scoring.py
94
# Copyright 2008 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
Teamxrtc/webrtc-streaming-node
refs/heads/master
third_party/webrtc/src/chromium/src/tools/gyp/test/mac/gyptest-clang-cxx-language-standard.py
264
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that CLANG_CXX_LANGUAGE_STANDARD works. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp.TestGyp(...
evonove/mkm-sdk
refs/heads/master
mkmsdk/serializer.py
1
from xml.sax.saxutils import XMLGenerator from io import StringIO from .exceptions import SerializationException class XMLSerializer: """Serializes data to XML""" def __init__(self): self.generator = None def serialize(self, data): """ Serializes data to XML so that it can be ...
Laurawly/tvm-1
refs/heads/master
version.py
2
# 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...
Pivosgroup/google-git-repo
refs/heads/stable
subcmds/version.py
90
# # Copyright (C) 2009 The Android Open Source Project # # 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 la...
AbsentMoniker/ECE463Honors
refs/heads/master
web2py/applications/QuizMe/languages/default.py
180
# coding: utf8 { '!langcode!': 'en-us', '!langname!': 'English (US)', '%s %%(shop)': '%s %%(shop)', '%s %%(shop[0])': '%s %%(shop[0])', '%s %%{quark[0]}': '%s %%{quark[0]}', '%s %%{shop[0]}': '%s %%{shop[0]}', '%s %%{shop}': '%s %%{shop}', '%Y-%m-%d': '%Y-%m-%d', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S', '@markmin\x01*...
denys-duchier/django
refs/heads/master
tests/contenttypes_tests/operations_migrations/0002_rename_foo.py
133
from django.db import migrations def assert_foo_contenttype_not_cached(apps, schema_editor): ContentType = apps.get_model('contenttypes', 'ContentType') try: content_type = ContentType.objects.get_by_natural_key('contenttypes_tests', 'foo') except ContentType.DoesNotExist: pass else: ...
Edu-Glez/Bank_sentiment_analysis
refs/heads/master
env/lib/python3.6/site-packages/urllib3/util/request.py
87
from __future__ import absolute_import from base64 import b64encode from ..packages.six import b, integer_types from ..exceptions import UnrewindableBodyError ACCEPT_ENCODING = 'gzip,deflate' _FAILEDTELL = object() def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=...
gxx/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/modeltests/get_object_or_404/models.py
91
""" 35. DB-API Shortcuts ``get_object_or_404()`` is a shortcut function to be used in view functions for performing a ``get()`` lookup and raising a ``Http404`` exception if a ``DoesNotExist`` exception was raised during the ``get()`` call. ``get_list_or_404()`` is a shortcut function to be used in view functions for...
lamby/trydiffoscope
refs/heads/master
trydiffoscope/utils/test.py
2
from django.test import TestCase from django.shortcuts import resolve_url class TestCase(TestCase): def assertStatusCode(self, status_code, fn, urlconf, *args, **kwargs): response = fn(resolve_url(urlconf, *args, **kwargs)) self.assertEqual( response.status_code, status_cod...
amartinez-cg/OpenShadingLanguage
refs/heads/master
testsuite/MaterialX/mx_divide/mx_divide_vector2/run.py
32
#!/usr/bin/env python import os loc = os.environ["OSLHOME"] + os.environ["MATERIALX_OSOS"]+ "/" def buildCmd(shader, inputs): cmd = "--print " for pName, pValue in inputs.iteritems(): cmd += " -param " + pName + " " + pValue cmd += " " + shader + " -o out mx.exr" return cmd inputs = { "in1.x" : "0.1...
mscansian/awslogs-cmd
refs/heads/master
logstream.py
1
""" logstream.py Small utility lib to stream to AWS Cloud Watch Logs. """ import os import logging import pytz from datetime import datetime import boto3 import botocore CLOUDWATCH_LOGS_REGION = os.environ.get("CLOUDWATCH_LOGS_REGION", "us-east-1") logger = logging.getLogger(__name__) class BaseLogStream: ...
dmacvicar/spacewalk
refs/heads/master
scripts/update_symlinks.py
2
#!/usr/bin/python # # Copyright (c) 2008--2010 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should...
tribeiro/chimera
refs/heads/master
src/chimera/core/path.py
5
import os from chimera.util.findplugins import find_chimera_plugins __all__ = ['ChimeraPath'] class ChimeraPath (object): def __init__(self): # Search for chimera plugins on the sys.path self._controllers_plugins, self._instruments_plugins = find_chimera_plugins() self._instruments = [os...
shikigit/python-phonenumbers
refs/heads/dev
python/tests/testgeodata/data0.py
5
"""Per-prefix data, mapping each prefix to a dict of locale:name. Auto-generated file, do not edit by hand. """ from phonenumbers.util import u # Copyright (C) 2011-2015 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
xuweiliang/Codelibrary
refs/heads/master
openstack_dashboard/dashboards/settings/licensedisplay/views.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
ivan-fedorov/intellij-community
refs/heads/master
python/testData/refactoring/move/conditionalImportFromPackage/before/src/pkg1/__init__.py
12133432
raychorn/knowu
refs/heads/master
django/djangononrelsample2/django/conf/locale/ar/__init__.py
12133432
syphar/django
refs/heads/master
tests/modeladmin/__init__.py
12133432
IlyaDjurin/django-shop
refs/heads/master
shop/apps.py
19
from django.apps import AppConfig class ShopConfig(AppConfig): name = 'shop'
washort/zamboni
refs/heads/master
mkt/api/tests/__init__.py
6
import json from django.db import transaction from mkt.site.tests import TestCase class BaseAPI(TestCase): """ A base test case useful for API testing. """ def _allowed_verbs(self, url, allowed): """ Will run through all the verbs except the ones specified in allowed and ens...
thinker0/aurora
refs/heads/master
src/main/python/apache/thermos/cli/commands/read.py
13
# # 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, software # distributed under ...
gcompris/GCompris-site
refs/heads/master
activity/color/closure/closure/bin/build/treescan.py
39
#!/usr/bin/env python # # Copyright 2010 The Closure Library 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 ...
bzennn/blog_flask
refs/heads/master
python/lib/python3.5/site-packages/alembic/templates/pylons/env.py
41
"""Pylons bootstrap environment. Place 'pylons_config_file' into alembic.ini, and the application will be loaded from there. """ from alembic import context from paste.deploy import loadapp from logging.config import fileConfig from sqlalchemy.engine.base import Engine try: # if pylons app already in, don't cre...
DomainGroupOSS/luigi
refs/heads/master
luigi/scalding.py
37
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
bcornwellmott/frappe
refs/heads/develop
frappe/templates/autodoc/contents.py
42
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe from frappe.website.utils import get_full_index def get_context(context): context.full_index = get_full_index()
anirudhSK/chromium
refs/heads/master
native_client_sdk/src/gonacl_appengine/gonacl.py
26
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import webapp2 application = webapp2.WSGIApplication([ webapp2.Route('/', webapp2.RedirectHandler, defaults={ '_uri': 'http://developers.google.com...
sjaco002/vxquery
refs/heads/master
vxquery-benchmark/src/main/resources/util/diff_xml_files.py
11
#!/usr/bin/env python # # 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 "Lic...
bforbis/thrift
refs/heads/master
test/py/TestSocket.py
21
#!/usr/bin/env python # # 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 # "L...
eadgarchen/tensorflow
refs/heads/master
tensorflow/python/ops/distributions/distribution.py
9
# 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...
acq4/acq4
refs/heads/develop
acq4/pyqtgraph/console/template_pyqt.py
3
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'console/template.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromU...
endlessm/chromium-browser
refs/heads/master
third_party/catapult/third_party/google-endpoints/rsa/__init__.py
79
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
salaria/odoo
refs/heads/8.0
addons/lunch/tests/test_lunch.py
345
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
wolverineav/horizon
refs/heads/master
openstack_dashboard/test/test_panels/__init__.py
12133432
adamklawonn/CityCircles
refs/heads/master
citycircles_iphone/Classes/citycircles_forclient/__init__.py
12133432