repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
anki1909/peach
peach/fuzzy/cmeans.py
6
8245
################################################################################ # Peach - Computational Intelligence for Python # Jose Alexandre Nalon # # This file: fuzzy/cmeans.py # Fuzzy C-Means algorithm ################################################################################ # Doc string, reStructuredTex...
lgpl-2.1
ettm2012/MissionPlanner
Lib/site-packages/scipy/integrate/tests/test_quadrature.py
57
3469
import numpy from numpy import cos, sin, pi from numpy.testing import TestCase, run_module_suite, assert_equal, \ assert_almost_equal, assert_allclose from scipy.integrate import quadrature, romberg, romb, newton_cotes class TestQuadrature(TestCase): def quad(self, x, a, b, args): raise NotImplemented...
gpl-3.0
pjg101/SickRage
lib/chardet/big5freq.py
342
31254
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-3.0
nils-tekampe/duplicity
duplicity/collections.py
1
46283
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2002 Ben Escoto <ben@emerose.org> # Copyright 2007 Kenneth Loafman <kenneth@loafman.com> # # This file is part of duplicity. # # Duplicity is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License...
gpl-2.0
peterfpeterson/mantid
scripts/Calibration/tube_calib_fit_params.py
3
2897
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + cl...
gpl-3.0
apanju/GMIO_Odoo
openerp/tests/common.py
39
13964
# -*- coding: utf-8 -*- """ The module :mod:`openerp.tests.common` provides unittest2 test cases and a few helpers and classes to write tests. """ import errno import glob import json import logging import os import select import subprocess import threading import time import itertools import unittest2 import urllib2 ...
agpl-3.0
centrofermi/e3pipe
mc/E3TelescopeBase.py
1
7976
#!/usr/bin/env python # ********************************************************************* # * Copyright (C) 2014 Luca Baldini (luca.baldini@pi.infn.it) * # * * # * For the license terms see the file LICENSE, distributed * # * along ...
gpl-3.0
yfried/ansible
lib/ansible/modules/storage/netapp/netapp_e_flashcache.py
16
15757
#!/usr/bin/python # (c) 2016, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
Soya93/Extract-Refactoring
python/lib/Lib/site-packages/django/contrib/localflavor/ca/ca_provinces.py
199
1397
""" An alphabetical list of provinces and territories for use as `choices` in a formfield., and a mapping of province misspellings/abbreviations to normalized abbreviations Source: http://www.canada.gc.ca/othergov/prov_e.html This exists in this standalone file so that it's only imported into memory when explici...
apache-2.0
github-account-because-they-want-it/django
django/core/management/commands/inspectdb.py
100
11994
from __future__ import unicode_literals import keyword import re from collections import OrderedDict from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, connections class Command(BaseCommand): help = "Introspects the database tables in the given database and...
bsd-3-clause
forge33/CouchPotatoServer
couchpotato/core/media/_base/media/index.py
73
6107
from string import ascii_letters from hashlib import md5 from CodernityDB.tree_index import MultiTreeBasedIndex, TreeBasedIndex from couchpotato.core.helpers.encoding import toUnicode, simplifyString class MediaIndex(MultiTreeBasedIndex): _version = 3 custom_header = """from CodernityDB.tree_index import Mu...
gpl-3.0
sebbrandt87/jenkins-job-builder
jenkins_jobs/modules/project_matrix.py
17
6317
# Copyright 2012 Julian Taylor <jtaylor.debian@googlemail.com> # # 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
Aminakh/or-tools
examples/python/kenken2.py
34
4935
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # 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
teeple/pns_server
work/install/Python-2.7.4/Lib/encodings/cp860.py
593
34937
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP860.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
gpl-2.0
J4LP/hr2
j4hr/utils.py
1
1914
# -*- coding: utf-8 -*- '''Helper utilities and decorators.''' from flask import session, flash, redirect, url_for, Response, request from flask.ext.login import current_user from functools import wraps def flash_errors(form): '''Flash all errors for a form.''' for field, errors in form.errors.items(): ...
mit
vitorio/bite-project
deps/gdata-python-client/src/gdata/codesearch/__init__.py
274
4934
# -*- coding: utf-8 -*- # # Copyright (c) 2007 Benoit Chesneau <benoitc@metavers.net> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS...
apache-2.0
damdam-s/e-commerce
sale_payment_method/sale.py
16
9551
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier, Sébastien Beau # Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com> # Copyright 2013 Camptocamp SA (Guewen Baconnier) # # This program is free software: ...
agpl-3.0
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/django-1.3/django/db/models/expressions.py
229
4992
import datetime from django.utils import tree from django.utils.copycompat import deepcopy class ExpressionNode(tree.Node): """ Base class for all query expressions. """ # Arithmetic connectors ADD = '+' SUB = '-' MUL = '*' DIV = '/' MOD = '%%' # This is a quoted % operator - it i...
mit
damonkohler/sl4a
python/src/Lib/test/test_sets.py
56
27873
#!/usr/bin/env python import warnings warnings.filterwarnings("ignore", "the sets module is deprecated", DeprecationWarning, "test\.test_sets") import unittest, operator, copy, pickle, random from sets import Set, ImmutableSet from test import test_support empty_set = Set() #================...
apache-2.0
Dhivyap/ansible
lib/ansible/modules/network/fortios/fortios_system_ddns.py
13
14913
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
maccaspacca/BismuthToolsWeb
bisurl.py
3
1782
import hashlib, base64 def checksum(string): #return base64.urlsafe_b85encode(string.encode("utf-8")).decode("utf-8")[:8] m = hashlib.md5() m.update(string.encode("utf-8")) return base64.b85encode(m.digest()).decode("utf-8") def create_url(app_log, command, recipient, amount, operation, openfield): ...
gpl-3.0
boooka/GeoPowerOff
venv/lib/python2.7/site-packages/django/db/models/sql/datastructures.py
71
2522
""" Useful auxiliary data structures for query construction. Not useful outside the SQL domain. """ class Col(object): def __init__(self, alias, target, source): self.alias, self.target, self.source = alias, target, source def as_sql(self, qn, connection): return "%s.%s" % (qn(self.alias), qn...
apache-2.0
coletivoEITA/noosfero
public/javascripts/strophejs-1.1.3/examples/attach/boshclient.py
38
5302
import sys, os import httplib, urllib import random, binascii from urlparse import urlparse from punjab.httpb import HttpbParse from twisted.words.xish import domish from twisted.words.protocols.jabber import jid TLS_XMLNS = 'urn:ietf:params:xml:ns:xmpp-tls' SASL_XMLNS = 'urn:ietf:params:xml:ns:xmpp-sasl' BIND_XMLNS...
agpl-3.0
suhussai/youtube-dl
devscripts/check-porn.py
138
1925
#!/usr/bin/env python from __future__ import unicode_literals """ This script employs a VERY basic heuristic ('porn' in webpage.lower()) to check if we are not 'age_limit' tagging some porn site A second approach implemented relies on a list of porn domains, to activate it pass the list filename as the only argument ...
unlicense
JimCircadian/ansible
test/units/executor/module_common/test_recursive_finder.py
85
5823
# (c) 2017, 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 # (at your option) any later...
gpl-3.0
jiumx60rus/grishyGhost
node_modules/nodegit/node_modules/pangyp/gyp/PRESUBMIT.py
88
3685
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
mit
ankanaan/chimera
src/chimera/core/config.py
1
13818
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # chimera - observatory automation system # Copyright (C) 2006-2007 P. Henrique Silva <henrique@astro.ufsc.br> # 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-2.0
Huyuwei/tvm
python/tvm/schedule.py
2
20831
# 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
hlzz/dotfiles
graphics/VTK-7.0.0/Examples/Infovis/Python/circular_vertices.py
2
1383
#!/usr/bin/env python """ This file demonstrates drawing graphs using circular vertices via vtkRenderedGraphRepresentation. """ from vtk import * #------------------------------------------------------------------------------ # Script Entry Point #--------------------------------------------------------------...
bsd-3-clause
2uller/LotF
App/Lib/distutils/tests/test_dist.py
4
16153
# -*- coding: utf8 -*- """Tests for distutils.dist.""" import os import StringIO import sys import unittest import warnings import textwrap from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command import distutils.dist from test.test_support import TESTFN, captured_stdo...
gpl-2.0
tillahoffmann/tensorflow
tensorflow/contrib/tensor_forest/hybrid/python/hybrid_model.py
138
4774
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
vmarkovtsev/django
tests/utils_tests/test_safestring.py
278
3677
from __future__ import unicode_literals from django.template import Context, Template from django.test import SimpleTestCase from django.utils import html, six, text from django.utils.encoding import force_bytes, force_text from django.utils.functional import lazy from django.utils.safestring import ( EscapeData, ...
bsd-3-clause
JimCircadian/ansible
lib/ansible/module_utils/network/exos/exos.py
57
3764
# 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 license # to the complete wo...
gpl-3.0
faywong/FFPlayer
project/jni/python/src/Lib/test/test_defaultdict.py
51
5532
"""Unit tests for collections.defaultdict.""" import os import copy import tempfile import unittest from test import test_support from collections import defaultdict def foobar(): return list class TestDefaultDict(unittest.TestCase): def test_basic(self): d1 = defaultdict() self.assertEqual...
lgpl-2.1
jjack15/CS402-Project-UTK
OnlinePythonTutor/v1-v2/cgi-bin/pg_logger.py
1
10968
# Online Python Tutor # https://github.com/pgbovine/OnlinePythonTutor/ # # Copyright (C) 2010-2012 Philip J. Guo (philip@pgbovine.net) # # 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...
agpl-3.0
heeraj123/oh-mainline
mysite/profile/migrations/0031_remove_dead_things.py
17
7035
# This file is part of OpenHatch. # Copyright (C) 2009 OpenHatch, Inc. # # 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 Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
agpl-3.0
alivecor/tensorflow
tensorflow/contrib/learn/python/learn/datasets/load_csv_test.py
137
1348
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
purpleidea/macaronic-net
django/core/management/commands/makemessages.py
154
16507
import fnmatch import glob import os import re import sys from itertools import dropwhile from optparse import make_option from subprocess import PIPE, Popen from django.core.management.base import CommandError, NoArgsCommand from django.utils.text import get_text_list pythonize_re = re.compile(r'(?:^|\n)\s*//') plur...
agpl-3.0
BeeeOn/server
t/xmlui/t2003-myprofile.py
1
2181
#! /usr/bin/env python3 import config config.import_libs() import unittest from xmlui import Connector, Response, Login, Logout from xmlui import GetMyProfile class TestGetMyProfile(unittest.TestCase): """ Create 2 sessions for 2 different users. """ def setUp(self): c = Connector(config.xmlui_host, config.xm...
bsd-3-clause
WorldViews/Spirals
scripts/TwitterWatcherPeace.py
1
2822
from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener import os, urllib2, json import ImageResizer #IMAGE_DIR = "C:/kimber/WorldViews/twitter_images" IMAGE_DIR = "../images/twitter_images" CONFIG_PATH = "C:/kimber/WorldViews/twitter_auth_config.py" """ You can get authen...
mit
sda2b/youtube-dl
youtube_dl/extractor/syfy.py
159
1827
from __future__ import unicode_literals import re from .common import InfoExtractor class SyfyIE(InfoExtractor): _VALID_URL = r'https?://www\.syfy\.com/(?:videos/.+?vid:(?P<id>[0-9]+)|(?!videos)(?P<video_name>[^/]+)(?:$|[?#]))' _TESTS = [{ 'url': 'http://www.syfy.com/videos/Robot%20Combat%20League/...
unlicense
christianblunden/googmuze
resources/lib/google/protobuf/compiler/plugin_pb2.py
24
6750
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/compiler/plugin.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import descriptor_pb2 # @@protoc_in...
gpl-3.0
tmerrick1/spack
var/spack/repos/builtin/packages/minighost/package.py
5
3454
############################################################################## # 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
huggingface/pytorch-transformers
utils/check_tf_ops.py
2
3574
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # 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
byterom/android_external_chromium_org
chrome/common/extensions/docs/server2/whats_new_data_source.py
41
3499
# 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 itertools import groupby from operator import itemgetter import posixpath from data_source import DataSource from extensions_paths import JSON_TEMPLATE...
bsd-3-clause
xiaotangyuan/django-rest-framework
tests/test_filters.py
38
30783
from __future__ import unicode_literals import datetime from decimal import Decimal from django.conf.urls import url from django.core.urlresolvers import reverse from django.db import models from django.test import TestCase from django.test.utils import override_settings from django.utils import unittest from django....
bsd-2-clause
terbolous/SickRage
lib/github/RepositoryKey.py
72
5483
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
apanju/GMIO_Odoo
addons/website_event/tests/__init__.py
413
1072
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 20123TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
vmax-feihu/hue
desktop/core/ext-py/Pygments-1.3.1/pygments/styles/vim.py
75
1976
# -*- coding: utf-8 -*- """ pygments.styles.vim ~~~~~~~~~~~~~~~~~~~ A highlighting style for Pygments, inspired by vim. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keywor...
apache-2.0
uclouvain/OSIS-Louvain
attribution/models/attribution_new.py
1
4493
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
KylinUI/android_kernel_samsung_hlte
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
wijjo/cmdo
cmdo/publish_text.py
1
22377
#=============================================================================== #=============================================================================== # publish_text - text documentation generator for Cmdo # # Text publisher (simplistic) # # Note: You will probably get better results by publishing as HTML an...
gpl-2.0
thodoris/djangoPharma
djangoPharma/env/Lib/site-packages/debug_toolbar/panels/sql/utils.py
11
1987
from __future__ import absolute_import, unicode_literals import re import sqlparse from django.utils.html import escape from sqlparse import tokens as T class BoldKeywordFilter: """sqlparse filter to bold SQL keywords""" def process(self, stream): """Process the token stream""" for token_typ...
apache-2.0
j5shi/Thruster
pylibs/json/tests/test_encode_basestring_ascii.py
17
2045
from collections import OrderedDict from json.tests import PyTest, CTest CASES = [ (u'/\\"\ucafe\ubabe\uab98\ufcde\ubcda\uef4a\x08\x0c\n\r\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?', '"/\\\\\\"\\ucafe\\ubabe\\uab98\\ufcde\\ubcda\\uef4a\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?"'), (u'\u0123\u4567\u89ab\ucd...
gpl-2.0
sthirugn/robottelo
tests/foreman/ui/test_bookmark.py
1
25041
"""Test classes for Bookmark tests @Requirement: Bookmark @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: UI @TestType: Functional @CaseImportance: High @Upstream: No """ # -*- encoding: utf-8 -*- import random from fauxfactory import gen_string from nailgun import entities from robottelo.cons...
gpl-3.0
seaotterman/tensorflow
tensorflow/contrib/layers/python/layers/layers_test.py
10
144946
# 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
mozilla/iacomus-alerts
ansible/inventory/ec2.py
24
51233
#!/usr/bin/env python ''' EC2 external inventory script ================================= Generates inventory that Ansible can understand by making API request to AWS EC2 using the Boto library. NOTE: This script assumes Ansible is being executed where the environment variables needed for Boto have already been set:...
epl-1.0
nhejazi/scikit-learn
sklearn/feature_selection/tests/test_chi2.py
49
3080
""" Tests for chi2, currently the only feature selection function designed specifically to work with sparse matrices. """ import warnings import numpy as np from scipy.sparse import coo_matrix, csr_matrix import scipy.stats from sklearn.feature_selection import SelectKBest, chi2 from sklearn.feature_selection.univar...
bsd-3-clause
kutenai/django
tests/model_validation/tests.py
15
4004
from django.core import management from django.core.checks import Error from django.core.checks.model_checks import _check_lazy_references from django.db import models from django.db.models.signals import post_init from django.test import SimpleTestCase from django.test.utils import isolate_apps, override_settings from...
bsd-3-clause
nhicher/ansible
lib/ansible/modules/files/blockinfile.py
16
11779
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, 2015 YAEGASHI Takeshi <yaegashi@debian.org> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass_...
gpl-3.0
orgito/ansible
lib/ansible/modules/remote_management/ucs/ucs_ip_pool.py
46
11474
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
chouseknecht/ansible
test/units/mock/procenv.py
113
2694
# (c) 2016, Matt Davis <mdavis@ansible.com> # (c) 2016, 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 ...
gpl-3.0
FiloSottile/youtube-dl
youtube_dl/extractor/veehd.py
13
3040
from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import ( compat_urlparse, ) from ..utils import ( ExtractorError, clean_html, get_element_by_id, ) class VeeHDIE(InfoExtractor): _VALID_URL = r'https?://veehd\.com/video/(?P<id>\d+)' ...
unlicense
2014c2g9/c2g9
wsgi/static/reeborg/src/libraries/brython/Lib/collections/abc.py
739
16026
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for collections, according to PEP 3119. Unit tests are in test_collections. """ from abc import ABCMeta, abstractmethod import sys __all__ = ["Hashable", "Iterable", "Iterator", ...
gpl-2.0
pexip/os-chardet
chardet/langhungarianmodel.py
269
12592
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
lgpl-2.1
alinbalutoiu/tempest
tempest/api/image/v1/test_images.py
8
12353
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
npe9/depot_tools
third_party/gsutil/gslib/commands/mv.py
51
6213
# Copyright 2011 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...
bsd-3-clause
knehez/configuration
playbooks/callback_plugins/hipchat_plugin.py
51
9800
import os import time from ansible import utils try: import prettytable except ImportError: prettytable = None try: import hipchat except ImportError: hipchat = None class CallbackModule(object): """Send status updates to a HipChat channel during playbook execution. This plugin makes use of t...
agpl-3.0
CTSRD-SOAAP/chromium-42.0.2311.135
v8/tools/release/auto_roll.py
1
4496
#!/usr/bin/env python # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import json import os import sys import urllib from common_includes import * import chromium_roll class CheckActiv...
bsd-3-clause
nedlowe/amaas-core-sdk-python
amaascore/assets/automobile.py
3
7568
from datetime import date from dateutil.parser import parse from amaascore.assets.real_asset import RealAsset from amaascore.assets.enums import * class Automobile(RealAsset): def __init__(self, asset_manager_id, asset_id, client_id, asset_issuer_id=None, country_id=None, display_name='', descr...
apache-2.0
vertcoin/vertcoin
test/util/rpcauth-test.py
71
1719
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test share/rpcauth/rpcauth.py """ import base64 import configparser import hmac import importlib import...
mit
heytcass/homeassistant-config
deps/google/protobuf/internal/descriptor_pool_test2_pb2.py
7
11886
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/internal/descriptor_pool_test2.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from goog...
mit
shedskin/shedskin
examples/c64/sprite.py
7
1556
#!/usr/bin/env python2 # I, Danny Milosavljevic, hereby place this file into the public domain. # public: calculate_pixbuf_data import sys SPRITE_COUNT = 8 #sprite = open(sys.argv[1], "rb").read()[2:] WIDTH = 24 HEIGHT = 21 #def from_high_resolution_sprite(sprite, primary_color): # result = [] # for cell in ...
gpl-3.0
DueLaser/OctoPrint
src/octoprint/plugins/softwareupdate/updaters/update_script.py
19
3510
# coding=utf-8 from __future__ import absolute_import __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import sys import logging f...
gpl-3.0
kmcnellis/twitter_nlp
python/twokenize_wrapper.py
8
1647
#!/homes/gws/aritter/local/bin/python ############################################################################### # Tokinizes strings using the 'twokenize' module, but also splits up # contractions, which 'twokenize' fails to do. # ############################################################################### imp...
gpl-3.0
381426068/MissionPlanner
Lib/site-packages/numpy/dual.py
87
1783
""" Aliases for functions which may be accelerated by Scipy. Scipy_ can be built to use accelerated or otherwise improved libraries for FFTs, linear algebra, and special functions. This module allows developers to transparently support these accelerated functions when scipy is available but still support users who hav...
gpl-3.0
makielab/django-oscar
oscar/apps/order/migrations/0011_auto__del_field_paymentevent_date__add_field_paymentevent_date_created.py
16
33742
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(SchemaMigration): def forwards(self, orm): db.rename_column('order_communicationevent', 'da...
bsd-3-clause
goldeneye-source/ges-python
lib/encodings/cp1253.py
272
13094
""" Python Character Mapping Codec cp1253 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
gpl-3.0
bala4901/odoo
addons/l10n_us/__init__.py
893
1045
# -*- 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
awkspace/ansible
lib/ansible/modules/cloud/digital_ocean/digital_ocean_image_facts.py
29
4212
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = ty...
gpl-3.0
double12gzh/nova
nova/db/sqlalchemy/migrate_repo/versions/253_add_pci_requests_to_instance_extra_table.py
81
1112
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
ossdemura/django-miniblog
src/Lib/site-packages/django/contrib/contenttypes/forms.py
116
3620
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.db import models from django.forms import ModelForm, modelformset_factory from django.forms.models import BaseModelFormSet class BaseGenericInlineFormSet(BaseModelFormSet): """ A formset for generic...
mit
davidszotten/pytest
src/_pytest/pastebin.py
34
3631
""" submit failure or test session information to a pastebin service. """ from __future__ import absolute_import, division, print_function import pytest import six import sys import tempfile def pytest_addoption(parser): group = parser.getgroup("terminal reporting") group._addoption( "--pastebin", ...
mit
joeyjojo/django_offline
src/django/contrib/messages/storage/base.py
399
6134
from django.conf import settings from django.utils.encoding import force_unicode, StrAndUnicode from django.contrib.messages import constants, utils LEVEL_TAGS = utils.get_level_tags() class Message(StrAndUnicode): """ Represents an actual message that can be stored in any of the supported storage class...
mit
edx-solutions/edx-platform
common/djangoapps/third_party_auth/migrations/0008_auto_20170413_1455.py
5
1465
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('third_party_auth', '0007_auto_20170406_0912'), ] operations = [ migrations.AddField( model_name='ltiproviderconfig', name='drop_existing_se...
agpl-3.0
user-none/calibre
src/calibre/gui2/tweak_book/file_list.py
3
35970
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' import os from binascii import hexlify from collections import OrderedDict, ...
gpl-3.0
gabelula/b-counted
django/contrib/gis/geos/prototypes/predicates.py
623
1777
""" This module houses the GEOS ctypes prototype functions for the unary and binary predicate operations on geometries. """ from ctypes import c_char, c_char_p, c_double from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_predicate from django.contrib.gis...
apache-2.0
VishvajitP/python-social-auth
social/storage/mongoengine_orm.py
83
5914
import base64 import six from mongoengine import DictField, IntField, StringField, \ EmailField, BooleanField from mongoengine.queryset import OperationError from social.storage.base import UserMixin, AssociationMixin, NonceMixin, \ CodeMixin, BaseStorage UNUS...
bsd-3-clause
marc-sensenich/ansible
lib/ansible/modules/network/f5/bigip_profile_client_ssl.py
9
34018
#!/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
freephys/python_ase
ase/transport/selfenergy.py
14
2861
import numpy as np class LeadSelfEnergy: conv = 1e-8 # Convergence criteria for surface Green function def __init__(self, hs_dii, hs_dij, hs_dim, eta=1e-4): self.h_ii, self.s_ii = hs_dii # onsite principal layer self.h_ij, self.s_ij = hs_dij # coupling between principal layers sel...
gpl-3.0
shipci/sympy
sympy/polys/tests/test_polyoptions.py
24
11998
"""Tests for options manager for :class:`Poly` and public API functions. """ from sympy.polys.polyoptions import ( Options, Expand, Gens, Wrt, Sort, Order, Field, Greedy, Domain, Split, Gaussian, Extension, Modulus, Symmetric, Strict, Auto, Frac, Formal, Polys, Include, All, Gen, Symbols, Method) from sym...
bsd-3-clause
tellesnobrega/horizon
horizon/conf/default.py
49
1588
# 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 # distributed under t...
apache-2.0
alanplotko/CoREdash
app.py
2
5680
# Flask from flask import Flask, render_template, request, redirect, url_for, session, abort, make_response # Authentication from authomatic.adapters import WerkzeugAdapter from authomatic import Authomatic from config import CONFIG # MongoDB and Sessions from flask.ext.session import Session from pymongo import Mong...
bsd-3-clause
jdsimcoe/briansimcoe
workspace/grunt/node_modules/grunt-growl/node_modules/grunt/node_modules/gzip-js/node_modules/deflate-js/test/deflate.py
177
2329
import os from colorama import Fore from helpers import deflate, inflate, run_cmd outDirDefault = 'test-outs' testDirDefault = 'test-files' """ Run a single test @param tFile- required; the full path to the file to run @param level- optional (default: all); the compression level [1-9] @param delete- optional (defaul...
mit
resmo/ansible
test/units/modules/network/fortios/test_fortios_system_fm.py
21
6794
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
state-hiu/cybergis-scripts
bin/cybergis-script-geoshape-configure.py
1
2429
#!/usr/bin/python from base64 import b64encode from optparse import make_option import json import urllib import urllib2 import argparse import time import os import sys import subprocess #==# sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'lib', 'cybergis'))) import cybergis_geoshape._ge...
mit
carnell69/kuma
vendor/packages/logilab/common/ureports/docbook_writer.py
93
5706
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
mpl-2.0
retomerz/intellij-community
python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_intern.py
315
1405
# Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from .. import pytree from .. import fixer_base from ..fixer_util import Name, Attr, touch_import class FixIntern(fixer_base.BaseFix): BM_compatible = True or...
apache-2.0
krishnazure/ansible
v1/ansible/runner/action_plugins/assemble.py
109
6150
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com> # Stephen Fromm <sfromm@gmail.com> # Brian Coca <briancoca+dev@gmail.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 publish...
gpl-3.0
ahernp/DMCM
mpages/management/commands/delete_page_reads.py
1
1243
from datetime import timedelta from django.core.management.base import BaseCommand from django.utils import timezone from django.conf import settings from ...models import PageRead import logging logger = logging.getLogger(__name__) class Command(BaseCommand): help = "Deletes older PageRead rows." def ad...
bsd-3-clause