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
elijah513/ice
python/python/Ice.py
3
48940
# ********************************************************************** # # Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ***********************************************************...
gpl-2.0
pszemus/grpc
src/proto/gen_build_yaml.py
1
2616
#!/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 la...
apache-2.0
oldpa/luigi
test/webhdfs_minicluster.py
26
2674
# -*- coding: utf-8 -*- # # Copyright 2015 VNG Corporation # # 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...
apache-2.0
yuanagain/seniorthesis
venv/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py
2924
3268
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
angr/angr
angr/engines/__init__.py
1
1066
from .successors import SimSuccessors from .engine import SimEngine, SuccessorsMixin from .vex import HeavyVEXMixin, TrackActionsMixin, SimInspectMixin, HeavyResilienceMixin, SuperFastpathMixin from .procedure import ProcedureMixin, ProcedureEngine from .unicorn import SimEngineUnicorn from .failure import SimEngineFa...
bsd-2-clause
DDEFISHER/servo
tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/mux.py
636
71218
# 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 of conditions and the f...
mpl-2.0
Thraxis/pymedusa
lib/chardet/escsm.py
53
10337
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-3.0
ajdawson/iris
lib/iris/analysis/_scipy_interpolate.py
17
12752
from __future__ import (absolute_import, division, print_function) from six.moves import (filter, input, map, range, zip) # noqa import itertools from scipy.sparse import csr_matrix import numpy as np # ============================================================================ # | Copyrigh...
gpl-3.0
qzxx-syzz/study
python/sudoku1/soaplib/core/model/binary.py
2
3645
# # soaplib - Copyright (C) Soaplib contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This l...
gpl-3.0
quozl/sugar-toolkit-gtk3
src/sugar3/graphics/menuitem.py
3
3399
# Copyright (C) 2007, Eduardo Silva <edsiper@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # Thi...
lgpl-2.1
amenonsen/ansible
lib/ansible/modules/cloud/vmware/vmware_host_lockdown.py
13
8162
#!/usr/bin/python # -*- coding: utf-8 -*- # 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__ = type ANSIBLE_METADATA = { 'metadata...
gpl-3.0
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/django-1.4/django/contrib/gis/geos/prototypes/threadsafe.py
513
2824
import threading from django.contrib.gis.geos.libgeos import lgeos, notice_h, error_h, CONTEXT_PTR class GEOSContextHandle(object): """ Python object representing a GEOS context handle. """ def __init__(self): # Initializing the context handler for this thread with # the notice and erro...
mit
RafaelRMachado/qtwebkit
Tools/Scripts/webkitpy/style/patchreader_unittest.py
124
4135
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2009 Torch Mobile Inc. # Copyright (C) 2009 Apple Inc. All rights reserved. # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided t...
gpl-2.0
allotria/intellij-community
python/helpers/pydev/_pydevd_bundle/pydevd_trace_api.py
13
1054
def add_line_breakpoint(plugin, pydb, type, file, line, condition, expression, func_name): return None def add_exception_breakpoint(plugin, pydb, type, exception): return False def remove_exception_breakpoint(plugin, pydb, type, exception): return False def get_breakpoints(plugin, pydb): return None ...
apache-2.0
deniszh/carbon
lib/carbon/tests/test_retentions.py
8
1441
from unittest import TestCase from carbon.util import parseRetentionDef class TestParseRetentionDef(TestCase): def test_valid_retentions(self): retention_map = ( ('60:10', (60, 10)), ('10:60', (10, 60)), ('10s:10h', (10, 3600)), ) for retention, expected...
apache-2.0
dya2/python-for-android
python3-alpha/python3-src/Lib/test/test_cmd.py
49
5390
#!/usr/bin/env python3 """ Test script for the 'cmd' module Original by Michael Schneider """ import cmd import sys import re import unittest import io from test import support class samplecmdclass(cmd.Cmd): """ Instance the sampleclass: >>> mycmd = samplecmdclass() Test for the function parseline()...
apache-2.0
YYMo/sdn_project
pox/openflow/spanning_tree.py
42
8984
# Copyright 2012,2013 James McCauley # # 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 ...
apache-2.0
alfredgamulo/cloud-custodian
c7n/filters/health.py
2
4467
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import itertools from c7n.utils import local_session, chunks, type_schema from .core import Filter from c7n.manager import resources class HealthEventFilter(Filter): """Check if there are operations health events (phd) related to the ...
apache-2.0
berinhard/rows
tests/data/scripts/create_sqlite.py
2
1166
# coding: utf-8 import os import sqlite3 from collections import OrderedDict input_filename = "../all-field-types.csv" output_filename = "../all-field-types.sqlite" field_types = OrderedDict( [ ("bool_column", "INTEGER"), ("integer_column", "INTEGER"), ("float_column", "FLOAT"), ...
lgpl-3.0
75651/kbengine_cloud
kbe/res/scripts/common/Lib/encodings/cp864.py
272
33663
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP864.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'): ...
lgpl-3.0
Uli1/mapnik
scons/scons-local-2.4.0/SCons/Tool/tlib.py
1
1861
"""SCons.Tool.tlib XXX """ # # Copyright (c) 2001 - 2015 The SCons Foundation # # 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 righ...
lgpl-2.1
FreeDao/TeamTalk
win-client/3rdParty/src/json/test/pyjsontestrunner.py
257
2137
# Simple implementation of a json test runner to run the test against json-py. import sys import os.path import json import types if len(sys.argv) != 2: print "Usage: %s input-json-file", sys.argv[0] sys.exit(3) input_path = sys.argv[1] base_path = os.path.splitext(input_path)[0] actual_path = base_path ...
apache-2.0
awalls-cx18/gnuradio
gr-blocks/python/blocks/qa_block_behavior.py
7
2373
#!/usr/bin/env python # # Copyright 2016 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # ...
gpl-3.0
laosiaudi/tensorflow
tensorflow/python/training/rmsprop.py
30
6746
# 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
florentx/OpenUpgrade
addons/stock_landed_costs/product.py
364
1611
# -*- 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
JioCloud/cinder
cinder/tests/unit/targets/test_lio_driver.py
3
14774
# 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
groovecoder/kuma
kuma/users/models.py
9
5970
import datetime from django.conf import settings from django.contrib.auth.models import AbstractUser from django.core import validators from django.db import models from django.utils.functional import cached_property from constance import config from sundial.zones import COMMON_GROUPED_CHOICES from tower import ugett...
mpl-2.0
cousteaulecommandant/youtube-dl
youtube_dl/extractor/servingsys.py
203
2359
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, ) class ServingSysIE(InfoExtractor): _VALID_URL = r'https?://(?:[^.]+\.)?serving-sys\.com/BurstingPipe/adServer\.bs\?.*?&pli=(?P<id>[0-9]+)' _TEST = { 'url': 'http://bs.serving-sys.com/Bu...
unlicense
jhajek/euca2ools
euca2ools/commands/ec2/createsnapshot.py
6
2102
# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 of conditions ...
bsd-2-clause
chaen/DIRAC
Core/Base/SQLAlchemyDB.py
1
10709
""" SQLAlchemyDB: This module provides the BaseRSSDB class for providing standard DB interactions. Uses sqlalchemy """ __RCSID__ = "$Id$" import datetime from sqlalchemy import create_engine, desc, exc from sqlalchemy.engine.reflection import Inspector from sqlalchemy.orm import sessionmaker from sqlalchemy....
gpl-3.0
nielsvanoch/django
django/contrib/gis/utils/ogrinspect.py
35
9137
""" This module is for inspecting OGR data sources and generating either models for GeoDjango and/or mapping dictionaries for use with the `LayerMapping` utility. """ from django.utils.six.moves import zip # Requires GDAL to use. from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.field import O...
bsd-3-clause
yencarnacion/jaikuengine
.google_appengine/lib/django-1.5/django/views/decorators/debug.py
173
2604
import functools from django.http import HttpRequest def sensitive_variables(*variables): """ Indicates which variables used in the decorated function are sensitive, so that those variables can later be treated in a special way, for example by hiding them when logging unhandled exceptions. Two f...
apache-2.0
bbozhev/flask-test
flask/lib/python2.7/site-packages/setuptools/command/bdist_egg.py
115
17184
"""setuptools.command.bdist_egg Build .egg distributions""" from distutils.errors import DistutilsSetupError from distutils.dir_util import remove_tree, mkpath from distutils import log from types import CodeType import sys import os import marshal import textwrap from setuptools.extern import six from pkg_resource...
mit
jorik041/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/filters/webkit_extras.py
121
2830
# Copyright (C) 2009 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 of conditions and the...
bsd-3-clause
bittomix/ucollect
src/master/sniff/nat.py
1
2358
# # Ucollect - small utility for real-time analysis of network data # Copyright (C) 2014 CZ.NIC, z.s.p.o. (http://www.nic.cz/) # # 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; ei...
gpl-2.0
arabenjamin/beets
test/test_smartplaylist.py
25
8021
# This file is part of beets. # Copyright 2015, Bruno Cauet. # # 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, mod...
mit
matkuki/ExCo
lexers/ada.py
1
6578
# -*- coding: utf-8 -*- """ Copyright (c) 2018 Matic Kukovec. """ import keyword import builtins import re import functions import data import time import lexers class Ada(data.QsciLexerCustom): """Custom lexer for the Ada programming languages""" styles = { "Default" : 0, "Comment" : 1, ...
gpl-3.0
asimshankar/tensorflow
tensorflow/python/autograph/pyct/transformer_test.py
8
11190
# Copyright 2017 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
abhattad4/Digi-Menu
digimenu2/django/contrib/gis/gdal/base.py
654
1179
from ctypes import c_void_p from django.contrib.gis.gdal.error import GDALException from django.utils import six class GDALBase(object): """ Base object for GDAL objects that has a pointer access property that controls access to the underlying C pointer. """ # Initially the pointer is NULL. _...
bsd-3-clause
FlaPer87/qpid-proton
tests/python/proton_tests/soak.py
4
13208
# # 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...
apache-2.0
fracpete/wekamooc
dataminingwithweka/class-1.4.py
1
2029
# 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 hope that it will be useful, # bu...
gpl-3.0
hltj/kotlin-web-site-cn
scripts/events_geolocator.py
2
2816
import codecs import os from os import path import geocoder import ruamel.yaml import xmltodict data_folder = path.join(os.path.dirname(__file__), "../data") with codecs.open(path.join(data_folder, "events.xml"), encoding='utf-8') as events_file: events_file_content = events_file.read() events = xmltodict.par...
apache-2.0
Onapsis/sandboxed-game-engine
turnboxed/gamecontroller.py
1
8822
import os import time from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from SocketServer import ThreadingMixIn import threading import uuid import json from multiprocessing import Queue, Event, Process from .playercontroller import SandboxedPlayerController from .exceptions import GameFinishedException, G...
mit
NoxWings/GoogleCodeJam
src/round1A_2016/rank_and_file.py
1
2196
#!/usr/bin/env python # -*- coding: utf-8 -*- #=============================================================================== from __future__ import unicode_literals #=============================================================================== def read_input(strip=True): return raw_input().strip() if strip el...
mit
Mj258/weiboapi
srapyDemo/envs/Lib/site-packages/twisted/conch/test/test_conch.py
8
18024
# -*- test-case-name: twisted.conch.test.test_conch -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. import os, sys, socket from itertools import count from zope.interface import implementer from twisted.cred import portal from twisted.internet import reactor, defer, protocol from twisted....
mit
gleniooliveira/simplemooc
simplemooc/simplemooc/settings.py
1
2753
""" Django settings for simplemooc project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pat...
gpl-3.0
furthz/colegio
src/utils/models.py
1
29869
""" Modelo de las clases soporte para la aplicación :author: Raul Talledo <raul.talledo@technancial.com.pe> Creado 15/07/2017 """ from __future__ import unicode_literals from django.db import models from urllib.parse import urlparse from django.conf import settings from django.utils.timezone import now as timezone_...
mit
jjunell/paparazzi
sw/ground_segment/python/real_time_plot/messagepicker.py
47
3444
#!/usr/bin/env python from __future__ import absolute_import, print_function import wx import getopt import sys import os sys.path.append(os.getenv("PAPARAZZI_HOME") + "/sw/lib/python") import messages_tool class MessagePicker(wx.Frame): def __init__(self, parent, callback, initIvy = True): wx.Frame._...
gpl-2.0
pknight007/electrum-vtc
plugins/labels/labels.py
2
5710
import hashlib import requests import threading import json import sys import traceback import base64 import electrum_vtc as electrum from electrum_vtc.plugins import BasePlugin, hook from electrum_vtc.i18n import _ class LabelsPlugin(BasePlugin): def __init__(self, parent, config, name): BasePlugin....
mit
halober/ovirt-engine
packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/ca.py
3
4352
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013 Red Hat, 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 r...
apache-2.0
rfriedlein/zenoss
ZenPacks/ZenPacks.Coredial.StatusReport/ZenPacks/Coredial/StatusReport/impact.py
22
3665
from zope.component import adapts from zope.interface import implements from Products.ZenUtils.guid.interfaces import IGlobalIdentifier from ZenPacks.zenoss.Impact.impactd import Trigger from ZenPacks.zenoss.Impact.stated.interfaces import IStateProvider from ZenPacks.zenoss.Impact.impactd.relations import ImpactEdge...
gpl-3.0
lucab/security_monkey
env-config/config-local.py
1
2007
# Copyright 2014 Netflix, 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...
apache-2.0
livepy/scrapy
tests/test_pipeline_media.py
115
10529
from __future__ import print_function from testfixtures import LogCapture from twisted.trial import unittest from twisted.python.failure import Failure from twisted.internet import reactor from twisted.internet.defer import Deferred, inlineCallbacks from scrapy.http import Request, Response from scrapy.spiders import ...
bsd-3-clause
jasonwzhy/django
tests/check_framework/test_security.py
242
17428
from django.conf import settings from django.core.checks.security import base, csrf, sessions from django.test import SimpleTestCase from django.test.utils import override_settings class CheckSessionCookieSecureTest(SimpleTestCase): @property def func(self): from django.core.checks.security.sessions i...
bsd-3-clause
rivelo/shop
settings_remote_old.py
1
3843
# Django settings for catalog project. import os dirname = os.path.dirname(globals()["__file__"]) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlit...
gpl-2.0
wearpants/osf.io
scripts/migrate_counters.py
64
2509
""" Ensure that all node IDs embedded in the analytics collections (page counters, user activity counters) are lower-cased following GUID migration. Examples: Dry run: python migrate_counters.py Real: python migrate_counters.py false """ import re import logging from pymongo.errors import Dup...
apache-2.0
pabloborrego93/edx-platform
lms/djangoapps/teams/models.py
9
10437
"""Django models related to teams functionality.""" from datetime import datetime from uuid import uuid4 import pytz from model_utils import FieldTracker from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver ...
agpl-3.0
Russell-IO/ansible
test/units/modules/network/f5/test_bigip_device_sshd.py
23
4054
# -*- 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 sys from nose.plugins.skip import SkipTest i...
gpl-3.0
mr-karan/coala
coalib/misc/ContextManagers.py
16
7320
import builtins import os import platform import signal import sys import tempfile import threading from contextlib import closing, contextmanager from io import StringIO from coalib.misc.MutableValue import MutableValue @contextmanager def subprocess_timeout(sub_process, seconds, kill_pg=False): """ Kill su...
agpl-3.0
dot-bob/Marlin-Duplicator-6
buildroot/share/PlatformIO/scripts/chitu_crypt.py
4
3750
import os import struct Import("env") # Relocate firmware from 0x08000000 to 0x08008800 for define in env['CPPDEFINES']: if define[0] == "VECT_TAB_ADDR": env['CPPDEFINES'].remove(define) env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x8008800")) custom_ld_script = os.path.abspath("buildroot/share/PlatformIO...
gpl-3.0
bzbarsky/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/test_tokenizer.py
420
6544
from __future__ import absolute_import, division, unicode_literals import json import warnings import re from .support import get_data_files from html5lib.tokenizer import HTMLTokenizer from html5lib import constants class TokenizerTestParser(object): def __init__(self, initialState, lastStartTag=None): ...
mpl-2.0
Dhivyap/ansible
lib/ansible/modules/cloud/amazon/ec2_vpc_peering_info.py
12
4818
#!/usr/bin/python # Copyright: 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__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
nicky-ji/edx-nicky
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
30
20501
import json import logging import re import bleach from html5lib.tokenizer import HTMLTokenizer from xmodule.progress import Progress import capa.xqueue_interface as xqueue_interface from capa.util import * from .peer_grading_service import PeerGradingService, MockPeerGradingService import controller_query_service fro...
agpl-3.0
jack51706/maltrieve
maltrieve.py
9
20123
#!/usr/bin/env python # Copyright 2013 Kyle Maxwell # Includes code from mwcrawler, (c) 2012 Ricardo Dias. Used under license. # Maltrieve - retrieve malware from the source # 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
eeshangarg/oh-mainline
vendor/packages/irc/pavement.py
15
1178
import os import platform import paver.easy import paver.setuputils from setup import setup_params paver.setuputils.setup(**setup_params) @paver.easy.task def upload_project_web(): """ Generate the project web page at sourceforge using the reStructuredText README. """ import docutils.core do...
agpl-3.0
jparyani/Mailpile
mailpile/plugins/vcard_gnupg.py
1
2295
#coding:utf-8 import os from mailpile.i18n import gettext as _ from mailpile.i18n import ngettext as _n from mailpile.plugins import PluginManager from mailpile.crypto.gpgi import GnuPG from mailpile.vcard import * _plugins = PluginManager(builtin=__file__) # User default GnuPG key file DEF_GNUPG_HOME = os.path.ex...
apache-2.0
rhyolight/nupic
examples/opf/experiments/anomaly/spatial/2field_few_6040/description.py
50
15806
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
menardorama/ReadyNAS-Add-ons
headphones-1.0.0/debian/headphones/apps/headphones/lib/html5lib/treeadapters/sax.py
1835
1661
from __future__ import absolute_import, division, unicode_literals from xml.sax.xmlreader import AttributesNSImpl from ..constants import adjustForeignAttributes, unadjustForeignAttributes prefix_mapping = {} for prefix, localName, namespace in adjustForeignAttributes.values(): if prefix is not None: pre...
gpl-2.0
milinbhakta/flaskjinja
flask1/Lib/site-packages/pip/_vendor/html5lib/tokenizer.py
1710
76929
from __future__ import absolute_import, division, unicode_literals try: chr = unichr # flake8: noqa except NameError: pass from collections import deque from .constants import spaceCharacters from .constants import entities from .constants import asciiLetters, asciiUpper2Lower from .constants import digits, ...
gpl-2.0
akshatnitd/UIP
uiplib/setWallpaper.py
3
1338
import sys def change_background(filename): if sys.platform.startswith('win32'): change_windows_background(filename) elif sys.platform.startswith('linux'): change_linux_background(filename) elif sys.platform.startswith('darwin'): change_osx_background(filename) def change_linux...
agpl-3.0
joksnet/youtube-dl
test/test_utils.py
3
5841
#!/usr/bin/env python # Various small unit tests import sys import unittest import xml.etree.ElementTree # Allow direct execution import os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) #from youtube_dl.utils import htmlentity_transform from youtube_dl.utils import ( timeconvert, ...
unlicense
umitproject/tease-o-matic
django/utils/synch.py
376
2549
""" Synchronization primitives: - reader-writer lock (preference to writers) (Contributed to Django by eugene@lazutkin.com) """ try: import threading except ImportError: import dummy_threading as threading class RWLock: """ Classic implementation of reader-writer lock with preference to writers....
bsd-3-clause
shootstar/novatest
nova/api/openstack/compute/plugins/v3/extension_info.py
3
4023
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 IBM Corp. # # 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 # # ...
apache-2.0
beezee/GAE-Django-site
django/contrib/sitemaps/__init__.py
291
4010
from django.contrib.sites.models import Site, get_current_site from django.core import urlresolvers, paginator from django.core.exceptions import ImproperlyConfigured import urllib PING_URL = "http://www.google.com/webmasters/tools/ping" class SitemapNotFound(Exception): pass def ping_google(sitemap_url=None, pi...
bsd-3-clause
EricssonResearch/cerbero
cerbero/commands/__init__.py
27
2416
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # 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; eit...
lgpl-2.1
GdZ/scriptfile
software/googleAppEngine/lib/django_1_3/django/utils/encoding.py
71
7294
import types import urllib import locale import datetime import codecs from decimal import Decimal from django.utils.functional import Promise class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj, *args): self.obj = obj UnicodeDecodeError.__init__(self, *args) def __str_...
mit
jaywreddy/django
tests/forms_tests/models.py
261
3805
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import itertools import tempfile from django.core.files.storage import FileSystemStorage from django.db import models from django.utils.encoding import python_2_unicode_compatible callable_default_counter = itertools.count() def callab...
bsd-3-clause
tritoanst/ccxt
examples/py/asciichart.py
2
2137
# -*- coding: utf-8 -*- # This file is a copied implementation from my asciichart repository on GitHub # https://github.com/kroitor/asciichart from math import cos # from math import sin from math import pi from math import floor from math import ceil def plot(series, cfg={}): minimum = min(series) maximum...
mit
smcantab/pele
examples/basinhopping_no_system_class/6_reseeding.py
6
1553
# -*- coding: iso-8859-1 -*- # ########################################################### # Example 5: Adding a custom takestep routine. This example # takes 100 monte carlo steps as one basin hopping step # ########################################################### import numpy as np import pele.potentials.lj as lj...
gpl-3.0
zaccoz/odoo
addons/share/ir_model.py
439
2272
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 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
edmorley/django
django/views/decorators/debug.py
86
2569
import functools from django.http import HttpRequest def sensitive_variables(*variables): """ Indicate which variables used in the decorated function are sensitive so that those variables can later be treated in a special way, for example by hiding them when logging unhandled exceptions. Accept ...
bsd-3-clause
lotharwissler/bioinformatics
python/misa/gc-content-from-misa.py
1
2421
#!/usr/bin/python import os, sys # low level handling, such as command line stuff import string # string methods available import re # regular expressions import getopt # comand line argument handling from low import * # custom functions, written by myself from collections import defaultdict fr...
mit
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/tests/python/unittest/test_random.py
1
41749
# 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
justathoughtor2/atomicApe
cygwin/lib/python2.7/encodings/ascii.py
858
1248
""" Python 'ascii' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is intended. ...
gpl-3.0
int19h/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/posixpath.py
7
15772
"""Common operations on Posix pathnames. Instead of importing this module directly, import os and refer to this module as os.path. The "os.path" name is an alias for this module on Posix systems; on other systems (e.g. Mac, Windows), os.path provides the same operations in a manner specific to that platform, and is a...
apache-2.0
chouseknecht/ansible
lib/ansible/modules/network/aci/mso_schema_site_vrf_region_cidr_subnet.py
6
8362
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.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__ = type ANSIBLE_METADATA = {'metadata_ve...
gpl-3.0
bksim/chinese-translation
nltk/metrics/association.py
5
10459
# Natural Language Toolkit: Ngram Association Measures # # Copyright (C) 2001-2012 NLTK Project # Author: Joel Nothman <jnothman@student.usyd.edu.au> # URL: <http://nltk.org> # For license information, see LICENSE.TXT """ Provides scoring functions for a number of association measures through a generic, abstract imple...
apache-2.0
sudheesh001/oh-mainline
vendor/packages/gdata/tests/all_tests_cached.py
41
1091
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
agpl-3.0
apyrgio/ganeti
test/py/ganeti.daemon_unittest.py
4
25436
#!/usr/bin/python # # Copyright (C) 2010 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of...
bsd-2-clause
2014c2g6/c2g6
exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/difflib.py
737
82544
#! /usr/bin/env python3 """ Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context ...
gpl-2.0
loseblue/vim-ycm-windows-64
third_party/ycmd/third_party/bottle/test/tools.py
43
5129
# -*- coding: utf-8 -*- import bottle import sys import unittest import wsgiref import wsgiref.util import wsgiref.validate import mimetypes import uuid from bottle import tob, tonat, BytesIO, py3k, unicode def warn(msg): sys.stderr.write('WARNING: %s\n' % msg.strip()) def tobs(data): ''' Transforms bytes o...
gpl-3.0
aimas/TuniErp-8.0
addons/gamification/models/badge.py
287
13760
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
Netuitive/Diamond
src/collectors/puppetdb/puppetdb.py
27
6748
# coding=utf-8 """ Collect metrics from Puppet DB Dashboard #### Dependencies * urllib2 * json """ import urllib2 import diamond.collector from diamond.convertor import time as time_convertor try: import json except ImportError: import simplejson as json class PuppetDBCollector(diamond.collector.Colle...
mit
ToddG/worklogger
wlogger/cli.py
1
1561
import os import sys import click import pkg_resources import wlogger.worklogger as worklogger FILE = 'file' @click.group(invoke_without_command=True, no_args_is_help=True, help='https://github.com/ToddG/worklogger') @click.option('--version', is_flag=True, hel...
gpl-3.0
wfxiang08/django190
django/apps/registry.py
18
15215
import sys import threading import warnings from collections import Counter, OrderedDict, defaultdict from functools import partial from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured from django.utils import lru_cache from .config import AppConfig class Apps(object): """ A registry...
bsd-3-clause
dirkcuys/active-memory
dcu/active_memory/__init__.py
1
1548
from dcu.active_memory.rotate import rotate from dcu.active_memory.rotate import splitext from dcu.active_memory.upload import upload import os.path import re import logging logger = logging.getLogger(__name__) def upload_rotate(file_path, s3_bucket, s3_key_prefix, aws_key=None, aws_secret=None): ''' Upload...
mit
denisff/python-for-android
python3-alpha/python3-src/Lib/urllib/response.py
46
2951
"""Response classes used by urllib. The base class, addbase, defines a minimal file-like interface, including read() and readline(). The typical response object is an addinfourl instance, which defines an info() method that returns headers and a geturl() method that returns the url. """ class addbase(object): ""...
apache-2.0
mujiansu/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/email/encoders.py
152
2302
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Encodings and related functions.""" __all__ = [ 'encode_7or8bit', 'encode_base64', 'encode_noop', 'encode_quopri', ] import base64 from quopri import encodestring as _encodestring d...
apache-2.0
PhillipSz/translationcheck
translationcheck.py
1
3656
#!/usr/bin/env python3 # ''' Script to check for Launchpad Translation''' import argparse import logging import concurrent.futures from lib import translationcheck as tc def parseargs(): '''Parse the arguments''' parser = argparse.ArgumentParser(description='Script to check for Launchpad Translation', ...
gpl-3.0
sentriz/steely
steely/plugins/basic_interpreter.py
1
6462
''' Evaluate BASIC, or something vaguely similar looking. Usage: .basic <source_code> Example: UncleBob: .basic 10 PRINTLN counter 20 LET counter = counter + 1 30 IF counter < 5 THEN GOTO 10 40 PRINTLN "Done" Chat Bot: 0 1 2 3 4 Done Each line must follow the format of: ...
gpl-3.0