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 |
|---|---|---|---|---|---|
Jobava/zamboni | mkt/receipts/tests/test_models.py | 18 | 5686 | import calendar
import json
import time
from django.conf import settings
from django.core.urlresolvers import reverse
import jwt
import mock
from nose.tools import eq_
import mkt
import mkt.site.tests
from mkt.receipts.utils import create_receipt, get_key
from mkt.site.fixtures import fixture
from mkt.site.helpers i... | bsd-3-clause |
jaingaurav/Diamond | src/collectors/monit/test/testmonit.py | 31 | 2787 | #!/usr/bin/python
# coding=utf-8
##########################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from mock import Mock
from mock import patch
from diamond.collector import Collector
from monit import MonitCo... | mit |
pyta-uoft/pyta | tests/test_type_inference/test_annassign.py | 1 | 8487 | import astroid
from hypothesis import given, settings, HealthCheck
from .. import custom_hypothesis_support as cs
from ..custom_hypothesis_support import lookup_type
import hypothesis.strategies as hs
from python_ta.typecheck.base import _node_to_type, TypeFail, TypeFailAnnotationInvalid, TypeFailUnify, NoType, _gorg
f... | gpl-3.0 |
anirudhjayaraman/scikit-learn | sklearn/svm/base.py | 156 | 36018 | from __future__ import print_function
import numpy as np
import scipy.sparse as sp
import warnings
from abc import ABCMeta, abstractmethod
from . import libsvm, liblinear
from . import libsvm_sparse
from ..base import BaseEstimator, ClassifierMixin, ChangedBehaviorWarning
from ..preprocessing import LabelEncoder
from... | bsd-3-clause |
piffey/ansible | lib/ansible/modules/network/cloudengine/ce_dldp_interface.py | 43 | 22697 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
sublime1809/django | django/contrib/auth/tests/test_forms.py | 12 | 21532 | from __future__ import unicode_literals
import os
import re
from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm,
PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm,
ReadOnlyPasswordHashField, ReadO... | bsd-3-clause |
PengyuSun/tera | test/testcase/test_data.py | 10 | 8347 | '''
Copyright (c) 2015, Baidu.com, Inc. All Rights Reserved
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
'''
import nose
import unittest
import common
from conf import const
class Data(unittest.TestCase):
def setUp(self):
out = common.runcmd_output... | bsd-3-clause |
PlayUAV/MissionPlanner | Lib/cookielib.py | 54 | 66246 | """HTTP cookie handling for web clients.
This module has (now fairly distant) origins in Gisle Aas' Perl module
HTTP::Cookies, from the libwww-perl library.
Docstrings, comments and debug strings in this code refer to the
attributes of the HTTP cookie system as cookie-attributes, to distinguish
them clearly fr... | gpl-3.0 |
scalyr/scalyr-agent-2 | tests/utils/image_builder.py | 1 | 11641 | # Copyright 2014-2020 Scalyr Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | apache-2.0 |
ael-code/pydirl | pydirl/files_utils.py | 1 | 2676 | import os
import zipstream
import mimetypes
from logging import getLogger
logger = getLogger('pydirl')
def get_file_size(path):
return os.path.getsize(path)
def get_folder_size(path):
files_num = 0
size = 0
for root, dirs, files in os.walk(path):
for name in files:
files_num +=... | gpl-3.0 |
jjs0sbw/CSPLN | apps/scaffolding/win/web2py/applications/admin/controllers/wizard.py | 32 | 23741 | # -*- coding: utf-8 -*-
import os
import uuid
import re
import pickle
import urllib
import glob
from gluon.admin import app_create, plugin_install
from gluon.fileutils import abspath, read_file, write_file
def reset(session):
session.app = {
'name': '',
'params': [('title', 'My New App'),
... | gpl-3.0 |
jamesliu/mxnet | ci/test_docker_cache.py | 3 | 10102 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache Licen... | apache-2.0 |
kristianeschenburg/parcellearning | parcellearning/mlp/train.py | 1 | 7885 | import argparse, json, os, time
import mlp
from parcellearning.utilities import gnnio
from parcellearning.utilities.early_stop import EarlyStopping
from parcellearning.utilities.batch import partition_graphs
from parcellearning.utilities.load import load_schema, load_model
from shutil import copyfile
from pathlib imp... | mit |
CorySpitzer/ansible | lib/ansible/new_inventory/host.py | 236 | 1551 | # (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 |
matrixise/odoo | addons/hw_scale/controllers/main.py | 106 | 6929 | # -*- coding: utf-8 -*-
import logging
import os
import time
from os import listdir
from os.path import join
from threading import Thread, Lock
from select import select
from Queue import Queue, Empty
import openerp
import openerp.addons.hw_proxy.controllers.main as hw_proxy
from openerp import http
from openerp.http ... | agpl-3.0 |
hbrunn/OCB | addons/hr_timesheet_sheet/report/hr_timesheet_report.py | 194 | 4092 | # -*- 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 |
xxsergzzxx/python-for-android | python-modules/twisted/twisted/python/filepath.py | 49 | 33439 | # -*- test-case-name: twisted.test.test_paths -*-
# Copyright (c) 2001-2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Object-oriented filesystem path representation.
"""
import os
import errno
import random
import base64
from os.path import isabs, exists, normpath, abspath, splitext
from os.path im... | apache-2.0 |
saisai/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/filereader_unittest.py | 122 | 6723 | # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# 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 conditions and... | bsd-3-clause |
maciekcc/tensorflow | tensorflow/python/kernel_tests/random_poisson_test.py | 27 | 7393 | # 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 |
lenarother/moderna | moderna/fragment_library/LIR.py | 1 | 8488 | #!/usr/bin/env python
#
# LIR.py
#
# Calculates LIR values, makes LIRRecord.
#
# http://iimcb.genesilico.pl/moderna/
#
__author__ = "Magdalena Rother, Tomasz Puton, Kristian Rother"
__copyright__ = "Copyright 2008, The Moderna Project"
__credits__ = ["Janusz Bujnicki"]
__license__ = "GPL"
__maintainer__ = "Magdalena Ro... | gpl-3.0 |
LarryPham/android-quill | jni/libhpdf-2.3.0RC2/if/python/demo/ttfont_demo.py | 32 | 4019 | ###
## * << Haru Free PDF Library 2.0.0 >> -- ttfont_demo.c
## *
## * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
## *
## * Permission to use, copy, modify, distribute and sell this software
## * and its documentation for any purpose is hereby granted without fee,
## * provided that the... | gpl-3.0 |
pimanttr/nixysa | third_party/ply-3.1/test/yacc_misplaced.py | 174 | 1539 | # -----------------------------------------------------------------------------
# yacc_misplaced.py
#
# A misplaced | in grammar rules
# -----------------------------------------------------------------------------
import sys
if ".." not in sys.path: sys.path.insert(0,"..")
import ply.yacc as yacc
from calclex import... | apache-2.0 |
CDSFinance/zipline | zipline/examples/buyapple.py | 11 | 2079 | #!/usr/bin/env python
#
# Copyright 2014 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 |
loco-odoo/localizacion_co | openerp/addons-extra/odoo-pruebas/odoo-server/addons/website_mail_group/controllers/main.py | 306 | 7883 | # -*- coding: utf-8 -*-
import datetime
from dateutil import relativedelta
from openerp import tools, SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.website.models.website import slug
from openerp.addons.web.http import request
class MailGroup(http.Controller):
_thread_per_page = 20
_r... | agpl-3.0 |
christianurich/VIBe2UrbanSim | 3rdparty/opus/src/opus_core/variables/dummy_dataset.py | 2 | 7328 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
from numpy import array
from opus_core.variables.variable_name import VariableName
from opus_core.datasets.interaction_dataset import InteractionDat... | gpl-2.0 |
matthiasdiener/spack | var/spack/repos/builtin/packages/libfabric/package.py | 4 | 2617 | ##############################################################################
# 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 |
rafiqsaleh/VERCE | verce-hpc-pe/src/networkx/utils/tests/test_misc.py | 22 | 2301 | from nose.tools import *
from nose import SkipTest
import networkx as nx
from networkx.utils import *
def test_is_string_like():
assert_true(is_string_like("aaaa"))
assert_false(is_string_like(None))
assert_false(is_string_like(123))
def test_iterable():
assert_false(iterable(None))
assert_false(i... | mit |
markslwong/tensorflow | tensorflow/tensorboard/backend/event_processing/event_file_loader.py | 68 | 2971 | # 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 |
gmacchi93/serverInfoParaguay | apps/venv/lib/python2.7/site-packages/django/core/handlers/base.py | 92 | 12054 | from __future__ import unicode_literals
import logging
import sys
import types
from django import http
from django.conf import settings
from django.core import signals, urlresolvers
from django.core.exceptions import (
MiddlewareNotUsed, PermissionDenied, SuspiciousOperation,
)
from django.db import connections, ... | apache-2.0 |
alexlo03/ansible | lib/ansible/plugins/connection/funcd.py | 66 | 3599 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# Copyright (c) 2013, Michael Scherer <misc@zarb.org>
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.tx... | gpl-3.0 |
peterfpeterson/mantid | scripts/test/Muon/home_runinfo_presenter_test.py | 3 | 3097 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 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 +
impo... | gpl-3.0 |
j831/zulip | zerver/webhooks/papertrail/view.py | 5 | 2129 | from __future__ import absolute_import
from django.utils.translation import ugettext as _
from zerver.lib.actions import check_send_message
from zerver.lib.response import json_success, json_error
from zerver.decorator import REQ, has_request_variables, api_key_only_webhook_view
from zerver.lib.validator import check_d... | apache-2.0 |
UstadMobile/eXePUB | twisted/web/proxy.py | 14 | 6214 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""Simplistic HTTP proxy support.
This comes in two main variants - the Proxy and the ReverseProxy.
When a Proxy is in use, a browser trying to connect to a server (say,
www.yahoo.com) will be intercepted by the Proxy, and the proxy w... | gpl-2.0 |
mcepl/youtube-dl | youtube_dl/extractor/drtuber.py | 9 | 2655 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
NO_DEFAULT,
str_to_int,
)
class DrTuberIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?drtuber\.com/video/(?P<id>\d+)/(?P<display_id>[\w-]+)'
_TEST = {
'url': 'http://www.drtuber.co... | unlicense |
mavenlin/tensorflow | tensorflow/contrib/learn/python/learn/learn_io/data_feeder.py | 88 | 31139 | # 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 |
rhinstaller/system-config-kickstart | src/bootloader.py | 1 | 9196 | #
# Chris Lumens <clumens@redhat.com>
# Brent Fox <bfox@redhat.com>
# Tammy Fox <tfox@redhat.com>
#
# Copyright (C) 2000-2008 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License... | gpl-2.0 |
ekumenlabs/terminus | terminus/builders/procedural_city_builder.py | 1 | 5229 | """
Copyright (C) 2017 Open Source Robotics Foundation
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... | apache-2.0 |
legalsylvain/OpenUpgrade | addons/stock_dropshipping/__openerp__.py | 61 | 2042 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014 OpenERP S.A. (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | agpl-3.0 |
adityacs/ansible | lib/ansible/modules/network/junos/junos_netconf.py | 6 | 5166 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
CeltonMcGrath/TACTIC | 3rd_party/CherryPy/cherrypy/test/test_conn.py | 6 | 24920 | """Tests for TCP connection handling, including proper and timely close."""
from cherrypy.test import test
test.prefer_parent_path()
from httplib import HTTPConnection, HTTPSConnection, NotConnected, BadStatusLine
import urllib
import socket
import sys
import time
timeout = 1
import cherrypy
from cherrypy.test impo... | epl-1.0 |
everydo/ztq | ztq_console/setup.py | 2 | 1697 | import os
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = ['pyramid', 'WebError', 'pyramid_jinja2','ztq_core' ]
setup(name='ztq_console',
version='1.2.5',
... | mit |
djrscally/eve-wspace | evewspace/API/utils.py | 11 | 1908 | # Eve W-Space
# Copyright (C) 2013 Andrew Austin and other contributors
#
# 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... | gpl-3.0 |
Nu3001/external_chromium_org | remoting/tools/runclient.py | 182 | 1717 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Gets the chromoting host info from an input arg and then
tries to find the authentication info in the .chromotingAuthToken file
... | bsd-3-clause |
nightjean/Deep-Learning | tensorflow/compiler/tests/adagrad_test.py | 27 | 5263 | # 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 |
axbaretto/beam | sdks/python/.tox/docs/lib/python2.7/site-packages/jinja2/defaults.py | 130 | 1323 | # -*- coding: utf-8 -*-
"""
jinja2.defaults
~~~~~~~~~~~~~~~
Jinja default filters and tags.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
from jinja2._compat import range_type
from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner
# defaults for ... | apache-2.0 |
vhaasteren/scipy | scipy/optimize/_trustregion.py | 22 | 8596 | """Trust-region optimization."""
from __future__ import division, print_function, absolute_import
import math
import numpy as np
import scipy.linalg
from .optimize import (_check_unknown_options, wrap_function, _status_message,
OptimizeResult)
__all__ = []
class BaseQuadraticSubproblem(objec... | bsd-3-clause |
aOrtego/developer-support | python/arcpy-python/create-heatmap-from-gpx-points/heatmap_from_GPX.py | 15 | 2151 | #-------------------------------------------------------------------------------
# Name: Create Heatmap from GPX
# Purpose: Creates a heatmap raster dataset from input GPX files. The input is a
# directory that contains GPX files. The script will iterate through the
# directory, convert GPX to feat... | apache-2.0 |
x303597316/hue | desktop/core/ext-py/djangosaml2-0.13.0/djangosaml2/conf.py | 42 | 2345 | # Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.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
#
# ... | apache-2.0 |
berkmancenter/mediacloud | apps/topics-mine/src/python/topics_mine/posts/twitter/helpers.py | 1 | 1424 | import re
from mediawords.util.log import create_logger
from topics_base.twitter import fetch_100_tweets
log = create_logger(__name__)
def add_tweets_to_meta_tweets(meta_tweets: list) -> None:
"""
Given a set of meta_tweets, fetch data from twitter about each tweet and attach it under the tweet field.
... | agpl-3.0 |
gbrmachado/treeherder | tests/sampledata.py | 3 | 3225 | import json
import os
from django.conf import settings
class SampleData(object):
@classmethod
def get_credentials(cls):
credentials = {
settings.TREEHERDER_TEST_PROJECT: {
'consumer_key': '8de17836-4a9b-45f5-824c-5ada76713334',
'consumer_secret': '0f71d01... | mpl-2.0 |
AsimmHirani/ISpyPi | tensorflow/contrib/tensorflow-master/tensorflow/examples/tutorials/mnist/mnist_softmax.py | 30 | 2744 | # 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 |
android-ia/platform_external_chromium_org | tools/sync-webkit-git.py | 60 | 6031 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Update third_party/WebKit using git.
Under the assumption third_party/WebKit is a clone of git.webkit.org,
we can use git comma... | bsd-3-clause |
zycdragonball/tensorflow | tensorflow/contrib/distributions/python/ops/operator_pd_vdvt_update.py | 79 | 18451 | # 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 |
leetcraft/leetcraft.github.io | plugins/liquid_tags/soundcloud.py | 273 | 1523 | """
Soundcloud Tag
--------------
This implements a Liquid-style soundcloud tag for Pelican.
It asks the official Soundcloud-API for the widget html code.
Syntax
------
`{% soundcloud track_url %}`
Example
-------
`{% soundcloud https://soundcloud.com/luftmentsh/hakotel %}`
Output
------
`<iframe width="100%" heigh... | mit |
Pluto-tv/chromium-crosswalk | tools/telemetry/third_party/gsutilz/third_party/boto/tests/unit/ec2/autoscale/test_group.py | 90 | 36594 | #!/usr/bin/env python
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without ... | bsd-3-clause |
cryptapus/electrum-myr | plugins/email_requests/qt.py | 12 | 7219 | #!/usr/bin/env python
#
# Electrum - Lightweight Bitcoin Client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... | mit |
newyork167/volatility | volatility/plugins/overlays/windows/windows64.py | 44 | 4048 | # Volatility
# Copyright (c) 2008-2013 Volatility Foundation
# Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu>
#
# This file is part of Volatility.
#
# Volatility 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... | gpl-2.0 |
vmindru/ansible | lib/ansible/modules/cloud/digital_ocean/digital_ocean_droplet.py | 26 | 11077 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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',
... | gpl-3.0 |
rubyinhell/22kjobs | server/api/v1/views.py | 2 | 1647 | from flask import Blueprint, request
from flask.ext import restful
from flask.ext.restful import fields, reqparse
from server.api.common import fields as custom_fields
from server.db import api as db_api
blueprint = Blueprint('v1', __name__)
api = restful.Api(blueprint, catch_all_404s=True)
job_fields = {
'id': ... | mit |
waynedkim/macadamia | collector.py | 1 | 1139 | #!/usr/bin/python
#-*- coding: utf-8 -*-
import sys
import argparse
import macadamia
import BaseHTTPServer
def run_as_server():
PORT = 8080
Server = BaseHTTPServer.HTTPServer
httpd = Server(("", PORT), macadamia.MacadamiaServer)
while True:
try:
httpd.serve_forever()
except KeyboardInterrupt:
break
def... | gpl-2.0 |
mammique/django | django/conf/locale/hu/formats.py | 119 | 1057 | # -*- 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 = 'Y. F j.'
TIME_FORMAT = 'G.i.s'
DA... | bsd-3-clause |
ezequielpereira/Time-Line | libs/wx/tools/Editra/src/syntax/_squirrel.py | 3 | 2358 | ###############################################################################
# Name: squirrel.py #
# Purpose: Syntax Definitions for Squirrel programming language #
# Author: Cody Precord <cprecord@editra.org> #
... | gpl-3.0 |
guybedo/minos | tests/model/mutation_test.py | 1 | 6691 | '''
Created on Feb 15, 2017
@author: julien
'''
from copy import deepcopy
import unittest
from keras.layers.core import Dense
from minos.experiment.experiment import Experiment, ExperimentParameters,\
check_experiment_parameters
from minos.experiment.training import Training, EpochStoppingCondition
from minos.mo... | apache-2.0 |
wemanuel/smry | server-auth/ls/google-cloud-sdk/.install/.backup/lib/rsa/common.py | 216 | 4716 | # -*- coding: utf-8 -*-
#
# Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
#
# 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
#
# Unl... | apache-2.0 |
Elettronik/SickRage | lib/js2py/translators/pyjsparser.py | 27 | 105141 | # The MIT License
#
# Copyright 2014, 2015 Piotr Dabkowski
#
# 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, modif... | gpl-3.0 |
mtnman38/Aggregate | Executables/Aggregate 0.8.1 for Macintosh.app/Contents/Resources/lib/python2.7/requests/packages/urllib3/util.py | 41 | 20493 | # urllib3/util.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from base64 import b64encode
from binascii import hexlify, unhexlify
from collections import name... | gpl-2.0 |
SkrilaxCZ/android_kernel_moto_asanti_c | arch/ia64/scripts/unwcheck.py | 13143 | 1714 | #!/usr/bin/python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthew Ch... | gpl-2.0 |
Fireblend/chromium-crosswalk | tools/telemetry/telemetry/core/util.py | 8 | 4210 | # Copyright 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import glob
import imp
import inspect
import logging
import os
import socket
import sys
import time
from telemetry.core import exceptions
def GetBaseDir():... | bsd-3-clause |
cbrewster/servo | tests/wpt/web-platform-tests/tools/third_party/attrs/tests/test_dark_magic.py | 41 | 11253 | """
End-to-end tests.
"""
from __future__ import absolute_import, division, print_function
import pickle
import pytest
import six
from hypothesis import given
from hypothesis.strategies import booleans
import attr
from attr._compat import TYPE
from attr._make import NOTHING, Attribute
from attr.exceptions import ... | mpl-2.0 |
spodkowinski/cassandra-dtest | upgrade_tests/upgrade_through_versions_test.py | 2 | 36951 | import operator
import os
import pprint
import random
import signal
import time
import uuid
from collections import defaultdict, namedtuple
from multiprocessing import Process, Queue
from Queue import Empty, Full
from unittest import skipUnless
import psutil
from cassandra import ConsistencyLevel, WriteTimeout
from ca... | apache-2.0 |
ghostlander/p2pool-neoscrypt | wstools/XMLname.py | 291 | 2479 | """Translate strings to and from SOAP 1.2 XML name encoding
Implements rules for mapping application defined name to XML names
specified by the w3 SOAP working group for SOAP version 1.2 in
Appendix A of "SOAP Version 1.2 Part 2: Adjuncts", W3C Working Draft
17, December 2001, <http://www.w3.org/TR/soap12-part2/#namem... | gpl-3.0 |
EUDAT-B2SHARE/invenio | invenio/modules/authors/errors.py | 19 | 1059 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | gpl-2.0 |
leopay/xhtml2pdf | sx/pisa3/pisa_util.py | 1 | 26208 | # -*- coding: ISO-8859-1 -*-
# Copyright 2010 Dirk Holtwick, holtwick.it
#
# 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 requir... | apache-2.0 |
c-bata/Flask-Template | api/models.py | 1 | 2465 | import jwt
from flask import current_app
from datetime import datetime, timedelta
from flask.ext.sqlalchemy import SQLAlchemy
from werkzeug.security import generate_password_hash, check_password_hash
db = SQLAlchemy()
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
... | mit |
bratsche/Neutron-Drive | google_appengine/lib/django_1_3/django/contrib/messages/tests/base.py | 152 | 17772 | import warnings
from django import http
from django.test import TestCase
from django.conf import settings
from django.utils.translation import ugettext_lazy
from django.utils.unittest import skipIf
from django.contrib.messages import constants, utils, get_level, set_level
from django.contrib.messages.api import Messag... | bsd-3-clause |
daspecster/google-cloud-python | translate/unit_tests/test_client.py | 1 | 12057 | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 |
AnoopAlias/XtendWeb | scripts/accountrestore_hook_post.py | 1 | 2805 | #!/usr/bin/env python
import sys
import subprocess
import os
import platform
import psutil
import signal
try:
import simplejson as json
except ImportError:
import json
__author__ = "Anoop P Alias"
__copyright__ = "Copyright Anoop P Alias"
__license__ = "GPL"
__email__ = "anoopalias01@gmail.com"
def nginxr... | gpl-3.0 |
gxx/lettuce | tests/integration/lib/Django-1.3/tests/regressiontests/dates/tests.py | 52 | 2391 | from datetime import datetime
from django.test import TestCase
from models import Article, Comment, Category
class DatesTests(TestCase):
def test_related_model_traverse(self):
a1 = Article.objects.create(
title="First one",
pub_date=datetime(2005, 7, 28),
)
a2 = A... | gpl-3.0 |
dinesharanathunga/firewallconfigdecryptor | setup.py | 1 | 2554 | '''
firewallconfigdecryptor: firewall configuration parsing tool
Note that "python setup.py test" invokes pytest on the package. With appropriately
configured setup.cfg, this will check both xxx_test modules and docstrings.
Copyright 2014, dinesha ranathunga.
Licensed under MIT.
'''
import sys
from setuptools import ... | mit |
nwchandler/ansible | lib/ansible/module_utils/cloudengine.py | 35 | 8656 | # 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 |
falbassini/Samples | python/v2.1/create_remarketing_list.py | 3 | 3092 | #!/usr/bin/python
#
# Copyright 2015 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 b... | apache-2.0 |
chenchongli/kinetic-c | vendor/protobuf-2.6.0/python/google/protobuf/internal/message_test.py | 25 | 29294 | #! /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:
#
# ... | mpl-2.0 |
dissemin/dissemin | website/tests/test_backends.py | 2 | 5984 | import pytest
from django.contrib import auth
from papers.models import Researcher
from website.models import ShibbolethAccount
@pytest.mark.usefixtures('db')
class TestShibbolethRemoteUserBackendExistingShibbolethAccount:
"""
Test class to test ShibbolethRemoteUserBackend where the user exists as Shibboleth... | agpl-3.0 |
Jorge-Rodriguez/ansible | lib/ansible/modules/network/cloudengine/ce_stp.py | 27 | 36977 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
837468220/python-for-android | python-build/python-libs/gdata/tests/gdata_tests/apps/migration/service_test.py | 89 | 2125 | #!/usr/bin/python
#
# Copyright (C) 2008 Google
#
# 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 ag... | apache-2.0 |
simod/geonode | geonode/contrib/worldmap/wm_extra/admin.py | 2 | 1612 | from django.contrib import admin
from .models import ExtLayer, ExtMap, ExtLayerAttribute, LayerStats, MapStats, Endpoint, Action
class ExtLayerAdmin(admin.ModelAdmin):
list_display = (
'layer',
'last_modified',
'gazetteer_project',
'in_gazetteer',
'searchable',
'la... | gpl-3.0 |
bleib1dj/boto | tests/unit/vpc/test_dhcpoptions.py | 114 | 8767 | from tests.unit import unittest
from tests.unit import AWSMockServiceTestCase
from boto.vpc import VPCConnection, DhcpOptions
class TestDescribeDhcpOptions(AWSMockServiceTestCase):
connection_class = VPCConnection
def default_body(self):
return b"""
<DescribeDhcpOptionsResponse xmlns="h... | mit |
TrossSoftwareAndTech/webvt | lib/node-v7.2.0/tools/test.py | 1 | 49674 | #!/usr/bin/env python
#
# Copyright 2008 the V8 project authors. 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
# noti... | gpl-3.0 |
cpbl/cpblUtilities | cpblUtilities_config.py | 1 | 10754 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os, re, sys, copy
"""This module provides dicts paths and defaults, which contain any parameters needed by multiple other modules.
These parameters are generally unchanging over time, but may vary from one installation/environment to another.
There are four places these... | gpl-3.0 |
FiloSottile/youtube-dl | youtube_dl/extractor/blinkx.py | 199 | 3217 | from __future__ import unicode_literals
import json
from .common import InfoExtractor
from ..utils import (
remove_start,
int_or_none,
)
class BlinkxIE(InfoExtractor):
_VALID_URL = r'(?:https?://(?:www\.)blinkx\.com/#?ce/|blinkx:)(?P<id>[^?]+)'
IE_NAME = 'blinkx'
_TEST = {
'url': 'http:... | unlicense |
pando85/cherrymusic | web/cherrymusic/settings.py | 1 | 9928 | """
Django settings for cherrymusic 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 pa... | gpl-3.0 |
etos/django | django/db/backends/mysql/features.py | 3 | 3062 | from django.db.backends.base.features import BaseDatabaseFeatures
from django.utils.functional import cached_property
class DatabaseFeatures(BaseDatabaseFeatures):
empty_fetchmany_value = ()
update_can_self_select = False
allows_group_by_pk = True
related_fields_match_type = True
allow_sliced_subq... | bsd-3-clause |
mhmtemnacr/android_kernel_samsung_matissewifi | scripts/tracing/draw_functrace.py | 14676 | 3560 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... | gpl-2.0 |
n0trax/ansible | lib/ansible/modules/system/seport.py | 26 | 7872 | #!/usr/bin/python
# (c) 2014, Dan Keder <dan.keder@gmail.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_version': '1.1',
'status'... | gpl-3.0 |
tungvx/deploy | .google_appengine/lib/django_0_96/django/db/models/fields/related.py | 32 | 36473 | from django.db import backend, transaction
from django.db.models import signals, get_model
from django.db.models.fields import AutoField, Field, IntegerField, get_ul_class
from django.db.models.related import RelatedObject
from django.utils.text import capfirst
from django.utils.translation import gettext_lazy, string_... | apache-2.0 |
Vignesh2208/Awlsim | awlsim/core/instructions/insn_tar.py | 2 | 1385 | # -*- coding: utf-8 -*-
#
# AWL simulator - instructions
#
# Copyright 2012-2014 Michael Buesch <m@bues.ch>
#
# 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
... | gpl-2.0 |
brodyberg/autorest | ClientRuntimes/Python/msrestazure/msrestazure/azure_operation.py | 4 | 23774 | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | mit |
idooo/pancake-hipchat-bot | plugins/geckoboard.py | 1 | 1342 | import requests
import json
class GeckoboardPlugin():
help = "Post message to Geckoboard"
command = "board"
widget_key = None
api_key = None
def __init__(self, conf):
if not 'geckoboard' in conf:
raise Exception("There is no [geckoboard] section in the config file")
... | mit |
cdondrup/teaching | pyperplan/src/pddl/lisp_iterators.py | 2 | 5983 | #
# This file is part of pyperplan.
#
# 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... | mit |
keepkey/python-keepkey | tools/encfs_aes_getpass.py | 2 | 3356 | #!/usr/bin/env python
from __future__ import print_function
'''
Use KeepKey as a hardware key for opening EncFS filesystem!
Demo usage:
encfs --standard --extpass=./encfs_aes_getpass.py ~/.crypt ~/crypt
'''
import os
import sys
import json
import hashlib
import binascii
from keepkeylib.client import KeepKeyClient,... | lgpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.