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
mskala/noxcf-gimp
plug-ins/pygimp/plug-ins/gradients-save-as-css.py
16
3784
#! /usr/bin/env python # -*- coding: utf-8 -*- # Allows saving (TODO: and loading) CSS gradient files # Copyright (C) 2011 João S. O. Bueno <gwidion@gmail.com> # # 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...
gpl-3.0
sergei-maertens/django
django/contrib/staticfiles/management/commands/findstatic.py
106
1745
from __future__ import unicode_literals import os from django.contrib.staticfiles import finders from django.core.management.base import LabelCommand from django.utils.encoding import force_text class Command(LabelCommand): help = "Finds the absolute paths for the given static file(s)." label = 'staticfile'...
bsd-3-clause
farseerfc/jgments
lib/pygments-1.2.2-patched/pygments/lexers/__init__.py
3
7343
# -*- coding: utf-8 -*- """ pygments.lexers ~~~~~~~~~~~~~~~ Pygments lexers. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys import fnmatch import types from os.path import basename try: set except NameError: from s...
bsd-2-clause
soldag/home-assistant
tests/components/nightscout/test_init.py
7
1416
"""Test the Nightscout config flow.""" from aiohttp import ClientError from homeassistant.components.nightscout.const import DOMAIN from homeassistant.config_entries import ( ENTRY_STATE_LOADED, ENTRY_STATE_NOT_LOADED, ENTRY_STATE_SETUP_RETRY, ) from homeassistant.const import CONF_URL from tests.async_mo...
apache-2.0
UniversalMasterEgg8679/ansible
lib/ansible/modules/system/aix_lvol.py
10
10849
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Alain Dejoux <adejoux@djouxtech.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
yosuke/rtshell
rtshell/post_install.py
2
9957
# -*- Python -*- # -*- coding: utf-8 -*- from __future__ import print_function '''rtshell Copyright (C) 2009-2015 Geoffrey Biggs RT-Synthesis Research Group Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserv...
lgpl-3.0
CarlosLannister/OwadeReborn
owade/fileAnalyze/outlook.py
1
3487
from DPAPI.Core import masterkey from DPAPI.Core import registry from DPAPI.Probes import dropbox from DPAPI.Core import blob import sqlite3 import re import os import binascii # Version 0.1. class GetOutlookPassword: def getOutlookPassword(self, mkpDir, sid, credHist, ntUser, userPassword): dic = {} ...
gpl-3.0
lDisciple/MetaZombies
Mobile/networkHandler.py
1
5894
import threading import urllib import urllib.parse import urllib.error import urllib.request import urllib.response import json import time import os """ Method to add a new TODO file with command in it """ def addCommandToQueue(command): fileName = os.getcwd() + "/TODO/task_queue_" + str(time.time()) f = open(fileNa...
mit
pablooliveira/cere
src/cere/cere_sanity_check.py
3
5075
#!/usr/bin/env python # This file is part of CERE. # # Copyright (c) 2013-2016, Universite de Versailles St-Quentin-en-Yvelines # # CERE 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 ...
lgpl-3.0
richpolis/siveinpy
env/lib/python2.7/site-packages/django/core/management/commands/testserver.py
307
2006
from django.core.management.base import BaseCommand from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noinput', action='store_false', dest='interactive', default=True, help='Tells Django to NOT prompt the user for input of any...
mit
asmaps/kvmate
kvmate/vnc/views.py
2
2256
from django.shortcuts import redirect from django.views.generic import View from django.views.generic.base import TemplateView from braces.views import LoginRequiredMixin import json from django.template import RequestContext from django.template.loader import render_to_string from django.http import HttpResponse from ...
mit
anryko/ansible
lib/ansible/modules/network/fortios/fortios_report_dataset.py
7
13721
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
altaf-ali/luigi
examples/ftp_experiment_outputs.py
85
3278
# -*- 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...
apache-2.0
quinot/ansible
lib/ansible/modules/network/nxos/_nxos_ip_interface.py
8
22287
#!/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 distribut...
gpl-3.0
Hazelwire/Hazelwire
src/run_tests.py
1
1457
# Copyright (c) 2011 The Hazelwire Team. # # This file is part of Hazelwire. # # Hazelwire 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...
gpl-3.0
tildebyte/processing.py
examples.py/3D/Form/Vertices.py
7
1764
""" Vertices by Simon Greenwold. (Rewritten in Python by Jonathan Feinberg.) Draw a cylinder centered on the y-axis, going down from y=0 to y=height. The radius at the top can be different from the radius at the bottom, and the number of sides drawn is variable. """ def setup(): size(640, 360, P3D) ...
apache-2.0
normanmaurer/autobahntestsuite-maven-plugin
src/main/resources/twisted/internet/_posixstdio.py
19
5015
# -*- test-case-name: twisted.test.test_stdio -*- """Standard input/out/err support. Future Plans:: support for stderr, perhaps Rewrite to use the reactor instead of an ad-hoc mechanism for connecting protocols to transport. Maintainer: James Y Knight """ import warnings from zope.interface import ...
apache-2.0
dav1x/ansible
docs/api/conf.py
66
10034
# -*- coding: utf-8 -*- # # Ansible documentation build configuration file, created by # sphinx-quickstart on Fri Jun 3 17:34:17 2016. # # 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. # # A...
gpl-3.0
MotorolaMobilityLLC/external-chromium_org
tools/omahaproxy.py
164
2466
#!/usr/bin/env python # Copyright (c) 2013 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. """Chrome Version Tool Scrapes Chrome channel information and prints out the requested nugget of information. """ import json imp...
bsd-3-clause
rosswhitfield/mantid
scripts/test/Muon/utilities/muon_file_utils_test.py
3
4193
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + impo...
gpl-3.0
tomhenderson/ns-3-dev-testing
utils.py
179
4188
#! /usr/bin/env python # These methods are used by test.py and waf to look for and read the # .ns3rc configuration file, which is used to specify the modules that # should be enabled import os import sys def get_list_from_file(file_path, list_name): '''Looks for a Python list called list_name in the file specifi...
gpl-2.0
fredreichbier/genie
genie/slp/pyglet_adapter.py
1
4118
from pyglet.image import ImageData, AnimationFrame, Animation from .raw_adapter import RawAdapter class PygletAdapter(RawAdapter): """ An extension to the `RawAdapter`: return an `pyglet.image.ImageData` object. """ def __init__(self, frame): RawAdapter.__init__(self, frame) # Sinc...
bsd-2-clause
yukeyi/meeting
wechat/views.py
1
4093
from django.utils import timezone from wechat.wrapper import WeChatView, WeChatLib from wechat.handlers import * from wechat.models import Activity from meeting.settings import WECHAT_TOKEN, WECHAT_APPID, WECHAT_SECRET class CustomWeChatView(WeChatView): lib = WeChatLib(WECHAT_TOKEN, WECHAT_APPID, WECHAT_SECRET...
gpl-3.0
lordkman/burnman
burnman/output_seismo.py
3
11627
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences # Copyright (C) 2012 - 2017 by the BurnMan team, released under the GNU # GPL v2 or later. from __future__ import absolute_import import numpy as np import warnings import scipy.integrate import matplotlib...
gpl-2.0
noironetworks/neutron
neutron/tests/unit/objects/plugins/ml2/test_flatallocation.py
5
1063
# Copyright (c) 2016 Intel Corporation. # # 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...
apache-2.0
tomaslu/map_editor
authentication/views.py
1
2770
from django.shortcuts import render from django.http.response import HttpResponse, HttpResponseBadRequest,\ HttpResponseRedirect from django.views.generic.base import View from authentication.forms import RegisterForm, LoginForm from django.contrib.auth.models import User from lib.utils import RequestUtils from dja...
mit
jonasjberg/autonameow
autonameow/vendor/chardet/sjisprober.py
1777
3764
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-2.0
bdarnell/codegenloader
codegenloader/protobuf.py
1
1724
from __future__ import with_statement import os import shutil import subprocess import tempfile from codegenloader.base import CodeGenLoader class ProtobufLoader(CodeGenLoader): def protoname(self, relname): assert relname.endswith("_pb2") relname = relname[:-len("_pb2")] return os.path.ab...
mit
mtp401/airflow
airflow/operators/mysql_operator.py
5
1301
import logging from airflow.hooks import MySqlHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults class MySqlOperator(BaseOperator): """ Executes sql code in a specific MySQL database :param mysql_conn_id: reference to a specific mysql database :type mysq...
apache-2.0
ProfessionalIT/professionalit-webiste
sdk/google_appengine/lib/django-1.3/django/utils/formats.py
159
6835
import decimal import datetime from django.conf import settings from django.utils.translation import get_language, to_locale, check_for_language from django.utils.importlib import import_module from django.utils.encoding import smart_str from django.utils import dateformat, numberformat, datetime_safe from django.util...
lgpl-3.0
igutekunst/lol-pandora
pandora/blowfish.py
6
21268
# Copyright (C) 2011 Versile AS # # This file is part of Versile Python Open Source Edition. # # Versile Python Open Source Edition is free software: you can # redistribute it and/or modify it under the terms of the GNU Affero # General Public License as published by the Free Software Foundation, # either version 3 of ...
mit
alexandreleroux/mayavi
integrationtests/mayavi/test_vtk_xml_reader.py
2
1044
"""Simple test to check the VTK XML reader -- this is basically a copy of test_contour.py with just the reader changed. """ # Author: Prabhu Ramachandran <prabhu_r@users.sf.net> # Copyright (c) 2005-2008, Enthought, Inc. # License: BSD Style. # Standard library imports. from os.path import abspath from StringIO impor...
bsd-3-clause
bdoner/SickRage
lib/sqlalchemy/event/api.py
75
3844
# event/api.py # Copyright (C) 2005-2014 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 """Public API functions for the event system. """ from __future__ import absolute_import...
gpl-3.0
hufsm/tu_gen2_libsigrokdecode
decoders/eeprom93xx/pd.py
1
5740
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2017 Kevin Redon <kingkevin@cuvoodoo.info> ## ## 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 2 of t...
gpl-3.0
eeshangarg/oh-mainline
mysite/search/migrations/0047_project_icons_mark_as_wrong.py
17
10858
# This file is part of OpenHatch. # Copyright (C) 2010 Parker Phinney # Copyright (C) 2010 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Licens...
agpl-3.0
mavenlin/tensorflow
tensorflow/contrib/learn/python/learn/experiment_test.py
18
34939
# 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 appl...
apache-2.0
Jimdo/ansible-modules-core
cloud/amazon/rds_subnet_group.py
17
5033
#!/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...
gpl-3.0
ychen820/microblog
y/google-cloud-sdk/.install/.backup/platform/gsutil/third_party/boto/boto/s3/bucketlistresultset.py
19
6565
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
bsd-3-clause
foursquare/pants
contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/file_excluder.py
1
1407
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os import re from builtins import object from pants.base.exceptions import TaskEr...
apache-2.0
openiitbombayx/edx-platform
lms/djangoapps/courseware/tests/test_about.py
38
23595
""" Test the about xblock """ import datetime import pytz from django.conf import settings from django.core.urlresolvers import reverse from django.test.utils import override_settings from mock import patch from nose.plugins.attrib import attr from opaque_keys.edx.locations import SlashSeparatedCourseKey from course_...
agpl-3.0
2014c2g2/teamwork
w2/static/Brython2.0.0-20140209-164925/Lib/subprocess.py
728
67282
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/2.4/license for licensing details. r"""subprocess - Subpr...
gpl-2.0
umitproject/site-status
django/core/handlers/wsgi.py
102
10193
from pprint import pformat import sys from threading import Lock try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import socket from django import http from django.core import signals from django.core.handlers import base from django.core.urlresolvers import set_script_pref...
agpl-3.0
live-clones/dolfin-adjoint
dolfin_adjoint/assignment.py
1
3768
import backend import ufl from .solving import solve, annotate as solving_annotate, do_checkpoint, register_initial_conditions import libadjoint from . import adjlinalg from . import adjglobals from . import utils def register_assign(new, old, op=None): if not isinstance(old, backend.Function): assert op ...
lgpl-3.0
nin042/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/test/finder_unittest.py
124
5471
# Copyright (C) 2012 Google, Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer...
bsd-3-clause
darith27/wagtail
wagtail/contrib/wagtailstyleguide/views.py
11
2636
from django import forms from django.shortcuts import render from django.utils.translation import ugettext as _ from wagtail.wagtailadmin import messages from django.contrib.auth.decorators import permission_required from wagtail.wagtailadmin.forms import SearchForm from wagtail.wagtailadmin.widgets import AdminPageCh...
bsd-3-clause
ToolsOnAir/gl-frame-bender
scripts/run_analysis.py
1
25995
import os import shutil import subprocess import re import tempfile import time import csv from optparse import OptionParser def parse_args(): parser = OptionParser() parser.add_option("-o", "--output-directory", dest="out_dir", default= ".", help="Defines the output directory.") parser.add_option("-t", "-...
mit
rnirmal/cinder
setup.py
3
1782
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
h4r5h1t/django-hauthy
tests/utils_tests/test_html.py
160
10711
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from datetime import datetime from django.test import SimpleTestCase, ignore_warnings from django.utils import html, safestring, six from django.utils._os import upath from django.utils.deprecation import RemovedInDjango110Warning from django.u...
bsd-3-clause
mhotwagner/abackend
abackend-env/lib/python3.5/site-packages/django/core/mail/backends/console.py
696
1477
""" Email backend that writes messages to console instead of sending them. """ import sys import threading from django.core.mail.backends.base import BaseEmailBackend from django.utils import six class EmailBackend(BaseEmailBackend): def __init__(self, *args, **kwargs): self.stream = kwargs.pop('stream',...
mit
qizenguf/MLC-STT
src/arch/x86/isa/insts/simd64/integer/data_reordering/shuffle_and_swap.py
91
2486
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
itsthejoker/Pokemon-Homage
lemonyellow/data/dialogue.py
1
163756
#!/usr/local/bin/python # -*- coding: utf-8 -*- from addict import Dict __all__ = [ "introduction", "pallet_town", "viridian_city", "viridian_city_2", "viridian_forest", "pewter_city", "route_1", "route_3", "route_5", "route_10", "route_11", "route_12",...
mit
asrie/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/qt.py
113
7883
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
WesleyyC/Novels-Punctuation
pdfminer/pdfminer/pdfpage.py
6
5140
#!/usr/bin/env python import logging from .psparser import LIT from .pdftypes import PDFObjectNotFound from .pdftypes import resolve1 from .pdftypes import int_value from .pdftypes import list_value from .pdftypes import dict_value from .pdfparser import PDFParser from .pdfdocument import PDFDocument from .pdfdocument ...
mit
ldong/vim_youcompleteme
cpp/ycm/tests/gmock/gtest/xcode/Scripts/versiongenerate.py
3088
4536
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
gpl-3.0
Reiex/Endless-rooms
Client/session.py
1
25844
# -*- coding:utf_8 -* from editeur_niveaux import * from pickle import Pickler, Unpickler class Session: def __init__(self): self.nom = str() self.utiliser_sauvegarde = False self.tutoriel_fait = False self.etage = dict() self.joueur = dict() self....
gpl-2.0
ibmibmibm/beets
test/test_files.py
2
22499
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 t...
mit
wxmeteorologist/pymetars
metarlist.py
1
6959
from pymetars.metar import MetarSite from heapq import heappush, heappop import os from pymetars.latlonconversions import LatLonConversions from ftplib import FTP as __FTP__ from datetime import datetime as __datetime__ """Create a large set of MetarSites based off the id, name, state/providence, country, lat and lon"...
mit
Stane1983/kernel-aml-m3
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
italomandara/mysite
myresume/admin.py
1
1292
from django.contrib import admin from django.db import models from .models import Person, Skill, MyContent, Job, Course, Contact, Post from django_filepicker.forms import FPFileField from django_filepicker.widgets import FPFileWidget from django import forms class PostAdminForm(forms.ModelForm): class Meta: model...
mit
ktritz/vispy
vispy/util/svg/viewport.py
23
2017
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier. All rights reserved. # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- from . length impo...
bsd-3-clause
ar0551/Wasp
src/ghComp/Wasp_Deconstruct Attribute.py
1
2916
# Wasp: Discrete Design with Grasshopper plug-in (GPL) initiated by Andrea Rossi # # This file is part of Wasp. # # Copyright (c) 2017, Andrea Rossi <a.rossi.andrea@gmail.com> # Wasp is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published # by the ...
gpl-3.0
0x7678/youtube-dl
youtube_dl/extractor/nuvid.py
127
2665
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_request, ) from ..utils import ( parse_duration, unified_strdate, ) class NuvidIE(InfoExtractor): _VALID_URL = r'https?://(?:www|m)\.nuvid\.com/video/(?P<id>[0-9]+)' _TEST = {...
unlicense
banglakit/spaCy
spacy/tests/spans/test_merge.py
1
4698
# coding: utf-8 from __future__ import unicode_literals from ..util import get_doc import pytest def test_spans_merge_tokens(en_tokenizer): text = "Los Angeles start." heads = [1, 1, 0, -1] tokens = en_tokenizer(text) doc = get_doc(tokens.vocab, [t.text for t in tokens], heads=heads) assert len(...
mit
DataKind-SG/test-driven-data-cleaning
tddc/tests/test_build.py
1
1106
import os import subprocess import pytest from tddc import build @pytest.fixture() def build_class(fixtures_dir, input_filename, tmpdir): return build.Scripts( summaries_root_dir=fixtures_dir, input_file=input_filename, scripts_root_dir=tmpdir.strpath, output_dir='') def is_same...
mit
archf/ansible
test/units/modules/network/ios/test_ios_ping.py
20
2742
# # (c) 2016 Red Hat 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 version 3 of the License, or # (at your option) any later version. # # Ansible is d...
gpl-3.0
tlein/Ancona
Test/ExtLibs/gtest-1.7.0/test/gtest_xml_outfiles_test.py
2526
5340
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
mit
drewandersonnz/openshift-tools
ansible/roles/lib_openshift_3.2/library/oc_serviceaccount.py
6
40250
#!/usr/bin/env python # pylint: disable=too-many-lines # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (_) ...
apache-2.0
jonhadfield/ansible-modules-core
cloud/rackspace/rax_queue.py
25
4000
#!/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...
gpl-3.0
gaddman/ansible
lib/ansible/modules/remote_management/cobbler/cobbler_sync.py
80
4403
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.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_ver...
gpl-3.0
lrq3000/neuro_experiments_tools
utils/asciirename/unidecode/x05c.py
252
4612
data = ( 'Po ', # 0x00 'Feng ', # 0x01 'Zhuan ', # 0x02 'Fu ', # 0x03 'She ', # 0x04 'Ke ', # 0x05 'Jiang ', # 0x06 'Jiang ', # 0x07 'Zhuan ', # 0x08 'Wei ', # 0x09 'Zun ', # 0x0a 'Xun ', # 0x0b 'Shu ', # 0x0c 'Dui ', # 0x0d 'Dao ', # 0x0e 'Xiao ', # 0x0f 'Ji ', # 0x10...
mit
gmt/portage
pym/_emerge/emergelog.py
11
1675
# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import unicode_literals import io import sys import time import portage from portage import os from portage import _encodings from portage import _unicode_decode from portage import _unicode_enco...
gpl-2.0
shenxudeu/deuNet
deuNet/datasets/data_utils.py
2
1244
from __future__ import absolute_import from __future__ import print_function import tarfile, inspect, os from six.moves.urllib.request import urlretrieve from ..utils.generic_utils import Progbar def get_file(fname, origin, untar=False): datadir = os.path.expanduser(os.path.join('~', '.deuNet', 'datasets')) ...
mit
was4444/chromium.src
ppapi/generators/idl_generator.py
165
8397
#!/usr/bin/env python # 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. import sys from idl_log import ErrOut, InfoOut, WarnOut from idl_option import GetOption, Option, ParseOptions from idl_parser imp...
bsd-3-clause
zmap/ztag
ztag/annotations/FtpFritz.py
1
2211
import re from ztag.annotation import Annotation from ztag.annotation import OperatingSystem from ztag.annotation import Type from ztag.annotation import Manufacturer from ztag import protocols import ztag.test class FtpFritz(Annotation): protocol = protocols.FTP subprotocol = protocols.FTP.BANNER port = ...
apache-2.0
nemesiscodex/openfonacide
openfonacide/migrations/0004_construccionaulas_construccionsanitario_reparacionaulas_reparacionsanitario.py
3
6913
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('openfonacide', '0003_institucion_nombre'), ] operations = [ migrations.CreateModel( name='ConstruccionAulas', ...
lgpl-3.0
fredericlepied/ansible
lib/ansible/modules/system/capabilities.py
9
6584
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Nate Coraor <nate@bx.psu.edu> # 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.0', ...
gpl-3.0
imtapps/django-imt-fork
tests/regressiontests/null_fk/tests.py
118
3006
from __future__ import absolute_import, unicode_literals from django.db.models import Q from django.test import TestCase from .models import (SystemDetails, Item, PropertyValue, SystemInfo, Forum, Post, Comment) class NullFkTests(TestCase): def test_null_fk(self): d = SystemDetails.objects.create(...
bsd-3-clause
arantebillywilson/python-snippets
microblog/flask/lib/python3.5/site-packages/whoosh/lang/snowball/russian.py
95
20904
from whoosh.compat import u class RussianStemmer(object): """ The Russian Snowball stemmer. :cvar __perfective_gerund_suffixes: Suffixes to be deleted. :type __perfective_gerund_suffixes: tuple :cvar __adjectival_suffixes: Suffixes to be deleted. :type __adjectival_suffixes: tuple :cvar __...
mit
nagyistoce/netzob
src/netzob/Common/MMSTD/Dictionary/DataTypes/IPv4WordType.py
1
8758
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
gpl-3.0
spektom/incubator-airflow
airflow/contrib/operators/oracle_to_oracle_transfer.py
4
1213
# # 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...
apache-2.0
CarlosCondor/pelisalacarta-xbmc-plus
servers/cloudzer.py
42
1954
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para cloudzer # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impo...
gpl-3.0
birdland/dlkit-doc
dlkit/osid/metadata.py
1
58888
class Metadata: """The ``Metadata`` interface defines a set of methods describing a the syntax and rules for creating and updating a data element inside an ``OsidForm``. This interface provides a means to retrieve special restrictions placed upon data elements such as sizes and ranges that may vary ...
mit
Dahlgren/HTPC-Manager
libs/mako/parsetree.py
60
20434
# mako/parsetree.py # Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """defines the parse tree components for Mako templates.""" from mako import exceptions, ast, u...
mit
40223220/worktogether
wsgi.py
1
44884
#@+leo-ver=5-thin #@+node:2014fall.20141212095015.1775: * @file wsgi.py # coding=utf-8 # 上面的程式內容編碼必須在程式的第一或者第二行才會有作用 ################# (1) 模組導入區 # 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝 #@@language python #@@tabwidth -4 #@+<<declarations>> #@+node:2014fall.20141212095015.1776: ** <<declar...
gpl-3.0
openmotics/gateway
src/toolbox.py
1
5644
# Copyright (C) 2019 OpenMotics BV # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribu...
agpl-3.0
cheehieu/linux
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
infoxchange/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/templates/tests.py
26
112369
# -*- coding: utf-8 -*- from django.conf import settings if __name__ == '__main__': # When running this file in isolation, we need to set up the configuration # before importing 'template'. settings.configure() from datetime import datetime, timedelta import time import os import sys import traceback fro...
gpl-3.0
Matt-Deacalion/django
tests/admin_changelist/admin.py
247
3931
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django.core.paginator import Paginator from .models import Child, Event, Parent, Swallow site = admin.AdminSite(name="admin") site.register(User, UserAdmin) class CustomPaginator(Pagina...
bsd-3-clause
ericzolf/ansible
test/support/windows-integration/plugins/modules/win_security_policy.py
99
3842
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub, actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview']...
gpl-3.0
BIT-SYS/gem5-spm-module
src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py
90
4105
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
roisagiv/webrtc-ios
tools/gyp/test/actions/gyptest-all.py
1
3219
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies simple actions when using an explicit build target of 'all'. """ import glob import os import TestGyp test = TestGyp.TestGyp(...
bsd-3-clause
larroy/mxnet
example/gluon/tree_lstm/main.py
8
7577
# 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
davidyezsetz/kuma
vendor/packages/translate-toolkit/translate/convert/__init__.py
7
1265
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2002-2005 Zuza Software Foundation # # This file is part of translate. # # translate 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...
mpl-2.0
bencesomogyi/pyCFD
pyCFD_mesh/vertex.py
1
3347
#------------------------------------------------------------------------------- # Name: vertex # Purpose: class for 3D vertices # # Author: bencesomogyi # # Created: 19.10.2013 # Copyright: (c) bencesomogyi 2013 # Licence: <your licence> #------------------------------------------------------...
gpl-3.0
350dotorg/Django
django/utils/autoreload.py
135
4239
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org) # All rights reserved. # # Redistribution and use in source and binary forms, with ...
bsd-3-clause
lrowe/splinter
tests/type.py
7
2407
# -*- coding: utf-8 -*- # Copyright 2012 splinter authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from .fake_webapp import EXAMPLE_APP class SlowlyTypeTest(object): def test_simple_type(self): "should provide a away to ...
bsd-3-clause
gouravshenoy/airavata
airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py
3
49003
# # Autogenerated by Thrift Compiler (0.9.3) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException import apache.airavata.model.status.ttypes import apache.airavata.model.application.io.ttypes impo...
apache-2.0
r39132/airflow
airflow/contrib/operators/oracle_to_azure_data_lake_transfer.py
4
4641
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
WayneDW/Sentiment-Analysis-in-Event-Driven-Stock-Price-Movement-Prediction
crawler/all_tickers.py
1
2014
#!/usr/bin/env python3 """ Download the ticker list from NASDAQ and save as csv. Output filename: ./input/tickerList.csv """ import csv import sys from urllib.request import urlopen import numpy as np def get_tickers(percent): """Keep the top percent market-cap companies.""" assert isinstance(percent, int) ...
mit
elit3ge/SickRage
sickbeard/notifiers/pytivo.py
12
3574
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
gpl-3.0