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 |
|---|---|---|---|---|---|
bsipocz/statsmodels | statsmodels/emplike/aft_el.py | 19 | 18095 | """
Accelerated Failure Time (AFT) Model with empirical likelihood inference.
AFT regression analysis is applicable when the researcher has access
to a randomly right censored dependent variable, a matrix of exogenous
variables and an indicatior variable (delta) that takes a value of 0 if the
observation is censored ... | bsd-3-clause |
salbertperso/ansible-modules-core | packaging/os/package.py | 117 | 2099 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Ansible, inc
#
# 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 o... | gpl-3.0 |
user-none/calibre | src/calibre/gui2/preferences/behavior.py | 14 | 6946 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import re
from PyQt5.Qt import Qt, QListWidgetItem
from calibre.gui2.preferences import ConfigWidgetBase, test_widget, S... | gpl-3.0 |
TeamExodus/external_chromium_org | tools/telemetry/telemetry/util/global_hooks.py | 47 | 1343 | # 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.
"""Hooks that apply globally to all scripts that import or use Telemetry."""
import signal
import sys
from telemetry.util import exception_formatter
def ... | bsd-3-clause |
wrouesnel/ansible | lib/ansible/modules/network/cloudengine/ce_switchport.py | 20 | 27667 | #!/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 |
31415us/trajectory | py/env/lib/python2.7/site-packages/shapely/examples/geoms.py | 25 | 1186 | from numpy import asarray
import pylab
from shapely.geometry import Point, LineString, Polygon
polygon = Polygon(((-1.0, -1.0), (-1.0, 1.0), (1.0, 1.0), (1.0, -1.0)))
point_r = Point(-1.5, 1.2)
point_g = Point(-1.0, 1.0)
point_b = Point(-0.5, 0.5)
line_r = LineString(((-0.5, 0.5), (0.5, 0.5)))
line_g = LineString(((... | mit |
sdgdsffdsfff/jumpserver | apps/assets/migrations/0023_auto_20181016_1650.py | 6 | 1044 | # Generated by Django 2.1.1 on 2018-10-16 08:50
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('assets', '0022_auto_20181012_1717'),
]
operations = [
migrations.AlterModelOptions(
name='commandf... | gpl-2.0 |
atheed/servo | tests/wpt/css-tests/tools/pywebsocket/src/example/echo_client.py | 442 | 44484 | #!/usr/bin/env python
#
# Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | mpl-2.0 |
npiganeau/odoo | addons/purchase/wizard/purchase_line_invoice.py | 205 | 5419 | # -*- 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 |
aronsky/home-assistant | homeassistant/components/sensor/ebox.py | 8 | 4887 | """
Support for EBox.
Get data from 'My Usage Page' page: https://client.ebox.ca/myusage
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.ebox/
"""
import logging
from datetime import timedelta
import voluptuous as vol
import homeassistant.helper... | apache-2.0 |
gimite/personfinder | app/vendors/chardet/mbcsgroupprober.py | 343 | 2012 | ######################## 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... | apache-2.0 |
jermainewang/mxnet | example/rcnn/rcnn/utils/save_model.py | 41 | 1548 | # 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 |
DevOps4Networks/ansible | lib/ansible/plugins/callback/mail.py | 22 | 4812 | # -*- coding: utf-8 -*-
# Copyright 2012 Dag Wieers <dag@wieers.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your ... | gpl-3.0 |
hoh/pytest-django | docs/conf.py | 11 | 8039 | # -*- coding: utf-8 -*-
#
# pytest-django documentation build configuration file, created by
# sphinx-quickstart on Tue May 1 10:12:50 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | bsd-3-clause |
nickgentoo/scikit-learn-graph | skgraph/datasets/load_graph_datasets.py | 1 | 27349 | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 13 13:02:41 2015
Copyright 2015 Nicolo' Navarin
This file is part of scikit-learn-graph.
scikit-learn-graph 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 ... | gpl-3.0 |
Jumpscale/core9 | JumpScale9/tools/nodemgr/Node.py | 1 | 8095 | from js9 import j
TEMPLATE = """
name = ""
clienttype = ""
sshclient = ""
active = false
selected = false
category = ""
description = ""
secretconfig_ = ""
pubconfig = ""
installed = false
zosclient = ""
"""
FormBuilderBaseClass = j.tools.formbuilder.baseclass_get()
JSBASE = j.application.jsbase_get_class()
class ... | apache-2.0 |
dagbldr/dagbldr | dagbldr/externals/build/scripts-3.4/get_objgraph.py | 2 | 1198 | #!/Users/User/anaconda3/bin/python
#
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 2008-2015 California Institute of Technology.
# License: 3-clause BSD. The full license text is available at:
# - http://trac.mystic.cacr.caltech.edu/project/pathos/browser/dill/LICENSE
"""
use objgraph t... | bsd-3-clause |
certik/pyjamas | examples/timesheet/view/components/PreferencesDlg.py | 5 | 2473 |
# vim: set ts=4 sw=4 expandtab:
from ApplicationConstants import Notification
from pyjamas.ui.HorizontalPanel import HorizontalPanel
from pyjamas.ui.VerticalPanel import VerticalPanel
from pyjamas.ui.Label import Label
from pyjamas.ui.Button import Button
from pyjamas.ui.DialogBox import DialogBox
from pyjamas.ui.Fl... | apache-2.0 |
thebe2/ding | morning/notice_montage.py | 1 | 10104 | # *-* coding: utf-8 *-*
# 抓取证券日报上的每日交易公告集锦
# http://www.ccstock.cn/meiribidu/jiaoyitishi/
# 代码版本 python 2.7 IDE:PyCharm
import requests
import random
import sys
import time
from bs4 import BeautifulSoup
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.header import Header
i... | mit |
florianholzapfel/home-assistant | homeassistant/components/sensor/neurio_energy.py | 11 | 3138 | """
Support for monitoring an Neurio hub.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.neurio_energy/
"""
import logging
import requests.exceptions
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from home... | mit |
Northrend/mxnet | example/image-classification/symbols/inception-resnet-v2.py | 34 | 6928 | # 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 |
aronsky/home-assistant | homeassistant/helpers/sun.py | 13 | 2564 | """Helpers for sun events."""
import datetime
from homeassistant.core import callback
from homeassistant.util import dt as dt_util
from homeassistant.loader import bind_hass
DATA_LOCATION_CACHE = 'astral_location_cache'
@callback
@bind_hass
def get_astral_location(hass):
"""Get an astral location for the curren... | apache-2.0 |
gkc1000/pyscf | pyscf/hessian/thermo.py | 1 | 14002 | #!/usr/bin/env python
#
# This code was copied from the data generation program of Tencent Alchemy
# project (https://github.com/tencent-alchemy).
#
#
# #
# # Copyright 2019 Tencent America LLC. All Rights Reserved.
# #
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file e... | apache-2.0 |
msneddon/kb_sdk | lib/biokbase/common/filetools.py | 15 | 3946 | import os as _os
import xlrd as _xlrd
import datetime as _datetime
def touch(fname, times=None):
'''Python implementation of the unix touch command. See os.utime for the
format of the times argument. Reference:
http://stackoverflow.com/questions/1158076/implement-touch-using-python
'''
with file(... | mit |
mk-fg/yapps | yapps/grammar.py | 1 | 8914 | # grammar.py, part of Yapps 2 - yet another python parser system
# Copyright 1999-2003 by Amit J. Patel <amitp@cs.stanford.edu>
# Enhancements copyright 2003-2004 by Matthias Urlichs <smurf@debian.org>
#
# This version of the Yapps 2 grammar can be distributed under the
# terms of the MIT open source license, either fo... | mit |
faust64/ansible | lib/ansible/modules/network/nxos/nxos_gir_profile_management.py | 6 | 6643 | #!/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 |
katiecheng/Bombolone | env/lib/python2.7/site-packages/jinja2/environment.py | 614 | 47244 | # -*- coding: utf-8 -*-
"""
jinja2.environment
~~~~~~~~~~~~~~~~~~
Provides a class that holds runtime and parsing time options.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
from jinja2 import nodes
from jinja2.defaults import BLOCK_S... | bsd-3-clause |
albertliangcode/DiceRoll | venv/lib/python2.7/site-packages/pip/commands/search.py | 81 | 4464 | from __future__ import absolute_import
import logging
import sys
import textwrap
from pip.basecommand import Command, SUCCESS
from pip.download import PipXmlrpcTransport
from pip.index import PyPI
from pip.utils import get_terminal_size
from pip.utils.logging import indent_log
from pip.exceptions import CommandError
... | mit |
tshirtman/ultimate-smash-friends | usf/screens/level.py | 1 | 3174 | ################################################################################
# copyright 2009 Gabriel Pettier <gabriel.pettier@gmail.com> #
# #
# This file is part of Ultimate Smash Friends. ... | gpl-3.0 |
gustavoatt/consultas | consultas_proyecto/pacientes_app/tests/test_forms.py | 1 | 1548 | from django import test
from pacientes_app import forms
from pacientes_app import models
class PacienteEditFormTestCase(test.TestCase):
def setUp(self):
self.paciente = models.Paciente.objects.create(
cedula='18423347',
fecha_nacimiento='1988-03-26'
)
def test_valid_form(self):
data =... | mit |
nkhuyu/commons | src/python/twitter/common/java/class_file.py | 15 | 7170 | # ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | apache-2.0 |
eirannejad/pyRevit | pyrevitlib/pyrevit/coreutils/markdown/extensions/footnotes.py | 1 | 14914 | """
Footnotes Extension for Python-Markdown
=======================================
Adds footnote handling to Python-Markdown.
See <https://pythonhosted.org/Markdown/extensions/footnotes.html>
for documentation.
Copyright The Python Markdown Project
License: [BSD](http://www.opensource.org/licenses/bsd-license.php)... | gpl-3.0 |
wangadong/shadowsocks | shadowsocks/crypto/util.py | 1032 | 4287 | #!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 ... | apache-2.0 |
feanil/ansible-modules-core | cloud/amazon/rds_param_group.py | 104 | 10673 | #!/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 distributed... | gpl-3.0 |
nwjs/blink | Tools/Scripts/webkitpy/common/version_check.py | 70 | 1733 | # Copyright (c) 2011 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 |
sbellem/django | tests/migrations/test_graph.py | 167 | 11672 | import warnings
from django.db.migrations.exceptions import (
CircularDependencyError, NodeNotFoundError,
)
from django.db.migrations.graph import RECURSION_DEPTH_WARNING, MigrationGraph
from django.test import SimpleTestCase
from django.utils.encoding import force_text
class GraphTests(SimpleTestCase):
"""
... | bsd-3-clause |
mcdeaton13/Tax-Calculator | docs/source/conf.py | 2 | 11308 | # -*- coding: utf-8 -*-
#
# Tax Calculator documentation build configuration file, created by
# sphinx-quickstart on Mon Mar 9 17:06:10 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file... | mit |
HaroldMills/Vesper | scripts/create_randomized_station_night_list.py | 1 | 2218 | '''
Script that creates a randomized list of station/night pairs.
Given a list of station names and a list of night dates, this script
writes a semi-randomized list of the elements of the cartesian product
of the two lists to a CSV file. The station names cycle through an
alphabetized version of the input station name... | mit |
Albinoman887/pyramid-3.4.10 | 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 |
xcgoner/powerlore | cxxtest/cxxtest/cxx_parser.py | 31 | 72662 | #-------------------------------------------------------------------------
# CxxTest: A lightweight C++ unit testing library.
# Copyright (c) 2008 Sandia Corporation.
# This software is distributed under the LGPL License v2.1
# For more information, see the COPYING file in the top CxxTest directory.
# Under the terms o... | apache-2.0 |
takeshineshiro/tornado | tornado/test/httpserver_test.py | 68 | 41032 | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function, with_statement
from tornado import netutil
from tornado.escape import json_decode, json_encode, utf8, _unicode, recursive_unicode, native_str
from tornado import gen
from tornado.http1connection import HTTP1Connection
from tornado... | apache-2.0 |
eaplatanios/tensorflow | tensorflow/python/grappler/constant_folding_test.py | 27 | 2247 | # 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 |
servo/servo | python/servo/testing_commands.py | 4 | 43321 | # Copyright 2013 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
#... | mpl-2.0 |
ArcaniteSolutions/truffe2 | truffe2/main/migrations/0009_auto__add_field_signature_ip__add_field_signature_useragent.py | 2 | 15918 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Signature.ip'
db.add_column(u'main_signature', 'ip',
... | bsd-2-clause |
shakamunyi/sahara | sahara/tests/unit/plugins/cdh/test_versionfactory.py | 1 | 1665 | # Copyright (c) 2015 Mirantis 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 writ... | apache-2.0 |
eusoubrasileiro/fatiando | cookbook/gravmag_eqlayer_pel_upcontinue.py | 2 | 2216 | """
GravMag: Use the polynomial equivalent layer to upward continue gravity data
"""
from fatiando.gravmag import prism, sphere
from fatiando.gravmag.eqlayer import PELGravity, PELSmoothness
from fatiando.inversion.regularization import LCurve
from fatiando import gridder, utils, mesher
from fatiando.vis import mpl
# ... | bsd-3-clause |
ykaneko/ryu | ryu/contrib/ncclient/capabilities.py | 65 | 2355 | # Copyright 2009 Shikhar Bhushan
#
# 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 |
Leila20/django | tests/admin_changelist/models.py | 276 | 2890 | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class Event(models.Model):
# Oracle can have problems with a column named "date"
date = models.DateField(db_column="event_date")
class Parent(models.Model):
name = models.CharField(max_length=128)
class Child(mo... | bsd-3-clause |
splav/servo | components/script/dom/bindings/codegen/parser/tests/test_builtins.py | 276 | 1798 | import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
interface TestBuiltins {
attribute boolean b;
attribute byte s8;
attribute octet u8;
attribute short s16;
attribute unsigned short u16;
attribute long s32;
attribute unsigne... | mpl-2.0 |
LeartS/odoo | addons/calendar/__openerp__.py | 28 | 2079 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
mateon1/servo | tests/wpt/web-platform-tests/subresource-integrity/tools/list_hashes.py | 191 | 1440 | from os import path, listdir
from hashlib import sha512, sha384, sha256, md5
from base64 import b64encode
import re
DIR = path.normpath(path.join(__file__, "..", ".."))
'''
Yield each javascript and css file in the directory
'''
def js_and_css_files():
for f in listdir(DIR):
if path.isfile(f) and (f.endswith(".... | mpl-2.0 |
SamProtas/PALiquor | geocode_fixes.py | 1 | 2733 | import os
import pandas as pd
import numpy as np
import sqlite3
import requests
import time
def fix_location(lid, new_address):
pd.set_option('display.mpl_style', 'default')
PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__))
DATABASE1 = os.path.join(PROJECT_ROOT, 'dbs', 'licensees.db')
... | gpl-2.0 |
BeATz-UnKNoWN/python-for-android | python3-alpha/python3-src/Lib/test/curses_tests.py | 194 | 1242 | #!/usr/bin/env python3
#
# $Id: ncurses.py 36559 2004-07-18 05:56:09Z tim_one $
#
# Interactive test suite for the curses module.
# This script displays various things and the user should verify whether
# they display correctly.
#
import curses
from curses import textpad
def test_textpad(stdscr, insert_mode=False):
... | apache-2.0 |
pitch-sands/i-MPI | flask/Lib/site-packages/chardet/big5freq.py | 3133 | 82594 | ######################## 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... | bsd-3-clause |
pjdelport/django-cities | cities/migrations/0009_add_slug_fields_to_models.py | 2 | 1753 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-27 13:23
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cities', '0008_add_code_to_district'),
]
operations = [
migrations.AddField... | mit |
liyi193328/seq2seq | seq2seq/contrib/learn/tests/dataframe/arithmetic_transform_test.py | 62 | 2343 | # 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 |
andersinno/suds-jurko | tests/external/axis2.py | 8 | 4958 | # This program is free software; you can redistribute it and/or modify it under
# the terms of the (LGPL) 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.
#
# This program is distributed in the hope that it will b... | lgpl-3.0 |
MakMukhi/grpc | src/python/grpcio_tests/tests/unit/_thread_pool.py | 23 | 2098 | # 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 conditions and the f... | bsd-3-clause |
poffuomo/spark | examples/src/main/python/ml/vector_slicer_example.py | 123 | 1535 | #
# 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 us... | apache-2.0 |
jeffzheng1/tensorflow | tensorflow/contrib/learn/python/learn/experiment.py | 4 | 15233 | # 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 |
rotofly/odoo | addons/hr_attendance/__openerp__.py | 260 | 2073 | # -*- 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 |
markherringer/waywayd | third-party/django_multilingual/multilingual/query.py | 1 | 26323 | """
Django-multilingual: a QuerySet subclass for models with translatable
fields.
This file contains the implementation for QSRF Django.
"""
import datetime
from django.core.exceptions import FieldError
from django.db import connection
from django.db.models.fields import FieldDoesNotExist
from django.db.models.query... | agpl-3.0 |
MrCodeYu/spark | examples/src/main/python/mllib/streaming_linear_regression_example.py | 77 | 2117 | #
# 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 us... | apache-2.0 |
Braiiin/outline-client | outline_client/admin/views.py | 1 | 2399 | from flask import Blueprint, render_template, request, redirect, url_for, \
jsonify
from flask_login import login_required, current_user
from outline_client.libs.outline import Outline
from client.libs.service import Service, Employment
from .forms import AddOutlineForm, EditOutlineForm
import functools
# setup ad... | apache-2.0 |
slevenhagen/odoo-npg | addons/l10n_fr/__init__.py | 424 | 1447 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
#... | agpl-3.0 |
getzze/python-ivi | ivi/agilent/agilent7000A.py | 7 | 1789 | """
Python Interchangeable Virtual Instrument Library
Copyright (c) 2012-2014 Alex Forencich
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... | mit |
prefetchnta/questlab | bin/x64bin/python/36/Lib/glob.py | 2 | 5809 | """Filename globbing utility."""
import os
import re
import fnmatch
__all__ = ["glob", "iglob", "escape"]
def glob(pathname, *, recursive=False):
"""Return a list of paths matching a pathname pattern.
The pattern may contain simple shell-style wildcards a la
fnmatch. However, unlike fnmatch,... | lgpl-2.1 |
bendalab/thunderfish | thunderfish/pulseplots.py | 3 | 38137 | """
Plot and save key steps in pulses.py for visualizing the alorithm.
"""
import glob
import numpy as np
from scipy import stats
from matplotlib import rcParams, gridspec, ticker
import matplotlib.pyplot as plt
try:
from matplotlib.colors import colorConverter as cc
except ImportError:
import matp... | gpl-3.0 |
rtucker-mozilla/mozilla_inventory | reversion_compare/__init__.py | 3 | 1528 | # coding: utf-8
import os
import time
import warnings
import subprocess
__version__ = (0, 3, 4)
VERSION_STRING = '.'.join(str(part) for part in __version__)
#VERBOSE = True
VERBOSE = False
def _error(msg):
if VERBOSE:
warnings.warn(msg)
return ""
def get_commit_timestamp(path=None):
if path ... | bsd-3-clause |
prasadvagdargi/med_image_analysis | Examples/Python/DicomSeriesReader2.py | 3 | 2686 | #!/usr/bin/env python
#=========================================================================
#
# Copyright Insight Software Consortium
#
# 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 |
hbrunn/OpenUpgrade | addons/stock/wizard/stock_return_picking.py | 103 | 9260 | # -*- 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 |
binhqnguyen/lena | nsc/scons-local-1.2.0.d20090223/SCons/Tool/PharLapCommon.py | 19 | 5246 | """SCons.Tool.PharLapCommon
This module contains common code used by all Tools for the
Phar Lap ETS tool chain. Right now, this is linkloc and
386asm.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtai... | gpl-2.0 |
kenshay/ImageScripter | ProgramData/SystemFiles/Python/Lib/site-packages/pylint/test/test_func.py | 3 | 2003 | # Copyright (c) 2003-2016 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
"""functional/non regression tests for pylint"""
import unit... | gpl-3.0 |
cst13/canstel | do_release.py | 1 | 1732 | #!/usr/bin/env python
import sys
import argparse
import pkg_resources
from moneywagon import service_table
from moneywagon.supply_estimator import write_blocktime_adjustments
from subprocess import call
parser = argparse.ArgumentParser()
parser.add_argument('--minor', action='store_true', help='Make minor release.'... | mit |
sampadsaha5/sympy | sympy/physics/units.py | 18 | 8849 | """
Physical units and dimensions.
The base class is Unit, where all here defined units (~200) inherit from.
The find_unit function can help you find units for a given quantity:
>>> import sympy.physics.units as u
>>> u.find_unit('coul')
['coulomb', 'coulombs']
>>> u.find_unit(u.charge)
['C', 'ch... | bsd-3-clause |
edhuckle/statsmodels | statsmodels/examples/example_discrete_mnl.py | 33 | 2562 | """Example: statsmodels.discretemod
"""
from __future__ import print_function
from statsmodels.compat.python import lrange
import numpy as np
import statsmodels.api as sm
anes_data = sm.datasets.anes96.load()
anes_exog = anes_data.exog
anes_exog = sm.add_constant(anes_exog, prepend=False)
mlogit_mod = sm.MNLogit(anes... | bsd-3-clause |
EloYGomeZ/test_kernel_g620s | tools/perf/tests/attr.py | 3174 | 9441 | #! /usr/bin/python
import os
import sys
import glob
import optparse
import tempfile
import logging
import shutil
import ConfigParser
class Fail(Exception):
def __init__(self, test, msg):
self.msg = msg
self.test = test
def getMsg(self):
return '\'%s\' - %s' % (self.test.path, self.msg)... | gpl-2.0 |
sg00dwin/origin | vendor/github.com/google/certificate-transparency/python/ct/client/scanner.py | 33 | 8352 | #!/usr/bin/env python
import collections
import functools
import multiprocessing
import traceback
import Queue
from ct.client import entry_decoder
from ct.client import log_client
from ct.crypto import cert
from ct.crypto import error
from ct.proto import client_pb2
# Messages types:
# Special queue messages to sto... | apache-2.0 |
fly19890211/edx-platform | openedx/core/djangoapps/content/course_structures/tasks.py | 54 | 3704 | import json
import logging
from celery.task import task
from opaque_keys.edx.keys import CourseKey
from xmodule.modulestore.django import modulestore
log = logging.getLogger('edx.celery.task')
def _generate_course_structure(course_key):
"""
Generates a course structure dictionary for the specified course.
... | agpl-3.0 |
tagatac/scrapy | scrapy/downloadermiddlewares/ajaxcrawl.py | 116 | 3427 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import re
import logging
import six
from w3lib import html
from scrapy.exceptions import NotConfigured
from scrapy.http import HtmlResponse
from scrapy.utils.response import _noscript_re, _script_re
logger = logging.getLogger(__name__)
class AjaxCrawl... | bsd-3-clause |
mjtamlyn/archery-scoring | tamlynscore/settings.py | 1 | 3308 | import os
import dj_database_url
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DEBUG = not os.environ.get('PRODUCTION')
ALLOWED_HOSTS = [
'tamlynscore.co.uk',
'www.tamlynscore.co.uk',
'127.0.0.1',
'localhost',
'192.168.1.101',
'192.168.1.100',
]
ADMINS = (
('Marc Tamlyn', 'marc.... | bsd-3-clause |
intlabs/cannyos-backend-dashboard | horizon-master/openstack_dashboard/dashboards/admin/networks/ports/tables.py | 9 | 4004 | # Copyright 2012 NEC 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 or ag... | mit |
ajnirp/servo | etc/ci/performance/test_runner.py | 26 | 14471 | #!/usr/bin/env python3
# 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/.
import runner
import pytest
def test_log_parser():
mock_log = b'''
[PERF] perf block start... | mpl-2.0 |
talhajaved/nyuadmarket | flask/lib/python2.7/site-packages/pip/commands/uninstall.py | 119 | 2564 | from __future__ import absolute_import
from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.basecommand import Command
from pip.exceptions import InstallationError
class UninstallCommand(Command):
"""
Uninstall packages.
pip is able to uninstall most installed packages. Kn... | mit |
krieger-od/nwjs_chromium.src | tools/telemetry/telemetry/core/heap/chrome_js_heap_snapshot_parser.py | 44 | 9525 | # 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
from telemetry.core.heap import live_heap_object
from telemetry.core.heap import retaining_edge
class ChromeJsHeapSnapshotParser(object):
""... | bsd-3-clause |
mozilla/olympia | src/olympia/users/migrations/0001_initial.py | 7 | 10444 | # Generated by Django 2.2.5 on 2019-09-12 13:51
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import olympia.amo.fields
import olympia.amo.models
import olympia.amo.validators
import olympia.users.mo... | bsd-3-clause |
HybridF5/tempest_debug | tempest/lib/cli/base.py | 5 | 16744 | # Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
lnielsen/invenio | invenio/ext/sqlalchemy/types/legacytinyinteger.py | 2 | 1829 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2011, 2012, 2013, 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 ... | gpl-2.0 |
christianurich/VIBe2UrbanSim | 3rdparty/opus/src/urbansim/configs/general_configuration.py | 2 | 16471 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2005-2009 University of Washington
# See opus_core/LICENSE
import os
from opus_core.configuration import Configuration
from opus_core.configurations.dataset_pool_configuration import DatasetPoolConfiguration
from opus_core.database_management.configurat... | gpl-2.0 |
sublime1809/django | django/middleware/clickjacking.py | 185 | 1994 | """
Clickjacking Protection Middleware.
This module provides a middleware that implements protection against a
malicious site loading resources from your site in a hidden frame.
"""
from django.conf import settings
class XFrameOptionsMiddleware(object):
"""
Middleware that sets the X-Frame-Options HTTP head... | bsd-3-clause |
stack-of-tasks/rbdlpy | tutorial/lib/python2.7/site-packages/ttfquery/ttfmetadata.py | 2 | 1068 | #!/usr/bin/env python
"""Query for meta-data for a given font"""
from ttfquery import describe
from ttfquery._scriptregistry import registry
import sys, os
def printMetaData( metadata ):
print ' Specific Name:', metadata[2]
print ' File:', metadata[0]
print ' Modifiers:', metadata[1]
print ' ... | lgpl-3.0 |
xujb/odoo | addons/crm/report/crm_phonecall_report.py | 309 | 3982 | # -*- 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 |
ChinaHackers/ssbc | web/views.py | 22 | 4082 | #coding: utf8
import re
import datetime
import sys
import urllib
from django.http import Http404
from django.views.decorators.cache import cache_page
from django.shortcuts import render, redirect
from lib import politics
import workers.metautils
from search.models import RecKeywords, Hash
re_punctuations = re.compil... | gpl-2.0 |
msegado/edx-platform | common/lib/xmodule/xmodule/modulestore/split_mongo/definition_lazy_loader.py | 213 | 1560 | from opaque_keys.edx.locator import DefinitionLocator
import copy
class DefinitionLazyLoader(object):
"""
A placeholder to put into an xblock in place of its definition which
when accessed knows how to get its content. Only useful if the containing
object doesn't force access during init but waits unt... | agpl-3.0 |
mortcanty/earthengine | src/Crypto/SelfTest/__init__.py | 111 | 3418 | # -*- coding: utf-8 -*-
#
# SelfTest/__init__.py: Self-test for PyCrypto
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public... | mit |
sainathadapa/fastai-courses | deeplearning2/vgg16.py | 9 | 4276 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
import warnings
from keras.models import Model
from keras.layers import Flatten, Dense, Input, Dropout
from keras.layers import Convolution2D, MaxPooling2D
from keras.engine.topology import get_source_inputs
from kera... | apache-2.0 |
tamsky/ansible-upstream | lib/ansible/inventory/script.py | 19 | 6511 | # (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 |
912/M-new | virtualenvironment/experimental/lib/python2.7/site-packages/django/contrib/auth/admin.py | 52 | 8051 | from django.db import transaction
from django.conf import settings
from django.contrib import admin
from django.contrib.admin.options import IS_POPUP_VAR
from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.forms import (UserCreationForm, UserChangeForm,
AdminPasswordChangeForm)
from dj... | gpl-2.0 |
ikoula/cloudstack | tools/marvin/marvin/codes.py | 3 | 4087 | # 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... | gpl-2.0 |
goujonpa/assotextmining | gabriel.py | 1 | 3496 | # gets all the asso posts and puts it in a single .txt file
import json
import os
txt_250 = list()
txt_500 = list()
txt_1000 = list()
txt_1500 = list()
txt_plus = list()
stats_250 = list()
stats_500 = list()
stats_1000 = list()
stats_1500 = list()
stats_plus = list()
varrad = u'txt_'
varrad2 = u'stats_'
for i in r... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.