src
stringlengths
721
1.04M
# -*- coding: utf-8 -*- import locale from dialog import Dialog from gtsc import api, goblinapi locale.setlocale(locale.LC_ALL, '') d = Dialog(dialog="dialog") BOARD_ID = '' def main(): import gtsc.api global BOARD_ID d.set_background_title("Goblin Trello Sync client") if gtsc.api.API_TOKEN == '': ...
#!/usr/bin/env python # encoding: utf-8 """ Copyright (c) 2016 by Daniel Kurashige-Gollub <daniel@kurashige-gollub.de> License MIT: see LICENSE file. """ """ Download the API documentation for the PokeAPI.co site, parse it and generate Swift structs/classes from it that allow us to easily use the AP...
# -*- coding: utf-8 -*- # # django-rest-assured documentation build configuration file, created by # sphinx-quickstart on Fri Oct 24 10:48:27 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...
# Adam Petrone # November 2014 import logging import uuid def generate_guid(): return "{%s}" % str(uuid.uuid4()).upper() class ProjectInstance(object): def __init__(self, name, filename, dependency_names): # http://www.mztools.com/articles/2008/mz2008017.aspx self.builder_ref = "{8BC9CEB8-8B4A-11D0-8D11-00A0C9...
#! /usr/bin/env python # -*- coding:Utf8 -*- # Calculs de triangles from sys import exit # module contenant des fonctions système print(""" Veuillez entrer les longueurs des 3 côtés (en séparant ces valeurs à l'aide de virgules) :""") a, b, c = eval(input()) # Il n'est possible de construire un triangle que si ...
try: import OpenGL.GL as gl except: from galry import log_warn log_warn(("PyOpenGL is not available and Galry won't be" " able to render plots.")) class _gl(object): def mock(*args, **kwargs): return None def __getattr__(self, name): return self.mock g...
# -*- coding: utf-8 -*- ############################################################ # # Read & Modify commits of a Git Reposotory # ############################################################ import os import sys import argparse import subprocess import datetime from git import Repo, RefLog import json from logur...
# -*- coding: utf-8 -*- # Part of bubble. See LICENSE file for full copyright and licensing details. import click from ..cli import pass_bubble from ..util.examples import all_examples_functions @click.command('examples', short_help='Show example for doing some task in bubble(experimental)') @click.op...
import traceback class EnsureExceptionHandledGuard: """Helper for ensuring that Future's exceptions were handled. This solves a nasty problem with Futures and Tasks that have an exception set: if nobody asks for the exception, the exception is never logged. This violates the Zen of Python: 'Errors s...
# -*- coding: utf-8 -*- # Copyright 2017 Tecnativa - David Vidal # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp.tests import common class TestPurchaseOrder(common.SavepointCase): @classmethod def setUpClass(self): super(TestPurchaseOrder, self).setUpClass() self...
# # GemUO # # (c) 2005-2012 Max Kellermann <max@duempel.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope tha...
# Original work Copyright 2013 Arnaud Porterie # Modified work Copyright 2015 Frazer McLean # # 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 python3 # -*- coding: utf-8 -*- """\ Subsetsum by splitting christoph dürr et jill-jênn vie - 2014-2019 """ # snip{ def part_sum(x_table, i=0): """All subsetsums from x_table[i:] :param x_table: table of values :param int i: index_table defining suffix_table of x_table to be considered ...
from __future__ import print_function import sys from collections import OrderedDict import numpy as np def parse_cif(infile): if isinstance(infile, file): pass elif isinstance(infile, str): infile = open(infile) else: raise TypeError("Input should either be a file or string.") ...
from collections import OrderedDict import os import sys sys.path = [os.path.abspath(os.path.dirname(__file__))] + sys.path os.environ['is_test_suite'] = 'True' import classifiers as classifier_tests import regressors as regressor_tests training_parameters = { 'model_names': ['DeepLearning', 'GradientBoosting', ...
import pytest from tri_struct import merged from tri_form import Field, Form from tri_form.compat import render_to_string, format_html, field_defaults_factory, render_template, Template from .compat import RequestFactory, SafeText def test_render_to_string(): assert render_to_string( template_name='tri_f...
#!/usr/bin/env python import roslib; roslib.load_manifest('DroneInteractiveEnviroment') import rospy import json import requests from std_msgs.msg import String from geometry_msgs.msg import Twist from ardrone_autonomy.msg import Navdata class DieHard(object): def __init__(self): self.twist = Twist() ...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'BestRun.ghost_file' db.add_column('race_bestrun', 'ghost_file', self.gf('django.db.models....
#SELECT THE FLAVOUT OF YOUR EGGNOGG #The eggNOG database is pretty large, and regularily exists the need #to select a taxonomic group for a more accurate seach. #This script was created to select from the general database the sequences #from a determinated taxID #The selection is made based on the eggNOG.species.txt #I...
#!/usr/bin/env python # Copyright 2010,2011 Mozilla Foundation. 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 # notic...
"""Collection of useful functions which work on infinite lists. The infinite lists are actually the generator objects. Note that the functions will have side effects on the passed-in gLists. """ from __future__ import generators def gInfinite(obj): """Return infinite list of repeated objects obj""" while 1: ...
import percolation as P from .rdflib import NS a=NS.rdf.type def percolationSystem(): triples=[ (NS.per.CurrentStatus, a, NS.per.SystemStatus) ] def minimumTestOntology(context="minimum_ontology"): triples=[ (NS.po.FacebookSnapshot,NS.rdfs.subClassOf,NS.po.Snapshot), ...
# coding=gbk #*************************************************************************** #* * #* Copyright (c) 2009, 2010 * #* Xiaolong Cheng <lainegates@163.com> ...
#!/usr/bin/python -OO # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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, e...
from django.db import models from django.utils import timezone from datetime import timedelta # Create your models here. class Bot(models.Model): computer_name = models.CharField(max_length=100) system = models.CharField(max_length=100) node = models.CharField(max_length=100) release = models.CharField(max_len...
#!/usr/bin/env python # coding:utf-8 __version__ = '1.1' import sys import os import glob import errno import time import struct import collections import binascii import zlib import itertools import re import fnmatch import io import random import base64 import string import hashlib import threading import thread im...
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
import unittest from playlist import Playlist, load_playlist_from_db class TestPlaylist(unittest.TestCase): """Playlist tests""" def setUp(self): self.pl = Playlist("playlist", ["song_one", "song_two"]) self.pl.save_to_db() def tearDown(self): self.pl.delete_from_db() def te...
# Copyright 2017 Bracket Computing, 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. # A copy of the License is located at # # https://github.com/brkt/brkt-cli/blob/master/LICENSE # # or in the "license" file...
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from datetime import timedelta from unittest import skipIf from django.test import TestCase from django.conf import settings from restclients_core.models import MockHTTP from restclients_core.exceptions import DataFailureException f...
# -*- coding: utf-8 -*- import re from dateutil import parser from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from artbot_scraper.items import EventItem from pytz import timezone class VergeGallerySpider(CrawlSpider): name ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' impelement the main functions required by enc.py. ''' from random import randint from model.requirements import lmap, repeat def generate_otp(sheets, strength, length): for sheet in range(sheets): filename = "uexor_%s.uep" % (str(sheet),) ...
# -*- coding: utf-8 -*- from lutris.runners.runner import Runner class browser(Runner): """Runner for browser games""" human_name = "Browser" executable = "xdg-open" platform = "Web based games" description = "Run games in the browser" game_options = [ { "option": "main_fil...
from JumpScale import j import unittest descr = """ test basic functioning of agentcontroller new way """ organization = "jumpscale" author = "kristof@incubaid.com" license = "bsd" version = "1.0" category = "agentcontroller.basic.new" enable=True priority=2 ROLE='node' class TEST(unittest.TestCase): def setUp...
#!/usr/bin/env python3 from flickrapi import FlickrAPI, exceptions # Flickr API library import os # get directory of script for config loading import yaml # config file format from pprint import pprint # for debugging import re # for topic reply searchi...
def intersection(*entities): """ Finds the intersection between a list GeometryEntity instances. Returns a list of all the intersections, Will raise a NotImplementedError exception if unable to calculate the intersection. Examples: ========= >>> from sympy.geometry import * >>>...
from tinyevolver import Population import random try: import matplotlib.pyplot as plt except ImportError: plt = None random.seed(1234) """ For this example we're going to try fiting a power of x to some data: so e.g. d(t) = ax^n + b should resonably approximate some data depending on t. """ # We ...
from datetime import datetime from sqlalchemy_utils.types import phone_number from werkzeug import generate_password_hash, check_password_hash from flask_login import UserMixin from ..extensions import db from sqlalchemy import func from .constants import (USER_ROLE, USER_ADMIN, USER_STAFF, US...
"""Gather data related to enterprise users""" import logging import luigi import luigi.task from edx.analytics.tasks.common.mysql_load import MysqlInsertTask from edx.analytics.tasks.enterprise.enterprise_database_imports import ( ImportBenefitTask, ImportConditionalOfferTask, ImportDataSharingConsentTask, I...
#!/usr/bin/python # python setup.py sdist --format=zip,gztar from setuptools import setup import os import sys import platform import imp version = imp.load_source('version', 'lib/version.py') if sys.version_info[:3] < (2, 7, 0): sys.exit("Error: Electrum requires Python version >= 2.7.0...") data_files = [...
# -*- coding: utf-8 -*- ## logger.py ## ## Contributors for this file: ## - Yann Le Boulanger <asterix@lagaule.org> ## - Nikos Kouremenos <kourem@gmail.com> ## ## Copyright (C) 2003-2004 Yann Le Boulanger <asterix@lagaule.org> ## Vincent Hanquez <tab@snarc.org> ## Copyright (C) 2005 Yann Le Boul...
#Copyright (C) 2008 Codethink Ltd #copyright: Copyright (c) 2005, 2007 IBM Corporation #This library is free software; you can redistribute it and/or #modify it under the terms of the GNU Lesser General Public #License version 2 as published by the Free Software Foundation. #This program is distributed in the hope th...
# # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or ...
#!/usr/bin/env python # coding:utf8 # import pdb import ansible.runner from one_finger.cloud_logging import cloud_logging as logging log = logging.logger class CmmAndRun(): def __init__(self, module_name='shell', host=None, cmd=None, timeout=20): self.username = 'root' self.module_n...
# coding=utf-8 from __future__ import absolute_import, unicode_literals, division from fcc.ast.operators.base import (UnaryOperator, BinaryOperator, AssignmentOperator) from fcc.ast.expressions import CharExpression, IntExpression, FloatExpression # ----------------- # integer oper...
# -*- coding: utf-8 -*- import urlparse import re import json from amara.bindery import html from amara.lib import U import shelve catsh = shelve.open('catalogo.dat') def quita_punto(texto): if texto.endswith('.'): return texto[:-1] else: return texto def dame_texto(texto, inicio, fin): _ini ...
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from annotations.models import Language, Tense, Annotation, Fragment, LabelKey, Label from selections.models import Selection class Command(BaseCommand): help = 'Imports Tenses/Labels for Annotations, Selections, and Fragm...
try: import GPflow except: import gpflow GPflow = gpflow import numpy as np import tensorflow as tf def build_model_gp(X_train, Y_train, fun_ker, fun_mean=GPflow.mean_functions.Zero()): model = GPflow.gpr.GPR(X_train, Y_train, fun_ker, mean_function=fun_mean) model.optimize() return model def predict_t...
from flask_babel import lazy_gettext from mini_fiction.logic.adminlog import log_addition, log_changed_fields, log_deletion from mini_fiction.logic.image import CharacterBundle, cleanup_image, save_image from mini_fiction.models import Author, Character, CharacterGroup from mini_fiction.utils.misc import call_after_re...
""" The main rpw namespace and rpw.revit provide you with most of the imports will need. >>> from rpw import revit, db, ui >>> db.Element(SomeElement) >>> ui.Selection() >>> revit.doc >>> revit.uidoc.ActiveView Revit Namespaces are also available: >>> from rpw import DB, UI >>> DB.ElementId(00000) >>> UI.TaskDialog...
#!/usr/bin/python import cv, serial, struct from datetime import datetime cyril = serial.Serial('/dev/ttyAMA0', 9600) #open first serial port and give it a good name print "Opened "+cyril.portstr+" for serial access" centerX = 175 #160 centerY = 140 #120 cropped = None img = None # decrease angular resolution for 8...
import os import sys import time from owanimo.app.error import ERROR as e from owanimo.script import allegory_normal from owanimo.util import define from owanimo.util.log import LOG as L class Allegory(allegory_normal.Allegory): def __init__(self, runner, profile, player): allegory_normal.Allegory.__init_...
# Copyright 2012 OpenStack Foundation # # 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 l...
""" Usage: brilschema loaddata [options] Options: -h, --help Show this screen --name NAME Data: beamstatusinfo,trgconfig,runinfo,trginfo,hltinfo,beamintensity,hfoclumi -i INSELECT Input run,ls selection json file or string -o OUTPUT Output csv file or BrilDB ...
''' github-autopullrequest.py - Created by Eric Betancourt [betancourt.eric.s@gmail.com] This script helps automate code reviews of pull requests to a specified GitHub repositories. Using the GitHub api (documented at https://api.github.com/) the script will scan the currently open pull requests for a specified worki...
import dateutil import pytest from pystarling.api_objects.Account import Account class TestAccount(object): test_data = { 'id': 'ee8152d7-6ff2-4f79-b9de-39861bdec427', 'number': '99999999', 'sortCode': '608371', 'iban': 'GB26SRLG60837199999999', 'bic': 'SRLGGB2L', ...
from __future__ import absolute_import, unicode_literals import datetime import os from decimal import Decimal from django import forms from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import ValidationError from django.db import connection from django.db.models.query import E...
import numpy as np import pytest from crowddynamics.core.interactions import agent_agent_block_list from crowddynamics.core.vector2D import unit_vector from crowddynamics.simulation.agents import Agents, Circular, ThreeCircle, \ AgentGroup def attributes(): orientation = np.random.uniform(-np.pi, np.pi) ...
""" sphinx.builders.applehelp ~~~~~~~~~~~~~~~~~~~~~~~~~ Build Apple help books. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import warnings from sphinxcontrib.applehelp import ( AppleHelpCodeSigningFailed, AppleHelpIndexerF...
import datetime from collections import Mapping import peewee as pw from playhouse.shortcuts import model_to_dict, dict_to_model from playhouse.csv_utils import dump_csv import pandas as pd import gzip from secrets import DB_NAME, DB_PASSWORD, DB_USER import models db = pw.SqliteDatabase('tweets.db') psql_db = pw.Po...
""" DynamoDB config implementation. """ from collections import Mapping from ..compat import string_types from ..exceptions import LibraryRequiredError from ..structures import IgnoreCaseDict from ..utils import make_ignore_case from .core import BaseDataConfig try: import boto3 from boto3.dynamodb.condition...
#!/usr/bin/env vpython # Copyright 2015 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. """Check that symbols are ordered into a binary as they appear in the orderfile. """ import logging import optparse import sys impor...
import unittest from PyFoam.Basics.TemplateFile import TemplateFile,TemplateFileOldFormat,PyratempPreprocessor from PyFoam.Error import FatalErrorPyFoamException from tempfile import mktemp from PyFoam.ThirdParty.six import PY3 import sys theSuite=unittest.TestSuite() template1="""$$ y = 3+x This should be $x+y$...
# 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...
#!/usr/bin/python # -*- coding: utf-8 -*- # # --- BEGIN_HEADER --- # # find - [insert a few words of module description on this line] # Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter # # This file is part of MiG. # # MiG is free software: you can redistribute it and/or modify # it under the terms of the ...
from __future__ import division, print_function from physicsTable import * from physicsTable.constants import * import threading import pygame as pg import random, os, sys import numpy as np import json defVel = 300 # modified trial folder: #trialfolder = os.path.join('..','public_html','trials') trialfolder = os.path...
# Copyright (c) 2015 Huawei Technologies Co.,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 app...
from CreatureRogue.models.creature import Creature from CreatureRogue.data_layer.data import StaticGameData, HP_STAT from CreatureRogue.data_layer.pokeball import Pokeball from CreatureRogue.data_layer.stat import Stat class BattleCreature: """ When in battle a creature can have stat adjustments and other val...
from django.apps import AppConfig class EndNotesAppConfig(AppConfig): name = 'greyjay.content_notes' label = 'content_notes' verbose_name = "Wagtail end notes" def ready(self): from greyjay.articles.models import ArticlePage from wagtail.wagtailadmin.edit_handlers import ( ...
""" [2016-11-15] Challenge #292 [Easy] Increasing range parsing https://www.reddit.com/r/dailyprogrammer/comments/5d1l7v/20161115_challenge_292_easy_increasing_range/ # **Description:** We are given a list of numbers in a "short-hand" range notation where only the significant part of the next number is written becau...
#!/usr/bin/python import os import numpy import gdspy ld_mask_edge = {'layer': 300, 'datatype': 0} ld_kerf = {'layer': 200, 'datatype': 0} ld_acfmask = {'layer': 100, 'datatype': 0} ld_topmetal= {'layer': 81, 'datatype': 0} ld_po= {'layer': 27, 'datatype': 1} def GenerateCell(chipX = 14100., chipY=16210.,leftKerf=85...
from deep_learning_layers import ConvolutionOver2DAxisLayer, MaxPoolOverAxisLayer, MaxPoolOver2DAxisLayer, \ MaxPoolOver3DAxisLayer, ConvolutionOver3DAxisLayer, ConvolutionOverAxisLayer from default import * import theano.tensor as T from layers import MuLogSigmaErfLayer, CumSumLayer import objectives from lasagne...
#!/usr/bin/env python3 ################################# # Import some necessary modules # ################################# import argparse import pkg_resources from Bio.Nexus import Trees, Nodes from Bio.Graphics.GenomeDiagram._Colors import ColorTranslator from Bio.GenBank import Scanner from Bio.GenBank import _...
''' Copyright (c) 2012 Sven Reissmann <sven@0x80.io> This file is part of the PyTgen traffic generator. PyTgen 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...
"""Configures a scapy packet with user input from the lcd screen. Uses the LCD_Input_Wrapper class to interact with the user. All functions that use the screen directly require a lock object so that only one function can write to the screen at a time; otherwise garbage may result. configure_delay: gets the delay betw...
from django.db import transaction from guardian.shortcuts import assign_perm from sourcereader import AnkiCardSourceReader from ankiconverter import ankiTupeToTsuneDict from cardbox.card_model import Card, Deck class AnkiImporter(): @transaction.commit_on_success def importCollection(self,pathToApkg,user): ...
# Copyright 2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Tests for the `maastesting` package.""" from __future__ import ( absolute_import, print_function, unicode_literals, ) str = None __metaclass__ = type __all__ ...
from panda3d.core import * from panda3d.direct import * from direct.interval.IntervalGlobal import * from BattleBase import * from direct.actor import Actor from toontown.distributed import DelayDelete from direct.directnotify import DirectNotifyGlobal import DistributedBattleBase import MovieUtil from toontown.suit im...
import re import urllib import requests import urlparse import json import xbmc import datetime from BeautifulSoup import BeautifulSoup from resources.lib.modules import control from resources.lib.modules import cleantitle from schism_commons import quality_tag, google_tag, parseDOM, replaceHTMLCodes ,cleantitle_get, ...
# -*- coding: utf-8 -*- import pickle, re import xbmcup.app, xbmcup.system, xbmcup.net from defines import * class Auth: def __init__(self): self.success = '"ok"' self.cookie_file = xbmcup.system.fs('sandbox://'+COOKIE_FILE) self.login = xbmcup.app.setting['username'] self.password...
#! /usr/local/bin/python """Script for calculating SCHEMA energies. ****************************************************************** Copyright (C) 2005 Allan Drummond, California Institute of Technology This program is free software: you can redistribute it and/or modify it under the terms of the G...
# Copyright 2020 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...
# Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import from wtforms import validators from ..forms import ModelForm from origae import utils class ImageModelForm(ModelForm): """ Defines the form used to create a new ImageModelJob """ crop_size = ...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Photo.image_hash' db.add_column('photos_photo', 'image_hash', self.gf('django.db.models.fi...
from satori.client.common import want_import want_import(globals(), '*') from datetime import datetime from xml.dom import minidom from django import forms from satori.web.utils import forms as satoriforms from satori.tools.params import * class ParamsForm(forms.Form): fieldtypes = { OaTypeTex...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # SonarQube C++ Community Plugin (cxx plugin) # Copyright (C) 2010-2021 SonarOpenCommunity # http://github.com/SonarOpenCommunity/sonar-cxx # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # Lic...
import pico from pico import PicoError class NotAuthorizedError(PicoError): def __init__(self, message=''): PicoError.__init__(self, message) self.response.status = "401 Not Authorized" self.response.set_header("WWW-Authenticate", "Basic") class InvalidSessionError(PicoError): def _...
#!/usr/bin/env python3 # Copyright (c) 2016 Erik Johansson <erik@ejohansson.se> # # 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 late...
#!/usr/bin/env python3 import argparse import json import math import sys from collections import defaultdict import trueskill import matplotlib.pyplot as plot import utility def phi(x): """Cumulative distribution function for the standard normal distribution Taken from python math module documentation""" ...
# # Copyright (c) 2017 Intel 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 applicable law or agreed t...
import sys from matplotlib import pyplot import numpy sys.path.insert(0, '/Library/Application Support/MWorks/Scripting/Python') from mworks.data import MWKFile def selection_counts(filename): with MWKFile(filename) as f: r_codec = f.reverse_codec red_code = r_codec['red_selected'] green...
# -*- coding: utf8 -*- # # Copyright (C) 2017 NDP Systèmes (<http://www.ndp-systemes.fr>). # # 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,...
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import erpnext from frappe import _ from frappe.utils import flt,cstr from erpnext.accounts.report.financial_statements import get_period_list de...
# rFactor Remote LCD # 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) any later versi...
# The MIT License (MIT) # # Copyright (c) 2016-2021 Celiagg Contributors # # 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 us...
import threading from collections import defaultdict import sublime_plugin from .sublime import after class IdleIntervalEventListener(sublime_plugin.EventListener): """ Base class. Monitors view idle time and calls .on_idle() after the specified duration. Idle time is defined as time during which ...
# -*- coding: utf-8 -*- # # Scrimer documentation build configuration file, created by # sphinx-quickstart on Tue Jan 22 11:27:51 2013. # # 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. # # All...
''' Created on May 30, 2016 @author: kashefy ''' import lmdb from lmdb_utils import IDX_FMT, MAP_SZ def copy_samples_lmdb(path_lmdb, path_dst, keys, func_data=None): """ Copy select samples from an lmdb into another. Can be used for sampling from an lmdb into another and generating a random shuffle o...
import pygame import sys from random import choice from pygame.locals import * RED = (255, 0, 0, 0) GREEN = (0, 255, 0) BLUE = (0, 0, 255) YELLOW = (255, 255, 0) ORANGE = (255, 100, 0) PURPLE = (100, 0, 255) def get_words(): f = open("words.txt") temp = f.readlines() words = [] for word in temp: ...
# Copyright 2014 Open vStorage NV # # 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 writ...