repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/numpy/tests/test_ctypeslib.py
13
import sys import numpy as np from numpy.ctypeslib import ndpointer, load_library from numpy.distutils.misc_util import get_shared_lib_extension from numpy.testing import * try: cdll = load_library('multiarray', np.core.multiarray.__file__) _HAS_CTYPE = True except ImportError: _HAS_CTYPE = False class T...
bshaffer/google-api-php-client-services
refs/heads/master
generator/src/googleapis/codegen/template_objects.py
13
#!/usr/bin/python2.7 # Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
stefanseefeld/synopsis
refs/heads/master
Synopsis/Formatters/HTML/Fragments/XRefLinker.py
1
# # Copyright (C) 2000 Stephen Davies # Copyright (C) 2000 Stefan Seefeld # All rights reserved. # Licensed to the public under the terms of the GNU LGPL (>= 2), # see the file COPYING for details. # from Synopsis.Formatters.HTML.Tags import * from Default import Default class XRefLinker(Default): """Adds an xref...
sspanel/shadowsocks
refs/heads/master
shadowsocks/obfsplugin/http_simple.py
11
#!/usr/bin/env python # # Copyright 2015-2015 breakwa11 # # 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...
bbc/kamaelia
refs/heads/master
Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/UI/Pygame/Text.py
6
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
joopert/home-assistant
refs/heads/dev
homeassistant/components/epsonworkforce/sensor.py
5
"""Support for Epson Workforce Printer.""" from datetime import timedelta import logging from epsonprinter_pkg.epsonprinterapi import EpsonPrinterAPI import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_HOST, CONF_MONITORED_CONDITIONS from homeassis...
antonyr/django-haystack
refs/heads/master
test_haystack/test_app_with_hierarchy/__init__.py
26
"""Test app with multiple hierarchy levels above the actual models.py file"""
suyashphadtare/vestasi-erp-new-final
refs/heads/develop
erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py
41
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class SalesInvoiceAdvance(Document): pass
altairpearl/scikit-learn
refs/heads/master
examples/svm/plot_custom_kernel.py
43
""" ====================== SVM with custom kernel ====================== Simple usage of Support Vector Machines to classify a sample. It will plot the decision surface and the support vectors. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn import svm, datasets # import some data...
40123142/2015cd_midterm2
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/browser/html.py
750
from _html import *
seanli9jan/tensorflow
refs/heads/master
tensorflow/contrib/libsvm/python/kernel_tests/decode_libsvm_op_test.py
25
# 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...
google/embedding-tests
refs/heads/master
thought/transformer_layers.py
1
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
agry/NGECore2
refs/heads/master
scripts/object/tangible/ship/components/droid_interface/ddi_z95_basic.py
85615
import sys def setup(core, object): return
pkexcellent/luigi
refs/heads/master
luigi/contrib/webhdfs.py
21
# -*- 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...
jimberlage/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/hyper/hyper/h2/config.py
37
# -*- coding: utf-8 -*- """ h2/config ~~~~~~~~~ Objects for controlling the configuration of the HTTP/2 stack. """ class _BooleanConfigOption(object): """ Descriptor for handling a boolean config option. This will block attempts to set boolean config options to non-bools. """ def __init__(self, ...
lupustr3/opencv_tools
refs/heads/master
ts_tools/concatlogs.py
21
#!/usr/bin/env python from optparse import OptionParser import glob, sys, os, re if __name__ == "__main__": parser = OptionParser() parser.add_option("-o", "--output", dest="output", help="output file name", metavar="FILENAME", default=None) (options, args) = parser.parse_args() if not options.output...
bop/hybrid
refs/heads/master
lib/python2.6/site-packages/django/db/models/sql/aggregates.py
195
""" Classes to represent the default SQL aggregate functions """ from django.db.models.fields import IntegerField, FloatField # Fake fields used to identify aggregate types in data-conversion operations. ordinal_aggregate_field = IntegerField() computed_aggregate_field = FloatField() class Aggregate(object): """...
amit0701/rally
refs/heads/master
rally/cli/cliutils.py
1
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
noba3/KoTos
refs/heads/master
addons/plugin.video.tvondesizonexl/xoze/snapvideo/Movzap.py
3
''' Created on Feb 1, 2014 @author: ajdeveloped@gmail.com This file is part of XOZE. XOZE 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....
nrgaway/qubes-gui-daemon
refs/heads/master
qubesguidaemon/mic.py
1
# -*- encoding: utf-8 -*- # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2017 Marek Marczykowski-Górecki # <marmarek@invisiblethingslab.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
thundergolfer/mAIcroft
refs/heads/master
maicroft/subreddits/sub_data.py
1
# -*- coding: utf-8 -*- import csv import os dir_path = os.path.dirname(os.path.realpath(__file__)) SUBREDDITS_FILENAME = "subreddits.csv" subreddits = [] """ CSV file has the following columns: name - Subreddit name topic_level1 - Level 1 topic. For instance, Entertainment. topic_level2 - Level 2 ...
Glenn-1990/xbmc
refs/heads/master
lib/gtest/scripts/upload.py
2511
#!/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...
isotoma/cmsplugin-filer
refs/heads/develop
cmsplugin_filer_image/migrations/0001_initial.py
17
from south.db import db from django.db import models from cmsplugin_filer_image.models import * class Migration: depends_on = ( ("filer", "0008_polymorphic__del_field_file__file_type_plugin_name"), ) def forwards(self, orm): # Adding model 'FilerImage' db.create_tabl...
rsalmaso/django-allauth
refs/heads/master
allauth/account/auth_backends.py
2
from threading import local from django.contrib.auth.backends import ModelBackend from ..utils import get_user_model from . import app_settings from .app_settings import AuthenticationMethod from .utils import filter_users_by_email, filter_users_by_username _stash = local() class AuthenticationBackend(ModelBacken...
bozokopic/opcut
refs/heads/master
src_py/opcut/csp.py
1
import itertools from opcut import common def calculate(params, method): """Calculate cutting stock problem Args: params (common.Params): input parameters method (common.Method): calculation method Returns: Result """ result = common.Result( params=params, ...
KyleAMoore/KanjiNani
refs/heads/master
Android/.buildozer/android/platform/build/dists/KanjiNani/crystax_python/crystax_python/site-packages/usr/local/share/kivy-examples/tutorials/pong/main.py
15
import kivy kivy.require('1.1.1') from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import NumericProperty, ReferenceListProperty,\ ObjectProperty from kivy.vector import Vector from kivy.clock import Clock class PongPaddle(Widget): score = NumericProperty(0) def bounce_ba...
andresriancho/boto
refs/heads/develop
boto/ec2/elb/healthcheck.py
185
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software wi...
mirestrepo/voxels-at-lems
refs/heads/master
dbrec3d/bof/general/classify/classify_salient.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Mon Feb 14, 2011 @author:Isabel Restrepo A script to classify objects in testing scenes """ import os; import dbrec3d_batch import multiprocessing import Queue import time import random import optparse import sys from math import log, ceil from xml.etree.Eleme...
louietsai/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/json_tests/test_speedups.py
60
from test.json_tests import CTest class TestSpeedups(CTest): def test_scanstring(self): self.assertEqual(self.json.decoder.scanstring.__module__, "_json") self.assertIs(self.json.decoder.scanstring, self.json.decoder.c_scanstring) def test_encode_basestring_ascii(self): self.assertEqu...
stamhe/facebook_mysql
refs/heads/webscalesql-5.6.22.66
xtrabackup/test/python/testtools/tests/__init__.py
42
"""Tests for testtools itself.""" # See README for copyright and licensing details. import unittest def test_suite(): from testtools.tests import ( test_compat, test_content, test_content_type, test_deferredruntest, test_distutilscmd, test_fixturesupport, ...
eyalfa/spark
refs/heads/master
python/pyspark/ml/feature.py
4
# # 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 us...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/gis/tests/geo3d/tests.py
94
from __future__ import absolute_import import os import re from django.utils.unittest import TestCase from django.contrib.gis.db.models import Union, Extent3D from django.contrib.gis.geos import GEOSGeometry, Point, Polygon from django.contrib.gis.utils import LayerMapping, LayerMapError from .models import (City3D,...
Lyleo/nupic
refs/heads/master
nupic/support/log_utils.py
17
# ---------------------------------------------------------------------- # 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...
YannickB/server-tools
refs/heads/8.0
server_environment/tests/test_server_environment.py
54
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
nanolearningllc/edx-platform-cypress-2
refs/heads/master
lms/djangoapps/shoppingcart/processors/CyberSource2.py
68
""" Implementation of the CyberSource credit card processor using the newer "Secure Acceptance API". The previous Hosted Order Page API is being deprecated as of 9/14. For now, we're keeping the older implementation in the code-base so we can quickly roll-back by updating the configuration. Eventually, we should repl...
tobegit3hub/deep_cnn
refs/heads/master
java_predict_client/src/main/proto/tensorflow/contrib/factorization/python/ops/gmm_ops_test.py
14
# 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...
mushorg/snare
refs/heads/master
snare/utils/snare_helpers.py
2
import os import hashlib import mimetypes import json import shutil import argparse import logging from os import walk from distutils.version import StrictVersion from bs4 import BeautifulSoup class VersionManager: def __init__(self): self.logger = logging.getLogger(__name__) self.version = "0.3.0...
uglyboxer/linear_neuron
refs/heads/master
net-p3/lib/python3.5/site-packages/numpy/f2py/tests/test_callback.py
145
from __future__ import division, absolute_import, print_function import math import textwrap from numpy import array from numpy.testing import run_module_suite, assert_, assert_equal, dec import util class TestF77Callback(util.F2PyTest): code = """ subroutine t(fun,a) integer a cf2py intent(out) ...
lzppp/mylearning
refs/heads/master
pbr-0.10.0-py2.7.egg/pbr/hooks/backwards.py
48
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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://...
Denisolt/IEEE-NYIT-MA
refs/heads/master
local/lib/python2.7/site-packages/django/core/mail/backends/locmem.py
638
""" Backend for test environment. """ from django.core import mail from django.core.mail.backends.base import BaseEmailBackend class EmailBackend(BaseEmailBackend): """A email backend for use during test sessions. The test connection stores email messages in a dummy outbox, rather than sending them out ...
markraub/kScan
refs/heads/master
get_ibutton.py
1
import credentials as login import csh_ldap import os def find_user(varID): ibutton = varID.strip() ibutton = "*" + ibutton try: instance = csh_ldap.CSHLDAP(login.ldap_user, login.ldap_pass) user = instance.get_member_ibutton(ibutton) return user.uid except Exception as e:...
dhruvsrivastava/OJ
refs/heads/master
flask/lib/python2.7/site-packages/pip/commands/freeze.py
311
from __future__ import absolute_import import sys import pip from pip.basecommand import Command from pip.operations.freeze import freeze from pip.wheel import WheelCache class FreezeCommand(Command): """ Output installed packages in requirements format. packages are listed in a case-insensitive sorted...
ycaihua/scikit-learn
refs/heads/master
sklearn/manifold/t_sne.py
2
# Author: Alexander Fabisch -- <afabisch@informatik.uni-bremen.de> # License: BSD 3 clause (C) 2014 # This is the standard t-SNE implementation. There are faster modifications of # the algorithm: # * Barnes-Hut-SNE: reduces the complexity of the gradient computation from # N^2 to N log N (http://arxiv.org/abs/1301....
chapman-cpsc-230/hw1-abouc101
refs/heads/master
Seconds2Years.py
1
x=1 while x>0: Seconds = input ('Please enter any amount of seconds') Y=Seconds/60.0000/60/24/365 if Y>100: print "No the baby won't live" else: print "Yes the baby will live" print "There are %d years in %d Seconds" % (Y, Seconds) name = input ('')
Maccimo/intellij-community
refs/heads/master
python/testData/refactoring/rename/renameTarget.py
83
if True: <caret>foo = {} else: foo = object() if "a" == "b": foo.x = 1 foo.save() if "c" == "d": foo.y = 1 foo.save()
nRFMesh/mbed-os
refs/heads/master
tools/test_webapi.py
66
""" mbed SDK Copyright (c) 2011-2014 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 wr...
tyagi-prashant/letsencrypt
refs/heads/master
letsencrypt-nginx/letsencrypt_nginx/tests/__init__.py
56
"""Let's Encrypt Nginx Tests"""
eugena/django
refs/heads/master
tests/template_tests/syntax_tests/test_multiline.py
432
from django.test import SimpleTestCase from ..utils import setup multiline_string = """ Hello, boys. How are you gentlemen. """ class MultilineTests(SimpleTestCase): @setup({'multiline01': multiline_string}) def test_multiline01(self): output = self.engine.render_to_string('multiline01') s...
theatlantic/jinja2-template-cache
refs/heads/master
jinja2cache/management/commands/jinjacache_flush.py
1
import traceback from django.core.management.base import BaseCommand, CommandError from jinja2cache.tplcache import cache class Command(BaseCommand): help = 'Flushes all entries from the jinja2 template cache' def handle(self, *args, **options): if cache is None: raise CommandError("Jinj...
dacrybabysuck/darkstar
refs/heads/master
migrations/char_unlock_table_columns.py
9
import array import mysql.connector def migration_name(): return "Changing Char Unlock Table Columns" def check_preconditions(cur): return def needs_to_run(cur): # Ensure homepoint bitmasks exist in char_vars cur.execute("SHOW COLUMNS FROM char_unlocks LIKE 'sandoria_supply'") if not cur.fetchon...
ManageIQ/integration_tests
refs/heads/master
cfme/infrastructure/pxe.py
2
""" A model of a PXE Server in CFME """ import attr from navmazing import NavigateToAttribute from navmazing import NavigateToSibling from selenium.common.exceptions import NoSuchElementException from varmeth import variable from widgetastic.widget import Checkbox from widgetastic.widget import Text from widgetastic.wi...
GdZ/scriptfile
refs/heads/master
software/googleAppEngine/lib/django_0_96/django/dispatch/__init__.py
62
"""Multi-consumer multi-producer dispatching mechanism """ __version__ = "1.0.0" __author__ = "Patrick K. O'Brien" __license__ = "BSD-style, see license.txt for details"
HiSPARC/station-software
refs/heads/master
user/python/Lib/site-packages/win32/lib/win32cryptcon.py
8
# Generated by h2py from WinCrypt.h def GET_ALG_CLASS(x): return (x & (7 << 13)) def GET_ALG_TYPE(x): return (x & (15 << 9)) def GET_ALG_SID(x): return (x & (511)) ALG_CLASS_ANY = (0) ALG_CLASS_SIGNATURE = (1 << 13) ALG_CLASS_MSG_ENCRYPT = (2 << 13) ALG_CLASS_DATA_ENCRYPT = (3 << 13) ALG_CLASS_HASH = (4 << 13) ALG_C...
vmalloc/logpile
refs/heads/master
flask_app/utils/__init__.py
1
import cjson import flask import functools from .function_signature import get_function_signature def render_template(template, **kwargs): return flask.render_template(template, session=flask.session, request=flask.request, **kwargs) def returns_js...
Yukinoshita47/Yuki-Chan-The-Auto-Pentest
refs/heads/master
Module/Spaghetti/lib/net/http.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Spaghetti: Web Application Security Scanner # # @url: https://github.com/m4ll0k/Spaghetti # @author: Momo Outaadi (M4ll0k) # @license: See the file 'doc/LICENSE' import requests import utils import sys from requests.packages.urllib3.exceptions import InsecureRequestWar...
agmscode/agms_python
refs/heads/master
agms/response/__init__.py
2878
from __future__ import absolute_import
labkaxita/lakaxita
refs/heads/master
lakaxita/attachments/__init__.py
1
from lakaxita.attachments import signals
jhd/spunout
refs/heads/master
flask/lib/python2.7/site-packages/jinja2/visitor.py
1401
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for every...
ychen820/microblog
refs/heads/master
y/google-cloud-sdk/.install/.backup/platform/gsutil/third_party/boto/tests/unit/cloudsearch2/test_exceptions.py
4
import mock from boto.compat import json from tests.unit import unittest from .test_search import HOSTNAME, CloudSearchSearchBaseTest from boto.cloudsearch2.search import SearchConnection, SearchServiceException def fake_loads_value_error(content, *args, **kwargs): """Callable to generate a fake ValueError""" ...
AutorestCI/azure-sdk-for-python
refs/heads/master
azure-mgmt-web/azure/mgmt/web/models/resource_name_availability_request.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
0sc0d3r/enigma2
refs/heads/master
lib/python/Screens/Ci.py
4
from Screen import Screen from Components.ActionMap import ActionMap from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.Pixmap import Pixmap from Components.config import config, ConfigNumber, ConfigYesNo, ConfigSubsection, ConfigSelection, ConfigSubList, NoSave, getConf...
karrrt/scale
refs/heads/master
lib/python2.7/site-packages/pip/_vendor/distlib/index.py
571
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import hashlib import logging import os import shutil import subprocess import tempfile try: from threading import Thread except ImportErr...
cernops/neutron
refs/heads/master-patches
neutron/plugins/embrane/l2base/fake/fake_l2_plugin.py
59
# Copyright 2013 Embrane, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
devs4v/fortinetloginiiitd
refs/heads/master
linux/fortinet2.py
1
#time in seconds, between each check timeToCheck = 60 #time in minutes, between each refresh intervalsBetweenRefresh = 30 #verbosity level. Set 0 to remove all output. #Only the console title will show the status. #Or you can type "python fortinet.py --noverbose" from the command line, without the quotes. verbose = 1 ...
mancoast/CPythonPyc_test
refs/heads/master
fail/340_test_threadsignals.py
3
"""PyUnit testing that threads honor our signal semantics""" import unittest import signal import os import sys from test.support import run_unittest, import_module thread = import_module('_thread') import time if (sys.platform[:3] == 'win'): raise unittest.SkipTest("Can't test signal on %s" % sys.platform) proc...
ptorrestr/t2db_objects
refs/heads/master
t2db_objects/utilities.py
1
import os import re import ast # Return a numeric representation of boolean values. 0 if booleanValue is false, # 1 if bool_is true def boolean2int(booleanValue): if (booleanValue): return 1 else: return 0 # Read configuration file. The file has the following structure: # #propertyName1 = some...
jdahlin/stoq-wubi
refs/heads/master
src/openpgp/sap/text.py
8
"Textification" from openpgp.code import * _msg_msg = {MSG_SIGNED:"Signed Message", MSG_ENCRYPTED:"Encrypted Message", MSG_COMPRESSED:"Compressed Message", MSG_LITERAL:"Literal Message", MSG_PUBLICKEY:"Public Key Message", MSG_PRIVATEKEY:"Secret Key Message"...
Spredzy/dotfiles
refs/heads/master
vim/bundle/ultisnips/utils/convert_snipmate_snippets.py
5
#!/usr/bin/env python # encoding: utf-8 """ Convert snipmate compatible snippets to UltiSnips compatible snippets by Phillip Berndt """ import sys import re import os import argparse def convert_snippet_contents(content): " If the snippet contains snipmate style substitutions, convert them to ultisnips style " ...
sjsucohort6/openstack
refs/heads/master
python/venv/lib/python2.7/site-packages/openstack/tests/functional/base.py
2
# 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 t...
RedHatInsights/insights-core
refs/heads/master
insights/parsers/tests/test_ipsec_conf.py
1
import doctest import pytest from insights.parsers import ipsec_conf, SkipException from insights.parsers.ipsec_conf import IpsecConf from insights.tests import context_wrap IPSEC_NORMAL = """ # /etc/ipsec.conf - Libreswan IPsec configuration file # # see 'man ipsec.conf' and 'man pluto' for more information # # For...
cmgerber/CensusMapper
refs/heads/master
python/db_insert_defaultbreaks.py
1
#!../env/bin/python from cartodb import CartoDBAPIKey, CartoDBException from db_models import db, Measure, Numerator, Denominator, DefaultBreak from pgconn import API_KEY, secret_key # establish connection to CartoDB server def connect_to_cartodb(): return CartoDBAPIKey(API_KEY, 'censusmapper') cl = connect_to_c...
nurmd2/nurmd
refs/heads/master
addons/l10n_be_invoice_bba/__init__.py
47
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. import partner import invoice
paultcochrane/bokeh
refs/heads/master
examples/glyphs/prim_server.py
44
from __future__ import print_function import numpy as np from bokeh.browserlib import view from bokeh.document import Document from bokeh.models.glyphs import * from bokeh.models import ( Plot, Range1d, LinearAxis, Grid, ColumnDataSource, PanTool, WheelZoomTool ) from bokeh.session import Session document = Docu...
mdanielwork/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg1/_pkg1_1/_pkg1_1_1/_pkg1_1_1_0/_pkg1_1_1_0_1/_mod1_1_1_0_1_2.py
30
name1_1_1_0_1_2_0 = None name1_1_1_0_1_2_1 = None name1_1_1_0_1_2_2 = None name1_1_1_0_1_2_3 = None name1_1_1_0_1_2_4 = None
punalpatel/st2
refs/heads/master
st2common/tests/unit/test_util_file_system.py
10
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
sternb0t/django-pandas
refs/heads/master
django_pandas/io.py
1
import pandas as pd from .utils import update_with_verbose import django def to_fields(qs, fieldnames): for fieldname in fieldnames: model = qs.model for fieldname_part in fieldname.split('__'): try: field = model._meta.get_field(fieldname_part) except djang...
TeMPO-Consulting/mediadrop
refs/heads/axitube
mediacore/lib/tests/request_mixin_test.py
1
# -*- coding: utf-8 -*- # This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2013 MediaCore Inc., Felix Schwarz and other contributors. # For the exact contribution history, see the git revision log. # The source code in this file is is dual licensed under the MIT license or # the GPLv3 or (a...
provaleks/o8
refs/heads/8.0
addons/l10n_ec/__openerp__.py
260
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2012 Cristian Salamea Gnuthink Software Labs Cia. Ltda # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
thurt/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/pythonwin/pywin/scintilla/view.py
17
# A general purpose MFC CCtrlView view that uses Scintilla. import control import IDLEenvironment # IDLE emulation. from pywin.mfc import docview from pywin.mfc import dialog from scintillacon import * import win32con import win32ui import afxres import string import array import sys import types import __main__ # for...
lzw120/django
refs/heads/master
build/lib/django/contrib/gis/maps/google/zoom.py
92
from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point from django.contrib.gis.maps.google.gmap import GoogleMapException from math import pi, sin, log, exp, atan # Constants used for degree to radian conversion, and vice-versa. DTOR = pi / 180. RTOD = 180. / pi class GoogleZoom(object): """...
stevenewey/django
refs/heads/master
django/contrib/auth/signals.py
865
from django.dispatch import Signal user_logged_in = Signal(providing_args=['request', 'user']) user_login_failed = Signal(providing_args=['credentials']) user_logged_out = Signal(providing_args=['request', 'user'])
ryfx/modrana
refs/heads/master
core/backports/argparse.py
490
# Author: Steven J. Bethard <steven.bethard@gmail.com>. """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The...
nishad-jobsglobal/odoo-marriot
refs/heads/master
openerp/addons/acesmanpower/acesmanpowerevent.py
1
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2016 Jobsglobal.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
CloudVLab/professional-services
refs/heads/master
examples/cloudml-collaborative-filtering/preprocessing/preprocess_test.py
2
# Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
charlesthk/python-resize-image
refs/heads/master
resizeimage/helpers.py
2
import requests from cStringIO import StringIO from PIL import Image def file_to_image(image_file_name): """ Convert a file into a Pillow Image object """ with open(image_file_name, 'r') as f_image: return Image.open(f_image) def url_to_image(url): """ Fetch an image from url and con...
xuru/restler
refs/heads/master
lib/usr/sqlalchemy/dialects/oracle/zxjdbc.py
34
# oracle/zxjdbc.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 Oracle database via the zxjdbc JDBC connector. JDBC Driver ------...
akiss77/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/inputstream.py
618
from __future__ import absolute_import, division, unicode_literals from six import text_type from six.moves import http_client import codecs import re from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .constants import encodings, ReparseException from . import utils from io import String...
pramasoul/micropython
refs/heads/master
tests/perf_bench/misc_pystone.py
15
""" "PYSTONE" Benchmark Program Version: Python/1.2 (corresponds to C/1.1 plus 3 Pystone fixes) Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013. Translated from ADA to C by Rick Richardson. Every method to preserve ADA-likeness has been used, ...
rjschwei/azure-sdk-for-python
refs/heads/master
azure-batch/azure/batch/models/node_reboot_parameter.py
3
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
evgenikozlov/test-task
refs/heads/master
vendor/sonata-project/admin-bundle/Resources/doc/conf.py
77
# -*- coding: utf-8 -*- # # IoC documentation build configuration file, created by # sphinx-quickstart on Fri Mar 29 01:43:00 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All con...
yade/trunk
refs/heads/master
examples/grids/CohesiveGridConnectionSphere.py
2
# encoding: utf-8 """ Same example as CohesiveCylinderSphere.py but using gridConnections instead of chainedCylinder. """ from builtins import zip from yade import qt from yade.gridpfacet import * from numpy import linspace ### Engines need to be defined first since the function gridConnection creates the interaction...
juanalfonsopr/odoo
refs/heads/8.0
addons/portal_gamification/__openerp__.py
381
# -*- 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...
mathspace/django
refs/heads/master
tests/template_tests/filter_tests/timezone_utils.py
523
from datetime import date, datetime from django.test import SimpleTestCase from django.utils import timezone class TimezoneTestCase(SimpleTestCase): def setUp(self): self.now = datetime.now() self.now_tz = timezone.make_aware( self.now, timezone.get_default_timezone(), ) ...
hugegreenbug/libgestures
refs/heads/master
include/build/gyp_helper.py
61
# 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. # This file helps gyp_chromium and landmines correctly set up the gyp # environment from chromium.gyp_env on disk import os SCRIPT_DIR = os.path.dirnam...
rooshilp/CMPUT410Lab4
refs/heads/master
env-lab4/lib/python2.7/site-packages/jinja2/testsuite/debug.py
415
# -*- coding: utf-8 -*- """ jinja2.testsuite.debug ~~~~~~~~~~~~~~~~~~~~~~ Tests the debug system. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase, filesystem_loader from jinja2 import Environment,...
hasanatkazmi/NOPSA-Ribbon-API
refs/heads/master
serverside/module_manager.py
1
#!/usr/bin/python2.6 #This class was advised to me named search manager in proposal but infact its module manager. from modules import * import modules from xml.dom.minidom import Document class LoadModules(object): ''' this should be called only once, when the server is being starting up! ''' sea...
azumimuo/family-xbmc-addon
refs/heads/master
zips/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_progress_dialog_bg.py
33
__author__ = 'bromix' import xbmcgui from ..abstract_progress_dialog import AbstractProgressDialog class XbmcProgressDialogBG(AbstractProgressDialog): def __init__(self, heading, text): AbstractProgressDialog.__init__(self, 100) self._dialog = xbmcgui.DialogProgressBG() self._dialog.creat...
slohse/ansible
refs/heads/devel
lib/ansible/modules/clustering/consul.py
20
#!/usr/bin/python # # (c) 2015, Steve Gargan <steve.gargan@gmail.com> # 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', '...
GustavoHennig/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_server_actions.py
49
#!/usr/bin/python # coding: utf-8 -*- # Copyright (c) 2015, Jesse Keating <jlk@derpops.bike> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
chrisenuf/fullerite
refs/heads/master
src/diamond/collectors/conntrack/conntrack.py
57
# coding=utf-8 """ Collecting connections tracking statistics from nf_conntrack/ip_conntrack kernel module. #### Dependencies * nf_conntrack/ip_conntrack kernel module """ import diamond.collector import os class ConnTrackCollector(diamond.collector.Collector): """ Collector of number of conntrack conne...