repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
apixandru/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/db/backends/util.py
377
""" A collection of utility routines and classes used by the spatial backends. """ def gqn(val): """ The geographic quote name function; used for quoting tables and geometries (they use single rather than the double quotes of the backend quotename function). """ if isinstance(val, basestring): ...
stvstnfrd/edx-platform
refs/heads/master
import_shims/lms/certificates/views/__init__.py
2
"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import warn_deprecated_import('certificates.views', 'lms.djangoapps.certificates....
utkbansal/kuma
refs/heads/master
vendor/packages/dbgettext/management/commands/dbgettext_export.py
21
from django.conf import settings from django.core.management.base import NoArgsCommand, CommandError import os import re from shutil import rmtree from dbgettext.registry import registry from dbgettext.parser import parsed_gettext INVALID_ESCAPE_SEQUENCES = re.compile(r'[\a\b\f\r\v]') # (see xgettext's write-po.c) ...
itslukej/ezzybot
refs/heads/master
ezzybot/util/config.py
4
import socks required = ["nick", "host", "port"] class config(object): '''Config class for the bot''' def __init__(self, config): '''Takes dictionary and gets all information, if it is not in dictionary uses default''' self.host = config.get("host", "irc.freenode.net") self.port = conf...
titasakgm/brc-stock
refs/heads/master
openerp/addons/base_quality_interrogation.py
58
#!/usr/bin/env python # -*- 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 ...
agry/NGECore2
refs/heads/master
scripts/object/static/space/debris/xwing_debris_b.py
85615
import sys def setup(core, object): return
citrix-openstack/build-swift
refs/heads/ctx-nova-network-smoke-latest
swift/container/replicator.py
2
# Copyright (c) 2010-2012 OpenStack, 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 agreed to ...
Perferom/android_external_chromium_org
refs/heads/android-4.4
third_party/tlslite/tlslite/utils/Python_RSAKey.py
122
"""Pure-Python RSA implementation.""" from cryptomath import * import xmltools from ASN1Parser import ASN1Parser from RSAKey import * class Python_RSAKey(RSAKey): def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0): if (n and not e) or (e and not n): raise AssertionError() ...
dreamsxin/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/json/encoder.py
88
"""Implementation of JSONEncoder """ import re try: from _json import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from _json import make_encoder as c_make_encoder except ImportError: c_make_encoder = None ESCAPE = re.compile(r'[\x00-\x...
daniel-muthukrishna/DASH
refs/heads/master
astrodash/unzip_data_files.py
1
import zipfile import os def unzip_data_files(dataZipFilename): print("Unzipping data files...") scriptDirectory = os.path.dirname(os.path.abspath(__file__)) zipRef = zipfile.ZipFile(os.path.join(scriptDirectory, dataZipFilename), 'r') zipRef.extractall(os.path.join(scriptDirectory, dataZipFilename.st...
2015fallhw/cptocadp
refs/heads/master
static/Brython3.2.3-20151122-082712/Lib/xml/dom/minidom.py
9
"""Simple implementation of the Level 1 DOM. Namespaces and other minor Level 2 features are also supported. parse("foo.xml") parseString("<foo><bar/></foo>") Todo: ===== * convenience methods for getting elements and text. * more testing * bring some of the writer and linearizer code into conformanc...
piffey/ansible
refs/heads/devel
test/units/plugins/inventory/test_group.py
32
# Copyright 2018 Alan Rominger <arominge@redhat.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) any late...
ivozandhuis/ApeApi
refs/heads/master
searchEadFacets.py
1
#! /usr/bin/env python3 serviceToTest = '/search/ead' # Python3 script to test the services of the API of Archives Portal Europe # see http://www.archivesportaleurope.net/information-api # see http://www.github.com/ivozandhuis/APEAPI import requests import json import csv import time import datetime import sys impo...
marcel-dancak/bass-cloud
refs/heads/master
server/setup.py
1
#!/usr/bin/env python import os from setuptools import setup, find_packages # classifiers classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: End Users/Desktop', 'License :: OSI Approved :: GNU General Public License ver...
dagoaty/eve-wspace
refs/heads/master
evewspace/Recruitment/models.py
14
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # 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 ...
fangxingli/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/admin/actions.py
105
""" Built-in, globally-available admin actions. """ from django.core.exceptions import PermissionDenied from django.contrib import messages from django.contrib.admin import helpers from django.contrib.admin.util import get_deleted_objects, model_ngettext from django.db import router from django.template.response impor...
mitya57/django
refs/heads/master
django/contrib/gis/utils/ogrinfo.py
131
""" This module includes some utility functions for inspecting the layout of a GDAL data source -- the functionality is analogous to the output produced by the `ogrinfo` utility. """ from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.geometries import GEO_CLASSES def ogrinfo(data_source, num...
spring-week-topos/horizon-week
refs/heads/spring-week
horizon/forms/base.py
10
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
MSusik/invenio
refs/heads/master
invenio/modules/oauth2server/testsuite/helpers.py
1
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
Alwnikrotikz/mpmath
refs/heads/master
mpmath/conftest.py
32
# The py library is part of the "py.test" testing suite (python-codespeak-lib # on Debian), see http://codespeak.net/py/ import py #this makes py.test put mpath directory into the sys.path, so that we can #"import mpmath" from tests nicely rootdir = py.magic.autopath().dirpath()
nicobustillos/odoo
refs/heads/8.0
addons/account_budget/__init__.py
444
# -*- 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...
froyobin/ironic
refs/heads/our_branch
ironic/common/swift.py
7
# # Copyright 2014 OpenStack Foundation # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
emartonline/newfies-dialer
refs/heads/master
newfies/api/callrequest_api.py
7
# -*- coding: utf-8 -*- # # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2012 Star2Bi...
comeanother/ownCA
refs/heads/master
ownCA/settings.py
1
""" Django settings for ownCA project. Generated by 'django-admin startproject' using Django 1.10. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os # ...
glovebx/odoo
refs/heads/8.0
addons/auth_signup/__init__.py
446
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
837468220/python-for-android
refs/heads/master
python3-alpha/python3-src/Tools/scripts/fixps.py
112
#!/usr/bin/env python3 # Fix Python script(s) to reference the interpreter via /usr/bin/env python. # Warning: this overwrites the file without making a backup. import sys import re def main(): for filename in sys.argv[1:]: try: f = open(filename, 'r') except IOError as msg: ...
hunch/hunch-gift-app
refs/heads/master
django/utils/tree.py
12
""" A class for storing a tree graph. Primarily used for filter constructs in the ORM. """ from django.utils.copycompat import deepcopy class Node(object): """ A single internal node in the tree graph. A Node should be viewed as a connection (the root) with the children being either leaf nodes o...
QuinceySun/Python
refs/heads/master
crossincode.com/Python_Getting_Started/choice3.py
2
from random import choice score = [0, 0] direction = ['left', 'center', 'right'] def kick(): print('==== You Kick! ====') print('Choose one side to shoot: ') print('left, center, right') you = input() print('You kicked ' + you) com = choice(direction) print('Computer saved ' + com) if...
karec/oct-browser
refs/heads/master
octbrowser/browser.py
1
"""This file contain the main class for the octbrowser It represent a simple browser object with all methods """ import re import os import lxml.html as lh import requests from lxml.cssselect import CSSSelector from octbrowser.exceptions import FormNotFoundException, NoUrlOpen, LinkNotFound, NoFormWaiting, HistoryI...
KIGOTHO/CodeIgniter
refs/heads/develop
user_guide_src/cilexer/cilexer/cilexer.py
241
# CodeIgniter # http://codeigniter.com # # An open source application development framework for PHP # # This content is released under the MIT License (MIT) # # Copyright (c) 2014 - 2015, British Columbia Institute of Technology # # Permission is hereby granted, free of charge, to any person obtaining a copy # of thi...
clokep/pelican-plugins
refs/heads/master
video_privacy_enhancer/__init__.py
67
from .video_privacy_enhancer import *
mshafiq9/django
refs/heads/master
django/core/checks/security/sessions.py
477
from django.conf import settings from .. import Tags, Warning, register def add_session_cookie_message(message): return message + ( " Using a secure-only session cookie makes it more difficult for " "network traffic sniffers to hijack user sessions." ) W010 = Warning( add_session_cookie_...
Johnzero/erp
refs/heads/fga
openerp/addons/fetchmail/__init__.py
9
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # mga@tinyerp.com # # This program is free software: you can redistribute it and/o...
agarciamontoro/root
refs/heads/master
interpreter/llvm/src/tools/clang/utils/ABITest/Enumeration.py
110
"""Utilities for enumeration of finite and countably infinite sets. """ ### # Countable iteration # Simplifies some calculations class Aleph0(int): _singleton = None def __new__(type): if type._singleton is None: type._singleton = int.__new__(type) return type._singleton def __r...
mastizada/kuma
refs/heads/master
vendor/packages/pylint/test/input/func_method_without_self_but_self_assignment.py
6
# pylint: disable-msg=R0903 """regression test: setup() leads to "unable to load module..." """ __revision__ = 1 class Example: """bla""" def __init__(self): pass def setup(): "setup without self" self.foo = 1
Jetsly/pjsip-csharp
refs/heads/master
tests/pjsua/scripts-sendto/140_sdp_with_direction_attr_in_session_1.py
58
# $Id: 140_sdp_with_direction_attr_in_session_1.py 3086 2010-02-03 14:43:25Z nanang $ import inc_sip as sip import inc_sdp as sdp # Offer contains "sendonly" attribute in the session. Answer should # respond with appropriate direction in session or media sdp = \ """ v=0 o=- 0 0 IN IP4 127.0.0.1 s=- c=IN IP4 127.0.0.1 ...
debayanray/ironic_backup
refs/heads/fix_for_bug_1418327_node_boot_mode
ironic/tests/drivers/drac/test_power.py
3
# # 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...
JoeyCodinja/INFO3180PROJECT3
refs/heads/master
lib/flask/testsuite/test_apps/flaskext/oldext_simple.py
629
ext_id = 'oldext_simple'
vivekanand1101/neutron
refs/heads/master
neutron/agent/linux/daemon.py
25
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
tsufiev/horizon
refs/heads/master
openstack_dashboard/policy_backend.py
19
# # 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 # ...
HyperBaton/ansible
refs/heads/devel
test/units/modules/network/check_point/test_cp_mgmt_application_site_facts.py
19
# Ansible module to manage CheckPoint Firewall (c) 2019 # # 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 dist...
tobspr/panda3d
refs/heads/master
direct/src/directscripts/extract_docs.py
6
""" This script generates a pandadoc.hpp file representing the Python wrappers that can be parsed by doxygen to generate the Python documentation. You need to run this before invoking Doxyfile.python. It requires a valid makepanda installation with interrogatedb .in files in the lib/pandac/input directory. """ from _...
eammx/proyectosWeb
refs/heads/master
proyectoPython/env/lib/python3.6/site-packages/pip/_vendor/pep517/colorlog.py
56
"""Nicer log formatting with colours. Code copied from Tornado, Apache licensed. """ # Copyright 2012 Facebook # # 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/licen...
JohnDenker/brython
refs/heads/master
www/src/Lib/test/test_urlparse.py
31
#! /usr/bin/env python3 from test import support import unittest import urllib.parse RFC1808_BASE = "http://a/b/c/d;p?q#f" RFC2396_BASE = "http://a/b/c/d;p?q" RFC3986_BASE = 'http://a/b/c/d;p?q' SIMPLE_BASE = 'http://a/b/c/d' # A list of test cases. Each test case is a two-tuple that contains # a string with the q...
elkingtonmcb/nupic
refs/heads/master
src/math/stats.py
40
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
cmollet/edifice
refs/heads/master
philadelphia/printshapes.py
1
from pymongo import Connection philly = Connection()['philly'] records = philly.catalog.find() # coding: utf-8 for i in records: if 'data_types' in i: if 'SHP' in i['data_types']: print i['title'], i['url']
Intel-tensorflow/tensorflow
refs/heads/master
tensorflow/python/ops/gradient_checker_v2.py
9
# 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...
robbiet480/home-assistant
refs/heads/dev
homeassistant/components/mysensors/device.py
14
"""Handle MySensors devices.""" from functools import partial import logging from homeassistant.const import ATTR_BATTERY_LEVEL, STATE_OFF, STATE_ON from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity import Entity from .const...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/win32/lib/winerror.py
45
"""Error related constants for win32 Generated by h2py from winerror.h """ # Few extras added manually... TRUST_E_PROVIDER_UNKNOWN = -2146762751 TRUST_E_ACTION_UNKNOWN = -2146762750 TRUST_E_SUBJECT_FORM_UNKNOWN = -2146762749 TRUST_E_SUBJECT_NOT_TRUSTED = -2146762748 # up to here... FACILITY_WINRM = 51 FACILITY_WINDOW...
erickt/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/signed_cookies_tests/models.py
754
# models.py file for tests to run.
chienlieu2017/it_management
refs/heads/master
odoo/addons/payment/__init__.py
1516
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import models
lmprice/ansible
refs/heads/devel
lib/ansible/module_utils/facts/hardware/netbsd.py
223
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
filias/django
refs/heads/master
tests/admin_widgets/urls.py
405
from django.conf.urls import url from . import widgetadmin urlpatterns = [ url(r'^', widgetadmin.site.urls), ]
jmehnle/ansible
refs/heads/devel
lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py
43
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # # 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 la...
jrial/Marlin
refs/heads/Release
Marlin/scripts/createTemperatureLookupMarlin.py
135
#!/usr/bin/python """Thermistor Value Lookup Table Generator Generates lookup to temperature values for use in a microcontroller in C format based on: http://en.wikipedia.org/wiki/Steinhart-Hart_equation The main use is for Arduino programs that read data from the circuit board described here: http://make.rrrf.org/t...
rvs/gpdb
refs/heads/master
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/crashrecovery/test_crash_recovery_schema_topology.py
4
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
lyhapple/django-adminlte
refs/heads/master
core/messageset/views.py
1054
# coding=utf-8
RobertoMalatesta/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/webkit_finder.py
125
# Copyright (c) 2012 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 ...
chasegawa/sakai
refs/heads/master
sitestats/sitestats-tool/src/webapp/html/components/jqueryFileTree/connectors/jqueryFileTree.py
157
# # jQuery File Tree # Python/Django connector script # By Martin Skou # import os import urllib def dirlist(request): r=['<ul class="jqueryFileTree" style="display: none;">'] try: r=['<ul class="jqueryFileTree" style="display: none;">'] d=urllib.unquote(request.POST.get('dir','c:\\temp')) f...
tanglei528/nova
refs/heads/master
nova/cmd/cells.py
26
# Copyright (c) 2012 Rackspace Hosting # 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 req...
google/ctfscoreboard
refs/heads/main
scoreboard/attachments/file.py
1
# Copyright 2016 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
redebian/documentation
refs/heads/master
django/contrib/auth/urls.py
104
# These URLs are normally mapped to /admin/urls.py. This URLs file is # provided as a convenience to those who want to deploy these URLs elsewhere. # This file is also used to provide a reliable view deployment for test purposes. from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^login/$', 'dj...
cemoody/chainer
refs/heads/master
tests/cupy_tests/core_tests/test_elementwise.py
8
import unittest import cupy from cupy import core from cupy import cuda from cupy import testing @testing.gpu class TestElementwise(unittest.TestCase): _multiprocess_can_split_ = True def check_copy(self, dtype, src_id, dst_id): with cuda.Device(src_id): src = testing.shaped_arange((2, ...
captiosus/treadmill
refs/heads/master
tests/cli/admin/__init__.py
4
"""treadmill.cli.admin tests"""
CCI-MOC/GUI-Backend
refs/heads/master
api/v2/exceptions.py
1
# These exceptions will be used *Exclusively* for API v2. # They may be migrated back into api/exceptions.py when v1 is deprecated. from rest_framework import status from rest_framework.response import Response from threepio import logger, api_logger def failure_response(status, message): """ Return a djangor...
mpurzynski/MozDef
refs/heads/master
cron/verify_event_fields.py
3
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation import sys from configlib import getConfig, OptionParse...
spasovski/zamboni
refs/heads/master
apps/users/urls.py
4
from django.conf.urls import include, patterns, url from django.contrib.auth import views as auth_views from session_csrf import anonymous_csrf from . import forms, views from .models import UserProfile USER_ID = r"""(?P<user_id>[^/<>"']+)""" # We need Django to use our User model. auth_views.User = UserProfile ...
abinit/abinit
refs/heads/master
tests/v6/__init__.py
1
"""Global variables associated to the test suite.""" #: List of CPP variables that should be defined in config.h in order to enable this suite. need_cpp_vars = [ ] #: List of keywords that are automatically added to all the tests of this suite. keywords = [ ] #: List of input files inp_files = [ "t01.abi", "t02.abi...
rlinguri/pyfi
refs/heads/master
pyfi/entity/entity/db.py
1
#!/usr/bin/env python import os import sqlite3 import pyfwk # ----------------------------ENTITY-DATABASE----------------------------# class EntityDB(pyfwk.DBase): dbase = None conn = None curs = None @staticmethod def instance(): if not EntityDB.dbase: EntityDB.dbase = Entit...
Ialong/shogun
refs/heads/develop
examples/undocumented/python_modular/graphical/interactive_svm_demo.py
10
""" Shogun demo, based on PyQT Demo by Eli Bendersky Christian Widmer Soeren Sonnenburg License: GPLv3 """ import numpy import sys, os, csv from PyQt4.QtCore import * from PyQt4.QtGui import * import matplotlib from matplotlib.colorbar import make_axes, Colorbar from matplotlib.backends.backend_qt4agg import FigureCa...
rogalski/pylint
refs/heads/master
pylint/pyreverse/diagrams.py
4
# Copyright (c) 2006, 2008-2010, 2012-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2014-2016 Claudiu Popa <pcmanticore@gmail.com> # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """diagram obj...
fabiorinnone/TableauxProofTool
refs/heads/master
src/TableauProof.py
1
''' TableauProof.py @author: fabior ''' import TableauTree, FormulaParser, time, copy from PyQt4 import QtCore from pyparsing import ParseException ''' Class Tableau ''' class Tableau(QtCore.QThread): def __init__(self, strategy, inputString): #rimuovere window per il multithreading QtCore.QThread....
vipins/ccccms
refs/heads/master
env/Lib/site-packages/django/contrib/localflavor/mk/mk_choices.py
91
# -*- coding: utf-8 -*- """ Macedonian municipalities per the reorganization from 2004. """ from django.utils.translation import ugettext_lazy as _ MK_MUNICIPALITIES = ( ('AD', _(u'Aerodrom')), ('AR', _(u'Aračinovo')), ('BR', _(u'Berovo')), ('TL', _(u'Bitola')), ('BG', _(u'Bogdanci')), ('VJ', _...
gsnedders/presto-testo
refs/heads/master
wpt/websockets/autobahn/oberstet-Autobahn-643d2ee/lib/python/autobahn/case/case6_3_2.py
7
# coding=utf-8 ############################################################################### ## ## Copyright 2011 Tavendo GmbH ## ## 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 ...
justinlulejian/fah-gae
refs/heads/master
lib/google/api/label_pb2.py
17
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/api/label.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 from google.protobuf import reflection ...
minhphung171093/GreenERP_V7
refs/heads/master
openerp/addons/account_analytic_plans/__openerp__.py
55
# -*- 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...
zeroth/mould
refs/heads/master
mould/generator.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: abhishek # @Email: abhishek@zeroth.me # @Date: 2015-06-02 11:40:59 # @License: Please read LICENSE file in project root. # @Last Modified by: abhishek # @Last Modified time: 2015-06-12 23:24:43 import os import sys import json from .file_processor import Fi...
jounex/hue
refs/heads/master
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/testapp/models.py
41
from django.db import models from django_extensions.db.models import ActivatorModel from django_extensions.db.fields import AutoSlugField from django_extensions.db.fields import UUIDField from django_extensions.db.fields import ShortUUIDField from django_extensions.db.fields.json import JSONField class Secret(models...
sudheerchintala/LearnEraPlatForm
refs/heads/master
lms/djangoapps/courseware/tests/test_video_mongo.py
18
# -*- coding: utf-8 -*- """Video xmodule tests in mongo.""" import json import unittest from collections import OrderedDict from mock import patch, PropertyMock, MagicMock from django.conf import settings from xblock.fields import ScopeIds from xblock.field_data import DictFieldData from xmodule.video_module import ...
s2hc-johan/nikola
refs/heads/master
scripts/generate_conf.py
18
#!/usr/bin/env python # Generate a conf.py file from the template, using default settings. import nikola.plugins.command.init try: print(nikola.plugins.command.init.CommandInit.create_configuration_to_string()) except: print(nikola.plugins.command.init.CommandInit.create_configuration_to_string().encode('utf-...
ee08b397/HackerRankAlgorithms
refs/heads/master
Sherlock and Array.py
1
# -*- coding: utf-8 -*- """ Problem Statement Watson gives an array A1,A2...AN to Sherlock. Then he asks him to find if there exists an element in the array, such that, the sum of elements on its left is equal to the sum of elements on its right. If there are no elements to left/right, then sum is considered to ...
Nu3001/external_chromium_org
refs/heads/master
webkit/tools/layout_tests/PRESUBMIT.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. """test_expectations.txt presubmit script. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit API ...
kelwang/pan-baidu-download
refs/heads/master
bddown_cli.py
3
#!/usr/bin/env python2 # coding=utf-8 from __future__ import print_function import sys import bddown_help from util import bd_help, usage from command.download import download from command.show import show from command.login import login from command.config import config from command.export import export def execut...
beav/pulp
refs/heads/master
server/test/unit/test_plugin_loader.py
2
# -*- coding: utf-8 -*- # # Copyright © 2011 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
clebergnu/autotest
refs/heads/master
client/common_lib/test_unittest.py
2
#!/usr/bin/python """Unit Tests for autotest.client.common_lib.test""" __author__ = 'gps@google.com (Gregory P. Smith)' import unittest from cStringIO import StringIO import common from autotest_lib.client.common_lib import error, test from autotest_lib.client.common_lib.test_utils import mock class TestTestCase(un...
pombredanne/srvup-rest-framework
refs/heads/master
src/notifications/migrations/0004_auto_20150126_2212.py
6
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('notifications', '0003_auto_20150126_2134'), ] operations = [ migrations.AddField( model_name='notification', ...
vbannai/disk-qos-horizon
refs/heads/master
horizon/tests/test_data/glance_data.py
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 # # Unless required by applicable law or agree...
minrk/pip
refs/heads/master
tests/data/packages/FSPkg/setup.py
25
from setuptools import setup, find_packages version = '0.1' setup(name='FSPkg', version=version, description="File system test package", long_description="""\ File system test package""", classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords='...
Spoken-tutorial/spoken-website
refs/heads/master
cron/delete-existing-tmp-mp4-videos.py
1
from builtins import str import subprocess import MySQLdb import os import time from config import * db = MySQLdb.connect(host = DB_HOST, user = DB_USER, passwd = DB_PASS, \ db = DB_NAME) cur = db.cursor() cur.execute("SELECT ctr.id, ctr.tutorial_detail_id, ctr.common_content_id, \ ctr.language_id, ctr.outlin...
Zverik/omim
refs/heads/master
tools/download_statistics/resolver.py
53
#!/usr/bin/env python #coding: utf-8 import geoip2.database import sys from collections import defaultdict reader = geoip2.database.Reader('./GeoLite2-Country.mmdb') try: with sys.stdin as file: for rec in file: try: parts = rec.strip().split('|') ip = parts[0] from_country = None try: from_c...
minrk/sympy
refs/heads/master
sympy/simplify/tests/test_traversaltools.py
9
"""Tools for applying functions to specified parts of expressions. """ from sympy.simplify.traversaltools import use from sympy import expand, factor, I from sympy.abc import x, y def test_use(): assert use(0, expand) == 0 f = (x + y)**2*x + 1 assert use(f, expand, level=0) == x**3 + 2*x**2*y + x*y**2 ...
bharmon/rvibackend
refs/heads/master
web/sota/migrations/0018_auto_20141106_2116.py
8
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('sota', '0017_auto_20141106_2114'), ] operations = [ migrations.AlterField( model_name='update', name...
flit/pyOCD
refs/heads/develop
test/unit/test_conversion.py
3
# pyOCD debugger # Copyright (c) 2015 Paul Osborne <osbpau@gmail.com> # Copyright (c) 2018-2020 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 ...
sunny414/tryton-client
refs/heads/master
tryton/gui/window/view_form/model/__init__.py
9
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms.
EpistasisLab/scikit-rebate
refs/heads/master
skrebate/_version.py
1
# -*- coding: utf-8 -*- """ scikit-rebate was primarily developed at the University of Pennsylvania by: - Randal S. Olson (rso@randalolson.com) - Pete Schmitt (pschmitt@upenn.edu) - Ryan J. Urbanowicz (ryanurb@upenn.edu) - Weixuan Fu (weixuanf@upenn.edu) - and many more generous open source contrib...
Arundhatii/erpnext
refs/heads/develop
erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.py
32
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt from frappe.model.document import Document from erpnext.controllers.accounts_controller ...
zhouzhenghui/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/lib2to3/fixes/fix_input.py
155
"""Fixer that changes input(...) into eval(input(...)).""" # Author: Andre Roberge # Local imports from .. import fixer_base from ..fixer_util import Call, Name from .. import patcomp context = patcomp.compile_pattern("power< 'eval' trailer< '(' any ')' > >") class FixInput(fixer_base.BaseFix): BM_compatible =...
ruohoruotsi/Wavelet-Tree-Synth
refs/heads/master
edward-examples/beta_bernoulli_ppc.py
1
#!/usr/bin/env python """ A simple coin flipping example. The model is written in TensorFlow. Inspired by Stan's toy example. Probability model Prior: Beta Likelihood: Bernoulli Variational model Likelihood: Mean-field Beta """ from __future__ import absolute_import from __future__ import division from __future_...
tropp/acq4
refs/heads/develop
acq4/util/Canvas/items/ImageCanvasItem.py
2
# -*- coding: utf-8 -*- from acq4.pyqtgraph.Qt import QtCore, QtGui from CanvasItem import CanvasItem import numpy as np import scipy.ndimage as ndimage import acq4.pyqtgraph as pg import acq4.util.DataManager as DataManager import acq4.util.debug as debug class ImageCanvasItem(CanvasItem): def __init__(self, imag...
darren-rogan/CouchPotatoServer
refs/heads/master
libs/sqlalchemy/dialects/mysql/pymysql.py
17
# mysql/pymysql.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Support for the MySQL database via the pymysql adapter. pymysql is available at: ...