repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
brianjjohnson/divvycloud-plugins | refs/heads/master | email/email_notify.py | 1 | from DivvyPlugins.hookpoints import hookpoint
from DivvyUtils.mail import send_email
@hookpoint('divvycloud.instance.modified')
def instance_modified(resource, old_resource_data, user_resource_id=None):
send_email(subject="Instance started",
message="Instance [%s] was started." % (resource.resource_id)... |
nzavagli/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/hashlib.py | 51 | # $Id$
#
# Copyright (C) 2005 Gregory P. Smith (greg@krypto.org)
# Licensed to PSF under a Contributor Agreement.
#
__doc__ = """hashlib module - A common interface to many hash functions.
new(name, string='') - returns a new hash object implementing the
given hash function; initializing th... |
onceuponatimeforever/oh-mainline | refs/heads/master | vendor/packages/gdata/src/gdata/Crypto/Util/RFC1751.py | 228 | #!/usr/local/bin/python
# rfc1751.py : Converts between 128-bit strings and a human-readable
# sequence of words, as defined in RFC1751: "A Convention for
# Human-Readable 128-bit Keys", by Daniel L. McDonald.
__revision__ = "$Id: RFC1751.py,v 1.6 2003/04/04 15:15:10 akuchling Exp $"
import string, binascii
binary=... |
GeekTrainer/Flask | refs/heads/master | Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/werkzeug/wrappers.py | 146 | # -*- coding: utf-8 -*-
"""
werkzeug.wrappers
~~~~~~~~~~~~~~~~~
The wrappers are simple request and response objects which you can
subclass to do whatever you want them to do. The request object contains
the information transmitted by the client (webbrowser) and the response
object contains al... |
darkryder/django | refs/heads/master | django/conf/locale/ga/formats.py | 619 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'H:i'
# DATE... |
was4444/chromium.src | refs/heads/nw15 | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py | 66 | # 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 ... |
jjscarafia/odoo | refs/heads/master | addons/website/models/ir_actions.py | 363 | # -*- coding: utf-8 -*-
import urlparse
from openerp.http import request
from openerp.osv import fields, osv
class actions_server(osv.Model):
""" Add website option in server actions. """
_name = 'ir.actions.server'
_inherit = ['ir.actions.server']
def _compute_website_url(self, cr, uid, id, websit... |
sekikn/incubator-airflow | refs/heads/master | scripts/ci/pre_commit/pre_commit_check_extras_have_providers.py | 4 | #!/usr/bin/env python3
# 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
# "L... |
jskew/gnuradio | refs/heads/master | gr-utils/python/modtool/modtool_rm.py | 44 | #
# Copyright 2013 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.
#
#... |
liganega/Gongsu-DataSci | refs/heads/master | previous/y2017/GongSu13_Numpy_Intro.py | 2 |
# coding: utf-8
# In[1]:
from __future__ import division, print_function
# # 넘파이(Numpy) 소개
# 파이썬에서 여러 개의 숫자를 동시에 다룰 수 있는 자료형은 크게 두 종류로 나뉘어진다.
#
# * 튜플(`tuple`), 리스트(`list`), 사전(`dictrionary`) 등 숫자들을 담을 수 있는 컬렉션 자료형
#
# 그런데 튜플, 리스트, 사전은 다음과 같은 단점을 갖고 있다.
#
# * 튜플: 수정이 안되어 유연성이 떨어짐.
# * 리스트: 길이가 몇 만, 몇 십만, 몇 백만 ... |
tvall43/Samsung_SM-V700_Kernel | refs/heads/master | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... |
yan12125/youtube-dl | refs/heads/master | youtube_dl/extractor/tvland.py | 14 | # coding: utf-8
from __future__ import unicode_literals
from .spike import ParamountNetworkIE
class TVLandIE(ParamountNetworkIE):
IE_NAME = 'tvland.com'
_VALID_URL = r'https?://(?:www\.)?tvland\.com/(?:video-clips|(?:full-)?episodes)/(?P<id>[^/?#.]+)'
_FEED_URL = 'http://www.tvland.com/feeds/mrss/'
_... |
ooici/coi-services | refs/heads/master | ion/services/cei/provisioner_service.py | 1 | #!/usr/bin/env python
__author__ = 'Stephen P. Henrie'
from interface.services.cei.iprovisioner_service import BaseProvisionerService
class ProvisionerService(BaseProvisionerService):
pass |
Pencroff/ai-hackathon-2017 | refs/heads/master | Backend/venv/lib/python3.6/site-packages/requests/packages/urllib3/exceptions.py | 223 | from __future__ import absolute_import
from .packages.six.moves.http_client import (
IncompleteRead as httplib_IncompleteRead
)
# Base Exceptions
class HTTPError(Exception):
"Base exception used by this module."
pass
class HTTPWarning(Warning):
"Base warning used by this module."
pass
class Po... |
tbenthompson/tectosaur | refs/heads/master | tectosaur/qd/map_view_parallel.py | 1 | import numpy as np
import matplotlib
import subprocess
import os
import uuid
import cloudpickle
import multiprocessing
from shapely.geometry import Polygon
from shapely.geometry import Point
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.colors import hsv_to_rgb
from sklearn.prepr... |
baffolobill/django-lfs | refs/heads/master | lfs/manage/discounts/views.py | 4 | import json
# django imports
from django.contrib.auth.decorators import permission_required
from django.core.exceptions import ObjectDoesNotExist
from django.core.paginator import Paginator, EmptyPage
from django.core.urlresolvers import reverse
from django.db.models import Q
from django.http import HttpResponseRedire... |
sanjuro/RCJK | refs/heads/master | vendor/gdata/tlslite/utils/__init__.py | 409 | """Toolkit for crypto and other stuff."""
__all__ = ["AES",
"ASN1Parser",
"cipherfactory",
"codec",
"Cryptlib_AES",
"Cryptlib_RC4",
"Cryptlib_TripleDES",
"cryptomath: cryptomath module",
"dateFuncs",
"hmac",
"... |
stamhe/zulip | refs/heads/master | zerver/management/commands/expunge_db.py | 118 | from __future__ import absolute_import
from django.core.management.base import BaseCommand
from zerver.retention_policy import get_UserMessages_to_expunge
from zerver.models import Message
class Command(BaseCommand):
help = ('Expunge old UserMessages and Messages from the database, '
... |
diox/olympia | refs/heads/master | src/olympia/constants/blocklist.py | 6 | # How many guids should there be in the stashes before we make a new base.
BASE_REPLACE_THRESHOLD = 5_000
# Config keys used to track recent mlbf ids
MLBF_TIME_CONFIG_KEY = 'blocklist_mlbf_generation_time'
MLBF_BASE_ID_CONFIG_KEY = 'blocklist_mlbf_base_id'
REMOTE_SETTINGS_COLLECTION_LEGACY = 'addons'
REMOTE_SETTINGS_... |
schlueter/ansible | refs/heads/devel | test/units/modules/network/ironware/test_ironware_command.py | 57 | # (c) 2016 Red Hat 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 option) any later version.
#
# Ansible is dis... |
benfinkelcbt/CPD200 | refs/heads/master | CPD200-Lab07-Python/pyasn1_modules/rfc2459.py | 72 | #
# X.509 message syntax
#
# ASN.1 source from:
# http://www.trl.ibm.com/projects/xml/xss4j/data/asn1/grammars/x509.asn
# http://www.ietf.org/rfc/rfc2459.txt
#
# Sample captures from:
# http://wiki.wireshark.org/SampleCaptures/
#
from pyasn1.type import tag,namedtype,namedval,univ,constraint,char,useful
MAX = 64 # XX... |
jmdejong/Asciifarm | refs/heads/master | asciifarm/server/components/portal.py | 1 |
from .component import Component
class Portal(Component):
def __init__(self, destRoom, destPos=None, mask=(False, False)):
self.destRoom = destRoom
self.origin = destPos
self.mask = mask
def attach(self, obj):
obj.addListener("objectenter", self.onEnter)
self... |
mifth/mifthtools | refs/heads/master | blender/addons/2.8/mifth_tools/mifth_tools_ui.py | 1 | import bpy
from bpy.props import *
from bpy.types import Operator, AddonPreferences
class MFT_PT_PanelPose(bpy.types.Panel):
bl_label = "Bones"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_context = "posemode"
bl_category = 'Mifth'
# bl_options = {'DEFAULT_CLOSED'}
def draw(self, co... |
stackforge/python-cloudpulseclient | refs/heads/master | cloudpulseclient/version.py | 1 | # Copyright 2014
# The Cloudscaling Group, 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 ... |
xxsergzzxx/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/test/test_fileio.py | 49 | # Adapted from test_file.py by Daniel Stutzbach
import sys
import os
import errno
import unittest
from array import array
from weakref import proxy
from functools import wraps
from test.support import TESTFN, check_warnings, run_unittest, make_bad_fd
from _io import FileIO as _FileIO
class AutoFileTests(unittest.Te... |
pombredanne/pizco | refs/heads/master | examples/common.py | 3 | # -*- coding: utf-8 -*-
import time
import logging
from concurrent import futures
from pizco import Signal
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
logger.addHandler(ch)
COLORS = ('green', 'blue', 'white', 'yellow')
class House(obj... |
pombredanne/bigcouch | refs/heads/master | couchjs/scons/scons-local-2.0.1/SCons/Scanner/IDL.py | 61 | """SCons.Scanner.IDL
This module implements the depenency scanner for IDL (Interface
Definition Language) files.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software an... |
Fl0rianFischer/sme_odoo | refs/heads/9.0 | addons/mail/tests/__init__.py | 49 | # -*- coding: utf-8 -*-
import test_mail_followers
import test_mail_message
import test_mail_features
import test_mail_channel
import test_mail_gateway
import test_message_read
import test_message_track
import test_mail_template
import test_invite
import test_ir_actions
|
chokribr/invenioold | refs/heads/master | modules/bibknowledge/lib/bibknowledge_templates.py | 32 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at yo... |
dhenrygithub/QGIS | refs/heads/master | python/plugins/processing/tests/ParametersTest.py | 3 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ParametersTest
---------------------
Date : March 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
****************************... |
praekelt/mama-survey | refs/heads/develop | survey/migrations/0004_auto__chg_field_multichoiceanswer_question__del_unique_multichoiceansw.py | 1 | # -*- coding: 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):
# Removing unique constraint on 'MultiChoiceAnswer', fields ['question']
db.delete_unique('survey_multichoic... |
pschella/scipy | refs/heads/master | scipy/signal/tests/test_savitzky_golay.py | 105 | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import (run_module_suite, assert_allclose, assert_equal,
assert_almost_equal, assert_array_equal,
assert_array_almost_equal)
from scipy.ndimage import convolve1d... |
vimagick/youtube-dl | refs/heads/master | youtube_dl/extractor/history.py | 121 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import smuggle_url
class HistoryIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?history\.com/(?:[^/]+/)+(?P<id>[^/]+?)(?:$|[?#])'
_TESTS = [{
'url': 'http://www.history.com/topics/valentines-day/history-of-va... |
yoriyuki/nksnd | refs/heads/v0.1-kounosu | tools/parse_bccwj.py | 1 | #!/usr/bin/env python3
import argparse
import glob
import xml.etree.ElementTree
def parse_sentence(sentence):
for element in sentence.iter('SUW'):
target = ''.join(element.itertext())
target = target.replace('\n', '')
if ' ' in target:
# Ignore full width space
cont... |
CallaJun/hackprince | refs/heads/master | indico/numpy/polynomial/hermite_e.py | 36 | """
Objects for dealing with Hermite_e series.
This module provides a number of objects (mostly functions) useful for
dealing with Hermite_e series, including a `HermiteE` class that
encapsulates the usual arithmetic operations. (General information
on how this module represents and works with such polynomials is in ... |
nitin-cherian/LifeLongLearning | refs/heads/master | Python/Experiments/JINJA/RealPython/jinja_env/lib/python3.5/site-packages/pip/pep425tags.py | 340 | """Generate and work with PEP 425 Compatibility Tags."""
from __future__ import absolute_import
import re
import sys
import warnings
import platform
import logging
try:
import sysconfig
except ImportError: # pragma nocover
# Python < 2.7
import distutils.sysconfig as sysconfig
import distutils.util
from... |
hsluo/youtube-dl | refs/heads/master | youtube_dl/extractor/motherless.py | 145 | from __future__ import unicode_literals
import datetime
import re
from .common import InfoExtractor
from ..utils import (
str_to_int,
unified_strdate,
)
class MotherlessIE(InfoExtractor):
_VALID_URL = r'http://(?:www\.)?motherless\.com/(?:g/[a-z0-9_]+/)?(?P<id>[A-Z0-9]+)'
_TESTS = [
{
... |
pablin87/rtbkit | refs/heads/master | jml/python/metainfo.py | 21 | __version__ = '0.0.1'
JML_CORE_FILES = []
|
krishna-pandey-git/django | refs/heads/master | tests/migrations/test_migrations_first/thefirst.py | 2995 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
operations = [
migrations.CreateModel(
"Author",
[
("id", models.AutoField(primary_key=True)),
("name",... |
ParsePlatform/flashback | refs/heads/master | record/set_mongo_profiling.py | 2 | #!/usr/bin/python
import pymongo
import string
import sys
from argparse import ArgumentParser
def get_args():
parser = ArgumentParser(description='Run health checks of mongo and mtools systems')
parser.add_argument('-a', '--action', dest='action', required=True,
help='action to take... |
tmerrick1/spack | refs/heads/develop | var/spack/repos/builtin/packages/py-4suite-xml/package.py | 5 | ##############################################################################
# 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... |
Soya93/Extract-Refactoring | refs/heads/master | plugins/hg4idea/testData/bin/mercurial/tags.py | 91 | # tags.py - read tag info from local repository
#
# Copyright 2009 Matt Mackall <mpm@selenic.com>
# Copyright 2009 Greg Ward <greg@gerg.ca>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
# Currently this module only deals with re... |
gnuhub/intellij-community | refs/heads/master | python/testData/copyPaste/singleLine/Indent43.src.py | 249 | class C:
def foo(self):
<selection>x = 1
</selection> y = 2
|
ColOfAbRiX/ansible | refs/heads/devel | lib/ansible/plugins/shell/csh.py | 118 | # (c) 2014, Chris Church <chris@ninemoreminutes.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 lat... |
marknca/cling | refs/heads/master | dependencies/pygments/styles/monokai.py | 50 | # -*- coding: utf-8 -*-
"""
pygments.styles.monokai
~~~~~~~~~~~~~~~~~~~~~~~
Mimic the Monokai color scheme. Based on tango.py.
http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.... |
anand-c-goog/tensorflow | refs/heads/master | tensorflow/contrib/metrics/python/ops/histogram_ops.py | 21 | # 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... |
lattwood/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py | 122 | #!/usr/bin/env python
#
# Copyright 2012, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
greenstick/thesis-pipeline | refs/heads/master | core/manage-state.py | 1 | #! /home/users/cordier/.linuxbrew/bin/python3
class StateManager (object):
"""
Pipeline State Management Class (not yet implemented)
Kind of like a flexible git 'light'.
"""
def __init__ (self):
return self
#
# Module Specific State Management
#
def create (self, args, status):
"""
Create State - Rec... |
fangxingli/hue | refs/heads/master | desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/chart/text.py | 13 | from __future__ import absolute_import
# Copyright (c) 2010-2015 openpyxl
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.descriptors import (
Typed,
Alias,
Sequence,
)
from openpyxl.drawing.text import (
RichTextProperties,
ListStyle,
Paragraph,
)
from .data_source i... |
kai5263499/networkx | refs/heads/master | networkx/algorithms/tests/test_swap.py | 32 | #!/usr/bin/env python
from nose.tools import *
from networkx import *
def test_double_edge_swap():
graph = barabasi_albert_graph(200,1)
degrees = sorted(graph.degree().values())
G = double_edge_swap(graph, 40)
assert_equal(degrees, sorted(graph.degree().values()))
def test_connected_double_edge_swap()... |
jagguli/intellij-community | refs/heads/master | python/testData/mover/simpleBlankLines_afterDown.py | 83 | if a:
a = 1
b = 2
c = 3 |
saullocastro/compmech | refs/heads/master | theory/conecyl/clpt/clpt_donnell_bc4/print_strainFunc.py | 21 | import os
import glob
import numpy as np
import sympy
from sympy import pi, sin, cos, var, Matrix
var('i1, k1, i2, j2, k2, l2', integer=True)
var('x, t, xa, xb, L, r, r2, sina, cosa')
var('A11, A12, A16, A22, A26, A66')
var('B11, B12, B16, B22, B26, B66')
var('D11, D12, D16, D22, D26, D66')
var('wx, wt, w0, w0x, w0t,... |
ChawalitK/odoo | refs/heads/master | addons/hr_contract/__openerp__.py | 23 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Employee Contracts',
'version': '1.0',
'category': 'Human Resources',
'description': """
Add all information on the employee form to manage contracts.
==========================================... |
Ragh2018/website | refs/heads/master | music/urls.py | 1 | from django.conf.urls import url
from .import views
app_name='music'
urlpatterns = [
# /music/
url(r'^$', views.IndexView.as_view(),name='index'),
#/music/712/
url(r'^(?P<pk>[0-9]+)/$',views.DetailView.as_view(),name='detail'),
] |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/equipment/bonus_sets/set_bonus_medic_utility_b.py | 2 | import sys
from services.equipment import BonusSetTemplate
from java.util import Vector
def addBonusSet(core):
bonusSet = BonusSetTemplate("set_bonus_medic_utility_b")
bonusSet.addRequiredItem("item_band_set_medic_utility_b_01_01")
bonusSet.addRequiredItem("item_ring_set_medic_utility_b_01_01")
bonusSet.addRequi... |
t3dev/odoo | refs/heads/master | addons/note/__manifest__.py | 9 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Notes',
'version': '1.0',
'category': 'Tools',
'description': "",
'website': 'https://www.odoo.com/page/notes',
'summary': 'Organize your work with memos',
'sequence': 45,
'depe... |
ojengwa/odoo | refs/heads/8.0 | openerp/workflow/service.py | 378 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of... |
ofayans/freeipa | refs/heads/master | ipaclient/remote_plugins/2_114/join.py | 24 | #
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
#
# pylint: disable=unused-import
import six
from . import Command, Method, Object
from ipalib import api, parameters, output
from ipalib.parameters import DefaultFrom
from ipalib.plugable import Registry
from ipalib.text import _
from ipapython.dn ... |
alexryndin/ambari | refs/heads/branch-adh-1.5 | ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py | 1 | #!/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
"License")... |
openp2pdesign/makerlabs | refs/heads/master | makerlabs/fablabs_io.py | 1 | # -*- encoding: utf-8 -*-
#
# Access data from fablabs.io
#
# Author: Massimo Menichinelli
# Homepage: http://www.openp2pdesign.org
# License: LGPL v.3
#
#
from classes import Lab
import json
import requests
from geojson import dumps, Feature, Point, FeatureCollection
from geopy.geocoders import Nominatim
import pyc... |
Alexander-M-Waldman/local_currency_site | refs/heads/master | lib/python2.7/site-packages/allauth/socialaccount/providers/windowslive/models.py | 4209 | # Create your models here.
|
renhaoqi/gem5-stable | refs/heads/master | scons.py | 13 | #! /usr/bin/env python
#
# SCons - a Software Constructor
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"... |
grlee77/nipype | refs/heads/master | examples/fmri_fsl_feeds.py | 9 | #!/usr/bin/env python
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
=================
fMRI: FEEDS - FSL
=================
A pipeline example that data from the FSL FEEDS set. Single subject, two
stimuli.
You can find it at http://www.fmrib.ox.ac.... |
HinTak/linux | refs/heads/master | tools/testing/selftests/net/devlink_port_split.py | 253 | #!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0
from subprocess import PIPE, Popen
import json
import time
import argparse
import collections
import sys
#
# Test port split configuration using devlink-port lanes attribute.
# The test is skipped in case the attribute is not available.
#
# First, check that a... |
bougui505/SOM | refs/heads/master | application/learn.py | 1 | #!/usr/bin/env python
"""
author: Guillaume Bouvier
email: guillaume.bouvier@ens-cachan.org
creation date: 01 10 2013
license: GNU GPL
Please feel free to use and modify this, but keep the above information.
Thanks!
"""
import matplotlib.pyplot
import IO
import numpy
import itertools
import scipy.spatial
impo... |
iut-ibk/DynaMind-UrbanSim | refs/heads/master | 3rdparty/opus/src/opus_docs/docs/__init__.py | 538 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2005-2009 University of Washington
# See opus_core/LICENSE
|
egabancho/invenio-upgrader | refs/heads/master | invenio_upgrader/upgrades/invenio_2012_11_07_xtrjob_last_recid.py | 5 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2012 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... |
snnn/tensorflow | refs/heads/master | tensorflow/contrib/eager/python/examples/l2hmc/main.py | 10 | # 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... |
prutseltje/ansible | refs/heads/devel | lib/ansible/plugins/connection/libvirt_lxc.py | 24 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# (c) 2013, Michael Scherer <misc@zarb.org>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https:/... |
EcmaXp/micropython | refs/heads/opencom | tests/basics/try_reraise2.py | 77 | # Reraise not the latest occured exception
def f():
try:
raise ValueError("val", 3)
except:
try:
print(1)
raise TypeError
except:
print(2)
try:
print(3)
try:
print(4)
r... |
Mozhuowen/brython | refs/heads/master | scripts/make_identifiers_regexp.py | 18 | # -*- coding: utf-8 -*-
"""This scripts builds the Javascript file identifiers_re.js in folder "src"
This scripts holds the regular expressions used to detect Unicode variable
names in the source code, allowing names that include non-ASCII characters
PEP 3131 (http://www.python.org/dev/peps/pep-3131/) describes the... |
soxofaan/luigi | refs/heads/master | luigi/event.py | 6 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... |
googleapis/python-assured-workloads | refs/heads/master | google/cloud/assuredworkloads_v1beta1/services/assured_workloads_service/client.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... |
mkheirkhah/mptcp | refs/heads/development | src/brite/test/examples-to-run.py | 166 | #! /usr/bin/env python
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
# A list of C++ examples to run in order to ensure that they remain
# buildable and runnable over time. Each tuple in the list contains
#
# (example_name, do_run, do_valgrind_run).
#
# See test.py for more i... |
TheNameIsNigel/opencog | refs/heads/master | opencog/python/pln_old/rules/boolean_rules.py | 30 | import math
from opencog.atomspace import types, TruthValue, get_type_name
from pln.rule import Rule
# Heuristically create boolean links using the TruthValues of their arguments
# TODO These should take account of dependencies in some cases
from pln.rules import formulas
def create_and_or_rules(chainer, min_n, max... |
MechCoder/sympy | refs/heads/master | sympy/assumptions/__init__.py | 122 | from .assume import AppliedPredicate, Predicate, AssumptionsContext, assuming
from .ask import Q, ask, register_handler, remove_handler
from .refine import refine
|
solintegra/addons | refs/heads/master | l10n_eu_service/wizard/wizard.py | 242 | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, Open Source Business Applications
# Copyright (C) 2015 Odoo S.A. <http://www.odoo.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Aff... |
tanghaibao/jcvi | refs/heads/main | jcvi/formats/contig.py | 1 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
TIGR contig format, see spec:
<http://www.cbcb.umd.edu/research/contig_representation.shtml#contig>
"""
import sys
import logging
from jcvi.formats.base import BaseFile, read_block
from jcvi.apps.base import OptionParser, ActionDispatcher
class ReadLine(object):
... |
Jucyio/Jucy | refs/heads/master | web/forms.py | 1 | from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import AuthenticationForm
from django.utils.translation import ugettext_lazy as _
class AnswerForm(forms.Form):
content = forms.CharField(label='Answer content', max_length=2048)
class _EmailForm(forms.ModelForm):
... |
DinoCow/airflow | refs/heads/master | tests/cli/commands/test_version_command.py | 8 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
chromium2014/src | refs/heads/master | tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor.py | 2 | # 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.
import telemetry.core.platform.power_monitor as power_monitor
_TEMPERATURE_FILE = '/sys/class/thermal/thermal_zone0/temp'
class AndroidTemperatureMonitor... |
MaxiTalenti/IA | refs/heads/master | CSP/CSP_ProcesosYProcesadores.py | 1 | # coding=utf-8
import random
import itertools
from simpleai.search import CspProblem, backtrack, min_conflicts
# Se desea realizar un programa que pueda organizar un conjunto de tareas de procesamiento en un conjunto de servidores de alto rendimiento,
# de forma de poder ejecutar todas las tareas en paralelo, aprovech... |
shrimpboyho/git.js | refs/heads/master | emscript/python/2.7.5.1_32bit/Lib/urllib.py | 37 | """Open an arbitrary URL.
See the following document for more info on URLs:
"Names and Addresses, URIs, URLs, URNs, URCs", at
http://www.w3.org/pub/WWW/Addressing/Overview.html
See also the HTTP spec (from which the error codes are derived):
"HTTP - Hypertext Transfer Protocol", at
http://www.w3.org/pub/WWW/Protocols... |
sarahgrogan/scikit-learn | refs/heads/master | examples/feature_selection/plot_permutation_test_for_classification.py | 250 | """
=================================================================
Test with permutations the significance of a classification score
=================================================================
In order to test if a classification score is significative a technique
in repeating the classification procedure aft... |
emakis/erpnext | refs/heads/develop | erpnext/patches/v7_2/mark_students_active.py | 18 | import frappe
def execute():
frappe.reload_doc('schools', 'doctype', 'student_group_student')
frappe.db.sql("update `tabStudent Group Student` set active=1")
|
taynaud/sparkit-learn | refs/heads/master | splearn/preprocessing/__init__.py | 2 | from .label import SparkLabelEncoder
from .data import SparkStandardScaler
|
edmorley/django | refs/heads/master | tests/test_client_regress/session.py | 131 | from django.contrib.sessions.backends.base import SessionBase
class SessionStore(SessionBase):
"""
A simple cookie-based session storage implementation.
The session key is actually the session data, pickled and encoded.
This means that saving the session will change the session key.
"""
def _... |
fatadama/mavlink-vscl | refs/heads/master | MAVProxy-master/modules/mavproxy_sensors.py | 3 | #!/usr/bin/env python
'''monitor sensor consistancy'''
import time, math, mavutil
mpstate = None
class sensors_report(object):
def __init__(self):
self.last_report = 0
self.ok = True
self.value = 0
class sensors_state(object):
def __init__(self):
self.ground_alt = 0
s... |
hfeeki/transifex | refs/heads/master | transifex/txcommon/db/models.py | 1 | # -*- coding: utf-8 -*-
import base64, datetime, re
from django import forms
from django.conf import settings
from django.db.models.signals import post_save
from django.db.models.fields.related import OneToOneField
from django.db import models
from django.utils.text import compress_string
from django.utils.translation ... |
googleapis/python-aiplatform | refs/heads/master | schema/predict/prediction/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/types/tabular_classification.py | 3 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... |
gimite/personfinder | refs/heads/master | app/vendors/unidecode/x050.py | 252 | data = (
'Chang ', # 0x00
'Chi ', # 0x01
'Bing ', # 0x02
'Zan ', # 0x03
'Yao ', # 0x04
'Cui ', # 0x05
'Lia ', # 0x06
'Wan ', # 0x07
'Lai ', # 0x08
'Cang ', # 0x09
'Zong ', # 0x0a
'Ge ', # 0x0b
'Guan ', # 0x0c
'Bei ', # 0x0d
'Tian ', # 0x0e
'Shu ', # 0x0f
'Shu ', # 0x10... |
InakiZabala/odoomrp-wip | refs/heads/8.0 | mrp_product_variants/models/__init__.py | 7 | # -*- encoding: utf-8 -*-
##############################################################################
#
# 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 Licens... |
openprocurement/openprocurement.tender.competitivedialogue | refs/heads/master | openprocurement/tender/competitivedialogue/views/stage2/award_complaint_document.py | 2 | # -*- coding: utf-8 -*-
from openprocurement.tender.core.utils import optendersresource
from openprocurement.tender.openua.views.award_complaint_document import (
TenderUaAwardComplaintDocumentResource
)
from openprocurement.tender.openeu.views.award_complaint_document import (
TenderEUAwardComplaintDocumentRes... |
iHamsterball/stellaris_tech_tree | refs/heads/master | stellaris_tech_tree/interfaces.py | 1 | import codecs
import copy
import json
import os
import re
import yaml
from django.http import JsonResponse, HttpResponseBadRequest
from django.views.decorators.gzip import gzip_page
from .parse import generate_localized_tech
from .versions import versions as version_dict
@gzip_page
def techs(request, fallback=False)... |
cohortfsllc/cohort-cocl2-sandbox | refs/heads/master | tools/toolchain_tester/torture_test.py | 2 | #!/usr/bin/python
# Copyright (c) 2013 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
''' Installs and runs (a subset of) the gcc toolchain test suite against
various nacl and non-nacl toolchains
'''
import glob
imp... |
incaser/odoo-odoo | refs/heads/8.0 | addons/account/wizard/account_report_general_ledger.py | 267 | # -*- 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... |
caotianwei/django | refs/heads/master | django/conf/project_template/project_name/wsgi.py | 680 | """
WSGI config for {{ project_name }} project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.enviro... |
garyfeng/pybrain | refs/heads/master | pybrain/rl/environments/flexcube/masspoint.py | 34 | __author__ = 'Frank Sehnke, sehnke@in.tum.de'
class MArray:
def __init__(self):
self.field = {}
def get(self, i):
return self.field[i]
def set(self, i, val):
self.field[i] = val
class MassPoint:
def __init__(self):
self.pos = [0.0, 0.0, 0.0]
self.vel = [0.0, 0.... |
josuebrunel/myql | refs/heads/master | myql/myql.py | 1 | """Simple Python Wrapper of the Yahoo! Query Language
"""
from __future__ import absolute_import
import re
import logging
import requests
from myql import errors
logging.basicConfig(level=logging.DEBUG,format="[%(asctime)s %(levelname)s] [%(name)s.%(module)s.%(funcName)s] %(message)s \n")
logger = logging.getLogg... |
ondras/TeaJS | refs/heads/master | deps/v8/build/gyp/test/mac/gyptest-archs.py | 59 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Tests things related to ARCHS.
"""
import TestGyp
import re
import subprocess
import sys
if sys.platform == 'darwin':
test = TestGy... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.