src
stringlengths
721
1.04M
#!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
#!/usr/bin/env python # -*- encoding: utf-8 from fenrirscreenreader.core import debug class command(): def __init__(self): pass def initialize(self, environment): self.env = environment self.keyMakro = [[1, 'KEY_LEFTCTRL'], [1, 'KEY_G'], ...
from os import getenv from models import db, Users, Polls, Topics, Options, UserPolls from flask import Blueprint, request, jsonify, session from datetime import datetime from config import SQLALCHEMY_DATABASE_URI if getenv('APP_MODE') == 'PRODUCTION': from production_settings import SQLALCHEMY_DATABASE_URI api...
# -*- coding: utf-8 -*- ''' Pkgutil support for Solaris ''' # Import python libs import copy # Import salt libs import salt.utils from salt.exceptions import CommandExecutionError, MinionError def __virtual__(): ''' Set the virtual pkg module if the os is Solaris ''' if 'os' in __grains__ and __grai...
"""Associate MITS docs and pictures with games instead of teams Revision ID: 5ceaec4834aa Revises: 4036e1fdb9ee Create Date: 2020-04-14 23:23:35.417496 """ # revision identifiers, used by Alembic. revision = '5ceaec4834aa' down_revision = '4036e1fdb9ee' branch_labels = None depends_on = None from alembic import op...
import os import sys import shutil from django_safe_project import safe_settings PY3 = sys.version_info.major > 2 if PY3: basestring = str class Template(object): """Handles copying and modifying the project template. :param source: Source path of the project template :param dest: Destination for m...
#!/usr/bin/env python import sys import hyperdex.client from hyperdex.client import LessEqual, GreaterEqual, Range, Regex, LengthEquals, LengthLessEqual, LengthGreaterEqual c = hyperdex.client.Client(sys.argv[1], int(sys.argv[2])) def to_objectset(xs): return set([frozenset(x.items()) for x in xs]) assert c.put('kv...
import json import P3 class Config_World(object): instance = 2 def __init__(self,objects,flocks,behaviors,screen=None): self.screen=screen self.objects=objects self.flocks=flocks self.behaviors=behaviors def to_dict(self): l_objects = [] l_flocks = [] ...
import os, sys, time from basic.constant import ROOT_PATH from basic.common import checkToSkip, printStatus, writeRankingResults from basic.util import readImageSet from util.simpleknn.bigfile import BigFile from util.simpleknn import simpleknn as imagesearch DEFAULT_K=1500 DEFAULT_DISTANCE = 'l2' DEF...
# Copyright 2015 Cloudbase Solutions Srl # 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 r...
from collections import OrderedDict from django.core.cache import cache from django.conf import settings import jingo import jinja2 from bedrock.firefox.models import FirefoxOSFeedLink from bedrock.firefox.firefox_details import firefox_desktop, firefox_android, firefox_ios from bedrock.base.urlresolvers import reve...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Infinite caching memcached class. Caches forever when passed a timeout of 0. For Django >= 1.3, this module also provides ``MemcachedCache`` and ``PyLibMCCache``, which use the backends of their respective analogs in django's default backend modules. """ from django....
import os import stat class local_filesystem: def walk(self, path): return os.walk(path) def is_dir(self, path): return stat.S_ISDIR(os.lstat(path).st_mode) def is_file(self, path): return stat.S_ISREG(os.lstat(path).st_mode) def open(self...
# -*- coding: utf-8 -*- """ urlresolver XBMC Addon Copyright (C) 2016 tknorris Derived from Shani's LPro Code (https://github.com/Shani-08/ShaniXBMCWork2/blob/master/plugin.video.live.streamspro/unCaptcha.py) This program is free software: you can redistribute it and/or modify it under the terms of...
from ..remote import RemoteModel class SpmHistoryInterfaceHistoryGridRemote(RemoteModel): """ This table lists the SPM interface history within the user specified period of time for a given interface. | ``id:`` The internal NetMRI identifier of the grid entry. | ``attribute type:`` number | ...
from datetime import datetime, timedelta, timezone import math FEETS_TO_METER = 0.3048 # ratio feets to meter FPM_TO_MS = FEETS_TO_METER / 60 # ratio fpm to m/s KNOTS_TO_MS = 0.5144 # ratio knots to m/s KPH_TO_MS = 0.27778 # ratio kph to m/s HPM_TO_DEGS = 180 / 60 ...
import factory from factory.django import DjangoModelFactory, mute_signals from .models import Profile, Work, Category from django.contrib.auth.models import User from django.db.models.signals import post_save class ProfileFactory(DjangoModelFactory): class Meta: model = Profile user = factory.SubFac...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
#!/usr/bin/env python # encoding: utf-8 """ consolegrid_provider.py Created by Scott on 2013-12-26. Copyright (c) 2013 Scott Rice. All rights reserved. """ import sys import os import urllib import urllib2 import grid_image_provider from ice.logs import logger class ConsoleGridProvider(grid_image_provider.GridImag...
# author: deadc0de6 # contact: https://github.com/deadc0de6 # # python IRC library # # Copyright (C) 2015 deadc0de6 # 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 Lice...
import pytest from collections import OrderedDict from arctic.mixins import LayoutMixin from articles.forms import ArticleForm from tests.conftest import get_form from tests.factories import ArticleFactory @pytest.fixture def layout(): class Layout(LayoutMixin): layout = None def __init__(self)...
# -*- coding: utf-8 -*- import imaplib import re try: # urlparse was moved to urllib.parse in Python 3 from urllib.parse import urlparse except ImportError: from urlparse import urlparse from jobs import AbstractJob class IMAP(AbstractJob): def __init__(self, conf): self.interval = conf['in...
import logging import os from unittest import mock from django.test import TestCase, tag from django.contrib.auth.models import User from django.conf import settings from feeds.models import Feed from plugins.models import PluginMeta, Plugin from plugins.models import ComputeResource from plugins.models import Plugi...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import shutil import sys import tempfile import zipfile from catapult_base import cloud_storage from telemetry.core import exception...
#!/usr/bin/env python2 # Copyright 2015 Dejan D. M. Milosavljevic # # 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 # # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import os import re im...
from flask import Blueprint from models import db, GithubRepo, GithubRepoEvent import json gh_renderer = Blueprint('github', __name__) @gh_renderer.route('/github/<int:repo_id>') def get_gh_entry(repo_id): entry = db.session.query(GithubRepoEvent)\ .filter_by(repo_id = repo_id)\ .order_by(...
from django.conf import settings from django.test import TestCase from django.contrib.auth.models import (Group, User, SiteProfileNotAvailable, UserManager) class ProfileTestCase(TestCase): fixtures = ['authtestdata.json'] def setUp(self): """Backs up the AUTH_PROFILE_MODULE""" self.old_A...
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Code parsing for coverage.py.""" import ast import collections import os import re import token import tokenize from coverage import env from coverage.backward...
import requests from datetime import datetime import dateutil.parser import pytz import urllib import yaml import dateutil.parser import re class Events: def __init__(self): try: with open('app.yaml', 'r') as f: self.config = yaml.load(f) except: raise Exception('Missing/invalid config') ...
#!/usr/bin/env python # Copyright (C) 2014-2017 Shea G Craig # # 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 ...
### # utilities used by twping command # from twping_defaults import * import configparser import pscheduler #Role constants CLIENT_ROLE = 0 SERVER_ROLE = 1 log = pscheduler.Log(prefix="tool-twping", quiet=True) ## # Determine whether particpant will act as client or server def get_role(participant, test_spec): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- #from __future__ import print_function import datetime from os.path import exists import sys import requests import json import re #from goose import Goose from pymongo import errors as mongo_err #from bs4 import BeautifulSoup as bs #import beautifulsoup4 as bs from urlpa...
# Copyright 2015 The Switch Authors. All rights reserved. # Licensed under the Apache License, Version 2, which is in the LICENSE file. """ Defines model components to describe generation technologies for the SWITCH-Pyomo model. SYNOPSIS >>> from switch_mod.utilities import define_AbstractModel >>> model = define_Abs...
import webapp2 as webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext.webapp import template import os class loonsDescriptionPage(webapp.RequestHandler): def get(self): text_file2 = open('loons/loons_text.txt','r') xx = text_file2.read() templ...
""" Tests for the Bulk Enrollment views. """ import ddt import json from django.core.urlresolvers import reverse from rest_framework.test import \ APIRequestFactory, APITestCase, force_authenticate from bulk_reset_attempts.serializers import BulkResetStudentAttemptsSerializer from bulk_reset_attempts.views impor...
# -*- coding: utf-8 -*- # # This file is part of Linux Show Player # # Copyright 2012-2016 Francesco Ceruti <ceppofrancy@gmail.com> # # Linux Show Player 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 ...
"""Run all test cases. """ import sys import os import unittest try: # For Pythons w/distutils pybsddb import bsddb3 as bsddb except ImportError: # For Python 2.3 import bsddb if sys.version_info[0] >= 3 : charset = "iso8859-1" # Full 8 bit class cursor_py3k(object) : def __init__(s...
#!/usr/bin/python # -*- coding: utf-8 -*- """Implements tests for the command to compute and export a waterbalance.""" # This package implements the management commands for lizard-waterbalance Django # app. # # Copyright (C) 2011 Nelen & Schuurmans # # This package is free software: you can redistribute it and/or mod...
from django.conf import settings from django.contrib import messages from django.core.urlresolvers import reverse from django.http.response import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.shortcuts import render_to_response from django.template.context import RequestContext from d...
import paramiko import math import json class GetHPUXData: def __init__(self, ip, ssh_port, timeout, usr, pwd, use_key_file, key_file, get_serial_info, get_hardware_info, get_os_details, get_cpu_info, get_memory_info, ignore_domain, upload_ipv6, debug): self.mach...
# Copyright (c) 2008-2009 Junior (Frederic) FLEURIAL MONFILS # # This file is part of PyAnalyzer. # # PyAnalyzer 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 # (a...
# -*- coding: utf-8 -*- import configparser import os.path, shutil, os class MySQLConfiguration: """ Handles MySQL Configuration file """ ClientSection = "client" def __init__(self, userprompt, mysqlConfigFile): self.configfile = mysqlConfigFile self.config = configparser.SafeConfigParser() ...
# coding: utf-8 class TDLambda(object): def __init__(self, action_space, alpha=0.1, gamma=0.9, ld=0.5): self.action_space = action_space self.V = {} self.E = {} # eligibility trace self.alpha = alpha self.gamma = gamma self.ld = ld self.obs = None ...
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Michiel D. Nauta # # 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...
from api.base_resources import JSONDefaultMixin from tastypie.resources import Resource from tastypie.cache import SimpleCache from api.cache import SimpleDictCache from tastypie.throttle import CacheThrottle from tastypie.utils import trailing_slash from django.conf.urls import url from datea_api.utils import remove_a...
import rest_easy from rest_easy import get, path @get() def test_get(): pass @path('path') def test_path(): pass class ClientAsObject(object): @get() def test_get(self): pass class ClientWithoutTarget(rest_easy.Client): @get() def test_get(self): pass class GetClient(re...
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ericsson AB # # 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 ...
import threading import numpy as np from queue import Queue from microtbs_rl.utils.common_utils import * logger = logging.getLogger(os.path.basename(__file__)) class _MultiEnvWorker: """ Helper class for the MultiEnv. Currently implemented with threads, and it's slow because of GIL. It would be mu...
# The MIT License (MIT) # # Copyright (c) 2015 Georg Schäfer # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mod...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Blockstack ~~~~~ copyright: (c) 2014-2015 by Halfmoon Labs, Inc. copyright: (c) 2016 by Blockstack.org This file is part of Blockstack Blockstack is free software: you can redistribute it and/or modify it under the terms of the GNU General...
#!/usr/bin/python # -*- coding: utf-8 -*- # # fs/__init__.py - Copyright (C) 2012-2014 Red Hat, Inc. # Written by Fabian Deutsch <fabiand@redhat.com> # # 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 Founda...
from django.contrib.auth.models import User from django.test import TestCase, override_settings class TestLanguageSwitching(TestCase): @classmethod def setUpClass(cls): super(TestLanguageSwitching, cls).setUpClass() User.objects.create_user( username="admin", password="admin", emai...
from Tkinter import * import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) # (1) GPIO.setup(18, GPIO.OUT) GPIO.setup(23, GPIO.OUT) GPIO.setup(24, GPIO.OUT) pwmRed = GPIO.PWM(18, 500) # (2) pwmRed.start(100) pwmGreen = GPIO.PWM(23, 500) pwmGreen.start(100) pwmBlue = GPIO.PWM(24, 500) pwmBlue.start(10...
""" URLs and constants for enterprise stuff """ import os ENTERPRISE_PORTAL_LOGIN_URL = "https://pmsalesdemo8.successfactors.com/login?company=SFPART011327#/login" DEFAULT_ENTERPRISE_NAME = 'SuccessFactors' ENTERPRISE_NAME = os.environ.get('ENTERPRISE_NAME', DEFAULT_ENTERPRISE_NAME) DEFAULT_IDP_CSS_ID = 'bestrun'...
import os from diceware.config import ( OPTIONS_DEFAULTS, valid_locations, get_configparser, get_config_dict, configparser, ) class TestConfigModule(object): # tests for diceware.config def test_defaults(self): # there is a set of defaults for options available assert OPTIONS_DEFA...
#!/usr/bin/env python """ ################################################################################ # # # toywv-4 # # ...
#------------------------------------------------------------------------------- # Name: FRC # Purpose: Module to simplify getting standings, match results, and OPRs # from the FIRST web pages # Author: BaselA #-------------------------------------------------------------------------------...
# -*- coding: utf-8 -*- from .response import Response from datetime import datetime class Statement(object): """ A statement represents a single spoken entity, sentence or phrase that someone can say. """ def __init__(self, text, **kwargs): self.text = text self.in_response_to = ...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from fnmatch import fnmatch import logging import mimetypes import os import traceback from appengine_wrappers import IsDevServer from branch_utility import...
#!/usr/bin/env python3 # Race07 Tool # Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com> # # 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...
import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d.art3d import Line3D from matplotlib.lines import Line2D import numpy as np def window(name): return plt.figure(name) def show(): plt.show() return None def undeformed(model): """Plot the undeformed st...
from waftools.inflectors import DependencyInflector from waftools.checks.generic import * from waflib import Utils import os __all__ = ["check_pthreads", "check_iconv", "check_lua", "check_oss_4front", "check_cocoa"] pthreads_program = load_fragment('pthreads.c') def check_pthread_flag(ctx, dependency_ide...
# (C) Datadog, Inc. 2015-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from collections import defaultdict import logging import os from urlparse import urljoin # project from util import check_yaml from utils.checkfiles import get_conf_path from utils.http import retrieve_...
from __future__ import print_function from matplotlib.collections import PolyCollection, TriMesh from matplotlib.colors import Normalize from matplotlib.tri.triangulation import Triangulation import numpy as np def tripcolor(ax, *args, **kwargs): """ Create a pseudocolor plot of an unstructured triangular gri...
# -*- coding: utf-8 -*- # Copyright © 2014 SEE AUTHORS FILE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # #...
from collections import namedtuple import re from .archive import Archive class AptSource(namedtuple('AptSource', 'deb options uri suite components')): def __str__(self): sline = self.deb if self.options: sline += ' ' + ' '.join(f'{k}={v}' if v is not None else k ...
"""Precision for ranking.""" import numpy as np from matchzoo.engine.base_metric import BaseMetric, sort_and_couple class Precision(BaseMetric): """Precision metric.""" ALIAS = 'precision' def __init__(self, k: int = 1, threshold: float = 0.): """ :class:`PrecisionMetric` constructor. ...
import logging import os import sys import json import time import pprint from apiclient.discovery import build import httplib2 from oauth2client.service_account import ServiceAccountCredentials from oauth2client.client import GoogleCredentials from apiclient import discovery custom_claim = "some custom_claim" audien...
#!/usr/bin/python import argparse import datetime import logging import math import os import requests import shutil import socket import subprocess import sys import time import raven def make_file_prefix(base_name): hostname = socket.gethostname() return '{0}_{1}'.format(hostname, base_name) def make_fi...
class Element(object): def __init__(self, value): self.value = value self.next = None class LinkedList(object): def __init__(self, head=None): self.head = head def append(self, new_element): current = self.head if self.head: while current.next: ...
import time from random import choice, randint from decouple import config from selenium import webdriver from gen_address import address from gen_random_values import gen_string, gen_date, convert_date HOME = config('HOME') # page = webdriver.Firefox() page = webdriver.Chrome(executable_path=HOME + '/chromedriver/ch...
# -*- coding: utf-8 -*- # test_resource.py --- # import json import base64 from twisted.internet import defer, reactor from twisted.web import server from twisted.web.test.test_web import DummyRequest from twisted.trial import unittest from twisted.internet.defer import succeed from twisted.python import log from t...
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation. # # 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...
from __future__ import absolute_import import logging import requests import sentry_sdk import six from collections import OrderedDict from django.core.cache import cache from bs4 import BeautifulSoup from django.utils.functional import cached_property from requests.exceptions import ConnectionError, Timeout, HTTPEr...
# single BIRStruct description yaml_eth_struct_dict = { 'type' : 'struct', 'fields' : [ {'dst' : 48}, {'src' : 48}, {'type_' : 16} ] } yaml_udp_struct_dict = { 'type' : 'struct', 'fields' : [ {'sport' : 16}, {'dport' : 16}, {'len' : 16}, {'c...
#!/usr/bin/python import sys, rospy, tf, moveit_commander, random from geometry_msgs.msg import Pose, Point, Quaternion import pgn class R2ChessboardPGN: def __init__(self): self.left_arm = moveit_commander.MoveGroupCommander("left_arm") self.left_hand = moveit_commander.MoveGroupCommander("left_hand") de...
# Copyright (C) 2018 Linaro Limited # # Author: Dean Arnold <dean.arnold@linaro.org> # # This file is part of LAVA Dispatcher. # # LAVA Dispatcher 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...
"""Computes partition function for RBM-like models using Annealed Importance Sampling.""" import numpy as np from deepnet import dbm from deepnet import util from deepnet import trainer as tr from choose_matrix_library import * import sys import numpy as np import pdb import time import itertools import matplotlib.pypl...
# -*- coding: latin1 -*- # $Id: CNCPendant.py,v 1.3 2014/10/15 15:04:48 bnv Exp bnv $ # # Author: Vasilis.Vlachoudis@cern.ch # Date: 06-Oct-2014 __author__ = "Vasilis Vlachoudis" __email__ = "Vasilis.Vlachoudis@cern.ch" import os import sys #import cgi import json import threading import urllib from websocket_server...
from WidgetRedirector import WidgetRedirector from Delegator import Delegator class Percolator: def __init__(self, text): # XXX would be nice to inherit from Delegator self.text = text self.redir = WidgetRedirector(text) self.top = self.bottom = Delegator(text) self.bottom....
# # Voitto - a simple yet efficient double ledger bookkeeping system # Copyright (C) 2010 Santtu Pajukanta <santtu@pajukanta.fi> # # 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...
''' user services module ''' # pylint: disable=no-member import logging import random import string import django.core.mail as django_mail from django.contrib.auth.models import User from django.utils import timezone from django.http.response import HttpResponseForbidden from django_app.models import UserConfirmation L...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Framework para Desenvolvimento de Agentes Inteligentes PADE # The MIT License (MIT) # Copyright (c) 2015 Lucas S Melo # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software")...
import os from osgeo import ogr def layers_to_feature_dataset(ds_name, gdb_fn, dataset_name): """Copy layers to a feature dataset in a file geodatabase.""" # Open the input datasource. in_ds = ogr.Open(ds_name) if in_ds is None: raise RuntimeError('Could not open datasource') # Open the g...
# Copyright 2015 Cloudera 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, so...
from __future__ import division import math import logging import numpy as np from pymongo import MongoClient import utm from sklearn.cluster import DBSCAN from get_database import get_routeCluster_db,get_transit_db from uuid import UUID from route_matching import getRoute,fullMatchDistance,matchTransitRoutes,matchTran...
# -*- coding: utf-8 -*- from test_settings import Settings class TestCase(Settings): def test_sidebar(self): # Ayarlari yapiyor. self.do_settings() # Admin'e tikliyor. self.driver.find_element_by_css_selector('li.ng-binding:nth-child(4) > a:nth-child(1)').click() # Donem'e ...
#!/usr/bin/python # -*- coding: utf-8 -*- import calendar import datetime from Funciones.funs import ultimodiames, select_sql from Funciones.Datos.contrato_dat import Contrato from wstools.Utility import DOM class Calendario: """ Realiza los calculos necesarios de los dias de trabajo entre dos fechas. ...
#!/usr/bin/env python # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2015 NIWA # # 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 yo...
# GromacsWrapper # Copyright (c) 2009-2011 Oliver Beckstein <orbeckst@gmail.com> # Released under the GNU Public License 3 (or higher, your choice) # See the file COPYING for details. """ Managing jobs remotely ====================== .. Warning:: Experimental code, use at your own risk. The :class:`Manager` encapsul...
# Copyright (C) 2013 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 vers...
# Copyright 2014 Objectif Libre # Copyright 2015 DotHill Systems # # 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 # # U...
""" This module contains pdsolve() and different helper functions that it uses. It is heavily inspired by the ode module and hence the basic infrastructure remains the same. **Functions in this module** These are the user functions in this module: - pdsolve() - Solves PDE's - classify_pde() - Classif...
""" Routes files """ from smserver.smutils.smpacket import smcommand from smserver.controllers import legacy ROUTES = { # Legacy controller for compatibility with Stepmania 5.X smcommand.SMClientCommand.NSCPingR: legacy.ping_response.PINGRController, smcommand.SMClientCommand.NSCHello: legacy.hello.Hello...
# -*- coding: utf-8 -*- # Description: # This file takes in a .csv file of movies and adds IMDB information to it. # The script prompts user for input if there are ambiguities for a title. # # Example usage: # python imdb_enrich_movies.py ../data/box_office_top_50_movies_1995-2014.csv # .csv file must have...
# -*- coding: utf-8 -*- ############################################################################# # # Copyright (c) 2007 Martin Reisenhofer <martin.reisenhofer@funkring.net> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
''' Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly since it includes another prime factor 7. Note that 1 is typically treated as an ugly number. ''' class Solution(object): ...
""" Given two strings text1 and text2, return the length of their longest common subsequence. A subsequence of a string is a new string generated from the original string with some characters(can be none) deleted without changing the relative order of the remaining characters. (eg, "ace" is a subsequence of "abcde" wh...
""" Django settings for mandalo project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os...