src
stringlengths
721
1.04M
from PyQt4 import QtCore, QtGui from kronos import ThreadedScheduler import FenetreTache import taches.views as taaaches from datetime import datetime, timedelta, date import preferences import webbrowser from chambres.models import joliePeriode from easyPoS.models import DonneesEntreprise, LigneFacture, PreparationFa...
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python...
#!/usr/bin/python2.4 """Test harness for diff_match_patch.py Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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://...
vocab_sizes = ( { "ab": { 1000, 3000, 5000 }, "ace": { 1000, 3000, 5000 }, "ady": { 1000, 3000, 5000 }, "af": { 100000, 10000, 1000, 200000, 25000, 3000, 50000, 5000 }, "ak": { 1000, 3000, 5000 }, "als": { 100000, ...
""" Django settings for BTW2017 project. Generated by 'django-admin startproject' using Django 1.11.1. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ ...
# Copyright 2013 Regionbibliotek Halland # # This file is part of Digitala sagor. # # Digitala sagor 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 # ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from nose.tools import assert_raises import sys import pandas as pd import numpy as np from sktracker.tracker.cost_function import AbstractCostF...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from time import sleep from gaebusiness.business import CommandExecutionException from permission_app.permission_facade import main_user_form from tekton.gae.middleware.json_middleware import JsonResponse from question_app import question_...
class Config(object): def __init__(self): self.__sqlLiteDatabasePath = "./aquarius.db" self.__webServerAddress = "192.168.0.9" self.__webServerPort = 9090 self.__harvestPaths = [] @property def harvest_paths(self): return self.__harvestPaths @ha...
############################################################################ # This file is part of LImA, a Library for Image Acquisition # # Copyright (C) : 2009-2014 # European Synchrotron Radiation Facility # BP 220, Grenoble 38043 # FRANCE # # This is free software; you can redistribute it and/or modify # it under ...
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2016-2020) Hewlett Packard Enterprise Development LP # # 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/licen...
from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img import numpy as np from math import pi from keras.preprocessing.image import ImageDataGenerator import cv2 from sklearn.cluster import KMeans import sklearn.preprocessing as prepro # Generamos nuevos ejemplos ''' ...
# Copyright (c) 2013 Yubico AB # 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 # notice, this list of conditi...
# Copyright (c) 2014 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Tools and utilities for creating proofs about tries.""" import itertools import multiprocessing import optparse import spec import trie import ...
#!/usr/bin/env python import time import serial import pygame from pygame.locals import * from ui import widgets, surface import psu import random class PresetScreen(object): def __init__(self, display, psu, parent): self.display = display self.parent = parent self.psu = psu sel...
import logging from browser.ajax import ajax class XMLHTTPHandler(logging.Handler): """ A class which sends records to a Web server, using either GET or POST semantics. """ def __init__(self, url, method="GET"): """ Initialize the instance with the host, the request URL, and the m...
from south.db import db from django.db import models from mypage.pages.models import * class Migration: def forwards(self, orm): # Changing field 'Page.site' db.alter_column('pages_page', 'site_id', models.ForeignKey(orm['sites.Site'], default= lambda :settings.SITE_ID)) ...
from flask import jsonify, request, Response from pkg_resources import resource_string from jinja2 import Template try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse _sessions = {} def _bind(func): def f(): try: data = request.get_data() ...
#!/usr/bin/env python # encoding: utf-8 from cmath import exp, pi, sqrt from random import random import itertools def vectorflip(bitstring): """ returns flipped bits in a given string """ if not bitstring: raise TypeError("vectorflip passed None") return ''.join('1' if x == '0' else '0' for x...
#!/usr/bin/env python """Earth Engine helper functions for working with the Cloud API. Many of the functions defined here are for mapping legacy calls in ee.data into their new Cloud API equivalents. This generally requires remapping call parameters and result values. """ from __future__ import absolute_import from _...
import argparse import baseline.embeddings from eight_mile.confusion import ConfusionMatrix import baseline from eight_mile.pytorch.optz import OptimizerManager, EagerOptimizer import baseline.pytorch.embeddings import eight_mile.pytorch.layers as L import torch.nn.functional as F from torch.utils.data import Dataset, ...
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: demos/trecento/largestAmbitus.py # Purpose: find Trecento/ars nova pieces with large ambitus # # Authors: Michael Scott Cuthbert # # Copyright: Copyright © 2012 Michael Scott Cuth...
# -*- coding: utf-8 -*- """ party.py """ from trytond.pool import PoolMeta, Pool from trytond.transaction import Transaction from trytond.pyson import Eval, Bool from trytond.model import ModelView, fields from trytond.wizard import Wizard, StateView, StateTransition, Button __all__ = [ 'Address', 'AddressVal...
class Students: def __init__ (self, name, percentage): self.name = name self.percentage = percentage def getPercentile(percentageList): percentageList = sorted(percentageList, reverse=True) print percentageList rank = [] for x in range(len(percentageList)): if percentageList[x][0] != percentageList[x-1][0...
#!/usr/bin/env python3 # # Copyright 2018 The Bazel 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 ...
# # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2015. It is licensed under # the three-clause BSD license; see LICENSE. # Contact: khmer-project@idyll.org # # pylint: disable=missing-docstring,protected-access import khmer from khmer import ReadP...
# Copyright 2014-2017 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in...
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # Brachyprint -- 3D printing brachytherapy moulds # Copyright (C) 2013-14 James Cranch, Martin Green and Oliver Madge # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD MANAGER_CLASS = '' class GlobalOtpObjectUD(DistributedObjectGlobalUD): notify = directNotify.newCategory('GlobalOtpObjectUD') def announceGenerate(self): DistributedObjectGlobalUD.announceGenerate(self) self.s...
from __future__ import division import numpy as np from photutils.morphology import centroid_com, centroid_1dg, centroid_2dg def recenter(image, pos, window_size = 15, method = "2dg"): """ Recenter each star in each frame of the image cube before performing aperture photometry to take care of slight mis...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pygame from .texto import texto from .textoci import texto2 from .imgfondo import fondo TEXT_COLOR2 = (0,0,0) COLOR_RED = (213, 0, 0) BAR_COLOR = (151, 0, 172) TEXT_COLOR = (255, 255, 255) class Button(pygame.sprite.Sprite): def __init__(self, identificador, par...
# coding:utf-8 """ tcc3portal.tcc_core.middleware ~~~~~~~~~~~~~~~~~~~~~~~~~ tcc3portal tcc_core middleware module. :copyright: (c) 2015 by Vito. :license: GNU, see LICENSE for more details. """ from werkzeug.urls import url_decode class HTTPMethodOverrideMiddleware(object): """The HTTPMethod...
from arcas.tools import Api import xml.etree.ElementTree as etree from xml.etree import ElementTree class Plos(Api): def __init__(self): self.standard = 'http://api.plos.org/search?q=' def create_url_search(self, parameters): """Creates the search url, combining the standard url and various ...
import contextlib import logging import time import psycopg2 import psycopg2.extras as extras import psycopg2.pool as pool import config import queries connection_pool = pool.ThreadedConnectionPool(config.MINCONN, config.MAXCONN, database=config.DB['DB'], user=config.DB['USER'], password=config.DB['PASSWORD']) @con...
# coding=utf-8 ''' Created on 2016. 8. 14. @author: Jay ''' from cppy.adaptor import CpRqRpClass import win32com.client @CpRqRpClass('CpTrade.CpTd0311') class StockOrderCash(object): ''' 장내주식/코스닥주식/ELW 주문(현금주문) 데이터를 요청하고 수신한다. ''' def __init__(self): self.instCpTdUtil = win32c...
"""API calls against letsfreckle.com""" from django.conf import settings from django.utils.translation import ugettext_lazy as _ try: from freckle_client.client import FreckleClientV2 client = FreckleClientV2(settings.ACCOUNT_KEEPING_FRECKLE_ACCESS_TOKEN) except ImportError: # pragma: nocover client = Non...
# # Copyright (c) 2014 Chris Jerdonek. All rights reserved. # # 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, modi...
# -*- coding: UTF-8 -*- """Setuptools package definition""" from setuptools import setup from setuptools import find_packages import codecs import os import sys version = sys.version_info[0] if version > 2: pass else: pass __version__ = None version_file = "autodocs/version.py" with codecs.open(version_fi...
''' @author: davandev ''' # coding: utf-8 import logging import os import traceback import sys import urllib import json import davan.util.helper_functions as helper import davan.config.config_creator as configuration import davan.util.constants as constants from davan.util import cmd_executor as cmd_e...
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
# Copyright 2016-2021 Peppy Player peppy.player@gmail.com # # This file is part of Peppy Player. # # Peppy 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 version 3 of the License, or # (at you...
from __future__ import unicode_literals import copy import sys from functools import update_wrapper import warnings from django.apps import apps from django.apps.config import MODELS_MODULE_NAME from django.conf import settings from django.core import checks from django.core.exceptions import (ObjectDoesNotExist, ...
#!/usr/bin/python import numpy as np import numpy.random as rnd import sys import matplotlib matplotlib.use('TkAgg') from matplotlib import pyplot as plt from numpy import pi poligono_p = lambda n,rot: [(1,i*2*np.pi/n+rot) for i in range(1,n+1)] pol2cart = lambda ro,te: (ro*np.cos(te),ro*np.sin(te)) poligono_...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, 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...
"""This module displays the Life 'grid'.""" import numpy class DisplayClass(object): # pylint: disable=R0903 """This class displays the Life 'grid'. No OpenGL or Matplotlib UI is used since this program is being executed in a Docker container. The 'curses' Python package is also not used since it also has...
""" Django settings for mozio project. Generated by 'django-admin startproject' using Django 1.9.7. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # B...
# Copyright 2012 - 2013 Zarafa B.V. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License, version 3, # as published by the Free Software Foundation with the following additional # term according to sec. 7: # # According to sec. 7 of the ...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.base.depr...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- class fuzzer(): vol = ["", ".", "\\", "/", "file:///", "C:/"] var = ["~", "$HOME"] win = ["%WINDIR%", "%SYSTEMROOT%", "%HOMEPATH%", "%PROGRAMFILES%"] smb = ["\\\\127.0.0.1\\"] web = ["http://127.0.0.1/"] # "http://hacking-printers.net/log.me" dir = ["..", "......
# 09/09/2016 # Joe Young import random from time import sleep count = 0 alist = [] randomc = 0 while randomc != 4: ran = random.randint(1, 100) alist.append(ran) randomc = randomc + 1 alist.sort() def question(): global alist global count number = 0 clist = le...
import logging from collections import OrderedDict from typing import Tuple from bokeh.io import output_notebook from bokeh.plotting import show from cave.html.html_builder import HTMLBuilder from cave.reader.runs_container import RunsContainer from cave.utils.exceptions import Deactivated class BaseAnalyzer(object...
#!/usr/bin/python # -*- coding: utf-8 -*- # Title: Call_Detail_Record # Description: Class for one # CDR # separately. # Date: 6/9/16 # Author: Jeffrey Zic class Call_Detail_Record: """ Call Detail Records contain metadata for phone calls.""" def __init__(self): self.bbx_cdr_id = ('', ) self....
#!/usr/bin/env python """ MultiQC module to parse output from biobambam2 """ from __future__ import print_function from collections import OrderedDict import logging from multiqc.modules.base_module import BaseMultiqcModule from multiqc.modules.picard import MarkDuplicates # Initialise the logger log = logging.getL...
# Copyright 2012 Nicira, 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 agr...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Pytest configuration.""" from __future__ import absolute_import, print_function ...
""" Implementation of the algorithm for calculating the matrix representation of a Fermionic operator/term in occupation number representation. """ import numpy as np from numba import jit, int64, uint64 from scipy.sparse import csr_matrix from HamiltonianPy.quantumoperator.constant import CREATION __all__ = [ ...
"""Base class for a job.""" import os import socket from ndscheduler.corescheduler import utils class JobBase: def __init__(self, job_id, execution_id): self.job_id = job_id self.execution_id = execution_id @classmethod def create_test_instance(cls): """Creates an instance of t...
"""SCons.Tool.c++ Tool-specific initialization for generic Posix C++ compilers. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2019 The SCons Foundation # # Permission is hereby gran...
from ..remote import RemoteModel class DeviceGroupDefnRemote(RemoteModel): """ The device group criteria definitions. This is distinct from the evaluated device groups captured in the DeviceGroup API. One Device Group Definition may result in several Device Groups, one within each defined Network. | ``...
# encoding: utf-8 import collections import datetime from itertools import count import re import mimetypes import ckan.lib.navl.dictization_functions as df import ckan.logic as logic import ckan.lib.helpers as h from ckan.model import (MAX_TAG_LENGTH, MIN_TAG_LENGTH, PACKAGE_NAME_MIN_LENGTH, ...
# Design sweep class for gem5. import os from xenon.base.designsweeptypes import ExhaustiveSweep from benchmarks import params from generators import * class Gem5DesignSweep(ExhaustiveSweep): sweepable_params = [ # gem5 needs to know this to determine whether a cache should be attached # to the accele...
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
import unittest class IntervalTestCase( unittest.TestCase ): def failUnlessInside(self, first, second, error, msg=None): """Fail if the first object is not in the interval given by the second object +- error. """ if (first > second + error) or (first < second - error): raise sel...
import numpy as np from tools import Logger, Participant import thesis as T path = '/Users/Kerz/Documents/projects/SleepSight/ANALYSIS/data/' plot_path = '/Users/Kerz/Documents/projects/SleepSight/ANALYSIS/plots/' log_path = '/Users/Kerz/Documents/projects/SleepSight/ANALYSIS/logs/' options = {'periodicity': False,...
""" THEbot, a Texas Hold'em poker software library. Copyright (C) 2011 Scott Stafford 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 you...
#!/usr/bin/env python # -*- coding: utf-8 -*- import optparse import os import sys from pulp.devel import environment WARNING_COLOR = '\033[31m' WARNING_RESET = '\033[0m' DIRS = ('/var/lib/pulp/published/docker/web',) # # Str entry assumes same src and dst relative path. # Tuple entry is explicit (src, dst) # # P...
from django_productline.context import PRODUCT_CONTEXT def _override(new, orig): ''' to override original, use a new value that is not None. to use the original value, set the new value to None. => it is possible to override the original value with an empty string! ''' if new is not None: ...
# Copyright 2021 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, ...
import argparse import os import sys import tempfile from cli import ensure_node_running, ensure_node_has_api, CLIArgsException from cli.mmt.engine import EngineNode, Engine from cli.mmt.fileformats import XLIFFFileFormat from cli.mmt.translation import ModernMTTranslate, EchoTranslate, ModernMTEnterpriseTranslate c...
from __future__ import print_function, absolute_import, division from future import standard_library standard_library.install_aliases() from future.builtins import * # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
# -*- coding:utf-8 -*- #!/usr/bin/env python __author__ = 'Leo' import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web from tornado.options import define, options from game.game_server import GameApplication define("port", default=8000, type=int, metavar="SERVER PORT", help="Run...
import io import json import csv from pprint import pprint from unittest import skip from datetime import datetime from decimal import Decimal from ..uploadable import Exclude from ..upload_result import Uploaded, UploadResult, Matched, FailedBusinessRule, ReportInfo, TreeInfo from ..upload_table import UploadTable, ...
#!/usr/bin/env python # make-index.py - read EEBO TEI files and output word frequencies as well as a "book" # Eric Lease Morgan <emorgan@nd.edu> # June 8, 2015 - first investigations; bases on HathiTrust work # configure STOPWORDS = './etc/stopwords-en.txt' # require import operator import re import sys import lib...
import pytest from learn.models import Task, ProblemSet, Domain from learn.models import Student, TaskSession, Skill from learn.recommendation import get_recommendation, select_task def create_domain(): # TODO: Allow to set domain briefly, sth. like: # create_domain('m1(p1(t1, t2, t3), p2(t4, t5))'). ...
import nuke import nukescripts import os from xml.dom import minidom from xml.dom.minidom import Document from xml.etree import ElementTree as ET import getpass import re import ftplib from ftplib import FTP import uuid import os2emxpath as path import subprocess as sp import logging pypePath = os.envir...
import sys from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest from com.l2scoria.gameserver.datatables import SkillTable from com.l2scoria.util.random import Rnd qn = "8009_HotSprin...
# classes and combos from rotation import Rotation from conqueror.combos import * from conqueror.abilities import * from guardian.combos import * from guardian.abilities import * ## Guardian Aggro Rotation def Guardian_Aggro(): guard_aggro = Rotation() guard_aggro.repeat = False guard_aggro.repeat_count =...
from copy import copy, deepcopy import shutil import subprocess import sys import tempfile import functools from visidata import VisiData, vd, asyncthread, option, options from visidata import Sheet, saveSheets, Path, Column option('clipboard_copy_cmd', '', 'command to copy stdin to system clipboard', sheettype=None)...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- from __future__ import print_function from __future__ import division from time import clock 'Python to write faster function!' __author__ = 'JoshuaMK1992' exec_times = 10000 orignal_str = 'python faster method test : slowest_replace slow_replace fast_replace fastes...
"""This module defines the left navigation and its buttons.""" import flask from google.appengine.api import users class Navigation(object): """The Navigation returns information to render the nav menu buttons.""" def __init__(self, app): self.app = app def render(self): """Returns a json map of the...
# Generated by Django 2.2.10 on 2020-06-22 04:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('observations', '0020_auto_20200622_1045'), ] operations = [ migrations.AddField( model_name='encounter', name='loca...
import sys import os.path from PIL import Image import numpy as np from arg_parser import parse_args from printer import print_header, print_usage, print_line def init_images(app_data): print("[init.py] : initializing images...") app_args = app_data['app_args'] # input image: img_path = app_args.im...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test createwallet arguments. """ from test_framework.test_framework import BitcoinTestFramework from test_f...
#!/usr/bin/python3 # Library for calculating location of the sun # Copyright Brandon Stafford # # This file is part of Pysolar. # # Pysolar 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; e...
import os def getIndirectCalls(filename='beanstalkd.out', verbose=False): if verbose: print "getindirectCalls :: Reading file :", filename f = open(filename, 'r') contents = f.read() f.close() indirectCalls = contents.count('========') contents = contents.split('\n') count = 0 ...
"""Experiments to get the route of the olympic torch around the UK in 2012""" import json import pprint import urllib import urllib2 events_url = "http://mappingdata.london2012.com/torchevents/byarea" params = {'datasetId': 'TorchRoute-59da3655-1856-4244-b225-38b8420421db', 'top': '61.53228', 'le...
from setuptools import setup, find_packages import taggit with open('README.rst') as f: readme = f.read() setup( name='django-taggit', version='.'.join(str(i) for i in taggit.VERSION[:3]) + (("+" + taggit.VERSION[3]) if len(taggit.VERSION) > 3 else ""), description='django-taggit is a reusable Djang...
import os import ConfigParser import option import utility import grapeGit as git import grapeConfig #option that installs wrapper calls to grape as git hooks in this repo. class InstallHooks(option.Option): """ grape installHooks Installs callbacks to grape in .git/hooks, allowing grape-configurable hooks t...
import numpy as np from random import shuffle def softmax_loss_naive(W, X, y, reg): """ Softmax loss function, naive implementation (with loops) Inputs have dimension D, there are C classes, and we operate on minibatches of N examples. Inputs: - W: A numpy array of shape (D, C) containing weights. - X:...
# -*- coding: utf-8 -*- """ Created on Mon Aug 31 10:00:32 2015 @author: mje """ import mne from mne.minimum_norm import (make_inverse_operator, apply_inverse, write_inverse_operator) import socket import numpy as np import matplotlib.pyplot as plt # Setup paths and prepare raw data host...
# -*- 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...
''' Created on 28 Aug 2015 @author: oche ''' import shlex import subprocess import os import sys import time import traceback from subprocess import PIPE import psutil import logging import database.vEQ_database as DB from psutil import NoSuchProcess class GenericPlayback(object): ''' ''' def __init__...
import logging from datetime import date, datetime, timedelta from dateutil import parser from dateutil.rrule import DAILY, rrule from src.utils.google_api import get_service CALENDAR_ID = "ja.japanese#holiday@group.v.calendar.google.com" # 日本の祝日を入れておくセット holiday_set = set() # 年末年始休暇の開始日と終了日 START = date(2016, 12,...
# -*- coding: utf-8 -*- """ Use nose `$ pip install nose` `$ nosetests` """ from textwrap import dedent from hyde.generator import Generator from hyde.site import Site from fswrap import File TEST_SITE = File(__file__).parent.parent.child_folder('_test') class TestPaginator(object): def setUp(self): TE...
from __future__ import print_function, division import imgaug as ia from imgaug import augmenters as iaa from imgaug import parameters as iap from scipy import misc import numpy as np from skimage import data import cv2 def main(): nb_rows = 8 nb_cols = 8 h, w = (128, 128) sample_size = 128 noise_...
#!/usr/bin/python # -*- coding: "utf-8"-*- import requests import os import json import time import re import sys import csv_maker import pick_best_data class Master(object): def __init__(self): time_id = str(time.strftime("%m%Y")) api_dic = self.load_apis() self.scanner = RankMyLibrary(ti...
from django.contrib.auth.models import User, Permission from django.core.exceptions import ValidationError from django.core.files.uploadedfile import SimpleUploadedFile from django.http import HttpRequest, QueryDict from django.test import TestCase from django.test.client import Client from dali.gallery.admin.forms imp...
# # This file is part of CasADi. # # CasADi -- A symbolic framework for dynamic optimization. # Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl, # K.U. Leuven. All rights reserved. # Copyright (C) 2011-2014 Greg Horn # # CasADi is free software; you can...