repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
halbbob/dff
refs/heads/develop
modules/viewer/hexedit/cursors.py
1
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009 ArxSys # # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this # ...
sumitsourabh/opencog
refs/heads/master
opencog/python/learning/bayesian_learning/__init__.py
281
__author__ = 'keyvan'
basicthinker/THNVM
refs/heads/master
ext/ply/test/calclex.py
164
# ----------------------------------------------------------------------------- # calclex.py # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = ( 'NAME','NUMBER', 'PLUS','MINUS','TIMES','DIV...
mthurlin/gevent-MySQL
refs/heads/master
lib/geventmysql/client.py
1
# Copyright (C) 2009, Hyves (Startphone Ltd.) # # This module is part of the Concurrence Framework and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php #TODO supporting closing a halfread resultset (e.g. automatically read and discard rest) import errno from geventmysql._mys...
2ndQuadrant/ansible
refs/heads/master
lib/ansible/modules/network/vyos/vyos_l3_interface.py
56
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
YOTOV-LIMITED/kitsune
refs/heads/master
kitsune/sumo/__init__.py
13
class ProgrammingError(Exception): """Somebody made a mistake in the code.""" # MONKEYPATCH! WOO HOO! LULZ from kitsune.sumo.monkeypatch import patch # noqa patch()
Vegasvikk/django-cms
refs/heads/develop
cms/south_migrations/0071_mptt_to_mp.py
51
# -*- coding: utf-8 -*- from django.db.models import F from django.middleware import transaction from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models from treebeard.numconv import NumConv STEPLEN = 4 ALPHABET = '0123456789ABCDEFGHIJ...
AndreManzano/django-rblreport
refs/heads/master
coredata/views.py
1
# from django.shortcuts import render from rest_framework import viewsets from .models import Ip, Rbl from .serializers import IpSerializer, RblSerializer class IpViewSet(viewsets.ModelViewSet): queryset = Ip.objects.all().order_by('id') serializer_class = IpSerializer class RblViewSet(viewsets.ModelViewSet...
tvibliani/odoo
refs/heads/8.0
addons/point_of_sale/point_of_sale.py
28
# -*- 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...
jpshort/odoo
refs/heads/8.0
addons/l10n_ch/__init__.py
424
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA # Financial contributors: Hasa SA, Open Net SA, # Prisme Solutions Informatique SA, Quod SA # # Translation contributors: brain-te...
zhukaixy/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_asyncio/test_locks.py
80
"""Tests for lock.py""" import unittest from unittest import mock import re import asyncio from asyncio import test_utils STR_RGX_REPR = ( r'^<(?P<class>.*?) object at (?P<address>.*?)' r'\[(?P<extras>' r'(set|unset|locked|unlocked)(,value:\d)?(,waiters:\d+)?' r')\]>\Z' ) RGX_REPR = re.compile(STR_R...
dnanexus/rseqc
refs/heads/master
rseqc/lib/bx/align/sitemask/core.py
7
""" Base classes for site maskers. """ from bx.filter import * class Masker( Filter ): def __init__( self, **kwargs ): self.masked = 0 self.total = 0 Exception("Abstract class") class MaskPipeline( Pipeline ): """ MaskPipeline implements a Pipeline through which alignments can be ...
israeleriston/scientific-week
refs/heads/master
backend/venv/lib/python3.5/site-packages/flask/config.py
76
# -*- coding: utf-8 -*- """ flask.config ~~~~~~~~~~~~ Implements the configuration related objects. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import types import errno from werkzeug.utils import import_string from ._compat import string_ty...
hurricup/intellij-community
refs/heads/master
python/testData/intentions/convertLambdaToFunction_after.py
83
def newlist(x, y): return (x + y) / y x = 1
TeamExodus/external_chromium_org
refs/heads/EXODUS-5.1
mojo/public/python/mojo/bindings/__init__.py
1201
# 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.
sam-roth/Keypad
refs/heads/master
keypad/util/_test_rangedict.py
1
import random import itertools import pytest from .rangedict import RangeDict random.seed(0) minkey = 0 maxkey = 100 counter = itertools.count() def random_op(): k1 = random.randrange(minkey, maxkey) k2 = random.randrange(k1, maxkey + 1) v = next(counter) def delete(d): del d[k1:k2] ...
vmarkovtsev/django
refs/heads/master
django/db/migrations/operations/base.py
356
from __future__ import unicode_literals from django.db import router class Operation(object): """ Base class for migration operations. It's responsible for both mutating the in-memory model state (see db/migrations/state.py) to represent what it performs, as well as actually performing it agains...
TheWylieStCoyote/gnuradio
refs/heads/master
gr-digital/examples/ofdm/benchmark_add_channel.py
3
#!/usr/bin/env python # # Copyright 2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from __future__ import print_function from __future__ import division from __future__ import unicode_literals from gnuradio import gr, channels from gnuradi...
antoinecarme/pyaf
refs/heads/master
tests/model_control/detailed/transf_Quantization/model_control_one_enabled_Quantization_MovingAverage_Seasonal_WeekOfYear_LSTM.py
1
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Quantization'] , ['MovingAverage'] , ['Seasonal_WeekOfYear'] , ['LSTM'] );
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/shlex.py
16
# -*- coding: iso-8859-1 -*- """A lexical analyzer class for simple shell-like syntaxes.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 # Input stacking and error message cleanup added by ESR, March 2000 # push_source() and pop_source() made explicit by ESR, January 2001. # Posix compliance, split(), st...
tiagofrepereira2012/tensorflow
refs/heads/master
tensorflow/python/profiler/model_analyzer.py
9
# 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...
AntouanK/rethinkdb
refs/heads/next
test/rql_test/connections/http_support/decorator/decorator.py
112
########################## LICENCE ############################### # Copyright (c) 2005-2012, Michele Simionato # 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 so...
disruptek/boto
refs/heads/develop
boto/elastictranscoder/exceptions.py
184
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
lafayette/JBTT
refs/heads/master
framework/python/Lib/encodings/iso2022_jp_2004.py
816
# # iso2022_jp_2004.py: Python Unicode Codec for ISO2022_JP_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class I...
neavouli/yournextrepresentative
refs/heads/release-neavouli
elections/uk/settings.py
4
from __future__ import unicode_literals MAPIT_BASE_URL = 'http://mapit.democracyclub.org.uk/' SITE_OWNER = 'Democracy Club' COPYRIGHT_HOLDER = 'Democracy Club Limited'
dafx/aubio
refs/heads/master
python/demos/demo_source.py
5
#! /usr/bin/env python import sys from aubio import source if __name__ == '__main__': if len(sys.argv) < 2: print('usage: %s <inputfile> [samplerate] [hop_size]' % sys.argv[0]) sys.exit(1) samplerate = 0 hop_size = 256 if len(sys.argv) > 2: samplerate = int(sys.argv[2]) if len(sys....
bratsche/Neutron-Drive
refs/heads/master
google_appengine/lib/antlr3/antlr3/tree.py
78
""" @package antlr3.tree @brief ANTLR3 runtime package, tree module This module contains all support classes for AST construction and tree parsers. """ # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or...
opennetworkinglab/spring-open-cli
refs/heads/master
sdncon/coreui/templatetags/__init__.py
86
# # Copyright (c) 2013 Big Switch Networks, Inc. # # Licensed under the Eclipse Public License, Version 1.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.eclipse.org/legal/epl-v10.html # # Unless required by applicable l...
nguyenkims/projecteuler-python
refs/heads/master
src/p82.py
1
A=[] limit = 10 ** 6 def fillA() : B = [] inp = file('matrix.txt') t = inp.readline() while t!="": # K = t.strip().split() K = t.strip().split(',') B.append(K) t = inp.readline() # print B for i in range(0,len(B)): A.append([]) for b in B: for i in range(0,len(B)): A[i].append(int(b[i])) # prin...
nttks/jenkins-test
refs/heads/gacco/birch
common/lib/xmodule/xmodule/tests/test_xml_module.py
12
# disable missing docstring # pylint: disable=missing-docstring import unittest from mock import Mock from nose.tools import assert_equals, assert_not_equals, assert_true, assert_false, assert_in, assert_not_in # pylint: disable=no-name-in-module from xblock.field_data import DictFieldData from xblock.fields import...
criteo-forks/graphite-web
refs/heads/master
webapp/graphite/functions/views.py
4
import json from graphite.util import jsonResponse, HttpResponse, HttpError from graphite.functions import SeriesFunctions, SeriesFunction, PieFunctions, PieFunction, functionInfo class jsonInfinityEncoder(json.JSONEncoder): def encode(self, o): return super(jsonInfinityEncoder, self).encode(o).replace('...
LiaoPan/scikit-learn
refs/heads/master
benchmarks/bench_plot_fastkmeans.py
294
from __future__ import print_function from collections import defaultdict from time import time import numpy as np from numpy import random as nr from sklearn.cluster.k_means_ import KMeans, MiniBatchKMeans def compute_bench(samples_range, features_range): it = 0 results = defaultdict(lambda: []) chun...
lunafeng/django
refs/heads/master
tests/view_tests/models.py
281
""" Regression tests for Django built-in views. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=100) def __str__(self): return self.name def get_absolute_ur...
ezequielpereira/Time-Line
refs/heads/master
libs64/wx/lib/masked/maskededit.py
2
#---------------------------------------------------------------------------- # Name: maskededit.py # Authors: Will Sadkin, Jeff Childers # Email: wsadkin@parlancecorp.com, jchilders_98@yahoo.com # Created: 02/11/2003 # Copyright: (c) 2003 by Jeff Childers, Will Sadkin, 2003 # Portions: ...
ibollen/repo
refs/heads/master
subcmds/abandon.py
21
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
general-ai-challenge/Round1
refs/heads/master
src/tasks/competition/to_be_validated.py
1
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from core.task import Task, on_start, on_message, on_sequence,\ on_state_changed, on_timeout, on_output_message import tasks.competition.messages as msg import random ...
babyliynfg/cross
refs/heads/master
tools/project-creator/Python2.6.6/Lib/test/testcodec.py
15
""" Test Codecs (used by test_charmapcodec) Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map...
buguelos/odoo
refs/heads/master
openerp/tools/pdf_utils.py
456
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
cuongnv23/ansible
refs/heads/devel
lib/ansible/modules/system/gluster_volume.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Taneli Leppä <taneli@crasman.fi> # 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', ...
OpenDataNode/ckanext-odn-pipeline
refs/heads/master
ckanext/internal_api/plugin.py
1
''' Created on 9.2.2015 @author: mvi ''' from ckan.common import _, c import ckan.logic as logic import ckan.plugins as plugins from ckanext.model.pipelines import Pipelines import urllib import logging import pylons.config as config from ckan.model.user import User import json from ckan.controllers.package import ...
igemsoftware/SYSU-Software2013
refs/heads/master
project/Python27/Lib/site-packages/win32comext/adsi/adsicon.py
29
ADS_ATTR_CLEAR = ( 1 ) ADS_ATTR_UPDATE = ( 2 ) ADS_ATTR_APPEND = ( 3 ) ADS_ATTR_DELETE = ( 4 ) ADS_EXT_MINEXTDISPID = ( 1 ) ADS_EXT_MAXEXTDISPID = ( 16777215 ) ADS_EXT_INITCREDENTIALS = ( 1 ) ADS_EXT_INITIALIZE_COMPLETE = ( 2 ) ADS_SEARCHPREF_ASYNCHRONOUS = 0 ADS_SEARCHPREF_DEREF_ALIASES = 1 ADS_SEARCHPREF_SIZE...
hwsyy/scrapy
refs/heads/master
scrapy/commands/__init__.py
129
""" Base class for Scrapy commands """ import os from optparse import OptionGroup from twisted.python import failure from scrapy.utils.conf import arglist_to_dict from scrapy.exceptions import UsageError class ScrapyCommand(object): requires_project = False crawler_process = None # default settings to ...
EventGhost/EventGhost
refs/heads/master
languages/sv_SV.py
4
# -*- coding: UTF-8 -*- class General: apply = u"Verkställ" autostartItem = u"Autostart" browse = u"Bläddra..." cancel = u"Avbryt" choose = u"Välj" configTree = u"Konfigurationsträd" deleteLinkedItems = u"Minst ett objekt utanför din markering refererar till ett objekt i din markering. Om du...
badreddinetahir/pwn_plug_sources
refs/heads/master
src/theharvester/discovery/googlesearch.py
8
import string import httplib, sys import parser import re import time class search_google: def __init__(self,word,limit,start): self.word=word self.files="pdf" self.results="" self.totalresults="" self.server="www.google.com" self.hostname="www.google.com" self.userAgent="(Mozilla/5.0 (Windows; U; Windo...
FLIHABI/Farango
refs/heads/bleeding
check/tests/bind/good/rec_function.py
1
input =b""" fun a() : int; fun b() : int = a() + 1; fun a() : int = b() + 1; """ rules = [ 'compare_exit_status' ]
raildo/keystone
refs/heads/master
keystone/middleware/ec2_token.py
4
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
chenjun0210/tensorflow
refs/heads/master
tensorflow/python/platform/logging_test.py
210
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
procangroup/edx-platform
refs/heads/master
common/lib/sandbox-packages/eia.py
193
""" Standard resistor values. Commonly used for verifying electronic components in circuit classes are standard values, or conversely, for generating realistic component values in parameterized problems. For details, see: http://en.wikipedia.org/wiki/Electronic_color_code """ # pylint: disable=invalid-name # r is st...
liyu1990/sklearn
refs/heads/master
sklearn/utils/graph.py
289
""" Graph utilities and algorithms Graphs are represented with their adjacency matrices, preferably using sparse matrices. """ # Authors: Aric Hagberg <hagberg@lanl.gov> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Jake Vanderplas <vanderplas@astro.washington.edu> # License: BSD 3 clause impo...
SRabbelier/Melange
refs/heads/master
app/soc/logic/models/presence_with_tos.py
2
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange authors. # # 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 applic...
alfa-addon/addon
refs/heads/master
plugin.video.alfa/channels/url.py
1
# -*- coding: utf-8 -*- from core import httptools from core import scrapertools from core import servertools from core.item import Item from platformcode import config, logger def mainlist(item): logger.info() itemlist = [] itemlist.append(Item(channel=item.channel, action="search", title=...
bdang2012/taiga-back
refs/heads/master
taiga/projects/userstories/serializers.py
1
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
TeachAtTUM/edx-platform
refs/heads/master
openedx/core/djangoapps/catalog/admin.py
24
""" Django admin bindings for catalog support models. """ from config_models.admin import ConfigurationModelAdmin from django.contrib import admin from openedx.core.djangoapps.catalog.models import CatalogIntegration admin.site.register(CatalogIntegration, ConfigurationModelAdmin)
moijes12/oh-mainline
refs/heads/master
vendor/packages/gdata/tests/gdata_tests/marketplace/live_client_test.py
39
#!/usr/bin/python # # Copyright 2009 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...
G-P-S/depot_tools
refs/heads/master
third_party/gsutil/gslib/commands/chacl.py
50
# Copyright 2013 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 by applicable law or a...
Spacecraft-Code/SPELL
refs/heads/master
drivers/example/src/__init__.py
2
################################################################################### ## MODULE : __init__ ## DATE : Mar 18, 2011 ## PROJECT : SPELL ## DESCRIPTION: Module initialization ## -------------------------------------------------------------------------------- ## ## Copyright (C) 2008, 2015 SES E...
romankagan/DDBWorkbench
refs/heads/master
python/testData/intentions/PyStringConcatenationToFormatIntentionTest/escapingPy3_after.py
83
string = "string" some_string = "some \\ \" escaping {0}".format(string)
pchauncey/ansible
refs/heads/devel
lib/ansible/plugins/action/netconf_config.py
118
# # Copyright 2016 Peter Sprygada <psprygada@ansible.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...
mdda/fossasia-2016_deep-learning
refs/heads/master
notebooks/models/imagenet_theano/imagenet.py
2
def get_synset(path='../data/imagenet_synset_words.txt'): with open(path, 'r') as f: # Strip off the first word (until space, maxsplit=1), then synset is remainder return [ line.strip().split(' ', 1)[1] for line in f]
abdoosh00/edraak
refs/heads/master
cms/lib/xblock/test/test_runtime.py
39
""" Tests of edX Studio runtime functionality """ from urlparse import urlparse from mock import Mock from unittest import TestCase from cms.lib.xblock.runtime import handler_url class TestHandlerUrl(TestCase): """Test the LMS handler_url""" def setUp(self): self.block = Mock() def test_trailin...
jgors/duecredit
refs/heads/master
duecredit/cmdline/cmd_test.py
1
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the duecredit package for the # copyright and license terms. # # ## ### ...
Chris7/pyquant
refs/heads/master
setup.py
1
from __future__ import print_function import os # These exceptions are for building pyquant on lambdas, which parse # the setup.py file. Sane builders will never hit this include_dirs = [] try: import numpy include_dirs.append(numpy.get_include()) except ImportError: pass from setuptools import ( Exte...
algorythmic/bash-completion
refs/heads/master
test/t/test_python3.py
2
import pytest class TestPython3: @pytest.mark.complete("python3 ") def test_1(self, completion): assert completion @pytest.mark.complete("python3 -", require_cmd=True) def test_2(self, completion): assert len(completion) > 1 @pytest.mark.complete("python3 -c ") def test_3(sel...
yjmade/odoo
refs/heads/8.0
addons/resource/tests/test_resource.py
243
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
snakeleon/YouCompleteMe-x64
refs/heads/master
third_party/ycmd/ycmd/tests/python/subcommands_test.py
2
# Copyright (C) 2015-2020 ycmd contributors # # This file is part of ycmd. # # ycmd 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. # #...
c4fcm/DataBasic
refs/heads/master
databasic/mail.py
1
import logging from flask_mail import Message from databasic import app, mail logger = logging.getLogger(__name__) DEFAULT_SENDER = app.config.get('MAIL_USERNAME') def send_email(sender, recipients, subject, message): logger.debug('Sending mail '+sender+':'+subject) msg = Message(subject, ...
ingokegel/intellij-community
refs/heads/master
python/testData/intentions/googleNoReturnSectionForInit.py
82
class C: def __i<caret>nit__(self, x, y): return None
neumerance/cloudloon2
refs/heads/master
.venv/lib/python2.7/site-packages/heatclient/tests/__init__.py
12133432
globocom/database-as-a-service
refs/heads/master
dbaas/workflow/steps/redis/__init__.py
12133432
chand3040/cloud_that
refs/heads/named-release/cypress.rc
lms/djangoapps/certificates/management/commands/__init__.py
12133432
okfish/django-oscar
refs/heads/master
tests/integration/customer/__init__.py
12133432
rmehta/frappe
refs/heads/develop
frappe/core/doctype/language/__init__.py
12133432
gengue/django
refs/heads/master
tests/gis_tests/rasterapp/__init__.py
12133432
stonebig/bokeh
refs/heads/master
bokeh/sampledata/tests/test_us_counties.py
2
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
Kongsea/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/bijectors/invert.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...
tbentropy/tilecutter
refs/heads/master
old/v.0.3/setup.py
1
from distutils.core import setup import py2exe setup( windows = [ { "script": "tilecutter.py", "icon_resources": [(1, "tilecutter.ico")] } ], )
alisidd/tensorflow
refs/heads/asgd-dc
tensorflow/python/kernel_tests/weights_broadcast_test.py
130
# 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...
YukinoHayakawa/mtasa-blue
refs/heads/master
vendor/google-breakpad/src/tools/gyp/test/mac/gyptest-clang-cxx-language-standard.py
264
#!/usr/bin/env python # Copyright (c) 2013 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. """ Verifies that CLANG_CXX_LANGUAGE_STANDARD works. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp.TestGyp(...
epssy/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/utils/http.py
35
from __future__ import unicode_literals import base64 import calendar import datetime import re import sys from binascii import Error as BinasciiError from email.utils import formatdate from django.utils.datastructures import MultiValueDict from django.utils.encoding import force_str, force_text from django.utils.fu...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/mobile/shared_dressed_rebel_major_human_male_01.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_rebel_major_human_male_01.iff" result.attribute_templa...
robertdfrench/psychic-disco
refs/heads/master
setup.py
1
from setuptools import setup, find_packages import os def readme(): with open('README.rst') as f: return f.read() def requirements(): with open('requirements.txt') as f: return [line.rstrip('\n') for line in f] def version(): return os.environ['PD_VERSION'] setup(name='psychic_disco',...
hvqzao/ipport
refs/heads/master
deprecated/ipport-list-to-screen-script-nmap-cmds.py
1
#!/usr/bin/env python name = 'regular' for ip,port in map(lambda x: x.split(' '), filter(lambda x: x[:1] != '#', map(lambda x: x.strip(), open('ports').read().strip().split('\n')))): cmd = 'time nmap -Pn -A -T4 --open -p '+port+' -oA '+name+'-'+ip+'-'+port+' '+ip #cmd = 'time nmap -T2 -vv -p1-63335 12...
nagyistoce/edx-platform
refs/heads/master
common/djangoapps/edxmako/paths.py
59
""" Set up lookup paths for mako templates. """ import hashlib import os import pkg_resources from django.conf import settings from mako.lookup import TemplateLookup from . import LOOKUP class DynamicTemplateLookup(TemplateLookup): """ A specialization of the standard mako `TemplateLookup` class which allo...
chiragjogi/odoo
refs/heads/8.0
openerp/addons/base/tests/test_xmlrpc.py
200
# -*- coding: utf-8 -*- import openerp.tests.common class test_xmlrpc(openerp.tests.common.HttpCase): at_install = False post_install = True def test_01_xmlrpc_login(self): """ Try to login on the common service. """ db_name = openerp.tests.common.get_db_name() uid = self.xmlrpc_c...
uclouvain/OSIS-Louvain
refs/heads/master
base/migrations/0495_learningachievement_consistency_id.py
1
import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0494_auto_20200115_0952'), ] operations = [ migrations.AddField( model_name='learningachievement', name='consistency_id', ...
duane-edgington/stoqs
refs/heads/master
stoqs/loaders/CANON/realtime/makeContour.py
3
__author__ = 'dcline' import os import sys if 'DJANGO_SETTINGS_MODULE' not in os.environ: os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings.local' sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../toNetCDF")) # lrauvNc4ToNetcdf.py is in sister toNetCDF dir sys.path.insert(0, os.path.join(o...
webcube/django-hyperadmin
refs/heads/master
hyperadmin/resources/storages/indexes.py
1
from hyperadmin.indexes import Index from hyperadmin.resources.storages.endpoints import BoundFile from django.core.paginator import Page from django.core.exceptions import ObjectDoesNotExist class StoragePaginator(object): #count, num_pages, object_list def __init__(self, index): self.instances = in...
google/shaka-streamer
refs/heads/master
streamer/periodconcat_node.py
1
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
detrout/debian-statsmodels
refs/heads/debian
statsmodels/tsa/arima_model.py
7
# Note: The information criteria add 1 to the number of parameters # whenever the model has an AR or MA term since, in principle, # the variance could be treated as a free parameter and restricted # This code does not allow this, but it adds consistency with other # packages such as gretl and X1...
metinsay/docluster
refs/heads/master
docluster/models/classification/perceptron.py
1
import numpy as np class Perceptron(object): def __init__(self, n_iterations=10, kind='standard'): self.n_iterations = n_iterations self.kind = kind def train(self, data, labels): n_data, n_features = data.shape weights = np.zeros(n_features) offset = 0 if se...
ivh/VAMDC-VALD
refs/heads/master
nodes/ethylene/node/urls.py
59
# Optional: # Use this file to connect views from views.py in the same # directory to their URLs. #from django.conf.urls.defaults import * #from django.conf import settings #urlpatterns = patterns(settings.NODENAME+'.node.views', # (r'^$', 'index'), # )
HalcyonChimera/osf.io
refs/heads/develop
addons/figshare/models.py
14
# -*- coding: utf-8 -*- import markupsafe from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings, BaseStorageAddon) from django.db import models from framework.auth import Auth from framework.exceptions import HTTPError from osf.models.external import ExternalProvi...
marcelloceschia/asterisk-11-extended_codec
refs/heads/master
res/pjproject/tests/pjsua/scripts-call/300_ice_1_0.py
3
# $Id: 300_ice_1_0.py 369517 2012-07-01 17:28:57Z file $ # from inc_cfg import * # ICE mismatch test_param = TestParam( "Callee=use ICE, caller=no ICE", [ InstanceParam("callee", "--null-audio --use-ice --max-calls=1"), InstanceParam("caller", "--null-audio --max-calls=1") ] )
django-fluent/django-fluent-comments
refs/heads/master
fluent_comments/email.py
2
from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.core.mail import send_mail from django.template.loader import render_to_string from django.utils.encoding import force_text from fluent_comments import appsettings def send_comment_posted(comment, request): ""...
translate/pootle
refs/heads/master
pootle/apps/pootle_score/providers.py
7
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from pootle.core.delegate import event_score...
yosshy/nova
refs/heads/master
nova/api/openstack/compute/server_usage.py
23
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
nan86150/ImageFusion
refs/heads/master
lib/python2.7/site-packages/pip/_vendor/progress/__init__.py
916
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE A...
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/logstash/package.py
5
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Logstash(Package): """ Logstash is part of the Elastic Stack along with Beats, Elastic...
ketjow4/NOV
refs/heads/master
Lib/site-packages/scipy/cluster/tests/vq_test.py
63
import numpy as np from scipy.cluster import vq def python_vq(all_data,code_book): import time t1 = time.time() codes1,dist1 = vq.vq(all_data,code_book) t2 = time.time() #print 'fast (double):', t2 - t1 #print ' first codes:', codes1[:5] #print ' first dist:', dist1[:5] #print ' last...
Skeletrox/usb-backend-pinut
refs/heads/master
file_upload/changepermissions/tests.py
873
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase # Create your tests here.