repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
bastings/neuralmonkey
refs/heads/master
neuralmonkey/dataset.py
1
""" Implementation of the dataset class. """ import os import random import re import collections from typing import cast, Any, List, Callable, Iterable, Dict, Tuple, Union import numpy as np from typeguard import check_argument_types from neuralmonkey.logging import log from neuralmonkey.readers.plain_text_reader ...
willprice/arduino-sphere-project
refs/heads/master
scripts/example_direction_finder/temboo/Library/RightScale/LaunchArrayInstance.py
1
# -*- coding: utf-8 -*- ############################################################################### # # LaunchArrayInstance # Start an array instance. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file ex...
ruriwo/ErgoThumb072_firmware
refs/heads/master
tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/tcpecho_server_auto.py
101
""" mbed SDK Copyright (c) 2011-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
aethaniel/micropython
refs/heads/master
examples/unix/http-server.py
53
try: import usocket as socket except: import socket CONTENT = """\ HTTP/1.0 200 OK Hello #{} from MicroPython! """ s = socket.socket() ai = socket.getaddrinfo("127.0.0.1", 8080) print("Bind address info:", ai) addr = ai[0][4] s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(addr) s.listen(5)...
rabi/kubernetes
refs/heads/master
examples/celery-rabbitmq/celery-app-add/run_tasks.py
31
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 appli...
jdubs/cloud-custodian
refs/heads/master
tools/dev/citoxenv.py
7
#!/usr/bin/env python import os pyver = os.environ.get('TRAVIS_PYTHON_VERSION', '') if pyver == '2.7': print('py27-cov,docs,lint') elif pyver == '3.6': print('py36')
xianggong/m2c_unit_test
refs/heads/master
test/operator/relational_less_than_uchar4uchar4/compile.py
1861
#!/usr/bin/python import os import subprocess import re def runCommand(command): p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) p.wait() return iter(p.stdout.readline, b'') def dumpRunCommand(command,...
KDr2/linux
refs/heads/master
tools/perf/scripts/python/event_analyzing_sample.py
4719
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
saurabh6790/test_final_med_lib
refs/heads/master
webnotes/widgets/form/load.py
34
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes, json import webnotes.model.doc import webnotes.utils @webnotes.whitelist() def getdoc(doctype, name, user=None): """ Loads a doclist for a given document. ...
evernym/zeno
refs/heads/master
runner.py
2
import os import re import sys import argparse import time def get_first_level_path(path): dir_name = os.path.dirname(path) parts = dir_name.split('/') if len(parts) == 2: # <package-name>/test return path # first level *.py return "/".join(parts[:3]) # <package-name>/test/<dir> def run(...
opencloudinfra/orchestrator
refs/heads/master
venv/Lib/site-packages/django/core/files/utils.py
395
from django.utils import six class FileProxyMixin(object): """ A mixin class used to forward file methods to an underlaying file object. The internal file object has to be called "file":: class FileProxy(FileProxyMixin): def __init__(self, file): self.file = file ...
davidwaroquiers/pymatgen
refs/heads/master
pymatgen/analysis/chemenv/coordination_environments/tests/test_read_write.py
5
#!/usr/bin/env python __author__ = "waroquiers" import json import os import shutil import unittest import numpy as np from pymatgen.analysis.chemenv.coordination_environments.chemenv_strategies import ( AngleNbSetWeight, CNBiasNbSetWeight, DeltaCSMNbSetWeight, DistanceAngleAreaNbSetWeight, Mul...
Yarrick13/hwasp
refs/heads/master
tests/asp/AllAnswerSets/tight/7-queens.asp.test.py
4
input = """ 1 2 0 0 1 3 0 0 1 4 0 0 1 5 0 0 1 6 0 0 1 7 0 0 1 8 0 0 1 9 0 0 1 10 7 6 11 12 13 14 15 16 17 1 11 7 6 10 12 13 14 15 16 17 1 12 7 6 10 11 13 14 15 16 17 1 13 7 6 10 11 12 14 15 16 17 1 14 7 6 10 11 12 13 15 16 17 1 15 7 6 10 11 12 13 14 16 17 1 16 7 6 10 11 12 13 14 15 17 1 17 0 0 1 18 7 6 19 20 21 22 23 2...
j-mracek/dnf
refs/heads/master
tests/test_rpmconnection.py
5
# -*- coding: utf-8 -*- # Copyright (C) 2012-2018 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed ...
joealcorn/berth.cc
refs/heads/master
berth/settings/travis.py
1
from berth.settings.test import * DATABASES['default']['USER'] = 'postgres'
madprogrammer/linux-e8-rt
refs/heads/master
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
Kappa-Dev/KaSim
refs/heads/master
python/tests/test_std.py
1
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import inspect import kappy from util import _KappaClientTest, run_nose class StdClientTest(_KappaClientTest): """ Integration test for kappa client""" def getRuntime(self): return kappy.KappaSt...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/langlatch_hue.py
85615
import sys def setup(core, object): return
ryfeus/lambda-packs
refs/heads/master
Lxml_requests/source/google/protobuf/internal/reflection_test.py
11
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that t...
davidecaminati/Handcart-lift-rotary
refs/heads/master
Python/facedetect_mio.py
1
#!/usr/bin/env python import numpy as np import cv2 import cv2.cv as cv from multiprocessing.pool import ThreadPool from video import create_capture from common import clock, draw_str from pyfirmata import Arduino, util ArduinoPresent = False if ArduinoPresent : board = Arduino('/dev/ttyACM0') #board.digital[2...
raymond91125/tissue_enrichment_tool_hypergeometric_test
refs/heads/master
tea_paper_docs/src/clean_dictionary_maker.py
4
# -*- coding: utf-8 -*- """ Created on Wed Mar 2 14:24:04 2016 A script to generate 'clean' dictionaries that exclude golden standards. This script @author: dangeles """ import dictionary_generator as dg from dictionary_generator import ontology import sys x_array= [100, 50, 33, 25] thresh_array= [1, .95, .9] met...
amaozhao/blogular
refs/heads/master
pygments/lexers/_asy_builtins.py
48
# -*- coding: utf-8 -*- """ pygments.lexers._asy_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the asy-function names and asy-variable names of Asymptote. Do not edit the ASYFUNCNAME and ASYVARNAME sets by hand. TODO: perl/python script in Asymptote SVN similar to asy-list.pl but o...
ltiao/networkx
refs/heads/master
networkx/algorithms/bipartite/tests/test_centrality.py
96
from nose.tools import * import networkx as nx from networkx.algorithms import bipartite class TestBipartiteCentrality(object): def setUp(self): self.P4 = nx.path_graph(4) self.K3 = nx.complete_bipartite_graph(3,3) self.C4 = nx.cycle_graph(4) self.davis = nx.davis_southern_women_gr...
ariakerstein/twitterFlaskClone
refs/heads/master
project/lib/python2.7/site-packages/werkzeug/debug/console.py
256
# -*- coding: utf-8 -*- """ werkzeug.debug.console ~~~~~~~~~~~~~~~~~~~~~~ Interactive console support. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD. """ import sys import code from types import CodeType from werkzeug.utils import escape from werkzeug.loca...
jjshoe/ansible-modules-core
refs/heads/devel
database/mysql/mysql_user.py
5
#!/usr/bin/python # (c) 2012, Mark Theunissen <mark.theunissen@gmail.com> # Sponsored by Four Kitchens http://fourkitchens.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...
2015fallproject/2015fallcase2
refs/heads/master
static/Brython3.2.0-20150701-214155/Lib/test/unittests/pydocfodder.py
203
"""Something just to look at via pydoc.""" import types class A_classic: "A classic class." def A_method(self): "Method defined in A." def AB_method(self): "Method defined in A and B." def AC_method(self): "Method defined in A and C." def AD_method(self): "Method de...
Jigsaw-Code/net-analysis
refs/heads/master
netanalysis/tls/domain_ip_validator.py
1
# Copyright 2018 Jigsaw Operations 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 agreed to i...
bakhtout/odoo-educ
refs/heads/8.0
addons/hw_escpos/escpos/escpos.py
65
# -*- coding: utf-8 -*- import time import copy import io import base64 import math import md5 import re import traceback import xml.etree.ElementTree as ET import xml.dom.minidom as minidom from PIL import Image try: import jcconv except ImportError: jcconv = None try: import qrcode except ImportError...
TOCyna/tabelinha
refs/heads/master
flask/lib/python2.7/site-packages/sqlalchemy/__init__.py
21
# sqlalchemy/__init__.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .sql import ( alias, and_, asc, between, bindparam,...
ODInfoBiz/pyyacp
refs/heads/master
pyyacp/datatable.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import itertools from StringIO import StringIO import pandas as pd import unicodecsv from pyyacp.table_structure_helper import guess_description_lines, _detect_header_lines, _most_common_oneli...
iseppi/zookeepr
refs/heads/master
zk/__init__.py
8
from pyramid.config import Configurator from sqlalchemy import engine_from_config from controllers.legacy_view import LegacyView def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ engine = engine_from_config(settings, 'sqlalchemy.') config = Configurator(set...
ben174/pydvorak
refs/heads/master
window.py
1
import curses import datetime from string import ascii_uppercase class Window: """ Contains all the view information for this application. """ def __init__(self, screen, mapper=None): self.screen = screen self.mapper = mapper self.init_window() self.error_win = curses.neww...
google/grr
refs/heads/master
grr/core/scripts/make_new_server_key.py
1
#!/usr/bin/env python """A console script to create new server keys. Use this script to make a new server key and certificate. You can just run the script inside a console using `run -i make_new_server_key.py`. """ from grr import config from grr.lib.rdfvalues import crypto as rdf_crypto from grr.server import key_ut...
csala/zato
refs/heads/master
code/zato-cy/test/zato/__init__.py
35
# -*- coding: utf-8 -*- """ Copyright (C) 2015 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """
ragnarok22/socialProject
refs/heads/master
account/models.py
1
from django.contrib.auth.models import User from django.db import models from django.utils import timezone class UserProfile(models.Model): about_me = models.TextField() sign = models.CharField(max_length=100) user = models.OneToOneField(User, related_name='profile') born_date = models.DateField() ...
Peddle/hue
refs/heads/master
desktop/core/ext-py/pysaml2-2.4.0/src/saml2/authn_context/sslcert.py
37
#!/usr/bin/env python # # Generated Sun Apr 21 10:44:16 2013 by parse_xsd.py version 0.5. # """ This class indicates that the principal authenticated by means of a client certificate, secured with the SSL/TLS transport. """ import saml2 from saml2 import SamlBase NAMESPACE = 'urn:oasis:names:tc:SAML:2.0:ac:classes...
FluidityProject/multifluids
refs/heads/master
tests/channel-flow-p0p1/channel.py
2
import os from fluidity_tools import stat_parser from sympy import * meshtemplate=''' Point(1) = {0, 0, 0, <dx>}; Extrude {0, 1, 0} { Point{1};Layers{<layers>}; } Point(3) = {1, 0, 0, <dx>}; Extrude {0, 1, 0} { Point{3};Layers{<layers>}; } Line(3)={1,3}; Line(4)={2,4}; Line Loop(5) = {4, -2, -3, 1}; Plane Surface(...
gangadhar-kadam/powapp
refs/heads/master
selling/doctype/opportunity_item/__init__.py
37694
from __future__ import unicode_literals
vierja/hadoop-per-mare
refs/heads/master
src/contrib/hod/hodlib/Common/tcp.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...
IONISx/edx-platform
refs/heads/master
cms/envs/test_static_optimized.py
10
""" Settings used when generating static assets for use in tests. For example, Bok Choy uses two different settings files: 1. test_static_optimized is used when invoking collectstatic 2. bok_choy is used when running CMS and LMS Note: it isn't possible to have a single settings file, because Django doesn't support bo...
patilsangram/erpnext
refs/heads/develop
erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py
121
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class SalesInvoiceAdvance(Document): pass
alexykot/bitfund
refs/heads/master
bitfund/pledger/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Profile' db.create_table('pledger_profile', ( ('user', self.gf('django.db.models...
wastholm/bitcoin
refs/heads/master
share/qt/extract_strings_qt.py
321
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator import os import sys OUT_CPP="qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' for...
Razzeee/script.module.trakt
refs/heads/main
lib/trakt/mapper/sync.py
2
from __future__ import absolute_import, division, print_function from trakt.mapper.core.base import Mapper import logging log = logging.getLogger(__name__) class SyncMapper(Mapper): @classmethod def process(cls, client, store, items, media=None, flat=False, **kwargs): if flat: return cl...
huijunwu/heron
refs/heads/master
heronpy/api/serializer.py
5
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache...
partofthething/home-assistant
refs/heads/dev
homeassistant/components/swiss_hydrological_data/sensor.py
16
"""Support for hydrological data from the Fed. Office for the Environment.""" from datetime import timedelta import logging from swisshydrodata import SwissHydroData import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, CONF_MONITORED_CO...
jralls/gramps
refs/heads/master
gramps/gen/config.py
2
# -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2005-2007 Donald N. Allingham # Copyright (C) 2008-2009 Gary Burton # Copyright (C) 2009-2012 Doug Blank <doug.blank@gmail.com> # Copyright (C) 2011 Tim G L Lyons # # This program is free software; you can redistribute ...
shaistaansari/django
refs/heads/master
tests/auth_tests/models/with_foreign_key.py
98
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, Group from django.db import models class Email(models.Model): email = models.EmailField(verbose_name='email address', max_length=255, unique=True) class Meta: app_label = 'auth' class CustomUserWithFKManager(BaseUserManager):...
bh107/benchpress
refs/heads/master
benchpress/suites/perf_check.py
1
import benchpress as bp from benchpress.suite_util import BP_ROOT """ Use this benchmark for testing performance of Bohrium""" scripts = [ ('shallow_water', "2000*2000*100"), ('heat_equation', "2000*2000*100"), ('convolve1d', "1000000*100*100"), ('galton_bean_machine', "5000000*100"), ('montecarlo...
pongem/python-bot-project
refs/heads/master
appengine/standard/botapp/env/lib/python2.7/site-packages/django/db/models/sql/datastructures.py
270
""" Useful auxiliary data structures for query construction. Not useful outside the SQL domain. """ from django.db.models.sql.constants import INNER, LOUTER class EmptyResultSet(Exception): pass class MultiJoin(Exception): """ Used by join construction code to indicate the point at which a multi-val...
laszlocsomor/tensorflow
refs/heads/master
tensorflow/python/saved_model/loader.py
127
# 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...
jakeclawson/linux
refs/heads/master
tools/perf/scripts/python/event_analyzing_sample.py
4719
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
zctea/biocode
refs/heads/master
gff/remove_orphaned_features.py
2
#!/usr/bin/env python3 """ This housekeeping script reads a GFF3 file and writes a new one, excluding any features which aren't related to another feature. The initial use-case here was a GFF file with gene features that had no mRNA children. Warning: Because feature parentage can be anywhere in the file, it can be ...
tomkat83/PlexKodiConnect
refs/heads/master
resources/lib/watchdog/utils/compat.py
2
# -*- coding: utf-8 -*- # # Copyright 2014 Thomas Amland <thomas.amland@gmail.com> # # 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 # # Unles...
qizenguf/MLC-STT
refs/heads/master
tests/configs/realview64-simple-atomic-dual.py
43
# Copyright (c) 2012 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 functionality ...
yfdyh000/olympia
refs/heads/master
migrations/366-tier-0.py
46
from decimal import Decimal from market.models import Price, PriceCurrency def run(): tier = Price.objects.create(name='Tier 0', price=Decimal('0'), active=True) for currency in ['CAD', 'EUR', 'GBP', 'JPY']: PriceCurrency.objects.create(tier=tier, price=Decimal('0'), ...
skwash/pgshapely
refs/heads/master
pgshapely/tests/__init__.py
1
from unittest import TestSuite import test_points, test_polys def test_suite(): suite = TestSuite() suite.addTest(test_points.test_suite()) suite.addTest(test_polys.test_suite()) return suite if __name__ == '__main__': from unittest import TestResult res = TestResult() ...
Asyraf-wa/package2
refs/heads/master
app/Plugin/Upload/docs/conf.py
4
# -*- coding: utf-8 -*- # # CakePHP-Upload documentation build configuration file, created by # sphinx-quickstart on Tue Aug 26 08:59:51 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...
leiferikb/bitpop
refs/heads/master
build/third_party/buildbot_8_4p1/buildbot/schedulers/dependent.py
4
# This file is part of Buildbot. Buildbot 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 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
adamcik/mopidy
refs/heads/develop
mopidy/models/fields.py
4
import sys class Field: """ Base field for use in :class:`~mopidy.models.immutable.ValidatedImmutableObject`. These fields are responsible for type checking and other data sanitation in our models. For simplicity fields use the Python descriptor protocol to store the values in the instance d...
gitaarik/django
refs/heads/master
tests/file_uploads/uploadhandler.py
449
""" Upload handlers to test the upload API. """ from django.core.files.uploadhandler import FileUploadHandler, StopUpload class QuotaUploadHandler(FileUploadHandler): """ This test upload handler terminates the connection if more than a quota (5MB) is uploaded. """ QUOTA = 5 * 2 ** 20 # 5 MB ...
campovski/beernburger
refs/heads/master
beer/migrations/0002_beer_beer_type.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-27 10:58 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('beer', '0001_initial'), ] operations = [ migrations.AddField( mod...
pdellaert/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/netapp_e_ldap.py
21
#!/usr/bin/python # (c) 2018, NetApp, 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', 'status': ['preview'], ...
acuzzio/GridQuantumPropagator
refs/heads/master
src/quantumpropagator/GeneralFunctions.py
1
''' This is the module for general purposes functions ''' import multiprocessing as mp import numpy as np import pandas as pd import yaml import sys import math import pickle import glob from .h5Reader import retrieve_hdf5_data #Debug time #import pdb #pdb.set_trace() #to debug h=help def check_time_stamps_in_wf_fo...
bealdav/OCB
refs/heads/patch-1
addons/hr_contract/base_action_rule.py
389
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013 OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
kristyj/ematoblender
refs/heads/master
ematoblender/scripts/ema_io/ema_gameserver/gameserver_gui.py
3
__author__ = 'Kristy James' __credits__ = "Alexander Hewer" import os import tkinter as tk import time from tkinter import ttk from tkinter import filedialog as fd from .gameserver import GameServer, MyUDPHandler from .GameServerSettings import GameServerSettings from .SettingsReader import SettingsReader from .Setti...
bsmr-misc-forks/letsencrypt
refs/heads/master
certbot-compatibility-test/certbot_compatibility_test/configurators/nginx/common.py
8
"""Provides a common base for Nginx proxies""" import os import shutil import subprocess import zope.interface from certbot import configuration from certbot_nginx import configurator from certbot_nginx import constants from certbot_compatibility_test import errors from certbot_compatibility_test import interfaces fr...
darckbit/ssl-health
refs/heads/master
src/lib/osx64/plugins/__init__.py
3
#!/usr/bin/env python #------------------------------------------------------------------------------- # Name: __init__.py # Purpose: PluginsFinder class for the SSLyze plugins package. # # Author: alban, aaron # # Copyright: 2012 SSLyze developers # # SSLyze is free software: you can redistribu...
mikeshardmind/SinbadCogs
refs/heads/v3
roomtools/tempchannels.py
1
import asyncio from datetime import datetime, timedelta from typing import Any, Dict import discord from redbot.core import checks, commands from redbot.core.utils.antispam import AntiSpam from .abcs import MixedMeta from .checks import tmpc_active from .converters import TempChannelConverter as ChannelData class T...
ToonTownInfiniteRepo/ToontownInfinite
refs/heads/master
Panda3D-1.9.0/python/Lib/doctest.py
43
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! r"""Module doctest -- a framework for running examples in docstrings. In...
certik/sympy-oldcore
refs/heads/master
sympy/functions/combinatorial/__init__.py
5
import factorials import numbers
pathway27/servo
refs/heads/master
tests/wpt/web-platform-tests/referrer-policy/generic/subresource/worker.py
227
import os, sys, json sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) import subresource def generate_payload(server_data): return subresource.get_template("worker.js.template") % server_data def main(request, response): subresource.respond(request, response, ...
ItachiSan/android_kernel_msm_caf
refs/heads/jb_2.5.5
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
anilmuthineni/tensorflow
refs/heads/master
tensorflow/python/tools/print_selective_registration_header.py
11
# 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...
40223226/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/locals.py
603
## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License...
coderbone/SickRage-alt
refs/heads/master
lib/tornado/concurrent.py
19
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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...
heytcass/homeassistant-config
refs/heads/master
deps/sqlalchemy/dialects/oracle/cx_oracle.py
14
# oracle/cx_oracle.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: oracle+cx_oracle :name: cx-Oracle :dbapi: cx_oracle ...
christer155/Django-facebook
refs/heads/master
docs/docs_env/Lib/sre.py
555
"""This file is only retained for backwards compatibility. It will be removed in the future. sre was moved to re in version 2.5. """ import warnings warnings.warn("The sre module is deprecated, please import re.", DeprecationWarning, 2) from re import * from re import __all__ # old pickles expect the ...
CrankWheel/grit-i18n
refs/heads/master
grit/tool/buildinfo.py
62
#!/usr/bin/env python # 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. """Output the list of files to be generated by GRIT from an input. """ import getopt import os from grit import grd_reader from g...
mojeto/django
refs/heads/master
django/forms/utils.py
4
import json from collections import UserList from django.conf import settings from django.core.exceptions import ValidationError # backwards compatibility from django.utils import timezone from django.utils.encoding import force_text from django.utils.html import escape, format_html, format_html_join, html_safe from ...
seecr/weightless-core
refs/heads/master
weightless/io/_reactor.py
1
# -*- coding: utf-8 -*- ## begin license ## # # "Weightless" is a High Performance Asynchronous Networking Library. See http://weightless.io # # Copyright (C) 2006-2011 Seek You Too (CQ2) http://www.cq2.nl # Copyright (C) 2011-2016, 2020-2021 Seecr (Seek You Too B.V.) https://seecr.nl # # This file is part of "Weightle...
fimad/mitmproxy
refs/heads/master
pathod/language/http2.py
5
import pyparsing as pp from netlib import http from netlib.http import user_agents, Headers from . import base, message """ Normal HTTP requests: <method>:<path>:<header>:<body> e.g.: GET:/ GET:/:h"foo"="bar" POST:/:h"foo"="bar":b'content body payload' Normal HTTP response...
vipul-sharma20/oh-mainline
refs/heads/master
vendor/packages/south/south/tests/otherfakeapp/migrations/0001_first.py
176
from south.db import db from django.db import models class Migration: depends_on = ( ("fakeapp", "0001_spam"), ) def forwards(self): pass def backwards(self): pass
orgito/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_application_list.py
7
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
40023255/2015cd_0505
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_abcoll.py
688
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for collections, according to PEP 3119. DON'T USE THIS MODULE DIRECTLY! The classes here should be imported via collections; they are defined here only to alleviate certain bootstrappin...
etkirsch/gmusic
refs/heads/master
gmusic/model/events/PageChange.py
1
from gmusic.model.Event import Event class PageChange(Event): pass
rizar/attention-lvcsr
refs/heads/master
libs/Theano/theano/sandbox/cuda/tests/test_var.py
7
import unittest import numpy from nose.plugins.skip import SkipTest import theano from theano import tensor from theano.sandbox.cuda.var import float32_shared_constructor as f32sc from theano.sandbox.cuda import CudaNdarrayType, cuda_available import theano.sandbox.cuda as cuda # Skip test if cuda_ndarray is not avai...
seem-sky/linux
refs/heads/master
Documentation/networking/cxacru-cf.py
14668
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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, or (at your option) # any later version. # # This program i...
spaghetti-/rosdep
refs/heads/master
src/rosdep2/platforms/debian.py
1
#!/usr/bin/env python # Copyright (c) 2009, Willow Garage, 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 # n...
danielharbor/openerp
refs/heads/master
addons/hr_timesheet_invoice/wizard/__init__.py
433
# -*- 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...
kynikos/wiki-scripts
refs/heads/master
ws/db/selects/interwiki.py
1
#!/usr/bin/env python3 import sqlalchemy as sa def get_interwikimap(db): conn = db.engine.connect() result = conn.execute(db.interwiki.select()) interwikimap = {} for row in result: iw = { "prefix": row.iw_prefix, "url": row.iw_url, } if row.iw_local: ...
jezdez/kuma
refs/heads/master
vendor/packages/pygments/lexers/c_like.py
72
# -*- coding: utf-8 -*- """ pygments.lexers.c_like ~~~~~~~~~~~~~~~~~~~~~~ Lexers for other C-like languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups, inherit,...
chromium/chromium
refs/heads/master
build/gn_helpers_unittest.py
8
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import mock import sys import textwrap import unittest import gn_helpers class UnitTest(unittest.TestCase): def test_ToGNString(self): test_cases = ...
Dandandan/wikiprogramming
refs/heads/master
jsrepl/build/extern/python/unclosured/lib/python2.7/timeit.py
76
#! /usr/bin/env python """Tool for measuring execution time of small code snippets. This module avoids a number of common traps for measuring execution times. See also Tim Peters' introduction to the Algorithms chapter in the Python Cookbook, published by O'Reilly. Library usage: see the Timer class. Command line ...
Secheron/compassion-switzerland
refs/heads/master
mail_thread_compassion/mail_thread_compassion.py
3
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __openerp__.p...
woylaski/notebook
refs/heads/master
graphic/kivy-master/kivy/animation.py
2
''' Animation ========= :class:`Animation` and :class:`AnimationTransition` are used to animate :class:`~kivy.uix.widget.Widget` properties. You must specify at least a property name and target value. To use an Animation, follow these steps: * Setup an Animation object * Use the Animation object on a Widget ...
xkmato/youtube-dl
refs/heads/master
youtube_dl/extractor/arte.py
77
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( find_xpath_attr, unified_strdate, get_element_by_attribute, int_or_none, qualities, ) # There are different sources of video in arte.tv, the extraction process # is differen...
akatsoulas/remo
refs/heads/master
remo/reports/tests/test_util.py
2
from datetime import timedelta from django.core.urlresolvers import reverse from django.utils.timezone import now import mock from nose.tools import eq_, ok_ from remo.base.templatetags.helpers import urlparams from remo.base.tests import RemoTestCase from remo.base.utils import month2number from remo.profiles.tests...
MTASZTAKI/ApertusVR
refs/heads/0.9
plugins/assetImporter/assimpAssetLoader/3rdParty/assimp/port/PyAssimp/scripts/transformations.py
9
# -*- coding: utf-8 -*- # transformations.py # Copyright (c) 2006, Christoph Gohlke # Copyright (c) 2006-2009, The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
sonidosmutantes/osc-party
refs/heads/master
api-rest-to-connect-devices/Hidrorgano.py
1
# -*- coding: UTF-8 -*- import liblo from Device import Device class HidrorganoMotor(Device): """ Hidrórgano paths /hidrorgano/motor/[NRO_MOTOR]/remote Con NRO_MOTOR en el rango 0..4 Que se manda un int, en 1 para encendido y 0 para apagado. (si no es int, no reconoce el ...