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
jamesblunt/sympy
sympy/mpmath/functions/theta.py
51
37320
from .functions import defun, defun_wrapped @defun def _jacobi_theta2(ctx, z, q): extra1 = 10 extra2 = 20 # the loops below break when the fixed precision quantities # a and b go to zero; # right shifting small negative numbers by wp one obtains -1, not zero, # so the condition a**2 + b**2 > MI...
bsd-3-clause
FIWARE-TMForum/business-ecosystem-charging-backend
src/wstore/ordering/errors.py
1
1412
# -*- coding: utf-8 -*- # Copyright (c) 2015 - 2016 CoNWeT Lab., Universidad Politécnica de Madrid # This file belongs to the business-charging-backend # of the Business API Ecosystem. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License...
agpl-3.0
dantebarba/docker-media-server
plex/Sub-Zero.bundle/Contents/Libraries/Shared/js2py/pyjs.py
9
2904
from .base import * from .constructors.jsmath import Math from .constructors.jsdate import Date from .constructors.jsobject import Object from .constructors.jsfunction import Function from .constructors.jsstring import String from .constructors.jsnumber import Number from .constructors.jsboolean import Boolean from .co...
gpl-3.0
matbra/bokeh
examples/plotting/file/relative_paths.py
45
1085
# All of the other examples directly embed the Javascript and CSS code for # Bokeh's client-side runtime into the HTML. This leads to the HTML files # being rather large. An alternative is to ask Bokeh to produce HTML that # has a relative link to the Bokeh Javascript and CSS. This is easy to # do; you just pass in ...
bsd-3-clause
tonk/ansible
hacking/build-ansible.py
28
2609
#!/usr/bin/env python3 # coding: utf-8 # PYTHON_ARGCOMPLETE_OK # Copyright: (c) 2019, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type imp...
gpl-3.0
sankha93/servo
tests/wpt/web-platform-tests/conformance-checkers/tools/ins-del-datetime.py
141
8457
# -*- coding: utf-8 -*- import os ccdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) template = """<!DOCTYPE html> <meta charset=utf-8> """ errors = { "date-year-0000": "0000-12-09", "date-month-00": "2002-00-15", "date-month-13": "2002-13-15", "date-0005-02-29": "0005-02-29", "date...
mpl-2.0
maohongyuan/kbengine
kbe/res/scripts/common/Lib/importlib/util.py
106
7227
"""Utility code for constructing importers, etc.""" from ._bootstrap import MAGIC_NUMBER from ._bootstrap import cache_from_source from ._bootstrap import decode_source from ._bootstrap import source_from_cache from ._bootstrap import spec_from_loader from ._bootstrap import spec_from_file_location from ._bootstrap im...
lgpl-3.0
kasioumis/invenio
invenio/modules/indexer/utils.py
6
1504
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015 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, or (at your option) any...
gpl-2.0
lightbase/LBGeo
lbgeo/views/geo.py
1
2777
#!/usr/env python # -*- coding: utf-8 -*- __author__ = 'eduardo' import logging from ..model.estados import EstadoBase from ..model.cities import CitiesBase from .. import config log = logging.getLogger() class GeoController(object): """ Geo information controller """ def __init__(self, request): ...
gpl-2.0
dndtools/dndtools
dndtools/dnd/filters.py
1
15217
# -*- coding: utf-8 -*- import django_filters2 from dnd.models import ( Spell, DndEdition, SpellSchool, SpellSubSchool, SpellDescriptor, FeatCategory, CharacterClass, Rulebook, Domain, Feat, Skill, Item, Language, Race, RaceType, ItemSlot, ItemProperty, Deity, Rule) from dnd.filters_fields import FeatMulti...
mit
icgc-dcc/dcc-etl
dcc-etl-exporter/src/main/python/bulkloader.py
1
3424
#!/usr/bin/python # # Copyright (c) 2016 The Ontario Institute for Cancer Research. All rights reserved. # # This program and the accompanying materials are made available under the terms of the GNU Public License v3.0. # You should have received a copy of the GNU General Public License along with # this program. If no...
gpl-3.0
PureNexusProject/android_kernel_htc_flounder
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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, or (at your option) # any later version. # # This program i...
gpl-2.0
micropython/micropython
tests/wipy/os.py
14
2917
""" os module test for the CC3200 based boards """ from machine import SD import os mch = os.uname().machine if "LaunchPad" in mch: sd_pins = ("GP16", "GP17", "GP15") elif "WiPy" in mch: sd_pins = ("GP10", "GP11", "GP15") else: raise Exception("Board not supported!") sd = SD(pins=sd_pins) os.mount(sd, "...
mit
freedomofkeima/messenger-maid-chan
maidchan/cmds/scheduler_worker.py
1
12410
# -*- coding: utf-8 -*- import concurrent.futures import logging import re import sys import time from random import randint from maidchan.base import connect_redis, RedisDriver from maidchan.command import DEFAULT_NICKNAME from maidchan.config import ACCESS_TOKEN from maidchan.helper import send_text_message, send_im...
mit
yamahata/neutron
neutron/tests/unit/cisco/n1kv/test_n1kv_db.py
1
47254
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cisco Systems, 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...
apache-2.0
cl4rke/scikit-learn
sklearn/utils/random.py
234
10510
# Author: Hamzeh Alsalhi <ha258@cornell.edu> # # License: BSD 3 clause from __future__ import division import numpy as np import scipy.sparse as sp import operator import array from sklearn.utils import check_random_state from sklearn.utils.fixes import astype from ._random import sample_without_replacement __all__ =...
bsd-3-clause
ultrabug/mongo-python-driver
bson/binary.py
21
7009
# Copyright 2009-2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
jeffrimko/Qprompt
tests/menu_test_8.py
1
1337
"""Tests menu 'result' option return.""" ##==============================================================# ## SECTION: Imports # ##==============================================================# from testlib import * from qprompt import Menu ##============================...
mit
willemneal/Docky
bin/lib/werkzeug/script.py
318
11249
# -*- coding: utf-8 -*- r''' werkzeug.script ~~~~~~~~~~~~~~~ .. admonition:: Deprecated Functionality ``werkzeug.script`` is deprecated without replacement functionality. Python's command line support improved greatly with :mod:`argparse` and a bunch of alternative modules. Most ...
mit
sbrodehl/HashCode
Final Round/IO.py
1
3133
from collections import deque import numpy as np import os class Cell: Backbone, Void, Wall, Wireless, Router, ConnectedRouter, Cable = range(-2, 5) def read_dataset(fpath): with open(fpath, 'r') as reader: # size of grid H, W, R = [int(i) for i in reader.readline().split(" ")] # cos...
apache-2.0
zoho/books-python-wrappers
books/model/Preference.py
1
12396
#$Id$ from books.model.Term import Term from books.model.AddressFormat import AddressFormat class Preference: """This class is used to create object for preferences.""" def __init__(self): """Initialize parameters for Preferences object.""" self.convert_to_invoice = None self.attach_pd...
mit
ambujone/breath-hackathon
gae/lib/twilio/rest/resources/pricing/voice.py
35
4195
from .. import NextGenInstanceResource, NextGenListResource class Voice(object): """Holds references to the Voice pricing resources.""" name = "Voice" key = "voice" def __init__(self, base_uri, auth, timeout): self.uri = "%s/Voice" % base_uri self.countries = VoiceCountries(self.uri,...
mit
kafan15536900/ADfree-Player-Offline
onServer/ruletool/gen3.py
4
1648
''' Created on 2014-8-9 Modified on 2014-11-28 @author: Realz ''' import json import base64 import time import os import sys import ohostsite as t path = os.path.split(os.path.realpath(sys.argv[0]))[0] + os.path.sep def genrules(datalist): tmpdate = '' for line in datalist.readlines(): tmpdate = tmpda...
gpl-3.0
andris210296/andris-projeto
backend/venv/lib/python2.7/site-packages/unidecode/x0b9.py
253
4704
data = ( 'ruk', # 0x00 'rut', # 0x01 'rup', # 0x02 'ruh', # 0x03 'rweo', # 0x04 'rweog', # 0x05 'rweogg', # 0x06 'rweogs', # 0x07 'rweon', # 0x08 'rweonj', # 0x09 'rweonh', # 0x0a 'rweod', # 0x0b 'rweol', # 0x0c 'rweolg', # 0x0d 'rweolm', # 0x0e 'rweolb', # 0x0f 'rweols',...
mit
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.5.9/Python-3.5.9/Lib/inspect.py
2
114199
"""Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of the useful functions provided by this module:...
apache-2.0
Lab603/PicEncyclopedias
jni-build/jni-build/jni/include/tensorflow/python/platform/flags.py
5
4387
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mit
louyihua/edx-platform
openedx/core/djangoapps/content/course_overviews/signals.py
64
1227
""" Signal handler for invalidating cached course overviews """ from django.dispatch.dispatcher import receiver from .models import CourseOverview from xmodule.modulestore.django import SignalHandler @receiver(SignalHandler.course_published) def _listen_for_course_publish(sender, course_key, **kwargs): # pylint: di...
agpl-3.0
patrickm/chromium.src
third_party/tlslite/tlslite/integration/IntegrationHelper.py
121
1788
class IntegrationHelper: def __init__(self, username=None, password=None, sharedKey=None, certChain=None, privateKey=None, cryptoID=None, protocol=None, x509Fingerprint=None, x509TrustList=None, x509CommonName=None, settings = Non...
bsd-3-clause
alshedivat/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/bijectors/transform_diagonal_test.py
36
2185
# Copyright 2018 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
webgeodatavore/django
django/contrib/contenttypes/migrations/0001_initial.py
585
1227
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.contenttypes.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='ContentType', fields=...
bsd-3-clause
Gravecorp/Gap
Gap/Lib/pyclbr.py
182
13282
"""Parse a Python module and describe its classes and methods. Parse enough of a Python file to recognize imports and class and method definitions, and to find out the superclasses of a class. The interface consists of a single function: readmodule_ex(module [, path]) where module is the name of a Python modu...
mpl-2.0
browseinfo/odoo_saas3_nicolas
addons/account/project/report/cost_ledger.py
4
5317
# -*- 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
scotthartbti/android_external_chromium_org
build/ios/clean_env.py
208
2258
#!/usr/bin/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. import os import sys def Main(argv): """This is like 'env -i', but it uses a whitelist of env variables to allow through to the co...
bsd-3-clause
fastinetserver/portage-idfetch
pym/_emerge/PollSelectAdapter.py
2
1914
# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from _emerge.PollConstants import PollConstants import select class PollSelectAdapter(PollConstants): """ Use select to emulate a poll object, for systems that don't support poll(). """ def __init__(self):...
gpl-2.0
matehall/Python-koan
python 3/koans/about_generators.py
3
4604
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Written in place of AboutBlocks in the Ruby Koans # # Note: Both blocks and generators use a yield keyword, but they behave # a lot differently # from runner.koan import * class AboutGenerators(Koan): def test_generating_values_on_the_fly(self): ...
mit
barseghyanartur/django-haystack
test_haystack/elasticsearch_tests/__init__.py
5
1090
# encoding: utf-8 import unittest import warnings from django.conf import settings from haystack.utils import log as logging warnings.simplefilter('ignore', Warning) def setup(): log = logging.getLogger('haystack') try: import elasticsearch if not ((1, 0, 0) <= elasticsearch.__version__ < (...
bsd-3-clause
40223236/2015cd_midterm_1
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/__init__.py
603
6082
## pygame - Python Game Library ## Copyright (C) 2000-2001 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (...
gpl-3.0
RevelSystems/django
tests/utils_tests/test_datetime_safe.py
207
2371
import unittest from datetime import ( date as original_date, datetime as original_datetime, time as original_time, ) from django.utils.datetime_safe import date, datetime, time class DatetimeTests(unittest.TestCase): def setUp(self): self.just_safe = (1900, 1, 1) self.just_unsafe = (189...
bsd-3-clause
tchernomax/ansible
test/units/module_utils/basic/test_heuristic_log_sanitize.py
53
3735
# -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (a...
gpl-3.0
elventear/ansible
lib/ansible/plugins/lookup/inventory_hostnames.py
117
1942
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Steven Dossett <sdossett@panath.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versio...
gpl-3.0
bolkedebruin/airflow
tests/providers/google/cloud/hooks/test_kms.py
1
5198
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
bendemott/Python-Shapely-Examples
presentation/shapely_bool_ops.py
1
1275
''' @author Ben DeMott @file shapely_bool_ops.py Shapely Boolean Operations are methods associated with a geometric object that return True/False ''' from shapely.geometry import * import sys point1 = Point((1, 1)) # See if another point is almost equal to our point... # The second argument determines variance in ...
mit
sk-unikent/docker-moodle
shared/simplesamlphp/vendor/guzzle/guzzle/docs/conf.py
469
3047
import sys, os from sphinx.highlighting import lexers from pygments.lexers.web import PhpLexer lexers['php'] = PhpLexer(startinline=True, linenos=1) lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) primary_domain = 'php' # -- General configuration -----------------------------------------------------...
mit
gauribhoite/personfinder
env/google_appengine/google/appengine/_internal/django/core/management/commands/inspectdb.py
23
7608
import keyword from optparse import make_option from google.appengine._internal.django.core.management.base import NoArgsCommand, CommandError from google.appengine._internal.django.db import connections, DEFAULT_DB_ALIAS class Command(NoArgsCommand): help = "Introspects the database tables in the given database ...
apache-2.0
joequant/zipline
tests/test_algorithm_gen.py
18
7339
# # Copyright 2014 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
infinitespace/deepdive
examples/spouse_example/postgres/json_extractor/udf/ext_people.py
15
2018
#! /usr/bin/env python # File: udf/ext_people.py # Sample input data (piped into STDIN): ''' {"sentence_id":"118238@10","words":["Sen.","Barack","Obama","and","his","wife",",","Michelle","Obama",",","have","released","eight","years","of","joint","returns","."],"ner_tags":["O","PERSON","PERSON","O","O","O","O","PERSON"...
apache-2.0
googleapis/google-auth-library-python
google/auth/transport/__init__.py
7
3438
# Copyright 2016 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
Jgarcia-IAS/SAT
openerp/addons/product/tests/test_pricelist.py
280
6748
from openerp.tests.common import TransactionCase class TestPricelist(TransactionCase): """Tests for unit of measure conversion""" def setUp(self): super(TestPricelist, self).setUp() cr, uid, context = self.cr, self.uid, {} self.ir_model_data = self.registry('ir.model.data') sel...
agpl-3.0
moio/spacewalk
client/solaris/smartpm/smart/channels/solaris_dir.py
4
2080
# # Copyright (c) 2005 Red Hat, Inc. # # Written by Joel Martin <jmartin@redhat.com> # # This file is part of Smart Package Manager. # # Smart Package Manager 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; ei...
gpl-2.0
simone-campagna/invoice
tests/unittests/test_invoice_program_upgrade.py
1
3269
# -*- coding: utf-8 -*- # # Copyright 2015 Simone Campagna # # 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
jgoclawski/django
tests/invalid_models_tests/test_backend_specific.py
191
1024
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.core.checks import Error from django.db import connections, models from django.test import mock from .base import IsolatedModelsTestCase def dummy_allow_migrate(db, app_label, **hints): # Prevent checks from being run on the 'other' d...
bsd-3-clause
osborne6/luminotes
controller/Schema_upgrader.py
1
6034
import os.path from model.Persistent import Persistent class Schema_upgrader: def __init__( self, database, glob = None, read_file = None ): """ Create a new schema upgrader and return it. @type database: Database @param database: the database to use for all schema upgrades @type glob: function...
gpl-3.0
loco-odoo/localizacion_co
openerp/addons/l10n_ar/__openerp__.py
260
1695
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
agpl-3.0
rcarrillocruz/ansible
lib/ansible/module_utils/univention_umc.py
62
8734
# -*- coding: UTF-8 -*- # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own lic...
gpl-3.0
nhomar/odoo-mirror
addons/mrp/stock.py
15
18653
# -*- 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
sodo13/openpli-gls
lib/python/Plugins/Extensions/MediaPlayer/settings.py
28
5037
from Screens.Screen import Screen from Screens.HelpMenu import HelpableScreen from Components.FileList import FileList from Components.Sources.StaticText import StaticText from Components.MediaPlayer import PlayList from Components.config import config, getConfigListEntry, ConfigSubsection, configfile, ConfigText, Conf...
gpl-2.0
reetawwsum/Supervised-Learning
not_mnist_deep_ann.py
1
4001
import numpy as np import tensorflow as tf from six.moves import cPickle as pickle image_size = 28 num_labels = 10 batch_size = 128 hidden1 = 1024 learning_rate = 0.5 num_steps = 3001 def reformat(dataset, labels): dataset = np.reshape(dataset, (-1, image_size * image_size)).astype(np.float32) labels = (labels[:, N...
mit
Fxrh/tispa-wm
libqtile/layout/stack.py
1
11746
# Copyright (c) 2008, Aldo Cortesi. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify,...
gpl-3.0
fengjiang96/tushare
tushare/datayes/common/vars.py
1
68207
# -*- coding:utf-8 -*- import sys PY3 = (sys.version_info[0] >= 3) HTTP_OK = 200 HTTP_AUTHORIZATION_ERROR = 401 HTTP_URL = 'api.wmcloud.com' HTTP_PORT = 443 BOND = '/api/bond/getBond.csv?secID=%s&ticker=%s&field=%s' BONDCF = '/api/bond/getBondCf.csv?secID=%s&ticker=%s&beginDate=%s&cashTypeCD=%s&endDate=%s&field=%s' BO...
bsd-3-clause
Dandandan/wikiprogramming
jsrepl/build/extern/python/unclosured/lib/python2.7/formatter.py
252
14911
"""Generic output formatting. Formatter objects transform an abstract flow of formatting events into specific output events on writer objects. Formatters manage several stack structures to allow various properties of a writer object to be changed and restored; writers need not be able to handle relative changes nor an...
mit
areitz/pants
src/python/pants/option/ranked_value.py
9
3134
# 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 copy class ...
apache-2.0
rralcala/random-scripts
py/lc/1/621.py
1
1307
from collections import Counter import heapq import unittest """https://leetcode.com/problems/task-scheduler""" class Solution: def leastInterval(self, tasks, n): """ :type tasks: List[str] :type n: int :rtype: int """ n += 1 time = 0 cnt = Counter(...
gpl-2.0
azumimuo/family-xbmc-addon
plugin.video.specto/resources/lib/libraries/f4mproxy/interalSimpleDownloader.py
55
10954
import xml.etree.ElementTree as etree import base64 from struct import unpack, pack import sys import io import os import time import itertools import xbmcaddon import xbmc import urllib2,urllib import traceback import urlparse import posixpath import re import socket from flvlib import tags from flvlib import helper...
gpl-2.0
ds-hwang/chromium-crosswalk
content/test/gpu/gpu_tests/gpu_process.py
3
1810
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_tests import gpu_process_expectations as expectations from gpu_tests import gpu_test_base import page_sets from telemetry.page import page_test tes...
bsd-3-clause
MetSystem/PTVS
Python/Samples/PollsDjango/app/tests.py
3
1079
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". """ import django from django.test import TestCase # TODO: Configure your database in settings.py and sync before running tests. class ViewTest(TestCase): """Tests for the application vie...
apache-2.0
SickGear/SickGear
lib/hachoir_py3/field/string_field.py
2
15095
""" String field classes: - String: Fixed length string (no prefix/no suffix) ; - CString: String which ends with nul byte ("\0") ; - UnixLine: Unix line of text, string which ends with "\n" ; - PascalString8, PascalString16, PascalString32: String prefixed with length written in a 8, 16, 32-bit integer (use parent e...
gpl-3.0
samdcbu/nxt-python
nxt/sensor/analog.py
21
1639
# nxt.sensor.analog module -- submodule for use with analog sensors # Copyright (C) 2006,2007 Douglas P Lau # Copyright (C) 2009 Marcus Wanner, Paulo Vieira, rhn # # 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 S...
gpl-3.0
dariusbakunas/rawdisk
rawdisk/session.py
1
4761
# -*- coding: utf-8 -*- import rawdisk.scheme import logging from rawdisk.filesystems.detector import FilesystemDetector from rawdisk.filesystems.unknown_volume import UnknownVolume from rawdisk.plugins.plugin_manager import PluginManager from rawdisk.scheme.mbr import SECTOR_SIZE from rawdisk.scheme.common import Par...
bsd-3-clause
TNT-Samuel/Coding-Projects
DNS Server/Source - Copy/Lib/idlelib/config_key.py
3
13351
""" Dialog for building Tkinter accelerator key bindings """ from tkinter import * from tkinter.ttk import Scrollbar from tkinter import messagebox import string import sys class GetKeysDialog(Toplevel): # Dialog title for invalid key sequence keyerror_title = 'Key Sequence Error' def __init__(self, par...
gpl-3.0
xujb/odoo
addons/purchase_analytic_plans/__init__.py
441
1220
# -*- 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
tactcomplabs/gc64-hmcsim
test/sst/7.1.0/goblin_singlestream2.py
3
2131
import sst # Define SST core options sst.setProgramOption("timebase", "1ps") sst.setProgramOption("stopAtCycle", "0 ns") # Define the simulation components comp_cpu = sst.Component("cpu", "miranda.BaseCPU") comp_cpu.addParams({ "verbose" : 0, "generator" : "miranda.SingleStreamGenerator", "generatorParams.verbose"...
bsd-2-clause
sestrella/ansible
test/lib/ansible_test/_internal/cli.py
8
33638
"""Test runner for all Ansible tests.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import errno import os import sys # This import should occur as early as possible. # It must occur before subprocess has been imported anywhere in the current process. from .init import ( ...
gpl-3.0
mobify/python-driver
tests/integration/cqlengine/query/test_batch_query.py
7
6507
# Copyright 2015 DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
mobify/python-driver
tests/integration/standard/test_udts.py
6
25672
# Copyright 2013-2015 DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
apache-2.0
stevenewey/django
django/core/management/commands/migrate.py
21
13985
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time import warnings from collections import OrderedDict from importlib import import_module from django.apps import apps from django.core.management import call_command from django.core.management.base import BaseCommand, CommandError from django...
bsd-3-clause
klemvor/wesnoth
utils/pofix.py
15
9455
#!/usr/bin/env python # -*- coding: utf-8 -*- # pofix - perform string fixups on incoming .po files. # # The purpose of this script is to save translators from having to # apply various string fixes needed before stable release by hand. It is # intended to be run on each incoming .po file as the Lord of # Translation...
gpl-2.0
monetario/core
monetario/views/api/v1/tests/test_apps.py
1
12795
import json from flask import url_for from monetario.app import db from monetario.views.api.v1.tests.fixtures import UserFactory from monetario.views.api.v1.tests.fixtures import AppFactory from monetario.tests import BaseTestCase class AppsTest(BaseTestCase): def setUp(self): super().setUp() ...
bsd-3-clause
fossoult/odoo
addons/l10n_do/__openerp__.py
309
2992
# -*- coding: utf-8 -*- # ############################################################################# # # First author: Jose Ernesto Mendez <tecnologia@obsdr.com> (Open Business Solutions SRL.) # Copyright (c) 2012 -TODAY Open Business Solutions, SRL. (http://obsdr.com). All rights reserved. # # This is a fork to upg...
agpl-3.0
bogdan-kulynych/textfool
model.py
1
2077
import spacy import keras import numpy as np from keras.models import Sequential from keras.layers import Dense, Dropout, Activation from keras.layers import Flatten, Conv1D, MaxPooling1D, GlobalAveragePooling1D from keras.layers.embeddings import Embedding from keras.constraints import maxnorm from keras.regularizers...
mit
genomoncology/related
src/related/fields.py
1
13235
# -*- coding: utf-8 -*- from decimal import Decimal from future.moves.urllib.parse import ParseResult from attr import attrib, NOTHING from collections import OrderedDict from uuid import uuid4, UUID from datetime import date, datetime, time from six import string_types from . import _init_fields, types, converters, v...
mit
palmerjh/iEBE
EBE-Node/iSS/for_paraview/lib/ColorScalars.py
9
1993
#!/usr/bin/env python """ ColorScalars """ """ Copyright 2001 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the LGPL. See http://www.fsf.org NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $R...
gpl-3.0
cfangmeier/Second-Impressions
main.py
1
7612
#!/usr/bin/env python import os from flask import (url_for, render_template, redirect, flash, session, request) from flask_wtf import FlaskForm from wtforms import StringField, TextAreaField from wtforms.validators import DataRequired from app import app, db from app.models import Adjative, Person...
mit
ttfseiko/openerp-trunk
openerp/addons/audittrail/wizard/audittrail_view_log.py
3
2691
# -*- 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
goFrendiAsgard/kokoropy
kokoropy/packages/alembic/migration.py
12
12331
import io import logging import sys from sqlalchemy import MetaData, Table, Column, String, literal_column from sqlalchemy import create_engine from sqlalchemy.engine import url as sqla_url from .compat import callable, EncodedIO from . import ddl, util log = logging.getLogger(__name__) class MigrationContext(objec...
mit
andela-ifageyinbo/django
tests/generic_views/test_edit.py
51
18099
from __future__ import unicode_literals from django import forms from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.test import SimpleTestCase, TestCase, override_settings from django.test.client import RequestFactory from django.views.generic.base import V...
bsd-3-clause
rrrrrr8/vnpy
vnpy/trader/uiMainWindow.py
4
13767
# encoding: UTF-8 import psutil import traceback from vnpy.trader.vtFunction import loadIconPath from vnpy.trader.vtGlobal import globalSetting from vnpy.trader.uiBasicWidget import * ######################################################################## class MainWindow(QtWidgets.QMainWindow): """主窗口""" ...
mit
tedder/ansible
test/units/modules/network/nso/test_nso_verify.py
28
5415
# # Copyright (c) 2017 Cisco and/or its affiliates. # # 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...
gpl-3.0
jbalogh/zamboni
lib/admin_log.py
1
2968
""" This is from Django utils/log.py 3fe4e7a2~1. """ import logging import sys from django.core import mail # Make sure a NullHandler is available # This was added in Python 2.7/3.2 try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): def emit(self, record): ...
bsd-3-clause
haad/ansible-modules-core
utilities/helper/_accelerate.py
23
27531
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, James Cammarata <jcammarata@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of ...
gpl-3.0
x111ong/odoo
openerp/report/render/rml2txt/utils.py
443
4710
# -*- 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...
agpl-3.0
ahamilton55/ansible
lib/ansible/module_utils/facts/system/pkg_mgr.py
46
3045
# Collect facts related to the system package manager # # 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 lat...
gpl-3.0
MycChiu/tensorflow
tensorflow/contrib/framework/python/framework/__init__.py
75
1419
# 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
sam-m888/gramps
gramps/gui/editors/edittaglist.py
1
4644
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Nick Hall # # 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, or # (at your option)...
gpl-2.0
saurabh6790/pow-app
accounts/report/accounts_payable/accounts_payable.py
18
5835
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import getdate, nowdate, flt, cstr from webnotes import msgprint, _ from accounts.report.accounts_receivable.acco...
agpl-3.0
miguelfervi/SSBW-Restaurantes
restaurantes/lib/python2.7/site-packages/pymongo/thread_util.py
43
3959
# Copyright 2012-2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
gpl-3.0
ilya-epifanov/ansible-modules-core
cloud/digital_ocean/digital_ocean_sshkey.py
133
5134
#!/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
alishakiba/python-telegram-bot
tests/test_bot.py
6
6128
#!/usr/bin/env python # encoding: utf-8 import os import telegram import unittest class BotTest(unittest.TestCase): def setUp(self): bot = telegram.Bot(token=os.environ.get('TOKEN'), debug=True) self._bot = bot print('Testing the Bot API class') def testGetMe(self): '''Test th...
gpl-2.0
pilou-/ansible
test/units/modules/network/cnos/test_cnos_l3_interface.py
15
2845
# # (c) 2018 Lenovo. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distri...
gpl-3.0
pavelchristof/gomoku-ai
tensorflow/python/training/gradient_descent_test.py
81
11045
# 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
revmischa/boto
boto/sqs/jsonmessage.py
153
1755
# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
mit