repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
cdDiaCo/myGarage
refs/heads/master
myGarageClient/views.py
1
from django.shortcuts import render from myGarageClient.forms import CarForm, UserForm from django.template import RequestContext from django.shortcuts import render_to_response from django.contrib.auth import authenticate, login from django.http import HttpResponseRedirect, HttpResponse from django.contrib.auth import...
javier-ruiz-b/docker-rasppi-images
refs/heads/master
raspberry-google-home/env/lib/python3.7/site-packages/setuptools/_distutils/util.py
6
"""distutils.util Miscellaneous utility functions -- anything that doesn't fit into one of the other *util.py modules. """ import os import re import importlib.util import string import sys from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn from ...
weidnem/IntroPython2016
refs/heads/master
students/enrique_silva/session03/rot13.py
3
import string alphabet=string.ascii_lowercase rot_13_text="Zntargvp sebz bhgfvqr arne pbeare" for i, letter in enumerate(rot_13_text): letter_index=i
ltilve/ChromiumGStreamerBackend
refs/heads/master
third_party/closure_linter/closure_linter/full_test.py
84
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
Flowerfan524/TriClustering
refs/heads/master
reid/loss/tri_clu_loss.py
1
from __future__ import absolute_import import torch from torch import nn from torch.autograd import Variable import numpy as np class TripletClusteringLoss(nn.Module): def __init__(self, clusters, margin=0,): super(TripletClusteringLoss, self).__init__() assert isinstance(clusters, torch.autograd...
vikasraunak/mptcp-1
refs/heads/development
src/network/bindings/callbacks_list.py
331
callback_classes = [ ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', ...
resb53/witcher
refs/heads/master
maze/maze-output.py
1
#!/usr/local/bin/python3 import json import sys #prepare data structure maze = { "n" : { "aa":"rb", "ab":"", "ac":"", "ad":"", "ae":"st", "af":"", "ag":"", "ah":"", "ai":"", "aj":"st", "ak":"", "al":"", "am":"lb", "an":"rb", "ao":"", "ap":"", "aq":"st", "ar":"", "as":"", "at":"lb", "au":"rb", "av":"lb", "aw":"rb", ...
nbari/zunzuncito
refs/heads/master
my_api/default/v0/zun_thread/zun_thread.py
1
""" thread resource """ from zunzuncito import tools class APIResource(object): def __init__(self): self.headers = {'content-TyPe': 'text/html; charset=UTF-8'} def dispatch(self, request, response): request.log.info(tools.log_json({ 'API': request.version, 'URI': re...
Sylrob434/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/_base/search/main.py
80
from couchpotato.api import addApiView from couchpotato.core.event import fireEvent, addEvent from couchpotato.core.helpers.variable import mergeDicts, getImdb from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin log = CPLog(__name__) class Search(Plugin): def __init__(self...
hyiltiz/youtube-dl
refs/heads/master
docs/conf.py
137
# -*- coding: utf-8 -*- # # youtube-dl documentation build configuration file, created by # sphinx-quickstart on Fri Mar 14 21:05:43 2014. # # 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. # ...
miketamis/CouchPotatoServer
refs/heads/master
libs/requests/packages/urllib3/fields.py
1007
import email.utils import mimetypes from .packages import six def guess_content_type(filename, default='application/octet-stream'): """ Guess the "Content-Type" of a file. :param filename: The filename to guess the "Content-Type" of using :mod:`mimetypes`. :param default: If no "Cont...
embeddedarm/android_external_chromium_org
refs/heads/imx_KK4.4.3_2.0.0-ga
tools/json_schema_compiler/PRESUBMIT.py
127
# Copyright (c) 2012 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. """Presubmit script for changes affecting tools/json_schema_compiler/ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for mo...
pyropeter/archweb
refs/heads/master
main/migrations/0028_auto__add_field_repo_bugs_project__add_field_repo_svn_root.py
5
# encoding: 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): # Adding field 'Repo.bugs_project' db.add_column('repos', 'bugs_project', self.gf('django.db.models.fields.SmallInt...
P1R/sl4a2mongo
refs/heads/master
ReadSensors.py
1
import subprocess from ast import literal_eval as leval def gps(): cmd = ['termux-location'] p = subprocess.Popen(cmd, stdout=subprocess.PIPE) text = p.stdout.read().decode("UTF-8") #retcode = p.wait() return leval(f'{{"gps": {text} }}') #, retcode #text, ret = gps() print(gps()) #prin...
MER-GROUP/intellij-community
refs/heads/master
python/testData/codeInsight/smartEnter/while_after.py
83
while a: <caret>
elba7r/builder
refs/heads/master
frappe/hooks.py
1
from __future__ import unicode_literals from . import __version__ as app_version app_name = "frappe" app_title = "Frappe Framework" app_publisher = "Frappe Technologies" app_description = "Full stack web framework with Python, Javascript, MariaDB, Redis, Node" app_icon = "octicon octicon-circuit-board" app_color = "or...
ptemplier/ansible
refs/heads/devel
lib/ansible/modules/monitoring/monit.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Darryl Stoflet <stoflet@gmail.com> # 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', ...
ahuang11/ahh
refs/heads/master
examples/old_examples/basic_example.py
1
from ahh import vis x = [1, 2, 3, 4] y = [5, 6, 7, 8] vis.plot_line(x, y)
jhunufernandes/ArduWatchRaspSerial
refs/heads/master
virtualenv/lib/python3.4/site-packages/pip/_vendor/requests/auth.py
149
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib import threading from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import pa...
theunissenlab/python-neo
refs/heads/master
neo/test/iotest/test_brainwaredamio.py
6
# -*- coding: utf-8 -*- """ Tests of neo.io.brainwaredamio """ # needed for python 3 compatibility from __future__ import absolute_import, division, print_function import os.path import sys try: import unittest2 as unittest except ImportError: import unittest import numpy as np import quantities as pq from...
yephper/django
refs/heads/master
tests/delete_regress/tests.py
1
from __future__ import unicode_literals import datetime from django.db import connection, models, transaction from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from .models import ( Award, AwardNote, Book, Child, Eaten, Email, File, Food, FooFile, FooFileProxy, FooImage, Foo...
minixalpha/Online-Judge
refs/heads/master
LeetCode/Python/linked_list_cycle_ii.py
2
#!/usr/bin/env python #coding: utf-8 # Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: # @param head, a ListNode # @return a list node def detectCycle(self, head): visited = set([]) h = head ...
dancingdan/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/bijectors/square.py
35
# 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...
ReneHerthel/RIOT
refs/heads/master
dist/tools/headerguards/headerguards.py
39
#!/usr/bin/env python3 import os import sys import difflib from io import BytesIO, TextIOWrapper _in = "/-." _out = "___" transtab = str.maketrans(_in, _out) def path_to_guardname(filepath): res = filepath.upper().translate(transtab) if res.startswith("_"): res = "PRIV" + res return res def g...
k-nut/osm-checker-ulm
refs/heads/master
routes.py
1
#! /usr/bin/env python2.7 # -*- coding: utf-8 -*- import requests from flask import redirect, url_for, \ render_template, jsonify, request, \ send_from_directory import datetime import logging import sys from math import log10 import codecs from models import DB_Stop, DB_Train, VBB_Stop, Bvg_line, app, db from...
trankmichael/numpy
refs/heads/master
numpy/core/tests/test_scalarinherit.py
50
# -*- coding: utf-8 -*- """ Test printing of scalar types. """ import numpy as np from numpy.testing import TestCase, run_module_suite class A(object): pass class B(A, np.float64): pass class C(B): pass class D(C, B): pass class B0(np.float64, A): pass class C0(B0): pass class TestInherit...
xqt2010a/Python_Study
refs/heads/master
python/10_uart/01_uart.py
1
#pip install pyserial import serial import struct import binascii import numpy as np from time import sleep from threading import Thread from matplotlib import pyplot as plt from matplotlib import animation global ax1 global ax2 global ax3 global ax4 global ax5 global ax6 global f global Name_Str global finish_data ...
wolendranh/movie_radio
refs/heads/master
radio/tests/services/test_date.py
1
import datetime from unittest import mock, TestCase from radio.services.date import ( get_day_time, DAY, EVENING, MORNING ) class DateServiceTestCase(TestCase): def test_evening(self): with mock.patch('radio.services.date.datetime') as mock_date: mock_date.now.return_value = ...
kifcaliph/odoo
refs/heads/8.0
addons/document/wizard/__init__.py
444
# -*- 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...
trondhindenes/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py
8
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
marchaos/plugin.image.flickr
refs/heads/master
flickrapi/__init__.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- '''A FlickrAPI interface. The main functionality can be found in the `flickrapi.FlickrAPI` class. See `the FlickrAPI homepage`_ for more info. .. _`the FlickrAPI homepage`: http://stuvel.eu/projects/flickrapi ''' __version__ = '1.4.2' __all__ = ('FlickrAPI', 'IllegalAr...
bufferapp/buffer-django-nonrel
refs/heads/master
django/contrib/localflavor/au/au_states.py
544
""" An alphabetical list of states for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ STATE_CHOICES = ( ('ACT', 'Australian Capital Territory'), ('NSW', 'New South Wales'), ('NT', 'Northern Territory'), ('QLD', 'Q...
markap/TravelMap
refs/heads/master
config/production.py
16
config = { # environment this app is running on: localhost, testing, production 'environment': "production", # ----> ADD MORE CONFIGURATION OPTIONS HERE <---- }
SciGaP/DEPRECATED-Cipres-Airavata-POC
refs/heads/master
saminda/cipres-airavata/sdk/scripts/remote_resource/triton/new_delete.py
4
#!/usr/bin/env python # import test_lib as lib import lib import sys import os import getopt def main(argv=None): """ Usage is: delete.py -j jobid [-u url] -d workingdir """ if argv is None: argv=sys.argv jobid = url = None options, remainder = getopt.getopt(argv[1:], "-j:-u:-d:") ...
apagac/cfme_tests
refs/heads/master
sprout/appliances/migrations/0035_auto_20160922_1635.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-09-22 16:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('appliances', '0034_provider_allow_renaming'), ] operations = [ migrations.AddField( model_name='applian...
darktears/chromium-crosswalk
refs/heads/master
tools/telemetry/third_party/websocket-client/websocket.py
67
""" websocket - WebSocket client library for Python Copyright (C) 2010 Hiroki Ohtani(liris) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, ...
NIASC/VirusMeta
refs/heads/master
blast_module/alignment_search_result.py
1
# # Created by davbzh on 2013-08-14. # from Bio import SeqIO from Bio.Blast import NCBIXML from collections import defaultdict import numpy as np import csv import os Part = 3 class BlastParser(object): '''An iterator blast parser that yields the blast results in a multiblast file''' def __init__(self, fh...
atlassian/boto
refs/heads/develop
boto/route53/connection.py
103
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011 Blue Pines Technologies LLC, Brad Carleton # www.bluepines.org # Copyright (c) 2012 42 Lines Inc., Jim Browne # # Permission is hereby granted, free of charge, to any person obtaining a # copy...
alinbalutoiu/tempest
refs/heads/master
tempest/services/volume/json/availability_zone_client.py
8
# Copyright 2014 NEC Corporation. # 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...
decvalts/cartopy
refs/heads/master
lib/cartopy/tests/test_vector_transform.py
4
# (C) British Crown Copyright 2013 - 2017, Met Office # # This file is part of cartopy. # # cartopy is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option)...
sdimoudi/bart
refs/heads/master
tests/pyBART_run_test.py
4
import sys import traceback import os try: with open(sys.argv[1], 'r') as fd: for line in fd.readlines(): exec(line) except: exc_info = sys.exc_info() traceback.print_exception(*exc_info) print('Exception occurred while executing line: ', line) sys.exit(1)
kalpana-org/kalpana-logger
refs/heads/master
showstats.py
1
#!/usr/bin/env python3 from datetime import datetime from operator import itemgetter import os import os.path from libsyntyche.common import read_json, read_file, local_path, write_file def formatted_date(datestring): return datetime.strptime(datestring, '%Y%m%d').strftime('%d %b %Y') def format_data(data): ...
lupyuen/RaspberryPiImage
refs/heads/master
home/pi/GrovePi/Software/Python/others/temboo/Library/Google/Directions/__init__.py
5
from temboo.Library.Google.Directions.GetBicyclingDirections import GetBicyclingDirections, GetBicyclingDirectionsInputSet, GetBicyclingDirectionsResultSet, GetBicyclingDirectionsChoreographyExecution from temboo.Library.Google.Directions.GetDrivingDirections import GetDrivingDirections, GetDrivingDirectionsInputSet, G...
neiudemo1/django
refs/heads/master
tests/annotations/tests.py
194
from __future__ import unicode_literals import datetime from decimal import Decimal from django.core.exceptions import FieldDoesNotExist, FieldError from django.db.models import ( F, BooleanField, CharField, Count, DateTimeField, ExpressionWrapper, Func, IntegerField, Sum, Value, ) from django.db.models.funct...
rtfd/sphinx-autoapi
refs/heads/master
autoapi/mappers/python/__init__.py
1
from .mapper import PythonSphinxMapper from .objects import ( PythonClass, PythonFunction, PythonModule, PythonMethod, PythonPackage, PythonAttribute, PythonData, PythonException, )
kaber/netlink-mmap
refs/heads/master
Documentation/target/tcm_mod_builder.py
4981
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
jacknjzhou/neutron
refs/heads/master
neutron/tests/fullstack/resources/process.py
4
# Copyright 2015 Red Hat, 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 agre...
tedder/ansible
refs/heads/devel
test/units/modules/net_tools/nios/test_nios_mx_record.py
68
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
lnielsen/invenio
refs/heads/pu
invenio/modules/formatter/models.py
1
# -*- coding: utf-8 -*- # ## This file is part of Invenio. ## Copyright (C) 2013 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) an...
cpcloud/ibis
refs/heads/master
ibis/client.py
1
import abc import ibis.common.exceptions as com import ibis.expr.operations as ops import ibis.expr.schema as sch import ibis.expr.types as ir import ibis.sql.compiler as comp import ibis.util as util from ibis.config import options class Client: pass class Query: """Abstraction for DML query execution to...
cosmiclattes/TPBviz
refs/heads/master
torrent/lib/python2.7/site-packages/south/migration/migrators.py
21
from __future__ import print_function from copy import copy, deepcopy import datetime import inspect import sys import traceback from django.core.management import call_command from django.core.management.commands import loaddata from django.db import models from django import VERSION as DJANGO_VERSION import south....
pacificIT/linux-2.6.36
refs/heads/lichee-dev
tools/perf/scripts/python/sched-migration.py
185
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf trace event handlers have been generated by perf trace -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free ...
cisco-openstack/neutron
refs/heads/staging/libertyplus
neutron/extensions/l3.py
25
# Copyright 2012 VMware, 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 ...
Glasgow2015/team-10
refs/heads/master
env/lib/python2.7/site-packages/cms/test_utils/project/placeholderapp/cms_app.py
55
from cms.apphook_pool import apphook_pool from cms.app_base import CMSApp from django.utils.translation import ugettext_lazy as _ class Example1App(CMSApp): name = _("Example1 App") urls = ["cms.test_utils.project.placeholderapp.urls"] apphook_pool.register(Example1App) class MultilingualExample1App(CMSApp...
akosyakov/intellij-community
refs/heads/master
python/lib/Lib/encodings/mac_roman.py
593
""" Python Character Mapping Codec mac_roman generated from 'MAPPINGS/VENDORS/APPLE/ROMAN.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,err...
BrooksbridgeCapitalLLP/returnsseries
refs/heads/master
returnsseries/plot.py
2
"""Plotting funcs for ReturnsSeries class""" import numpy as np import pandas as pd import matplotlib.pyplot as plt import returnsseries.utils as ru import returnsseries.displayfunctions as rd def plot_perf(returns_list, log2, shade_dates=None, shade_color='lightblue', yticks_round=1, legend_loc='lower...
MachineLearningControl/OpenMLC-Python
refs/heads/master
MLC/arduino/connection/__init__.py
1
from base import BaseConnection from serialconnection import SerialConnection from mockconnection import MockConnection __all__ = ["BaseConnection", "SerialConnection", "MockConnection" ]
jobsafran/mediadrop
refs/heads/master
batch-scripts/find_todos.py
11
#!/usr/bin/env python keywords = [ 'TODO', 'TOFIX', 'FIXME', 'HACK', 'XXX', 'WARN', ] import os grep_cmd = """grep -ERn "%s" """ % ("|".join(keywords)) files_and_dirs = [ 'batch-scripts', 'deployment-scripts', 'mediadrop', 'plugins', 'setup*', ] exclude_files_and_dirs = [ ...
syndbg/ubuntu-make
refs/heads/master
tests/data/duplicatedframeworks/samecategory.py
13
# -*- coding: utf-8 -*- # Copyright (C) 2014 Canonical # # Authors: # Didier Roche # # 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; version 3. # # This program is distributed in the hope that ...
alxgu/ansible
refs/heads/devel
lib/ansible/modules/network/ovs/openvswitch_bridge.py
75
#!/usr/bin/python # coding: utf-8 -*- # (c) 2013, David Stygstra <david.stygstra@gmail.com> # Portions copyright @ 2015 VMware, 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 ANSI...
RedHatInsights/insights-core
refs/heads/master
insights/parsers/tests/test_podman_inspect.py
1
import pytest import doctest from insights.parsers import podman_inspect, SkipException from insights.tests import context_wrap PODMAN_CONTAINER_INSPECT = """ [ { "ID": "66db151828e9beede0cdd9c17fc9bd5ebb5d125dd036f7230bc6b6433e5c0dda", "Created": "2019-08-21T10:38:34.753548542Z", "Path": ...
mapr/hue
refs/heads/hue-3.9.0-mapr
desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/table.py
56
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
aalopes/codeSnippets
refs/heads/master
tcp_ip/python/server/server.py
1
#!/usr/bin/python """ TCP/IP server Alexandre Lopes 15.12.2015 """ import select import socket import time import signal import sys import locale from difflib import Differ # functions ------------------------------------------------------------------- def sigintHandler(signal, frame): """ SIGINT Handle...
raccoongang/edx-platform
refs/heads/ginkgo-rg
lms/djangoapps/django_comment_client/tests/mock_cs_server/test_mock_cs_server.py
10
import json import threading import unittest import urllib2 from nose.plugins.skip import SkipTest from django_comment_client.tests.mock_cs_server.mock_cs_server import MockCommentServiceServer class MockCommentServiceServerTest(unittest.TestCase): ''' A mock version of the Comment Service server that liste...
h0nIg/ansible-modules-extras
refs/heads/devel
packaging/language/pear.py
157
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Afterburn <http://github.com/afterburn> # (c) 2013, Aaron Bull Schaefer <aaron@elasticdog.com> # (c) 2015, Jonathan Lestrelin <jonathan.lestrelin@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # i...
ralphbean/ansible
refs/heads/devel
v2/ansible/plugins/lookup/indexed_items.py
127
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
mcgachey/edx-platform
refs/heads/master
cms/djangoapps/contentstore/management/commands/delete_course.py
42
""" Command for deleting courses Arguments: arg1 (str): Course key of the course to delete arg2 (str): 'commit' Returns: none """ from django.core.management.base import BaseCommand, CommandError from .prompt import query_yes_no from contentstore.utils import delete_course_and_grou...
LiveZenLK/CeygateERP
refs/heads/master
addons/product_expiry/product_expiry.py
17
# Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import openerp from openerp import api, models from openerp.osv import fields, osv class stock_production_lot(osv.osv): _inherit = 'stock.production.lot' def _get_date(dtype): """Return a function to compute t...
crcresearch/osf.io
refs/heads/develop
api/base/middleware.py
11
import gc import StringIO import cProfile import pstats import threading from django.conf import settings from raven.contrib.django.raven_compat.models import sentry_exception_handler import corsheaders.middleware from framework.postcommit_tasks.handlers import ( postcommit_after_request, postcommit_before_re...
cloudstax/firecamp
refs/heads/master
vendor/lambda-python-requests/chardet/mbcharsetprober.py
289
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
guewen/odoo
refs/heads/master
addons/payment_paypal/controllers/__init__.py
4497
# -*- coding: utf-8 -*- import main
torwag/micropython
refs/heads/master
tests/bench/func_args-2-pos_default_2_of_3.py
102
import bench def func(a, b=1, c=2): pass def test(num): for i in iter(range(num)): func(i) bench.run(test)
mzdaniel/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/conch/scripts/conch.py
17
# -*- test-case-name: twisted.conch.test.test_conch -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # # $Id: conch.py,v 1.65 2004/03/11 00:29:14 z3p Exp $ #""" Implementation module for the `conch` command. #""" from twisted.conch.client import connect, default, options from twisted.conc...
kubernetes-client/python
refs/heads/master
kubernetes/client/models/v1_object_meta.py
1
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
JerryXia/fastgoagent
refs/heads/master
goagent/server/uploader/appcfg.py
1
#!/usr/bin/env python # coding:utf-8 __version__ = '1.2' __author__ = "phus.lu@gmail.com" import sys import os sys.dont_write_bytecode = True sys.path += ['.', __file__, '../local'] import re import collections import getpass import logging import socket import urllib2 import fancy_urllib import random import threa...
Salat-Cx65/python-for-android
refs/heads/master
python-modules/twisted/twisted/test/process_linger.py
140
"""Write to a file descriptor and then close it, waiting a few seconds before quitting. This serves to make sure SIGCHLD is actually being noticed. """ import os, sys, time print "here is some text" time.sleep(1) print "goodbye" os.close(1) os.close(2) time.sleep(2) sys.exit(0)
alkyl1978/gnuradio
refs/heads/master
gr-fec/python/fec/extended_decoder.py
47
#!/usr/bin/env python # # Copyright 2014 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) # ...
fengbaicanhe/intellij-community
refs/heads/master
python/testData/refactoring/move/starImportUsage/after/src/a.py
45382
npiganeau/odoo
refs/heads/master
addons/account_test/__init__.py
441
import account_test import report
ahamilton55/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_ssl_certificate.py
30
#!/usr/bin/python # # (c) 2016, Kevin Coming (@waffie1) # # 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 l...
evamwangi/bc-7-Todo_List
refs/heads/master
venv/Lib/encodings/koi8_r.py
593
""" Python Character Mapping Codec koi8_r generated from 'MAPPINGS/VENDORS/MISC/KOI8-R.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
puneetugru/Experiment
refs/heads/master
drf/api/migrations/0005_auto_20170912_1126.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-09-12 11:26 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0004_auto_20170912_1120'), ] operations = [ migrations.AlterField( ...
sestrella/ansible
refs/heads/devel
contrib/inventory/cloudstack.py
13
#!/usr/bin/env python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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...
sumeetsk/NEXT-1
refs/heads/master
apps/PoolBasedBinaryClassification/dashboard/Dashboard.py
1
import json import numpy import numpy.random from datetime import datetime from datetime import timedelta import next.utils as utils from next.apps.AppDashboard import AppDashboard # import next.database_client.DatabaseAPIHTTP as db # import next.logging_client.LoggerHTTP as ell class MyAppDashboard(AppDashboard): ...
kowall116/roadTrip
refs/heads/master
node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py
1788
#!/usr/bin/env python import re import json # https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
mycodeday/crm-platform
refs/heads/master
bus/__openerp__.py
299
{ 'name' : 'IM Bus', 'version': '1.0', 'author': 'OpenERP SA', 'category': 'Hidden', 'complexity': 'easy', 'description': "Instant Messaging Bus allow you to send messages to users, in live.", 'depends': ['base', 'web'], 'data': [ 'views/bus.xml', 'security/ir.model.acces...
Lyhan/GCWiiManager
refs/heads/master
GWcli.py
1
# Library for CLI functions import os import sys # Validate user input [y/n] def validateYN(message): a='' while True: a = input(message + "[y/n]: ").lower() if a == "y" or a == "yes": return 1 elif a == "n" or a == "no": return 0 elif a == "e" or a == "e...
thonkify/thonkify
refs/heads/master
src/lib/pycountry/tests/test_general.py
1
import gettext import re import pycountry import pycountry.db import pytest @pytest.fixture(autouse=True, scope='session') def logging(): import logging logging.basicConfig(level=logging.DEBUG) def test_country_list(): assert len(pycountry.countries) == 249 assert isinstance(list(pycountry.countries...
rjschof/gem5
refs/heads/master
src/cpu/minor/MinorCPU.py
12
# Copyright (c) 2012-2014 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
RabbitMC/Autofind
refs/heads/master
mean/node_modules/node-gyp/gyp/gyptest.py
1752
#!/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. __doc__ = """ gyptest.py -- test runner for GYP tests. """ import os import optparse import subprocess import sys class CommandRunner(obje...
encukou/freeipa
refs/heads/master
ipatests/test_ipaserver/test_kadmin.py
3
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # """ Test suite for creating principals via kadmin.local and modifying their keys """ import os import pytest import tempfile from ipalib import api from ipaserver.install import installutils @pytest.fixture def keytab(): fd, keytab_path = t...
jonparrott/google-cloud-python
refs/heads/master
redis/noxfile.py
2
# Copyright 2018 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, ...
dlozeve/reveal_CommunityDetection
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py
1869
# Copyright 2014 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. """A clone of the default copy.deepcopy that doesn't handle cyclic structures or complex types except for dicts and lists. This is because gyp copies so large structur...
NullSoldier/django
refs/heads/master
django/contrib/gis/db/backends/oracle/features.py
235
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.db.backends.oracle.features import \ DatabaseFeatures as OracleDatabaseFeatures class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures): supports_add_srs_entry = False supports_geometry_field_introspection...
monash-merc/cvl-fabric-launcher
refs/heads/master
pyinstaller-2.1/tests/basic/data7.py
7
#----------------------------------------------------------------------------- # Copyright (c) 2013, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this softwa...
bsmr-eve/Pyfa
refs/heads/master
eos/effects/freightersmacapacitybonuso1.py
2
# freighterSMACapacityBonusO1 # # Used by: # Ship: Bowhead type = "passive" def handler(fit, ship, context): # todo: stacking? fit.ship.boostItemAttr("agility", ship.getModifiedItemAttr("freighterBonusO2"), skill="ORE Freighter", stackingPenalties=True)
eugenewong/AirShare
refs/heads/master
boilerplate/external/babel/messages/pofile.py
67
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software cons...
MycChiu/tensorflow
refs/heads/master
tensorflow/contrib/factorization/python/kernel_tests/clustering_ops_test.py
73
# 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 applic...
ducthien1490/youtube-dl
refs/heads/master
docs/conf.py
137
# -*- coding: utf-8 -*- # # youtube-dl documentation build configuration file, created by # sphinx-quickstart on Fri Mar 14 21:05:43 2014. # # 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. # ...
firebitsbr/pwn_plug_sources
refs/heads/master
src/goodfet/GoodFETARM.py
8
#!/usr/bin/env python # GoodFET Client Library # # # Good luck with alpha / beta code. # Contributions and bug reports welcome. # import sys, binascii, struct import atlasutils.smartprint as asp #Global Commands READ = 0x00 WRITE = 0x01 PEEK = 0x02 POKE = 0x03 SETUP = 0x10 START = 0x20 STOP = 0x21 CALL = 0x30 E...