repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
havard024/prego
crm/lib/python2.7/site-packages/whoosh/lang/snowball/bases.py
96
4874
# Base classes class _ScandinavianStemmer(object): """ This subclass encapsulates a method for defining the string region R1. It is used by the Danish, Norwegian, and Swedish stemmer. """ def _r1_scandinavian(self, word, vowels): """ Return the region R1 that is used by the Scan...
mit
alexdzul/pyql-weather
pyql/geo/continents.py
1
1097
# -*- coding: utf-8 -*- __author__ = 'Alex Dzul' from pyql.geo.generics import GenericGeoPlace from pyql.interface import YQLConector __all__ = ('Continent', ) YQL_TABLE = "geo.continents" class Continent(GenericGeoPlace): @staticmethod def get(**kwargs): """ Realiza una consulta a la base...
mit
KaranToor/MA450
google-cloud-sdk/.install/.backup/platform/gsutil/third_party/pyasn1-modules/pyasn1_modules/rfc5208.py
132
1300
# # PKCS#8 syntax # # ASN.1 source from: # http://tools.ietf.org/html/rfc5208 # # Sample captures could be obtained with "openssl pkcs8 -topk8" command # from pyasn1.type import tag, namedtype, namedval, univ, constraint from pyasn1_modules.rfc2459 import * from pyasn1_modules import rfc2251 class KeyEncryptionAlgorit...
apache-2.0
Stane1983/kernel-amlogic-m3
scripts/rt-tester/rt-tester.py
904
5366
#!/usr/bin/env python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt impor...
gpl-2.0
hiker/stan
Scanner/Scanner.py
1
33650
#!/usr/bin/env python import re from string import expandtabs,rstrip,lstrip,strip, upper from Token import Token, Token2Name from AOR.AttributeString import AttributeString from AOR.SpecialStatements import Comment, ContMarker, CommentLine def ScannerFactory(name=None,lines=No...
gpl-3.0
shakamunyi/neutron
neutron/db/migration/alembic_migrations/versions/abc88c33f74f_lb_stats_needs_bigint.py
15
1514
# Copyright 2014 OpenStack Foundation # # 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
guruxu/dd-agent
checks.d/lighttpd.py
35
6352
# stdlib import re import urlparse # 3rd party import requests # project from checks import AgentCheck from util import headers VERSION_REGEX = re.compile(r".*/(\d)") class Lighttpd(AgentCheck): """Tracks basic connection/requests/workers metrics See http://redmine.lighttpd.net/projects/1/wiki/Docs_ModSta...
bsd-3-clause
NEricN/RobotCSimulator
Python/App/Lib/distutils/dir_util.py
29
7870
"""distutils.dir_util Utility functions for manipulating directories and directory trees.""" __revision__ = "$Id$" import os import errno from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log # cache for by mkpath() -- in addition to cheapening redundant calls, # eliminat...
apache-2.0
argonemyth/sentry
src/sentry/search/elastic_search/backend.py
25
6716
""" sentry.search.elastic_search.backend ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. GET /_search { 'query': { 'bool': { 'must': [ { 'match': { 'title': { '...
bsd-3-clause
paulmueller/ODTbrain
examples/example_helper.py
2
4359
"""Miscellaneous methods for example data handling""" import lzma import os import pathlib import tarfile import tempfile import warnings import zipfile import numpy as np datapath = pathlib.Path(__file__).parent / "data" webloc = "https://github.com/RI-imaging/ODTbrain/raw/master/examples/data/" def dl_file(url, ...
bsd-3-clause
mkondratyev85/pgm
tests/test_time.py
1
1436
import unittest from largetime import Time class TestTime(unittest.TestCase): def test_parcing(self): t = Time() self.assertTrue(t._sec == 0) t = Time(100) self.assertTrue(t._sec == 100) t = Time('100') self.assertTrue(t._sec == 100) t = Time(' 100 ') ...
mit
caldwell/servo
tests/wpt/web-platform-tests/dom/nodes/Document-createElement-namespace-tests/generate.py
226
2091
#!/usr/bin/python import os import sys THIS_NAME = "generate.py" # Note: these lists must be kept in sync with the lists in # Document-createElement-namespace.html, and this script must be run whenever # the lists are updated. (We could keep the lists in a shared JSON file, but # seems like too much effort.) FILES =...
mpl-2.0
Alidron/alidron-isac
isac/survey/value/survey_value_static_tags.py
1
1485
# Copyright (c) 2015-2020 Contributors as noted in the AUTHORS file # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # System imports import logging # Third-party imp...
mpl-2.0
Nu3001/external_chromium
build/compiler_version.py
97
1319
#!/usr/bin/python # Copyright (c) 2009 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. """Compiler version checking tool for gcc Print gcc version as XY if you are running gcc X.Y.*. This is used to tweak build flags for...
bsd-3-clause
eaplatanios/tensorflow
tensorflow/python/keras/_impl/keras/layers/merge.py
3
23190
# 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
jrief/django-cms
cms/migrations/0031_improved_language_code_support.py
525
20033
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label...
bsd-3-clause
sergecodd/FireFox-OS
B2G/gecko/media/webrtc/trunk/tools/gyp/test/variables/commands/gyptest-commands-ignore-env.py
330
1466
#!/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. """ Test that environment variables are ignored when --ignore-environment is specified. """ import os import TestGyp test = TestGyp.TestG...
apache-2.0
scrapinghub/dateparser
dateparser/data/date_translation_data/si.py
1
4709
info = { "name": "si", "date_order": "YMD", "january": [ "ජන", "ජනවාරි" ], "february": [ "පෙබ", "පෙබරවාරි" ], "march": [ "මාර්", "මාර්තු" ], "april": [ "අප්‍රේල්" ], "may": [ "මැයි" ], "june": [ "...
bsd-3-clause
jorik041/pyspider
pyspider/libs/dataurl.py
4
1183
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2012-11-16 10:33:20 from urllib import quote, unquote def encode(data, mime_type='', charset='utf-8', base64=True): if isinstance(data, unicode): ...
apache-2.0
dokipen/trac-announcer-plugin
announcer/subscribers/ticket_compat.py
1
8221
# -*- coding: utf-8 -*- # # Copyright (c) 2008, Stephen Hansen # Copyright (c) 2009, Robert Corsaro # Copyright (c) 2010, Steffen Hoffmann # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
bsd-3-clause
kkdd/arangodb
3rdParty/V8-4.3.61/tools/nacl-run.py
77
4883
#!/usr/bin/env python # # Copyright 2013 the V8 project authors. 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 # noti...
apache-2.0
jmehnle/ansible
lib/ansible/modules/system/timezone.py
29
22062
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Shinichi TAMURA (@tmshn) # # 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
tolimit/tp-qemu
qemu/tests/balloon_check.py
2
13448
import re import logging import random from autotest.client.shared import error from virttest import qemu_monitor from virttest import utils_test from virttest import utils_misc class BallooningTest(object): """ Provide basic functions for memory ballooning test cases """ def __init__(self, test, ...
gpl-2.0
DrSLDR/mgmag-proj
gravitas/make_statistics.py
1
16229
#!/usr/bin/env python """The purpose of this file is to run the game a great many times in order to extract more-or-less useful statistics about the game. This file is not intended to be used as a component of something else and works as a combination of main.py and engine.py. The file works in two stages. The first i...
mit
bobthekingofegypt/servo
tests/wpt/web-platform-tests/XMLHttpRequest/resources/authentication.py
247
1292
def main(request, response): if "logout" in request.GET: return ((401, "Unauthorized"), [("WWW-Authenticate", 'Basic realm="test"')], "Logged out, hopefully") session_user = request.auth.username session_pass = request.auth.password expected_user_name = request.h...
mpl-2.0
mavenave/liveline
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
372
89708
# Copyright (c) 2013 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. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
mit
srsman/odoo
addons/event/wizard/__init__.py
435
1067
# -*- 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
hsiaoyi0504/scikit-learn
sklearn/decomposition/tests/test_online_lda.py
12
11592
import numpy as np from scipy.sparse import csr_matrix from scipy.linalg import block_diag from sklearn.decomposition import LatentDirichletAllocation from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_almost_equal from skl...
bsd-3-clause
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/win32comext/axdebug/stackframe.py
18
5808
"""Support for stack-frames. Provides Implements a nearly complete wrapper for a stack frame. """ import sys from util import _wrap, RaiseNotImpl import expressions, gateways, axdebug, winerror import pythoncom from win32com.server.exception import COMException from util import trace #def trace(*args): # pass ...
gpl-3.0
donatello/zerorpc-python
tests/test_client_async.py
73
2652
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2013 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
mit
netinept/Court-Scheduler
configuration/setup.py
1
1379
""" Copyright 2013 Michael Adams, CJ Done, Charles Eswine, Kyle Falconer, Will Gorman, Stephen Kaysen, Pat McCroskey and Matthew Swinney 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 Lic...
apache-2.0
KerstSchul2/Kerstin
py/openage/convert/gamedata/graphic.py
46
4267
from .. import dataformat from struct import Struct, unpack_from from ..util import dbg, zstr from .empiresdat import endianness class GraphicDelta(dataformat.Exportable): name_struct = "graphic_delta" name_struct_file = "graphic" struct_description = "delta definitions for ingame graphics files....
gpl-3.0
chippey/gaffer
python/GafferUI/Timeline.py
3
11129
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
bsd-3-clause
thinksource/angularbigquery
lib/python-gflags/setup.py
376
1991
#!/usr/bin/env python # Copyright (c) 2007, 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 l...
gpl-2.0
sahilshekhawat/sympy
sympy/utilities/runtests.py
3
79087
""" This is our testing framework. Goals: * it should be compatible with py.test and operate very similarly (or identically) * doesn't require any external dependencies * preferably all the functionality should be in this file only * no magic, just import the test file and execute the test functions, that's it * po...
bsd-3-clause
maaku/bitcoin
test/functional/wallet.py
4
21622
#!/usr/bin/env python3 # Copyright (c) 2014-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 the wallet.""" from test_framework.test_framework import BitcoinTestFramework from test_framework....
mit
fyookball/electrum
gui/qt/external_plugins_window.py
1
24237
#!/usr/bin/env python3 # # Electron Cash - lightweight Bitcoin client # Copyright (C) 2018 Electron Cash developers # # 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, # in...
mit
ABaldwinHunter/django-clone-classic
tests/admin_utils/test_logentry.py
3
6497
from __future__ import unicode_literals from datetime import datetime from django.contrib.admin.models import ADDITION, CHANGE, DELETION, LogEntry from django.contrib.admin.utils import quote from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.test import...
bsd-3-clause
christophermoverton/PyAIRPG
Colorizeterrain3.py
1
46172
import math import random import bpy,bmesh from mathutils import * from mathutils.noise import * from math import * global dimX,dimY, NORMFAC BICUBIC = False ## don't make True not enabled at the moment NORMFAC = 1 dimX = 1024 dimY = 1024 colormap = {} landlow = (0,64,0) landhigh = (116,182,133) landlow_rock = (82,87,8...
gpl-2.0
GenericStudent/home-assistant
homeassistant/components/oem/climate.py
14
4130
"""OpenEnergyMonitor Thermostat Support.""" from oemthermostat import Thermostat import requests import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity from homeassistant.components.climate.const import ( CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, CURRENT_HVAC_OFF, ...
apache-2.0
liuji21/libvirt
docs/apibuild.py
15
98474
#!/usr/bin/python -u # # This is the API builder, it parses the C sources and build the # API formal description in XML. # # See Copyright for the status of this software. # # daniel@veillard.com # import os, sys import string import glob import re quiet=True warnings=0 debug=False debugsym=None # # C parser analysis...
gpl-2.0
archangdcc/avalon-extras
farm-manager/status-report/hsplot.py
3
4305
#!/usr/bin/env python2 from __future__ import print_function import os import datetime import sys import tempfile os.environ['MPLCONFIGDIR'] = tempfile.mkdtemp() import matplotlib matplotlib.use('Agg', warn=False) import matplotlib.pyplot as plt from scipy.interpolate import interp1d import numpy as np def hsplot(h...
unlicense
jamilatta/scielo-manager
scielomanager/journalmanager/migrations/0046_auto__add_field_issue_type.py
2
30876
# -*- 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 field 'Issue.type' db.add_column('journalmanager_issue', 'type',...
bsd-2-clause
erikriver/eduIntelligent-cynin
src/ubify.cyninv2theme/ubify/cyninv2theme/tests.py
5
3315
############################################################################### #cyn.in is an open source Collaborative Knowledge Management Appliance that #enables teams to seamlessly work together on files, documents and content in #a secure central environment. # #cyn.in v2 an open source appliance is distributed ...
gpl-3.0
gandreello/openthread
tools/harness-automation/cases/ed_6_2_2.py
16
1867
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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 # notic...
bsd-3-clause
hpcugent/graphite-web
webapp/graphite/util.py
12
2163
"""Copyright 2008 Orbitz WorldWide 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
robobrobro/ballin-octo-shame
lib/Python-3.4.3/Lib/test/test_pty.py
84
11286
from test.support import verbose, run_unittest, import_module, reap_children #Skip these tests if either fcntl or termios is not available fcntl = import_module('fcntl') import_module('termios') import errno import pty import os import sys import select import signal import socket import unittest TEST_STRING_1 = b"I...
mit
SerCeMan/intellij-community
python/lib/Lib/site-packages/django/conf/locale/ko/formats.py
313
2016
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y년 n월 j일' TIME_FORMAT = 'A g:i:s' DATETIME_FORMAT = 'Y년 n월 j일 g:i:s A' YE...
apache-2.0
ui/django-thumbnails
thumbnails/files.py
1
4368
from django.db.models.fields.files import ImageFieldFile from . import conf, images from .backends.storage import get_backend from .images import Thumbnail, FallbackImage from .metadata import get_path class SourceImage(ImageFieldFile): def __init__(self, name): self.name = name class ThumbnailedImage...
mit
Versatilus/dragonfly
dragonfly/grammar/_test_context.py
2
2210
# # This file is part of Dragonfly. # (c) Copyright 2007, 2008 by Christo Butcher # Licensed under the LGPL. # # Dragonfly is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation, either version 3 of the L...
lgpl-3.0
alqfahad/odoo
addons/pos_restaurant/__openerp__.py
311
2001
# -*- 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
WillisXChen/django-oscar
tests/functional/customer/auth_tests.py
53
5846
import re from django.core import mail from django.core.urlresolvers import reverse from django_webtest import WebTest from oscar.test.testcases import WebTestCase from oscar.test import factories from oscar.core.compat import get_user_model User = get_user_model() class TestAUserWhoseForgottenHerPassword(WebTest...
bsd-3-clause
preparationh67/youtube-dl
youtube_dl/extractor/dfb.py
106
1742
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import unified_strdate class DFBIE(InfoExtractor): IE_NAME = 'tv.dfb.de' _VALID_URL = r'https?://tv\.dfb\.de/video/(?P<display_id>[^/]+)/(?P<id>\d+)' _TEST = { 'url': 'http://tv.dfb.de/video/u-19-em...
unlicense
onitake/ansible
lib/ansible/modules/cloud/vmware/vmware_vswitch_facts.py
41
5181
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_...
gpl-3.0
jayceyxc/hue
desktop/core/src/desktop/lib/thread_util_test.py
29
1654
#!/usr/bin/env python # 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 ma...
apache-2.0
Thapelo-Tsotetsi/rapidpro
temba/msgs/views.py
2
39836
from __future__ import unicode_literals import json from datetime import date, timedelta from django import forms from django.conf import settings from django.core.urlresolvers import reverse from django.db import IntegrityError from django.forms import Form from django.http import HttpResponse, HttpResponseBadReques...
agpl-3.0
ktritz/vispy
examples/basics/visuals/graph.py
4
1782
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ This example demonstrates how to visualise a NetworkX graph using the GraphVisual. """ import sys import networkx as nx from vispy import app, vis...
bsd-3-clause
glovebx/odoo
addons/report_webkit/convert.py
322
2581
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who ...
agpl-3.0
muccg/StarCluster-NeCTAR
starcluster/commands/start.py
1
14009
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later ...
gpl-3.0
amenonsen/ansible
lib/ansible/modules/storage/netapp/_na_cdot_svm.py
59
8413
#!/usr/bin/python # (c) 2017, NetApp, 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', 'status': ['deprecated'], ...
gpl-3.0
jmaher/treeherder
treeherder/log_parser/artifactbuildercollection.py
2
4472
import logging import newrelic.agent from treeherder.utils.http import make_request from .artifactbuilders import LogViewerArtifactBuilder, PerformanceDataArtifactBuilder from .parsers import EmptyPerformanceData logger = logging.getLogger(__name__) # Max log size in bytes we will download (prior to decompression)....
mpl-2.0
GunoH/intellij-community
plugins/hg4idea/testData/bin/mercurial/hg.py
90
21956
# hg.py - repository classes for mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from i18n import _ from lock ...
apache-2.0
arulalant/mmDiagnosis
diagnosis1/mjo/level2/phase2d/plot_spatial_phase_vars.py
1
8978
import cdms2 import numpy import vcs import os import sys from make_template_array_spatial import make_template_array # setting the absolute path of the previous directory # getting the this py module path by __file__ variable # pass that __file__ to the os.path.dirname, returns the path of this module __levelDir__ = o...
gpl-3.0
kerr-huang/SL4A
python/src/Lib/sqlite3/test/dbapi.py
50
26837
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/dbapi.py: tests for DB-API compliance # # Copyright (C) 2004-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages...
apache-2.0
delijati/pysimiam-simulator
tools/svg2world.py
1
10371
#!/usr/bin/python2 import xml.etree.ElementTree as ET import xml.dom.minidom as dom import sys import re from math import sin, cos, atan2, pi, sqrt """ This tool converts svg files to world files It only supports a subset of svg, notably all the groups except the top one are ignored. Only the contents of thi stop gr...
gpl-2.0
Imtinan1996/autonomous-vehicle-modules
lane-detection-module/lane-detection.py
1
2889
import numpy as np import cv2 import pyautogui import matplotlib.pyplot as plt #area_to_remove=np.array([[100,474],[100,375],[300,200],[520,200],[800,375],[800,475]]) # for driving segment area_to_remove=np.array([[250,650],[450,500],[850,500],[1050,650]]) # for youtube video def draw_lanes(image,lanes): ...
mit
clearclaw/qlogtask
qlogtask/_version.py
1
15790
# pylint: skip-file # This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # t...
lgpl-3.0
crxtrdude/pywright
core/core.py
1
165103
from errors import * import sys sys.path.append("core/include") sys.path.append("core/include/simplejson") sys.path.append("include") import time import gui import os import pygame pygame.font.init() import random import pickle import re import textutil import registry import zipfile import simplejson as json ImgFont =...
bsd-3-clause
Puneeth-n/python-jenkins
tests/test_queue.py
2
2446
import json from mock import patch import jenkins from tests.base import JenkinsTestBase class JenkinsCancelQueueTest(JenkinsTestBase): @patch.object(jenkins.Jenkins, 'jenkins_open') def test_simple(self, jenkins_mock): job_name_to_return = {u'name': 'TestJob'} jenkins_mock.return_value = js...
bsd-3-clause
mikewiebe-ansible/ansible
lib/ansible/modules/net_tools/netbox/netbox_prefix.py
34
13766
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) <mikhail.yohman@gmail.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_MET...
gpl-3.0
zahodi/ansible
lib/ansible/plugins/cache/jsonfile.py
30
6023
# (c) 2014, Brian Coca, Josh Drake, et al # # 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
jlspyaozhongkai/Uter
third_party_backup/Python-2.7.9/Lib/dis.py
270
6499
"""Disassembler of Python byte code into mnemonics.""" import sys import types from opcode import * from opcode import __all__ as _opcodes_all __all__ = ["dis", "disassemble", "distb", "disco", "findlinestarts", "findlabels"] + _opcodes_all del _opcodes_all _have_code = (types.MethodType, types.FunctionT...
gpl-3.0
Belxjander/Kirito
SnowStorm/indra/lib/python/indra/util/shutil2.py
2
3103
''' @file shutil2.py @brief a better shutil.copytree replacement $LicenseInfo:firstyear=2007&license=mit$ Copyright (c) 2007-2009, Linden Research, 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 So...
gpl-3.0
SEL-Columbia/bamboo
bamboo/tests/controllers/test_calculations.py
2
23599
from time import sleep import simplejson as json from bamboo.controllers.abstract_controller import AbstractController from bamboo.controllers.calculations import Calculations from bamboo.controllers.datasets import Datasets from bamboo.core.frame import DATASET_ID from bamboo.models.calculation import Calculation fr...
bsd-3-clause
wulczer/ansible
v2/ansible/plugins/lookup/sequence.py
85
6836
# (c) 2013, Jayson Vantuyl <jayson@aggressive.ly> # # 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 v...
gpl-3.0
nicorellius/server-upbot
monitor.py
1
4678
#! /usr/bin/env python3 """monitor.py: general purpose yet simple server monitoring routine.""" # import threading import smtplib import urllib.request from sys import argv from socket import socket from time import asctime from sendmail import send_mail from sendsms import send from util import get_timestamp # ...
mpl-2.0
frRoy/Benchmarklib
benchmarklib/users/tests/test_admin.py
264
1308
from test_plus.test import TestCase from ..admin import MyUserCreationForm class TestMyUserCreationForm(TestCase): def setUp(self): self.user = self.make_user() def test_clean_username_success(self): # Instantiate the form with a new username form = MyUserCreationForm({ ...
bsd-3-clause
wilvk/ansible
lib/ansible/modules/network/eos/eos_linkagg.py
9
10433
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, 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
likexx/riftwarrior
code/external/emscripten/third_party/demangler.py
15
1293
#!/usr/bin/python2 ''' Simple tool to run the demangler. (C) 2010 Alon Zakai, MIT licensed Usage: demangler.py FILENAME SPLITTER Make sure you define ~/.emscripten, and fill it with something like JS_ENGINE=[os.path.expanduser('~/Dev/v8/d8')] JS_ENGINE_PARAMS=['--'] or JS_ENGINE=[os.path.expanduser('~/Dev/tracem...
mit
laurentgo/pants
tests/python/pants_test/tasks/test_console_task.py
14
1751
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import thr...
apache-2.0
TylerMoeller/fail2ban
fail2ban/server/asyncserver.py
18
5469
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
gpl-2.0
jsoref/django
django/contrib/gis/sitemaps/kml.py
55
2543
from django.apps import apps from django.contrib.gis.db.models.fields import GeometryField from django.contrib.sitemaps import Sitemap from django.core import urlresolvers from django.db import models class KMLSitemap(Sitemap): """ A minimal hook to produce KML sitemaps. """ geo_format = 'kml' de...
bsd-3-clause
ZephrFish/GoogD0rker
googD0rk-donotuse.py
1
1990
#!/usr/bin/python3 # GoogD0rk3r 3.0 # Python 3 re-write of version 1.0 # Declare all the imports we need import argparse import sys from googlesearch import search # Define our arguments required, We'll need to specify our domain OR a file containing a list of domains parser = argparse.ArgumentParser(description='Go...
unlicense
gregorian72/suckless_offsec
pi_sensor_scripts/ultrashall_test.py
1
15302
#!/usr/bin/env python # -*- coding: utf-8 -*- # import sys, traceback import datetime import numpy as np import matplotlib # Force matplotlib to not use any Xwindows backend. matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.dates as mdates import numpy as np import time import RPi.GPIO as GPIO ...
gpl-3.0
radeksimko/kubernetes
cluster/juju/layers/kubernetes-worker/reactive/kubernetes_worker.py
6
26961
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 by appli...
apache-2.0
EyeTechPae/Detection_Occupancy
src/classCam4.py
1
6706
import sys import d5_2 as camera2 import cv2 class Cam4(object): """ Class Cam2 constructor. Masks are array of masks, parksDown is an array of ParkingPlaces and parksUp other array of parking places, for the bottom zone of the parking and for the top side respectivly.""" def __init__(self, masky, par...
mit
woogers/volatility
volatility/plugins/mbrparser.py
44
16549
# Volatility # Copyright (C) 2008-2013 Volatility Foundation # Copyright (C) 2011 Jamie Levy (Gleeda) <jamie.levy@gmail.com> # # 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 Softw...
gpl-2.0
Shekharrajak/Django-facebook
django_facebook/utils.py
16
20963
from django.utils import six from functools import wraps try: # using compatible_datetime instead of datetime only # not to override the original datetime package from django.utils import timezone as compatible_datetime except ImportError: from datetime import datetime as compatible_datetime from dateti...
bsd-3-clause
aam-at/tensorflow
tensorflow/python/util/nest.py
2
56423
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
syci/OCB
addons/l10n_ve/__openerp__.py
19
1804
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Module programed and financed by: # Vauxoo, C.A. (<http://vauxoo.com>). # Our Community team mantain this module: # https://launchpad.net/~openerp-venezuela { 'name' : 'Venezuela - Accounting', '...
agpl-3.0
BitWriters/Zenith_project
zango/lib/python3.5/site-packages/django/db/migrations/executor.py
48
9843
from __future__ import unicode_literals from django.apps.registry import apps as global_apps from django.db import migrations from .loader import MigrationLoader from .recorder import MigrationRecorder from .state import ProjectState class MigrationExecutor(object): """ End-to-end migration execution - load...
mit
marnnie/Cable-buenaventura
plugin.video.genesis/resources/lib/resolvers/fastvideo.py
3
1472
# -*- 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 option) any ...
gpl-2.0
vipul-sharma20/oh-mainline
vendor/packages/Django/tests/regressiontests/sites_framework/models.py
115
1083
from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AbstractArticle(models.Model): title = models.CharField(max_length=50) objects...
agpl-3.0
joerocklin/gem5
tests/long/se/70.twolf/test.py
21
2116
# Copyright (c) 2006-2007 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
avneesh91/django
tests/template_tests/filter_tests/test_dictsortreversed.py
181
1686
from django.template.defaultfilters import dictsortreversed from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_sort(self): sorted_dicts = dictsortreversed( [{'age': 23, 'name': 'Barbara-Ann'}, {'age': 63, 'name': 'Ra Ra Rasputin'}, {...
bsd-3-clause
arunsingh/selenium
py/test/selenium/webdriver/common/takes_screenshots_tests.py
37
1518
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
tombtc/dashman
lib/pycoin/pycoin/tx/Tx.py
6
18689
# -*- coding: utf-8 -*- """ Parse, stream, create, sign and verify Bitcoin transactions as Tx structures. The MIT License (MIT) Copyright (c) 2013 by Richard Kiss Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to dea...
mit
houzhenggang/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_functools.py
29
16358
import functools import sys import unittest from test import test_support from weakref import proxy import pickle @staticmethod def PythonPartial(func, *args, **keywords): 'Pure Python approximation of partial()' def newfunc(*fargs, **fkeywords): newkeywords = keywords.copy() newkeywords.update...
gpl-2.0
a11r/grpc
src/proto/gen_build_yaml.py
52
3323
#!/usr/bin/env python2.7 # Copyright 2015, 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 lis...
bsd-3-clause
socialize/dogslow
dogslow/timer.py
1
3089
from functools import partial import logging import threading import time class TimerTask(object): def __init__(self, callable_, *args, **kwargs): self._callable = partial(callable_, *args, **kwargs) self._finished = False def is_finished(self): return self._finished def run(self...
lgpl-2.1