repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
ryanneufeld/OctoPrint | refs/heads/master | tests/filemanager/test_localstorage.py | 6 | # coding=utf-8
from __future__ import absolute_import
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import unittest
import os
im... |
xiangel/hue | refs/heads/master | desktop/core/ext-py/python-ldap-2.3.13/Demo/simplebrowse.py | 40 | #! python
#
# simple LDAP server browsing example
#
import ldap
import string
from traceback import print_exc
url = "ldap://ldap.openldap.org/"
dn = "dc=openldap,dc=org"
print "Connecting to", url
l = ldap.initialize(url)
l.bind_s("", "", ldap.AUTH_SIMPLE);
lastdn = dn
dnlist = None
while 1:
#-- read a comm... |
almeidapaulopt/erpnext | refs/heads/develop | erpnext/accounts/general_ledger.py | 2 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, erpnext
from frappe.utils import flt, cstr, cint
from frappe import _
from frappe.model.meta import get_field_precision
from erpnext.acco... |
CuonDeveloper/cuon | refs/heads/master | cuon_client/cuon_newclient/bin/cuon/User/user.py | 1 | # -*- coding: utf-8 -*-
##Copyright (C) [2003-2005] [Juergen Hamel, D-32584 Loehne]
##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 lat... |
bdh1011/wau | refs/heads/master | venv/lib/python2.7/site-packages/celery/tests/utils/test_mail.py | 8 | from __future__ import absolute_import
from celery.utils.mail import Message, Mailer, SSLError
from celery.tests.case import Case, Mock, patch
msg = Message(to='george@vandelay.com', sender='elaine@pendant.com',
subject="What's up with Jerry?", body='???!')
class test_Message(Case):
def test_re... |
tomsitter/cloudhealth | refs/heads/master | profile/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
ChristineLaMuse/mozillians | refs/heads/master | vendor-local/lib/python/celery/signals.py | 12 | # -*- coding: utf-8 -*-
"""
celery.signals
~~~~~~~~~~~~~~
See :ref:`signals`.
:copyright: (c) 2009 - 2012 by Ask Solem.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from .utils.dispatch import Signal
task_sent = Signal(providing_args=["task_id", "task"... |
krux/duplicity-pkg | refs/heads/master | duplicity/backends/giobackend.py | 3 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2009 Michael Terry <mike@mterry.name>
#
# This file is part of duplicity.
#
# Duplicity is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; ei... |
hainn8x/gnuradio | refs/heads/master | gnuradio-runtime/python/gnuradio/gr/gateway.py | 24 | #
# Copyright 2011-2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version... |
mytliulei/Scapy | refs/heads/master | scapy/contrib/ppi_cace.py | 19 | ## This file is (hopefully) part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## <jellch@harris.com>
## This program is published under a GPLv2 license
# scapy.contrib.description = PPI CACE
# scapy.contrib.status = loads
"""
CACE PPI types
"""
import logging,struct
from sca... |
Solthis/Fugen-2.0 | refs/heads/master | template_processor/array_template_processor.py | 1 | # coding: utf-8
# Copyright 2017 Solthis.
#
# This file is part of Fugen 2.0.
#
# Fugen 2.0 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 ver... |
idahu29/payment-redis | refs/heads/master | test.py | 12 | import pytest
from basedir import basedir
import os
import shutil
import sys
def main():
argv = []
argv.extend(sys.argv[1:])
pytest.main(argv)
try:
os.remove(os.path.join(basedir, '.coverage'))
except OSError:
pass
try:
shutil.rmtree(os.path.join(basedir, '.cache')... |
riftstation/riftstation | refs/heads/master | tools/travis/template_dm_generator.py | 132 | #!/usr/bin/env python
import os
import os.path
import sys
folders = ["_maps/RandomRuins", "_maps/RandomZLevels", "_maps/shuttles",
"_maps/templates"]
generated = "_maps/templates.dm"
template_filenames = []
def find_dm(path):
L = []
for dirpath, dirnames, filenames in os.walk(path):
for ... |
odootr/odoo | refs/heads/8.0 | addons/hr_timesheet_sheet/report/__init__.py | 342 | # -*- 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... |
consulo/consulo-python | refs/heads/master | plugin/src/test/resources/refactoring/changeSignature/classMethod.after.py | 73 | class A:
def fo<caret>o(self, a, b):
pass
class B(A):
def foo(self, a, b):
pass
class С(A):
def foo(self, a, b):
pass
a = A()
a.foo(1, 2)
b = B()
b.foo(2, 2) |
snnn/tensorflow | refs/heads/master | tensorflow/contrib/eager/python/examples/linear_regression/linear_regression_test.py | 39 | # 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... |
yize/grunt-tps | refs/heads/master | tasks/lib/python/Lib/python2.7/email/test/test_email.py | 54 | # Copyright (C) 2001-2010 Python Software Foundation
# Contact: email-sig@python.org
# email package unit tests
import os
import sys
import time
import base64
import difflib
import unittest
import warnings
import textwrap
from cStringIO import StringIO
import email
from email.Charset import Charset
from email.Header... |
moto-timo/ironpython3 | refs/heads/master | Tests/interop/net/field/__init__.py | 3 | #####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the License.html file at the root of th... |
pinterest/kingpin | refs/heads/master | kingpin/tests/manageddata/test_managed_hashmap.py | 1 | #!/usr/bin/python
#
# Copyright 2016 Pinterest, 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... |
ahmed-mahran/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/django/contrib/auth/tests/custom_user.py | 185 | from django.db import models
from django.contrib.auth.models import (
BaseUserManager,
AbstractBaseUser,
AbstractUser,
UserManager,
PermissionsMixin,
Group,
Permission,
)
# The custom User uses email as the unique identifier, and requires
# that every user provide a date of birth. This let... |
samuto/Honeybee | refs/heads/master | src/Honeybee_Annual Daylight Simulation.py | 1 | #
# Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari
#
# This file is part of Honeybee.
#
# Copyright (c) 2013-2015, Mostapha Sadeghipour Roudsari <Sadeghipour@gmail.com>
# Honeybee is free software; you can redistribute it and/or modify
# it under the terms of the GNU Ge... |
githubmlai/numpy | refs/heads/master | numpy/f2py/crackfortran.py | 53 | #!/usr/bin/env python
"""
crackfortran --- read fortran (77,90) code and extract declaration information.
Copyright 1999-2004 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRANTY IS EXPRESSE... |
cdrooom/odoo | refs/heads/master | addons/l10n_hn/__openerp__.py | 8 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009-2010 Salvatore Josué Trimarchi Pinto <salvatore@trigluu.com>
# (http://trigluu.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gen... |
roadmapper/ansible | refs/heads/devel | lib/ansible/modules/network/fortios/fortios_switch_controller_switch_group.py | 7 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... |
yashodhank/erpnext | refs/heads/develop | erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.py | 121 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class AppraisalTemplateGoal(Document):
pass |
arodic/three.js | refs/heads/master | utils/exporters/blender/tests/scripts/exporter.py | 295 | import os
import argparse
import sys
import io_three
from io_three.exporter import constants
try:
separator = sys.argv.index('--')
except IndexError:
print('ERROR: no parameters specified')
sys.exit(1)
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('filepath')
for k... |
nthuion/nthuion-backend | refs/heads/master | tests/__init__.py | 12133432 | |
MajinBui/django-portal | refs/heads/master | portal/migrations/__init__.py | 12133432 | |
dwiajik/twit-macet-mining-v3 | refs/heads/master | clustering/birch.py | 12133432 | |
dburr/SchoolIdolAPI | refs/heads/master | web/templatetags/__init__.py | 12133432 | |
hackerbot/DjangoDev | refs/heads/master | tests/migrations/related_models_app/__init__.py | 12133432 | |
mushtaqak/edx-platform | refs/heads/master | lms/djangoapps/survey/migrations/__init__.py | 12133432 | |
sacnayak/ssnayak-viz | refs/heads/master | lib/httplib2/test/brokensocket/socket.py | 314 | from realsocket import gaierror, error, getaddrinfo, SOCK_STREAM
|
tedder/ansible | refs/heads/devel | lib/ansible/modules/network/f5/bigip_asm_policy_signature_set.py | 9 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
ThinkOpen-Solutions/odoo | refs/heads/stable | addons/website_crm_partner_assign/models/res_partner.py | 314 | # -*- coding: utf-8 -*-
from openerp.osv import osv, fields
class res_partner_grade(osv.osv):
_inherit = 'res.partner.grade'
_columns = {
'website_published': fields.boolean('Published On Website', copy=False),
}
|
msabramo/ansible | refs/heads/devel | lib/ansible/modules/web_infrastructure/ansible_tower/tower_group.py | 33 | #!/usr/bin/python
#coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
#
# This module 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 optio... |
maru-sama/pyblosxom | refs/heads/master | Pyblosxom/plugins/rst_parser.py | 3 | #######################################################################
# This file is part of Pyblosxom.
#
# Copyright (c) 2003, 2004, 2005 Sean Bowman
# Copyright (c) 2011 Will Kahn-Greene
#
# Pyblosxom is distributed under the MIT license. See the file
# LICENSE for distribution details.
###########################... |
quxiaolong1504/django | refs/heads/master | tests/context_processors/urls.py | 452 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^request_attrs/$', views.request_processor),
url(r'^debug/$', views.debug_processor),
]
|
tempbottle/h-store | refs/heads/master | tests/scripts/xml2/exceptions.py | 9 | class XMLException(Exception):
"""General XML Exception.
"""
pass
class InvalidXML(XMLException):
"""Invalid XML Exception.
This is raised when the XML is mal-formed.
"""
pass
class InvalidObject(XMLException):
"""Invalid Python object exception.
This is raised when the Python ... |
derDavidT/sympy | refs/heads/master | sympy/liealgebras/type_b.py | 76 | from __future__ import print_function, division
from .cartan_type import Standard_Cartan
from sympy.core.compatibility import range
from sympy.matrices import eye
class TypeB(Standard_Cartan):
def __new__(cls, n):
if n < 2:
raise ValueError("n can not be less than 2")
return Standard_... |
m1z0r3/gshark | refs/heads/master | api/statistic.py | 1 | #!/usr/bin/env python3
import os
import ipaddress
import geoip2.database
from collections import Counter
from . import tshark
from .blacklist import BlackList
def get_result(input_files, filter):
database = os.path.join('tools', 'geoip2', 'GeoLite2-Country.mmdb')
reader = geoip2.database.Reader(database)
... |
brainwane/zulip | refs/heads/master | zerver/migrations/0106_subscription_push_notifications.py | 7 | # Generated by Django 1.11.4 on 2017-09-08 17:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('zerver', '0105_userprofile_enable_stream_push_notifications'),
]
operations = [
migrations.AddField(
model_name='subscription',
... |
LRGH/amoco | refs/heads/release | amoco/arch/sparc/spec_v8.py | 1 | # -*- coding: utf-8 -*-
# This code is part of Amoco
# Copyright (C) 2012-2013 Axel Tillequin (bdcht3@gmail.com)
# published under GPLv2 license
# spec_xxx files are providers for instruction objects.
# These objects are wrapped and created by disasm.py.
# ref: The SPARC Architecture Manual Version 8, Revision SAV08... |
dndtools/dndtools | refs/heads/master | dndtools/dnd/items/__init__.py | 1349 | # -*- coding: utf-8 -*- |
dhilipsiva/test | refs/heads/master | print_file.py | 1 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# vim: fenc=utf-8
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
#
"""
File name: print_file.py
Author: dhilipsiva <dhilipsiva@gmail.com>
Date created: 2015-12-04
"""
def __getattribute__(name):
print("ATTR: ", name)
locals()[name]
FOO = "foo"
print... |
exaroth/python_koans | refs/heads/master | python2/koans/about_methods.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Partially based on AboutMethods in the Ruby Koans
#
from runner.koan import *
def my_global_function(a, b):
return a + b
class AboutMethods(Koan):
def test_calling_a_global_function(self):
self.assertEqual(5, my_global_function(2, 3))
# NOTE: ... |
fertozudo/umatoo | refs/heads/master | lib/django/contrib/gis/db/backends/mysql/operations.py | 328 | from django.contrib.gis.db.backends.base.adapter import WKTAdapter
from django.contrib.gis.db.backends.base.operations import \
BaseSpatialOperations
from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.db.models import aggregates
from django.db.backends.mysql.operations import D... |
hardanimal/UFT_UPGEM | refs/heads/master | Lib/site-packages/pip-1.2.1-py2.7.egg/pip/commands/__init__.py | 9480 | #
|
dsprenkels/servo | refs/heads/master | tests/wpt/css-tests/tools/html5lib/html5lib/trie/__init__.py | 1735 | from __future__ import absolute_import, division, unicode_literals
from .py import Trie as PyTrie
Trie = PyTrie
try:
from .datrie import Trie as DATrie
except ImportError:
pass
else:
Trie = DATrie
|
susingha/0x_tools | refs/heads/master | scripts/checktermcolors.py | 11 | #!/usr/bin/env python
# Copyright (C) 2006 by Johannes Zellner, <johannes@zellner.org>
# modified by mac@calmar.ws to fit my output needs
# modified by crncosta@carloscosta.org to fit my output needs
import sys
import os
def echo(msg):
os.system('echo -n "' + str(msg) + '"')
def out(n):
os.system("tput setab... |
virtuous/msm7230-gb-kernel | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 886 | # Util.py - Python extension for perf trace, miscellaneous utility code
#
# 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.
NSECS_PER_SEC = 1000000000
de... |
ZhangAustin/GroundHog | refs/heads/master | tutorials/generate.py | 15 | #!/usr/bin/python2.7
"""
Script that parses the wikipedia dump, and generates the dataset in a nice
numpy format (i.e. in numpy.npz files).
Call :
generate_word,py --help
"""
from collections import Counter
import ConfigParser
import argparse
import os
import time
import sys
import numpy
def construct_vocabulary... |
shurain/autokey | refs/heads/master | src/lib/qtui/detectdialog.py | 50 | #!/usr/bin/env python
# coding=UTF-8
#
# Generated by pykdeuic4 from detectdialog.ui on Sat Mar 10 13:47:59 2012
#
# WARNING! All changes to this file will be lost.
from PyKDE4 import kdecore
from PyKDE4 import kdeui
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
... |
jmwright/cadquery-freecad-module | refs/heads/master | Libs/certifi/core.py | 20 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
certifi.py
~~~~~~~~~~
This module returns the installation location of cacert.pem.
"""
import os
def where():
f = os.path.dirname(__file__)
return os.path.join(f, 'cacert.pem')
if __name__ == '__main__':
print(where())
|
kmdouglass/PolymerCpp | refs/heads/master | PolymerCpp/__init__.py | 12133432 | |
TeamEOS/external_chromium_org | refs/heads/lp5.0 | tools/perf/page_sets/page_cycler/morejs.py | 9 | # 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.
# pylint: disable=W0401,W0614
from telemetry.page.actions.all_page_actions import *
from telemetry.page import page as page_module
from telemetry.page import ... |
odootr/odoo | refs/heads/8.0 | addons/website_sale_delivery/controllers/__init__.py | 7372 | import main
|
karlp/libsigrok | refs/heads/tenma7730 | bindings/python/setup.py | 3 | ##
## This file is part of the libsigrok project.
##
## Copyright (C) 2013 Martin Ling <martin-sigrok@earth.li>
##
## 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 Lice... |
kholidfu/django | refs/heads/master | tests/migrations/test_migrations_squashed/0002_second.py | 564 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("migrations", "0001_initial")]
operations = [
migrations.DeleteModel("Tribble"),
migrations.RemoveField("Author", "silly_field")... |
lampwins/netbox | refs/heads/develop | netbox/secrets/views.py | 1 | import base64
from django.contrib import messages
from django.contrib.auth.decorators import permission_required
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.db.models import Count
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django... |
ESS-LLP/erpnext | refs/heads/develop | erpnext/patches/v9_0/add_healthcare_domain.py | 23 | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
domain = 'Healthcare'
if not frappe.db.exists('Domain', domain):
frappe.get_doc({
'doctype': 'Domain',
'domain': domain
}).insert(ign... |
losnikitos/googleads-python-lib | refs/heads/master | examples/dfp/v201411/creative_template_service/get_all_creative_templates.py | 4 | #!/usr/bin/python
#
# Copyright 2014 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... |
itmard/zconf_flask_intro | refs/heads/master | code/c3-flask-routing-with-variables.py | 1 | from flask import Flask
app = Flask(__name__)
@app.route('/user/<username>')
def show_user_profile(username):
return 'User %s' % username
@app.route('/post/<int:post_id>')
def show_post(post_id):
return 'Post %d' % post_id
if __name__ == "__main__":
app.run(debug=True)
|
saisankargochhayat/algo_quest | refs/heads/master | intro_to_algo/lec_2/docdist8.py | 1 | #!/usr/bin/python
# docdist8.py - treat whole file as a single "line"
#
# Original version by Erik D. Demaine on January 31, 2011,
# based on code by Ronald L. Rivest (see docdist[1-7].py).
#
# Usage:
# docdist8.py filename1 filename2
#
# This program computes the "distance" between two text files
# a... |
xaratustrah/barion | refs/heads/main | version.py | 1 | """
Barion
-- GUI Application --
Jul 2015 Xaratustrah
Mar 2016 Xaratustrah
"""
__version_info__ = (2, 0, 9)
__version__ = '.'.join('%d' % d for d in __version_info__)
|
ParticulateFlow/Palabos-PFM | refs/heads/master | scons/scons-local-2.1.0/SCons/Tool/javac.py | 21 | """SCons.Tool.javac
Tool-specific initialization for javac.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Founda... |
markyzq/kernel-drm-rockchip | refs/heads/drm-next | tools/perf/python/twatch.py | 1565 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... |
gnychis/grforwarder | refs/heads/txsync | gr-wxgui/src/python/forms/forms.py | 15 | #
# Copyright 2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
#... |
brett-lempereur/pgnet-mappy | refs/heads/master | mappy.py | 2 | """
Script to extract location information from photograph metadata
and export it into a CSV file.
"""
import csv
import glob
import operator
import os
import sys
import pyexiv2
# Constants for the EXIF keys we will extract.
LATITUDE = "Exif.GPSInfo.GPSLatitude"
LATITUDE_REF = "Exif.GPSInfo.GPSLatitudeRef"
LONGITUDE... |
allison-group/indigo-bondorder | refs/heads/master | archive/src/indigox/ball.py | 1 | from copy import deepcopy
from indigox.config import BALL_DATA_FILE, INFINITY, MAX_SOLUTIONS
from indigox.misc import BondOrderAssignment, graph_to_dist_graph, node_energy
try:
import BALLCore as BALL
BALL_AVAILABLE = True
BALL_ELEMENTS = dict(
H=BALL.PTE['H'], He=BALL.PTE['HE'], Li=BALL.PTE['LI'],... |
ruibarreira/linuxtrail | refs/heads/master | usr/lib/python2.7/dist-packages/pygments/lexers/modeling.py | 71 | # -*- coding: utf-8 -*-
"""
pygments.lexers.modeling
~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for modeling languages.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, using, d... |
wenderen/servo | refs/heads/master | tests/wpt/harness/wptrunner/testrunner.py | 59 | # 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/.
from __future__ import unicode_literals
import multiprocessing
import sys
import threading
import traceback
from Queue ... |
BhallaLab/moose | refs/heads/master | packaging_scripts/cmake_sanity_check.py | 5 | #!/usr/bin/env python
"""cmake_sanity_check.py: Check if Cmake files are ok.
Last modified: Sat Jan 18, 2014 05:01PM
"""
__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2013, Dilawar Singh and NCBS Bangalore"
__credits__ = ["NCBS Bangalore"]
__license__ = "GNU GPL"
__v... |
michaelgallacher/intellij-community | refs/heads/master | python/testData/codeInsight/controlflow/lambdadefaultparameter.py | 83 | {(lambda ii=ii: ii) for ii in range(5)}
|
CARocha/ciat_plataforma | refs/heads/master | monitoreo/indicador01/__init__.py | 12133432 | |
d120/kifplan | refs/heads/master | oplan/management/__init__.py | 12133432 | |
twisted/txaws | refs/heads/master | txaws/client/__init__.py | 12133432 | |
Alegzander/blockchain-sport-loto-prototype-backend | refs/heads/master | frontend/utils/__init__.py | 12133432 | |
xingwu1/autorest | refs/heads/master | ClientRuntimes/Python/msrest/msrest/paging.py | 11 | # --------------------------------------------------------------------------
#
# 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""),... |
vighneshbirodkar/scikit-image | refs/heads/master | skimage/draw/setup.py | 1 | #!/usr/bin/env python
import os
from skimage._build import cython
base_path = os.path.abspath(os.path.dirname(__file__))
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('draw', parent_package, top_path)
... |
ramnes/qtile | refs/heads/master | libqtile/widget/base.py | 2 | # Copyright (c) 2008-2010 Aldo Cortesi
# Copyright (c) 2011 Florian Mounier
# Copyright (c) 2011 Kenji_Takahashi
# Copyright (c) 2011 Paul Colomiets
# Copyright (c) 2012 roger
# Copyright (c) 2012 Craig Barnes
# Copyright (c) 2012-2015 Tycho Andersen
# Copyright (c) 2013 dequis
# Copyright (c) 2013 David R. Andersen
# ... |
springcoil/pymc3 | refs/heads/master | pymc3/math.py | 1 | from __future__ import division
import sys
import theano.tensor as tt
# pylint: disable=unused-import
import theano
from theano.tensor import (
constant, flatten, zeros_like, ones_like, stack, concatenate, sum, prod,
lt, gt, le, ge, eq, neq, switch, clip, where, and_, or_, abs_, exp, log,
cos, sin, tan, cos... |
flychensc/orange | refs/heads/master | backend/apps.py | 16 | from django.apps import AppConfig
class BackendConfig(AppConfig):
name = 'backend'
|
aaronzink/tensorflow-visual-inspection | refs/heads/master | models/object_detection/models/faster_rcnn_inception_resnet_v2_feature_extractor_test.py | 21 | # 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... |
ocwc/ocwc-members | refs/heads/master | members/elections/api.py | 1 | # -*- coding: utf-8 -*-
from rest_framework import generics
from .models import Candidate, Election
from .serializers import CandidatePublicSerializer
class ElectionCandidatesListAPIView(generics.ListAPIView):
model = Candidate
serializer_class = CandidatePublicSerializer
def get_queryset(self):
... |
manipopopo/tensorflow | refs/heads/master | tensorflow/contrib/kernel_methods/python/losses.py | 30 | # 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... |
Chilledheart/chromium | refs/heads/master | tools/telemetry/third_party/gsutilz/third_party/boto/boto/ecs/__init__.py | 153 | # Copyright (c) 2010 Chris Moyer http://coredumped.org/
#
# 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, modify, ... |
sserrot/champion_relationships | refs/heads/master | venv/Lib/site-packages/networkx/algorithms/assortativity/neighbor_degree.py | 7 | #-*- coding: utf-8 -*-
# Copyright (C) 2011 by
# Jordi Torrents <jtorrents@milnou.net>
# Aric Hagberg <hagberg@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
__author__ = """\n""".join(['Jordi Torrents <jtorrents@milnou.net>',
'Aric Hagberg (hagberg@lanl... |
deepesch/scikit-learn | refs/heads/master | sklearn/ensemble/tests/test_base.py | 284 | """
Testing for the base module (sklearn.ensemble.base).
"""
# Authors: Gilles Louppe
# License: BSD 3 clause
from numpy.testing import assert_equal
from nose.tools import assert_true
from sklearn.utils.testing import assert_raise_message
from sklearn.datasets import load_iris
from sklearn.ensemble import BaggingCla... |
contentful/contentful.py | refs/heads/master | contentful/sync_page.py | 1 | from six.moves.urllib.parse import urlsplit, parse_qs
from .resource import Resource
"""
contentful.sync_page
~~~~~~~~~~~~~~~~~~~~
This module implements the SyncPage class.
API Reference: https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/synchronization
:copyright: (c) 2016 b... |
qenter/vlc-android | refs/heads/master | toolchains/arm/lib/python2.7/tabnanny.py | 394 | #! /usr/bin/env python
"""The Tab Nanny despises ambiguous indentation. She knows no mercy.
tabnanny -- Detection of ambiguous indentation
For the time being this module is intended to be called as a script.
However it is possible to import it into an IDE and use the function
check() described below.
Warning: The ... |
syphar/django | refs/heads/master | tests/db_functions/test_datetime.py | 6 | from __future__ import unicode_literals
from datetime import datetime
import pytz
from django.conf import settings
from django.db import connection
from django.db.models import DateField, DateTimeField, IntegerField, TimeField
from django.db.models.functions import (
Extract, ExtractDay, ExtractHour, ExtractMinu... |
Ruide/angr-dev | refs/heads/master | angr/angr/type_backend.py | 5 | import claripy
from .sim_type import SimTypePointer as Ptr, SimTypeTop as Top
class TypedValue(claripy.BackendObject):
def __init__(self, ty, value):
self.ty = ty
self.value = value
def __repr__(self):
return 'TypedValue(%s, %s)' % (repr(self.ty), repr(self.value))
class TypeBackend(... |
manahl/mockextras | refs/heads/master | mockextras/_matchers.py | 1 | # mockextras.matchers
# Matchers and Stubs for mock.
# Copyright (C) 2012-2015 Man AHL
# E-mail: ManAHLTech AT ahl DOT com
# mockextras 1.0.0
# https://github.com/manahl/mockextras
# Released subject to the BSD License
# Please see https://github.com/manahl/mockextras/blob/master/LICENSE.txt
__all__ = ['Any', 'Conta... |
joequery/lesscpy | refs/heads/master | lesscpy/plib/variable.py | 3 | # -*- coding: utf8 -*-
"""
.. module:: lesscpy.plib.variable
:synopsis: Variable declaration
Copyright (c)
See LICENSE for details.
.. moduleauthor:: Johann T. Mariusson <jtm@robot.is>
"""
from .node import Node
class Variable(Node):
def parse(self, scope):
""" Parse function
args:
... |
voxy/bluecanary | refs/heads/master | bluecanary/utilities/load_yaml.py | 1 | import os
from os.path import isfile, isdir
import click
from yaml import load
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader
from bluecanary.managers import (
AlarmsManager,
AWSCredentialsManager,
ConfigurationManager,
TagsManager,
)
def load_path(path)... |
vLj2/docman | refs/heads/master | maintenance/tests.py | 3 | from django.test import TestCase
from django.http import HttpRequest
from django.conf import settings
from datetime import datetime, timedelta
from middleware import MaintenanceMiddleware
from models import Maintenance, MaintenanceFilter
class MaintenanceMiddlewareTest(TestCase):
def _create_request(self, p... |
wjkohnen/antlr4 | refs/heads/master | runtime/Python3/src/antlr4/dfa/DFAState.py | 4 | #
# Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
# Use of this file is governed by the BSD 3-clause license that
# can be found in the LICENSE.txt file in the project root.
#/
# Map a predicate to a predicted alternative.#/
from io import StringIO
from antlr4.atn.ATNConfigSet import ATNConfigSet
fro... |
marco-lancini/Showcase | refs/heads/master | django/contrib/auth/tests/auth_backends.py | 104 | import warnings
from django.conf import settings
from django.contrib.auth.models import User, Group, Permission, AnonymousUser
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ImproperlyConfigured
from django.db import connection
from django.test import TestCase
from django... |
AlexanderFabisch/scikit-learn | refs/heads/master | examples/ensemble/plot_forest_importances_faces.py | 403 | """
=================================================
Pixel importances with a parallel forest of trees
=================================================
This example shows the use of forests of trees to evaluate the importance
of the pixels in an image classification task (faces). The hotter the pixel,
the more impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.