text
stringlengths
17
737k
# -*- coding: utf-8 -*- # # django-codenerix # # Copyright 2017 Centrologic Computational Logistic Center S.L. # # Project URL : http://www.codenerix.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 ...
''' Created on Oct 5, 2010 Refactored from ModelObject on Jun 11, 2011 @author: Mark V Systems Limited (c) Copyright 2010 Mark V Systems Limited, All rights reserved. ''' from collections import defaultdict from lxml import etree from arelle import (XmlUtil, XbrlConst, XbrlUtil, UrlUtil, Locale, ModelValue) from arell...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module defines base classes for all models. The base class of all models is `~astropy.modeling.Model`. `~astropy.modeling.FittableModel` is the base class for all fittable models. Fittable models can be linear or nonlinear in a regression analys...
"""Auto reject.""" # Authors: Mainak Jas <mainak.jas@telecom-paristech.fr> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> import numpy as np import mne from sklearn.base import BaseEstimator from sklearn.grid_search import RandomizedSearchCV from sklearn.cross_validation import KFold from ...
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consi...
# -*- coding: utf-8 -*- # mcmc.py # MIT License # Copyright (c) 2017 Rene Jean Corneille # 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 ...
#!/usr/bin/env python # # Copyright 2016 BMC Software, 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 applicab...
""" The command line interfact to the Twitter v2 API. """ import os import re import json import twarc import click import logging import pathlib import datetime import requests import configobj import threading from click_plugins import with_plugins from pkg_resources import iter_entry_points from twarc.version imp...
""" Some helpful tools. """ import re # Regex from https://gist.github.com/andialbrecht/917126 P_PYLINT_ERROR = re.compile(r"^(?P<file>.+?):(?P<line>[0-9]+):\ \[(?P<type>" "[a-z])(?P<errno>\d+) (,\ (?P<hint>.+))?\]\ (?P<msg>.*)", re.IGNORECASE|re.VERBOSE) def parsePyLintWarnings(warnings): """ Turns...
#!/usr/bin/env python import numpy as np from scipy.sparse import diags class CalibrationObject(object): def __init__(self,mags,errs): '''CalibrationObject(mags,errs) An object (star or galaxy) with multiple observations that can be used for relative photometric calibration. The object is defined ...
#!/usr/bin/env python """ @package mi.dataset.parser.test.test_rte_xx__stc @file marine-integrations/mi/dataset/parser/test/test_rte_xx__stc.py @author Jeff Roy @brief Test code for a Rte_xx__stc data parser """ import time import copy import re import ntplib from nose.plugins.attrib import attr from StringIO import...
################################################################################ # Skylark macros ################################################################################ is_bazel = not hasattr(native, "genmpm") def portable_select(select_dict, bazel_condition, default_condition): """Replaces select() wit...
from __future__ import print_function import re from fortls.objects import get_paren_substring, map_keywords, fortran_module, \ fortran_program, fortran_submodule, fortran_subroutine, fortran_function, \ fortran_block, fortran_select, fortran_type, fortran_enum, fortran_int, \ fortran_var, fortran_meth, for...
from rigor.database import transactional, RowMapper, uuid_transform, polygon_transform, polygon_tuple_adapter import uuid from datetime import datetime, timedelta import psycopg2 def resolution_transform(value, column_name, row): if value is None: return None return (row['x_resolution'], row['y_resolution']) ima...
import datetime from django import forms from django.contrib import admin from django.contrib.admin.util import unquote from django.contrib.admin.views.main import ChangeList from django.contrib.auth.decorators import permission_required from django.core.exceptions import ValidationError, PermissionDenied from django....
from collections import OrderedDict from lammps import PyLammps class lmp_controler(object): """Initialize and control a lammps instance""" def __init__(self, previous_instance=''): if isinstance(previous_instance, PyLammps): self.lmp_instance = previous_instance elif previous_ins...
#!/usr/bin/python -u # # Python Bindings for LZMA # # Copyright (c) 2004-2015 by Joachim Bauch, mail@joachim-bauch.de # 7-Zip Copyright (C) 1999-2010 Igor Pavlov # LZMA SDK Copyright (C) 1999-2010 Igor Pavlov # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser...
"""Stack tracer for multi-threaded applications. Usage: import stacktracer stacktracer.start_trace("trace.html",interval=5,auto=True) # Set auto flag to always update file! .... stacktracer.stop_trace() """ # Source: http://code.activestate.com/recipes/577334-how-to-debug-deadlocked-multi-threaded-programs/ from d...
"""Leetcode 72. Edit Distance Hard URL: https://leetcode.com/problems/edit-distance/ Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations permitted on a word: - Insert a character - Delete a character - Replace a character Ex...
from celery import task from decorators import memoize_query, query from mixpanel.mixpanel import EventTracker import logging from celery.task import periodic_task from modules import common from django.conf import settings import sys import io from dateutil import parser log=logging.getLogger(__name__) log.error(set...
from copy import copy import re import simplejson as json import sys import time from sqlalchemy import Table, Column, Integer, Text, String, MetaData, \ CheckConstraint, create_engine, select, BigInteger from sqlalchemy.exc import SQLAlchemyError from auslib.blob import ReleaseBlobV1 import logging def rowsToDic...
import socket import time import select class SockPool(object): def __init__(self, timeout=0.25): import async # breaks circular dependency self.timeout = timeout self.free_socks_by_addr = {} self.sock_idle_times = {} self.killsock = async.killsock def acquire(self, a...
# coding: utf-8 """ PyUploadcare: a Python library for Uploadcare Usage example:: >>> import pyuploadcare >>> pyuploadcare.conf.pub_key = 'demopublickey' >>> pyuploadcare.conf.secret = 'demoprivatekey' >>> file_ = pyuploadcare.File('6c5e9526-b0fe-4739-8975-72e8d5ee6342') >>> file_.cdn_url http...
from django.conf.urls import url from api.collections import views from website import settings urlpatterns = [] # Routes only active in local/staging environments if settings.DEV_MODE: urlpatterns.extend([ url(r'^$', views.CollectionList.as_view(), name='collection-list'), url(r'^(?P<node_id>\w+...
import os import json from apiclient import discovery import oauth2client from oauth2client import client from oauth2client import tools try: import argparse flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args() except ImportError: flags = None SCOPES = 'https://www.googleapis.com/auth/...
#!/usr/bin/env python import requests, json, sys, time, re from pprint import pprint from datetime import datetime import autofocus_config AF_APIKEY = autofocus_config.AF_APIKEY # Useful information: # # * We're not doing any input validation in the client itself. We pass # the data to the API, and rely on 4XX erro...
from ggame import App, Sprite, ImageAsset class Stars(Sprite): starasset = ImageAsset("starfield.jpg") def __init__(self, position): super().__init__(Stars.starasset, position) class Spacewar(App): def __init__(self, width, height): super().__init__(width, height) s...
import re import random import os import logging import struct import shlex from textwrap import dedent from collections import OrderedDict from functools import partial import subprocess as sp from qnet.algebra.hilbert_space_algebra import TrivialSpace, BasisNotSetError from qnet.algebra.circuit_algebra import ( ...
from lxml import objectify import qualysapi.api_objects from qualysapi.api_objects import * class QGActions(object): def getHost(host): call = '/api/2.0/fo/asset/host/' parameters = {'action': 'list', 'ips': host, 'details': 'All'} hostData = objectify.fromstring(self.request(call, parame...
#!/usr/bin/env python import os import sys import time from collections import defaultdict from Bio.Application import _Option, AbstractCommandline, _Switch from Bio.Blast.Applications import NcbiblastnCommandline from multiprocessing import Pool __author__ = 'mike knowles' __doc__ = 'The purpose of this set of module...
#!/usr/bin/python import os import MySQLdb import cmd import os.path as p import sys try: import readline except ImporError: pass db = MySQLdb.connect(host="localhost", user="root", passwd="fella", db="testdb") class Console(cmd.Cmd): histfi...
# -*- coding: utf-8 -*- import cerberus from cerberus.tests import assert_fail, assert_success from cerberus.tests.conftest import sample_schema def test_contextual_data_preservation(): class InheritedValidator(cerberus.Validator): def __init__(self, *args, **kwargs): if 'working_dir' in kwa...
#encoding: utf-8 import sys from twython import Twython, TwythonError from pymongo import MongoClient, DESCENDING from pymongo.errors import OperationFailure import bson from bson import ObjectId from bson.json_util import dumps from flask import Flask, render_template, request, Blueprint, redirect, url_for, session fr...
from datetime import datetime from glob import glob from urllib import quote import feedparser import logging import traceback from django.conf import settings from django.utils.translation import ngettext from sqlalchemy import select, desc, func, eagerload from channelguide.db import DBObject, dbutil from channelgu...
#Programmer: Chris Tralie #Purpose: To generate series of sparse complexes for different test point cloud and #to call Rann's pipeline to compute persistence diagrams. Report diagrams, timings, #and interleaving distances, as computed by wrapping around Dionysus's bottleneck #distance binary import subprocess import o...
import os import tarfile import tempfile import shutil from collections import namedtuple, OrderedDict import h5py import numpy from scipy.io import loadmat from six.moves import range from PIL import Image from fuel.converters.base import fill_hdf5_file, check_exists, progress_bar from fuel.datasets import H5PYDatas...
""" CAS module for bottle History : Original module for Cherrypy developped by : James Macdonell and Marc Santoro Bottle Adaptation : SnarkTurne 2013-07-16 : Converted to a real bottle plugin 2013-07-08 : Added redirection to the requested URL (steps 1 & 2 in CASAuth) 2013-07-03 : Bottle decorator 2013-0...
# -*- coding: utf-8 -*- ''' Support for Apache Please note: The functions in here are generic functions designed to work with all implementations of Apache. Debian-specific functions have been moved into deb_apache.py, but will still load under the ``apache`` namespace when a Debian-based system is detected. ''' # Py...
''' Support for Portage :optdepends: - portage Python adapter For now all package names *MUST* include the package category, i.e. ``'vim'`` will not work, ``'app-editors/vim'`` will. ''' # Import python libs import copy import logging import re # Import salt libs import salt.utils log = logging.getLogger(__name...
""" GeoNames city data import script. Requires the following files: http://download.geonames.org/export/dump/ - Countries: countryInfo.txt - Regions: admin1CodesASCII.txt - Subregions: admin2Codes.txt - Cities: cities5000.zip - Districts: hierarchy.zip - Local...
# -*- coding: utf-8 -*- ''' Interface to SMBIOS/DMI (Parsing through dmidecode) External References ------------------- | `Desktop Management Interface (DMI) <http://www.dmtf.org/standards/dmi>`_ | `System Management BIOS <http://www.dmtf.org/standards/smbios>`_ | `DMIdecode <http://www.nongnu.org/dmidecode/>`_ ''' ...
# -*- coding: utf-8 -*- ''' Support for YUM/DNF .. important:: If you feel that Salt should be using this module to manage packages on a minion, and it is using a different module (or gives an error similar to *'pkg.install' is not available*), see :ref:`here <module-provider-override>`. .. note:: ...
# -*- coding: utf-8 -*- ''' Package support for openSUSE via the zypper package manager :depends: - ``rpm`` Python module. Install with ``zypper install rpm-python`` .. important:: If you feel that Salt should be using this module to manage packages on a minion, and it is using a different module (or gives a...
# -*- coding: utf-8 -*- ''' Management of Mongodb users and databases ========================================= .. note:: This module requires PyMongo to be installed. ''' # Define the module's virtual name __virtualname__ = 'mongodb' def __virtual__(): if 'mongodb.user_exists' not in __salt__: retu...
# -*- coding: utf-8 -*- ''' Some of the utils used by salt ''' from __future__ import absolute_import # Import python libs import contextlib import copy import collections import datetime import distutils.version # pylint: disable=E0611 import fnmatch import hashlib import imp import inspect import json import loggin...
#!/usr/bin/python # -*- coding: utf-8 -*- """ The MIT License Copyright (c) 2011 Olle Johansson 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 ...
# Copyright (c) 2019 Cloudify Platform Ltd. 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 ap...
#!/usr/bin/env python # Copyright 2017 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. # This is intended to be a very trimmed down, single-file, hackable, and easy # to understand version of Telemetry. It's able to run si...
#!/usr/bin/env python ### # Copyright (c) 2002, Jeremiah Fincher # 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, # ...
#__BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance ...
#!/usr/bin/python # # Copyright (c) 2011 rPath, Inc. # # All rights reserved. # from django.db.models import Q from django.db.models.query import EmptyQuerySet from django.db import connection, transaction from mint.django_rest import timeutils from mint.django_rest.rbuilder import modellib from mint.django_rest.rbui...
from __future__ import absolute_import import copy import traceback import typing as tp # NOQA import warnings import weakref import numpy import chainer from chainer import _backprop from chainer import backend from chainer.backends import _cpu from chainer.backends import cuda from chainer.backends import intel64 ...
#!/usr/bin/env python __author__ = "Gao Wang" __copyright__ = "Copyright 2016, Stephens lab" __email__ = "gaow@uchicago.edu" __license__ = "MIT" ''' This file defines methods to translate DSC into pipeline in SoS language ''' import os, sys, msgpack, glob from xxhash import xxh32 as xxh from sos.targets import fileMD5,...
# This file is part of fedmsg. # Copyright (C) 2012 - 2014 Red Hat, Inc. # # fedmsg 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 (at your option) any later ver...
from __future__ import absolute_import, division, print_function import os import os.path import re from subprocess import Popen, PIPE from changes.constants import PROJECT_ROOT from changes.db.utils import create_or_update, get_or_create, try_create from changes.models import Author, Revision, Source class Command...
from flyingpigeon import visualisation as vs from pywps.Process import WPSProcess class plottimeseriesProcess(WPSProcess): def __init__(self): # definition of this process WPSProcess.__init__(self, identifier = "plot_timeseries", title="Plots -- timeseries", ver...
"""Given a reddit submission id, shows the top 5 comments from the 200 newest comments. Pressing return shows a new set of comments, without repeating any comments shown before. """ import praw, time, os, sys sub_id = sys.argv[1] user_agent = ("Game comment scraper 1.0 by /u/NosajReddit" "https://github.com/NosajGith...
import pytest from pywps import Service from pywps.tests import assert_response_success from flyingpigeon.processes import SpatialAnalogProcess from flyingpigeon.utils import local_path from flyingpigeon.tests.common import TESTDATA, client_for import numpy as np import datetime as dt from shapely.geometry import Po...
import logging from common.util import load_yaml from runners.models import Runner from games.models import DEFAULT_INSTALLER LOGGER = logging.getLogger(__name__) SUCCESS = (True, "") def get_installer_script(installer): script = load_yaml(installer.content) if not script: return {} if not isinst...
import io import zipfile from xml.parsers.expat import ExpatError from ciso8601 import parse_datetime import xmltodict from django.utils import timezone from asgiref.sync import async_to_sync from channels.layers import get_channel_layer from channels.exceptions import ChannelFull from django.contrib.gis.geos import Po...
from __future__ import unicode_literals import collections import logging import pytz import re from django.db import transaction from django.db.models import Q from django.utils import timezone from django.utils.translation import ugettext, ugettext_lazy as _ from rest_framework import serializers from rest_framewor...
import logging logger = logging.getLogger("registry_log") class DataSource(object): def __init__(self, context): self.context = context def values(self): return [] class PatientCentres(DataSource): """ centres = working groups We default to working groups if metadata on the regis...
from django.core.management.base import BaseCommand, CommandError from voty.initproc.models import Initiative, Issue from voty.initproc.globals import STATES, NOTIFICATIONS from django.template.loader import render_to_string from django.core.mail import EmailMessage from django.db.models import Count from django.conf i...
from django.contrib.auth.models import User #to get auth_user table from .models import user as csv2_user ''' UTILITY FUNCTIONS ''' # Returns the current authorized user from metadata def getAuthUser(request): return request.META.get('REMOTE_USER') # returns the csv2 user object matching the authorized user from...
"""Builder for Grade Reports.""" import os import shutil import subprocess from glob import glob from itertools import groupby from jinja2 import Environment, FileSystemLoader try: from bibtexparser.bwriter import BibTexWriter from bibtexparser.bibdatabase import BibDatabase HAVE_BIBTEX_PARSER = True excep...
import time import datetime from pprint import pprint from django.db import models from fo2.models import rows_to_dict_list_lower, GradeQtd def posicao_estoque( cursor, nivel, ref, tam, cor, deposito='999', zerados=True, group='', tipo='t', modelo=None): filtro_nivel = '' if nivel is not Non...
from invenio.config import weburl websubmitadmin_weburl = "%s/admin/websubmit/websubmitadmin.py" % (weburl,) class InvenioWebSubmitAdminWarningDeleteFailed(Exception): pass class InvenioWebSubmitAdminWarningInsertFailed(Exception): pass class InvenioWebSubmitAdminWarningTooManyRows(Exception): pass cl...
# Copyright 2014, Big Switch Networks # 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 requ...
import os.path import struct from dataclasses import dataclass # ImportError? Upgrade to Python 3.7 or pip install dataclasses class Consumable: """Like a bytes/str object but can be consumed a few bytes/chars at a time""" def __init__(self, data): self.data = data self.eaten = 0 self.left = len(data) def get...
#!/usr/bin/env python # BSD 3-Clause License; see https://github.com/scikit-hep/uproot/blob/master/LICENSE from __future__ import absolute_import import re __version__ = "3.10.2" version = __version__ version_info = tuple(re.split(r"[-\.]", __version__)) del re
import webbrowser from bibliopixel.drivers.SimPixel import DriverSimPixel from bibliopixel import LEDMatrix SIMPIXEL_URL = 'http://beta.simpixel.io' IMPORT_ERROR_TEXT = """ Please install the BiblioPixelAnimations library from here: https://github.com/ManiacalLabs/BiblioPixelAnimations """ def run(args): try:...
## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio 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,...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Leonardo Pistone # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
## # This module implements the client-side of the Geni API. Stubs are provided # that convert the supplied parameters to the necessary format and send them # via XMLRPC to a Geni Server. # # TODO: Investigate ways to combine this with existing PLC API? ## import xmlrpclib from gid import * from credential import * f...
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
#################################################################################################### # @file command.py # @package # @author # @date 2008/10/29 # @version 0.1 # # @mainpage # #################################################################################################### import time import logging ...
#!/usr/bin/env python2.7 """ vg_mapeval.py: Compare alignment positions from gam or bam to a truth set that was created with vg sim --gam """ from __future__ import print_function import argparse, sys, os, os.path, errno, random, subprocess, shutil, itertools, glob, tarfile import doctest, re, json, collections, time,...
def join(str): return str[0]+' ' +str[1]+' ' +str[2] strings = ['I', 'love', 'python !'] result = join(strings) print(result)
# Copyright 2016 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...
# -*- coding: utf-8 - import os from munch import munchify, Munch, fromYAML from json import load from iso8601 import parse_date from robot.output import LOGGER from robot.output.loggerhelper import Message from robot.libraries.BuiltIn import BuiltIn from robot.errors import HandlerExecutionFailed from datetime import ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2014, GEM Foundation. # # OpenQuake 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 Lice...
# coding=utf-8 # Copyright (c) 2010-2014, GEM Foundation. # # OpenQuake Risklib 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 tycho import * from tycho import stellar_systems from amuse import * import numpy as np import matplotlib.pyplot as plt from amuse.units import units import hashlib from amuse.community.secularmultiple.interface import SecularMultiple from amuse.datamodel.trees import BinaryTreesOnAParticleSet from amuse.ext.orb...
from flask import request, abort from lib import get_time, ARCHIVE_PERIOD, PING_PERIOD from lib.messages import send_message def ping(redis, chat, session, chat_type): online_state = get_online_state(redis, chat, session.session_id) if online_state=='offline': # Don't let the user in if there are more ...
# -*- coding: utf-8 -*- # accdb - account database using human-editable flat files as storage from __future__ import print_function import os import re import subprocess import sys import time import uuid from collections import OrderedDict from io import TextIOWrapper from nullroute.core import Core from .changeset ...
from math import exp from numpy import asarray, atleast_2d, dot, log, maximum, sum as npsum, zeros from numpy.linalg import inv, lstsq, multi_dot, slogdet from optimix import Function, Scalar from glimix_core._util import cache, log2pi from .._util import SVD, economic_qs_zeros, numbers from ._lmm_scan import FastSc...
""" Copyright [2009-2017] EMBL-European Bioinformatics Institute 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 a...
import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns from wordcloud import WordCloud mpl.rc('savefig', dpi=200) def wcloud(wf, color, save_as=None): """Create a word cloud based on word frequencies, `wf`, using a color function from `wc_colors.py` Parameters ---------- ...
from __future__ import absolute_import __author__ = 'maartenbreddels' import tornado.ioloop import tornado.web import tornado.httpserver import tornado.websocket import tornado.auth import tornado.gen import threading import logging import vaex as vx import vaex.utils import json import inspect import yaml import argp...
# Copyright © 2013-2018 Jakub Wilk <jwilk@jwilk.net> # # 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, modify, mer...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import try: import cdecimal as decimal except ImportError: import decimal import csv import logging import multiprocessing import psutil import Queue import random import threading import time from PyQt4 import QtCore, QtGui from...
# 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...
import six import hashlib import os import errno import re import codecs import csv from shutil import rmtree from django.contrib.auth.models import User from config import settings from core.db.connection import DataHubConnection from core.db.errors import PermissionDenied from inventory.models import App, Card, Col...
#!/usr/bin/env python # Copyright (C) 2006-2021 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 Afextentro General Public License as published by the Free # Software Foundation (FSF...
from googlevoice import settings from googlevoice.util import * class Voice(object): """ Main voice instance for interacting with the Google Voice service Also contains callable methods for each folder (eg inbox,voicemail,sms,etc) """ def __init__(self): install_opener(build_opener...
"""Defines SolutionArray class""" import sys import re import json import difflib from operator import sub import warnings as pywarnings import pickle import gzip import pickletools from collections import defaultdict import numpy as np from .nomials import NomialArray from .small_classes import DictOfLists, Strings, S...
import os if os.name=='nt': os.putenv('PYTHONIOENCODING', 'UTF-8') # "sys" already imported _v = sys.version_info print("Python %d.%d.%d" % (_v[0], _v[1], _v[2]) ) # can comment this, it's to test API in console from cudatext import * # suggest to install plugins for popular langs if not os.path.exists(os.path.j...
from .. import _from_install_import import subprocess import sys import pytest import cupy setup = _from_install_import('universal_pkg.setup') @pytest.mark.skipif( cupy.cuda.runtime.is_hip or cupy.cuda.driver._is_cuda_python(), reason='for CUDA') def test_get_cuda_version(): assert setup._get_cuda_ver...
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google 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. # ...
from django.contrib import admin from .models import ( Event, Weekday, Course, Meal, Timetable, Dish, MenuItem, Vendor, VendorService, Serving, TimetableManagement ) @admin.register(Weekday) class DefaultAdmin(admin.ModelAdmin): """Default admin for models with just name and slug fields.""" readonly...