src
stringlengths
721
1.04M
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# $Id: frame.py,v 1.11 2004/09/28 01:19:20 jpwarren Exp $ # $Revision: 1.11 $ # # BEEPy - A Python BEEP Library # Copyright (c) 2002-2004 Justin Warren <daedalus@eigenmagic.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distr...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # # Lic...
from __future__ import unicode_literals import re from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from djblets.db.fields import JSONField from reviewboard.diffviewer.models import DiffSet f...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import now_datetime, cint, cstr import re from six import string_types from frappe.model import log_types def set_new_name(d...
# # Module implementing synchronization primitives # # multiprocessing/synchronize.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistribution...
# -*- coding: utf-8 -*- import unittest from nive.helper import FormatConfTestFailure from nive_cms import app, box, column, file, image, link, media, menublock, news, note, page, root from nive_cms import spacer, text, codeblock class TestConf(unittest.TestCase): def setUp(self): pass def tear...
from xml.dom import minidom import locale import string import wx.lib.colourselect as cSel import wx.lib.filebrowsebutton as filebrowse import wx import tools.config import os class CabelConfigDialog(wx.Dialog): def __init__(self, parent, cfg): """ """ title = 'Preferences' ...
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import skipIf from django.urls import reverse from django.test import Client from django.test.utils import override_settings from myuw.models import VisitedLinkNew from myuw.views.link import outbound_link from myuw.te...
# -*- coding: utf-8 -*- """ Translator module that uses the Google Translate API. Adapted from Terry Yin's google-translate-python. Language detection added by Steven Loria. """ from __future__ import absolute_import import json import re import codecs from textblob.compat import PY2, request, urlencode from textblob....
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This extension makes it easy to edit documentation on github. It adds links associated with each docstring that go to the corresponding view source page on Github. From there, the user can push the "Edit" button, edit the docstring, and submit a pull...
""" Classes for constructing potentials of atoms and molecules. """ from sfepy.base.base import * from sfepy.linalg import norm_l2_along_axis class CompoundPotential(Container): """ Sum of several potentials. """ def __init__(self, objs=None): Container.__init__(self, objs=objs) self....
# 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 writing, software # distributed under t...
"""Repair database command.""" # Copyright (c) 2001-2009 ElevenCraft Inc. # See LICENSE for details. import os from schevo.label import label import schevo.database import schevo.repair from schevo.script.command import Command from schevo.script import opt usage = """\ schevo db repair [options] URL URL: URL of...
# (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP # 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/licens...
from Tools.Profile import profile profile("LOAD:ElementTree") import xml.etree.cElementTree import os profile("LOAD:enigma_skin") from enigma import eSize, ePoint, eRect, gFont, eWindow, eLabel, ePixmap, eWindowStyleManager, addFont, gRGB, eWindowStyleSkinned, getDesktop from Components.config import ConfigSubsection,...
# 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 ...
# imports from solution from main import solution, LOCAL_DICTIONARY from utils import show_path from time import time TEST_CASES = ( # start word, target word, minimal path length ( 'cat', 'dog', 4 ), ( 'cat', 'mistrial', 9 ), ( 'strong', 'weak', 7 ), ( 'hot', ...
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # # Copyright (c) 2016 Cédric Clerget - HPC Center of Franche-Comté University # # This file is part of Janua-SMS # # http://github.com/mesocentrefc/Janua-SMS # # This program is free software: you can redistribute it and/or modify # it under th...
import sqlite3 TWITTER_CONSUMER_KEY = 'twitter_consumer_key' TWITTER_CONSUMER_SECRET = 'twitter_consumer_secret' TWITTER_ACCESS_TOKEN = 'twitter_access_token' TWITTER_ACCESS_TOKEN_SECRET = 'twitter_access_token_secret' LAST_LATITUDE = 'last_latitude' LAST_LONGITUDE = 'last_longitude' UPC_DATABASE_KEY = 'upc_database_k...
# encoding: utf-8 # # Copyright (c) 2014 Dean Jackson <deanishe@deanishe.net> # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2014-02-15 # """The :class:`Workflow` object is the main interface to this library. :class:`Workflow` is targeted at Alfred 2. Use :class:`~workflow.Workflow3` if you wa...
import getpass import os import os.path import mcp.config import mcp.common.util def check(): import mcp.model.user import mcp.model.server import mcp.model.source import mcp.model.script # create prefix directory if necessary try: os.makedirs(mcp.config.prefix) except FileExist...
class ClientQuery(object): """Client query""" def __init__(self, context, binding_type=None, parameter_type=None, parameter_name=None, return_type=None): """ Base query :type context: office365.runtime.client_runtime_context.ClientRuntimeContext :type binding_type: office365.ru...
from unittest import TestCase from lie2me import Field from lie2me.fields import Dict from lie2me.exceptions import BadConfiguration from .common_tests import CommonTests class DictTestCase(TestCase, CommonTests): def setUp(self): self.Field = Dict self.valid_default = {'foo': 'bar'} def ge...
################################################################## # Copyright 2018 Open Source Geospatial Foundation and others # # licensed under MIT, Please consult LICENSE.txt for details # ################################################################## import unittest from collections import namedtuple ...
from django.db import models # Create your models here. class Employee(models.Model): full_name = models.CharField(max_length=100) job_title = models.CharField(max_length=100) contractor = models.BooleanField(default=False) part_time_status = models.BooleanField(default=False) def __unicod...
#!/usr/bin/env python import argparse import os import re import shutil import subprocess import sys import tarfile from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, NODE_VERSION, \ TARGET_PLATFORM, DIST_ARCH from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \ ...
''' Main Module. Copyright (c) 2015 Rob "N3X15" Nelson <nexisentertainment@gmail.com> 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 ...
#!/usr/bin/python # -*- coding: utf8 -*- """ Application to create server for compta """ from compta.server.api.bottle import response, request, abort from json import dumps, loads #from sqlalchemy import desc from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.exc import IntegrityError #from sqlalchemy.sql ...
import numpy as np from matplotlib import pyplot as plt from pandas import Series from mpl_toolkits.mplot3d import axes3d def plotData(X, y): pos = X[np.where(y == 1, True, False).flatten()] neg = X[np.where(y == 0, True, False).flatten()] plt.plot(pos[:, 0], pos[:, 1], 'X', markersize=7, markeredgecolor=...
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2012 Star2Billing S.L. # # The Init...
import os import sys import textwrap import types import re import warnings from numpy.core.numerictypes import issubclass_, issubsctype, issubdtype from numpy.core.overrides import set_module from numpy.core import ndarray, ufunc, asarray import numpy as np __all__ = [ 'issubclass_', 'issubsctype', 'issubdtype',...
import cv2 from board.board_descriptor import BoardDescriptor class Marker(object): def __init__(self, marker_id): """ :param marker_id: Marker ID """ self.marker_id = marker_id def preferred_input_image_resolution(self): """ Returns the preferred input resolu...
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on June 7, 2017 @author: jrm """ from atom.api import Typed, set_default from enamlnative.widgets.card_view import ProxyCardView from .android_fra...
#!/usr/bin/python import sys def print_usage( argv ): print "Creates mif file for ROM for strings.\n Input: raw file with zeros and ones.\n Output: MIF file \nUsage: %s STRING_FILE_NAME MIF_FILE_NAME" % ( sys.argv[0] ) if __name__ == "__main__": if len( sys.argv ) < 3: print_usage( sys.argv ) exit(...
#!/usr/bin/env python #-*- coding: utf-8 -*- #This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software. #The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this online license dif...
# -*- coding: utf-8 -*- """Common function for creating plots with matplotlib.""" __author__ = 'Patrick Michl' __email__ = 'frootlab@gmail.com' __license__ = 'GPLv3' __docformat__ = 'google' import numpy as np from nemoa.types import OptDict class Plot: """Base class for matplotlib plots. Export classes lik...
#!/usr/bin/python -u # -*- coding: UTF-8 -*- # pylint: disable=C0111 import unittest from xml.etree import ElementTree from pyxmpp2.xmppserializer import XMPPSerializer from pyxmpp2.utils import xml_elements_equal class TestXMPPSerializer(unittest.TestCase): def test_emit_head(self): serializer = XMPPSe...
#!/usr/bin/env python import sys import struct import binascii import string import argparse import zlib from curses import ascii # expects tshark on stdin as in: # tshark -r game.pcap -R 'ip.addr==192.168.0.101' -T fields -d udp.port==6112,echo -e ip.src -e udp.srcport -e ip.dst -e udp.dstport -e frame.time_relative...
from __future__ import print_function import numpy as np def demo_gauss_sedel_method(): ITERATION_LIMIT = 1000 # initialize the matrix A = np.array([[10., -1., 2., 0.], [-1., 11., -1., 3.], [2., -1., 10., -1.], [0.0, 3., -1., 8.]]) # initialize the...
"""DFIRE2 potential scoring function Yuedong Yang, Yaoqi Zhou. Ab initio folding of terminal segments with secondary structures reveals the fine difference between two closely related all-atom statistical energy functions. Protein Science,17:1212-1219(2008) """ import os import numpy as np from lightdock.structure.mo...
# Generated by Django 2.2.18 on 2021-02-11 12:07 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('aklub', "0094_auto_20210211_1251") ] operations = [ migrations.CreateModel( n...
from LOTHypothesis import LOTHypothesis, raise_exception, evaluate_expression from LOTlib.Evaluation.EvaluationException import RecursionDepthException, TooBigException, EvaluationException class RecursiveLOTHypothesis(LOTHypothesis): """ A LOTHypothesis that permits recursive calls to itself via the primitiv...
''' Created on May 25, 2012 @author: jjhuang ''' def getAllPrimeNumber(N): ret = [] for n in range(2, N + 1): isPrime = True for i in range(2, n//2 + 1): if(n % i == 0): isPrime = False break if(isPrime): ...
import pytest from pcapng.blocks import InterfaceDescription, ObsoletePacket, SectionHeader from pcapng.scanner import FileScanner def test_sample_test001_ntar(): with open("test_data/test001.ntar", "rb") as fp: scanner = FileScanner(fp) blocks = list(scanner) # There is just a section h...
"""Support for the SpaceAPI.""" import voluptuous as vol from homeassistant.components.http import HomeAssistantView from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_ICON, ATTR_LOCATION, ATTR_NAME, ATTR_STATE, ATTR_UNIT_OF_MEASUREMENT, CONF_ADDRESS, CONF_EMAIL, CONF_ENTITY_ID,...
# coding: utf-8 """Tests unitofwork operations.""" from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import datetime from sqlalchemy.orm import mapper as orm_mapper import sqlalchemy as sa from sqlalchemy.util import u, ue, b from sqlalchemy import Integer, String, ForeignKey, literal_column, e...
import logging import os import arrow from django.conf import settings from django.contrib import messages from django.contrib.auth import login, logout from django.contrib.auth.decorators import login_required from django.shortcuts import redirect, render from django.views.decorators.http import require_http_methods ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """""" from colony.entities.attributes import Age, Health from colony.entities import Entity from colony.item import Item from colony.references import * __title__ = "Resource" __author__ = "DeflatedPickle" __version__ = "1.0.2" class Resource(Entity, Age, Health): ...
import httplib import shlex from datetime import datetime import csv import sys from time import time from multiprocessing import Process,Pipe #finland = timezone('Europe/Helsinki') server_dns = "121.78.237.160" #"keti3.oktree.com" port = 8080 #4242 def read_data(sensor, start_time, end_time, child_pipe): da...
# coding: utf-8 """Tests for ObjectSimilarity.""" from __future__ import (absolute_import, division, print_function, unicode_literals) import mock import pytest from django.contrib.contenttypes import models as ct_models import django_recommend.tasks import quotes.models from django_recommend ...
# Copyright (c) 2015 Catalyst IT Ltd. # # 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 ...
""" Forms mixin for the anti-spam app. """ import time from django import forms from django.utils import baseconv from django.core.signing import Signer, BadSignature from django.utils.translation import ugettext_lazy as _ from .settings import (MIN_TIME_FORM_GENERATION_SUBMIT, MAX_TIME_FORM_G...
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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; eith...
""" Busine-me API Universidade de Brasilia - FGA Tecnicas de Programacao, 2/2015 @file models.py Busline Company and Terminal models. """ from django.db import models from authentication.models import BusinemeUser class Busline(models.Model): """Busline Model.""" line_number = models.CharField(max_length=5,...
# -*- coding: utf-8 -*- #----------------------------------------------------------- # # fTools # Copyright (C) 2008-2011 Carson Farmer # EMAIL: carson.farmer (at) gmail.com # WEB : http://www.ftools.ca/fTools.html # # A collection of data management and analysis tools for vector data # # Geoprocessing functions adap...
# Glumol - An adventure game creator # Copyright (C) 1998-2008 Sylvain Baubeau & Alexis Contour # This file is part of Glumol. # Glumol 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 th...
from django.db.models import Sum from django.utils.timezone import now from le_utils.constants import exercises from rest_framework import serializers from kolibri.core.auth.models import FacilityUser from kolibri.core.logger.constants.exercise_attempts import MAPPING from kolibri.core.logger.models import AttemptLog ...
""" 侦查员:负责分析数据,确定目标帖子 """ from urllib import request, parse import urllib import random import logging from lxml import etree import re from HeadQuarters import * class Scout: userAgent = [ 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11', 'M...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
# # Copyright (C) 2006-2019 Nexedi SA # 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 is distributed ...
from decimal import Decimal from django.utils.translation import ugettext as _ from postix.core.models import ( ListConstraintProduct, Product, WarningConstraintProduct, ) _check_registry = set() def register_check(fn): _check_registry.add(fn) return fn class CheckError(Exception): pass @regist...
# -*- 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...
# # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
import inspect from django.conf import settings from django.db import DEFAULT_DB_ALIAS import django from .compat import cqlengine class CursorWrapper(object): """ Simple CursorWrapper implementation based on django.db.utils.CursorWrapper """ def __init__(self, cursor, db): self.cursor = cu...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
# HoneyPy Copyright (C) 2013-2017 foospidy # https://github.com/foospidy/HoneyPy # See LICENSE for details # HoneyPy twitter module from twitter import Twitter from twitter.oauth import OAuth from twisted.python import log def process(config, section, parts, time_parts): # TCP # parts[0]: date ...
# -*- coding: utf-8-unix; -*- # # Copyright © 2014, Nicolas CANIART <nicolas@caniart.net> # # This file is part of vcs-ssh. # # vcs-ssh is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # vcs-s...
protocol_version = 'HTTP/1.0' STATUS_CODE = { 100: ('Continue', 'Request received, please continue'), 101: ('Switching Protocols', 'Switching to new protocol; obey Upgrade header'), 200: ('OK', 'Request fulfilled, document follows'), 201: ('Created', 'Document created, URL follows'), 202: ('Accepted...
#!/usr/bin/env python3 """ https://adventofcode.com/2016 --- Day 8: Two-Factor Authentication --- You come across a door implementing what you can only assume is an implementation of two-factor authentication after a long game of requirements telephone. To get past the door, you first swipe a keycard (no problem; t...
from django.contrib.auth.models import User from django.db import models from django.dispatch.dispatcher import receiver class Artists(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) artist_image = models.ImageField( verbose_name="Artist's profile image", null=True,...
""" Interface with S3 to store / fetch backups """ import os import time import boto3 import logger from configs import EnjoliverConfig class S3Operator(object): log = logger.get_logger(__file__) def __init__(self, bucket_name): ec = EnjoliverConfig(importer=__file__) aws_id = ec.aws_id ...
""" Trim_Ns_Fasta.py Author: Tim Webster, Arizona State University Date: April 17, 2017 Currently requires Python 2.7 This script takes as input a fasta file and trims Ns from the beginning and end. It also allows for abitrarily sized "buffers" to ignore in this procedure. For example, if you set a buffer to 2 and...
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
import numpy as np import warnings from oceanpy.fluxbudget import budget_over_region_2D from oceanpy.stats import central_differences def _fill0(a): return np.ma.filled(a,0.) def _warn_virtual_salt_flux_units(): warnings.warn('Output units are kg SALT s-1!',) warnings.filterwarnings("once") def fluxbudge...
from django.conf.urls import patterns, url, include from django.conf import settings urlpatterns = patterns('', url(r'^acl/$', 'api.views.acl', name='acl'), url(r'^acl/(?P<username>\w+)/(?P<object_type>\w+)/(?P<perm>\w+)/$', 'api.views.acl', name='acl'), url(r'^acl/(?P<username>\w+)/(?P<object_type>\w+)/(?...
# Copyright 2017 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 agreed to in writing, s...
import numpy as np import citysim3d.envs from visual_dynamics.envs import Panda3dEnv from visual_dynamics.spaces import Space, BoxSpace, TranslationAxisAngleSpace from visual_dynamics.utils.config import ConfigObject class SimpleQuadPanda3dEnv(citysim3d.envs.SimpleQuadPanda3dEnv, Panda3dEnv): def _get_config(sel...
from pydirectory.ldap.objects import types class object(types.object): _type = {} class user(object): _type = { 'objectClass' : [b'top', b'person', b'organizationalPerson', b'user'] } @property def is_enable(self): mod = int(self.useraccountcontrol.value) % 8 if mod == 0: return True else: return F...
############################# # FILE generalization.py # Reads a transaction dataset, a features data set and a GDT trained choice model # Returns the generalized choice model with regard to those features # # Returns a dataset choice_model_gen_####.py on all the products # print("#######################...
from collections import namedtuple from collections import OrderedDict import sys import six from . import annotations from .config import Config from .vis.utils import discrete_colors, RasterStyleOptions, \ rgba2hex, VectorStyleOptions BBox = namedtuple('BBox', ['ulx', 'uly', 'lrx', 'lry']) class Geonoteboo...
# Author: Pedro Correia (http://github.com/pedrocorreia/) # Based on pushalot.py by 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...
# Copyright (C) 2008-2009 Open Society Institute # Thomas Moroz: tmoroz@sorosny.org # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License Version 2 as published # by the Free Software Foundation. You may not use, modify or distribu...
#!/usr/bin/env python """ crate_anon/nlp_manager/parse_biochemistry.py =============================================================================== Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of CRATE. CRATE is free software: you can redistribute it and/or modify ...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'example6.ui' # # Created: Sun Jan 11 17:51:02 2015 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attrib...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
"""Unit tests for host collections. :Requirement: Hostcollection :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: HostCollections :TestType: Functional :CaseImportance: High :Upstream: No """ from random import choice import pytest from nailgun import entities from nailgun.client import request...
from __future__ import print_function from __future__ import unicode_literals import time import re from netmiko.cisco_base_connection import CiscoSSHConnection from netmiko import log class HuaweiSSH(CiscoSSHConnection): def session_preparation(self): """Prepare the session after the connection has been...
import datetime from google.appengine.api import users from google.appengine.ext import db class User(db.Model): name = db.StringProperty('Full Name') account = db.UserProperty() phone_number = db.PhoneNumberProperty('Phone Number') address = db.PostalAddressProperty('Postal Address') website = db....
# -*- coding: utf-8 -*- import pygame import vector import math import copy import types import sound import assets from colors import * # from assets import assets, assets_rot, assets_mask, assets_rot_mask class GameObject(pygame.sprite.Sprite): """ Classi joka perii pygamen Spriten ja lisää y...
""" This class includes all of the functions that used by MeshOperations.py for the creation of the mesh. """ from StandardModules import * import sys from PyQt4.QtGui import * from export_geo import * class PreMesh(DefineDomain): """ Once the user has selected something from the drop-downs and click...
#!/bin/env python3 # # Telegram Auto Kick # # © 2015 Daniel Jankowski import subprocess import os import re import json import sqlite3 import db from threading import Thread,Event DATABASE = '/home/neo/Projekte/Python/telegram-autokick/banned_usernames.db' GROUP_NAME = 'Linux_statt_Windows' class kicker(Thread): ...
## # Copyright (C) 2015 Keith M. Hughes. # # 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 w...
#!/usr/bin/env python #-*- coding:utf-8 -*- import os import itertools from . import lowlevel from .. import bodies from .. import util __all__ = ['Kernel'] class Kernel(object): '''A loaded Kernel. Attributes ---------- *classattribute* LOADED: set of Kernel All loaded kernels. *class...
import weakref import itertools class ModelCache(object): _defaults = { 0, 0.0, True } def __init__(self, model): self.model = model self.replacements = weakref.WeakKeyDictionary() def __hash__(self): if not hasattr(self, '_hash'): self._hash = hash(frozenset(self.mode...
""" For detailed usage instructions, see the readme.txt file included with the pywrds distribution. For the reading-averse, do the following: The first time you run pywrds, put your WRDS username and institution in quotes in the user_info.txt file. Then set up a key-based login with the WRDS server by running: p...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
# -*- coding: utf-8 -*- # # Cilium documentation build configuration file, created by # sphinx-quickstart on Sun Feb 12 18:34:43 2017. # # 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. # # Al...
from __future__ import absolute_import import six from sentry import tagstore from sentry.api.base import DocSection, EnvironmentMixin from sentry.api.bases import GroupEndpoint from sentry.api.serializers import serialize from sentry.api.paginator import DateTimePaginator from sentry.models import Environment, Event...