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
objcio/pygments
pygments/lexers/prolog.py
25
12066
# -*- coding: utf-8 -*- """ pygments.lexers.prolog ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Prolog and Prolog-like languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups from pyg...
bsd-2-clause
tarthy6/dozer-thesis
scripts/test-OLD/periodic-grow.py
3
1320
"""Script that shrinks the periodic cell progressively. It prints strain and average stress (computed from total volume force) once in a while.""" from woo import log,timing log.setLevel("InsertionSortCollider",log.TRACE) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb()]), InteractionLoop( [Ig...
gpl-2.0
willingc/oh-mainline
vendor/packages/requests/requests/packages/chardet/big5freq.py
3133
82594
######################## 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 Rights R...
agpl-3.0
Achuth17/scikit-learn
sklearn/neighbors/tests/test_dist_metrics.py
230
5234
import itertools import pickle import numpy as np from numpy.testing import assert_array_almost_equal import scipy from scipy.spatial.distance import cdist from sklearn.neighbors.dist_metrics import DistanceMetric from nose import SkipTest def dist_func(x1, x2, p): return np.sum((x1 - x2) ** p) ** (1. / p) de...
bsd-3-clause
ImageEngine/gaffer
python/GafferUI/GraphBookmarksUI.py
4
11249
########################################################################## # # Copyright (c) 2015, Image Engine Design 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: # # * Redistrib...
bsd-3-clause
joyent/sdc-headnode
tools/node_modules/cmdln/node_modules/dashdash/tools/cutarelease.py
171
22043
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2012 Trent Mick """cutarelease -- Cut a release of your project. A script that will help cut a release for a git-based project that follows a few conventions. It'll update your changelog (CHANGES.md), add a git tag, push those changes, update your ver...
mpl-2.0
neoareslinux/neutron
neutron/tests/unit/ipam/test_requests.py
23
15679
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
Lujeni/ansible
lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py
1
7817
#!/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 = {'status': ['preview'], 'supported_by': '...
gpl-3.0
Konubinix/weboob
modules/boursorama/pages/investment.py
4
3587
# -*- coding: utf-8 -*- # Copyright(C) 2014 Simon Murail # # 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, or # (at your...
agpl-3.0
SanPen/GridCal
src/GridCal/Engine/Simulations/LinearFactors/linear_analysis_ts_driver.py
1
10126
# This file is part of GridCal. # # GridCal 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. # # GridCal is distributed in the hope that...
gpl-3.0
PanDAWMS/autopyfactory
attic/pluginsmanagement.py
2
21864
#! /usr/bin/env python ''' module with code for plugins management ''' import logging import logging.handlers import traceback from pprint import pprint #from autopyfactory.configloader import Config, ConfigManager class PluginHandler(object): def __init__(self): self.plugin_name = None sel...
apache-2.0
bladehd/jieba
test/test_whoosh.py
64
1734
# -*- coding: UTF-8 -*- from __future__ import unicode_literals import sys,os sys.path.append("../") from whoosh.index import create_in,open_dir from whoosh.fields import * from whoosh.qparser import QueryParser from jieba.analyse import ChineseAnalyzer analyzer = ChineseAnalyzer() schema = Schema(title=TEXT(stored=...
mit
yongshengwang/hue
desktop/core/ext-py/markdown/markdown/extensions/extra.py
130
1761
#!/usr/bin/env python """ Python-Markdown Extra Extension =============================== A compilation of various Python-Markdown extensions that imitates [PHP Markdown Extra](http://michelf.com/projects/php-markdown/extra/). Note that each of the individual extensions still need to be available on your PYTHONPATH. ...
apache-2.0
vjraitila/alfred-issues
src/requests/packages/urllib3/util/url.py
713
5879
from __future__ import absolute_import from collections import namedtuple from ..exceptions import LocationParseError url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment'] class Url(namedtuple('Url', url_attrs)): """ Datastructure for representing an HTTP URL. Used as a return value f...
mit
moble/sympy
sympy/stats/frv.py
58
10115
""" Finite Discrete Random Variables Module See Also ======== sympy.stats.frv_types sympy.stats.rv sympy.stats.crv """ from __future__ import print_function, division from itertools import product from sympy import (Basic, Symbol, cacheit, sympify, Mul, And, Or, Tuple, Piecewise, Eq, Lambda) from sympy.sets....
bsd-3-clause
googleapis/googleapis-gen
google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise-v1beta1-py/google/cloud/recaptchaenterprise_v1beta1/services/recaptcha_enterprise_service_v1_beta1/transports/base.py
1
9862
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
kyvinh/home-assistant
homeassistant/components/verisure.py
17
7543
""" Support for Verisure components. For more details about this component, please refer to the documentation at https://home-assistant.io/components/verisure/ """ import logging import threading import time import os.path from datetime import timedelta import voluptuous as vol from homeassistant.const import CONF_P...
apache-2.0
ge0rgi/cinder
cinder/tests/unit/api/v2/test_limits.py
1
29139
# Copyright 2011 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
glaubitz/fs-uae-debian
launcher/OpenGL/raw/WGL/ARB/create_context.py
8
1139
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.WGL import _types as _cs # End users want this... from OpenGL.raw.WGL._types import * from OpenGL.raw.WGL import _errors from OpenGL.constant import Constant as _C import ctype...
gpl-2.0
jneves/python-social-auth
social/backends/lastfm.py
70
1888
import hashlib from social.utils import handle_http_errors from social.backends.base import BaseAuth class LastFmAuth(BaseAuth): """ Last.Fm authentication backend. Requires two settings: SOCIAL_AUTH_LASTFM_KEY SOCIAL_AUTH_LASTFM_SECRET Don't forget to set the Last.fm callback to somethi...
bsd-3-clause
freenas/samba
third_party/waf/wafadmin/Tools/gas.py
32
1108
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2008 (ita) "as and gas" import os, sys import Task from TaskGen import extension, taskgen, after, before EXT_ASM = ['.s', '.S', '.asm', '.ASM', '.spp', '.SPP'] as_str = '${AS} ${ASFLAGS} ${_ASINCFLAGS} ${SRC} -o ${TGT}' Task.simple_task_type('asm', as_str, 'PIN...
gpl-3.0
themurph/openshift-tools
ansible/roles/lib_openshift_3.2/library/oc_label.py
3
40059
#!/usr/bin/env python # pylint: disable=too-many-lines # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (_) ...
apache-2.0
Amneamnius/eve-wspace
evewspace/SiteTracker/templatetags/sitetracker.py
10
3218
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # 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...
gpl-3.0
studiomohawk/publicdraft
node_modules/grunt/node_modules/js-yaml/support/pyyaml-src/events.py
985
2445
# Abstract classes. class Event(object): def __init__(self, start_mark=None, end_mark=None): self.start_mark = start_mark self.end_mark = end_mark def __repr__(self): attributes = [key for key in ['anchor', 'tag', 'implicit', 'value'] if hasattr(self, key)] argu...
mit
havard024/prego
crm/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/adapter.py
222
1557
""" This object provides quoting for GEOS geometries into PostgreSQL/PostGIS. """ from __future__ import unicode_literals from psycopg2 import Binary from psycopg2.extensions import ISQLQuote class PostGISAdapter(object): def __init__(self, geom): "Initializes on the geometry." # Getting the WKB ...
mit
AnishShah/tensorflow
tensorflow/python/lib/io/file_io_test.py
20
22901
# This Python file uses the following encoding: utf-8 # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
apache-2.0
cysnake4713/odoo
addons/website_membership/models/product.py
338
1264
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
thesgc/cbh_datastore_ws
runtests.py
1
1190
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="cbh_dat...
mit
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/Crypto/SelfTest/Protocol/test_AllOrNothing.py
120
3024
# # Test script for Crypto.Protocol.AllOrNothing # # Part of the Python Cryptography Toolkit # # Written by Andrew Kuchling and others # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public do...
agpl-3.0
t1m0thy/django-extensions
django_extensions/management/commands/unreferenced_files.py
26
1844
import os from collections import defaultdict from django.conf import settings from django.core.management.base import NoArgsCommand from django.db import models from django.db.models.loading import cache from django_extensions.management.utils import signalcommand class Command(NoArgsCommand): help = "Prints a...
mit
ogferreiro/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/_collections.py
309
2903
# urllib3/_collections.py # Copyright 2008-2012 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 from collections import MutableMapping from threading import Lock try: # Python 2.7+ ...
lgpl-2.1
jkshaver/virtualenv-1.8.2
env/lib/python2.7/site-packages/django/contrib/gis/geos/prototypes/__init__.py
314
1305
""" This module contains all of the GEOS ctypes function prototypes. Each prototype handles the interaction between the GEOS library and Python via ctypes. """ # Coordinate sequence routines. from django.contrib.gis.geos.prototypes.coordseq import (create_cs, get_cs, cs_clone, cs_getordinate, cs_setordinate, cs...
mit
kylelutz/chemkit
tests/auto/plugins/mmff/analyze.py
1
3504
#!/usr/bin/python # this script compares the mmff94.expected and mmff94.actual files # and outputs the differences import os import sys import xml.dom.minidom COLORS_ENABLED = False class AtomResults: def __init__(self, type, charge): self.type = type self.charge = charge class MoleculeResults...
bsd-3-clause
GeoODK/onadata
onadata/apps/viewer/tests/test_exports.py
3
55621
import csv import datetime import json import os import StringIO from time import sleep from django.conf import settings from django.core.files.storage import get_storage_class from django.core.urlresolvers import reverse from django.utils.dateparse import parse_datetime from xlrd import open_workbook from onadata.ap...
bsd-2-clause
BFriedland/UserDataBase-Heroku
venv/Lib/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py
1182
3734
######################## 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...
mit
Liangjianghao/powerline
tests/test_cmdline.py
23
4803
# vim:fileencoding=utf-8:noet '''Tests for shell.py parser''' from __future__ import (unicode_literals, division, absolute_import, print_function) import sys if sys.version_info < (3,): from io import BytesIO as StrIO else: from io import StringIO as StrIO from powerline.commands.main import get_argparser, finis...
mit
Teamxrtc/webrtc-streaming-node
third_party/depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/crcmod/test/examples.py
33
1656
#----------------------------------------------------------------------------- # Demonstrate the use of the code generator from crcmod import Crc g8 = 0x185 g16 = 0x11021 g24 = 0x15D6DCB g32 = 0x104C11DB7 def polyFromBits(bits): p = 0 for n in bits: p = p | (1 << n) return p # The following is fr...
mit
ryfeus/lambda-packs
Keras_tensorflow/source/tensorflow/contrib/quantization/__init__.py
178
1441
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mit
domino-team/openwrt-cc
package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/v8/tools/sanitizers/sancov_merger_test.py
9
2169
# Copyright 2016 the V8 project 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 import sancov_merger # Files on disk after test runner completes. The files are mapped by # executable name -> file list. FILE_MAP = { ...
gpl-2.0
jetruby/python-goose
goose/parsers.py
3
7697
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
apache-2.0
Venturi/oldcms
env/lib/python2.7/site-packages/django/db/models/aggregates.py
26
5554
""" Classes to represent the definitions of aggregate functions. """ from django.core.exceptions import FieldError from django.db.models.expressions import Func, Star from django.db.models.fields import FloatField, IntegerField __all__ = [ 'Aggregate', 'Avg', 'Count', 'Max', 'Min', 'StdDev', 'Sum', 'Variance', ] ...
apache-2.0
gosipyan/automation
scripts/jenkins/cloud/gerrit/gerrit_review.py
3
2296
#!/usr/bin/env python import argparse import os import sys sys.path.append(os.path.dirname(__file__)) from gerrit import GerritChange # noqa: E402 from gerrit_settings import gerrit_project_map # noqa: E402 def gerrit_review(change, label=None, vote=1, message=''): if change.gerrit_project not in gerrit_pro...
apache-2.0
suranap/qiime
qiime/identify_chimeric_seqs.py
15
46969
#!/usr/bin/env python # File created on 05 Oct 2009. from __future__ import division from os.path import split, basename, abspath, exists, join from subprocess import PIPE, Popen from skbio.util import remove_files from burrito.parameters import ValuedParameter from burrito.util import (which, CommandLineApplicatio...
gpl-2.0
jjingrong/PONUS-1.2
venv/Lib/genericpath.py
246
3015
""" Path operations common to more than one OS Do not use directly. The OS specific modules import the appropriate functions from this module themselves. """ import os import stat __all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime', 'getsize', 'isdir', 'isfile'] # Does a path exist? #...
mit
MAECProject/maec-to-oval
cybox_oval_mappings.py
1
10331
#MAEC -> OVAL Translator #v0.94 BETA #Generic mappings class #Generates OVAL tests/objects/states from a CybOX Defined Object import oval57 as oval class cybox_oval_mappings(object): def __init__(self, id_namespace): self.test_id_base = 0 self.obj_id_base = 0 self.ste_id_base = 0 s...
bsd-3-clause
drawks/ansible
test/units/modules/network/fortimanager/test_fmgr_fwpol_package.py
38
4044
# Copyright 2018 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
alibbaba/plugin.video.live.streamspro
plugin.video.live.streamspro/resources/lib/resolvers/vk.py
2
2921
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 opt...
gpl-2.0
CylonicRaider/websocket-server
websocket_server/exceptions.py
1
1127
# websocket_server -- WebSocket/HTTP server/client library # https://github.com/CylonicRaider/websocket-server """ Exceptions. """ __all__ = ['WebSocketError', 'ProtocolError', 'InvalidDataError', 'ConnectionClosedError'] class WebSocketError(Exception): """ Base class for all exceptions. """ ...
mit
enckse/system-viewer
bottle.py
1
146747
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single f...
mit
Anoopsmohan/logbook
logbook/_termcolors.py
24
1174
# -*- coding: utf-8 -*- """ logbook._termcolors ~~~~~~~~~~~~~~~~~~~ Provides terminal color mappings. :copyright: (c) 2010 by Armin Ronacher, Georg Brandl. :license: BSD, see LICENSE for more details. """ esc = "\x1b[" codes = {} codes[""] = "" codes["reset"] = esc + "39;49;00m" da...
bsd-3-clause
rgeleta/odoo
addons/warning/__openerp__.py
261
1603
# -*- 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
fards/DellStreak5-GingerBread
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
802
2710
# Core.py - Python extension for perf trace, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def auto...
gpl-2.0
Nicop06/ansible
lib/ansible/modules/network/f5/bigip_pool_member.py
16
17994
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2013, Matt Hite <mhite@hotmail.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 Licens...
gpl-3.0
InakiZabala/odoomrp-wip
quality_control_samples/models/qc_inspection.py
15
1236
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api class QcInspec...
agpl-3.0
appsembler/mayan_appsembler
apps/history/api.py
2
2011
from __future__ import absolute_import import pickle import json from django.db import transaction from django.core import serializers from django.shortcuts import get_object_or_404 from django.db import models from django.db.utils import DatabaseError from .models import HistoryType, History from .runtime_data impo...
gpl-3.0
jimi-c/ansible
lib/ansible/modules/windows/win_dns_client.py
52
2086
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Red Hat, Inc. # 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': 'core'} DOCUMENTATI...
gpl-3.0
ifduyue/sentry
src/sentry/models/user.py
1
10584
""" sentry.models.user ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging import warnings from bitfield import BitField from django.contrib.auth.models import AbstractBas...
bsd-3-clause
erlimar/prototypeguide
src/lib/flask_debugtoolbar/toolbar.py
15
2444
import urllib from flask import url_for, current_app class DebugToolbar(object): # default config settings config = { 'DEBUG_TB_INTERCEPT_REDIRECTS': True, 'DEBUG_TB_PANELS': ( 'flask_debugtoolbar.panels.versions.VersionDebugPanel', 'flask_debugtoolbar.panels.timer.T...
mit
gnieboer/tensorflow
tensorflow/contrib/keras/python/keras/backend.py
12
103391
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
jelly/calibre
src/calibre/gui2/dbus_export/tray.py
1
7237
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' # Implement the StatusNotifierItem spec for creating a system tray icon in #...
gpl-3.0
southpawtech/TACTIC-DEV
src/pyasm/deprecated/flash/biz.py
6
5658
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
DinoCow/airflow
airflow/providers/hashicorp/hooks/vault.py
6
15586
# 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
skosukhin/spack
var/spack/repos/builtin/packages/pax-utils/package.py
6
1567
############################################################################## # Copyright (c) 2017, Los Alamos National Security, LLC # Produced at the Los Alamos National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # # For details, ...
lgpl-2.1
Zhongqilong/kbengine
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/packages/chardet/escsm.py
2930
7839
######################## 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...
lgpl-3.0
kjiang8/Ardustat
Deprecated_Unsupported/Python_Client/galvanostat_with_connect.py
1
1837
import numpy import ardustat_library_simple as ard import time import subprocess import os import glob import sys ##Guess a serial port port = "" if os.name == "posix": #try os x if len(glob.glob("/dev/tty.u*")) > 0: port = glob.glob("/dev/tty.u*")[0] elif len(glob.glob("/dev/ttyUSB*")) > 0: port = glob.glob("...
bsd-2-clause
ct-23/home-assistant
homeassistant/components/device_tracker/asuswrt.py
3
13419
""" Support for ASUSWRT routers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.asuswrt/ """ import logging import re import socket import telnetlib from collections import namedtuple import voluptuous as vol from homeassistant.component...
apache-2.0
eceglov/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py
119
9519
# 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
pelya/commandergenius
project/jni/python/src/Lib/test/test_collections.py
48
18805
import unittest, doctest from test import test_support from collections import namedtuple import pickle, cPickle, copy from collections import Hashable, Iterable, Iterator from collections import Sized, Container, Callable from collections import Set, MutableSet from collections import Mapping, MutableMapping from coll...
lgpl-2.1
manhg/tokit
tokit/postgres.py
1
4462
import logging import shortuuid import uuid import momoko import momoko.exceptions import psycopg2 from psycopg2.extras import DictCursor, DictRow, register_uuid import psycopg2.extensions from tornado.gen import coroutine, sleep from tornado.web import HTTPError import tokit logger = tokit.logger class DictLogCur...
mit
mccheung/kbengine
kbe/src/lib/python/Lib/dbm/dumb.py
72
10539
"""A dumb and slow but simple dbm clone. For database spam, spam.dir contains the index (a text file), spam.bak *may* contain a backup of the index (also a text file), while spam.dat contains the data (a binary file). XXX TO DO: - seems to contain a bug when updating... - reclaim free space (currently, space once o...
lgpl-3.0
AutorestCI/azure-sdk-for-python
azure-mgmt-storage/azure/mgmt/storage/v2016_12_01/models/list_service_sas_response.py
6
1136
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
sserrot/champion_relationships
venv/Lib/site-packages/networkx/algorithms/shortest_paths/tests/test_weighted.py
1
27666
import pytest import networkx as nx from networkx.utils import pairwise def validate_path(G, s, t, soln_len, path): assert path[0] == s assert path[-1] == t if not G.is_multigraph(): computed = sum(G[u][v].get('weight', 1) for u, v in pairwise(path)) assert soln_len == computed else:...
mit
google/makani
gs/monitor2/apps/plugins/layouts/motor_layout.py
1
2241
# Copyright 2020 Makani Technologies LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
40423103/2017springcd_ag2
plugin/tipue_search/tipue_search.py
251
3821
# -*- coding: utf-8 -*- """ Tipue Search ============ A Pelican plugin to serialize generated HTML to JSON that can be used by jQuery plugin - Tipue Search. Copyright (c) Talha Mansoor """ from __future__ import unicode_literals import os.path import json from bs4 import BeautifulSoup from codecs import open try: ...
agpl-3.0
jokey2k/sentry
tests/sentry/web/frontend/test_remove_project.py
18
2370
from __future__ import absolute_import import mock from django.core.urlresolvers import reverse from sentry.models import Project, ProjectStatus from sentry.testutils import TestCase, PermissionTestCase class RemoveProjectPermissionTest(PermissionTestCase): def setUp(self): super(RemoveProjectPermissio...
bsd-3-clause
Vishanth/product-private-paas
components/org.wso2.ppaas.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/instance/status/events.py
11
4337
# 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
peter-jang/ansible
contrib/inventory/abiquo.py
110
8860
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' External inventory script for Abiquo ==================================== Shamelessly copied from an existing inventory script. This script generates an inventory that Ansible can understand by making API requests to Abiquo API Requires some python libraries, ensure ...
gpl-3.0
zakuro9715/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/cache/tests.py
26
64411
# -*- coding: utf-8 -*- # Unit tests for cache framework # Uses whatever cache backend is set in the test settings file. import os import tempfile import time import warnings from django.conf import settings from django.core import management from django.core.cache import get_cache, DEFAULT_CACHE_ALIAS from django.c...
gpl-3.0
benoitsteiner/tensorflow-opencl
tensorflow/contrib/gan/python/features/python/virtual_batchnorm_test.py
30
11083
# 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
MingdaZhou/gnuradio
gr-audio/examples/python/noise.py
58
1968
#!/usr/bin/env python # # Copyright 2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
gpl-3.0
chris-chambers/llvm
examples/Kaleidoscope/MCJIT/lazy/genk-timing.py
214
10499
#!/usr/bin/env python import sys import random class TimingScriptGenerator: """Used to generate a bash script which will invoke the toy and time it""" def __init__(self, scriptname, outputname): self.timeFile = outputname self.shfile = open(scriptname, 'w') self.shfile.write("echo \"\"...
gpl-3.0
OTWillems/GEO1005
SpatialDecision/external/networkx/algorithms/link_prediction.py
40
16527
""" Link prediction algorithms. """ from __future__ import division import math import networkx as nx from networkx.utils.decorators import * __all__ = ['resource_allocation_index', 'jaccard_coefficient', 'adamic_adar_index', 'preferential_attachment', 'cn_soundarajan_hop...
gpl-2.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.4.3/Lib/plat-mac/Carbon/Dialogs.py
81
2156
# Generated from 'Dialogs.h' def FOUR_CHAR_CODE(x): return x kControlDialogItem = 4 kButtonDialogItem = kControlDialogItem | 0 kCheckBoxDialogItem = kControlDialogItem | 1 kRadioButtonDialogItem = kControlDialogItem | 2 kResourceControlDialogItem = kControlDialogItem | 3 kStaticTextDialogItem = 8 kEditTextDialogItem =...
mit
talha81/TACTIC-DEV
src/tactic/ui/container/dynamic_list_wdg.py
6
5020
############################################################ # # Copyright (c) 2010, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way witho...
epl-1.0
benlangmuir/swift
utils/swift_build_support/swift_build_support/products/product.py
3
2016
# swift_build_support/products/product.py -----------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.tx...
apache-2.0
ernstbaslerpartner/send2geoadmin
env/Lib/encodings/iso8859_13.py
593
13527
""" Python Character Mapping Codec iso8859_13 generated from 'MAPPINGS/ISO8859/8859-13.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
apache-2.0
fishtown-analytics/dbt
test/unit/test_linker.py
1
6077
import os import tempfile import unittest from unittest import mock from dbt import linker try: from queue import Empty except ImportError: from Queue import Empty def _mock_manifest(nodes): manifest = mock.MagicMock(nodes={ n: mock.MagicMock(unique_id=n) for n in nodes }) manifest.expect...
apache-2.0
dronefly/dronefly.github.io
flask/lib/python2.7/site-packages/whoosh/matching/__init__.py
96
1678
# Copyright 2012 Matt Chaput. 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 list of conditions and the...
apache-2.0
bumper-app/bumper-bianca
bianca/analyzer/bugfinder.py
1
3624
""" file: bugfinder.py author: Christoffer Rosen <cbr4830@rit.edu> date: November 2013 description: Links changes that introduces bugs by identifying changes that fix problems. """ import re from orm.commit import * from caslogging import logging from analyzer.git_commit_linker import * import json class BugFinder: ...
mit
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/python/Lib/encodings/mac_farsi.py
593
15426
""" Python Character Mapping Codec mac_farsi generated from 'MAPPINGS/VENDORS/APPLE/FARSI.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,err...
agpl-3.0
enriquesanchezb/practica_utad_2016
venv/lib/python2.7/site-packages/nltk/tokenize/stanford.py
3
3960
# -*- coding: utf-8 -*- # Natural Language Toolkit: Interface to the Stanford Tokenizer # # Copyright (C) 2001-2015 NLTK Project # Author: Steven Xu <xxu@student.unimelb.edu.au> # # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import unicode_literals, print_function im...
apache-2.0
danielpalomino/gem5
configs/common/Options.py
1
10060
# Copyright (c) 2006-2008 The Regents of The University of Michigan # 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 ...
bsd-3-clause
astrofrog/glue-3d-viewer
glue_vispy_viewers/extern/vispy/util/svg/group.py
9
1894
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier. All rights reserved. # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- import copy from ....
bsd-2-clause
simonlynen/or-tools
examples/python/appointments.py
32
5392
# Copyright 2010-2014 Google # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
apache-2.0
batisteo/pasportaservo
hosting/migrations/0002_auto_20140924_0745.py
5
5088
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('hosting', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='place', name='small_...
agpl-3.0
kethxenn/C.B.U.L.M.S.
vendor/mockery/mockery/docs/conf.py
468
8442
# -*- coding: utf-8 -*- # # Mockery Docs documentation build configuration file, created by # sphinx-quickstart on Mon Mar 3 14:04:26 2014. # # 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. ...
gpl-3.0
HuimingCheng/AutoGrading
learning/web_Haotian/venv/Lib/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py
3133
82594
######################## 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 Rights R...
mit
freakboy3742/django
django/conf/locale/fr/formats.py
35
1286
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT...
bsd-3-clause
byoungm/linux-kernel-test
scripts/gdb/linux/utils.py
630
4267
# # gdb helper commands and functions for Linux kernel debugging # # common utilities # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb class CachedType: def __init__(self, name): s...
gpl-2.0
BILS/agda
agda/species_geo_coder/views.py
1
2551
import time #from django.shortcuts import render from django.views.generic import TemplateView, FormView from django.shortcuts import redirect, render from django.db import transaction from agda.views import package_template_dict from jobs.models import (JOB_STATUS_LEVEL_ACCEPTED, JOB_STATUS_...
mit