repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
sda2b/youtube-dl
refs/heads/master
youtube_dl/extractor/helsinki.py
165
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .common import InfoExtractor from ..utils import js_to_json class HelsinkiIE(InfoExtractor): IE_DESC = 'helsinki.fi' _VALID_URL = r'https?://video\.helsinki\.fi/Arkisto/flash\.php\?id=(?P<id>\d+)' _TEST = { 'url': 'http://video...
gpatonay/popy
refs/heads/master
popy.py
1
#!/usr/bin/env python2 import json from utils import UnixLogin from smtp_server import * def loadCfg( cfgFile ): try: with open( cfgFile ) as f: return json.loads( f.read() ) except Exception : raise Exception( "Config file missing or invalid" ) cfg=loadCfg("popy.json") # config...
shishaochen/TensorFlow-0.8-Win
refs/heads/master
third_party/eigen-eigen-50812b426b7c/debug/gdb/__init__.py
377
# Intentionally empty
40223119/2015w13
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/SDL.py
603
from browser import document SDL_INIT_VIDEO=0 SDL_GL_DOUBLEBUFFER=1 SDL_GL_DEPTH_SIZE=2 SDL_DOUBLEBUF=3 SDL_ANYFORMAT=4 SDL_ACTIVEEVENT=5 SDL_ALLEVENTS=5 SDL_KEYDOWN=6 SDL_KEYUP=7 SDL_MOUSEMOTION=8 SDL_MOUSEBUTTONDOWN=9 SDL_MOUSEBUTTONUP=10 SDL_JOYAXISMOTION=11 SDL_JOYBALLMOTION=12 SDL_JOYHATMOTION=13 SDL_JOYBUTTON...
ezeteze/android_kernel_huawei_u8815_slim
refs/heads/master
tools/perf/python/twatch.py
3213
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
kingvuplus/PKT-gui2
refs/heads/master
lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py
34
from Components.config import ConfigSubsection, ConfigSubList, ConfigInteger, ConfigText, ConfigSelection import TitleCutter class ConfigFixedText(ConfigText): def __init__(self, text, visible_width=60): ConfigText.__init__(self, default = text, fixed_size = True, visible_width = visible_width) def handleKey(self,...
olivetree123/memory_profiler
refs/heads/master
examples/reporting_file.py
5
from memory_profiler import profile f=open('hi.txt','w+') @profile(stream=f) def my_func(): a = [1] * (10 ** 6) b = [2] * (2 * 10 ** 7) del b return a @profile(stream=f) def my_func1(): a = [2] * (10 ** 6) b = [3] * (2 * 10 ** 7) del b return a if __name__ == '__main__': my_func(...
ricardogsilva/QGIS
refs/heads/master
tests/src/python/test_qgshashlinesymbollayer.py
23
# -*- coding: utf-8 -*- """ *************************************************************************** test_qgshashlinesymbollayer.py --------------------- Date : March 2019 Copyright : (C) 2019 by Nyall Dawson Email : nyall dot dawson at gmail dot com ***...
C1994/learn-python3
refs/heads/master
samples/context/do_with.py
21
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from contextlib import contextmanager @contextmanager def log(name): print('[%s] start...' % name) yield print('[%s] end.' % name) with log('DEBUG'): print('Hello, world!') print('Hello, Python!')
tdyas/pants
refs/heads/master
contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/test_thrift_linter_integration.py
2
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from functools import wraps from typing import Any, Callable, TypeVar from pants.testutil.pants_run_integration_test import PantsRunIntegrationTest FuncType = Callable[..., Any] F = Type...
charlescearl/VirtualMesos
refs/heads/mesos-vm
frameworks/hadoop-0.20.2/src/contrib/hod/hodlib/Hod/hod.py
182
#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 use thi...
bhavesh37/sp17-i524
refs/heads/master
project/all.py
15
from __future__ import print_function import glob import yaml from pprint import pprint import sys import re import os makes = glob.glob("S*/report/Makefile") os.system("echo > ~/all.log ") for make in makes: d = make.replace("/Makefile", "") print (70 * "=") print (d) os.system("cd " + d + "; rm ...
lightfaith/locasploit
refs/heads/master
source/modules/iot_binwalk_scan.py
1
#!/usr/bin/env python3 """ This module uses binwalk to analyze structure of a binary file. """ from source.modules._generic_module import * class Module(GenericModule): def __init__(self): self.authors = [ Author(name='Vitezslav Grygar', email='vitezslav.grygar@gmail.com', web='https://badsulog...
deepfire/partus
refs/heads/master
llvm-bitcode.py
1
import struct def error(x, args): raise Exception(x % args) def the(type, x): if not isinstance(x, type): error("%s is not of type %s.", x, type) def ceil(x, mask): return ((x | mask) + 1) if x & mask else x ## ## class llvm_bytecode_object(): def __len__(self): ...
kizniche/Mycodo
refs/heads/master
mycodo/utils/__init__.py
1054
# coding=utf-8
ProfessionalIT/maxigenios-website
refs/heads/master
sdk/google_appengine/lib/cherrypy/cherrypy/test/test_http.py
36
"""Tests for managing HTTP issues (malformed requests, etc).""" import errno import mimetypes import socket import sys import cherrypy from cherrypy._cpcompat import HTTPConnection, HTTPSConnection, ntob, py3k def encode_multipart_formdata(files): """Return (content_type, body) ready for httplib.HTTP instance. ...
amousset/ansible
refs/heads/devel
lib/ansible/plugins/lookup/cartesian.py
133
# (c) 2013, Bradley Young <young.bradley@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) any later...
andim/scipy
refs/heads/master
scipy/optimize/tests/test_trustregion.py
105
""" Unit tests for trust-region optimization routines. To run it in its simplest form:: nosetests test_optimize.py """ from __future__ import division, print_function, absolute_import import numpy as np from scipy.optimize import (minimize, rosen, rosen_der, rosen_hess, rosen_hess_prod)...
nathanial/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/contrib/localflavor/fr/fr_department.py
314
# -*- coding: utf-8 -*- DEPARTMENT_ASCII_CHOICES = ( ('01', '01 - Ain'), ('02', '02 - Aisne'), ('03', '03 - Allier'), ('04', '04 - Alpes-de-Haute-Provence'), ('05', '05 - Hautes-Alpes'), ('06', '06 - Alpes-Maritimes'), ('07', '07 - Ardeche'), ('08', '08 - Ardennes'), ('09', '09 - Ar...
t0mk/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_ami.py
25
#!/usr/bin/python # 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...
m-lab/ndt-debian
refs/heads/master
ndt-3.6.5.2/tfw/scenarios.py
4
#!/usr/bin/python import wx class Scenario: def __init__(self, ctrl, name): self._ctrl = ctrl self._name = name def setName(self, name): self._name = name def getName(self): return self._name def addHost(self, event): self._ctrl.addHost() self._parent...
simone-campagna/invoice
refs/heads/master
invoice/database/upgrade/upgrader_v2_6_x__v2_7_0.py
1
# -*- coding: utf-8 -*- # # Copyright 2015 Simone Campagna # # 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...
stephanehenry27/Sickbeard-anime
refs/heads/master
autoProcessTV/sabToSickBeard.py
51
#!/usr/bin/env python # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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, eithe...
elcolie/fight
refs/heads/master
vanilla/model_views.py
1
#coding: utf-8 from django.core.exceptions import ImproperlyConfigured from django.core.paginator import Paginator, InvalidPage from django.forms import models as model_forms from django.http import Http404, HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.template.response import Templat...
czbiohub/singlecell-dash
refs/heads/master
singlecell_dash/app.py
1
# -*- coding: utf-8 -*- import locale import dash import dash_html_components as html import dash_core_components as dcc import numpy as np import pandas as pd import plotly.graph_objs as go from .apps.diff_expr import DifferentialExpression from .apps.color_by import ColorByGeneExpression, ColorByMetadata from .apps...
dga4654dan/UTM-Demo
refs/heads/master
V_1_0_1/UtmDemo_Sfs_2.9.0/UtmDemo_Sfs_2.9.0_Server/lib/Lib/sre.py
8
# # Secret Labs' Regular Expression Engine # # re-compatible interface for the sre matching engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@py...
drewp/tahoe-lafs
refs/heads/master
setuptools-0.6c16dev3.egg/setuptools/command/scriptsetup.py
2
from distutils.errors import DistutilsSetupError from setuptools import Command import sys class scriptsetup(Command): action = (sys.platform == "win32" and "set up .pyscript association and PATHEXT variable to run scripts" or "this does nothing on non-Windows platforms") ...
mareuter/lct-python
refs/heads/master
tests/utils/test_moon_info.py
1
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # Copyright (c) 2014, Michael Reuter # Distributed under the MIT License. See LICENSE.txt for more information. #------------------------------------------------------------------------------ ''' Tests for the MoonI...
3dfxsoftware/cbss-addons
refs/heads/master
lct_hr/models/hr_salary_rule.py
2
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
a2211009/leetcode-1
refs/heads/master
solutions/098.Validate_Binary_Search_Tree/AC_dfs_n.py
7
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: illuz <iilluzen[at]gmail.com> # File: AC_dfs_n.py # Create Date: 2015-03-03 14:53:53 # Usage: AC_dfs_n.py # Descripton: # Definition for a binary tree node class TreeNode: def __init__(self, x): self.val = x self.left = None...
dpassante/ansible
refs/heads/devel
lib/ansible/utils/cmd_functions.py
233
# (c) 2012, 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) any lat...
Delphine-L/tools-iuc
refs/heads/master
tools/anndata/loompy_to_tsv.py
16
#!/usr/bin/env python """Converts a loompy file to tsv file(s). Each layer becomes a new file.""" import argparse import loompy parser = argparse.ArgumentParser(description="Loompy file converter flags") parser.add_argument('--version', action='version', version='%(prog)s 0.1.0', help="Displays ...
nugget/home-assistant
refs/heads/dev
homeassistant/components/media_player/pioneer.py
4
""" Support for Pioneer Network Receivers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.pioneer/ """ import logging import telnetlib import voluptuous as vol from homeassistant.components.media_player import ( MediaPlayerDevice, PLAT...
ted-gould/nova
refs/heads/master
nova/tests/unit/test_policy.py
20
# Copyright 2011 Piston Cloud Computing, 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 # # Unle...
mareuter/pylunar
refs/heads/master
pylunar/moon_info.py
1
# This file is part of pylunar. # # Developed by Michael Reuter. # # See the LICENSE file at the top-level directory of this distribution # for details of code ownership. # # Use of this source code is governed by a 3-clause BSD-style # license that can be found in the LICENSE file. from datetime import datetime from ...
RichDijk/eXe
refs/heads/master
nevow/rend.py
14
# Copyright (c) 2004 Divmod. # See LICENSE for details. """Page, Fragment and other standard renderers. This module contains classes and function responsible for rendering dynamic content and a few useful mixin classes for inheriting common functionality. Mostly, you'll use the renderers: - B{Page} - Nevow's main ...
live-clones/dolfin-adjoint
refs/heads/master
timestepping/tests/long/mantle_convection/composition.py
3
#!/usr/bin/env python2 # Copyright (C) 2011 Simula Research Laboratory and Lyudmyla Vynnytska and Marie # E. Rognes # Copyright (C) 2011-2012 by Imperial College London # Copyright (C) 2013 University of Oxford # Copyright (C) 2014 University of Edinburgh # # This program is free software: you can r...
codesy/codesy
refs/heads/master
auctions/tests/utils_tests.py
1
import fudge from django.test import TestCase from github import UnknownObjectException from ..utils import issue_state class IssueStateTest(TestCase): def test_issue_state(self): url = 'https://github.com/codesy/codesy/issues/158' fake_gh_client = fudge.Fake() (fake_gh_client.expects...
aiven/kafkajournalpump
refs/heads/master
journalpump/statsd.py
3
""" StatsD client Supports telegraf's statsd protocol extension for 'key=value' tags: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/statsd """ import socket class StatsClient: def __init__(self, host="127.0.0.1", port=8125, tags=None): self._dest_addr = (host, port) self._...
Micronaet/micronaet-mx8
refs/heads/master
mx_fiscalposition/__init__.py
18
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
gencer/sentry
refs/heads/master
src/sentry/api/serializers/models/organization_access_request.py
3
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register, serialize from sentry.models import OrganizationAccessRequest @register(OrganizationAccessRequest) class OrganizationAccessRequestSerializer(Serializer): def serialize(self, obj, attrs, user): d = ...
fnordahl/nova
refs/heads/master
nova/tests/unit/api/openstack/compute/test_pci.py
21
# Copyright 2013 Intel Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
devlin85/p2pool
refs/heads/master
p2pool/networks/catcoin.py
3
from p2pool.bitcoin import networks PARENT = networks.nets['catcoin'] SHARE_PERIOD = 15 # seconds target spacing CHAIN_LENGTH = 12*60*60//15 # shares REAL_CHAIN_LENGTH = 12*60*60//15 # shares TARGET_LOOKBEHIND = 20 # shares coinbase maturity SPREAD = 10 # blocks IDENTIFIER = 'c1c2cacfe0e1eae6'.decode('hex') PREFIX = '...
jroyal/plexpy
refs/heads/master
lib/cherrypy/lib/locking.py
68
import datetime class NeverExpires(object): def expired(self): return False class Timer(object): """ A simple timer that will indicate when an expiration time has passed. """ def __init__(self, expiration): "Create a timer that expires at `expiration` (UTC datetime)" self...
dmsimard/ansible
refs/heads/devel
test/units/mock/vault_helper.py
206
# 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 it will be useful, # but WITHOUT ...
krisaju95/NewsArticleClustering
refs/heads/master
IncrementalClustering/module3_calculateTfIdf.py
1
import pickle import math import os import pandas as pd import numpy as np newsPaperName = "NewsPaper A" path = "C:/Users/hp/Desktop/FINAL YEAR PROJECT/S8/" words = pickle.load(open(os.path.join(path, 'Word Set','wordSet.p'), 'rb')) dataFrame1 = pickle.load( open(os.path.join(path , 'Crawled Articles' , newsP...
heyfaraday/CMB_test
refs/heads/master
outdated/0.2.0/mapP.py
1
from numpy import * from pylab import * #a,b = genfromtxt('plot.dat').T N=254 M=254 xlim([0,1]) ylim([0,1]) #axes().set_aspect('equal', 'datalim') z,x,y = genfromtxt('P.dat').T x = x.reshape(N,M) y = y.reshape(N,M) z = z.reshape(N,M) pcolormesh(x,y,z) #a,b = genfromtxt('levP.dat').T #plot(a,b,'ko',ms=1) xmax,y...
xiandiancloud/edx-platform
refs/heads/master
common/test/acceptance/pages/studio/textbooks.py
103
""" Course Textbooks page. """ from .course_page import CoursePage class TextbooksPage(CoursePage): """ Course Textbooks page. """ url_path = "textbooks" def is_browser_on_page(self): return self.q(css='body.view-textbooks').present
hobinyoon/apache-cassandra-2.2.3-src
refs/heads/master
mtdb/process-log/calc-cost-latency-plot-tablet-timeline/TabletAccessesForTabletSizeTimelinePlotDataGenerator.py
1
import os import sys sys.path.insert(0, "../../util/python") import Cons import Util import CassLogReader import Desc import Event import SimTime import TabletSizeTimelinePlotDataGenerator _fn_plot_data = None _id_events = {} _max_num_needto_read_datafile_per_day = 0 def Gen(): with Cons.MeasureTime("Generating t...
rresol/coala
refs/heads/master
tests/output/dbus/DbusTest.py
4
import os import subprocess import sys import time import unittest from unittest.case import SkipTest from coalib.misc import Constants try: import dbus # Needed to determine if test needs skipping from gi.repository import GLib except ImportError as err: raise SkipTest('python-dbus or python-gi is no...
ericMayer/tekton-master
refs/heads/master
backend/venv/lib/python2.7/site-packages/unidecode/x096.py
252
data = ( 'Fa ', # 0x00 'Ge ', # 0x01 'He ', # 0x02 'Kun ', # 0x03 'Jiu ', # 0x04 'Yue ', # 0x05 'Lang ', # 0x06 'Du ', # 0x07 'Yu ', # 0x08 'Yan ', # 0x09 'Chang ', # 0x0a 'Xi ', # 0x0b 'Wen ', # 0x0c 'Hun ', # 0x0d 'Yan ', # 0x0e 'E ', # 0x0f 'Chan ', # 0x10 'Lan ', ...
whitehorse-io/encarnia
refs/heads/master
pyenv/lib/python2.7/site-packages/twisted/python/test/test_setup.py
1
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for parts of our release automation system. """ import os from setuptools.dist import Distribution import twisted from twisted.trial.unittest import TestCase from twisted.python import _setup, filepath from twisted.python.compat imp...
TNick/pylearn2
refs/heads/master
pylearn2/datasets/tests/test_utlc.py
44
from __future__ import print_function import unittest import numpy import scipy.sparse from pylearn2.testing.skip import skip_if_no_data import pylearn2.datasets.utlc as utlc def test_ule(): skip_if_no_data() # Test loading of transfer data train, valid, test, transfer = utlc.load_ndarray_dataset("ule"...
sudheesh001/mediadrop
refs/heads/master
mediacore/lib/decorators.py
14
from mediadrop.lib.decorators import *
akretion/connector-magento
refs/heads/7.0_catalog_export
magentoerpconnect_pricing/__init__.py
3
# -*- coding: utf-8 -*- import connector import magento_model import product import sale
TangHao1987/intellij-community
refs/heads/master
python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/createInit_after.py
83
__author__ = 'ktisha' class A: def __init__(self): self.b = 1 def foo(self): c = 1
diku-kmc/kleenexlang
refs/heads/master
bench/python/src/as.py
2
#!/usr/bin/env python # Python version of as import sys import re import datetime regex = "(a*)" pre_compile = datetime.datetime.now() pattern = re.compile(regex) lno = 0 # Start timing start = datetime.datetime.now() for line in sys.stdin: lno += 1 m = pattern.match(line) if m: sys.stdout.wri...
yordan-desta/QgisIns
refs/heads/master
python/ext-libs/owslib/ows.py
28
# -*- coding: ISO-8859-15 -*- # ============================================================================= # Copyright (c) 2008 Tom Kralidis # # Authors : Tom Kralidis <tomkralidis@gmail.com> # # Contact email: tomkralidis@gmail.com # ============================================================================= """...
Tejal011089/Medsyn2_app
refs/heads/master
utilities/doctype/sms_control/sms_control.py
19
# 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 webnotes from webnotes.utils import load_json, nowdate, cstr from webnotes.model.code import get_obj from webnotes.model.doc import Document ...
recognai/spaCy
refs/heads/master
spacy/lang/hi/lex_attrs.py
1
# coding: utf8 from __future__ import unicode_literals from ..norm_exceptions import BASE_NORMS from ...attrs import NORM from ...attrs import LIKE_NUM from ...util import add_lookups _stem_suffixes = [ ["ो","े","ू","ु","ी","ि","ा"], ["कर","ाओ","िए","ाई","ाए","ने","नी","ना","ते","ीं","ती","ता","ाँ","ां","ों",...
nvoron23/socialite
refs/heads/master
jython/Lib/distutils/text_file.py
7
"""text_file provides the TextFile class, which gives an interface to text files that (optionally) takes care of stripping comments, ignoring blank lines, and joining lines with backslashes.""" __revision__ = "$Id$" from types import * import sys, os, string class TextFile: """Provides a file-like object that...
andrewsmedina/horizon
refs/heads/master
horizon/horizon/models.py
27
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
sgallagher/anaconda
refs/heads/master
pyanaconda/modules/payloads/source/closest_mirror/closest_mirror.py
5
# # Source module for the closest mirror. # # Copyright (C) 2020 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program i...
bottompawn/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_pulldom.py
118
import io import unittest import sys import xml.sax from xml.sax.xmlreader import AttributesImpl from xml.dom import pulldom from test.support import run_unittest, findfile tstfile = findfile("test.xml", subdir="xmltestdata") # A handy XML snippet, containing attributes, a namespace prefix, and a # self-closing ta...
zhangpf/vbox
refs/heads/master
src/VBox/ValidationKit/testmanager/core/testresults.py
3
# -*- coding: utf-8 -*- # $Id$ # pylint: disable=C0302 ## @todo Rename this file to testresult.py! """ Test Manager - Fetch test results. """ __copyright__ = \ """ Copyright (C) 2012-2014 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This ...
grpc/grpc
refs/heads/master
src/python/grpcio_tests/tests/unit/test_common.py
13
# Copyright 2015 gRPC authors. # # 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...
googleapis/python-automl
refs/heads/master
google/cloud/automl_v1beta1/services/auto_ml/async_client.py
1
# -*- coding: utf-8 -*- # Copyright 2020 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...
mahak/neutron
refs/heads/master
neutron/db/rbac_db_models.py
2
# Copyright (c) 2015 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 requir...
dragon788/plover
refs/heads/master
plover/gui/keyboard_config.py
5
# Copyright (c) 2013 Hesky Fisher # See LICENSE.txt for details. import wx from wx.lib.utils import AdjustRectToScreen import wx.lib.mixins.listctrl as listmix from plover.machine.keymap import Keymap DIALOG_TITLE = 'Keyboard Configuration' ARPEGGIATE_LABEL = "Arpeggiate" ARPEGGIATE_INSTRUCTIONS = """Arpeggiate allow...
recognai/spaCy
refs/heads/master
spacy/lang/hu/lemmatizer.py
3
null
conejoninja/pelisalacarta
refs/heads/master
python/main-classic/lib/gdata/tlslite/TLSRecordLayer.py
270
"""Helper class for TLSConnection.""" from __future__ import generators from utils.compat import * from utils.cryptomath import * from utils.cipherfactory import createAES, createRC4, createTripleDES from utils.codec import * from errors import * from messages import * from mathtls import * from constants import * fro...
bukzor/sympy
refs/heads/master
sympy/plotting/pygletplot/color_scheme.py
85
from __future__ import print_function, division from sympy import Basic, Symbol, symbols, lambdify from util import interpolate, rinterpolate, create_bounds, update_bounds from sympy.core.compatibility import range class ColorGradient(object): colors = [0.4, 0.4, 0.4], [0.9, 0.9, 0.9] intervals = 0.0, 1.0 ...
fuzzing/bifuz
refs/heads/master
create_templates.py
3
#!/usr/bin/env python # Module for generating all possible raw templates # # Copyright (C) 2015 Intel Corporation # Author: Andreea Brindusa Proca <andreea.brindusa.proca@intel.com> # Author: Razvan-Costin Ionescu <razvan.ionescu@intel.com> # # Licensed under the MIT license, see COPYING.MIT for details import os ''...
bbannier/ROOT
refs/heads/master
tutorials/pyroot/gui_ex.py
28
import os, sys, ROOT def pygaus( x, par ): import math if (par[2] != 0.0): arg1 = (x[0]-par[1])/par[2] arg2 = (0.01*0.39894228)/par[2] arg3 = par[0]/(1+par[3]) gauss = arg3*arg2*math.exp(-0.5*arg1*arg1) else: print 'returning 0' gauss = 0. return gauss tpygaus = ROOT.T...
tomviner/pytest
refs/heads/master
testing/example_scripts/fixtures/fill_fixtures/test_extend_fixture_conftest_conftest/conftest.py
46
import pytest @pytest.fixture def spam(): return "spam"
boshnivolo/TIY-Assignments
refs/heads/master
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
1812
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions shared amongst the Windows generators.""" import copy import os # A dictionary mapping supported target types to extensions. TARGET_TYPE_EX...
ESTUDIANTEGIT/tuconsejocomunal
refs/heads/master
usuarios_venezuela/__openerp__.py
4
# -*- 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...
GunoH/intellij-community
refs/heads/master
python/testData/formatter/noAlignmentAfterDictHangingIndentInFunctionCall.py
79
def test_function(*args): pass test_function({ 'a': 'b', }, 5) test_function(1, 2, 3)
jlmdegoede/Invoicegen
refs/heads/master
agreements/apps.py
1
from django.apps import AppConfig class AgreementmoduleConfig(AppConfig): name = 'agreements'
ComputationalPhysics/atomify-lammps
refs/heads/dev
libs/lammps/tools/eff/bohr2ang.py
57
Info=""" Module name: bohr2ang.py Author: (c) Andres Jaramillo-Botero California Institute of Technology ajaramil@caltech.edu Project: pEFF Version: August 2009 Usage: python bohr2ang.py >>Name of data file (bohr): [datafile] Results: creates a datafile with extension .ang in real units """ import os currdir=os.g...
minghuascode/pyj
refs/heads/master
examples/gcharttestapp/GChartExample03.py
6
from pyjamas.chart.GChart import GChart from pyjamas.chart import SymbolType from pyjamas.chart.GChartConsts import Y_AXIS, Y2_AXIS """* * Defines a chart with a scatterplot on one y-axis, and a * barchart on the other. """ class GChartExample03(GChart): def __init__(self): GChart.__init__(self) ...
skosukhin/spack
refs/heads/esiwace
var/spack/repos/builtin/packages/emacs/package.py
1
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
HPCGISLab/STDataViz
refs/heads/master
WorkingVersion/Scatter_plot.py
1
import numpy as np from tvtk.api import tvtk from mayavi.scripts import mayavi2 @mayavi2.standalone def main(): # Create some random points to view. pd = tvtk.PolyData() pd.points = np.random.random((1000, 3)) verts = np.arange(0, 1000, 1) verts.shape = (1000, 1) pd.verts = verts pd.point_...
peragro/django-project
refs/heads/master
django_project/mixins.py
2
from django.db import models from django.db import transaction from reversion import revisions as reversion from follow.models import Follow from django_project import signals class ProjectMixin(object): def save(self, *args, **kwargs): ret = super(ProjectMixin, self).save(*args, **kwargs) #Auth...
ebagdasa/tempest
refs/heads/master
tempest/api_schema/response/compute/quotas.py
12
# Copyright 2014 NEC Corporation. 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 ...
apark263/tensorflow
refs/heads/master
tensorflow/contrib/saved_model/python/saved_model/keras_saved_model.py
3
# 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...
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/__init__.py
4
# 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 ...
mancoast/CPythonPyc_test
refs/heads/master
fail/321_test_imaplib.py
49
from test import support # If we end up with a significant number of tests that don't require # threading, this test module should be split. Right now we skip # them all if we don't have threading. threading = support.import_module('threading') from contextlib import contextmanager import imaplib import os.path impor...
hassanabidpk/django
refs/heads/master
django/contrib/gis/gdal/prototypes/srs.py
471
from ctypes import POINTER, c_char_p, c_int, c_void_p from django.contrib.gis.gdal.libgdal import lgdal, std_call from django.contrib.gis.gdal.prototypes.generation import ( const_string_output, double_output, int_output, srs_output, string_output, void_output, ) # Shortcut generation for routines with known...
omprakasha/odoo
refs/heads/8.0
addons/point_of_sale/test/test_frontend.py
309
import openerp.tests @openerp.tests.common.at_install(False) @openerp.tests.common.post_install(True) class TestUi(openerp.tests.HttpCase): def test_01_pos_basic_order(self): self.phantom_js("/", "openerp.Tour.run('pos_basic_order', 'test')", "openerp.Tour.tours.pos_basic_order", login="admin")
Serag8/Bachelor
refs/heads/master
google_appengine/lib/django-0.96/django/conf/urls/defaults.py
32
from django.core.urlresolvers import RegexURLPattern, RegexURLResolver __all__ = ['handler404', 'handler500', 'include', 'patterns'] handler404 = 'django.views.defaults.page_not_found' handler500 = 'django.views.defaults.server_error' include = lambda urlconf_module: [urlconf_module] def patterns(prefix, *tuples): ...
sciflow/pad
refs/heads/master
bin/DocumentConverter.py
7
#!/usr/bin/python # # PyODConverter (Python OpenDocument Converter) v1.1 - 2009-11-14 # Modifications by Mikko Rantalainen <mikko.rantalainen@peda.net> # # This script converts a document from one office format to another by # connecting to an OpenOffice.org instance via Python-UNO bridge. # # Copyright (C) 2008-2009 M...
Manolaru/Python_Mantis
refs/heads/master
Working version/fixture/application.py
2
from selenium import webdriver from fixture.session import SessionHelper from fixture.project import ProjectHelper class Application: def __init__(self, browser, base_url): if browser == "firefox": self.wd = webdriver.Firefox() elif browser == "chrome": self.wd = webd...
telwertowski/Books-Mac-OS-X
refs/heads/master
Versions/Books_3.0b6/Library of Congress.plugin/Contents/Resources/PyZ3950/pqf.py
30
#!/usr/local/bin/python2.3 try: from cStringIO import StringIO except: from StringIO import StringIO from PyZ3950 import z3950, oids,asn1 from PyZ3950.zdefs import make_attr from types import IntType, StringType, ListType from PyZ3950.CQLParser import CQLshlex """ Parser for PQF directly into RPN structure. ...
javierag/samba
refs/heads/master
python/samba/netcmd/processes.py
38
# Unix SMB/CIFS implementation. # List processes (to aid debugging on systems without setproctitle) # Copyright (C) 2010-2011 Jelmer Vernooij <jelmer@samba.org> # # 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 Fre...
jfantom/incubator-airflow
refs/heads/master
airflow/contrib/example_dags/example_twitter_dag.py
12
# -*- coding: utf-8 -*- # # 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 ...
spmaniato/LTLMoP
refs/heads/development
src/lib/configEditor.py
7
#!/usr/bin/env python # -*- coding: utf-8 -*- # generated by wxGlade 0.6.3 on Fri Dec 16 03:13:38 2011 import wx, wx.richtext, wx.grid, wx.lib.intctrl import sys, os, re # Climb the tree to find out where we are p = os.path.abspath(__file__) t = "" while t != "src": (p, t) = os.path.split(p) if p == "": ...
johnkeepmoving/oss-ftp
refs/heads/master
python27/win32/Lib/test/test_sha.py
137
# Testing sha module (NIST's Secure Hash Algorithm) # use the three examples from Federal Information Processing Standards # Publication 180-1, Secure Hash Standard, 1995 April 17 # http://www.itl.nist.gov/div897/pubs/fip180-1.htm import warnings warnings.filterwarnings("ignore", "the sha module is deprecated.*", ...
mbayon/TFG-MachineLearning
refs/heads/master
venv/lib/python3.6/site-packages/numpy/distutils/fcompiler/hpux.py
229
from __future__ import division, absolute_import, print_function from numpy.distutils.fcompiler import FCompiler compilers = ['HPUXFCompiler'] class HPUXFCompiler(FCompiler): compiler_type = 'hpux' description = 'HP Fortran 90 Compiler' version_pattern = r'HP F90 (?P<version>[^\s*,]*)' executables...
saintbird/mezzanine
refs/heads/master
mezzanine/blog/management/commands/import_blogger.py
8
from __future__ import unicode_literals from datetime import datetime, timedelta from optparse import make_option from time import timezone import re from django.core.management.base import CommandError from mezzanine.blog.management.base import BaseImporterCommand # TODO: update this to use v3 of the blogger API....