repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
vmindru/ansible
lib/ansible/modules/network/ios/ios_ntp.py
2
8789
#!/usr/bin/python # Copyright: Ansible Project # 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_by': 'network'} DOCUMENTATION = ''' --- module: ios_ntp e...
gpl-3.0
partofthething/home-assistant
tests/components/myq/test_cover.py
21
1603
"""The scene tests for the myq platform.""" from homeassistant.const import STATE_CLOSED from .util import async_init_integration async def test_create_covers(hass): """Test creation of covers.""" await async_init_integration(hass) state = hass.states.get("cover.large_garage_door") assert state.st...
mit
Akasurde/virt-manager
virtinst/devicedisk.py
1
33899
# # Classes for building disk device xml # # Copyright 2006-2008, 2012-2014 Red Hat, Inc. # Jeremy Katz <katzj@redhat.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 Free Software Foundation; either version 2 of t...
gpl-2.0
Sean3Don/inkscape
share/extensions/web-transmit-att.py
6
3442
#!/usr/bin/env python ''' Copyright (C) 2009 Aurelio A. Heckert, aurium (a) gmail dot 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 Free Software Foundation; either version 2 of the License, or (at your option) any late...
gpl-2.0
Taffer/cryptopals
cryptopals/scoring.py
1
3026
# -*- coding: utf-8 -*- ''' Methods for scoring the relative goodness of strings. Note that scores are relative to other scores *from the same method*. Score from one method have no relation to scores from a different method. Created on Feb 10, 2015 @author: Chris ''' from __future__ import absolute_im...
mit
simplyguru-dot/ansible-modules-extras
windows/win_firewall_rule.py
15
3145
#!/usr/bin/env python # (c) 2014, Timothy Vandenbrande <timothy.vandenbrande@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 Lic...
gpl-3.0
thnee/ansible
lib/ansible/modules/network/cli/cli_config.py
12
15208
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Ansible by Red Hat, 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
Globegitter/graphene
examples/starwars/schema.py
2
1456
import graphene from graphene import resolve_only_args from .data import get_character, get_droid, get_hero, get_human class Episode(graphene.Enum): NEWHOPE = 4 EMPIRE = 5 JEDI = 6 class Character(graphene.Interface): id = graphene.ID() name = graphene.String() friends = graphene.List(lambd...
mit
pam-bot/SMSBeds
lib/twilio/rest/resources/applications.py
48
4086
from . import InstanceResource, ListResource class Application(InstanceResource): """ An application resource """ def update(self, **kwargs): """ Update this application """ return self.parent.update(self.name, **kwargs) def delete(self): """ Delete this a...
gpl-2.0
lht142934/vnpy
vn.datayes/storage.py
29
18623
import os import json import pymongo import pandas as pd from datetime import datetime, timedelta from api import Config, PyApi from api import BaseDataContainer, History, Bar from errors import (VNPAST_ConfigError, VNPAST_RequestError, VNPAST_DataConstructorError, VNPAST_DatabaseError) class DBConfig(Co...
mit
ralsina/pdfrw
setup.py
4
1289
#!/usr/bin/env python from distutils.core import setup setup( name='pdfrw', version='0.1', description='PDF file reader/writer library', long_description=''' pdfrw lets you read and write PDF files, including compositing multiple pages together (e.g. to do watermarking, or to copy an image or diagram ...
mit
scalable-networks/gnuradio-3.7.0.1
gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py
57
4737
#!/usr/bin/env python from gnuradio import gr from gnuradio import blocks import math, sys, os, time try: import scipy except ImportError: sys.stderr.write("Unable to import Scipy (www.scipy.org)\n") sys.exit(1) try: import sqlite3 except ImportError: sys.stderr.write("Unable to import sqlite3: r...
gpl-3.0
simudream/PyDev.Debugger
third_party/wrapped_for_pydev/ctypes/_endian.py
106
1854
#@PydevCodeAnalysisIgnore import sys from ctypes import * _array_type = type(c_int * 3) def _other_endian(typ): """Return the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types o...
epl-1.0
moonbeamxp/ns-3
src/nix-vector-routing/bindings/callbacks_list.py
95
1249
callback_classes = [ ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', ...
gpl-2.0
open-pli/enigma2
lib/python/Screens/SleepTimerEdit.py
21
6506
from Screens.InfoBar import InfoBar from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import ActionMap from Components.ConfigList import ConfigListScreen from Components.Label import Label from Components.Sources.StaticText import StaticText from Components.config imp...
gpl-2.0
mozilla/sheriffs
vendor-local/src/python-nose/nose/loader.py
10
24643
""" Test Loader ----------- nose's test loader implements the same basic functionality as its superclass, unittest.TestLoader, but extends it by more liberal interpretations of what may be a test and how a test may be named. """ from __future__ import generators import logging import os import sys import unittest imp...
bsd-3-clause
zhxwmessi/or-tools
examples/python/eq20.py
34
4397
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # 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 ...
apache-2.0
kurtw/wagtail
wagtail/wagtailsnippets/wagtail_hooks.py
9
1803
from __future__ import absolute_import, unicode_literals from django.conf.urls import include, url from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.contrib.staticfiles.templatetags.staticfiles import static from django.core import urlresolvers fro...
bsd-3-clause
doduytrung/odoo-8.0
addons/crm/crm.py
267
7967
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
bsmrstu-warriors/Moytri---The-Drone-Aider
Lib/site-packages/scipy/lib/lapack/tests/test_esv.py
57
4762
import numpy as np from numpy.testing import TestCase, assert_array_almost_equal, dec, \ assert_equal from common import FUNCS_TP, FLAPACK_IS_EMPTY, CLAPACK_IS_EMPTY, FUNCS_FLAPACK, \ FUNCS_CLAPACK, PREC SYEV_ARG = np.array([[1,2,3],[2,2,3],[3,3,6]]) SYEV_REF = np.array([-...
gpl-3.0
MockyJoke/numbers
ex11/code/reddit_relative_hint.py
1
1921
import sys from pyspark.sql import SparkSession, functions, types spark = SparkSession.builder.appName('reddit relative scores').getOrCreate() assert sys.version_info >= (3, 4) # make sure we have Python 3.4+ assert spark.version >= '2.1' # make sure we have Spark 2.1+ schema = types.StructType([ # commented-out fie...
mit
rohit21122012/DCASE2013
runs/2016/dnn2016med_traps/traps16/src/features.py
40
11159
#!/usr/bin/env python # -*- coding: utf-8 -*- import librosa import numpy import scipy def feature_extraction_lfcc(audio_filename_with_path, statistics=True): print audio_filename_with_path with open(audio_filename_with_path,'r') as f: feature_matrix = numpy.loadtxt(f) #f.close() # Collect into data...
mit
willharris/django
tests/template_tests/filter_tests/test_dictsort.py
342
1477
from django.template.defaultfilters import dictsort from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_sort(self): sorted_dicts = dictsort( [{'age': 23, 'name': 'Barbara-Ann'}, {'age': 63, 'name': 'Ra Ra Rasputin'}, {'name': 'Jonny B...
bsd-3-clause
BackupGGCode/python-for-android
python3-alpha/python3-src/Lib/plat-freebsd4/IN.py
374
7777
# Generated by h2py from /usr/include/netinet/in.h IPPROTO_IP = 0 IPPROTO_HOPOPTS = 0 IPPROTO_ICMP = 1 IPPROTO_IGMP = 2 IPPROTO_GGP = 3 IPPROTO_IPV4 = 4 IPPROTO_IPIP = IPPROTO_IPV4 IPPROTO_TCP = 6 IPPROTO_ST = 7 IPPROTO_EGP = 8 IPPROTO_PIGP = 9 IPPROTO_RCCMON = 10 IPPROTO_NVPII = 11 IPPROTO_PUP = 12 IPPROTO_ARGUS = 13 ...
apache-2.0
sheafferusa/erpnext
erpnext/templates/pages/product_search.py
16
1192
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cstr from erpnext.setup.doctype.item_group.item_group import get_item_for_list_in_html no_cache = 1 no_sitemap =...
agpl-3.0
stshine/servo
tests/wpt/css-tests/css-text-decor-3_dev/xhtml1/support/generate-text-emphasis-style-property-tests.py
841
3434
#!/usr/bin/env python # - * - coding: UTF-8 - * - """ This script generates tests text-emphasis-style-property-011 ~ 020 which cover all possible values of text-emphasis-style property, except none and <string>, with horizontal writing mode. It outputs a list of all tests it generated in the format of Mozilla reftest....
mpl-2.0
jcftang/ansible-modules-extras
cloud/vmware/vca_fw.py
20
8298
#!/usr/bin/python # Copyright (c) 2015 VMware, Inc. All Rights Reserved. # # 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 ...
gpl-3.0
smallyear/linuxLearn
salt/salt/fileserver/gitfs.py
3
6408
# -*- coding: utf-8 -*- ''' Git Fileserver Backend With this backend, branches and tags in a remote git repository are exposed to salt as different environments. To enable, add ``git`` to the :conf_master:`fileserver_backend` option in the Master config file. .. code-block:: yaml fileserver_backend: - git...
apache-2.0
CustomCoin/Xcoin
contrib/pyminer/pyminer.py
1257
6438
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file license.txt or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib im...
mit
Jgarcia-IAS/SAT
openerp/addons-extra/odoo-pruebas/odoo-server/addons-extra/base_rml_edit/ir_actions.py
3
1963
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
agpl-3.0
bottompawn/kbengine
kbe/res/scripts/common/Lib/test/test_cmd_line.py
72
19246
# Tests invocation of the interpreter with various command line arguments # Most tests are executed with environment variables ignored # See test_cmd_line_script.py for testing of script execution import test.support, unittest import os import shutil import sys import subprocess import tempfile from test.script_helper...
lgpl-3.0
rishibarve/incubator-airflow
tests/utils/test_json.py
31
2502
# -*- 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
petosegan/scikit-learn
examples/ensemble/plot_adaboost_multiclass.py
354
4124
""" ===================================== Multi-class AdaBoosted Decision Trees ===================================== This example reproduces Figure 1 of Zhu et al [1] and shows how boosting can improve prediction accuracy on a multi-class problem. The classification dataset is constructed by taking a ten-dimensional ...
bsd-3-clause
SickGear/SickGear
sickbeard/metadata/helpers.py
2
1960
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickGear. # # SickGear 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
mrquim/repository.mrquim
repo/plugin.video.salts/scrapers/mintmovies_scraper.py
6
3599
""" SALTS XBMC Addon Copyright (C) 2014 tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. T...
gpl-2.0
Endika/edx-platform
common/djangoapps/course_modes/views.py
2
12211
""" Views for the course_mode module """ import decimal from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.db import transaction from django.http import HttpResponse, HttpResponseBadRequest from django.shortcuts import redirect from django.utils.decorato...
agpl-3.0
billyfung/robot-flask
lib/werkzeug/debug/console.py
256
5599
# -*- coding: utf-8 -*- """ werkzeug.debug.console ~~~~~~~~~~~~~~~~~~~~~~ Interactive console support. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD. """ import sys import code from types import CodeType from werkzeug.utils import escape from werkzeug.loca...
apache-2.0
virtualopensystems/nova
nova/tests/api/openstack/fakes.py
4
21253
# Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
gg7/diamond
src/collectors/filestat/filestat.py
20
11203
# coding=utf-8 """ Uses lsof to collect data on number of open files per user per type #### Config Options Check Options table below *** Priority Explanation *** This is an explanation of the priority in which users, groups, and uid, are evaluated. EXCLUDE ALWAYS OVERRULES INCLUDE within the same level (ie wi...
mit
steveYeah/amqpeek
tests/unit/cli/test_format_queues.py
1
1706
"""Tests for the correct reading of the queue config.""" from copy import deepcopy from amqpeek.cli import build_queue_data class TestFormatQueues: """Tests parsing of queue config.""" def test_dedup_queue_config(self, config_data: dict) -> None: """Tests handling of duplicate config entries in diff...
mit
ianblenke/awsebcli
ebcli/bundled/botocore/vendored/requests/packages/charade/langgreekmodel.py
184
12853
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 Ri...
apache-2.0
jessefeinman/FintechHackathon
venv/Lib/encodings/mac_arabic.py
272
36467
""" Python Character Mapping Codec generated from 'VENDORS/APPLE/ARABIC.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'): ...
bsd-2-clause
Stratio/stratio-cassandra
pylib/cqlshlib/tracing.py
86
3055
# 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
kiwicopple/MyMDb
venv/Lib/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py
551
2512
# urllib3/filepost.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 import codecs import mimetypes from uuid import uuid4 from io import BytesIO from .packages ...
mit
rvianello/rdkit
rdkit/Chem/MCS.py
5
17304
# This work was funded by Roche and generously donated to the free # and open source cheminformatics community. import warnings warnings.simplefilter('default', DeprecationWarning) warnings.warn("The rdkit.Chem.MCS module is deprecated; please use rdkit.Chem.rdFMCS instead.", DeprecationWarning,stacklevel...
bsd-3-clause
JT5D/Alfred-Popclip-Sublime
Sublime Text 2/Package Control/package_control/commands/create_binary_package_command.py
11
1167
import sublime_plugin from ..package_creator import PackageCreator class CreateBinaryPackageCommand(sublime_plugin.WindowCommand, PackageCreator): """ Command to create a binary .sublime-package file. Binary packages in general exclude the .py source files and instead include the .pyc files. Actual i...
gpl-2.0
Stefan-Korner/SpacePyLibrary
UTIL/BCH.py
1
4660
#****************************************************************************** # (C) 2018, Stefan Korner, Austria * # * # The Space Python Library is free software; you can redistribute it and/or * ...
mit
UoA-eResearch/saga-gis
saga-gis/src/scripting/python/examples/06_xyz2shp.py
1
2459
#! /usr/bin/env python import saga_api, sys, os ########################################## def xyz2shp(fTable): table = saga_api.SG_Get_Data_Manager().Add_Table() if table.Create(saga_api.CSG_String(fTable)) == 0: table.Add_Field(saga_api.CSG_String('X'), saga_api.SG_DATATYPE_Double) table.A...
gpl-3.0
rbaindourov/v8-inspector
Source/chrome/tools/gyp/test/mac/gyptest-app-assets-catalog.py
61
4008
#!/usr/bin/env python # Copyright (c) 2012 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 that app bundles are built correctly. """ import TestGyp import TestMac import os import plistlib import subprocess import sy...
bsd-3-clause
akrherz/iem
htdocs/plotting/auto/scripts100/p153.py
1
6880
"""Highest hourly values""" from collections import OrderedDict import datetime import pandas as pd from pandas.io.sql import read_sql from matplotlib.font_manager import FontProperties from pyiem.util import get_autoplot_context, get_dbconn from pyiem.plot.use_agg import plt from pyiem.exceptions import NoDataFound ...
mit
matthappens/taskqueue
taskqueue/venv_tq/lib/python2.7/site-packages/boto/sqs/batchresults.py
191
3515
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Eucalyptus Systems, 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...
mit
rahulsekar/iplytics
app/detl.py
1
4587
import requests import json import os.path import csv def master_csv(): return 'data/master.csv' def download_scorecard(year, game, redo=False): fname = 'data/extracts/%d-%02d.json' % (year, game) if os.path.isfile(fname) and not redo: return fname url = 'http://datacdn....
mit
farhaanbukhsh/sympy
sympy/printing/tree.py
106
2450
from __future__ import print_function, division def pprint_nodes(subtrees): """ Prettyprints systems of nodes. Examples ======== >>> from sympy.printing.tree import pprint_nodes >>> print(pprint_nodes(["a", "b1\\nb2", "c"])) +-a +-b1 | b2 +-c """ def indent(s, type=1...
bsd-3-clause
dsfsdgsbngfggb/odoo
addons/crm/__openerp__.py
258
4199
# -*- 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...
agpl-3.0
marcoitur/FreeCAD
src/Mod/Path/PathScripts/PathCompoundExtended.py
16
5492
# -*- coding: utf-8 -*- #*************************************************************************** #* * #* Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * #* ...
lgpl-2.1
schleichdi2/OpenNfr_E2_Gui-6.0
Navigation.py
7
15954
from os import path from enigma import eServiceCenter, eServiceReference, eTimer, pNavigation, getBestPlayableServiceReference, iPlayableService from Components.ParentalControl import parentalControl from Components.config import config from Components.PluginComponent import plugins from Plugins.Plugin import PluginDes...
gpl-2.0
technige/py2neo
test/integration/test_node.py
1
4417
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2011-2021, Nigel Small # # 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...
apache-2.0
NilsJPWerner/Sublet-Uchicago
accounts/forms.py
1
3140
from django import forms from .models import ExtendedUser from allauth.account.forms import UserForm, PasswordField, SetPasswordField from allauth.account import app_settings from allauth.account.adapter import get_adapter from allauth.account.models import EmailAddress from allauth.account.utils import filter_users_b...
gpl-2.0
nicoboss/Floatmotion
OpenGL/raw/GLES2/NV/fbo_color_attachments.py
8
1585
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES2 import _types as _cs # End users want this... from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C import...
agpl-3.0
cyclecomputing/boto
tests/unit/dynamodb/test_types.py
9
4007
#!/usr/bin/env python # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without ...
mit
karllark/dust_extinction
dust_extinction/helpers.py
1
1863
from __future__ import absolute_import, print_function, division import warnings import numpy as np import astropy.units as u __all__ = ["_get_x_in_wavenumbers", "_test_valid_x_range"] def _get_x_in_wavenumbers(in_x): """ Convert input x to wavenumber given x has units. Otherwise, assume x is in wavene...
bsd-3-clause
knossos-project/knossos-python-tools
examples/minimal_chunky_example.py
3
2121
from __future__ import absolute_import, division, print_function # builtins is either provided by Python 3 or by the "future" module for Python 2 (http://python-future.org/) from builtins import range, map, zip, filter, round, next, input, bytes, hex, oct, chr, int from functools import reduce from knossos_utils impor...
gpl-2.0
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/security/_help.py
2
39766
# 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. # -----------------------------------------------------...
mit
dracos/django
tests/db_functions/models.py
48
1857
""" Tests for built in Function expressions. """ from django.db import models class Author(models.Model): name = models.CharField(max_length=50) alias = models.CharField(max_length=50, null=True, blank=True) goes_by = models.CharField(max_length=50, null=True, blank=True) age = models.PositiveSmallInt...
bsd-3-clause
rdhyee/waterbutler
waterbutler/providers/bitbucket/metadata.py
3
3797
from email.utils import parseaddr from furl import furl from waterbutler.core import metadata class BaseBitbucketMetadata(metadata.BaseMetadata): """Metadata properties common to Bitbucket files and folders *commit*: The commit sha that this metadata snapshot applies to. The commit may not actually in...
apache-2.0
javierTerry/odoo
addons/l10n_nl/__init__.py
424
1413
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009 Veritos - Jan Verlaan - www.veritos.nl # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # con...
agpl-3.0
zengenti/ansible
lib/ansible/modules/cloud/openstack/os_object.py
15
4410
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <benno@ansible.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either vers...
gpl-3.0
ComputoCienciasUniandes/MetodosComputacionalesLaboratorio
2017-1/lab8_EJ3/lab8SOL_eJ3/spring_mass.py
1
1084
import numpy as np import matplotlib.pyplot as plt N = 5000 #number of steps to take xo = 0.2 #initial position in m vo = 0.0 #initial velocity tau = 4.0 #total time for the simulation in s . dt = tau/float(N) # time step k = 42.0 #spring constant in N/m m = 0.25 #mass in kg g = 9.8 #in m/ s ^2 mu = 0.15 #friction coe...
mit
wrouesnel/ansible
lib/ansible/modules/cloud/amazon/data_pipeline.py
19
20767
#!/usr/bin/python # # Copyright (c) 2017 Ansible Project # 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', 'status': ['pr...
gpl-3.0
jean/pybossa
pybossa/auth/task.py
5
1539
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa 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...
agpl-3.0
alshedivat/tensorflow
tensorflow/python/debug/lib/debug_service_pb2_grpc.py
79
5141
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
alinbalutoiu/tempest
tempest/api/volume/admin/test_volume_quotas_negative.py
25
3695
# Copyright 2014 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
minhphung171093/GreenERP_V8
openerp/addons/stock_landed_costs/product.py
364
1611
# -*- 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...
agpl-3.0
smi96/django-blog_website
lib/python2.7/site-packages/pip/basecommand.py
92
11429
"""Base Command class, and related routines""" from __future__ import absolute_import import logging import os import sys import optparse import warnings from pip import cmdoptions from pip.index import PackageFinder from pip.locations import running_under_virtualenv from pip.download import PipSession from pip.excep...
mit
brabsmit/home-control
homecontrol/docs/conf.py
1
9338
# -*- coding: utf-8 -*- # # django-homecontrol documentation build configuration file, created by # sphinx-quickstart on Fri Mar 13 17:28:03 2015. # # 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 ...
mit
Spanarchie/pyRest
pyRest/lib/python2.7/site-packages/werkzeug/testsuite/urls.py
145
15382
# -*- coding: utf-8 -*- """ werkzeug.testsuite.urls ~~~~~~~~~~~~~~~~~~~~~~~ URL helper tests. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest from werkzeug.testsuite import WerkzeugTestCase from werkzeug.datastructures import OrderedMultiD...
unlicense
with-git/tensorflow
tensorflow/contrib/kernel_methods/__init__.py
86
1352
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
arenadata/ambari
ambari-server/src/main/resources/stacks/ADH/1.4/services/TEZ/package/scripts/params.py
8
1062
#!/usr/bin/env python """ 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");...
apache-2.0
leonevo/euao
BaseAdapter/BaseAdapter.py
1
39358
#-*- coding: utf-8 -*- from optparse import OptionParser import sys import os root_dir=os.path.abspath(os.path.dirname(os.path.dirname(__file__))) sys.path.append(root_dir) import CommonDefinition import subprocess, os, time, signal import telnetlib import paramiko from os import linesep import re from tim...
apache-2.0
Kushal0707/googlepersonfinder
app/feeds.py
15
6840
#!/usr/bin/python2.7 # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
40223231/6-22-Final-Exam-1-2
static/Brython3.1.1-20150328-091302/Lib/_markupbase.py
891
14598
"""Shared support for scanning document type declarations in HTML and XHTML. This module is used as a foundation for the html.parser module. It has no documented public API and should not be used directly. """ import re _declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*').match _declstringlit_match = re.com...
gpl-3.0
ximepa/docp
planning/migrations/0001_initial.py
1
2739
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'PlanningConnections' db.create_table(u'planning_planningc...
gpl-3.0
ThePletch/ansible
lib/ansible/modules/network/asa/asa_command.py
30
7230
#!/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
moylop260/odoo-dev
addons/purchase_analytic_plans/purchase_analytic_plans.py
378
1667
# -*- 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...
agpl-3.0
tima/ansible
lib/ansible/modules/network/bigswitch/bcf_switch.py
29
5098
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ted Elhourani <ted@bigswitch.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
kernel-sanders/arsenic-mobile
Dependencies/Twisted-13.0.0/twisted/conch/test/test_session.py
15
40657
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for the 'session' channel implementation in twisted.conch.ssh.session. See also RFC 4254. """ import os, signal, sys, struct from zope.interface import implements from twisted.internet.address import IPv4Address from twisted.internet...
gpl-3.0
odin1314/security_monkey
security_monkey/auditor.py
5
10911
# Copyright 2014 Netflix, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
40223136/-2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/xml/dom/minidom.py
727
66854
"""Simple implementation of the Level 1 DOM. Namespaces and other minor Level 2 features are also supported. parse("foo.xml") parseString("<foo><bar/></foo>") Todo: ===== * convenience methods for getting elements and text. * more testing * bring some of the writer and linearizer code into conformance with this ...
gpl-3.0
Sylrob434/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/ndr.py
9
3029
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, qualities, ) class NDRIE(InfoExtractor): IE_NAME = 'ndr' IE_DESC = 'NDR.de - Mediathek' _VALID_URL = r'https?://www\.ndr\.de/.+?(?P<id>\d+)...
gpl-3.0
Sylrob434/CouchPotatoServer
libs/apscheduler/jobstores/shelve_store.py
92
1974
""" Stores jobs in a file governed by the :mod:`shelve` module. """ import shelve import pickle import random import logging from apscheduler.jobstores.base import JobStore from apscheduler.job import Job from apscheduler.util import itervalues logger = logging.getLogger(__name__) class ShelveJobStore(JobStore): ...
gpl-3.0
janusnic/django-allauth
allauth/socialaccount/providers/weibo/views.py
80
1132
import requests from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from .provider import WeiboProvider class WeiboOAuth2Adapter(OAuth2Adapter...
mit
wschwa/Mr-Orange-Sick-Beard
lib/imdb/parser/http/searchPersonParser.py
67
3742
""" parser.http.searchPersonParser module (imdb package). This module provides the HTMLSearchPersonParser class (and the search_person_parser instance), used to parse the results of a search for a given person. E.g., when searching for the name "Mel Gibson", the parsed page would be: http://akas.imdb.com/find?q=Me...
gpl-3.0
hvnsweeting/Diamond
src/collectors/memcached/test/testmemcached.py
32
3596
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from memcached impor...
mit
r39132/airflow
tests/hooks/test_oracle_hook.py
2
10269
# -*- 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
jansel/gridea
network.py
1
7182
# encoding: utf-8 # Broadcast protocol used to build a distributed cluster of solver processes. # # This code uses the twisted event driven networking framework: # http://twistedmatrix.com/documents/13.0.0/core/howto/servers.html # import json import logging import threading import time import twisted from twisted.i...
mit
leonardowolf/bookfree
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py
1786
2504
#!/usr/bin/env python """ Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ from...
mit
emonty/sqlalchemy-migrate
migrate/tests/changeset/test_constraint.py
4
10911
#!/usr/bin/env python # -*- coding: utf-8 -*- from sqlalchemy import * from sqlalchemy.util import * from sqlalchemy.exc import * from migrate.exceptions import * from migrate.changeset import * from migrate.tests import fixture class CommonTestConstraint(fixture.DB): """helper functions to test constraints. ...
mit
noblisnsp/volatility
volatility/plugins/registry/hivescan.py
44
3813
# Volatility # Copyright (C) 2008-2013 Volatility Foundation # Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu> # # This file is part of Volatility. # # Volatility 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...
gpl-2.0
docmeth02/CouchPotatoServer
libs/pyasn1/type/base.py
74
10647
# Base classes for ASN.1 types import sys from pyasn1.type import constraint, tagmap, tag from pyasn1 import error class Asn1Item: pass class Asn1ItemBase(Asn1Item): # Set of tags for this ASN.1 type tagSet = tag.TagSet() # A list of constraint.Constraint instances for checking values subtypeSpec...
gpl-3.0
Ledoux/ShareYourSystem
Pythonlogy/ShareYourSystem/Standards/Classors/Switcher/07_ExampleDoc.py
2
1447
#ImportModules import ShareYourSystem as SYS #Definition a MakerClass with decorated make by a Switcher @SYS.SwitcherClass(**{ 'SwitchingIsBool':True, 'SwitchingWrapMethodStr':'make' }) class MakerClass(object): def default_init(self, _MakingMyFloat=1., _MadeMyInt=0 ): object.__init__(self) def do_...
mit