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
BaconPancakes/valor
lib/youtube_dl/extractor/sina.py
63
4323
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( HEADRequest, ExtractorError, int_or_none, update_url_query, qualities, get_element_by_attribute, clean_html, ) class SinaIE(InfoExtractor): _VALID_URL = r'''(?x)h...
gpl-3.0
2014c2g3/cda0512
static/Brython3.1.1-20150328-091302/Lib/locale.py
624
1918
def getdefaultlocale(): return __BRYTHON__.language,None def localeconv(): """ localeconv() -> dict. Returns numeric and monetary locale-specific parameters. """ # 'C' locale default values return {'grouping': [127], 'currency_symbol': '', ...
agpl-3.0
alexanderturner/ansible
lib/ansible/plugins/callback/json.py
118
2439
# (c) 2016, Matt Martz <matt@sivel.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 License, or # (at your option) any later version. # ...
gpl-3.0
facaiy/spark
python/pyspark/streaming/tests/test_listener.py
11
7351
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
mglukhikh/intellij-community
python/helpers/py2only/docutils/parsers/rst/languages/af.py
128
3677
# $Id: af.py 7119 2011-09-02 13:00:23Z milde $ # Author: Jannie Hofmeyr <jhsh@sun.ac.za> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for ...
apache-2.0
MSEMJEJME/Get-Dumped
renpy/statements.py
1
3307
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us> # # 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, m...
gpl-2.0
HackerTool/DIE
DIE/Plugins/DataParsers/FunctionParser/FunctionParser.py
9
1489
from DIE.Lib.DataPluginBase import DataPluginBase import idc import idaapi class FunctionParser(DataPluginBase): """ A parser for boolean values """ def __init__(self): super(FunctionParser, self).__init__() self.setPluginType("Function") # def registerSupportedTypes(self): #...
mit
cytec/Sick-Beard
lib/hachoir_parser/template.py
90
1939
""" ====================== 8< ============================ This file is an Hachoir parser template. Make a copy of it, and adapt it to your needs. You have to replace all "TODO" with you code. ====================== 8< ============================ TODO parser. Author: TODO TODO Creation date: YYYY-mm-DD """ # TODO:...
gpl-3.0
jmehnle/ansible
lib/ansible/plugins/action/eos_template.py
25
3804
# # Copyright 2015 Peter Sprygada <psprygada@ansible.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...
gpl-3.0
helldorado/ansible
lib/ansible/modules/network/cloudengine/ce_vrf.py
25
10789
#!/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
Pedram26/Humans-vs-Aliens
HumansAliens.app/Contents/Resources/lib/python2.7/pygame/tests/font_test.py
1
21363
import sys import os if __name__ == '__main__': pkg_dir = os.path.split(os.path.abspath(__file__))[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = (pkg_name == 'tests' and os.path.split(parent_dir)[1] == 'pygame') if not is_pygame_pkg: sys.path.insert(0, par...
apache-2.0
RayRuizhiLiao/ITK_4D
Modules/ThirdParty/pygccxml/src/pygccxml/parser/etree_scanner.py
1
2166
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt import warnings from . import scanner # keep py2exe happy import xml.etree.ElementTree import xml.etree.cElement...
apache-2.0
franek/weboob
weboob/capabilities/travel.py
2
4007
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon, Julien Hebert # # This file is part of weboob. # # weboob 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...
agpl-3.0
40223103/w16b_test
static/Brython3.1.1-20150328-091302/Lib/difflib.py
737
82544
#! /usr/bin/env python3 """ Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context ...
agpl-3.0
shiningdesign/universal_tool_template.py
_ARCHIVE/universal_tool_template_1020.py
1
84756
# Univeral Tool Template v011.0 tpl_ver = 10.2 tpl_date = 180220 print("tpl_ver: {0}-{1}".format(tpl_ver, tpl_date)) # by ying - https://github.com/shiningdesign/universal_tool_template.py import importlib import sys # ---- hostMode ---- hostMode = '' hostModeList = [ ['maya', {'mui':'maya.OpenMayaUI', ...
mit
dnlcrl/PyFunt
tools/cythonize.py
1
6618
#!/usr/bin/env python """ cythonize SOURCE: https://github.com/scipy/scipy/blob/master/setup.py Cythonize pyx files into C files as needed. Usage: cythonize [root_dir] Default [root_dir] is 'pyfunt'. Checks pyx files to see if they have been changed relative to their corresponding C files. If they have, then runs...
mit
deepmind/interval-bound-propagation
interval_bound_propagation/src/simplex_bounds.py
1
7609
# coding=utf-8 # Copyright 2019 The Interval Bound Propagation Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
apache-2.0
dslomov/intellij-community
python/lib/Lib/site-packages/django/template/loaders/cached.py
229
2469
""" Wrapper class that takes a list of template loaders as an argument and attempts to load templates from them in order, caching the result. """ from django.core.exceptions import ImproperlyConfigured from django.template.base import TemplateDoesNotExist from django.template.loader import BaseLoader, get_template_fro...
apache-2.0
sh4t/Sick-Beard
sickbeard/__init__.py
4
78923
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
gpl-3.0
timlinux/geonode
geonode/catalogue/models.py
6
5092
# -*- 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
wangscript/libjingle-1
trunk/build/linux/install-chromeos-fonts.py
111
2373
#!/usr/bin/env python # Copyright 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. # Script to install the Chrome OS fonts on Linux. # This script can be run manually (as root), but is also run as part # install-build-...
bsd-3-clause
rgeleta/odoo
openerp/addons/base/tests/test_qweb.py
289
4814
# -*- coding: utf-8 -*- import cgi import json import os.path import glob import re import collections from lxml import etree import openerp.addons.base.ir.ir_qweb import openerp.modules from openerp.tests import common from openerp.addons.base.ir import ir_qweb class TestQWebTField(common.TransactionCase): def ...
agpl-3.0
steveklabnik/servo
tests/wpt/web-platform-tests/tools/py/py/_io/saferepr.py
273
2483
import py import sys builtin_repr = repr reprlib = py.builtin._tryimport('repr', 'reprlib') class SafeRepr(reprlib.Repr): """ subclass of repr.Repr that limits the resulting size of repr() and includes information on exceptions raised during the call. """ def repr(self, x): return self._c...
mpl-2.0
BackupGGCode/python-for-android
python3-alpha/extra_modules/gdata/geo/data.py
132
2385
#!/usr/bin/python # # Copyright (C) 2009 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 ...
apache-2.0
denys-duchier/django
tests/serializers/test_json.py
44
10145
import datetime import decimal import json import re from django.core import serializers from django.core.serializers.base import DeserializationError from django.core.serializers.json import DjangoJSONEncoder from django.db import models from django.test import SimpleTestCase, TestCase, TransactionTestCase from djang...
bsd-3-clause
Nikoli/youtube-dl
youtube_dl/extractor/noco.py
30
5901
# encoding: utf-8 from __future__ import unicode_literals import re import time import hashlib from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse, compat_urllib_request, ) from ..utils import ( clean_html, ExtractorError, unified_strdate, ) class NocoIE(...
unlicense
zerolab/wagtail
wagtail/tests/snippets/migrations/0005_multisectionrichtextsnippet_richtextsection.py
24
1035
# -*- coding: utf-8 -*- from django.db import migrations, models import wagtail.core.fields import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('snippetstests', '0004_fileuploadsnippet'), ] operations = [ migrations.CreateModel( name='MultiSect...
bsd-3-clause
sigurdga/nidarholm
organization/templatetags/grouplistings.py
1
2466
from django import template from django.contrib.auth.models import Group from organization.models import GroupCategory, Role import re register = template.Library() def roles_for_user_in_group(user, group): return Role.objects.filter(membership__user=user, membership__group=group) def phone_number_format(number...
agpl-3.0
sidnarayanan/BAdNet
train/gen/baseline/models/shallow_models/train_v3_nopt.py
1
2793
#!/usr/local/bin/python2.7 from sys import exit, stdout, argv from os import environ, system environ['KERAS_BACKEND'] = 'tensorflow' environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" environ["CUDA_VISIBLE_DEVICES"] = "" import numpy as np import signal from keras.layers import Input, Dense, Dropout, concatenate, LSTM, Ba...
mit
zygmuntz/pybrain
examples/rl/environments/capturegame/evolvingplayer.py
25
2007
from __future__ import print_function #!/usr/bin/env python """ A script illustrating how to evolve a simple Capture-Game Player which uses a MDRNN as network, with a simple ES algorithm.""" __author__ = 'Tom Schaul, tom@idsia.ch' from pybrain.rl.environments.twoplayergames import CaptureGameTask from pybrain.struct...
bsd-3-clause
lorensen/VTKExamples
src/Python/GeometricObjects/Polygon.py
1
1535
#!/usr/bin/env python import vtk def main(): colors = vtk.vtkNamedColors() # Setup four points points = vtk.vtkPoints() points.InsertNextPoint(0.0, 0.0, 0.0) points.InsertNextPoint(1.0, 0.0, 0.0) points.InsertNextPoint(1.0, 1.0, 0.0) points.InsertNextPoint(0.0, 1.0, 0.0) # Create the...
apache-2.0
40223202/test2-1
static/Brython3.1.1-20150328-091302/Lib/contextlib.py
737
8788
"""Utilities for with-statement contexts. See PEP 343.""" import sys from collections import deque from functools import wraps __all__ = ["contextmanager", "closing", "ContextDecorator", "ExitStack"] class ContextDecorator(object): "A base class or mixin that enables context managers to work as decorators." ...
gpl-3.0
azureplus/hue
desktop/core/src/desktop/management/commands/create_test_fs.py
38
1275
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
apache-2.0
alkaitz/starloot
src/gameengine/webSocketServer/lib/tornado-3.0.1/tornado/autoreload.py
45
11777
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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 a...
apache-2.0
roadmapper/ansible
test/units/modules/network/fortios/test_fortios_wireless_controller_hotspot20_anqp_3gpp_cellular.py
21
8425
# 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 License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
SUSE/azure-sdk-for-python
azure-servicebus/tests/doctest_servicebusservicequeue.py
11
2024
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apa...
mit
jamslevy/gsoc
thirdparty/google_appengine/lib/django/django/newforms/forms.py
32
12698
""" Form classes """ from django.utils.datastructures import SortedDict, MultiValueDict from django.utils.html import escape from fields import Field from widgets import TextInput, Textarea, HiddenInput, MultipleHiddenInput from util import flatatt, StrAndUnicode, ErrorDict, ErrorList, ValidationError import copy __a...
apache-2.0
yuanagain/seniorthesis
venv/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py
2936
3291
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
axbaretto/beam
sdks/python/.tox/py27gcp/lib/python2.7/site-packages/google/auth/environment_vars.py
5
1424
# Copyright 2016 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 agreed to in writing,...
apache-2.0
NewpTone/stacklab-cinder
cinder/manager.py
4
8103
# 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
angelicadly/prog-script
tekton-master/backend/appengine/routes/rotas/rest.py
1
1044
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from gaebusiness.business import CommandExecutionException from tekton.gae.middleware.json_middleware import JsonResponse from rota_app import facade def index(): cmd = facade.list_rotas_cmd() rota_list = cmd() short_form=fac...
mit
lvtk/lvtk
waflib/extras/slow_qt4.py
54
2814
#! /usr/bin/env python # Thomas Nagy, 2011 (ita) """ Create _moc.cpp files The builds are 30-40% faster when .moc files are included, you should NOT use this tool. If you really really want it: def configure(conf): conf.load('compiler_cxx qt4') conf.load('slow_qt4') See playground/slow_qt/wscript for a complete e...
isc
endlessm/chromium-browser
third_party/googletest/src/googlemock/scripts/generator/gmock_gen.py
19
1041
#!/usr/bin/env python # # Copyright 2008 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 requir...
bsd-3-clause
nedbat/django_coverage_plugin
tests/test_settings.py
1
1672
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/django_coverage_plugin/blob/master/NOTICE.txt """Settings tests for django_coverage_plugin.""" from django.test.utils import override_settings from .plugin_test import DjangoPluginTestCase, test_s...
apache-2.0
akshayka/edxclassify
edxclassify/classifiers/feature_generation.py
1
3989
from edxclassify.feature_spec import FEATURE_COLUMNS from edxclassify.classifiers.word_lists import * from edxclassify.data_cleaners.dc_util import compress_likert import re import nltk from nltk.tokenize import sent_tokenize, word_tokenize def to_int(value, aux=None): if value == '': return 0 return i...
gpl-2.0
srmagura/goodnight-lead
gl_site/statistics/views.py
1
6287
# View imports from django.http import JsonResponse, HttpResponse from django.shortcuts import render from gl_site.custom_auth import login_required # Forms from gl_site.statistics.statistics_form import statistics_request_form, statistics_download_form # Data from .data_generation import format_graph_data, format_f...
gpl-3.0
GeekTrainer/Flask
Work/Trivia - Module 5/env/Lib/site-packages/flask/__init__.py
425
1674
# -*- coding: utf-8 -*- """ flask ~~~~~ A microframework based on Werkzeug. It's extensively documented and follows best practice patterns. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ __version__ = '0.10.1' # utilities we import from Werkzeug and...
apache-2.0
abantam/pmtud
src/wimax/bindings/callbacks_list.py
149
1064
callback_classes = [ ['void', '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'], ['void', 'ns3::Ptr<ns3::PacketBurst const>', 'ns3::empty', 'ns3::empty', 'ns3::empty',...
gpl-2.0
openstack-packages/delorean
dlrn/migrations/versions/cab7697f6564_add_user_column_to_civote_and_promotion.py
2
1996
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
wanggang3333/scikit-learn
examples/svm/plot_svm_anova.py
250
2000
""" ================================================= SVM-Anova: SVM with univariate feature selection ================================================= This example shows how to perform univariate feature before running a SVC (support vector classifier) to improve the classification scores. """ print(__doc__) import...
bsd-3-clause
thecodinghub/news-for-good
news/Lib/codecs.py
50
36231
""" codecs -- Python Codec Registry, API and helpers. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import builtins, sys ### Registry and builtin stateless codec functions try: from _codecs import * except ImportError as why: raise SystemErro...
bsd-3-clause
Apoc2400/Reftag
worldcat/request/search.py
2
8497
# Copyright (C) 2008-2009 Mark A. Matienzo # # This file is part of worldcat, the Python WorldCat API module. # # worldcat 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 # ...
gpl-3.0
kuri65536/python-for-android
python3-alpha/python-libs/gdata/tlslite/__init__.py
409
1129
""" TLS Lite is a free python library that implements SSL v3, TLS v1, and TLS v1.1. TLS Lite supports non-traditional authentication methods such as SRP, shared keys, and cryptoIDs, in addition to X.509 certificates. TLS Lite is pure python, however it can access OpenSSL, cryptlib, pycrypto, and GMPY for faster crypt...
apache-2.0
anandology/pyjamas
library/gwt/chart/Axis.py
2
80117
""" * Copyright 2007,2008,2009 John C. Gunther * Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> * * 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/lic...
apache-2.0
sharkykh/SickRage
lib/hachoir_core/field/timestamp.py
57
2932
from hachoir_core.tools import (humanDatetime, humanDuration, timestampUNIX, timestampMac32, timestampUUID60, timestampWin64, durationWin64) from hachoir_core.field import Bits, FieldSet from datetime import datetime class GenericTimestamp(Bits): def __init__(self, parent, name, size, description=None): ...
gpl-3.0
renzifeng/renzifeng
node_modules/node-gyp/gyp/PRESUBMIT.py
1369
3662
# 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. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
apache-2.0
tobegit3hub/cinder_docker
cinder/volume/drivers/dell/dell_storagecenter_fc.py
14
7207
# Copyright 2015 Dell 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 agree...
apache-2.0
wgcv/SWW-Crashphone
lib/python2.7/site-packages/pip/__init__.py
176
9450
#!/usr/bin/env python import os import optparse import sys import re from pip.exceptions import InstallationError, CommandError, PipError from pip.log import logger from pip.util import get_installed_distributions, get_prog from pip.vcs import git, mercurial, subversion, bazaar # noqa from pip.baseparser import Conf...
apache-2.0
jhunkeler/hstcal
tests/wfc3/test_uvis_32single.py
1
1252
import subprocess import pytest from ..helpers import BaseWFC3 @pytest.mark.xfail(reason="Temporary xfail. New input/truth files on Artifactory, but branch not merged.") class TestUVIS32Single(BaseWFC3): """ Test pos UVIS2 subarray data with CTE correction """ detector = 'uvis' def _single_...
bsd-3-clause
libracore/erpnext
erpnext/support/doctype/service_level_agreement/service_level_agreement.py
6
4481
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import _ from frappe.utils import getdate class ServiceLevelAgreem...
gpl-3.0
kenshay/ImageScript
ProgramData/Android/ADB/platform-tools/systrace/catapult/telemetry/telemetry/timeline/inspector_importer_unittest.py
6
5400
# 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 unittest from telemetry.timeline import inspector_importer from telemetry.timeline import model from tracing.trace_data import trace_data _BACKGROUN...
gpl-3.0
soldag/home-assistant
homeassistant/components/nws/weather.py
5
10266
"""Support for NWS weather service.""" from datetime import timedelta import logging from homeassistant.components.weather import ( ATTR_CONDITION_CLEAR_NIGHT, ATTR_CONDITION_SUNNY, ATTR_FORECAST_CONDITION, ATTR_FORECAST_PRECIPITATION_PROBABILITY, ATTR_FORECAST_TEMP, ATTR_FORECAST_TIME, ATT...
apache-2.0
spock1104/android_kernel_hisense_m470bsa
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
TNT-Samuel/Coding-Projects
DNS Server/Source - Copy/Lib/site-packages/prompt_toolkit/win32_types.py
29
4046
from ctypes import Union, Structure, c_char, c_short, c_long, c_ulong from ctypes.wintypes import DWORD, BOOL, LPVOID, WORD, WCHAR # Input/Output standard device numbers. Note that these are not handle objects. # It's the `windll.kernel32.GetStdHandle` system call that turns them into a # real handle object. STD_INPU...
gpl-3.0
mims2707/bite-project
deps/gdata-python-client/samples/apps/marketplace_sample/gdata/tlslite/__init__.py
409
1129
""" TLS Lite is a free python library that implements SSL v3, TLS v1, and TLS v1.1. TLS Lite supports non-traditional authentication methods such as SRP, shared keys, and cryptoIDs, in addition to X.509 certificates. TLS Lite is pure python, however it can access OpenSSL, cryptlib, pycrypto, and GMPY for faster crypt...
apache-2.0
erwilan/ansible
lib/ansible/modules/network/lenovo/cnos_image.py
59
8700
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Lenovo, 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 # ...
gpl-3.0
adamfast/faadata
faadata/aircraft/parser.py
1
3304
import datetime class AircraftManufacturerCode(object): def __init__(self, record): self.code = record[:7].strip() self.manufacturer = record[8:38].strip() self.model = record[39:59].strip() self.aircraft_type = record[60].strip() self.engine_type = record[62].strip() ...
bsd-3-clause
ED300/android_kernel_wingtech_msm8916
tools/perf/python/twatch.py
7370
1334
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
chouseknecht/ansible
lib/ansible/modules/network/fortios/fortios_web_proxy_debug_url.py
14
9981
#!/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
slohse/ansible
lib/ansible/modules/network/avi/avi_gslbservice_patch_member.py
46
10405
#!/usr/bin/python """ # Created on Aug 12, 2016 # # @author: Gaurav Rastogi (grastogi@avinetworks.com) GitHub ID: grastogi23 # # module_check: supported # # Copyright: (c) 2016 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # """ ...
gpl-3.0
Lujeni/ansible
test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py
13
11671
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.module_utils.common._collections_compat import MutableMapping import datetime from dateutil.tz import tzutc import sys try: from ansible.parsing.yaml.objects import AnsibleUnicode except ImportError: AnsibleU...
gpl-3.0
zhuwenping/python-for-android
python3-alpha/python3-src/Lib/ctypes/test/test_objects.py
63
1765
r''' This tests the '_objects' attribute of ctypes instances. '_objects' holds references to objects that must be kept alive as long as the ctypes instance, to make sure that the memory buffer is valid. WARNING: The '_objects' attribute is exposed ONLY for debugging ctypes itself, it MUST NEVER BE MODIFIED! '_object...
apache-2.0
AntoCard/powerdns-recursor_check
checks/ganglia.py
34
1861
# stdlib from cStringIO import StringIO import socket # project from checks import Check class Ganglia(Check): BUFFER = 4096 TIMEOUT = 0.5 PORT = 8651 def __init__(self, logger): Check.__init__(self, logger) self.deprecation_shown = False def check(self, agentConfig): se...
bsd-3-clause
hxddh/youtube-dl
youtube_dl/extractor/hearthisat.py
108
4326
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_request, compat_urlparse, ) from ..utils import ( HEADRequest, str_to_int, urlencode_postdata, urlhandle_detect_ext, ) class HearThisAtIE(InfoExtractor): ...
unlicense
aagusti/o-sipkd
osipkd/models/ak.py
2
5441
from datetime import datetime from sqlalchemy import (Column, Integer, String, SmallInteger, UniqueConstraint, Date, BigInteger, ForeignKey, func, extract, case) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm import ...
mit
andrewmoses/ssquiz
flask/lib/python2.7/site-packages/sqlalchemy/event/base.py
60
9540
# event/base.py # Copyright (C) 2005-2015 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 """Base implementation classes. The public-facing ``Events`` serves as the base class...
bsd-3-clause
fx2003/tensorflow-study
TensorFlow实战/models/skip_thoughts/skip_thoughts/encoder_manager.py
14
4711
# 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...
mit
paolodedios/tensorflow
tensorflow/python/kernel_tests/map_stage_op_test.py
9
21251
# 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
tony810430/flink
flink-python/pyflink/datastream/checkpoint_storage.py
6
16795
################################################################################ # 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...
apache-2.0
Aravinthu/odoo
odoo/fields.py
1
104967
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ High-level objects for fields. """ from collections import OrderedDict, defaultdict from datetime import date, datetime from functools import partial from operator import attrgetter import itertools import logging ...
agpl-3.0
daviwesley/the-backdoor-factory
machobin.py
33
26456
#!/usr/bin/env python ''' Copyright (c) 2013-2015, Joshua Pitts All rights reserved. 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 li...
bsd-3-clause
fuhongliang/odoo
addons/account_payment/report/payment_order.py
378
2974
# -*- 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
Mrs-X/PIVX
test/functional/p2p_timeouts.py
4
2322
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test various net timeouts. - Create three pivxd nodes: no_verack_node - we never send a verack in...
mit
RyadElssalihine/RyadElssalihine
user_manager/views.py
1
1508
# Create your views here. from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from models import Profile,Application,Tab,Page,Footer from serializer import ProfileSerializer,TabSerializer,FooterSerializer from django.shortcuts import render from ...
gpl-2.0
cmattoon/fabric
fabric/tasks.py
3
16419
from __future__ import with_statement import inspect import sys import textwrap from fabric import state from fabric.utils import abort, warn, error from fabric.network import to_dict, disconnect_all from fabric.context_managers import settings from fabric.job_queue import JobQueue from fabric.task_utils import crawl...
bsd-2-clause
mareknetusil/twist
cbc/twist/kinematics.py
1
4324
__author__ = "Harish Narayanan" __copyright__ = "Copyright (C) 2009 Simula Research Laboratory and %s" % __author__ __license__ = "GNU GPL Version 3 or any later version" from dolfin import * #from cbc.twist.coordinate_system import CartesianSystem # Renaming grad to Grad because it looks nicer in the reference # co...
gpl-3.0
snarfed/webmention-tools
bin/demo.py
1
1241
#!/usr/bin/env python # -*- coding: utf-8 -*- from webmentiontools.urlinfo import UrlInfo from webmentiontools.webmentionio import WebmentionIO # If you have an access token from webmention.io, # set it here. Some calls require it. webmention_io_token = None wio = WebmentionIO(webmention_io_token) # Get all links...
mit
XiaochenCui/algorithm_submit
app/auth/views.py
1
5804
from flask import render_template, redirect, request, url_for, flash from flask.ext.login import login_user, logout_user, login_required, \ current_user from . import auth from .. import db from ..models import User from ..email import send_email from .forms import LoginForm, RegistrationForm, ChangePasswordForm, \...
mit
jgentes/xhtml2pdf
demo/cherrypy/demo-cherrypy.py
154
2187
#!/usr/local/bin/python # -*- coding: utf-8 -*- ############################################# ## (C)opyright by Dirk Holtwick, 2008 ## ## All rights reserved ## ############################################# import cherrypy as cp import sx.pisa3 as pisa import cStringIO as StringIO try: im...
apache-2.0
kangwonlee/ECA
lab_07_linear_algebra/gauss_jordan.py
1
1766
# -*- coding: utf8 -*- from pprint import pprint import linear_algebra as la def gauss_jordan(A): # 행렬의 크기 n_row = len(A) n_column = len(A[0]) # 단위 행렬과의 Augmented Matrix 를 만듦 AI = [] for i_row in xrange(n_row): AI_row = [0.0] * (n_column * 2) for j_column in xrange(n_column):...
apache-2.0
Chris7/django-djangui
djangui/models/mixins.py
1
1697
from __future__ import absolute_import __author__ = 'chris' from django.forms.models import model_to_dict import six class UpdateScriptsMixin(object): def save(self, **kwargs): super(UpdateScriptsMixin, self).save(**kwargs) from ..backend.utils import load_scripts load_scripts() class Dja...
gpl-3.0
kxliugang/edx-platform
common/test/acceptance/tests/video/test_studio_video_module.py
81
10690
# -*- coding: utf-8 -*- """ Acceptance tests for CMS Video Module. """ from nose.plugins.attrib import attr from unittest import skipIf from ...pages.studio.auto_auth import AutoAuthPage from ...pages.studio.overview import CourseOutlinePage from ...pages.studio.video.video import VideoComponentPage from ...fixtures.c...
agpl-3.0
mosen/commandment
tests/mdm/test_checkin.py
1
1404
import pytest from flask import Response from tests.client import MDMClient class TestCheckin: def test_authenticate(self, client: MDMClient, authenticate_request: str): """Basic test: Authenticate""" response: Response = client.put('/checkin', data=authenticate_request, content_type='text/xml') ...
mit
Pirata-Repository/Pirata
plugin.video.vevo/mechanize/_useragent.py
133
14312
"""Convenient HTTP UserAgent class. This is a subclass of urllib2.OpenerDirector. Copyright 2003-2006 John J. Lee <jjl@pobox.com> This code is free software; you can redistribute it and/or modify it under the terms of the BSD or ZPL 2.1 licenses (see the file COPYING.txt included with the distribution). """ impor...
gpl-2.0
richardcs/ansible
test/units/modules/system/interfaces_file/test_interfaces_file.py
21
13761
# (c) 2017, Roman Belyakovsky <ihryamzik () 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 la...
gpl-3.0
TheTimmy/spack
var/spack/repos/builtin/packages/nspr/package.py
3
1876
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
turbomanage/training-data-analyst
courses/machine_learning/deepdive2/structured/solutions/serving/application/lib/jinja2/environment.py
88
50849
# -*- coding: utf-8 -*- """ jinja2.environment ~~~~~~~~~~~~~~~~~~ Provides a class that holds runtime and parsing time options. :copyright: (c) 2017 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys import weakref from functools import reduce, partial from ji...
apache-2.0
manaris/jythonMusic
15. simpleCircleInstrument.py
1
2279
# simpleCircleInstrument.py # # Demonstrates how to use mouse and keyboard events to build a simple # drawing musical instrument. # from gui import * from music import * from math import sqrt ### initialize variables ###################### minPitch = C1 # instrument pitch range maxPitch = C8 # create display d ...
gpl-3.0
InuSasha/xbmc
lib/gtest/test/gtest_list_tests_unittest.py
1898
6515
#!/usr/bin/env python # # Copyright 2006, 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-2.0
chanceraine/nupic.research
htmresearch/algorithms/q_learner.py
10
2456
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0