repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
Phrozyn/MozDef | mq/plugins/ttl_auditd.py | 2 | 3716 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Copyright (c) 2014 Mozilla Corporation
class message(object):
def __init__(self):
'''
register ou... | mpl-2.0 |
publicloudapp/csrutil | linux-4.3/tools/perf/util/setup.py | 766 | 1540 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... | mit |
splunk/splunk-demo-yelp-search-command | bin/requests/packages/charade/constants.py | 231 | 1374 | ######################## 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.... | apache-2.0 |
AndroidOpenDevelopment/android_external_chromium_org | tools/perf/benchmarks/scheduler.py | 8 | 1116 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
from measurements import smoothness
import page_sets
@test.Disabled('linux') # crbug.com/368767
class SchedulerToughSchedulingC... | bsd-3-clause |
jawad6233/android_kernel_samsung_t110 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | 3246 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... | gpl-2.0 |
BlueLens/bl-magi | tensorflow/object_detection/protos/faster_rcnn_box_coder_pb2.py | 4 | 3445 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/faster_rcnn_box_coder.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from googl... | apache-2.0 |
fossilet/ansible | lib/ansible/plugins/lookup/credstash.py | 131 | 1651 | # (c) 2015, Ensighten <infra@ensighten.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version... | gpl-3.0 |
fdouetteau/PyBabe | pybabe/format_csv.py | 1 | 3107 |
from base import BabeBase, StreamHeader, StreamFooter
import csv
from charset import UTF8Recoder, UTF8RecoderWithCleanup, PrefixReader, UnicodeCSVWriter
import codecs
import logging
log = logging.getLogger("csv")
def linepull(stream, dialect, kwargs):
it = iter(stream)
fields = kwargs.get('fields', None)
... | bsd-3-clause |
raychorn/knowu | django/djangononrelsample2/django/contrib/sessions/backends/signed_cookies.py | 288 | 2798 | from django.conf import settings
from django.core import signing
from django.contrib.sessions.backends.base import SessionBase
class SessionStore(SessionBase):
def load(self):
"""
We load the data from the key itself instead of fetching from
some external data store. Opposite of _get_ses... | lgpl-3.0 |
filippog/pysnmp | examples/hlapi/asyncore/sync/agent/ntforg/v3-trap.py | 1 | 1601 | """
SNMPv3 TRAP: auth SHA, privacy: AES128
++++++++++++++++++++++++++++++++++++++
Send SNMP notification using the following options:
* SNMPv3
* with authoritative snmpEngineId = 0x8000000001020304
(USM must be configured at the Receiver accordingly)
* with user 'usr-sha-aes128', auth: SHA, priv: AES128
* over IPv... | bsd-3-clause |
sander76/home-assistant | homeassistant/components/trace/__init__.py | 1 | 3528 | """Support for script and automation tracing and debugging."""
from __future__ import annotations
import datetime as dt
from itertools import count
from typing import Any, Deque
from homeassistant.core import Context
from homeassistant.helpers.trace import (
TraceElement,
trace_id_get,
trace_id_set,
t... | apache-2.0 |
IronLanguages/ironpython2 | Tests/test_decimal.py | 3 | 1134 | # Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
import unittest
from decimal import *
from iptest import run_test, skipUnlessIronPython
@skipUnlessIronPython(... | apache-2.0 |
elzaggo/pydoop | test/avro/test_io.py | 1 | 4807 | # BEGIN_COPYRIGHT
#
# Copyright 2009-2018 CRS4.
#
# 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 agree... | apache-2.0 |
mou4e/zirconium | third_party/mojo/src/mojo/public/third_party/jinja2/compiler.py | 623 | 61785 | # -*- coding: utf-8 -*-
"""
jinja2.compiler
~~~~~~~~~~~~~~~
Compiles nodes into python code.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
from itertools import chain
from copy import deepcopy
from keyword import iskeyword as is_python_keyword
from jinja2... | bsd-3-clause |
SU-ECE-17-7/hotspotter | hsviz/draw_func2.py | 1 | 54605 | ''' Lots of functions for drawing and plotting visiony things '''
# TODO: New naming scheme
# viz_<func_name> will clear everything. The current axes and fig: clf, cla. # Will add annotations
# interact_<func_name> will clear everything and start user interactions.
# show_<func_name> will always clear the current axes... | apache-2.0 |
boyuegame/kbengine | kbe/src/lib/python/Lib/sqlite3/test/factory.py | 67 | 9620 | #-*- coding: iso-8859-1 -*-
# pysqlite2/test/factory.py: tests for the various factories in pysqlite
#
# Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liab... | lgpl-3.0 |
crosswalk-project/chromium-crosswalk-efl | tools/telemetry/telemetry/core/heap/chrome_js_heap_snapshot_parser_unittest.py | 44 | 2529 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import unittest
from telemetry.core.heap import chrome_js_heap_snapshot_parser
class ChromeJsHeapSnapshotParserUnittest(unittest.TestCase):
... | bsd-3-clause |
Semi-global/edx-platform | common/djangoapps/django_locale/middleware.py | 81 | 3736 | # TODO: This file is imported from the stable Django 1.8 branch. Remove this file
# and re-import this middleware from Django once the codebase is upgraded. [PLAT-671]
# pylint: disable=invalid-name, missing-docstring
"This is the locale selecting middleware that will look at accept headers"
from django.conf import se... | agpl-3.0 |
rjschwei/azure-sdk-for-python | azure-batch/azure/batch/models/job_list_preparation_and_release_task_status_options.py | 3 | 2209 | # 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 ... | mit |
foreverfaint/scrapy | scrapy/tests/test_utils_reqser.py | 30 | 2683 | import unittest
from scrapy.http import Request
from scrapy.spider import Spider
from scrapy.utils.reqser import request_to_dict, request_from_dict
class RequestSerializationTest(unittest.TestCase):
def setUp(self):
self.spider = TestSpider()
def test_basic(self):
r = Request("http://www.exa... | bsd-3-clause |
silas/rock | rock/text.py | 1 | 1235 | from __future__ import unicode_literals
def _(text):
return text.strip('\n')
USAGE = _("""
Usage: rock [--help] [--env=ENV] [--path=PATH] [--runtime=RUNTIME] command
""")
HELP = _("""
--help show help message
--verbose show script while running
--dry-run show script without r... | mit |
andrew-szymanski/gae_django | django/contrib/localflavor/es/es_provinces.py | 436 | 1482 | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
PROVINCE_CHOICES = (
('01', _('Arava')),
('02', _('Albacete')),
('03', _('Alacant')),
('04', _('Almeria')),
('05', _('Avila')),
('06', _('Badajoz')),
('07', _('Illes Balears')),
('08', _('Barcelona')),
(... | bsd-3-clause |
xianian/qt-creator | tests/system/suite_general/tst_session_handling/test.py | 3 | 8199 | #############################################################################
##
## Copyright (C) 2015 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing
##
## This file is part of Qt Creator.
##
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance wit... | lgpl-2.1 |
setsid/yacron | yacron/time.py | 1 | 5052 | """
This file is part of yacron.
Copyright (C) 2016 Vadim Kuznetsov <vimusov@gmail.com>
yacron 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... | gpl-3.0 |
Dandandan/wikiprogramming | jsrepl/build/extern/python/reloop-closured/lib/python2.7/distutils/command/install_lib.py | 251 | 8338 | """distutils.command.install_lib
Implements the Distutils 'install_lib' command
(install all Python modules)."""
__revision__ = "$Id$"
import os
import sys
from distutils.core import Command
from distutils.errors import DistutilsOptionError
# Extension for Python source files.
if hasattr(os, 'extsep'):
PYTHON... | mit |
diydrones/visual-followme | src/drone_script.py | 4 | 1146 | import cv2
import time
import os.path
import os
from file_utils import Logger
from polyphemus import process_stream
mustarm = False
def get_vehicle():
api = local_connect() # @UndefinedVariable
v = api.get_vehicles()[0]
return v
def wait_for_arm(v):
print "Waiting for arming"
while not v.armed:... | gpl-3.0 |
daymer/xWIKI_Karma | Migration_to_xWiki/migration_sample.py | 1 | 1532 | from PythonConfluenceAPI import ConfluenceAPI
import Configuration
import CustomModules.SQL_Connector
from Configuration import MySQLConfig, MediaWIKIConfig
from Migration_to_xWiki.Users_association import Users
from CustomModules import Mechanics
from CustomModules.Mechanics import XWikiClient, MysqlConnector, Migrat... | apache-2.0 |
moondrop-entertainment/django-nonrel-drawp | tests/regressiontests/comment_tests/tests/app_api_tests.py | 55 | 2592 | from django.conf import settings
from django.contrib import comments
from django.contrib.comments.models import Comment
from django.contrib.comments.forms import CommentForm
from regressiontests.comment_tests.tests import CommentTestCase
class CommentAppAPITests(CommentTestCase):
"""Tests for the "comment app" API... | bsd-3-clause |
UCSC-iGEM-2016/taris_controller | taris_controller/taris_sensor.py | 1 | 9944 | #!/usr/bin/python
from __future__ import print_function
import io # used to create file streams
import fcntl # used to access I2C parameters like addresses
import sys
import time # used for sleep delay and timestamps
class Taris_Sensor():
''' This object holds all required interface d... | gpl-3.0 |
sixty-north/segpy | test/test_header.py | 2 | 5354 | import inspect
import pickle
from copy import copy
from pytest import raises
from hypothesis import given, assume
from hypothesis.strategies import integers
import segpy
from segpy.header import field, Header, are_equal
from segpy.field_types import Int32, NNInt32
from segpy.datatypes import LIMITS, SegYType
from t... | agpl-3.0 |
xy515258/Xia | make_new_application.py | 6 | 4027 | #!/usr/bin/env python
# This script is for creating a new herd animal. Just run this script
# from the "stork" directory supplying a new animal name and it should
# create a complete application template built with support for both
# MOOSE and ELK. Enjoy!
import os, sys, string, re, subprocess
from optparse import ... | lgpl-2.1 |
smerritt/swift | test/unit/common/middleware/test_versioned_writes.py | 3 | 63681 | # Copyright (c) 2013 OpenStack 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 |
mahendra-r/edx-platform | common/djangoapps/student/migrations/0006_expand_meta_field.py | 188 | 9246 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'UserProfile.meta'
db.alter_column('auth_userprofile', 'meta', self.gf('django.db.models.fields.... | agpl-3.0 |
classicboyir/BuildingMachineLearningSystemsWithPython | ch10/simple_classification.py | 21 | 2299 | # This code is supporting material for the book
# Building Machine Learning Systems with Python
# by Willi Richert and Luis Pedro Coelho
# published by PACKT Publishing
#
# It is made available under the MIT License
import mahotas as mh
import numpy as np
from glob import glob
from features import texture, color_hist... | mit |
halaszk/Perseus-UNIVERSAL5410 | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
lopezloo/mtasa-blue | vendor/google-breakpad/src/tools/python/deps-to-manifest.py | 19 | 4857 | #!/usr/bin/python
# Copyright 2016 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 con... | gpl-3.0 |
fevxie/sale-workflow | sale_jit_on_services/__openerp__.py | 34 | 1916 | # -*- coding: utf-8 -*-
#
#
# Author: Joël Grand-Guillaume, Yannick Vaucher
# Copyright 2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version ... | agpl-3.0 |
lezizi/A-Framework | python/local-source/source.py | 1 | 2324 | #!/usr/bin/env python
#
# Copyright (C) 2012 LeZiZi Studio
#
# 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 |
melvon22/osmc | package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x00f.py | 252 | 4061 | data = (
'AUM', # 0x00
'', # 0x01
'', # 0x02
'', # 0x03
'', # 0x04
'', # 0x05
'', # 0x06
'', # 0x07
' // ', # 0x08
' * ', # 0x09
'', # 0x0a
'-', # 0x0b
' / ', # 0x0c
' / ', # 0x0d
' // ', # 0x0e
' -/ ', # 0x0f
' +/ ', # 0x10
' X/ ', # 0x11
' /XX/ ', # 0x12
' /X/ ... | gpl-2.0 |
lyndsysimon/hgrid-git-example | app.py | 1 | 1874 | from flask import Flask, jsonify, render_template, request
import json
import os
import tempfile
app = Flask(__name__)
from git_subprocess import Repository
repo_path = '/tmp/test/'
# Set up a git repository for a storage backend
repo = Repository(repo_path or tempfile.mkdtemp())
repo.init()
# Homepage - just rend... | bsd-2-clause |
junrao/kafka | tests/kafkatest/tests/replication_test.py | 4 | 6417 | # 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 use ... | apache-2.0 |
sarvex/tensorflow | tensorflow/python/data/util/traverse_test.py | 8 | 4741 | # 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 |
foss-transportationmodeling/rettina-server | flask/lib/python2.7/site-packages/sqlalchemy/dialects/__init__.py | 21 | 1027 | # dialects/__init__.py
# Copyright (C) 2005-2015 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
__all__ = (
'drizzle',
'firebird',
'mssql',
'mysql',
'oracl... | apache-2.0 |
pombredanne/RESTandra | drivers/py/cql/connection.py | 2 | 7350 |
# 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 |
Michaelmwirigi/lynsays | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/_postgres_builtins.py | 95 | 9692 | # -*- coding: utf-8 -*-
"""
pygments.lexers._postgres_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Self-updating data files for PostgreSQL lexer.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import urllib.request, urllib.p... | mit |
autopulated/ninja | misc/ninja_syntax_test.py | 24 | 6158 | #!/usr/bin/env python
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 |
lliss/tr-55 | tr55/model.py | 1 | 14151 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
"""
TR-55 Model Implementation
A mapping between variable/parameter names found in the TR-55 document
and variables used in this program are as follows:
* `precip` is referred to as P... | apache-2.0 |
spaceof7/QGIS | python/plugins/processing/algs/qgis/HubDistanceLines.py | 6 | 6462 | # -*- coding: utf-8 -*-
"""
***************************************************************************
HubDistanceLines.py
---------------------
Date : May 2010
Copyright : (C) 2010 by Michael Minn
Email : pyqgis at michaelminn dot com
********************... | gpl-2.0 |
resmo/cloudstack | test/integration/smoke/test_affinity_groups_projects.py | 3 | 6214 | #!/usr/bin/env python
# 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
# "Li... | apache-2.0 |
ryanmockabee/golfr | flask/lib/python3.6/site-packages/jinja2/idtracking.py | 130 | 8760 | from jinja2.visitor import NodeVisitor
from jinja2._compat import iteritems
VAR_LOAD_PARAMETER = 'param'
VAR_LOAD_RESOLVE = 'resolve'
VAR_LOAD_ALIAS = 'alias'
VAR_LOAD_UNDEFINED = 'undefined'
def find_symbols(nodes, parent_symbols=None):
sym = Symbols(parent=parent_symbols)
visitor = FrameSymbolVisitor(sym)... | mit |
SCSSG/Odoo-SCS | addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py | 384 | 1320 | #########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gene... | agpl-3.0 |
kmonsoor/npyscreen | npyscreen/wgmultilineeditable.py | 15 | 4413 | import curses
from . import wgwidget
from . import wgmultiline
from . import wgtextbox as textbox
from . import wgboxwidget
class MultiLineEditable(wgmultiline.MultiLine):
_contained_widgets = textbox.Textfield
CHECK_VALUE = True
ALLOW_CONTINUE_EDITING = True
CONTINUE_EDITING_AFTER_... | bsd-2-clause |
Lukc/ospace-lukc | client-pygame/lib/pygameui/ProgressBar.py | 2 | 1287 | #
# Copyright 2001 - 2006 Ludek Smid [http://www.ospace.net/]
#
# This file is part of Pygame.UI.
#
# Pygame.UI is free software; you can redistribute it and/or modify
# it under the terms of the Lesser GNU General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or... | gpl-2.0 |
kevin-coder/tensorflow-fork | tensorflow/lite/experimental/micro/examples/micro_speech/apollo3/captured_data_to_wav.py | 11 | 1442 | # 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 |
luwei0917/awsemmd_script | small_script/computeRg.py | 1 | 2040 | from Bio.PDB.PDBParser import PDBParser
import argparse
parser = argparse.ArgumentParser(description="Compute Rg of pdb")
parser.add_argument("pdb", help="pdb file")
args = parser.parse_args()
def computeRg(pdb_file, chain="A"):
# compute Radius of gyration
# pdb_file = f"/Users/weilu/Research/server/feb_2019/... | mit |
CSC-ORG/Dynamic-Dashboard-2015 | engine/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.py | 2763 | 12536 | ######################## 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... | mit |
batisteo/pasportaservo | hosting/migrations/0042_create_visibility.py | 4 | 3311 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-07-17 10:47
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('hosting', '0041_auto_20170929_1743'),
]
operations... | agpl-3.0 |
freakynit/kaggle-ndsb | configurations/featharalick_bagged_convroll4_big_wd_maxout512.py | 6 | 2632 | import numpy as np
import theano
import theano.tensor as T
import lasagne as nn
import data
import load
import nn_plankton
import dihedral
import tmp_dnn
import tta
features = [
# "hu",
# "tutorial",
"haralick",
# "aaronmoments",
# "lbp",
# "pftas",
# "zernike_moments",
# "image_siz... | mit |
thomsonreuters/electron | script/dump-symbols.py | 6 | 1697 | #!/usr/bin/env python
import os
import sys
from lib.config import PLATFORM
from lib.util import electron_gyp, execute, rm_rf
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
CHROMIUM_DIR = os.path.j... | mit |
Jai-Chaudhary/gensim | gensim/corpora/wikicorpus.py | 4 | 12990 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Copyright (C) 2012 Lars Buitinck <larsmans@gmail.com>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Construct a corpus from a Wikipedia (or other MediaWiki-based) database dum... | gpl-3.0 |
pylixm/sae-django-demo | django1.7-sae/site-packages/django/core/files/uploadedfile.py | 91 | 4334 | """
Classes representing uploaded files.
"""
import errno
import os
from io import BytesIO
from django.conf import settings
from django.core.files.base import File
from django.core.files import temp as tempfile
from django.utils.encoding import force_str
__all__ = ('UploadedFile', 'TemporaryUploadedFile', 'InMemoryU... | apache-2.0 |
Soovox/django-socialregistration | socialregistration/contrib/openid/storage.py | 10 | 2208 | import base64
from openid.association import Association
from openid.store.interface import OpenIDStore
from socialregistration.contrib.openid.models import (OpenIDNonce,
OpenIDStore as OpenIDStoreModel)
class OpenIDStore(OpenIDStore):
max_nonce_age = 6 * 60 * 60
def storeAssociation(self, server_url, ass... | mit |
s-hertel/ansible | lib/ansible/cli/arguments/option_helpers.py | 12 | 17132 | # Copyright: (c) 2018, 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
import copy
import operator
import argparse
import os
import os.path
import sys
import time
import... | gpl-3.0 |
brandonPurvis/osf.io | scripts/migrate_categories.py | 44 | 2635 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
from tests.base import OsfTestCase
from tests.factories import NodeFactory
from website.app import init_app
from website.project.model import Node
logger = logging.getLogger(__name__)
# legacy => new category
MIGRATE_MAP = {
'category': '',
'measu... | apache-2.0 |
akretion/purchase-workflow | purchase_requisition_delivery_address/__openerp__.py | 4 | 1242 | # -*- coding: utf-8 -*-
#
#
# Author: Yannick Vaucher
# Copyright 2014 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License,... | agpl-3.0 |
abtreece/ansible | lib/ansible/plugins/connection/jail.py | 8 | 8028 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# and chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# (c) 2013, Michael Scherer <misc@zarb.org>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it... | mit |
Maximilian-Reuter/SickRage-1 | lib/guessit/rules/properties/video_codec.py | 19 | 2897 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
video_codec and video_profile property
"""
from rebulk.remodule import re
from rebulk import Rebulk, Rule, RemoveMatch
from guessit.rules.common.validators import seps_after, seps_before
from ..common import dash
from ..common.validators import seps_surround
def vid... | gpl-3.0 |
nttks/jenkins-test | cms/djangoapps/contentstore/git_export_utils.py | 12 | 7181 | """
Utilities for export a course's XML into a git repository,
committing and pushing the changes.
"""
import logging
import os
import subprocess
from urlparse import urlparse
from django.conf import settings
from django.contrib.auth.models import User
from django.utils import timezone
from django.utils.translation i... | agpl-3.0 |
marrocamp/weevely3 | modules/file/tar.py | 16 | 1981 | from core.vectors import PhpFile, ModuleExec
from core.module import Module
from core import messages
from core import modules
from core.loggers import log
import os
class Tar(Module):
"""Compress or expand tar archives."""
aliases = [ 'tar' ]
def init(self):
self.register_info(
{
... | gpl-3.0 |
mfherbst/spack | var/spack/repos/builtin/packages/mvapich2/package.py | 2 | 10014 | ##############################################################################
# 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 |
ernestask/meson | tools/ac_converter.py | 8 | 19281 | #!/usr/bin/env python3
# Copyright 2015 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by appl... | apache-2.0 |
alrusdi/lettuce | tests/integration/lib/Django-1.3/django/core/files/move.py | 403 | 2931 | """
Move a file in the safest way possible::
>>> from django.core.files.move import file_move_safe
>>> file_move_safe("/tmp/old_file", "/tmp/new_file")
"""
import os
from django.core.files import locks
try:
from shutil import copystat
except ImportError:
import stat
def copystat(src, dst):
... | gpl-3.0 |
morenopc/edx-platform | lms/djangoapps/courseware/migrations/0003_done_grade_cache.py | 194 | 8745 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# NOTE (vshnayder): This constraint has the wrong field order, so it doesn't actually
# do anything in sqlite. M... | agpl-3.0 |
VitalPet/odoo | addons/email_template/__init__.py | 65 | 1126 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it ... | agpl-3.0 |
thegrill/checkin-control | docs/source/conf.py | 1 | 6111 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# grill-checkin-control documentation build configuration file, created by
# sphinx-quickstart on Sun Jun 25 22:20:49 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are presen... | mit |
lahnerml/espresso | maintainer/check_features.py | 9 | 1064 | # Copyright (C) 2013,2014,2015,2016 The ESPResSo project
# Copyright (C) 2012 Olaf Lenz
#
# This file is part of ESPResSo.
#
# ESPResSo 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 L... | gpl-3.0 |
waldenner/robotframework | install.py | 6 | 3087 | #!/usr/bin/env python
"""Custom Robot Framework installation script.
Usage: python install.py [ in(stall) | un(install) | re(install) ]
Using `python install.py install` simply runs `python setup.py install`
internally. You need to use `setup.py` directly, if you want to alter the
default installation somehow.
To ... | apache-2.0 |
ProcessOut/processout-python | processout/token.py | 1 | 10402 | try:
from urllib.parse import quote_plus
except ImportError:
from urllib import quote_plus
import processout
from processout.networking.request import Request
from processout.networking.response import Response
# The content of this file was automatically generated
class Token(object):
def __init__(sel... | mit |
BDAsdeCorazones/TestAirlines | tabo/cherrypy/cherrypy/test/test_refleaks.py | 22 | 1438 | """Tests for refleaks."""
from cherrypy._cpcompat import HTTPConnection, HTTPSConnection, ntob
import threading
import cherrypy
data = object()
from cherrypy.test import helper
class ReferenceTests(helper.CPWebCase):
def setup_server():
class Root:
def index(self, *args, **kwargs):
... | gpl-2.0 |
Airbitz/airbitz-ofx | qbo.py | 1 | 7851 | #####################################################################
# #
# File: qbo.py #
# Developer: Justin Leto #
# #
# qbo class provides an interface from main csv iterator method #
# to handle qbo formatting, validations, and writing to file. #
# ... | mit |
jamesmarva/d3status | d3status/libs/options.py | 3 | 1419 | ## -*- coding: utf-8 -*-
#
# Copyright (c) 2012 feilong.me. All rights reserved.
#
# @author: Felinx Lee <felinx.lee@gmail.com>
# Created on Jun 30, 2012
#
import logging
import os
from tornado.options import parse_command_line, options, define
def parse_config_file(path):
"""Rewrite tornado def... | apache-2.0 |
zhaodelong/django | django/template/backends/dummy.py | 480 | 2037 | # Since this package contains a "django" module, this is required on Python 2.
from __future__ import absolute_import
import errno
import io
import string
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.template import Origin, TemplateDoesNotExist
from django.utils... | bsd-3-clause |
jnewland/home-assistant | homeassistant/components/toon/climate.py | 6 | 4030 | """Support for Toon thermostat."""
from datetime import timedelta
import logging
from typing import Any, Dict, List
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate.const import (
STATE_AUTO, STATE_COOL, STATE_ECO, STATE_HEAT, SUPPORT_OPERATION_MODE,
SUPPORT_TAR... | apache-2.0 |
arostm/mbed-os | features/FEATURE_LWIP/TESTS/mbedmicro-net/host_tests/udp_shotgun.py | 39 | 4553 | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | apache-2.0 |
franosincic/edx-platform | openedx/core/djangoapps/programs/tests/test_models.py | 8 | 4051 | """Tests for models supporting Program-related functionality."""
import ddt
from django.test import TestCase
import mock
from openedx.core.djangoapps.programs.models import ProgramsApiConfig
from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin
@ddt.ddt
# ConfigurationModels use the cache.... | agpl-3.0 |
yashu-seth/networkx | networkx/release.py | 24 | 7759 | """Release data for NetworkX.
When NetworkX is imported a number of steps are followed to determine
the version information.
1) If the release is not a development release (dev=False), then version
information is read from version.py, a file containing statically
defined version information. This file... | bsd-3-clause |
guettli/django | tests/m2m_through_regress/tests.py | 31 | 10463 | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.core import management
from django.test import TestCase
from django.utils.six import StringIO
from .models import (
Car, CarDriver, Driver, Group, Membership, Person, UserMembership,
)
class M2MThroughTestCase(TestCa... | bsd-3-clause |
CARTAvis/carta | carta/html5/common/skel/source/class/skel/simulation/tStack.py | 3 | 9489 | import unittest
import Util
import time
import selectBrowser
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
from s... | gpl-3.0 |
poondog/kangaroo-m7-mkv | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | 3246 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... | gpl-2.0 |
LIKAIMO/MissionPlanner | ExtLibs/Mavlink/mavlink.py | 34 | 259175 | '''
MAVLink protocol implementation (auto-generated by mavgen.py)
Generated from: ardupilotmega.xml,common.xml
Note: this file has been auto-generated. DO NOT EDIT
'''
import struct, array, mavutil, time
WIRE_PROTOCOL_VERSION = "0.9"
class MAVLink_header(object):
'''MAVLink message header'''
... | gpl-3.0 |
fast-project/fast-lib | vendor/yaml-cpp/test/gmock-1.7.0/gtest/scripts/fuse_gtest_files.py | 2577 | 8813 | #!/usr/bin/env python
#
# Copyright 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... | lgpl-3.0 |
Teamxrtc/webrtc-streaming-node | third_party/depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/gslib/commands/help.py | 25 | 8710 | # -*- coding: utf-8 -*-
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | mit |
rackerlabs/cache-busters | cache_buster/test/test_driver.py | 1 | 5320 | """
Copyright 2013 Rackspace
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
dist... | apache-2.0 |
Azure/azure-sdk-for-python | sdk/core/azure-servicemanagement-legacy/tests/test_legacy_mgmt_sqldatabase.py | 12 | 9488 | # coding: utf-8
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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
# ... | mit |
Nikea/VisTrails | vistrails/packages/controlflow/__init__.py | 2 | 2025 | ###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary for... | bsd-3-clause |
devttys0/binwalk | src/binwalk/modules/compression.py | 2 | 10003 | # Performs raw decompression of various compression algorithms (currently,
# only deflate).
import os
import zlib
import struct
import binwalk.core.compat
import binwalk.core.common
from binwalk.core.module import Option, Kwarg, Module
try:
import lzma
except ImportError:
from backports import lzma
class LZM... | mit |
berkerpeksag/pythondotorg | pydotorg/settings/base.py | 1 | 5943 | import os
import dj_database_url
### Basic config
BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
DEBUG = TEMPLATE_DEBUG = True
SITE_ID = 1
SECRET_KEY = 'its-a-secret-to-everybody'
# Until Sentry works on Py3, do errors the old-fashioned way.
ADMINS = []
# General project information
# T... | apache-2.0 |
soravux/deap | examples/es/cma_bipop.py | 11 | 8270 | # This file is part of DEAP.
#
# DEAP 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 3 of
# the License, or (at your option) any later version.
#
# DEAP is distributed ... | lgpl-3.0 |
neuroidss/nupic | src/nupic/datafiles/extra/gym/raw/makeDataset.py | 27 | 8637 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2010-2015, 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 p... | agpl-3.0 |
abhik/pebl | src/pebl/learner/simanneal.py | 4 | 4032 | """Classes and functions for Simulated Annealing learner"""
from math import exp
import random
from pebl import network, result, evaluator, config
from pebl.learner.base import *
class SALearnerStatistics:
def __init__(self, starting_temp, delta_temp, max_iterations_at_temp):
self.temp = starting_temp
... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.