repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
achang97/YouTunes
lib/python2.7/site-packages/youtube_dl/extractor/rds.py
57
2800
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( parse_duration, parse_iso8601, js_to_json, ) from ..compat import compat_str class RDSIE(InfoExtractor): IE_DESC = 'RDS.ca' _VALID_URL = r'https?://(?:www\.)?rds\.ca/vid(?:[eé]|%C3%A9)o...
mit
ecederstrand/django
tests/messages_tests/test_cookie.py
299
7424
import json from django.contrib.messages import constants from django.contrib.messages.storage.base import Message from django.contrib.messages.storage.cookie import ( CookieStorage, MessageDecoder, MessageEncoder, ) from django.test import SimpleTestCase, override_settings from django.utils.safestring import Safe...
bsd-3-clause
ATIX-AG/ansible
lib/ansible/modules/network/f5/bigip_device_group.py
24
14387
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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', ...
gpl-3.0
cpyou/odoo
addons/sale/tests/__init__.py
7
1131
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
VilleEvitaCake/android_kernel_htc_msm8960
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
jelugbo/tundex
common/djangoapps/reverification/models.py
66
2118
""" Models for reverification features common to both lms and studio """ from datetime import datetime import pytz from django.core.exceptions import ValidationError from django.db import models from util.validate_on_save import ValidateOnSaveMixin from xmodule_django.models import CourseKeyField class MidcourseReve...
agpl-3.0
kuri65536/python-for-android
python3-alpha/python-libs/pyxmpp2/ext/__init__.py
47
1026
# # (C) Copyright 2011 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful...
apache-2.0
angr/angr
tests/test_ptmalloc.py
1
8838
import nose.tools from angr import SimState, SimHeapPTMalloc # TODO: Make these tests more architecture-independent (note dependencies of some behavior on chunk metadata size) def chunk_iterators_are_same(iterator1, iterator2): for ck in iterator1: ck2 = next(iterator2) if ck.base != ck2.base: ...
bsd-2-clause
peterstace/project-euler
OLD_PY_CODE/project_euler_old_old/111/number_theory.py
2
7023
"""This module implements functions that have to do with number theory.""" import random from operator import mul _stock_primes = [2, 3, 5, 7, 11, 13, 17, 19] def int_pow(x, n): """Raise x to the power n (if n is negative a ValueError is raised). intPow(0, 0) is defined to be 0. """ if n < 0: ...
unlicense
ericzolf/ansible
lib/ansible/module_utils/facts/sysctl.py
29
1931
# 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 ...
gpl-3.0
ForkedReposBak/mxnet
example/ssd/dataset/pascal_voc.py
42
10238
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
dvliman/jaikuengine
.google_appengine/google/appengine/_internal/django/template/defaultfilters.py
23
29329
"""Default variable filters.""" import re from decimal import Decimal, InvalidOperation, ROUND_HALF_UP import random as random_module try: from functools import wraps except ImportError: from google.appengine._internal.django.utils.functional import wraps # Python 2.4 fallback. from google.appengine._interna...
apache-2.0
Jorge-Rodriguez/ansible
lib/ansible/modules/windows/win_iis_webapppool.py
28
7155
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Henrik Wallström <henrik@wallstroms.nu> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported...
gpl-3.0
ebagdasa/tempest
tempest/api/orchestration/stacks/test_soft_conf.py
9
7506
# 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 # d...
apache-2.0
NoobieDog/nexmon
utilities/wireshark/tools/netscreen2dump.py
42
4423
#!/usr/bin/env python """ Converts netscreen snoop hex-dumps to a hex-dump that text2pcap can read. Copyright (c) 2004 by Gilbert Ramirez <gram@alumni.rice.edu> 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 F...
gpl-3.0
ioram7/keystone-federado-pgid2013
build/python-keystoneclient/keystoneclient/exceptions.py
1
4260
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 Nebula, Inc. """ Exception definitions. """ class CommandError(Exception): pass class ValidationError(Exception): pass class AuthorizationFailure(Exception): pass class NoTokenLookupException(Exception): """This form of authentication does not ...
apache-2.0
Magnitus-/DockerFiles
network-setup/image/setup.py
1
5370
#!/usr/local/bin/python import os import datetime import re import docker from jinja2 import Template from yaml import load TEMPLATES_DIRECTORY = os.environ['TEMPLATE_DIRECTORY'] CONFIG_DIRECTORY = os.environ['CONFIG_DIRECTORY'] SERVICE_NAMES = { 'dns': os.environ.get('DNS_SERVICE_NAME', 'dns'), 'dhcp': os....
mit
Immortalin/python-for-android
python3-alpha/python3-src/Lib/test/test_aifc.py
55
3979
from test.support import findfile, run_unittest, TESTFN import unittest import os import aifc class AIFCTest(unittest.TestCase): def setUp(self): self.f = self.fout = None self.sndfilepath = findfile('Sine-1000Hz-300ms.aif') def tearDown(self): if self.f is not None: sel...
apache-2.0
uclouvain/osis_louvain
base/forms/learning_unit/educational_information/mail_reminder.py
1
3305
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
zchking/odoo
addons/resource/faces/observer.py
433
2328
#@+leo-ver=4 #@+node:@file observer.py #@@language python #@<< Copyright >> #@+node:<< Copyright >> ############################################################################ # Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # ...
agpl-3.0
yati-sagade/incubator-airflow
airflow/contrib/operators/gcs_to_bq.py
1
9518
# -*- 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 ...
apache-2.0
mlesche/deep_seq_pipeline
deep_seq_pipeline/src/general_scripts/createGTFfiles.py
1
18824
#!/usr/bin/env python ''' The MIT License (MIT) Copyright (c) <2014> <Mathias Lesche> 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 without restriction, including without limitation the rights ...
mit
val-iisc/sketch-parse
exp-src/table3.py
1
8623
import scipy from scipy import ndimage import cv2 import numpy as np import sys import torch import resnet_dilated_frozen_r5_D #TODO import resnet_dilated_frozen_r5_D #TODO import resnet_dilated_frozen_r5_D_pose #TODO import resnet_dilated_frozen_r5_D_pose #TODO from torch.autograd import Variable import torchvision.m...
mit
bravo-zhang/spark
sql/hive/src/test/resources/data/scripts/cat.py
105
1040
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
danielreed/python-hpOneView
examples/scripts/get-role-category-actions.py
2
3990
#!/usr/bin/env python ### # (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP # # 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 without restriction, including without limita...
mit
Isendir/brython
www/src/Lib/logging/config.py
739
35619
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
bsd-3-clause
jjhelmus/CyLP
cylp/tests/test_CyCoinMpsIO.py
4
2151
import unittest import inspect import os from os.path import join import numpy as np from cylp.cy import CyCoinMpsIO from cylp.cy.CyCoinMpsIO import getQpsExample currentFilePath = os.path.dirname(inspect.getfile(inspect.currentframe())) class TestCyCoinMpsIO(unittest.TestCase): def test(self): problem...
epl-1.0
Anonymouslemming/ansible
lib/ansible/modules/network/dellos10/dellos10_config.py
62
10381
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # Copyright (c) 2017 Dell Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versi...
gpl-3.0
Lab603/PicEncyclopedias
jni-build/jni/include/tensorflow/models/rnn/ptb/reader_test.py
14
2036
# 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...
mit
izapolsk/integration_tests
cfme/tests/infrastructure/test_cluster_analysis.py
1
1373
import pytest from cfme import test_requirements from cfme.infrastructure.provider import InfraProvider from cfme.markers.env_markers.provider import ONE_PER_TYPE from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.wait import wait_for pytestmark = [ pytest.mark.tier(2), test_requ...
gpl-2.0
Parsl/parsl
parsl/executors/high_throughput/zmq_pipes.py
1
5931
#!/usr/bin/env python3 import zmq import time import pickle import logging import threading logger = logging.getLogger(__name__) class CommandClient(object): """ CommandClient """ def __init__(self, ip_address, port_range): """ Parameters ---------- ip_address: str ...
apache-2.0
ryannjohnson/popular-python
popular/users.py
1
1254
class User(object): """Information about an authenticated user. Providers return different forms of information. This container is meant to provide a common interface with that information across all vendors. """ ATTRIBUTES = [ 'id', 'name', 'nickname', 'email...
mit
rtucker-mozilla/inventory
api_v2/relengdistro_handler.py
6
1741
from piston.handler import BaseHandler, rc from systems.models import System, RelengDistro, SystemRack,SystemStatus,NetworkAdapter,KeyValue from truth.models import Truth, KeyValue as TruthKeyValue from dhcp.DHCP import DHCP as DHCPInterface from dhcp.models import DHCP from MacroExpansion import MacroExpansion from Ke...
bsd-3-clause
unixweb/rpi-cpu-alarm
alarm25.py
1
1103
#!/usr/bin/python import os import smtplib import time from email.mime.text import MIMEText mailserver = "XXXX.de" smtpport = 25 smtpuser = "XXXX" smtpasswd = "XXXXX" recipient = "XXXX@XXXX.de" smtpsender = "alarm@XXXX.de" alarmtemp = 25 day = repr(time.localtime()[2]) + "."+repr(time.localtime()[1])+"."+repr(time....
gpl-3.0
angelapper/edx-platform
lms/djangoapps/courseware/model_data.py
5
36505
""" Classes to provide the LMS runtime data storage to XBlocks. :class:`DjangoKeyValueStore`: An XBlock :class:`~KeyValueStore` which stores a subset of xblocks scopes as Django ORM objects. It wraps :class:`~FieldDataCache` to provide an XBlock-friendly interface. :class:`FieldDataCache`: A object which pro...
agpl-3.0
rizar/fuel
tests/test_caltech101_silhouettes.py
25
1642
import numpy from numpy.testing import assert_raises from fuel.datasets import CalTech101Silhouettes from tests import skip_if_not_available def test_caltech101_silhouettes16(): skip_if_not_available(datasets=['caltech101_silhouettes16.hdf5']) for which_set, size, num_examples in ( ('train', 16, ...
mit
benjaminabel/pelican-plugins
goodreads_activity/goodreads_activity.py
76
1871
# -*- coding: utf-8 -*- """ Goodreads Activity ================== A Pelican plugin to lists books from your Goodreads shelves. Copyright (c) Talha Mansoor """ from __future__ import unicode_literals import logging logger = logging.getLogger(__name__) from pelican import signals class GoodreadsActivity(): def...
agpl-3.0
Benowit/android_kernel_motorola_msm8974
tools/perf/scripts/python/net_dropmonitor.py
1258
1562
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
gpl-2.0
Lab603/PicEncyclopedias
jni-build/jni-build/jni/include/tensorflow/python/kernel_tests/lrn_op_test.py
4
5376
# 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...
mit
rosscdh/silk
django_silky/silk/profiling/dynamic.py
8
6869
from functools import partial import inspect import logging import sys import re import six from silk.profiling.profiler import silk_profile Logger = logging.getLogger('silk') def _get_module(module_name): """ Given a module name in form 'path.to.module' return module object for 'module'. """ if '...
mit
fargalaxy1/geonode-leaflet
geonode/groups/tests.py
11
17197
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
ShaheenHossain/eagle-medical
medical_his/tests/test_medical_hospital_or.py
1
1700
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of medical_his, # an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # medical_his is free software: # you can redistribute it and/or modify it under t...
agpl-3.0
Socim/Alucard-Kernel-jflte
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
MetrodataTeam/incubator-airflow
airflow/contrib/sensors/jira_sensor.py
30
5905
# -*- 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 ...
apache-2.0
Kazade/NeHe-Website
google_appengine/lib/django-1.4/django/contrib/gis/tests/distapp/models.py
406
1832
from django.contrib.gis.db import models class SouthTexasCity(models.Model): "City model on projected coordinate system for South Texas." name = models.CharField(max_length=30) point = models.PointField(srid=32140) objects = models.GeoManager() def __unicode__(self): return self.name class SouthTe...
bsd-3-clause
bwrsandman/OpenUpgrade
addons/crm_profiling/__init__.py
438
1089
# -*- 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...
agpl-3.0
midma101/m0du1ar
.venv/lib/python2.7/site-packages/pip/_vendor/packaging/version.py
439
11949
# Copyright 2014 Donald Stufft # # 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, so...
mit
weiawe/django
tests/migrations/test_loader.py
28
11971
from __future__ import unicode_literals from unittest import skipIf from django.db import connection, connections from django.db.migrations.graph import NodeNotFoundError from django.db.migrations.loader import AmbiguityError, MigrationLoader from django.db.migrations.recorder import MigrationRecorder from django.tes...
bsd-3-clause
mojaves/convirt
tests/monkey.py
1
3383
from __future__ import absolute_import # # Copyright 2012-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 2 of the License, or # (at your option) any l...
lgpl-2.1
sv-dev1/odoo
openerp/cli/server.py
187
5869
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
jeffmahoney/supybot
plugins/Reply/test.py
18
2633
### # Copyright (c) 2005, Daniel DiPaolo # 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 condition...
bsd-3-clause
yfried/ansible
lib/ansible/modules/monitoring/grafana_dashboard.py
6
14980
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Thierry Sallé (@seuf) # 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 ANSIBLE_METADATA = { 'status': ['preview'], 'supported_by': 'com...
gpl-3.0
2014c2g2/teamwork
wsgi/static/reeborg/src/libraries/brython/Lib/posix.py
11
20408
"""This module provides access to operating system functionality that is standardized by the C Standard and the POSIX standard (a thinly disguised Unix interface). Refer to the library manual and corresponding Unix manual entries for more information on calls.""" import datetime F_OK = 0 O_APPEND = 8 O_BINARY = 32...
gpl-2.0
switchboardOp/ansible
contrib/inventory/cloudstack.py
119
9137
#!/usr/bin/env python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # This file is part of Ansible, # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the...
gpl-3.0
goldsborough/.emacs
.emacs.d/.python-environments/default/lib/python3.5/encodings/cp869.py
272
32965
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP869.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
mit
Tiglas/pickup-planner
request_handler/flask/lib/python2.7/site-packages/wheel/signatures/__init__.py
565
3779
""" Create and verify jws-js format Ed25519 signatures. """ __all__ = [ 'sign', 'verify' ] import json from ..util import urlsafe_b64decode, urlsafe_b64encode, native, binary ed25519ll = None ALG = "Ed25519" def get_ed25519ll(): """Lazy import-and-test of ed25519 module""" global ed25519ll if not ...
mit
abought/osf.io
website/addons/forward/views/config.py
3
1679
"""Views for the node settings page.""" # -*- coding: utf-8 -*- import httplib as http from flask import request from modularodm.exceptions import ValidationError from framework.exceptions import HTTPError from website.project.decorators import ( must_have_addon, must_have_permission, must_not_be_registr...
apache-2.0
dnlm92/chokoretto
main/lib/unidecode/x026.py
165
4020
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '[?]', # 0x14 '[?]', # 0x...
mit
terbolous/CouchPotatoServer
libs/subliminal/api.py
106
5646
# -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 3 of...
gpl-3.0
nricklin/PyGithub
github/GistHistoryState.py
74
10159
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
drewp/tahoe-lafs
misc/simulators/simulate_load.py
10
4916
#!/usr/bin/env python # WARNING. There is a bug in this script so that it does not simulate the actual Tahoe Two server selection algorithm that it was intended to simulate. See http://allmydata.org/trac/tahoe-lafs/ticket/302 (stop permuting peerlist, use SI as offset into ring instead?) import random SERVER_CAPACIT...
gpl-2.0
seenaburns/lifts
database.py
1
4543
""" --- database.py ~~~~~~~~~~~ Lifts flatfile database accessing / querying functions. """ # For with clause, create new db_manager that connects def dbm(db_file): return DB_Manager(db_file) class DB_Manager(): def __init__(self, db_file): self.db_file = db_file pass # __enter__ a...
bsd-3-clause
eoneil1942/voltdb-4.7fix
tests/ee/indexes/index_scripted_test.py
2
2299
#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2014 VoltDB Inc. # # 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 without restriction, including # without limitati...
agpl-3.0
nwspeete-ibm/openwhisk
tools/travis/box-upload.py
1
1039
#!/usr/bin/env python import os import subprocess import sys import tempfile import urllib # Compresses the contents of a folder and upload the result to Box. # Run this script as: # # $ upload-logs.py LOG_DIR DEST_NAME # # e.g.: # # $ upload-logs.py /tmp/wsklogs logs-5512.tar.gz def upload_file(local_file, remote_fi...
apache-2.0
nikhilraog/boto
boto/ec2/elb/attributes.py
153
5103
# 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 without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell co...
mit
gwct/core
generators/cds-aln/04_codon_filter.py
1
14930
#!/usr/bin/python ############################################################ # For Penn genomes, 06.2020 # Takes a log file from a clipkit run on amino acid sequence # and removes corresponding sites from codon alignment. ############################################################ import sys, os, core, coreseq, arg...
gpl-3.0
fmv1992/python-mode
pymode/libs/pkg_resources/_vendor/packaging/__about__.py
441
1073
# Copyright 2014 Donald Stufft # # 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, so...
lgpl-3.0
smukoehler/SDB-control
mpcdriver.py
1
3535
import urlparse import datetime import urllib2 from smap.driver import SmapDriver from smap.util import periodicSequentialCall from smap.contrib import dtutil from sklearn import linear_model from smap.archiver.client import RepublishClient from functools import partial from mpc import * class SimpleMPC(SmapDriver): ...
bsd-2-clause
total-impact/total-impact-core
test/unit_tests/test_provider_batch_data.py
4
49398
from totalimpact import db, app from totalimpact import provider_batch_data from totalimpact.provider_batch_data import ProviderBatchData from flask import Flask from flask_sqlalchemy import SQLAlchemy from sqlalchemy.exc import OperationalError import os, json, copy from nose.tools import raises, assert_equals, not...
mit
markusappel/McCode
tools/Python/obsoleted/mcdisplay-x3d/rewrite.py
3
5048
#!/usr/bin/env python ''' Small script to rewrite McStas trace output to CSV data for plotting ''' import argparse import sys import numpy as np import x3d from util import parse_multiline, rotate, get_line, debug, draw_circle UC_COMP = 'COMPONENT:' MC_COMP = 'MCDISPLAY: component' MC_COMP_SHORT = 'COMP: '...
gpl-2.0
Juniper/contrail-dev-controller
src/config/vnc_openstack/vnc_openstack/tests/test_basic.py
5
2533
import sys import json sys.path.append('../common/tests') from testtools.matchers import Equals, Contains from test_utils import * import test_common import test_case class NBTestExtraFieldsPresenceCodeDefault(test_case.NeutronBackendTestCase): def test_extra_fields_on_network(self): test_obj = self._cre...
apache-2.0
mattbernst/polyhartree
support/ansible/runner/lookup_plugins/dnstxt.py
166
2221
# (c) 2012, Jan-Piet Mens <jpmens(at)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 ver...
gpl-3.0
a9261/flexx
flexx/ui/test.py
20
6110
import time import logging import flexx from flexx import app, ui import faulthandler faulthandler.enable() #logging.log class MyApp(ui.Widget): #_config = ui.App.Config(title='Flexx test app', size=(400, 300), # )#icon='https://assets-cdn.github.com/favicon.ico') ...
bsd-2-clause
hoangt/tpzsimul.gem5
src/dev/arm/Gic.py
24
2982
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
nwswanson/epulorimiter
lib/wtforms/ext/appengine/ndb.py
174
17124
""" Form generation utilities for App Engine's new ``ndb.Model`` class. The goal of ``model_form()`` is to provide a clean, explicit and predictable way to create forms based on ``ndb.Model`` classes. No malabarism or black magic should be necessary to generate a form for models, and to add custom non-model related fi...
gpl-2.0
mushkevych/scheduler
tests/test_site_monthly_aggregator.py
1
1475
__author__ = 'Bohdan Mushkevych' import unittest from settings import enable_test_mode enable_test_mode() from db.model.site_statistics import DOMAIN_NAME, TIMEPERIOD from constants import PROCESS_SITE_MONTHLY from tests import daily_fixtures from tests import monthly_fixtures from tests.test_abstract_worker import A...
bsd-3-clause
gnuhub/intellij-community
python/lib/Lib/decimal.py
74
183326
# Copyright (c) 2004 Python Software Foundation. # All rights reserved. # Written by Eric Price <eprice at tjhsst.edu> # and Facundo Batista <facundo at taniquetil.com.ar> # and Raymond Hettinger <python at rcn.com> # and Aahz <aahz at pobox.com> # and Tim Peters # This module is currently Py2.3 compatibl...
apache-2.0
gavruskin/microinteractions
data_preprocess_Development.py
1
9649
import pandas as pd data = pd.read_csv("DevelopmentData.csv") n = len(data.columns) # Add all parameters (Taylor coefficients) as 0 in rows following the data: for i in range(data.shape[0]): for j in range(n+2, n+34): data.set_value(i, j, 0) data.rename(columns={n+2: "a", n+3: "a1", n+4: "a2"...
mit
belokop-an/agenda-tools
code/htdocs/contributionModification.py
1
3733
from MaKaC.webinterface.rh import contribMod def index(req, **params): return contribMod.RHContributionModification( req ).process( params ) def newPrimAuthor(req, **params): return contribMod.RHNewPrimaryAuthor( req ).process( params ) def searchPrimAuthor(req, **params): return contribMod.RHSearchPrima...
gpl-2.0
dydek/django
django/contrib/gis/utils/layermapping.py
8
27310
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: https://docs.djangoproject.com/en/dev/ref/contrib/gi...
bsd-3-clause
eoyilmaz/anima
anima/mocap/xsens.py
1
5719
# -*- coding: utf-8 -*- from collections import namedtuple # Data containers Header = namedtuple( 'Header', ['sample_counter', 'datagram_counter', 'num_items', 'timecode', 'charID', 'extra_data'] ) Euler = namedtuple( 'Euler', ['segment_ID', 'tx', 'ty', 'tz', 'rx', 'ry', 'rz'] ) Quaternion = nam...
mit
GreenLunar/Bookie
bookie/tests/test_models/test_bmark.py
7
2534
"""Test the basics including the bmark and tags""" from bookie.models import ( DBSession, Bmark, ) from bookie.models.auth import User from bookie.tests import gen_random_word from bookie.tests import TestDBBase class TestBmark(TestDBBase): """Handle bmark function checks""" def test_has_access_sa...
agpl-3.0
mozilla/pontoon
pontoon/sync/formats/ftl.py
2
5349
import codecs import copy import logging from fluent.syntax import ast, FluentParser, FluentSerializer from pontoon.sync.exceptions import SyncError from pontoon.sync.formats.base import ParsedResource from pontoon.sync.utils import create_parent_directory from pontoon.sync.vcs.models import VCSTranslation log = log...
bsd-3-clause
martydill/url_shortener
code/venv/lib/python2.7/site-packages/mimeparse.py
31
6452
"""MIME-Type Parser This module provides basic functions for handling mime-types. It can handle matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explanation. http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 Contents: - parse_mi...
mit
viggates/nova
nova/tests/integrated/v3/test_console_output.py
31
1106
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM 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...
apache-2.0
hynnet/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/bsddb/dbutils.py
157
2964
#------------------------------------------------------------------------ # # Copyright (C) 2000 Autonomous Zone Industries # # License: This is free software. You may use this software for any # purpose including modification/redistribution, so long as # this header remains intact and...
gpl-2.0
HyperloopTeam/FullOpenMDAO
lib/python2.7/site-packages/requests-2.2.1-py2.7.egg/requests/packages/urllib3/contrib/ntlmpool.py
714
4741
# urllib3/contrib/ntlmpool.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://co...
gpl-2.0
ofek/bit
tests/test_base58.py
1
1028
import pytest from bit.base58 import b58decode, b58decode_check, b58encode, b58encode_check from bit.format import MAIN_PUBKEY_HASH from .samples import BINARY_ADDRESS, BITCOIN_ADDRESS, PUBKEY_HASH def test_b58encode(): assert b58encode(BINARY_ADDRESS) == BITCOIN_ADDRESS assert b58encode(BINARY_ADDRESS[:1]) ...
mit
tysonclugg/django
django/db/backends/base/creation.py
20
11972
import sys from io import StringIO from django.apps import apps from django.conf import settings from django.core import serializers from django.db import router # The prefix to put on the default database name when creating # the test database. TEST_DATABASE_PREFIX = 'test_' class BaseDatabaseCreation: """ ...
bsd-3-clause
mitchrule/Miscellaneous
Django_Project/django/Lib/site-packages/django/contrib/gis/management/commands/ogrinspect.py
111
5738
import argparse import inspect from django.contrib.gis import gdal from django.core.management.base import BaseCommand, CommandError class LayerOptionAction(argparse.Action): """ Custom argparse action for the `ogrinspect` `layer_key` keyword option which may be an integer or a string. """ def __...
mit
CylanceSPEAR/IntroductionToMachineLearningForSecurityPros
IDPanel/train_lr_model.py
1
4200
from idpanel.training.vectorization import load_raw_feature_vectors from idpanel.training.features import load_raw_features from idpanel.labels import load_labels from sklearn.cross_validation import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.metrics import confusion_matrix import...
gpl-3.0
Nexenta/s3-tests
virtualenv/lib/python2.7/site-packages/gevent/util.py
10
2050
# Copyright (c) 2009 Denis Bilenko. See LICENSE for details. __all__ = ['wrap_errors', 'lazy_property'] class wrap_errors(object): """Helper to make function return an exception, rather than raise it. Because every exception that is unhandled by greenlet will be logged, it is desirable to prevent non-err...
mit
snorp/web-page-replay
mockhttprequest.py
40
2150
#!/usr/bin/env python # 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 required...
apache-2.0
bonitadecker77/python-for-android
python-modules/twisted/twisted/web/http.py
52
59442
# -*- test-case-name: twisted.web.test.test_http -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ HyperText Transfer Protocol implementation. This is used by twisted.web. Future Plans: - HTTP client support will at some point be refactored to support HTTP/1.1. - Accept chun...
apache-2.0
CoherentLabs/depot_tools
recipes/infra.py
4
1173
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import recipe_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232 cla...
bsd-3-clause
laiqiqi886/kbengine
kbe/src/lib/python/Lib/encodings/iso8859_15.py
272
13212
""" Python Character Mapping Codec iso8859_15 generated from 'MAPPINGS/ISO8859/8859-15.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
lgpl-3.0
avedaee/DIRAC
FrameworkSystem/scripts/dirac-myproxy-upload.py
14
1686
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-proxy-init.py # Author : Adrian Casajus ######################################################################## __RCSID__ = "$Id$" import sys import getpass import DIRAC from DIRAC.Core.Base i...
gpl-3.0
aelthwin/Battle-for-Wesnoth--Zombie-Edition
scons/sdl.py
5
4068
# vi: syntax=python:et:ts=4 import os from SCons.Script import * from config_check_utils import * def CheckSDL(context, sdl_lib = "SDL", require_version = None): if require_version: version = require_version.split(".", 2) major_version = int(version[0]) minor_version = int(version[1]) ...
gpl-2.0
ikaee/bfr-attendant
facerecognitionlibrary/jni-build/jni/include/tensorflow/contrib/metrics/python/kernel_tests/set_ops_test.py
22
34996
# 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...
apache-2.0
sqlalchemy/alembic
alembic/util/messaging.py
2
2692
from collections.abc import Iterable import logging import sys import textwrap import warnings from sqlalchemy.engine import url from . import sqla_compat from .compat import binary_type from .compat import string_types log = logging.getLogger(__name__) # disable "no handler found" errors logging.getLogger("alembic...
mit