repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
apache/nuvem
refs/heads/before_restructure
nuvem-parallel/nuvem/shuffle_.py
1
# 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...
neuman/orchid
refs/heads/master
core/migrations/0002_auto__add_field_score_created_at__add_field_score_updated_at__add_fiel.py
2
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Score.created_at' db.add_column(u'core_score', 'created_a...
jrnz/hadoop
refs/heads/master
contrib/hod/testing/lib.py
182
#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use thi...
proxysh/Safejumper-for-Mac
refs/heads/master
buildmac/Resources/env/lib/python2.7/site-packages/twisted/conch/test/test_insults.py
13
# -*- test-case-name: twisted.conch.test.test_insults -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.python.reflect import namedAny from twisted.trial import unittest from twisted.test.proto_helpers import StringTransport from twisted.conch.insults.insults import ServerProtoc...
SnappleCap/oh-mainline
refs/heads/master
vendor/packages/south/south/tests/fakeapp/migrations/0001_spam.py
173
from south.db import db from django.db import models class Migration: def forwards(self): # Model 'Spam' db.create_table("southtest_spam", ( ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ('weight', models.FloatField()), ('...
dlab-berkeley/collaboratool-archive
refs/heads/master
bsd2/vagrant-ansible/ansible/test/TestFilters.py
4
''' Test bundled filters ''' import unittest, tempfile, shutil from ansible import playbook, inventory, callbacks INVENTORY = inventory.Inventory(['localhost']) BOOK = ''' - hosts: localhost vars: var: { a: [1,2,3] } tasks: - template: src=%s dest=%s ''' SRC = ''' - {{ var|to_json }} - {{ var|to_nice_json...
katoken-0215/FikaNote
refs/heads/master
app/__init__.py
12133432
roverdotcom/pyexiv2
refs/heads/master
test/__init__.py
12133432
comger/migrant
refs/heads/master
web/restful/account.py
1
# -*- coding:utf-8 -*- """ account action author comger@gmail.com """ import json from kpages import url from kpages.model import ModelMaster import tornado from utility import RestfulHandler,BaseHandler from logic.utility import * from logic.account import INIT, ACTIVATED, IDENTIFIED from logic.city import ...
viki9698/jizhanggroup
refs/heads/master
djangotoolbox/errorviews.py
70
from django import http from django.template import RequestContext, loader def server_error(request, template_name='500.html'): """ 500 error handler. Templates: `500.html` Context: request_path The path of the requested URL (e.g., '/app/pages/bad_page/') """ # You need t...
drewandersonnz/openshift-tools
refs/heads/prod
openshift/installer/vendored/openshift-ansible-3.10.0-0.29.0/roles/openshift_management/filter_plugins/oo_management_filters.py
46
#!/usr/bin/python # -*- coding: utf-8 -*- """ Filter methods for the management role """ def oo_filter_container_providers(results): """results - the result from posting the API calls for adding new providers""" all_results = [] for result in results: if 'results' in result['json']: # ...
kenshay/ImageScripter
refs/heads/master
Script_Runner/PYTHON/Tools/scripts/combinerefs.py
15
#! /usr/bin/env python3 """ combinerefs path A helper for analyzing PYTHONDUMPREFS output. When the PYTHONDUMPREFS envar is set in a debug build, at Python shutdown time Py_FinalizeEx() prints the list of all live objects twice: first it prints the repr() of each object while the interpreter is still fully intact. ...
Suite5/DataColibri
refs/heads/master
allauth/socialaccount/providers/__init__.py
12
from django.conf import settings from django.utils import importlib class ProviderRegistry(object): def __init__(self): self.provider_map = {} self.loaded = False def get_list(self): self.load() return self.provider_map.values() def register(self, cls): self.load()...
kramwens/order_bot
refs/heads/master
venv/lib/python2.7/site-packages/twilio/rest/resources/base.py
32
import logging import os import platform from six import ( integer_types, string_types, binary_type, iteritems ) from ...compat import urlencode from ...compat import urlparse from ...compat import urlunparse from ... import __version__ from ...exceptions import TwilioException from ..exceptions impor...
mdaniel/intellij-community
refs/heads/master
python/testData/completion/notImportedQualifiedName/VariantsFromInternalSkeletonsExcludedUnlessExported/site-packages/mypackage/__init__.py
18
from ._impl import func_exported
arlolra/exitaddr
refs/heads/master
server.py
1
#!/usr/bin/env python import json from twisted.web import server, resource from twisted.internet import reactor from common import Exitaddr, options DEFAULT_PORT = 8080 exitaddr_results = None def addHeader(request): h = request.responseHeaders h.addRawHeader(b"content-type", b"application/json") class...
python-security/pyt
refs/heads/master
pyt/formatters/screen.py
1
"""This formatter outputs the issues as color-coded text.""" from ..vulnerabilities.vulnerability_helper import SanitisedVulnerability, UnknownVulnerability RESET = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' DANGER = '\033[31m' GOOD = '\033[32m' HIGHLIGHT = '\033[45;1m' RED_ON_WHITE = '\033[31m\033[107m' def c...
pastebt/dwm
refs/heads/master
haiuken.py
1
#!/usr/bin/env python # -*- coding: utf8 -*- import re import sys import json from base64 import b64decode try: import urllib.parse as urllib except ImportError: import urllib from mybs import MyHtmlParser from comm import DWM, match1, echo, start, get_kind_size, UTITLE class HYG(DWM): # http://haiuken....
whiskyechobravo/flask-debut
refs/heads/master
debut/__init__.py
12133432
eeroniemi/dd-agent
refs/heads/master
tests/checks/mock/__init__.py
12133432
vibhorag/scikit-learn
refs/heads/master
sklearn/datasets/tests/__init__.py
12133432
AltSchool/django
refs/heads/master
django/contrib/admindocs/tests/__init__.py
12133432
tessera-metrics/tessera
refs/heads/master
tessera-server/tessera/client/api/__init__.py
12133432
keishi/chromium
refs/heads/master
build/escape_unicode.py
155
#!/usr/bin/env python # Copyright (c) 2011 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. """Convert any unicode characters found in the input file to C literals.""" import codecs import optparse import os import sys d...
QwertyManiac/seal-cdh4
refs/heads/master
seal/lib/aligner/bwa/bwa_core.py
1
# Copyright (C) 2011-2012 CRS4. # # This file is part of Seal. # # Seal 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. # # Seal is dis...
murtidash/dom4gameserver
refs/heads/master
scripts/TurnTracker/makettweb.py
1
#!/usr/bin/python import sqlite3 from ttdatabase import * loadPlayers() loadTurns() name = getName() ofilename = "TurnTrack - %s.html" % name ofile = open(ofilename, "w+") ## Header head = "<h2> Turn Tracking for %s </h2>" % name ofile.write(head) ## Body ofile.write("<p><table width=100%>") colorDisposition ...
andpp/cherrymusic
refs/heads/devel
cherrymusicserver/migrations/test/test_migration_0003.py
7
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # CherryMusic - a standalone music server # Copyright (c) 2012-2014 Tom Wallroth & Tilman Boerner # # Project page: # http://fomori.org/cherrymusic/ # Sources on github: # http://github.com/devsnd/cherrymusic/ # # CherryMusic is based on # jPlayer (GPL/MIT license) htt...
Mixser/django
refs/heads/master
django/contrib/syndication/views.py
192
from __future__ import unicode_literals from calendar import timegm from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import Http404, HttpResponse from django.template import Templat...
cppisfun/GameEngine
refs/heads/master
foreign/boost/libs/python/pyste/dist/setup.py
13
# Copyright Bruno da Silva de Oliveira 2006. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) from distutils.core import setup import py2exe import sys sys.path.append('../src') setup(name='pyste', scripts=[...
coderbone/SickRage-alt
refs/heads/master
requirements/__init__.py
12133432
shashank971/edx-platform
refs/heads/master
lms/djangoapps/discussion_api/__init__.py
12133432
ondrokrc/gramps
refs/heads/master
gramps/webapp/grampsdb/templatetags/__init__.py
12133432
SebasSBM/django
refs/heads/master
tests/template_loader/__init__.py
12133432
myang321/django
refs/heads/master
tests/model_options/models/__init__.py
12133432
madAndroid/jenkins-job-builder
refs/heads/master
tests/properties/__init__.py
12133432
javachengwc/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/conf/locale/et/__init__.py
12133432
sdcooke/django
refs/heads/master
tests/max_lengths/__init__.py
12133432
mtils/ems
refs/heads/master
ems/qt/tool_widgets/__init__.py
12133432
srikantbmandal/ansible
refs/heads/devel
lib/ansible/modules/cloud/digital_ocean/__init__.py
12133432
hybrideagle/django
refs/heads/master
tests/datetimes/__init__.py
12133432
nharraud/b2share
refs/heads/master
invenio/legacy/bibmatch/scripts/__init__.py
12133432
impromptuartist/impromptuartist.github.io
refs/heads/master
node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/_mapping.py
189
# -*- coding: utf-8 -*- """ pygments.lexers._mapping ~~~~~~~~~~~~~~~~~~~~~~~~ Lexer mapping defintions. This file is generated by itself. Everytime you change something on a builtin lexer defintion, run this script from the lexers folder to update it. Do not alter the LEXERS dictionary by hand...
AppVentus/AvTime-client
refs/heads/master
packages/wakatime/wakatime/packages/pygments2/pygments/lexers/_mapping.py
189
# -*- coding: utf-8 -*- """ pygments.lexers._mapping ~~~~~~~~~~~~~~~~~~~~~~~~ Lexer mapping defintions. This file is generated by itself. Everytime you change something on a builtin lexer defintion, run this script from the lexers folder to update it. Do not alter the LEXERS dictionary by hand...
gpitel/pyjs
refs/heads/master
tests/test047.py
13
global x x = 5 x += 1 while x > 0: print x x -= 1 try: print 5 except: print 2 if __name__ == '__main__': print x print 5 for x in range(10): print x
BiobankLab/FA_TOOL
refs/heads/master
fatool/sequence.py
1
# -*- coding: utf-8 -*- from string import maketrans from collections import Counter import fuzzy import re import logging class Sequence(object): # 1 tdict_standard = { 'GCA':'A','GCC':'A','GCG':'A','GCT':'A', 'TGC':'C','TGT':'C', 'GAC':'D', 'GAT':'D', 'GAA':'E', 'GAG':'E', 'TTC...
ryangallen/django
refs/heads/master
tests/migrations2/test_migrations_2_first/0001_initial.py
427
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("migrations", "__first__"), ] operations = [ migrations.CreateModel( "OtherAuthor", [ ...
ehartsuyker/securedrop
refs/heads/develop
securedrop/journalist_app/forms.py
2
# -*- coding: utf-8 -*- from flask_babel import lazy_gettext as gettext from flask_wtf import FlaskForm from flask_wtf.file import FileField, FileAllowed, FileRequired from wtforms import (TextAreaField, TextField, BooleanField, HiddenField, ValidationError) from wtforms.validators import InputReq...
sallaire/Sick-Beard
refs/heads/development
sickbeard/scene_exceptions.py
30
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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...
anurag-ks/eden
refs/heads/master
modules/templates/ARC/menus.py
13
# -*- coding: utf-8 -*- from gluon import current from s3 import * from s3layouts import * try: # Nice to not have to copy this file, but currently imported in s3layouts.py #from templates.IFRC.layouts import * from .layouts import * except ImportError: pass import s3menus as default #red_cross_filter...
pchauncey/ansible
refs/heads/devel
lib/ansible/modules/network/layer3/net_vrf.py
96
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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', ...
nan86150/ImageFusion
refs/heads/master
lib/python2.7/site-packages/scipy/linalg/linalg_version.py
156
from __future__ import division, print_function, absolute_import major = 0 minor = 4 micro = 9 linalg_version = '%(major)d.%(minor)d.%(micro)d' % (locals())
OTWillems/GEO1005
refs/heads/master
SpatialDecision/external/networkx/generators/tests/test_geometric.py
88
#!/usr/bin/env python from nose.tools import * import networkx as nx class TestGeneratorsGeometric(): def test_random_geometric_graph(self): G=nx.random_geometric_graph(50,0.25) assert_equal(len(G),50) def test_geographical_threshold_graph(self): G=nx.geographical_threshold_graph(50,10...
adblockplus/gyp
refs/heads/master
pylib/gyp/generator/cmake.py
29
# 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. """cmake output module This module is under development and should be considered experimental. This module produces cmake (2.8.8+) input as its output. One CMake...
u0m3/gr-baz
refs/heads/master
gr_baz_attach.py
4
#!/usr/bin/env python import sys import os if __name__ == '__main__': if len(sys.argv) == 1: print 'usage: gr_baz_attach.py [path to gnuradio src tree]' exit() top_gr_cmakelists = os.path.join(sys.argv[1], 'CMakeLists.txt') gr_baz_src_dir = os.path.dirname(os.path.abspath(__file__)).replac...
frouty/odoo_oph
refs/heads/dev_70
addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
87
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2013 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
qenter/vlc-android
refs/heads/master
toolchains/arm/lib/python2.7/test/test_lib2to3.py
137
# Skipping test_parser and test_all_fixers # because of running from lib2to3.tests import (test_fixers, test_pytree, test_util, test_refactor, test_parser, test_main as test_main_) import unittest from test.test_support import run_unittest def suite(): tests = unittest.TestSuite() lo...
sysalexis/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/unittest/test/testmock/testmock.py
73
import copy import sys import unittest from unittest.test.testmock.support import is_instance from unittest import mock from unittest.mock import ( call, DEFAULT, patch, sentinel, MagicMock, Mock, NonCallableMock, NonCallableMagicMock, _CallList, create_autospec ) class Iter(object): def __init__...
hikelee/projector
refs/heads/master
admin/launcher/tests.py
24123
from django.test import TestCase # Create your tests here.
dreamsxin/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_codeop.py
118
""" Test cases for codeop.py Nick Mathewson """ import unittest from test.support import run_unittest, is_jython from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT import io if is_jython: import sys def unify_callables(d): for n,v in d.items(): if hasattr(v, '__call__'): ...
jeeftor/alfredToday
refs/heads/master
src/workflow/notify.py
31
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2015 deanishe@deanishe.net # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2015-11-26 # # TODO: Exclude this module from test and code coverage in py2.6 """ Post notifications via the macOS Notification Center. This feature is only avail...
TRIOrganization/TRI
refs/heads/master
TRI/main/migrations/0018_artificialintellignece_pub_date.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-06-10 18:37 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('main', '0017_networking_pub_date'), ...
bdang2012/taiga-back-casting
refs/heads/branch_casting
taiga/auth/api.py
1
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 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 # pub...
azureplus/chromium_depot_tools
refs/heads/master
third_party/pylint/lint.py
46
# Copyright (c) 2003-2014 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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 2 of the License, o...
szopu/django
refs/heads/master
tests/forms_tests/tests/test_extra.py
16
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import warnings from django.forms import ( CharField, DateField, EmailField, FileField, Form, GenericIPAddressField, HiddenInput, ImageField, IPAddressField, MultipleChoiceField, MultiValueField, MultiWidget, PasswordInput, Se...
moto-timo/ironpython3
refs/heads/master
Tests/test_syntax.py
1
##################################################################################### # # 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...
googleapis/googleapis-gen
refs/heads/master
google/cloud/bigquery/reservation/v1beta1/bigquery-reservation-v1beta1-py/google/cloud/bigquery/reservation_v1beta1/services/reservation_service/transports/__init__.py
2
# -*- 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...
dato-code/numpy
refs/heads/master
numpy/core/machar.py
71
""" Machine arithmetics - determine the parameters of the floating-point arithmetic system Author: Pearu Peterson, September 2003 """ from __future__ import division, absolute_import, print_function __all__ = ['MachAr'] from numpy.core.fromnumeric import any from numpy.core.numeric import errstate # Need to speed ...
WIPACrepo/iceprod
refs/heads/master
tests/server/daemon_test.py
1
""" Test script for daemon """ from __future__ import absolute_import, division, print_function from tests.util import unittest_reporter, glob_tests import logging logger = logging.getLogger('daemon_test') import os import sys import time import random from datetime import datetime,timedelta from co...
pli3/enigma2-git
refs/heads/master
lib/python/Components/Timezones.py
2
import xml.etree.cElementTree from os import environ, unlink, symlink import time class Timezones: def __init__(self): self.timezones = [] self.readTimezonesFromFile() def readTimezonesFromFile(self): try: root = xml.etree.cElementTree.parse('/etc/timezone.xml').getroot() for zone in root.findall("zone...
robbiet480/python-social-auth
refs/heads/master
examples/django_example/example/app/pipeline.py
112
from django.shortcuts import redirect from social.pipeline.partial import partial @partial def require_email(strategy, details, user=None, is_new=False, *args, **kwargs): if kwargs.get('ajax') or user and user.email: return elif is_new and not details.get('email'): email = strategy.request_da...
DanielFloripa/GreenHop
refs/heads/master
Xbee/bibliotecas/pyserial-2.7/examples/wxTerminal.py
22
#!/usr/bin/env python # generated by wxGlade 0.3.1 on Fri Oct 03 23:23:45 2003 #from wxPython.wx import * import wx import wxSerialConfigDialog import serial import threading #---------------------------------------------------------------------- # Create an own event type, so that GUI updates can be delegated # this...
fhollanda/Stepper-Motor-Interface
refs/heads/master
adapter/bridge.py
1
#!adapter/env/bin/python from flask import Flask, request, abort from flask_restful import Api from flask_cors import CORS from resources.abort import Abort from resources.captures import Capture, CapturesList from resources.copyright import Copyright from resources.movement import SingleAxisMove, SingleAxisMoveAndCapt...
fujunwei/chromium-crosswalk
refs/heads/master
tools/perf/page_sets/maps.py
3
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module from page_sets import webgl_supported_shared_state c...
L34p/HeXA-CTF-2015
refs/heads/master
account/__init__.py
12133432
webmasterraj/GaSiProMo
refs/heads/master
flask/lib/python2.7/site-packages/boto/cloudfront/identity.py
170
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.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, modi...
CitoEngine/cito_plugin_server
refs/heads/master
staticfiles/admin/js/compress.py
784
#!/usr/bin/env python import os import optparse import subprocess import sys here = os.path.dirname(__file__) def main(): usage = "usage: %prog [file1..fileN]" description = """With no file paths given this script will automatically compress all jQuery-based files of the admin app. Requires the Google Closure...
wutron/dlcoal
refs/heads/master
dlcoal/__init__.py
2
""" Code for the DLCoal model (duplications, losses, and coalescence) """ from __future__ import division # python libs import copy import os import sys import random from itertools import chain, izip import traceback from math import * # import dlcoal C lib from dlcoal.ctypes_export import * dlcoalc = load_...
nkgilley/home-assistant
refs/heads/dev
tests/components/upnp/mock_device.py
14
"""Mock device for testing purposes.""" from typing import Mapping from homeassistant.components.upnp.const import ( BYTES_RECEIVED, BYTES_SENT, PACKETS_RECEIVED, PACKETS_SENT, TIMESTAMP, ) from homeassistant.components.upnp.device import Device import homeassistant.util.dt as dt_util class Mock...
wenxuan-xia/niv_blog
refs/heads/master
niv_blog/urls.py
1
"""niv_blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
SRabbelier/Melange
refs/heads/master
thirdparty/google_appengine/lib/django_0_96/django/template/loaders/__init__.py
12133432
Harry-R/skylines
refs/heads/master
skylines/lib/waypoints/__init__.py
12133432
seckcoder/lang-learn
refs/heads/master
python/sklearn/examples/cluster/plot_cluster_iris.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= K-means Clustering ========================================================= The plots display firstly what a K-means algorithm would yield using three clusters. It is then shown what the effect of a bad initializa...
yyd01245/libavg
refs/heads/master
win/genwinimportlibs.py
7
#!/usr/bin/env python import os import string os.chdir("deps") def tmpFileToDef(baseName): tmpFile = open("tmp", "r") defFile = open(baseName+".def", "w") defFile.write("EXPORTS\n") content = tmpFile.readlines() i = 0 while content[i].find("ordinal hint") == -1: i += 1 ...
eezee-it/server-tools
refs/heads/8.0
base_ir_filters_active/tests/test_base_ir_filters_active.py
13
# -*- coding: utf-8 -*- # © 2016 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.tests.common import TransactionCase class TestBaseIrFiltersActive(TransactionCase): def test_base_ir_filters_active(self): new_filter = self.env['ir.filters'].creat...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/cryptography-1.3.1/src/_cffi_src/commoncrypto/sectransform.py
10
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function INCLUDES = """ #include <Security/SecDigestTransform.h> #include <Securit...
skinny121/MCEdit-TallWorlds
refs/heads/master
stock-filters/CreateBusses.py
11
# Feel free to modify and use this filter however you wish. If you do, # please give credit to SethBling. # http://youtube.com/SethBling from numpy import sign displayName = "Create Busses" def perform(level, box, options): level.markDirtyBox(box) bus = BusCreator(level, box, options) bus.getTerminals(...
landism/pants
refs/heads/master
src/python/pants/cache/cache_setup.py
3
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import thr...
vbraun/oxford-strings
refs/heads/master
lib/icalendar/cal.py
1
# -*- coding: utf-8 -*- """Calendar is a dictionary like Python object that can render itself as VCAL files according to rfc2445. These are the defined components. """ from datetime import datetime from icalendar.caselessdict import CaselessDict from icalendar.parser import Contentline from icalendar.parser import Con...
mlperf/training_results_v0.7
refs/heads/master
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/googletest/googletest/test/googletest-failfast-unittest.py
21
#!/usr/bin/env python # # Copyright 2020 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...
pwoodworth/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/forms/util.py
311
from django.utils.html import conditional_escape from django.utils.encoding import StrAndUnicode, force_unicode from django.utils.safestring import mark_safe # Import ValidationError so that it can be imported from this # module to maintain backwards compatibility. from django.core.exceptions import ValidationError d...
Syrcon/servo
refs/heads/master
tests/wpt/web-platform-tests/old-tests/webdriver/network.py
212
# this comes from this stack overflow post: # http://stackoverflow.com/a/1947766/725944 # module for getting the lan ip address of the computer import os import socket if os.name != "nt": import fcntl import struct def get_interface_ip(ifname): sckt = socket.socket(socket.AF_INET, socket.SOCK_DGR...
quantopian/odo
refs/heads/master
docs/source/conf.py
8
# -*- coding: utf-8 -*- # # into documentation build configuration file, created by # sphinx-quickstart on Sat Dec 6 16:03:44 2015. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
jbranchaud/hn-cli
refs/heads/master
RSSParser.py
2
#!/usr/bin/python import sys import requests from xml.dom import minidom import urllib2 def main(argv): #request = requests.get('http://news.ycombinator.com/bigrss') f = urllib2.urlopen('http://news.ycombinator.com/bigrss') #xmldoc = minidom.parseString(request.text) xmldoc = minidom.parse(f) item...
applicationdevm/XlsxWriter
refs/heads/master
examples/hide_row_col.py
9
############################################################################### # # Example of how to hide rows and columns in XlsxWriter. In order to # hide rows without setting each one, (of approximately 1 million rows), # Excel uses an optimisation to hide all rows that don't have data. # # Copyright 2013-2015, Joh...
cwyark/micropython
refs/heads/master
tests/basics/fun_callstar.py
46
# function calls with *pos def foo(a, b, c): print(a, b, c) foo(*(1, 2, 3)) foo(1, *(2, 3)) foo(1, 2, *(3,)) foo(1, 2, 3, *()) # Another sequence type foo(1, 2, *[100]) # Iterator foo(*range(3)) # pos then iterator foo(1, *range(2, 4)) # an iterator with many elements def foo(*rest): print(rest) foo(*rang...
googleapis/googleapis-gen
refs/heads/master
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/search_term_view_service/transports/base.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...
jirikuncar/invenio
refs/heads/master
invenio/modules/oauthclient/contrib/__init__.py
20
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
amitgandhinz/cdn
refs/heads/master
poppy/openstack/common/local.py
378
# Copyright 2011 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
alexallah/django
refs/heads/master
tests/model_options/test_default_related_name.py
133
from django.core.exceptions import FieldError from django.test import TestCase from .models.default_related_name import Author, Book, Editor class DefaultRelatedNameTests(TestCase): @classmethod def setUpTestData(cls): cls.author = Author.objects.create(first_name='Dave', last_name='Loper') ...
ptisserand/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_vpn_connection.py
29
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017, René Moser <mail@renemoser.net> # 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': ...