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
Rajeshkumar90/ansible-modules-extras
univention/udm_user.py
27
21241
#!/usr/bin/python # -*- coding: UTF-8 -*- # Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch> # # 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 Fr...
gpl-3.0
viniciusgama/blog_gae
django/contrib/markup/tests.py
245
3155
# Quick tests for the markup templatetags (django.contrib.markup) import re from django.template import Template, Context, add_to_builtins from django.utils import unittest from django.utils.html import escape add_to_builtins('django.contrib.markup.templatetags.markup') try: import textile except ImportError: ...
bsd-3-clause
benjixx/ansible
lib/ansible/utils/module_docs_fragments/rackspace.py
232
4190
# (c) 2014, Matt Martz <matt@sivel.net> # # 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
YihaoLu/statsmodels
statsmodels/compat/tests/test_itercompat.py
33
1222
# -*- coding: utf-8 -*- """ Created on Wed Feb 29 10:34:00 2012 Author: Josef Perktold """ from statsmodels.compat import lrange, zip_longest, combinations from numpy.testing import assert_ def test_zip_longest(): lili = [['a0', 'b0', 'c0', 'd0'], ['a1', 'b1', 'c1'], ['a2', 'b2', 'c2', '...
bsd-3-clause
cloudera/hue
desktop/core/ext-py/dnspython-1.15.0/dns/rdataclass.py
16
3258
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation 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 PROVIDED "...
apache-2.0
misgeatgit/opencog
opencog/python/pln_old/examples/temporal/temporal_example.py
28
1863
""" Demo to demonstrate use of temporal reasoning pipeline 1. RelEx and RelEx2Logic process natural language sentences 2. PLN performs inferences using AI on output atoms """ from __future__ import print_function from opencog.atomspace import types, AtomSpace, TruthValue from opencog.scheme_wrapper import load_scm, sc...
agpl-3.0
vguerci/Deluge.app
deluge/core/alertmanager.py
4
5064
# # alertmanager.py # # Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may 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-3.0
Tuxemon/Tuxemon
tuxemon/event/actions/clear_variable.py
1
1565
# # Tuxemon # Copyright (c) 2020 William Edwards <shadowapex@gmail.com>, # Benjamin Bean <superman2k5@gmail.com> # # This file is part of Tuxemon # # 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 #...
gpl-3.0
lijoantony/django-oscar
src/oscar/apps/customer/auth_backends.py
55
2680
import warnings from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ImproperlyConfigured from oscar.apps.customer.utils import normalise_email from oscar.core.compat import get_user_model User = get_user_model() if hasattr(User, 'REQUIRED_FIELDS'): if not (User.USERNAME_FIEL...
bsd-3-clause
littlejo/Libreosteo
winserver.py
1
8114
# This file is part of Libreosteo. # # Libreosteo 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. # # Libreosteo is distributed in the ...
gpl-3.0
blackzw/openwrt_sdk_dev1
staging_dir/host/lib/python2.7/pydoc_data/topics.py
35
407675
# Autogenerated by Sphinx on Thu Feb 23 15:17:35 2012 topics = {'assert': '\nThe ``assert`` statement\n************************\n\nAssert statements are a convenient way to insert debugging assertions\ninto a program:\n\n assert_stmt ::= "assert" expression ["," expression]\n\nThe simple form, ``assert expression``, ...
gpl-2.0
Ingenico-ePayments/connect-sdk-python3
tests/unit/test_directory_params.py
1
1664
import unittest from ingenico.connect.sdk.merchant.products.directory_params import DirectoryParams from tests.unit.comparable_param import ComparableParam class DirectoryParamsTest(unittest.TestCase): """Tests if instances of the DirectoryParams class for products can be correctly converted to RequestParame...
mit
thnee/ansible
lib/ansible/modules/network/avi/avi_gslbgeodbprofile.py
28
4241
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.2 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
gpl-3.0
fhaoquan/kbengine
kbe/res/scripts/common/Lib/test/test_builtin.py
72
58513
# Python test set -- built-in functions import ast import builtins import collections import io import locale import os import pickle import platform import random import sys import traceback import types import unittest import warnings from operator import neg from test.support import TESTFN, unlink, run_unittest, c...
lgpl-3.0
qspin/qtaste
demo/pywinauto-0.3.8/examples/ForteAgentSample.py
19
2955
"""Perform some tests with Forte Agent NOTE: Forte Agent has a very dynamic interface e.g. whether it is free or not, whether it is still in the grace period. For this reason this example script may or may not work well for you""" print __doc__ import time from pprint import pprint from pywinauto.applic...
lgpl-3.0
sndnvaps/linux-1
tools/perf/python/twatch.py
1565
1316
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
dafei2015/hugula
Client/tools/site-packages/PIL/ImageGrab.py
13
1926
# # The Python Imaging Library # $Id: ImageGrab.py 2134 2004-10-06 08:55:20Z fredrik $ # # screen grabber (windows only) # # History: # 2001-04-26 fl created # 2001-09-17 fl use builtin driver, if present # 2002-11-19 fl added grabclipboard support # # Copyright (c) 2001-2002 by Secret Labs AB # Copyright (c) 2001-2...
mit
matthijsvk/multimodalSR
code/Experiments/neon-master/examples/imagenet/ingest.py
1
9525
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2015-2016 Nervana 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 #...
mit
tqchen/tvm
tutorials/frontend/deploy_model_on_rasp.py
1
8161
# 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
mixturemodel-flow/tensorflow
tensorflow/contrib/learn/python/learn/learn_io/data_feeder_test.py
71
12923
# 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
FFMG/myoddweb.piger
myodd/boost/tools/build/test/builtin_exit.py
51
1029
#!/usr/bin/python # Copyright 2012 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # This tests the EXIT rule. import BoostBuild def test_exit(name): t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=...
gpl-2.0
slevenhagen/odoo
addons/account/wizard/account_move_line_select.py
385
2800
# -*- 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
thekindlyone/msg2eml
msg2eml.py
1
6009
# -*- coding: utf-8 -*- import os import sys import glob import traceback from email.parser import Parser as EmailParser import email.utils import OleFileIO_PL as OleFile import email import random import string import mimetypes from email import encoders from email.message import Message from email.mime....
gpl-2.0
mistercrunch/panoramix
superset/databases/commands/validate.py
1
5684
# 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
gkc1000/pyscf
pyscf/fci/test/test_rdm.py
2
10777
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
apache-2.0
modoboa/modoboa
modoboa/admin/tests/test_mailbox_operations.py
1
3310
"""Management command tests.""" import os import shutil import tempfile from unittest import mock from django.core.management import call_command from django.test import override_settings from django.urls import reverse from modoboa.lib.tests import ModoTestCase from .. import factories, models @override_settings(...
isc
shenhzou654321/protobuf-ios
compiler/python/google/protobuf/internal/generator_test.py
15
4312
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
mit
ntuecon/server
pyenv/Lib/site-packages/twisted/words/xish/xpath.py
13
9556
# -*- test-case-name: twisted.words.test.test_xpath -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ XPath query support. This module provides L{XPathQuery} to match L{domish.Element<twisted.words.xish.domish.Element>} instances against XPath-like expressions. """ from __future__ imp...
bsd-3-clause
matrixise/odoo
addons/account_anglo_saxon/product.py
384
3035
############################################################################## # # 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 Affero General Publ...
agpl-3.0
gitgitcode/myflask
venv/lib/python2.7/site-packages/pip/req/req_set.py
338
34462
from __future__ import absolute_import from collections import defaultdict from itertools import chain import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.compat import expanduser from pip.download import (is_file_url, is_dir_url, is_vcs_url, url_to_path, ...
mit
cryptodechange/electrum-asiccoin
plugins/virtualkeyboard.py
3
1951
from PyQt4.QtGui import * from electrum import BasePlugin from electrum.i18n import _ class Plugin(BasePlugin): def fullname(self): return 'Virtual Keyboard' def description(self): return '%s\n%s' % (_("Add an optional, mouse keyboard to the password dialog."), _("Warning: do not use this if...
gpl-3.0
playm2mboy/edx-platform
cms/djangoapps/contentstore/views/tests/test_videos.py
83
15190
#-*- coding: utf-8 -*- """ Unit tests for video-related REST APIs. """ # pylint: disable=attribute-defined-outside-init import csv import json import dateutil.parser import re from StringIO import StringIO from django.conf import settings from django.test.utils import override_settings from mock import Mock, patch fr...
agpl-3.0
commtrack/temp-rapidsms
apps/schools/xml.py
3
1531
''' Created on Nov 13, 2009 @author: Cory Zue ''' from __future__ import absolute_import from xml.etree import ElementTree from xml.etree.ElementTree import Element, SubElement from django.db import models class SerializableModel(): '''A serializable model. Override the ATTRS and ELEMS property on the t...
lgpl-3.0
glewarne/v9_testing
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
kreatorkodi/repository.torrentbr
plugin.video.elementum/resources/site-packages/elementum/dialog_select.py
1
1990
import os import xbmcgui from elementum.addon import ADDON_PATH from dialog import * # NOQA class DialogSelect(xbmcgui.WindowXMLDialog): def __init__(self, *args, **kwargs): xbmcgui.WindowXML.__init__(self) self.items = kwargs['items'] self.title = kwargs['title'] self.count = 0 ...
gpl-2.0
sergiosgc/Syncthing.py
syncthing/bep/fileinfo.py
1
1801
from syncthing.bep.serializable import BEPSerializable from syncthing.bep.blockinfo import BEPBlockInfo from syncthing.xdr.XDRStringUnserializer import XDRStringUnserializer from syncthing.xdr.XDRIntegerUnserializer import XDRIntegerUnserializer from syncthing.xdr.XDRLongIntegerUnserializer import XDRLongIntegerUnseria...
gpl-2.0
larrybradley/astropy
astropy/io/votable/tests/vo_test.py
8
35397
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is a set of regression tests for vo. """ # STDLIB import difflib import io import pathlib import sys import gzip from unittest import mock # THIRD-PARTY import pytest import numpy as np from numpy.testing import assert_ar...
bsd-3-clause
Mirdrack/4chanscrapper
lib/python2.7/site-packages/requests/status_codes.py
926
3200
# -*- coding: utf-8 -*- from .structures import LookupDict _codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'...
mit
tardis-sn/tardis
tardis/montecarlo/montecarlo_numba/interaction.py
1
4192
from numba import njit from tardis.montecarlo.montecarlo_numba import njit_dict, njit_dict_no_parallel from tardis.montecarlo.montecarlo_numba.numba_interface import ( LineInteractionType, ) from tardis.montecarlo import ( montecarlo_configuration as montecarlo_configuration, ) from tardis.montecarlo.montecarl...
bsd-3-clause
Sodki/ansible
lib/ansible/modules/cloud/vmware/vsphere_copy.py
36
6516
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 Dag Wieers <dag@wieers.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 Lice...
gpl-3.0
wizardofwhimsy/wizardofwhimsy.github.io
vendor/bundle/ruby/2.7.0/gems/ffi-1.12.2/ext/ffi_c/libffi/generate-darwin-source-and-headers.py
22
6531
#!/usr/bin/env python import subprocess import os import errno import collections import glob import argparse class Platform(object): pass class simulator_platform(Platform): directory = 'darwin_ios' sdk = 'iphonesimulator' arch = 'i386' triple = 'i386-apple-darwin11' version_min = '-miphoneos...
mit
anryko/ansible
lib/ansible/modules/network/fortios/fortios_log_memory_setting.py
7
8901
#!/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
XiaodunServerGroup/ddyedx
cms/djangoapps/contentstore/management/commands/tests/test_rollback_split_course.py
17
4146
""" Unittests for deleting a split mongo course """ import unittest from StringIO import StringIO from mock import patch from django.contrib.auth.models import User from django.core.management import CommandError, call_command from django.test.utils import override_settings from contentstore.management.commands.rollba...
agpl-3.0
plotly/python-api
packages/python/plotly/plotly/tests/test_core/test_optional_imports/test_optional_imports.py
2
1848
from __future__ import absolute_import import sys from unittest import TestCase from plotly.optional_imports import get_module class OptionalImportsTest(TestCase): def test_get_module_exists(self): import math module = get_module("math") self.assertIsNotNone(module) self.assertEqu...
mit
elastic-coders/aiohttp
aiohttp/protocol.py
3
28891
"""Http related parsers and protocol.""" import collections import functools import http.server import re import string import sys import zlib from abc import abstractmethod, ABC from wsgiref.handlers import format_date_time from multidict import CIMultiDict, upstr import aiohttp from . import errors, hdrs from .log ...
apache-2.0
alex/raven
raven/contrib/django/models.py
1
7491
""" raven.contrib.django.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Acts as an implicit hook for Django installs. :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import sys import logging import warnings ...
bsd-3-clause
walac/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/test_endtoend.py
449
26811
#!/usr/bin/env python # # Copyright 2012, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
mpl-2.0
chaitanyanettem/justcompare
crawlers/bookadda.py
1
2941
#! /usr/bin/python import requests from bs4 import BeautifulSoup import re import sys reload(sys) sys.setdefaultencoding("utf-8") var=requests.get("http://www.bookadda.com") soup=BeautifulSoup(var.text) find1=soup.find('ul',{"class":"left_menu"}) f=open("bookaddalinks.txt",'w') for link in find1.find_all('a'): f.w...
mit
eaplatanios/tensorflow
tensorflow/python/ops/math_grad_test.py
22
8339
# 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
OptimusGitEtna/RestSymf
Python-3.4.2/Lib/test/test_urllib2net.py
60
12676
import unittest from test import support from test.test_urllib2 import sanepathname2url import os import socket import urllib.error import urllib.request import sys try: import ssl except ImportError: ssl = None support.requires("network") TIMEOUT = 60 # seconds def _retry_thrice(func, exc, *args, **kwarg...
mit
kingofkosmos/-tg-station
tools/dmi/merge_driver.py
15
6601
#!/usr/bin/env python3 import sys import dmi from hooks.merge_frontend import MergeDriver def images_equal(left, right): if left.size != right.size: return False w, h = left.size left_load, right_load = left.load(), right.load() for y in range(0, h): for x in range(0, w): l...
agpl-3.0
ColdSauce/IsSittingOnButt
server/env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py
2762
17725
######################## 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...
apache-2.0
yaroslavvb/tensorflow
tensorflow/python/ops/variables.py
11
48817
# 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
potato/searx
searx/engines/google_news.py
1
2179
""" Google (News) @website https://news.google.com @provide-api no @using-api no @results HTML @stable no @parse url, title, content, publishedDate """ from lxml import html from searx.engines.google import _fetch_supported_languages, supported_languages_url from searx.url_utils import ur...
agpl-3.0
pacoqueen/bbinn
formularios/consulta_ventas_solo_tickets.py
1
29443
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado # # (pacoqueen@users.sourceforge.net) # # ...
gpl-2.0
ClovisIRex/Snake-django
env/lib/python3.6/site-packages/django/contrib/gis/geoip/prototypes.py
23
3950
from ctypes import POINTER, Structure, c_char_p, c_float, c_int, string_at from django.contrib.gis.geoip.libgeoip import free, lgeoip # #### GeoIP C Structure definitions #### class GeoIPRecord(Structure): _fields_ = [('country_code', c_char_p), ('country_code3', c_char_p), ('cou...
mit
gisce/OCB
addons/project_long_term/project_long_term.py
33
16612
# -*- 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
VagrantApe/flaskMicroblog
venv/lib/python2.7/site-packages/sqlalchemy/orm/dynamic.py
14
13297
# orm/dynamic.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Dynamic collection API. Dynamic collections act like Query() objects for read opera...
bsd-3-clause
supasate/word_prediction
Chapter9/9-2-last-word-solution.py
1
1531
# เติมโค้ดในลูป while เพื่อหาคำสุดท้ายก่อนกด tab def add_to_corpus_index(key, next_word, corpus_index): if key not in corpus_index: corpus_index[key] = {next_word: 1} else: if next_word in corpus_index[key]: corpus_index[key][next_word] += 1 else: corpus_index...
gpl-2.0
nikolas/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/forms/tests/regressions.py
50
7623
# -*- coding: utf-8 -*- from django.forms import * from django.utils.unittest import TestCase from django.utils.translation import ugettext_lazy, activate, deactivate from regressiontests.forms.models import Cheese class FormsRegressionsTestCase(TestCase): def test_class(self): # Tests to prevent against...
gpl-3.0
jmesteve/asterisk
openerp/addons/point_of_sale/report/pos_details_summary.py
22
5615
# -*- 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
gdi2290/django
django/conf/locale/nn/formats.py
197
1810
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATET...
bsd-3-clause
YComputer/react-native
JSCLegacyProfiler/trace_data.py
375
8013
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import re import unittest """ # _-----=> irqs-off # / _----=> need-resched # | / _---...
bsd-3-clause
mikedchavez1010/XX-Net
python27/1.0/lib/linux/gevent/pool.py
10
10938
# Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details. """Managing greenlets in a group. The :class:`Group` class in this module abstracts a group of running greenlets. When a greenlet dies, it's automatically removed from the group. The :class:`Pool` which a subclass of :class:`Group` provides a way to li...
bsd-2-clause
ReachingOut/unisubs
apps/search/management/commands/test_index_updating.py
5
9879
import datetime import os import warnings from optparse import make_option from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management.base import AppCommand from django.db import reset_queries from django.utils.encoding import smart_str from haystack.query impor...
agpl-3.0
anomen-s/programming-challenges
cryptopals.com/0028-Implement_a_SHA-1_keyed_MAC/solve.py
1
1113
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Find a SHA-1 implementation in the language you code in. Don't cheat. It won't work. Do not use the SHA-1 implementation your language already provides (for instance, don't use the "Digest" library in Ruby, or call OpenSSL; in Ruby, you'd want a pure-Ruby SHA-1). Write ...
gpl-2.0
adelez/grpc
test/cpp/qps/gen_build_yaml.py
8
4953
#!/usr/bin/env python2.7 # Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
Yong-Lee/django
tests/forms_tests/tests/test_regressions.py
155
8024
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import ( CharField, ChoiceField, Form, HiddenInput, IntegerField, ModelForm, ModelMultipleChoiceField, MultipleChoiceField, RadioSelect, Select, TextInput, ) from django.test import TestCase, ignore_warnings from django.utils...
bsd-3-clause
cchurch/ansible
lib/ansible/modules/cloud/amazon/aws_direct_connect_link_aggregation_group.py
31
18136
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = """ --- module...
gpl-3.0
TheWardoctor/Wardoctors-repo
script.module.uncoded/lib/resources/lib/sources/en/vodly.py
7
4367
# -*- coding: utf-8 -*- ''' Covenant Add-on 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 prog...
apache-2.0
uranusjr/django
django/conf/locale/sv/formats.py
65
1502
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT ...
bsd-3-clause
Edraak/edx-platform
common/lib/xmodule/xmodule/capa_base.py
1
61702
"""Implements basics of Capa, including class CapaModule.""" import cgi import copy import datetime import hashlib import json import logging import os import traceback import struct import sys import re # We don't want to force a dependency on datadog, so make the import conditional try: import dogstats_wrapper a...
agpl-3.0
ppribeli/AliPhysics
PWGJE/EMCALJetTasks/Tracks/analysis/model/SpectrumSmearer.py
41
3661
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
bsd-3-clause
RedhawkSDR/integration-gnuhawk
qa/gnuradio/gr/gnuradioStubs.py
1
2524
# # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of GNUHAWK. # # GNUHAWK is free software: you can redistribute it and/or modify is under the # terms of the GNU General Public License as published by the Free Software # F...
gpl-3.0
rkerr/trigger
trigger/utils/notifications/events.py
13
4682
# -*- coding: utf-8 -*- """ Event objects for the notification system. These are intended to be used within event handlers such as `~trigger.utils.notifications.handlers.email_handler()`. If not customized within :setting:`NOTIFICATION_HANDLERS`, the default notification type is an `~trigger.utils.notification.event...
bsd-3-clause
cataliniordache/Human-Computer-Interaction-Project
RestfulServices/flask/lib/python2.7/site-packages/sqlalchemy/dialects/sybase/pysybase.py
33
3208
# sybase/pysybase.py # Copyright (C) 2010-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: sybase+pysybase :name: Python-Sybase :dbapi: Sybase ...
apache-2.0
manqala/erpnext
erpnext/accounts/doctype/gl_entry/test_gl_entry.py
59
1071
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, unittest from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry class TestGLEntry(unittest.TestCase): ...
gpl-3.0
zhukaixy/kbengine
kbe/src/lib/python/Lib/test/test_posixpath.py
68
23737
import itertools import os import posixpath import sys import unittest import warnings from posixpath import realpath, abspath, dirname, basename from test import support, test_genericpath try: import posix except ImportError: posix = None # An absolute path to a temporary filename for testing. We can't rely ...
lgpl-3.0
PW-Sat2/PWSat2OBC
integration_tests/emulator/comm_zmq_adapter.py
1
5457
from Queue import Empty from threading import Thread from time import sleep import numpy as np import logging import zmq import devices from utils import ensure_string class ZeroMQAdapter(object): def __init__(self, comm, grc_uplink_address="tcp://localhost:7002", grc_downlink_address="tcp://localhos...
agpl-3.0
zlz3907/TextLineProcessor
WordXmlParse.py
1
2778
#! /usr/bin/python # -*- coding: utf-8 -*- import re; import sys; import os; textre = re.compile("\!\[CDATA\[(.*?)\]\]", re.DOTALL); def get_text(xml): match = re.search(textre, xml); if not match: return xml; return match.group(1); def get_elements(xml, elem): p = re.compile("<" + elem + ">"...
gpl-2.0
molmod/zeobuilder
zeobuilder/conversion.py
1
3834
# -*- coding: utf-8 -*- # Zeobuilder is an extensible GUI-toolkit for molecular model construction. # Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center # for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights # reserved unless otherwise stated. # # This file is part of Z...
gpl-3.0
kkh029/Alchemy
Alchemy/cocos2d/tools/particle/convert_YCoordFlipped.py
89
2224
#!/usr/bin/python #ConvertYCoordFlipped.py import plistlib import os.path import argparse import glob import shutil #keys in dictionary metaDataKey = 'metaData' yCoordFlippedConvertedKey = 'yCoordFlippedConverted' yCoordFlippedKey = 'yCoordFlipped' #check if the particle file has been converted def checkFlippedConve...
apache-2.0
ax333l/QuoteBook
QuoteBook/sqv.py
1
3777
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'sqw.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Quote(object): def setupUi(self, Quote): Quote.setObjectName("Qu...
gpl-3.0
wndias/bc.repository
script.module.urlresolver/lib/urlresolver/plugins/videohut.py
4
2399
""" urlresolver XBMC Addon Copyright (C) 2011 t0mm0 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. ...
gpl-2.0
hogarthj/ansible
lib/ansible/module_utils/urls.py
2
42462
# 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
indirectlylit/kolibri
kolibri/core/discovery/test/test_network_utils.py
3
6974
import mock import requests from django.test import TestCase from ..utils.network import errors from ..utils.network.client import NetworkClient from ..utils.network.urls import get_normalized_url_variations from .helpers import mock_request class TestURLParsing(TestCase): def test_valid_ipv4_address(self): ...
mit
martin-craig/Airtime
python_apps/media-monitor2/mm2.py
2
1082
# -*- coding: utf-8 -*- import sys import os from media.saas.launcher import setup_global, launch_instance, setup_logger from media.monitor.config import MMConfig def main(global_config, api_client_config, log_config): """ function to run hosted install """ mm_config = MMConfig(global_config) log = setup_l...
gpl-3.0
Azure/azure-sdk-for-python
sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_purview_management_client.py
1
4032
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
mattclay/ansible
lib/ansible/plugins/strategy/linear.py
23
22994
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
pgmillon/ansible
test/units/modules/network/f5/test_bigip_gtm_monitor_https.py
38
5285
# -*- 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 import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
axant/tgext.ecommerce
tgext/ecommerce/lib/utils.py
1
2806
import os import re, unicodedata import tg import gettext import math import inspect class NoDefault(object): """A dummy value used for parameters with no default.""" def slugify(value, type, models): if isinstance(value, dict): for k, v in value.iteritems(): key = k value = ...
mit
Titulacion-Sistemas/PythonTitulacion-EV
Lib/site-packages/setuptools/command/setopt.py
285
5068
import distutils, os from setuptools import Command from distutils.util import convert_path from distutils import log from distutils.errors import * __all__ = ['config_file', 'edit_config', 'option_base', 'setopt'] def config_file(kind="local"): """Get the filename of the distutils, local, global, or per-user co...
mit
alxgu/ansible
lib/ansible/modules/cloud/openstack/os_user_facts.py
31
4544
#!/usr/bin/python # Copyright (c) 2016 Hewlett-Packard Enterprise Corporation # 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
danic85/virtual_assistant
behaviours/tests/test_translator.py
2
2268
import datetime, unittest import os, sys from mock import Mock, call, patch from lib import feeds import re from behaviours import translator import json class TestTranslatorMethods(unittest.TestCase): def test_translate(self): path = os.path.dirname(os.path.realpath(__file__)) + '/testdata/translator_get...
gpl-3.0
epiphany27/NewsBlur
vendor/paypal/standard/ipn/django_migrations/0001_initial.py
18
10862
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='PayPalIPN', fields=[ ('id', models.AutoField(ve...
mit
BT-fgarbely/odoo
addons/delivery/partner.py
383
1404
# -*- 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
mlperf/training_results_v0.5
v0.5.0/google/cloud_v2.8/ssd-tpuv2-8/code/ssd/model/tpu/models/experimental/resnet50_keras/resnet_preprocessing.py
5
6831
# 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
mscuthbert/abjad
abjad/tools/selectiontools/test/test_selectiontools_Selection__all_are_components_in_same_logical_voice.py
2
46366
# -*- encoding: utf-8 -*- import pytest from abjad import * Component = scoretools.Component Selection = selectiontools.Selection def test_selectiontools_Selection__all_are_components_in_same_logical_voice_01(): r'''Unincorporated leaves do not share a logical voice. Unicorporated leaves do not share a root c...
gpl-3.0
samthor/intellij-community
python/lib/Lib/anydbm.py
171
2620
"""Generic interface to all dbm clones. Instead of import dbm d = dbm.open(file, 'w', 0666) use import anydbm d = anydbm.open(file, 'w') The returned object is a dbhash, gdbm, dbm or dumbdbm object, dependent on the type of database being opened (determined by whichdb module) in the...
apache-2.0
bbondy/brianbondy.gae
libs/markdown/extensions/toc.py
1
5238
""" Table of Contents Extension for Python-Markdown * * * (c) 2008 [Jack Miller](http://codezen.org) Dependencies: * [Markdown 2.0+](http://www.freewisdom.org/projects/python-markdown/) """ import markdown from markdown import etree import re class TocTreeprocessor(markdown.treeprocessors.Treeprocesso...
mit