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
dajohnso/cfme_tests
cfme/intelligence/reports/widgets/menu_widgets.py
1
1845
# -*- coding: utf-8 -*- """Page model for Cloud Intel / Reports / Dashboard Widgets / Menus""" from widgetastic_manageiq import MenuShortcutsPicker from utils.appliance.implementations.ui import navigator from . import ( BaseDashboardReportWidget, BaseDashboardWidgetFormCommon, BaseEditDashboardWidgetStep,...
gpl-2.0
celarco/ardupilot
Tools/autotest/arduplane.py
4
17233
# fly ArduPlane in SIL import util, pexpect, sys, time, math, shutil, os from common import * from pymavlink import mavutil import random # get location of scripts testdir=os.path.dirname(os.path.realpath(__file__)) HOME_LOCATION='-35.362938,149.165085,585,354' WIND="0,180,0.2" # speed,direction,variance homeloc =...
gpl-3.0
frenetic-lang/featherweight-openflow
py/CustomTopo.py
1
4447
from mininet.topo import Topo, Node import random import networkx as nx import math class WattsStrogatzTopology(Topo): def __init__(self, numSwitches=6): super(WattsStrogatzTopology, self).__init__() # add switches numHosts = numSwitches hosts = range(1, numHosts+1) first...
bsd-3-clause
PennyDreadfulMTG/Penny-Dreadful-Tools
decksite/data/elo.py
1
2016
from decksite.data import person from decksite.database import db from shared import guarantee from shared.database import sqlescape # Using chess numbers here would make individual matches have too much meaning. Magic matches should move your rating less because of the inherent variance in Magic. # Fritz with the wid...
gpl-3.0
iffy/AutobahnPython
examples/twisted/wamp/rpc/options/backend.py
2
2668
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
mit
ssh1/stbgui
lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py
2
11267
from Components.config import config, ConfigYesNo, NoSave, ConfigSubsection, ConfigText, ConfigSelection, ConfigPassword from Components.Console import Console from Components.Network import iNetwork from os import system, path as os_path from string import maketrans, strip import sys import types from re import compi...
gpl-2.0
PaddlePaddle/Paddle
python/paddle/fluid/contrib/tests/test_quantize_transpiler.py
2
11518
# copyright (c) 2018 paddlepaddle 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 app...
apache-2.0
xuui/nerfpi
nerf-sight.py
1
1798
#!/usr/bin/python #coding=utf-8 #author:xuhel import RPi.GPIO as GPIO import time import sys,os import Adafruit_GPIO.SPI as SPI import Adafruit_SSD1306 from PIL import Image GPIO.setmode(GPIO.BCM) resPath='/home/nerfpi/Resources/' #define GPIO pin pin_btn=21 GPIO.setup(pin_btn, GPIO.IN, pull_up_down=GPIO.PUD_UP) R...
gpl-3.0
maciejkula/scipy
scipy/optimize/tests/test_linprog.py
9
11921
""" Unit test for Linear Programming via Simplex Algorithm. """ from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import (assert_, assert_array_almost_equal, assert_allclose, assert_almost_equal, assert_raises, assert_equal, run_module_suite) from scipy.opt...
bsd-3-clause
sandvine/horizon
openstack_dashboard/dashboards/settings/user/views.py
5
1896
# Copyright 2012 Nebula, 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
Jet-Streaming/gyp
test/mac/gyptest-strip-default.py
1
2543
#!/usr/bin/env python # 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. """ Verifies that the default STRIP_STYLEs match between different generators. """ import TestGyp import re import subprocess...
bsd-3-clause
cauchycui/scikit-learn
sklearn/preprocessing/imputation.py
208
14158
# Authors: Nicolas Tresegnie <nicolas.tresegnie@gmail.com> # License: BSD 3 clause import warnings import numpy as np import numpy.ma as ma from scipy import sparse from scipy import stats from ..base import BaseEstimator, TransformerMixin from ..utils import check_array from ..utils import as_float_array from ..uti...
bsd-3-clause
kkintaro/termite-data-server
web2py/gluon/validators.py
9
127935
#!/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Thanks to ga2arch for help with IS_IN_DB and IS_NOT_IN_DB on GAE """ import os import re import datetime impor...
bsd-3-clause
unnikrishnankgs/va
venv/lib/python3.5/site-packages/numpy/polynomial/laguerre.py
10
56151
""" Objects for dealing with Laguerre series. This module provides a number of objects (mostly functions) useful for dealing with Laguerre series, including a `Laguerre` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in th...
bsd-2-clause
labordoc/labordoc-next
modules/miscutil/lib/data_cacher.py
8
4095
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License,...
gpl-2.0
ngageoint/geoq
geoq/workflow/migrations/0001_initial.py
1
11369
# Generated by Django 3.0.5 on 2020-04-17 14:11 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import jsonfield.fields class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_US...
mit
pmisik/buildbot
master/buildbot/test/unit/data/test_workers.py
5
10489
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
OpenCanada/website
articles/migrations/0003_initial_pages.py
2
1624
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def create_pages(apps, schema_editor): Page = apps.get_model("wagtailcore", "Page") SeriesListPage = apps.get_model("articles", "SeriesListPage") ArticleListPage = apps.get_model("articles", "ArticleL...
mit
NeCTAR-RC/nova
nova/api/openstack/compute/legacy_v2/contrib/extended_server_attributes.py
1
3340
# Copyright 2012 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 or a...
apache-2.0
40223232/w16b_test
static/Brython3.1.1-20150328-091302/Lib/markdown2.py
669
8143
import browser.html import re class URL: def __init__(self,src): elts = src.split(maxsplit=1) self.href = elts[0] self.alt = '' if len(elts)==2: alt = elts[1] if alt[0]=='"' and alt[-1]=='"':self.alt=alt[1:-1] elif alt[0]=="'" and alt[-1]=="'":sel...
gpl-3.0
thiriel/maps
venv/lib/python2.7/site-packages/django/contrib/formtools/tests/wizard/forms.py
90
7471
from django import forms, http from django.conf import settings from django.test import TestCase from django.template.response import TemplateResponse from django.utils.importlib import import_module from django.contrib.auth.models import User from django.contrib.formtools.wizard.views import (WizardView, ...
bsd-3-clause
TheNameIsNigel/opencog
opencog/cython/setup.py
36
3230
from distutils.core import setup from distutils.extension import Extension from distutils.sysconfig import get_python_inc from Cython.Distutils import build_ext import os # WARNING: This file is deprecated as the cython bindings are integrated with # CMake now. This file is still useful for reference on how to use dis...
agpl-3.0
ligo-cbc/pycbc-glue
pycbc_glue/ligolw/ilwd.py
1
7449
# Copyright (C) 2006,2012 Kipp Cannon # # 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...
gpl-3.0
citrix-openstack-build/neutron
neutron/tests/unit/test_linux_ip_lib.py
4
28091
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 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.apach...
apache-2.0
fevxie/sale-workflow
sale_rental/wizard/__init__.py
31
1070
# -*- encoding: utf-8 -*- ############################################################################## # # Sale Rental module for Odoo # Copyright (C) 2014-2015 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can redistrib...
agpl-3.0
ncliam/serverpos
openerp/addons/base_iban/base_iban.py
278
8657
# -*- 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
citrix-openstack-build/neutron-lbaas
neutron_lbaas/services/loadbalancer/drivers/embrane/driver.py
1
15783
# Copyright 2014 Embrane, 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 required by...
apache-2.0
llonchj/sentry
src/sentry/migrations/0059_auto__add_filterkey__add_unique_filterkey_project_key.py
36
19605
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'FilterKey' db.create_table('sentry_filterkey', ( ('id', self.gf('sentry.db.model...
bsd-3-clause
diegocortassa/TACTIC
src/context/client/tactic-api-python-4.0.api04/Lib/inspect.py
5
39146
# -*- coding: iso-8859-1 -*- """Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (func_*, co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of t...
epl-1.0
dpac-vlsi/SynchroTrace
src/arch/x86/isa/insts/simd64/floating_point/arithmetic/accumulation.py
91
2169
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
FireBladeNooT/Medusa_1_6
lib/github/NamedUser.py
3
22789
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Steve English <steve.english@navetas.com> # # Copyright 2012 Vincent Jacques <vincent@vincent-ja...
gpl-3.0
JioCloud/heat
heat/tests/test_dependencies.py
5
8553
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
blade2005/dosage
dosagelib/plugins/w.py
1
7377
# -*- coding: utf-8 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2016 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from re import compile, escape, IGNORECASE from ..scraper import _BasicSc...
mit
dllsf/odootest
addons/document/wizard/__init__.py
444
1084
# -*- 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...
agpl-3.0
marineam/systemd
test/sysv-generator-test.py
4
16017
# systemd-sysv-generator integration test # # (C) 2015 Canonical Ltd. # Author: Martin Pitt <martin.pitt@ubuntu.com> # # systemd 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 2.1 of the...
gpl-2.0
utamaro/youtube-dl
youtube_dl/extractor/cinchcast.py
177
1678
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( unified_strdate, xpath_text, ) class CinchcastIE(InfoExtractor): _VALID_URL = r'https?://player\.cinchcast\.com/.*?assetId=(?P<id>[0-9]+)' _TEST = { # Actual test is run in generic,...
unlicense
kekeadou/ycmd
ycmd/completers/all/identifier_completer.py
14
7991
#!/usr/bin/env python # # Copyright (C) 2011, 2012 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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
iamchenchen/study-appium
python-client/test/functional/ios/multi_action_tests.py
1
1635
#!/usr/bin/env python # 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
drpngx/tensorflow
tensorflow/python/ops/string_ops.py
13
7342
# 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
Medigate/cutiuta-server
cutiuta-server/env/lib/python3.4/site-packages/coreapi/compat.py
1
1367
# coding: utf-8 import base64 __all__ = [ 'urlparse', 'string_types', 'COMPACT_SEPARATORS', 'VERBOSE_SEPARATORS' ] try: # Python 2 import urlparse string_types = (basestring,) text_type = unicode COMPACT_SEPARATORS = (b',', b':') VERBOSE_SEPARATORS = (b',', b': ') def is_file(...
gpl-3.0
trozet/tacker
tacker/common/driver_manager.py
3
2848
# Copyright 2013, 2014 Intel Corporation. # 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 # # Unles...
apache-2.0
calmofthestorm/aenea
server/linux_wayland/evdevImpl.py
1
7210
import evdev import logging import subprocess import time from server.core import AbstractAeneaPlatformRpcs from qwerty import Qwerty from azerty import Azerty mappings = { "qwerty" : Qwerty(), "azerty" : Azerty(), } special = { "enter" : evdev.ecodes.KEY_ENTER, "tab" : evdev.ecodes.KEY_TA...
lgpl-3.0
jmartinezchaine/OpenERP
openerp/addons/fetchmail_hr_recruitment/__init__.py
36
1069
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP S.A. (<http://www.openerp.com>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
hn8841182/W11
static/Brython3.1.1-20150328-091302/Lib/sre_constants.py
692
7172
# # Secret Labs' Regular Expression Engine # # various symbols used by the regular expression engine. # run this script to update the _sre include files! # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support modul...
gpl-3.0
kimiyoung/transformer-xl
tf/vocabulary.py
1
5149
from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import Counter, OrderedDict import numpy as np import tensorflow as tf from tensorflow.gfile import Open as open from tensorflow.gfile import Exists as exists class Vocab(object): def __i...
apache-2.0
fishcorn/pylearn2
pylearn2/scripts/plot_monitor.py
37
10204
#!/usr/bin/env python """ usage: plot_monitor.py model_1.pkl model_2.pkl ... model_n.pkl Loads any number of .pkl files produced by train.py. Extracts all of their monitoring channels and prompts the user to select a subset of them to be plotted. """ from __future__ import print_function __authors__ = "Ian Goodfell...
bsd-3-clause
telwertowski/Books-Mac-OS-X
Export Plugins/WhatsOnMyBookShelf Exporter/SOAPpy/SOAPBuilder.py
8
22127
""" ################################################################################ # Copyright (c) 2003, Pfizer # Copyright (c) 2001, Cayce Ullman. # Copyright (c) 2001, Brian Matthews. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
mit
xiaoyaozi5566/DiamondCache
ext/ply/test/yacc_unused_rule.py
174
1596
# ----------------------------------------------------------------------------- # yacc_unused_rule.py # # Grammar with an unused rule # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex import ...
bsd-3-clause
lrowe/rdflib
rdflib/plugins/parsers/pyRdfa/__init__.py
8
47186
# -*- coding: utf-8 -*- """ RDFa 1.1 parser, also referred to as a “RDFa Distiller”. It is deployed, via a CGI front-end, on the U{W3C RDFa 1.1 Distiller page<http://www.w3.org/2012/pyRdfa/>}. For details on RDFa, the reader should consult the U{RDFa Core 1.1<http://www.w3.org/TR/rdfa-core/>}, U{XHTML+RDFa1.1<http://w...
bsd-3-clause
flyfei/python-for-android
python3-alpha/extra_modules/bs4/builder/_html5lib.py
46
7524
__all__ = [ 'HTML5TreeBuilder', ] import warnings from bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from bs4.element import NamespacedAttribute import html5lib from html5lib.constants import namespaces from bs4.element import ( Comment, Doctype, NavigableStr...
apache-2.0
emonty/burrow
burrow/tests/backend/test_http.py
1
1516
# Copyright (C) 2011 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 or agreed to...
apache-2.0
miaecle/deepchem
deepchem/models/models.py
1
8342
""" Contains an abstract base class that supports different ML models. """ import sys import numpy as np import pandas as pd import joblib import os import shutil import tempfile import sklearn import logging from sklearn.base import BaseEstimator import logging from deepchem.data import Dataset, pad_features from de...
mit
Workday/OpenFrame
tools/telemetry/third_party/modulegraph/modulegraph_tests/test_explicit_packages.py
26
1643
from __future__ import absolute_import import unittest import os, shutil, sys from modulegraph import find_modules from modulegraph import modulegraph class PackagesTestCase (unittest.TestCase): if not hasattr(unittest.TestCase, 'assertIsInstance'): def assertIsInstance(self, object, types, message=None...
bsd-3-clause
chiefspace/udemy-rest-api
udemy_rest_api_section6/env/lib/python3.4/site-packages/sqlalchemy/dialects/mysql/mysqlconnector.py
33
6580
# mysql/mysqlconnector.py # Copyright (C) 2005-2017 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 """ .. dialect:: mysql+mysqlconnector :name: MySQL Connector/Python ...
gpl-2.0
rafasis1986/EngineeringMidLevel
flaskiwsapp/api/v1/views/ticketViews.py
1
3027
from werkzeug.exceptions import BadRequest from flask import request from flask.blueprints import Blueprint from flask_cors.extension import CORS from flask_jwt import jwt_required, current_identity, JWTError from flask_restful import Resource, reqparse, fields from flaskiwsapp.api.v1.schemas.ticketSchemas import Bas...
mit
ChristosChristofidis/h2o-3
py2/testdir_r/sh2junit.py
31
16028
import sys, psutil, os, stat, tempfile, argparse, time, datetime sys.path.extend(['.','..','../..','py']) import h2o_sandbox # Stripped down, similar to h2o.py has for these functions # Possible to do this in bash, but the code becomes cryptic. # You can execute this as sh2junit.py <bash command string> # sh2junit ru...
apache-2.0
why11002526/keras
tests/auto/test_sequential_model.py
20
12510
from __future__ import absolute_import from __future__ import print_function import unittest import numpy as np np.random.seed(1337) from keras.models import Sequential, model_from_json, model_from_yaml from keras.layers.core import Dense, Activation, Merge from keras.utils import np_utils from keras.utils.test_utils ...
mit
product-owner/2015scrum
static/Brython3.1.1-20150328-091302/Lib/unittest/case.py
743
48873
"""Test case implementation""" import sys import functools import difflib import pprint import re import warnings import collections from . import result from .util import (strclass, safe_repr, _count_diff_all_purpose, _count_diff_hashable) __unittest = True DIFF_OMITTED = ('\nDiff is %s charact...
gpl-3.0
JackDanger/sentry
src/sentry/api/endpoints/useravatar.py
3
1971
from __future__ import absolute_import from rest_framework import status from rest_framework import serializers from rest_framework.response import Response from sentry.api.bases.user import UserEndpoint from sentry.api.fields import AvatarField from sentry.api.serializers import serialize from sentry.models import U...
bsd-3-clause
fsalamero/pilas
pilasengine/controles/__init__.py
6
2403
# -*- encoding: utf-8 -*- # pilas engine: un motor para hacer videojuegos # # Copyright 2010-2014 - Hugo Ruscitti # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html) # # Website - http://www.pilas-engine.com.ar from PyQt4 import QtCore from pilasengine.controles import simbolos from pilasengine.controles im...
lgpl-3.0
vSlipenchuk/linux-aufs
tools/perf/scripts/python/futex-contention.py
1997
1508
# 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
project-generator/project_generator
project_generator/settings.py
4
2317
# Copyright 2014-2015 0xc0170 # # 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
blade-vec-4g/android_kernel_zte_msm8226
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
BlindHunter/django
tests/gis_tests/geoapp/models.py
83
2546
from django.utils.encoding import python_2_unicode_compatible from ..models import models from ..utils import gisfield_may_be_null @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=30) objects = models.GeoManager() class Meta: abstract = True ...
bsd-3-clause
firebitsbr/raspberry_pwn
src/pentest/voiper/sulley/sulley/legos/ber.py
8
2229
######################################################################################################################## ### ASN.1 / BER TYPES (http://luca.ntop.org/Teaching/Appunti/asn1.html) ######################################################################################################################## impor...
gpl-3.0
poljeff/odoo
addons/account_analytic_plans/__init__.py
445
1104
# -*- 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
GoogleCloudPlatform/python-compat-runtime
appengine-compat/exported_appengine_sdk/google/appengine/runtime/__init__.py
8
1610
#!/usr/bin/env python # # Copyright 2007 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 o...
apache-2.0
INL/MBMP-morphological-parser
mbmp/__init__.py
1
2461
## Python implementation of MBMA (Van den Bosch & Daelemans 1999) ## Copyright (C) 2011 Institute for Dutch Lexicology (INL) ## Author: Folgert Karsdorp, INL ## E-mail: <servicedesk@inl.nl> ## URL: <http://www.inl.nl/> ## For licence information, see LICENCE.TXT """ Memory-Based Morphological Parsing This package co...
apache-2.0
motion2015/a3
lms/djangoapps/certificates/migrations/0015_adding_mode_for_verified_certs.py
114
6231
# -*- coding: utf-8 -*- import 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 'GeneratedCertificate.mode' db.add_column('certificates_generatedcertificate', 'mode', ...
agpl-3.0
sjfloat/youtube-dl
youtube_dl/extractor/mgoon.py
177
2695
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, qualities, unified_strdate, ) class MgoonIE(InfoExtractor): _VALID_URL = r'''(?x)https?://(?:www\.)? (?:(:?m\.)?mgoon\.com/(?:ch/(?:.+)/v|play/view)| ...
unlicense
jef-n/QGIS
tests/src/python/test_qgsmetadatawidget.py
30
12133
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsMetadataWidget. Run with: ctest -V -R QgsMetadataWidget .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, o...
gpl-2.0
liampauling/betfair
betfairlightweight/resources/baseresource.py
2
1242
import functools import datetime from typing import Union, Optional from ..compat import basestring, integer_types, json, parse_datetime class BaseResource: """Lightweight data structure for resources.""" def __init__(self, **kwargs): self.elapsed_time = kwargs.pop("elapsed_time", None) now ...
mit
MSchnei/py_pRF_motion
pyprf_feature/analysis/save_fit_tc_nii.py
1
12294
# -*- coding: utf-8 -*- """Saving empirical and fitted time courses to nii file format""" # Part of pyprf_feature library # Copyright (C) 2018 Marian Schneider, Ingo Marquardt # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published b...
gpl-3.0
akirk/youtube-dl
youtube_dl/extractor/twitter.py
17
8604
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( float_or_none, xpath_text, remove_end, int_or_none, ExtractorError, sanitized_Request, ) class TwitterCardIE(InfoExtractor): IE_NAME = 'twitter:card' _VALID_URL =...
unlicense
google/timesketch
importer_client/python/timesketch_import_client/data/__init__.py
1
1973
# Copyright 2020 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 required by applicable law or a...
apache-2.0
cocafe/i9070_Kernel_CoCore-E
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
petemounce/ansible-modules-core
database/postgresql/postgresql_user.py
89
25160
#!/usr/bin/python # -*- coding: utf-8 -*- # 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
KellyChan/python-examples
python/tools/barcode_query.py
3
1044
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'Kelly Chan' __date__ = 'Oct 1 2014' __version__ = '1.0.0' import sys reload(sys) sys.setdefaultencoding('utf8') import json import urllib import urllib2 import httplib def ConnectDatabase(barcode): url = 'http://setup.3533.com/ean/index?keyword=' + s...
mit
JulieWestfall/django-calaccess-raw-data
example/toolbox/management/commands/dumpuniquecontributors.py
32
3398
from __future__ import unicode_literals from csvkit import CSVKitWriter from calaccess_raw import models from django.db import connection from calaccess_raw.management.commands import CalAccessCommand class Command(CalAccessCommand): help = 'Dump all of the unique campaign contributor names' def handle(self,...
mit
beiko-lab/gengis
bin/Lib/distutils/tests/test_upload.py
10
3719
# -*- encoding: utf8 -*- """Tests for distutils.command.upload.""" import os import unittest from test.test_support import run_unittest from distutils.command import upload as upload_mod from distutils.command.upload import upload from distutils.core import Distribution from distutils.tests.test_config impo...
gpl-3.0
hzlf/openbroadcast
website/filer/tests/server_backends.py
25
4610
#-*- coding: utf-8 -*- import time import shutil import os from django.core.files.uploadedfile import SimpleUploadedFile from django.http import HttpResponseNotModified, Http404 from django.test import TestCase from django.utils.http import http_date from filer import settings as filer_settings from filer.models import...
gpl-3.0
aequitas/home-assistant
homeassistant/components/eliqonline/sensor.py
6
2917
"""Monitors home energy use for the ELIQ Online service.""" from datetime import timedelta import logging import asyncio import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import (CONF_ACCESS_TOKEN, CONF_NAME, POWER_WATT) from homeassistant.helpers.entity imp...
apache-2.0
kutenai/django
tests/lookup/tests.py
27
38241
from __future__ import unicode_literals import collections from datetime import datetime from operator import attrgetter from unittest import skipUnless from django.core.exceptions import FieldError from django.db import connection from django.test import ( TestCase, TransactionTestCase, ignore_warnings, skipUnle...
bsd-3-clause
fengxiaoiie/volatility
tools/mac/generate_profile_list.py
12
3305
# Volatility # # 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 Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Volatility is dist...
gpl-2.0
rickerc/nova_audit
tools/xenserver/vdi_chain_cleanup.py
139
3678
#!/usr/bin/env python # Copyright 2012 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 l...
apache-2.0
DarkEnergyScienceCollaboration/ReprocessingTaskForce
config/w_2017_30/processCcdConfig.py
28
3389
# Apply the brighter fatter correction config.isr.doBrighterFatter=False config.charImage.repair.cosmicray.nCrPixelMax=1000000 # Useful to get to avoid deblending of satellite tracks config.calibrate.deblend.maxFootprintSize=2000 #2200 # Use psfex instead of pca import lsst.meas.extensions.psfex.psfexPsfDeterminer c...
gpl-2.0
shreyans800755/coala
coalib/bearlib/aspects/base.py
15
6123
import functools import re from coalib.bearlib.languages import Language import coalib.bearlib.aspects from .taste import TasteError def get_subaspect(parent, subaspect): """ Get a subaspect from an aspectclass or aspectclass instance. >>> import coalib.bearlib.aspects as coala_aspects >>> metadata...
agpl-3.0
ianatpn/nupictest
nupic/support/lockattributes.py
15
6792
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, 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...
gpl-3.0
zhongpei/shadowsocks
shadowsocks/manager.py
925
9692
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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 b...
apache-2.0
xodus7/tensorflow
tensorflow/python/kernel_tests/variable_ops_test.py
8
10064
# 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
atsolakid/edx-platform
lms/djangoapps/certificates/management/commands/fix_ungraded_certs.py
110
1538
from certificates.models import GeneratedCertificate from courseware import grades, courses from django.test.client import RequestFactory from django.core.management.base import BaseCommand from optparse import make_option class Command(BaseCommand): help = """ Find all students that need to be graded an...
agpl-3.0
souravsingh/sympy
sympy/sets/tests/test_sets.py
6
39180
from sympy import (Symbol, Set, Union, Interval, oo, S, sympify, nan, GreaterThan, LessThan, Max, Min, And, Or, Eq, Ge, Le, Gt, Lt, Float, FiniteSet, Intersection, imageset, I, true, false, ProductSet, E, sqrt, Complement, EmptySet, sin, cos, Lambda, ImageSet, pi, Eq, Pow, Contains, Sum, rootof, Symmetr...
bsd-3-clause
songmonit/CTTMSONLINE
addons/account/wizard/account_fiscalyear_close.py
81
15499
# -*- 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
yunw/nodejs
node_modules/grunt/node_modules/gzip-js/node_modules/deflate-js/test/runner.py
177
1688
#!/usr/bin/env python import argparse import deflate import inflate from colorama import Fore testDir = 'test-files' outDir = 'test-outs' allPassed = True parser = argparse.ArgumentParser(description='Process command-line arguments') parser.add_argument('--test', metavar='path/to/file', type=str, default='both', na...
mit
Nepherhotep/django
tests/postgres_tests/migrations/0002_create_test_models.py
231
8070
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from ..fields import * # NOQA class Migration(migrations.Migration): dependencies = [ ('postgres_tests', '0001_setup_extensions'), ] operations = [ migrations.CreateModel( ...
bsd-3-clause
lexus24/w16b_test
static/Brython3.1.3-20150514-095342/Lib/site-packages/spur.py
291
5461
#coding: utf-8 import math # 導入數學函式後, 圓周率為 pi # deg 為角度轉為徑度的轉換因子 deg = math.pi/180. class Spur(object): def __init__(self, ctx): self.ctx = ctx def create_line(self, x1, y1, x2, y2, width=3, fill="red"): self.ctx.beginPath() self.ctx.lineWidth = width self.ctx.moveTo(x1, y1) ...
agpl-3.0
kelvinongtoronto/numbers
bignumbers.py
1
1978
TENS = [None, None, "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"] SMALL = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen","sixteen", "seventeen", "eighteen", "nineteen"] HUGE = [None, None]+ ...
artistic-2.0
batiste/django-page-cms
pages/widgets.py
1
6835
# -*- coding: utf-8 -*- """Django CMS come with a set of ready to use widgets that you can enable in the admin via a placeholder tag in your template.""" from pages.settings import PAGES_MEDIA_URL, PAGES_STATIC_URL from pages.settings import PAGE_LANGUAGES from pages.models import Page from pages.widgets_registry impo...
bsd-3-clause
alexmojaki/blaze
blaze/expr/tests/test_broadcast.py
11
3042
from blaze.expr import * from blaze.expr.broadcast import * from blaze.expr.broadcast import leaves_of_type, broadcast_collect from blaze.compatibility import builtins from toolz import isdistinct x = symbol('x', '5 * 3 * int32') xx = symbol('xx', 'int32') y = symbol('y', '5 * 3 * int32') yy = symbol('yy', 'int32') ...
bsd-3-clause
moijes12/oh-mainline
vendor/packages/Django/django/conf/locale/pl/formats.py
107
1089
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j E Y' TIME_FORMAT = 'H:i:s' DATE...
agpl-3.0