repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
sbidoul/pip
refs/heads/main
tests/unit/test_wheel.py
4
"""Tests for wheel binary packages and .dist-info.""" import csv import logging import os import textwrap from email import message_from_string from unittest.mock import patch import pytest from pip._vendor.packaging.requirements import Requirement from pip._internal.exceptions import InstallationError from pip._inte...
davgibbs/django
refs/heads/master
django/templatetags/i18n.py
219
from __future__ import unicode_literals import sys from django.conf import settings from django.template import Library, Node, TemplateSyntaxError, Variable from django.template.base import TOKEN_TEXT, TOKEN_VAR, render_value_in_context from django.template.defaulttags import token_kwargs from django.utils import six...
rvmoura96/projeto-almoxarifado
refs/heads/master
myvenv/Lib/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py
2754
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
Transkribus/TranskribusDU
refs/heads/master
usecases/ctdar/DU_CTDAR.py
1
# -*- coding: utf-8 -*- """ DU task for tagging resolution graph after the SW re-engineering by JLM during the 2019 summer. As of June 5th, 2015, this is the exemplary code Copyright NAVER(C) 2019 Hervé Déjean Developed for the EU project READ. The READ project has ...
adelton/django
refs/heads/master
django/contrib/contenttypes/migrations/0001_initial.py
585
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.contenttypes.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='ContentType', fields=...
vmax-feihu/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/staticfiles_tests/models.py
12133432
smi96/django-blog_website
refs/heads/master
lib/python2.7/site-packages/django/conf/locale/fr/__init__.py
12133432
civisanalytics/ansible
refs/heads/civis
lib/ansible/module_utils/ismount.py
298
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is based on # Lib/posixpath.py of cpython # It is licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 # # 1. This LICENSE AGREEMENT is between the Python Software Foundation # ("PSF")...
AllanNozomu/tecsaladeaula
refs/heads/master
core/migrations/0020_auto__del_field_unit_activity.py
2
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Unit.activity' db.delete_column(u'core_unit', 'activity...
petteyg/intellij-community
refs/heads/master
python/testData/inspections/PyMethodOverridingInspection/LessArgumentsPlusDefaults.py
74
class B: def foo(self, arg1, arg2=None): pass class C(B): def foo<warning descr="Signature of method 'C.foo()' does not match signature of base method in class 'B'">(self, arg1=None)</warning>: #fail pass
sorz/sstp-server
refs/heads/master
sstpd/__init__.py
1
"""A Secure Socket Tunneling Protocol (SSTP) server. https://github.com/sorz/sstp-server """ __version__ = '0.6.0' def run(): from .__main__ import main main()
mlperf/training_results_v0.5
refs/heads/master
v0.5.0/google/cloud_v3.8/resnet-tpuv3-8/code/resnet/model/tpu/models/experimental/qanet/preprocess.py
5
# Copyright 2018 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...
guorendong/iridium-browser-ubuntu
refs/heads/ubuntu/precise
build/android/pylib/instrumentation/test_result.py
87
# Copyright (c) 2012 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 pylib.base import base_test_result class InstrumentationTestResult(base_test_result.BaseTestResult): """Result information for a single instrume...
rafalo1333/kivy
refs/heads/master
kivy/modules/keybinding.py
81
'''Keybinding ========== This module forces the mapping of some keys to functions: * F11: Rotate the Window through 0, 90, 180 and 270 degrees * Shift + F11: Switches between portrait and landscape on desktops * F12: Take a screenshot Note: this does't work if the application requests the keyboard beforehand. Usage...
imply/chuu
refs/heads/master
ppapi/native_client/src/tools/srpcgen.py
79
#!/usr/bin/env python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Build "SRPC" interfaces from specifications. SRPC interfaces consist of one or more interface classes, typically defined i...
ceph/gtest
refs/heads/master
scripts/gen_gtest_pred_impl.py
2538
#!/usr/bin/env python # # Copyright 2006, 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...
johson/shell
refs/heads/master
photo/photo/spiders/test_photo/photo.py
1
# coding=utf-8 import time import json from scrapy import Request, FormRequest, Selector from scrapy.spiders import CrawlSpider __author__ = 'yss' class CuccresetSpider(CrawlSpider): name = 'stocksnap' # allowed_domains = ['10086.com'] start_urls = ['https://stocksnap.io/photo/FY58O0P400'] def __ini...
TanguyPatte/phantomjs-packaging
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/mac_unittest.py
117
# Copyright (C) 2010 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 f...
ravindrapanda/tensorflow
refs/heads/master
tensorflow/contrib/boosted_trees/python/utils/losses_test.py
33
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mpalomer/micropython
refs/heads/master
tests/pyb/timer_callback.py
96
# check callback feature of the timer class import pyb from pyb import Timer # callback function that disables the callback when called def cb1(t): print("cb1") t.callback(None) # callback function that disables the timer when called def cb2(t): print("cb2") t.deinit() # callback where cb4 closes ov...
mattdennewitz/fangraphs-steamer-scraper
refs/heads/master
steamer-to-csv.py
2
import collections import json import click import unicodecsv as csv def parse_object(obj, path=''): """Borrowed from `csvkit` """ if isinstance(obj, dict): iterator = obj.items() elif isinstance(obj, (list, tuple)): iterator = enumerate(obj) else: return { path.strip('/...
BassantMorsi/finderApp
refs/heads/master
lib/python2.7/site-packages/django/utils/regex_helper.py
45
""" Functions for reversing a regular expression (used in reverse URL resolving). Used internally by Django and not intended for external use. This is not, and is not intended to be, a complete reg-exp decompiler. It should be good enough for a large class of URLS, however. """ from __future__ import unicode_literals ...
hynnet/openwrt-mt7620
refs/heads/master
staging_dir/host/lib/python2.7/test/doctest_aliases.py
137
# Used by test_doctest.py. class TwoNames: '''f() and g() are two names for the same method''' def f(self): ''' >>> print TwoNames().f() f ''' return 'f' g = f # define an alias for f
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/db/migrations/graph.py
81
from __future__ import unicode_literals from collections import deque from django.db.migrations.state import ProjectState from django.utils.datastructures import OrderedSet from django.utils.encoding import python_2_unicode_compatible from django.utils.functional import total_ordering @python_2_unicode_compatible @...
dmlc/tvm
refs/heads/main
tests/python/topi/python/common.py
5
# 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...
zaxliu/scipy
refs/heads/master
scipy/linalg/tests/test_decomp.py
26
""" Test functions for linalg.decomp module """ from __future__ import division, print_function, absolute_import __usage__ = """ Build linalg: python setup_linalg.py build Run tests if scipy is installed: python -c 'import scipy;scipy.linalg.test()' Run tests if linalg is not installed: python tests/test_decomp...
classmember/proof_of_concept
refs/heads/master
python/events/lib/python3.4/site-packages/pip/_vendor/ipaddress.py
48
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version...
yavalvas/yav_com
refs/heads/master
build/matplotlib/doc/mpl_examples/api/mathtext_asarray.py
12
""" Load a mathtext image as numpy array """ import numpy as np import matplotlib.mathtext as mathtext import matplotlib.pyplot as plt import matplotlib matplotlib.rc('image', origin='upper') parser = mathtext.MathTextParser("Bitmap") parser.to_png('test2.png', r'$\left[\left\lfloor\frac{5}{\frac{\left(3\right)}{4}...
nburn42/tensorflow
refs/heads/master
tensorflow/python/estimator/keras.py
3
# 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...
dcroc16/skunk_works
refs/heads/master
google_appengine/google/appengine/api/search/__init__.py
8
#!/usr/bin/env python # # 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 # # Unless required by applicable law o...
smallyear/linuxLearn
refs/heads/master
salt/salt/states/modjk_worker.py
3
# -*- coding: utf-8 -*- ''' Manage modjk workers ==================== Send commands to a :strong:`modjk` load balancer via the peer system. This module can be used with the :doc:`prereq </ref/states/requisites>` requisite to remove/add the worker from the load balancer before deploying/restarting service. Mandatory ...
bucknerns/concordance
refs/heads/master
concordance/__init__.py
1
""" Created by Nathan Buckner """ from concordance.simple_concordance_module import ( ConcordanceGenerator as Generator)
TheWrenchh/lpthw
refs/heads/master
exp13.py
1
from sys import argv script, first, second, third = argv print "The script is called:", script print "Your first variable is:", first print "Your second variable is :", second print "Your third variable is:", third
mariianna/kodi
refs/heads/master
lib/gdata/tlslite/Checker.py
359
"""Class for post-handshake certificate checking.""" from utils.cryptomath import hashAndBase64 from X509 import X509 from X509CertChain import X509CertChain from errors import * class Checker: """This class is passed to a handshake function to check the other party's certificate chain. If a handshake f...
advatar/caffe
refs/heads/master
tools/extra/extract_seconds.py
58
#!/usr/bin/env python import datetime import os import sys def extract_datetime_from_line(line, year): # Expected format: I0210 13:39:22.381027 25210 solver.cpp:204] Iteration 100, lr = 0.00992565 line = line.strip().split() month = int(line[0][1:3]) day = int(line[0][3:]) timestamp = line[1] p...
Collisio-Adolebitque/pfne-2017
refs/heads/master
py-junos-eznc/tests/functional/test_core.py
4
__author__ = "rsherman, vnitinv" import unittest2 as unittest from nose.plugins.attrib import attr from jnpr.junos.exception import RpcTimeoutError @attr('functional') class TestCore(unittest.TestCase): @classmethod def setUpClass(self): from jnpr.junos import Device self.dev = Device(host='...
jthatch12/STi
refs/heads/master
linaro-12-android-toolchain/share/gdb/python/gdb/command/pretty_printers.py
106
# Pretty-printer commands. # Copyright (C) 2010-2012 Free Software Foundation, 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 la...
deepinsight/Deformable-ConvNets
refs/heads/master
Cdiscount/common/data.py
1
import mxnet as mx import random from mxnet.io import DataBatch, DataIter import numpy as np def add_data_args(parser): data = parser.add_argument_group('Data', 'the input images') data.add_argument('--data-train', type=str, help='the training data') data.add_argument('--data-val', type=str, help='the vali...
BlendOSVR/OSVR-Python
refs/heads/dev
examples/TrackerCallbackPy.py
1
import osvr.ClientKit def myTrackerCallback(userdata, timestamp, report): print("Got POSE report: Position = (%f, %f, %f), orientation = (%f, %f, %f, %f)\n" % (report.contents.pose.translation.data[0], report.contents.pose.translation.data[1], report.contents.pose.translation.data[2], report.contents.pose.rotation.dat...
haad/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_vpc_net.py
9
#!/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': ['stableinterf...
Johnzero/erp
refs/heads/fga
openerp/report/render/makohtml2html/__init__.py
76
# -*- 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...
ladylovelace/acaidera
refs/heads/master
blog/tests.py
24123
from django.test import TestCase # Create your tests here.
jessepeterson/commandment
refs/heads/master
commandment/alembic/versions/a3ddaad5c358_add_dep_device_columns.py
1
"""Add DEP device columns Revision ID: a3ddaad5c358 Revises: 2808deb9fc62 Create Date: 2018-07-04 21:44:41.549806 """ # From: http://alembic.zzzcomputing.com/en/latest/cookbook.html#conditional-migration-elements from alembic import op import sqlalchemy as sa import commandment.dbtypes from alembic import context...
akatrevorjay/slask
refs/heads/master
plugins/gif.py
1
"""!gif <search term> return a random result from the google gif search result for <search term>""" from urllib import quote import re import requests from random import randint, choice, shuffle def gif(searchterm_raw): # There's a chance of pandas today eggs = ['panda', 'dickbutt', 'nickleback'] if ran...
sarahgrogan/scikit-learn
refs/heads/master
sklearn/utils/tests/test_stats.py
304
import numpy as np from numpy.testing import TestCase from sklearn.utils.testing import assert_array_equal from sklearn.utils.stats import rankdata _cases = ( # values, method, expected ([100], 'max', [1.0]), ([100, 100, 100], 'max', [3.0, 3.0, 3.0]), ([100, 300, 200], 'max', [1.0, 3.0, 2.0]), ([...
ReachingOut/unisubs
refs/heads/staging
apps/videos/migrations/0037_auto__add_unique_subtitle_version_subtitle_id.py
5
# 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): if not db.dry_run: # remove subtitles that don't have a unique (version, subtitle_id) pair # (...
kemalakyol48/python-for-android
refs/heads/master
python-modules/twisted/twisted/conch/topfiles/setup.py
52
# Copyright (c) 2009 Twisted Matrix Laboratories. # See LICENSE for details. import sys try: from twisted.python import dist except ImportError: raise SystemExit("twisted.python.dist module not found. Make sure you " "have installed the Twisted core package before " ...
lambday/shogun
refs/heads/develop
examples/undocumented/python/converter_localitypreservingprojections.py
4
#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data,20],[data,30]] def converter_localitypreservingprojections (data_fname,k): from shogun import CSVFile from shogun import LocalityPreservingProjections features = sg.features(CSVFile(data_fname)) converter = LocalityPreservingProjecti...
wolfskaempf/ga_statistics
refs/heads/master
lib/python2.7/site-packages/crispy_forms/tests/test_layout.py
10
# -*- coding: utf-8 -*- import django from django import forms from django.conf import settings from django.core.urlresolvers import reverse from django.forms.models import formset_factory, modelformset_factory from django.middleware.csrf import _get_new_csrf_key from django.shortcuts import render_to_response from dja...
joke2k/faker
refs/heads/master
faker/providers/currency/ro_RO/__init__.py
1
from .. import Provider as CurrencyProvider class Provider(CurrencyProvider): price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] def pricetag(self): return ( self.numerify(self.random_element(self.price_formats)) + "\N{no-break space}Lei" )
jonasstein/cryspy
refs/heads/master
tests/blendertest/blenderscript2.py
3
import bpy import bmesh for ob in bpy.data.objects: if ob.name.startswith('structure'): ob.select = True bpy.ops.object.delete() for me in bpy.data.meshes: if me.name.startswith('structure'): bpy.data.meshes.remove(me) for mat in bpy.data.materials: if mat.name.startswith('structure'): ...
qifeigit/scikit-learn
refs/heads/master
sklearn/metrics/tests/test_pairwise.py
105
import numpy as np from numpy import linalg from scipy.sparse import dok_matrix, csr_matrix, issparse from scipy.spatial.distance import cosine, cityblock, minkowski, wminkowski from sklearn.utils.testing import assert_greater from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing impo...
lavish205/olympia
refs/heads/master
src/olympia/translations/tests/test_models.py
1
# -*- coding: utf-8 -*- import re import django from django.conf import settings from django.db import connections, reset_queries from django.test import TransactionTestCase from django.test.utils import override_settings from django.utils import translation from django.utils.functional import lazy import jinja2 imp...
ivan-fedorov/intellij-community
refs/heads/master
python/testData/inspections/PyTypeCheckerInspection/DictLiterals.py
49
def test(): xs = {'foo': 1, 'bar': 2} for v in xs.values(): print(v + <warning descr="Expected type 'Number', got 'None' instead">None</warning>) for k in xs.keys(): print(k + <warning descr="Expected type 'Union[str, unicode]', got 'None' instead">None</warning>) for k in xs: pr...
Justin-Yuan/Image2Music-Generator
refs/heads/master
library/jython2.5.3/Lib/zlib.py
82
""" The functions in this module allow compression and decompression using the zlib library, which is based on GNU zip. adler32(string[, start]) -- Compute an Adler-32 checksum. compress(string[, level]) -- Compress string, with compression level in 1-9. compressobj([level]) -- Return a compressor object. crc32(string...
JaviMerino/workload-automation
refs/heads/master
wlauto/utils/types.py
2
# Copyright 2014-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
wenhuizhang/neutron
refs/heads/master
neutron/extensions/dhcpagentscheduler.py
29
# Copyright (c) 2013 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...
vmax-feihu/hue
refs/heads/master
desktop/core/ext-py/tablib-0.10.0/tablib/packages/yaml3/scanner.py
235
# Scanner produces tokens of the following types: # STREAM-START # STREAM-END # DIRECTIVE(name, value) # DOCUMENT-START # DOCUMENT-END # BLOCK-SEQUENCE-START # BLOCK-MAPPING-START # BLOCK-END # FLOW-SEQUENCE-START # FLOW-MAPPING-START # FLOW-SEQUENCE-END # FLOW-MAPPING-END # BLOCK-ENTRY # FLOW-ENTRY # KEY # VALUE # AL...
SlimRoms/android_external_chromium_org
refs/heads/lp5.0
tools/telemetry/telemetry/web_perf/__init__.py
99
# 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. """ The web_perf module provides utilities and measurements for benchmarking web app's performance. """
AndreyPopovNew/asuswrt-merlin-rt-n
refs/heads/master
release/src/router/samba36/lib/dnspython/dns/rdtypes/IN/__init__.py
250
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
openelections/openelections-core
refs/heads/dev
openelex/us/or/datasource.py
1
""" Oregon has CSV files containing precinct-level results for each county and all offices for all years back to 2000. All of the files are pre-processed and available on Github at https://github.com/openelections/openelections-data-or. For regular primary and general elections, there are statewide county-level files....
splunk/splunk-webframework
refs/heads/master
contrib/requests/requests/packages/chardet/langthaimodel.py
235
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
willthames/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_volume.py
66
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Jefferson Girão <jefferson@girao.net> # (c) 2015, René Moser <mail@renemoser.net> # # 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...
johankaito/fufuka
refs/heads/master
node_modules/kafka-node/node_modules/snappy/node_modules/pangyp/gyp/pylib/gyp/MSVSNew.py
601
# Copyright (c) 2012 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. """New implementation of Visual Studio project generation.""" import os import random import gyp.common # hashlib is supplied as of Python 2.5 as the replacemen...
johnkeepmoving/oss-ftp
refs/heads/master
python27/win32/Lib/distutils/msvccompiler.py
250
"""distutils.msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio. """ # Written by Perry Stoll # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) __revision__ = "$Id$" import sys import os im...
0-wiz-0/audacity
refs/heads/master
lib-src/lv2/sratom/waflib/extras/autowaf.py
176
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import glob import os import subprocess import sys from waflib import Configure,Context,Logs,Node,Options,Task,Utils from waflib.TaskGen import feature,before,after global g_i...
samueldotj/TeeRISC-Simulator
refs/heads/master
src/arch/x86/isa/insts/general_purpose/rotate_and_shift/__init__.py
91
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
naresh21/synergetics-edx-platform
refs/heads/oxa/master.fic
openedx/core/djangoapps/cors_csrf/views.py
10
"""Views for enabling cross-domain requests. """ import logging import json from django.conf import settings from django.views.decorators.cache import cache_page from django.http import HttpResponseNotFound from edxmako.shortcuts import render_to_response from .models import XDomainProxyConfiguration log = logging.g...
BizzCloud/PosBox
refs/heads/master
addons/hr_gamification/__openerp__.py
62
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
nitzmahone/ansible
refs/heads/devel
lib/ansible/plugins/lookup/__init__.py
89
# (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...
jmcorgan/gnuradio
refs/heads/master
gr-fec/python/fec/qa_polar_decoder_sc_systematic.py
24
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
lehinevych/cfme_tests
refs/heads/master
scripts/install_snmp_listener.py
4
#!/usr/bin/env python2 """SSH into a running appliance and install SNMP listener.""" import argparse import requests import sys from utils.conf import credentials from utils.path import scripts_data_path from utils.ssh import SSHClient def main(): parser = argparse.ArgumentParser(epilog=__doc__, format...
kchodorow/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/tests/__init__.py
118
# 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...
Korkki/django-base-template
refs/heads/master
manage.py
30
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings.dev") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
tayfun/django
refs/heads/master
tests/user_commands/tests.py
205
import os from django.apps import apps from django.core import management from django.core.management import BaseCommand, CommandError, find_commands from django.core.management.utils import find_command, popen_wrapper from django.db import connection from django.test import SimpleTestCase, ignore_warnings, override_s...
evanscottgray/ryu
refs/heads/master
ryu/contrib/ncclient/operations/rpc.py
31
# Copyright 2009 Shikhar Bhushan # # 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 writin...
AISpace2/AISpace2
refs/heads/master
aipython/probGraphicalModels.py
1
from .probFactors import Prob from .probVariables import Variable from .utilities import Displayable # probGraphicalModels.py - Graphical Models and Belief Networks # AIFCA Python3 code Version 0.7.1 Documentation at http://aipython.org # Artificial Intelligence: Foundations of Computational Agents # http://artint.in...
danieljaouen/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_snapshot.py
71
#!/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'], ...
ashutrix03/inteygrate_flaskapp-master
refs/heads/master
build/lib/google/protobuf/internal/_parameterized.py
87
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
sarantapichos/faircoop-market
refs/heads/master
addons/crm/wizard/crm_phonecall_to_meeting.py
381
# -*- 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...
frappe/frappe
refs/heads/develop
frappe/patches/v11_0/create_contact_for_user.py
1
import frappe from frappe.core.doctype.user.user import create_contact import re def execute(): """ Create Contact for each User if not present """ frappe.reload_doc('integrations', 'doctype', 'google_contacts') frappe.reload_doc('contacts', 'doctype', 'contact') frappe.reload_doc('core', 'doctype', 'dynamic_link...
naro/django-guardian
refs/heads/master
guardian/migrations/0005_auto__chg_field_groupobjectpermission_object_pk__chg_field_userobjectp.py
32
# 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): pass def backwards(self, orm): pass models = { 'auth.group': { 'Me...
TangHao1987/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/hgext/largefiles/lfutil.py
93
# Copyright 2009-2010 Gregory P. Ward # Copyright 2009-2010 Intelerad Medical Systems Incorporated # Copyright 2010-2011 Fog Creek Software # Copyright 2010-2011 Unity Technologies # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '...
uwafsl/MissionPlanner
refs/heads/master
Lib/encodings/cp500.py
93
""" Python Character Mapping Codec cp500 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP500.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 deco...
Serg09/socorro
refs/heads/master
webapp-django/crashstats/symbols/tests/test_models.py
14
import os from nose.tools import ok_ from django.contrib.auth.models import User from crashstats.base.tests.testbase import DjangoTestCase from crashstats.symbols import models from .base import ZIP_FILE class TestModels(DjangoTestCase): def test_create_symbols_upload(self): user = User.objects.create...
aesoll/astrogen
refs/heads/master
astrogen/astrogen.py
2
#!/usr/bin/env python # Pipeline for solving the astrometry of image files # astrogen.py # # Authors: # Philipp v. Bieberstein (pbieberstein@email.arizona.edu) # Matt Madrid (matthewmadrid@email.arizona.edu) # David Sidi (dsidi@email.arizona.edu) # Adam Soll (adamsoll@email.arizona.edu) """ Scalably solve astr...
pwmarcz/django
refs/heads/master
django/db/backends/dummy/__init__.py
12133432
andela-ooladayo/django
refs/heads/master
tests/dates/__init__.py
12133432
jarshwah/django
refs/heads/master
django/views/decorators/__init__.py
12133432
Nexenta/cinder
refs/heads/master
cinder/hacking/__init__.py
12133432
prakharjain09/qds-sdk-py
refs/heads/master
setup.py
2
import os import sys from setuptools import setup INSTALL_REQUIRES = ['requests >=1.0.3', 'boto >=2.1.1', 'six >=1.2.0', 'urllib3 >= 1.0.2', 'inflection >= 0.3.1'] if sys.version_info < (2, 7, 0): INSTALL_REQUIRES.append('argparse>=1.1') def read(fname): return open(os.path.join(os.path.dirname(__file__), fn...
kk47/Python
refs/heads/master
django/td2.0/app/forms.py
1
# coding: utf-8 from django import forms from models import * #from django.contrib.localflavor.us.forms import USPhoneNumberField from django.contrib.auth.models import User from django.forms.fields import DateField, ChoiceField, MultipleChoiceField from django.forms.widgets import RadioSelect, CheckboxSelectMultiple f...
lazywei/scikit-learn
refs/heads/master
examples/svm/plot_svm_nonlinear.py
61
""" ============== Non-linear SVM ============== Perform binary classification using non-linear SVC with RBF kernel. The target to predict is a XOR of the inputs. The color map illustrates the decision function learn by the SVC. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn impor...
SurfasJones/icecream-info
refs/heads/master
icecream/lib/python2.7/site-packages/djangocms_text_ckeditor/__init__.py
3
__version__ = "2.1.4"
btabibian/scikit-learn
refs/heads/master
sklearn/gaussian_process/correlation_models.py
72
# -*- coding: utf-8 -*- # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # (mostly translation, see implementation details) # License: BSD 3 clause """ The built-in correlation models submodule for the gaussian_process module. """ import numpy as np def absolute_exponential(theta, d): """ Abs...
Acehaidrey/incubator-airflow
refs/heads/master
tests/providers/microsoft/azure/operators/test_azure_cosmos.py
10
# # 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...
vincentlooi/FCIS
refs/heads/master
lib/dataset/ds_utils.py
21
import numpy as np def unique_boxes(boxes, scale=1.0): """ return indices of unique boxes """ v = np.array([1, 1e3, 1e6, 1e9]) hashes = np.round(boxes * scale).dot(v) _, index = np.unique(hashes, return_index=True) return np.sort(index) def filter_small_boxes(boxes, min_size): w = boxes[:, 2...
xaviercobain88/framework-python
refs/heads/master
openerp/addons/mrp/report/mrp_report.py
56
# -*- 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...
Bachaco-ve/odoo
refs/heads/8.0
addons/payment/tests/common.py
392
# -*- coding: utf-8 -*- from openerp.tests import common class PaymentAcquirerCommon(common.TransactionCase): def setUp(self): super(PaymentAcquirerCommon, self).setUp() self.payment_acquirer = self.registry('payment.acquirer') self.payment_transaction = self.registry('payment.transactio...
3ev0/rdns-monitor
refs/heads/master
rdnsmonitor/work.py
1
import threading import logging import datetime import socket import dns.resolver import dns.reversename import dns.exception from dns.exception import Timeout from rdnsmonitor import handy log = logging.getLogger(__name__) class SERVFAIL(dns.exception.DNSException): pass class CommException(dns.exception.DNSE...