src
stringlengths
721
1.04M
# Copyright 2018 Open Source Robotics Foundation, 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...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 INECO PARTNERSHIP LIMITED (http://openerp.tititab.com) # All Right Reserved # # Author : Tititab Srisookco (thitithup@gmail.com) # # WARNING: This program as such is intended to be used by profe...
# 3rd-party imports from itertools import chain def memo(f): """memoization decorator, taken from Peter Norvig's Design of Computer Programs course on Udacity.com""" cache = {} def _f(*args): try: return cache[args] except KeyError: result = cache[args] = f(*arg...
import numpy as np def global_alignment(seq0, seq1): def get_dp_table(): dp_score_table = np.ndarray(shape=(len(seq0) + 1, len(seq1) + 1), dtype=int) dp_score_table.fill(0) for col_idx in range(dp_score_table.shape[1]): dp_score_table[0][col_idx] = (-1) * col_idx for ro...
""" Django settings for snippod boilerplate project. This is a base starter for snippod. For more information on this file, see https://github.com/shalomeir/snippod-boilerplate """ from .common import * # from snippod_boilerplate.settings.config_dev import * # SECURITY WARNING: keep the secret key used in producti...
#!/usr/bin/env python2.7 import sys, operator, argparse from Bio import SeqIO parser = argparse.ArgumentParser(description='''Prints out the coverage values for each cluster, by sample and total. Also lists number of hits in each cluster.''', formatter_class=argparse.ArgumentDefaultsHelpFormatter, add_help=False, epil...
import ray.worker import logging logger = logging.getLogger(__name__) class RuntimeContext(object): """A class used for getting runtime context.""" def __init__(self, worker): assert worker is not None self.worker = worker def get(self): """Get a dictionary of the current_contex...
from base_model import BaseModel import sqlalchemy as db class User(BaseModel): #table mapping __tablename__ = "users" ##region column mapping id = db.Column(db.Integer, primary_key=True) user_name = db.Column(db.Text) primary_email_id = db.Column(db.Integer, db.ForeignKey('user_emails.id') ) #Use mod...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for basic csv imports.""" from ggrc import models from ggrc.converters import errors from integration.ggrc import TestCase from integration.ggrc import generator class TestBasicCsvImport(TestCase)...
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-03-10 15:23 from __future__ import unicode_literals from django.db import migrations from django.db import connection def remove_non_unique(apps, schema_editor): Answer = apps.get_model('exams', 'Answer') with connection.cursor() as cursor: ...
# stdlib from collections import defaultdict import re # 3rd party import requests # project from checks import AgentCheck DEFAULT_MAX_METRICS = 350 PATH = "path" ALIAS = "alias" TYPE = "type" TAGS = "tags" GAUGE = "gauge" RATE = "rate" DEFAULT_TYPE = GAUGE SUPPORTED_TYPES = { GAUGE: AgentCheck.gauge, RAT...
import json from urlparse import urlparse class Restaurant(object): def __init__(self, data): self.url = data.get('@id', '') self.tabelog_id = self.parse_id_from_url(self.url) self.name = data.get('name', '').encode('utf8') self.img_url = data.get('image', '') geo = data.ge...
from barak.utilities import between from barak.io import parse_config, readtxt from scipy.integrate import simps import numpy as np from barak.constants import Ryd_Ang, pi, hplanck import os def get_data_path(): """ Return the path to the data directory for this package. """ return os.path.abspath(__file_...
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
# # 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 applicable law or agreed to ...
class Solution(object): def bursthelper(self,memo,nums,left,right): if left+1==right: return 0 if memo[left][right]>0: return memo[left][right] res=0 for i in xrange(left+1,right): res=max(res,nums[left]*nums[i]*nums[right]+self.bursthelper(memo,nums,left,i)+\ ...
#!/usr/bin/python import usb.core import usb.util import serial import socket from datecs import * from exceptions import * from time import sleep class Usb(Datecs): """ Define USB printer """ def __init__(self, idVendor, idProduct, interface=0, in_ep=0x82, out_ep=0x01): """ @param idVendor ...
# Copyright (C) 2021 OpenMotics BV # # 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. # # This program is distribu...
#!/usr/bin/env python from __future__ import print_function from __future__ import unicode_literals import os import sys import subprocess as sp import time def get_ps_data(options): try: data = sp.check_output(["ps", "-C", options.command, "-o" "%cpu=,%mem="]) if options.multithread: ...
# 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 # d...
"""Development settings and globals.""" from __future__ import absolute_import import os from os.path import join, normpath from ecommerce.settings.base import * from ecommerce.settings.logger import get_logger_config # DEBUG CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = Tru...
from unittest import TestCase from unittest.mock import create_autospec from nose.tools import istest from bigorna.commons import Event from bigorna.tasks import TaskScheduler, TaskDefinition, task_status_changed_evt from bigorna.tasks.executor import Executor from bigorna.commons import Config class TaskSchedulerT...
""" device.models ------------- """ import logging from django.db import models from kitchensink.base.models import BaseModel from kitchensink.device.managers import MakeManager _log = logging.getLogger('kss.%s' % __name__) class Make(BaseModel): """ Which company made the device (i.e. LG) """ objects ...
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets 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 appl...
""" 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
from flask import request, abort, jsonify, Flask from werkzeug.contrib.cache import SimpleCache, RedisCache from datetime import datetime import pytz import cPickle import eetlijst import calendar import functools # App definition app = Flask(__name__) app.debug = True # Use simple cache for cli-mode. For WSGI mod...
import math import time t1 = time.time() prime = [2,3,5] primen = 2 while primen < 547: b = prime[primen] t = 1 while (t == 1): b = b+2 i = 0 t = 0 while (prime[i]*prime[i] < b)and (t == 0): i=i+1 if (b%prime[i] == 0): t = 1 ...
from django.test import TestCase from corehq.apps.domain.models import Domain from corehq.apps.groups.models import Group from corehq.apps.users.models import CommCareUser class OwnerIDTestCase(TestCase): @staticmethod def _mock_user(id): class FakeUser(CommCareUser): @property ...
import mapzen.whosonfirst.pip import mapzen.whosonfirst.uri import mapzen.whosonfirst.placetypes import shapely.geometry import logging import requests import json def reverse_geocoordinates(feature): logging.warning("mapzen.whosonfirst.pip.utils.reverse_geocoordinates has been deprecated, you should use mapzen.w...
#!/Users/nicolasf/anaconda/anaconda/bin/python import os import sys import argparse import json import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt sys.path.insert(0, '../') from paleopy import proxy from paleopy import analogs from paleopy import ensemble from paleopy.plotting import scala...
# coding=utf-8 # Copyright 2017 The Tensor2Tensor 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 applicable...
''' K.I.S.T.I.E (Keep, It, Simple, Take, It, Easy) Created on 1 Jan 2013 @author: Leonardo Bruni, leo.b2003@gmail.com Kistie Attrs Class lib This Kistie implementation i's part of project 'Kistie_Autorig' by Leonardo Bruni, leo.b2003@gmail.com ''' import maya.cmds as cmds # Import KstOut import kcode.kcore.KstOut as ...
info = { "name": "ky", "date_order": "DMY", "january": [ "янв", "январь" ], "february": [ "фев", "февраль" ], "march": [ "мар", "март" ], "april": [ "апр", "апрель" ], "may": [ "май" ], "june": [ ...
# ---------------------------------------------------------------------------------- # Copyright 2015 Esri # 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/L...
from fabric.contrib.files import append, exists, sed from fabric.api import env, local, run import random REPO_URL = 'https://github.com/rmelchorv/TDD-Cuervos.git' def deploy(): site_folder = '/home/%s/sites/%s' % (env.user, env.host) source_folder = site_folder + '/source' _create_directory_structure_if_necessar...
""" 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 this ...
from app import * def ita_search(faa_orig, faa_dest, start_date, end_date, duration = None, out_constraints = None, return_constraints = None, month_search = True): """ faa_orig, faa_dest: FAA airport code strs e.g. 'SFO' start_date, end_date: datetime objs e.g. datetime.date.today(), datetime.date(2015, 2...
# encoding: utf-8 from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4 import QtGui import re,itertools import logging logging.trace=logging.debug logging.basicConfig(level=logging.INFO) from yade import * import yade.qt try: from minieigen import * except ImportError: from miniEigen import * seqSeri...
# 679. 24 Game # DescriptionHintsSubmissionsDiscussSolution # DiscussPick One # You have 4 cards each containing a number from 1 to 9. You need to judge whether they could operated through *, /, +, -, (, ) to get the value of 24. # # Example 1: # Input: [4, 1, 8, 7] # Output: True # Explanation: (8-4) * (7-1) = 24 # E...
import os import gflags from SourceFolder import SourceFolder class RootSourceFolder(SourceFolder): '''The root of the source tree''' def __init__(self, path): super(RootSourceFolder, self).__init__( parent = None, path = os.path.abspath(path), source_tree...
from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-username", help="specify email address used to a...
#!/usr/bin/env python from align import nw_align def load_score(filename): score = [] for line in open(filename): note, duration_64 = line.strip().split() note = int(note) duration_64 = int(duration_64) score.append((note, duration_64)) return score def load_performan...
from __future__ import print_function import zmq import threading import numpy as np import struct import time from datetime import datetime import socket import sys import os import yaml import logging from collections import deque if sys.version_info < (3, 0): from subprocess32 import Popen, PIPE else: from s...
from lxxl.lib import router, output from lxxl.lib.app import Error, Controller from lxxl.lib.storage import Db, DbError from lxxl.model.activities import Activity, Factory as ActivityFactory from lxxl.model.blob import Factory as BlobFactory class Thumbnail(router.Root): def save(self, environ, params): ...
from __future__ import absolute_import from django.utils.translation import ugettext as _ from django.http import HttpResponse, HttpRequest from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.views import login as django_login_page from django.http import HttpResponseRedirect from zilencer.m...
# Copyright 2019 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,...
#!/usr/bin/env python """Visualise finite strian ellipsoids""" import numpy as np from mayavi.api import Engine from mayavi.sources.api import ParametricSurface from mayavi.modules.api import Surface from mayavi import mlab def gen_ellipsoid(position,shape,orientation): """given the existence of a scene genera...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Link.title' db.delete_column(u'link_link', 'title') ...
# !/usr/bin/env python # -*- coding: utf-8 -*- ''' Description: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the longest valid parentheses substring is "()", which has length = 2. Another example is ")()())",...
""" model_f.py by Ted Morin contains a function to predict 8-year Diabtes Mellitus risks beta coefficients and logistic model from 10.1001/archinte.167.10.1068 2007 Prediction of Incident Diabetes Mellitus in Middle Aged Adults Framingham Heart Study (Table 5, Complex Model 2) function expects parameters of: "Male S...
# # ElementTree # $Id: ElementTree.py 3440 2008-07-18 14:45:01Z fredrik $ # # light-weight XML support for Python 2.3 and later. # # history (since 1.2.6): # 2005-11-12 fl added tostringlist/fromstringlist helpers # 2006-07-05 fl merged in selected changes from the 1.3 sandbox # 2006-07-05 fl removed support for ...
import os import errno import logging import imp from fuse import Operations, FuseOSError class Tree(Operations): """ Most of this class is based on the work of Stavros Korokithakis: https://www.stavros.io/posts/python-fuse-filesystem/ ;-) """ def __init__(self, base): self.logger = l...
# python experimental tests for Husky import numpy as np import glob import matplotlib.pyplot as plt for file in glob.glob("*.npy"): data = np.load(file)[5:, :] print file, error_long = data[:, 0] error_lat = data[:, 1] ref_x = [value-data[0,2] for value in data[:, 2]] # print ref_x[:30] ...
#!/usr/bin/env python # Scatter - A python tool to plot and output atomic scattering factors # Copyright (C) 2018 Stef Smeets # # 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; ei...
#!/usr/bin/env python # ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are me...
# Copyright 2017 Andreas Kirsch <blackhc@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 # # Unless required by applicable law or...
import collections import urllib, urllib2 from bs4 import BeautifulSoup from FormQuestion import GFQuestion class GFParser(object): """Allows to access all the questions from a GForm and submit a response""" def __init__(self, url): """Loads form from its public page url""" self.url = url res = urllib2.urlop...
import functools from flex.constants import ( ARRAY, OBJECT, ) from flex.decorators import ( skip_if_not_of_type, skip_if_empty, ) from flex.validation.common import ( generate_object_validator, apply_validator_to_object, apply_validator_to_array, ) from flex.datastructures import ( Val...
# -*- coding: utf-8 -*- # MIT license # # Copyright (C) 2015-2019 by XESS Corp. # # 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...
import sys import io import time import json import threading import traceback import collections import bisect try: import Queue as queue except ImportError: import queue # Patch urllib3 for sending unicode filename from . import hack from . import exception __version_info__ = (10, 5) __version__ = '.'.jo...
# -*- coding: utf-8 -*- # Common code def check_keys (keys, dictionary): ''' Check if keys received are in the dictionary ''' for key in keys: if not key in dictionary.keys(): return False return True def print_data (params): prints = [] pos = "\tPosition:\n" pos ...
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
"""Leetcode 240. Search a 2D Matrix II URL: https://leetcode.com/problems/search-a-2d-matrix-ii/ Medium Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: - Integers in each row are sorted in ascending from left to right. - Integers in each column ar...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013,2014,2015,2016 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
# Copyright (C) 2016 Jamie Acosta, Jennifer Weand, Juan Soto, Mark Eby, Mark Smith, Andres Olivas # # This file is part of DssVisualizer. # # DssVisualizer 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, eit...
import os import argparse import subprocess import shutil import time import sys # from fiberfileIO import * from makeDataset import make_fiber_feature from runStore import run_store from runClassification import run_classification start = time.time() BLUE_BOLD = "\033[1;34m" YELLOW = "\033[0;33m" RED = "\033[0;31m" NC...
# This file is part of Headphones. # # Headphones 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. # # Headphones is distributed i...
from odoo.tests.common import TransactionCase class TestProjectProject(TransactionCase): def setUp(self): super(TestProjectProject, self).setUp() self.project_values = { 'name': 'Projeto Teste', 'label_tasks': 'Tasks', 'partner_id': self.env.ref('base.res_part...
# -*- coding: utf-8 -*- """ End-to-end tests for discussion """ import bok_choy.browser from ..helpers import UniqueCourseTest from ...fixtures.course import CourseFixture from ...pages.lms.auto_auth import AutoAuthPage from ..ga_helpers import GaccoTestMixin, SUPER_USER_INFO from ...pages.lms.ga_discussion import Di...
from django.db import models, transaction, IntegrityError from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.utils import timezone from .utils import classproperty, get_duration, get_natural_duration def _get_or_create(klass, **kwargs): "Mimic lo...
# Copyright (C) 2003-2011 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
import json import redis import fakeredis from .base import BaseGraphDB, Node, Relation from .redis_db import OrderedHash class RedisGraphDB(BaseGraphDB): DB = { 'host': 'localhost', 'port': 6379, } REDIS_CLIENT = redis.StrictRedis def __init__(self): self._r = self.REDIS_CLI...
from struct import unpack, calcsize from StataTypes import MissingValue, Variable class Reader(object): """.dta file reader""" _header = {} _data_location = 0 _col_sizes = () _has_string_data = False _missing_values = False TYPE_MAP = range(251)+list('bhlfd') MISSING_VALUES = { 'b': (...
# !/usr/bin/env python # -*- coding: UTF-8 -*- import json # =========== # Utilities # =========== def build_D3treeStandard(old, MAX_DEPTH, level=1, toplayer=None): """ For d3s examples all we need is a json with name, children and size .. eg { "name": "flare", "children": [ { "name": "analyt...
import os import unittest from vsg.rules import sequential from vsg import vhdlFile from vsg.tests import utils sTestDir = os.path.dirname(__file__) lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_006_test_input.vhd')) lExpected = [] lExpected.append('') utils.read_file(os.path.join(sTestDi...
import prophy import pytest @pytest.fixture(scope = 'session') def Struct(): class Struct(prophy.with_metaclass(prophy.struct_generator, prophy.struct)): _descriptor = [("x", prophy.u32), ("y", prophy.u32)] return Struct @pytest.fixture(scope = 'session') def NestedSt...
# -*- coding: utf-8 -*- # lexer.py --- Lexer module of CondConfigParser # # Copyright (c) 2014, Florent Rougon # 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. Redistributions of source cod...
#!/usr/bin/env python # # ESP8266 ROM Bootloader Utility # https://github.com/themadinventor/esptool # # Copyright (C) 2014 Fredrik Ahlberg # # 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...
#!/usr/bin/python2 """Entry point for system-config-lvm. This application wraps the LVM2 command line interface in a graphical user interface. """ import sys import types import select import signal import string import os from lvmui_constants import PROGNAME, INSTALLDIR #PROGNAME = "system-config-lvm" #IN...
import numpy as np import cv import cv2 import argparse import os # from matplotlib import pyplot as plt from PIL import Image from operator import itemgetter from scipy.spatial import KDTree """ """ def cliArguments(): ap = argparse.ArgumentParser() ap.add_argument("--images") return vars(ap.parse_args()) def...
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the fake storage.""" import unittest from plaso.containers import errors from plaso.containers import event_sources from plaso.containers import reports from plaso.containers import sessions from plaso.containers import tasks from plaso.lib import definitions fro...
# Copyright (c) 2002, 2003, 2005, 2006 Allan Saddi <allan@saddi.com> # 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. Redistributions of source code must retain the above copyright # noti...
# Copyright (c) 2012, CyberPoint International, LLC # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this lis...
importantDatabase = { "floor_00": { "nameOnWeb": "Ground Floor", "room_00": { "Device": { "Device_01": { "inNode": "dataNodeSlave01", "name": "Device02", "nameModule": "Light", "nameOnWeb": "L...
import json from nose.tools import eq_ import amo from addons.models import AddonUpsell from mkt.api.base import get_url, list_url from mkt.api.tests import BaseAPI from mkt.api.tests.test_oauth import get_absolute_url from mkt.webapps.models import Webapp from mkt.site.fixtures import fixture class TestAppDetail(...
# -*- coding: utf8 -*- """About box """ import platform import humanize import psutil from PyQt5 import QtCore, QtWidgets from PyQt5.QtCore import Qt from PyQt5.QtWidgets import (QDialog, QLabel, QPushButton, QSizePolicy, QVBoxLayout) from inselect.gui.utils import HTML_LINK_TEMPLATE #...
""" mGameController 0.5 GitHub Page: https://github.com/thedixieflatline/mGameController mGameController an app for the game Assetto Corsa. Provides the ability to get control inputs from game devices in Assetto Corsa App developed by David Trenear Please submit bugs or requests to the Assetto Corsa forum http://www.a...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/env python ''' Make predictions for the test data ''' import argparse, logging, multiprocessing import cPickle as pickle import numpy as np from common import load_npz, save_npz, load_encoded_features from sklearn.linear_model import LogisticRegression logging.basicConfig(level=logging.DEBUG) CFG = {22: ...
import os from flask import Flask, json import logging from logging.handlers import RotatingFileHandler UPLOAD_DIRECTORY = 'uploads' app = Flask(__name__, static_url_path='') print 'Newman flask application starting...' # Configure root logging which effects console - dont want newman debug to go to console # TODO ...
# -*- coding: utf-8 -*- """ AONX Server - Pequeño servidor de Argentum Online. Copyright (C) 2011 Alejandro Santos <alejolp@alejolp.com.ar> 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 Fo...
# -*- 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): # Deleting model 'Participant' db.delete_table(u'pa_participant') # Removing M2M table for field us...
import unittest from soap.context import context from soap.datatype import float_type from soap.expression import Variable from soap.parser import parse from soap.semantics.state.box import BoxState from soap.semantics.state.meta import flow_to_meta_state from soap.semantics.functions.arithmetic import arith_eval from...
from xml.sax.saxutils import escape import codecs class MarkdownTablesOutput(): def __init__(self, groups): result = ("# Parameter Reference\n" "> **Note** **This list is auto-generated from the source code** and contains the most recent parameter documentation.\n" "\n")...
import logging from .hints import DeletedHint, DestMoveHint, ModifiedHint, SourceMoveHint _logger = logging.getLogger(__name__) class HintBuilder(object): """Build and set hint attributes on index node, from external event. The Builder is a class dedicated to convert external event (creation/modificati...
#!/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...
# # CORE # # Copyright (c)2010-2012 the Boeing Company. # See the LICENSE.BOEING file included in this distribution. # # author: Tom Goff <thomas.goff@boeing.com> # # Copyright (c) 2014 Benocs GmbH # # author: Robert Wuttke <robert@benocs.com> # # See the LICENSE file included in this distribution. # ''' ipaddr.py: he...
#Program to download Yotube music #Author: Jack Cloudman import pafy,os,shutil from pydub import AudioSegment as convert #Create song list if os.path.exists('songs.txt'): pass else: print("Creating songs.txt....") document= open('songs.txt','w') print("Paste yours songs in songs.txt") d...
#!/usr/bin/env python ####################################################### #Written by Daniel Silva #Based in the original SHC code from Yuan YAO and Xuhui Huang: # Proceedings of the Pacific Symposium on Biocomputing, 15, 228-239, (2010) # #Intended to be used in the SimTK project #Ver. 1.5b 21/Apr/2011 #########...
import datetime from typing import Iterable import numpy as np from dateutil.parser import parse from tqdm.auto import tqdm from great_expectations.core.expectation_configuration import ExpectationConfiguration from great_expectations.dataset.util import build_categorical_partition_object from great_expectations.exce...