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
OsirisSPS/osiris-sps
client/share/plugins/AF9A4C281070FDB0F34CF417CDB168AB38C8A388/lib/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py
73
60956
"""Suite AppleScript Suite: Standard terms for AppleScript Level 1, version 1 Generated from /Volumes/Sap/System Folder/Extensions/AppleScript AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'ascr' class AppleScript_Suite_Events: def _26_(self, _object, _attributes=...
gpl-3.0
jfpla/odoo
openerp/addons/base/workflow/workflow_report.py
314
9001
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
nelmiux/CarnotKE
jyhton/lib-python/2.7/plat-irix5/cddb.py
66
7225
# This file implements a class which forms an interface to the .cddb # directory that is maintained by SGI's cdman program. # # Usage is as follows: # # import readcd # r = readcd.Readcd() # c = Cddb(r.gettrackinfo()) # # Now you can use c.artist, c.title and c.track[trackno] (where trackno # starts at 1). When the CD...
apache-2.0
durai145/youtube-dl
youtube_dl/extractor/lynda.py
18
8769
from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, clean_html, int_or_none, ) class LyndaBaseIE(InfoExtractor): _LOGIN_URL =...
unlicense
derekjchow/models
research/syntaxnet/dragnn/python/lexicon_test.py
3
2738
# Copyright 2017 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
sahutd/youtube-dl
youtube_dl/extractor/wsj.py
104
3431
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, ) class WSJIE(InfoExtractor): _VALID_URL = r'https?://video-api\.wsj\.com/api-video/player/iframe\.html\?guid=(?P<id>[a-zA-Z0-9-]+)' IE_DESC = 'Wall Street J...
unlicense
was4444/chromium.src
chrome/browser/web_dev_style/js_checker_test.py
16
11434
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import js_checker from os import path as os_path import re from sys import path as sys_path import test_util import unittest _HERE = o...
bsd-3-clause
curiousguy13/shogun
tests/integration/generator/preproc.py
22
2603
"""Generator for Preprocessors""" import shogun.Library as library from shogun.Kernel import GaussianKernel, CommWordStringKernel, \ CommUlongStringKernel import fileop import featop import dataop import category def _compute (feats, params): """Perform computations on kernel using preprocessors. @param name na...
gpl-3.0
hifly/OpenUpgrade
addons/account_cancel/__init__.py
702
1046
# -*- 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
cloudbearings/vitess
test/initial_sharding.py
8
20125
#!/usr/bin/env python # # Copyright 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. # This test simulates the first time a database has to be split: # - we start with a keyspace with a single shard and a single table # - we ad...
bsd-3-clause
HeinleinSupport/check_mk
python-jinja2/lib/python/jinja2/lexer.py
90
28559
# -*- coding: utf-8 -*- """ jinja2.lexer ~~~~~~~~~~~~ This module implements a Jinja / Python combination lexer. The `Lexer` class provided by this module is used to do some preprocessing for Jinja. On the one hand it filters out invalid operators like the bitshift operators we don't allow...
gpl-2.0
DaanHoogland/cloudstack
tools/marvin/marvin/settings.py
8
1204
# 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
ares/robottelo
robottelo/ui/base.py
2
32387
# -*- encoding: utf-8 -*- """Base class for all UI operations""" import logging import time from robottelo.helpers import escape_search from robottelo.ui.locators import locators, common_locators, Locator from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import TimeoutExcep...
gpl-3.0
teritos/tero-saas
alarm/events.py
2
1503
"""Alarm Event names""" import logging import zope.event.classhandler from base64 import b64decode from vendors import onesignal from vision.cloud import azure from alarm.models import AlarmImage from django.contrib.auth.models import User logger = logging.getLogger('alarm') # pylint: disable=C0103 class Event(ob...
gpl-3.0
carsongee/edx-platform
lms/djangoapps/django_comment_client/tests/test_models.py
30
2542
import django_comment_common.models as models from django.test import TestCase from django.test.utils import override_settings from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE from opaque_keys.edx.locations import SlashSeparatedCourseKey @override_settings(MODULESTORE=TEST_DATA_MIXED_MODUL...
agpl-3.0
rjschwei/boto
boto/route53/__init__.py
22
2862
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # w...
mit
brain-tec/sale-workflow
sale_automatic_workflow/sale.py
9
3840
# -*- coding: utf-8 -*- ############################################################################### # # sale_automatic_workflow for OpenERP # Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com> # Copyright 2013 Camptocamp SA (Guewen Baconnier) # # This program is free software: you ...
agpl-3.0
shinriyo/workalendar
workalendar/tests/test_america.py
2
5679
# -*- coding: utf-8 -*- from datetime import date from workalendar.tests import GenericCalendarTest from workalendar.america import Brazil, BrazilSaoPauloState from workalendar.america import BrazilSaoPauloCity from workalendar.america import Mexico, Chile, Panama class BrazilTest(GenericCalendarTest): cal_class ...
mit
tmerrick1/spack
var/spack/repos/builtin/packages/r-flashclust/package.py
5
1665
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
barbuza/django
django/db/models/options.py
149
36502
from __future__ import unicode_literals import warnings from bisect import bisect from collections import OrderedDict, defaultdict from itertools import chain from django.apps import apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist from django.db import connections from djang...
bsd-3-clause
Gui13/CouchPotatoServer
libs/tmdb3/locales.py
34
20495
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------- # Name: locales.py Stores locale information for filtering results # Python Library # Author: Raymond Wagner #----------------------- from tmdb_exceptions import * import locale syslocale = None class LocaleBase(object): __slots__ = ['__i...
gpl-3.0
mbrukman/cloud-launcher
console/appengine/compute_api_base.py
1
3530
#!/usr/bin/python # # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
anistark/mozillians
vendor-local/lib/python/south/management/commands/datamigration.py
92
5038
""" Data migration creation command """ from __future__ import print_function import sys import os import re from optparse import make_option try: set except NameError: from sets import Set as set from django.core.management.base import BaseCommand from django.core.management.color import no_style from djan...
bsd-3-clause
tomn46037/python-myfitnesspal
tests/test_client.py
2
11535
from collections import OrderedDict import datetime from measurement.measures import Energy, Weight from mock import patch from myfitnesspal import Client from .base import MFPTestCase class TestClient(MFPTestCase): def setUp(self): self.arbitrary_username = 'alpha' self.arbitrary_password = 'b...
mit
SummerLW/Perf-Insight-Report
third_party/gsutil/gslib/util.py
8
40698
# -*- coding: utf-8 -*- # Copyright 2010 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 require...
bsd-3-clause
bahattincinic/arguman.org
web/blog/migrations/0001_initial.py
7
1191
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import markitup.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Post', fields=[ ('id', m...
mit
benroeder/moviepy
moviepy/video/compositing/on_color.py
16
1041
from moviepy.video.VideoClip import ColorClip from moviepy.video.compositing.CompositeVideoClip import CompositeVideoClip def on_color(clip, size=None, color=(0, 0, 0), pos=None, col_opacity=None): """ Returns a clip made of the current clip overlaid on a color clip of a possibly bigger size. Can serve to...
mit
jamestwebber/scipy
scipy/sparse/linalg/isolve/iterative.py
6
27367
"""Iterative methods for solving linear systems""" from __future__ import division, print_function, absolute_import __all__ = ['bicg','bicgstab','cg','cgs','gmres','qmr'] import warnings import numpy as np from . import _iterative from scipy.sparse.linalg.interface import LinearOperator from .utils import make_sys...
bsd-3-clause
brandonium21/snowflake
snowflakeEnv/lib/python2.7/site-packages/alembic/testing/fixtures.py
2
4359
# coding: utf-8 import io import re from sqlalchemy import create_engine, text, MetaData import alembic from alembic.compat import configparser from alembic import util from alembic.compat import string_types, text_type from alembic.migration import MigrationContext from alembic.environment import EnvironmentContext ...
bsd-2-clause
pietergreyling/amphtml
validator/validator_gen_md.py
26
7813
# # Copyright 2015 The AMP HTML 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 applic...
apache-2.0
sysbot/CouchPotatoServer
libs/html5lib/ihatexml.py
1727
16581
from __future__ import absolute_import, division, unicode_literals import re import warnings from .constants import DataLossWarning baseChar = """ [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] | [#x014A-#x017E] | [#x0180-...
gpl-3.0
scholer/py2cytoscape
py2cytoscape/data/network_view.py
1
6734
# -*- coding: utf-8 -*- import json import pandas as pd import requests from py2cytoscape.data.edge_view import EdgeView from py2cytoscape.data.node_view import NodeView from . import BASE_URL, HEADERS from py2cytoscape.data.util_network import NetworkUtil BASE_URL_NETWORK = BASE_URL + 'networks' class CyNetworkVi...
mit
13693100472/linux
tools/perf/scripts/python/failed-syscalls-by-pid.py
1996
2233
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
Spiderlover/Toontown
toontown/quest/QuestMapGlobals.py
6
5065
from pandac.PandaModules import Point3 CogInfoPosTable = {'toontown_central_2100_english': Point3(-0.3, 0, -0.2), 'toontown_central_2200_english': Point3(0.2, 0, -0.2), 'toontown_central_2300_english': Point3(0.35, 0, -0.2), 'minnies_melody_land_4100_english': Point3(0.45, 0, -0.2), 'minnies_melody_land_4200_englis...
mit
photoninger/ansible
lib/ansible/modules/network/f5/bigip_gtm_datacenter.py
27
13431
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks 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
eayunstack/horizon
openstack_dashboard/test/api_tests/lbaas_tests.py
25
16430
# Copyright 2013, Big Switch Networks, 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 applic...
apache-2.0
bhargav2408/python-for-android
python-modules/twisted/twisted/names/test/test_names.py
49
31329
# -*- test-case-name: twisted.names.test.test_names -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.names. """ import socket, operator, copy from twisted.trial import unittest from twisted.internet import reactor, defer, error from twisted.internet.de...
apache-2.0
Tigerwhit4/taiga-back
taiga/auth/backends.py
18
2934
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program 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 F...
agpl-3.0
The-Fonz/adventure-track
backend/adventures/db.py
1
6697
import sys import asyncio import asyncpg import unittest import datetime from os import environ import jsonschema from ..schemas import JSON_SCHEMA_LOCATION_GPS_POINT from ..utils import db_test_case_factory, record_to_dict, records_to_dict, convert_to_datetime, getLogger, MicroserviceDb, friendlyhash logger = getLo...
mit
tiagocoutinho/qarbon
qarbon/qt/designer/plugins/base.py
1
5728
# ---------------------------------------------------------------------------- # This file is part of qarbon (http://qarbon.rtfd.org/) # # Copyright (c) 2013 European Synchrotron Radiation Facility, Grenoble, France # # Distributed under the terms of the GNU Lesser General Public License, # either version 3 of the Lice...
lgpl-3.0
anuruddhal/jinja2
tests/test_ext.py
22
17823
# -*- coding: utf-8 -*- """ jinja2.testsuite.ext ~~~~~~~~~~~~~~~~~~~~ Tests for the extensions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import pytest from jinja2 import Environment, DictLoader, contextfunction, nodes from jinja2.exception...
bsd-3-clause
bud4/samba
source4/dsdb/tests/python/ldap_syntaxes.py
8
16098
#!/usr/bin/env python # -*- coding: utf-8 -*- # Tests for LDAP syntaxes import optparse import sys import time import random import uuid sys.path.insert(0, "bin/python") import samba from samba.tests.subunitrun import SubunitOptions, TestProgram import samba.getopt as options from samba.auth import system_session ...
gpl-3.0
raytung/Slice
Slice/helper.py
1
1240
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger def get_sorted_model(request, model): sort = request.GET.get('sort', None) obj = model if sort == "price_lth": obj = model.order_by('cost_per_unit') elif sort == "price_htl": obj = model.order_by('-cost_per_unit')...
mit
pompiduskus/scikit-learn
doc/tutorial/text_analytics/solutions/exercise_01_language_train_model.py
254
2253
"""Build a language detector model The goal of this exercise is to train a linear classifier on text features that represent sequences of up to 3 consecutive characters so as to be recognize natural languages by using the frequencies of short character sequences as 'fingerprints'. """ # Author: Olivier Grisel <olivie...
bsd-3-clause
django-silk/silk
project/tests/test_config_meta.py
2
1493
from django.test import TestCase from mock import NonCallableMock from silk.collector import DataCollector from silk.middleware import SilkyMiddleware from .util import delete_all_models from silk.config import SilkyConfig from silk.models import Request def fake_get_response(): def fake_response(): retu...
mit
GinnyN/towerofdimensions-django
django-social-auth/social_auth/utils.py
5
7928
import time import random import hashlib import urlparse import urllib from urllib2 import urlopen import logging from collections import defaultdict from datetime import timedelta, tzinfo from django.conf import settings from django.db.models import Model from django.contrib.contenttypes.models import ContentType fr...
bsd-3-clause
lmorchard/badger
apps/badges/views.py
1
17108
import hashlib from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse from django.http import HttpResponseForbidden from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django...
bsd-3-clause
gferreira/hTools2_extension
hTools2.roboFontExt/lib/hTools2/extras/equalize.py
1
4304
# -*- coding: utf-8 -*- # equalize.py # by Jens Kutilek # https://github.com/jenskutilek/Curve-Equalizer #----------------------- # EQMethods/geometry.py #----------------------- from math import atan2, cos, pi, sin, sqrt # helper functions def getTriangleArea(a, b, c): return (b.x - a.x) * (c.y - a.y) - (c.x...
bsd-3-clause
Novasoft-India/OperERP-AM-Motors
openerp/addons/web/session.py
54
6589
import datetime import babel import dateutil.relativedelta import logging import time import traceback import sys import xmlrpclib import openerp _logger = logging.getLogger(__name__) #---------------------------------------------------------- # OpenERPSession RPC openerp backend access #----------------------------...
agpl-3.0
dynasticorpheus/domoticz
plugins/examples/Denon4306.py
2
11823
# # Denon AVR 4306 Plugin # # Author: Dnpwwo, 2016 # # Plugin parameter definition below will be parsed during startup and copied into Manifest.xml, this will then drive the user interface in the Hardware web page # """ <plugin key="Denon4306" version="1.0.0" name="Denon 4306 Amplifier" author="dnpwwo...
gpl-3.0
kkspeed/emacs.d
site-lisp/Pymacs/contrib/rebox/Pymacs/rebox.py
10
40164
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright © 1991-1998, 2000, 2002, 2003 Progiciels Bourbeau-Pinard inc. # François Pinard <pinard@iro.umontreal.ca>, 1991-04. # 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 # t...
gpl-2.0
MyRookie/SentimentAnalyse
venv/lib/python2.7/site-packages/numpy/polynomial/_polybase.py
26
30184
""" Abstract base class for the various polynomial Classes. The ABCPolyBase class provides the methods needed to implement the common API for the various polynomial classes. It operates as a mixin, but uses the abc module from the stdlib, hence it is only available for Python >= 2.6. """ from __future__ import divisi...
mit
alu0100207385/dsi_3Django
build/lib.linux-i686-2.7/django/db/models/aggregates.py
114
2601
""" Classes to represent the definitions of aggregate functions. """ from django.db.models.constants import LOOKUP_SEP def refs_aggregate(lookup_parts, aggregates): """ A little helper method to check if the lookup_parts contains references to the given aggregates set. Because the LOOKUP_SEP is contained i...
bsd-3-clause
salilsub/tartarus
mlb/baseball/baseball/player_data.py
2
5944
from sqlalchemy import Column,Float,String,Date from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.hybrid import hybrid_property Base = declarative_base() class Batter(Base): __tablename__ = 'batter' player_id = Column(Float,primary_key=True) game_id = Column(String,primary_key=True) ...
mit
rossburton/yocto-autobuilder
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/words/test/test_xmpproutertap.py
40
2397
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.xmpproutertap}. """ from twisted.application import internet from twisted.trial import unittest from twisted.words import xmpproutertap as tap from twisted.words.protocols.jabber import component class XMPPRouterTap...
gpl-2.0
cmsdaq/hltd
lib/python-inotify-0.5/inotify/watcher.py
1
10565
# watcher.py - high-level interfaces to the Linux inotify subsystem # Copyright 2006 Bryan O'Sullivan <bos@serpentine.com> # This library is free software; you can redistribute it and/or modify # it under the terms of version 2.1 of the GNU Lesser General Public # License, incorporated herein by reference. '''High-l...
lgpl-3.0
teamfx/openjfx-9-dev-rt
modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/port/xvfbdriver.py
1
5142
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2014 Igalia S.L. # # 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,...
gpl-2.0
saturngod/pyWebTest-gitbook
book/js/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...
mit
fjacob21/pycon2015
elpiwear/proximity_warning.py
1
1278
import Edison.i2c as I2C import sharp2y0a21 import ads1015 import time import thread class proximity_warning: def __init__(self, sensorid, calibration, sensing_freq): self.sensing_freq = sensing_freq self.warning = [] adc = ads1015.ads1015(I2C.i2c(1,0x48)) adc.setchannel(sensorid, ...
mit
kouaw/CouchPotatoServer
libs/suds/xsd/sxbase.py
193
19777
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 hope that it will ...
gpl-3.0
hackerbot/DjangoDev
tests/gis_tests/geo3d/models.py
302
1294
from django.utils.encoding import python_2_unicode_compatible from ..models import models @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=30) objects = models.GeoManager() class Meta: abstract = True required_db_features = ['gis_enabled'] ...
bsd-3-clause
0111001101111010/cs595-f13
assignment5/Q2/q2.py
1
2515
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import requests from requests_oauthlib import OAuth1 from urlparse import parse_qs import json REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token" AUTHORIZE_URL = "https://api.twitter.com/oauth/authorize?oauth_token=" ACCESS_TOKEN_URL = "h...
mit
gnu-sandhi/sandhi
modules/gr36/gnuradio-core/src/python/gnuradio/gr/qa_vector_sink_source.py
18
2014
#!/usr/bin/env python # # Copyright 2008,2010 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 optio...
gpl-3.0
h0tw1r3/kernel_samsung_sghi717
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
blrm/openshift-tools
ansible/roles/lib_ops_utils/library/yum_repo_exclude.py
8
4559
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 ''' See Ansible Module Documentation (Below) ''' import re import iniparse DOCUMENTATION = ''' --- module: yum_repo_exclude short_description: manage packages on a YUM repo's exclude line description: - Add package names or patterns...
apache-2.0
angad/libjingle-mac
scons-2.2.0/build/lib/SCons/Tool/c++.py
14
3416
"""SCons.Tool.c++ Tool-specific initialization for generic Posix C++ compilers. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 20...
bsd-3-clause
cheekiatng/titanium_mobile
support/common/simplejson/tests/test_unicode.py
123
2327
from unittest import TestCase import simplejson as json class TestUnicode(TestCase): def test_encoding1(self): encoder = json.JSONEncoder(encoding='utf-8') u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}' s = u.encode('utf-8') ju = encoder.encode(u) js = en...
apache-2.0
hujiajie/chromium-crosswalk
testing/scripts/webkit_python_tests.py
57
1128
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os import sys import common def main_run(args): with common.temporary_file() as tempfile_path: rc = common...
bsd-3-clause
hustodemon/spacewalk
client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
2
10239
# import os import sys import config import socket import time import httplib import urllib2 import clientCaps import up2dateLog import up2dateErrors import up2dateUtils import up2dateAuth import urlparse import xmlrpclib from rhn import rpclib import gettext t = gettext.translation('rhn-client-tools', fallback=Tru...
gpl-2.0
benpetty/Code-Katas
katas/cafe_order_checker/test_cafe_order_checker.py
1
1249
import unittest from .cafe_order_checker import is_first_come_first_served class Test(unittest.TestCase): def test_both_registers_have_same_number_of_orders(self): result = is_first_come_first_served([1, 4, 5], [2, 3, 6], [1, 2, 3, 4, 5, 6]) self.assertTrue(result) def test_registers_have_di...
mit
danieljaouen/ansible
lib/ansible/modules/network/f5/bigip_selfip.py
8
23297
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 F5 Networks 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
bigswitch/nova
nova/tests/fixtures.py
1
23692
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
apache-2.0
dixon13/CBA_A3
tools/make.py
5
55615
#!/usr/bin/env python3 # vim: set fileencoding=utf-8 : # make.py # An Arma 3 addon build system ############################################################################### # The MIT License (MIT) # Copyright (c) 2013-2014 Ryan Schultz # Permission is hereby granted, free of charge, to any person obtaining a co...
gpl-2.0
marcosmodesto/django-testapp
django/core/management/commands/compilemessages.py
373
2824
import codecs import os import sys from optparse import make_option from django.core.management.base import BaseCommand, CommandError def has_bom(fn): f = open(fn, 'r') sample = f.read(4) return sample[:3] == '\xef\xbb\xbf' or \ sample.startswith(codecs.BOM_UTF16_LE) or \ sample.sta...
bsd-3-clause
betoesquivel/fil2014
filenv/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/dom.py
559
8469
from __future__ import absolute_import, division, unicode_literals from xml.dom import minidom, Node import weakref from . import _base from .. import constants from ..constants import namespaces from ..utils import moduleFactoryFactory def getDomBuilder(DomImplementation): Dom = DomImplementation class A...
mit
n9code/pyerarchy
tests/core/test_modulenode.py
1
1194
import os import shutil from unittest import TestCase from nose.tools import eq_, ok_ from pyerarchy.ex import BadValueError from pyerarchy.modulenode import ModuleNode, ThisModuleNode __author__ = 'bagrat' class ModuleNodeTest(TestCase): test_module_name = 'testmodule' module_dir = os.path.join(os.path.dirn...
mit
RDXT/django.js
djangojs/management/commands/js.py
3
3209
# -*- coding: utf-8 -*- ''' Main access point for all JS commands ''' import argparse import logging import sys from django.core.management.base import BaseCommand, handle_default_options try: from django.core.management.base import OutputWrapper except: pass from djangojs.management.commands.js_localize impo...
lgpl-3.0
maartenbreddels/vaex
packages/vaex-ui/vaex/ui/variables.py
1
14562
import sys import vaex import vaex.ui.qt as dialogs from vaex.ui.qt import * import logging from vaex.ui.icons import iconfile logger = logging.getLogger("vaex.ui.variables") class VariablesTableModel(QtCore.QAbstractTableModel): def __init__(self, dataset, parent=None, *args): """ :type dataset:...
mit
oniwan/GCI
sele_chrome.py
1
2504
# -*- coding: utf-8 -*- # import selenium from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ec import time from selenium.webdriver.support.ui import Select """ Usage: pyth...
mit
Sancus/bedrock
bedrock/utils/git.py
8
5281
# 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/. from __future__ import print_function, unicode_literals import os from hashlib import sha256 from shutil import rmtree f...
mpl-2.0
ZTH1970/alcide
scripts/check_double.py
1
4980
# -*- coding: utf-8 -*- import sys import alcide.settings import django.core.management from datetime import datetime import csv django.core.management.setup_environ(alcide.settings) from alcide.dossiers.models import PatientRecord from alcide.actes.models import Act from django.db import transaction @transaction.c...
agpl-3.0
ksh/gpitrainingv2
controllers/sites.py
4
49498
# Copyright 2012 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 ...
apache-2.0
fullprogramaciondev/portal
djangocali-portal/users/tests/test_views.py
367
1840
from django.test import RequestFactory from test_plus.test import TestCase from ..views import ( UserRedirectView, UserUpdateView ) class BaseUserTestCase(TestCase): def setUp(self): self.user = self.make_user() self.factory = RequestFactory() class TestUserRedirectView(BaseUserTestCa...
bsd-3-clause
bzennn/blog_flask
python/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py
360
2852
""" urllib3 - Thread-safe connection pooling and re-using. """ from __future__ import absolute_import import warnings from .connectionpool import ( HTTPConnectionPool, HTTPSConnectionPool, connection_from_url ) from . import exceptions from .filepost import encode_multipart_formdata from .poolmanager imp...
gpl-3.0
songfj/scrapy
scrapy/utils/trackref.py
120
2081
"""This module provides some functions and classes to record and report references to live object instances. If you want live objects for a particular class to be tracked, you only have to subclass from object_ref (instead of object). About performance: This library has a minimal performance impact when enabled, and ...
bsd-3-clause
Coelhon/MasterRepo.repository
plugin.video.RabbitMovies/resources/lib/indexers/navigator.py
2
14559
# -*- coding: utf-8 -*- ''' Specto 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 l...
gpl-2.0
stanta/darfchain
darfchain_docker_vagrant/tests/assets/test_digital_assets.py
3
2956
import pytest import random @pytest.mark.bdb @pytest.mark.usefixtures('inputs') def test_asset_transfer(b, user_pk, user_sk): from bigchaindb.models import Transaction tx_input = b.get_owned_ids(user_pk).pop() tx_create = b.get_transaction(tx_input.txid) tx_transfer = Transaction.transfer(tx_create....
gpl-3.0
cfobel/sconspiracy
Python/racy/plugins/graphlibext/__init__.py
1
2002
# -*- coding: UTF8 -*- # ***** BEGIN LICENSE BLOCK ***** # Sconspiracy - Copyright (C) IRCAD, 2004-2010. # Distributed under the terms of the BSD Licence as # published by the Open Source Initiative. # ****** END LICENSE BLOCK ****** import os import racy from racy import renv from generategraph import generate_...
bsd-3-clause
dapangmao/minitwit
lib/werkzeug/contrib/securecookie.py
318
12204
# -*- coding: utf-8 -*- r""" werkzeug.contrib.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a cookie that is not alterable from the client because it adds a checksum the server checks for. You can use it as session replacement if all you have is a user id or something to mark ...
apache-2.0
robocomp/robocomp-robolab
components/detection/test/emotionrecognitionclient/src/specificworker.py
1
1855
# # Copyright (C) 2018 by YOUR NAME HERE # # This file is part of RoboComp # # RoboComp is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any...
gpl-3.0
ropik/chromium
net/tools/testserver/testserver.py
6
78374
#!/usr/bin/env python # Copyright (c) 2012 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. """This is a simple HTTP/FTP/SYNC/TCP/UDP/ server used for testing Chrome. It supports several test URLs, as specified by the hand...
bsd-3-clause
S01780/python-social-auth
social/storage/sqlalchemy_orm.py
14
7117
"""SQLAlchemy models for Social Auth""" import base64 import six import json try: import transaction except ImportError: transaction = None from sqlalchemy import Column, Integer, String from sqlalchemy.exc import IntegrityError from sqlalchemy.types import PickleType, Text from sqlalchemy.schema import Uniqu...
bsd-3-clause
tboyce021/home-assistant
homeassistant/components/demo/humidifier.py
21
3456
"""Demo platform that offers a fake humidifier device.""" from homeassistant.components.humidifier import HumidifierEntity from homeassistant.components.humidifier.const import ( DEVICE_CLASS_DEHUMIDIFIER, DEVICE_CLASS_HUMIDIFIER, SUPPORT_MODES, ) SUPPORT_FLAGS = 0 async def async_setup_platform(hass, co...
apache-2.0
supergentle/migueltutorial
flask/lib/python2.7/site-packages/flask/testsuite/basic.py
406
43777
# -*- coding: utf-8 -*- """ flask.testsuite.basic ~~~~~~~~~~~~~~~~~~~~~ The basic functionality. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re import uuid import flask import pickle import unittest from datetime import datetime from threading i...
bsd-3-clause
wezhang/vim-setup
bundle/powerline/tools/colors_find.py
1
1599
#!/usr/bin/env python from __future__ import division, print_function import sys import os from colormath.color_objects import sRGBColor, LabColor from colormath.color_conversions import convert_color from colormath.color_diff import delta_e_cie2000 def get_lab(name, rgb): rgb = sRGBColor(int(rgb[:2], 16), int(rgb[2...
apache-2.0
Nick-OpusVL/odoo
openerp/addons/base/tests/test_basecase.py
379
3895
# -*- coding: utf-8 -*- import unittest2 from openerp.tests import common class test_single_transaction_case(common.SingleTransactionCase): """ Check the whole-class transaction behavior of SingleTransactionCase. """ def test_00(self): """Create a partner.""" cr, uid = self.cr, self.u...
agpl-3.0
vipmunot/Data-Science-Course
ML/Python/Decision Tree/decision tree.py
1
4104
# -*- coding: utf-8 -*- """ Created on Tue Oct 18 10:38:03 2016 @author: Vipul Munot """ tennis=[line.strip().split(',') for line in open('tennis.txt')] test_tennis=[line.strip().split(',') for line in open('test-tennis.txt')] data=[['slashdot','USA','yes',18,'None'], ['google','France','yes',23,'Premium'], ...
mit
AnotherIvan/calibre
src/chardet/sjisprober.py
190
3549
######################## 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...
gpl-3.0
adrianlee/rcon-cs
rconsoft/rcon/receiver.py
2
4212
# Read LICENSE for licensing details. """The Rcon receiver.""" import re import logging from twisted.internet.protocol import DatagramProtocol from rconsoft.dispatch.dispatcher import Signal from rconsoft.config import config log = logging.getLogger('general') log_detail = logging.getLogger('detail') ...
mit
SimonGreenhill/pyvolve
setup.py
1
1912
#!/usr/bin/env python ############################################################################## ## pyvolve: Python platform for simulating evolutionary sequences. ## ## Written by Stephanie J. Spielman (stephanie.spielman@gmail.com) ##############################################################################...
bsd-2-clause