text stringlengths 12 6.59M |
|---|
# -*- coding: utf-8 -*-
""" License
Copyright (C) 2013 YunoHost
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any l... |
# -*- coding: utf-8 -*-
'''
Support for Linux LVM2
'''
from __future__ import absolute_import
# Import python libs
import os.path
# Import salt libs
import salt.utils
import salt.ext.six as six
from salt.exceptions import CommandExecutionError
# Define the module's virtual name
__virtualname__ = 'lvm'
def __virtua... |
from corehq.apps.api.es import CaseES
from corehq.apps.commtrack.psi_hacks import is_psi_domain
from corehq.apps.reports.commtrack.data_sources import StockStatusDataSource, ReportingStatusDataSource
from corehq.apps.reports.generic import GenericTabularReport
from corehq.apps.reports.datatables import DataTablesHeader... |
"""This module provides an abstract base class for invocation plugins"""
from abc import abstractmethod, ABCMeta
class BasePlugin(object):
"""
Abstract base class for invocation plugins.
Plugin developers can either derive their objects directly from this class
or from :class:`orges.plugins.dummy.D... |
from clib.links.model.yolo import Darknet19, Darknet19Predictor
from clib.links.model.yolo import YOLOv2, YOLOv2Predictor
|
# -*- coding: utf-8 -*-
'''
Support for Linux LVM2
'''
from __future__ import absolute_import
# Import python libs
import os.path
# Import salt libs
import salt.utils
import salt.ext.six as six
from salt.exceptions import CommandExecutionError
# Define the module's virtual name
__virtualname__ = 'lvm'
def __virtua... |
from __future__ import absolute_import
import base64
import datetime
import hashlib
import logging
import time
from copy import copy
from corehq.util.couch_helpers import CouchAttachmentsBuilder
from dimagi.utils.parsing import json_format_datetime
from jsonobject.api import re_date
from jsonobject.base import Default... |
"""
byceps.services.shop.order.models.order.order
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from collections import namedtuple
from datetime import datetime
from decimal import Decimal
from enum import Enum
from typing... |
from __future__ import print_function
import sys
import os
import scipy
from sklearn import datasets
from sklearn.preprocessing import StandardScaler
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
# Import helper functions
from mlfromscratch.utils.data_operation import calcu... |
# -*- coding: utf-8 -*-
'''
Module for getting information about syslog-ng
:maintainer: Tibor Benke <btibi@sch.bme.hu>
:maturity: new
:depends: cmd
:platform: all
This module is capable of managing syslog-ng instances which were installed
via a package manager or from source. Users can use a direct... |
from __future__ import absolute_import
import base64
import datetime
import hashlib
import logging
import time
import uuid
from django.db import models
from couchdbkit import ResourceNotFound
from couchdbkit.exceptions import PreconditionFailed
from dimagi.ext.couchdbkit import *
from dimagi.utils.couch import Couch... |
from corrdb.common import logAccess, logStat, logTraffic, crossdomain
from corrdb.common.models import UserModel
from corrdb.common.models import ProfileModel
from corrdb.common.models import ProjectModel
from corrdb.common.models import ApplicationModel
from corrdb.common.models import EnvironmentModel
from corrdb.com... |
import sys
import traceback
from importlib import import_module
from django.conf import settings
from django.db.models import get_model as django_get_model
from django.utils import six as django_six
from oscar.core.exceptions import (ModuleNotFoundError, ClassNotFoundError,
AppNotFo... |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except i... |
#!/usr/bin/python3
# Read in SDM630 values and return SNMP
# Modify /etc/snmp/snmpd.conf
#pass .1.3.6.1.4.1.12345.1.1 /usr/bin/python3 /opt/sdm630/sdm630-snmp.py
import datetime
import os.path
import sys, getopt
import configparser
import argparse
__author__ = 'James Rudd'
DATA="/var/tmp/ACTsdm630.txt"
OidBase = "... |
import time
import logging
import requests
from bs4 import BeautifulSoup
from .heroes import heroes
class Overwatch:
def __init__(self, battletag=None, mode='qp', hero='all', filter='Best',
log_level=logging.ERROR, use_daquiri=False):
# Init logger
self.start_logging(log_level, da... |
# license see http://www.openvstorage.com/licenses/opensource/
"""
DataObject module
"""
import inspect
import uuid
import copy
from ovs.dal.exceptions import ObjectNotFoundException, ConcurrencyException
from ovs.dal.helpers import Descriptor, Toolbox
from ovs.dal.relations.relations import RelationMapper
from ovs.dal... |
#!/usr/bin/env python
import os
import time
import ADC0832
import redis
import boto3
import pygame
from pygame import mixer
#Set AWS details from enviroment varibles
#test = os.environ['MAIL']
#print test
aws_access_key_id = os.environ['AWS_ACCESS_KEY_ID'],
aws_secret_access_key = os.environ['AWS_SECRET_ACCESS_KEY'],
... |
import subprocess
import sys
import random
import re
# Print the name of a device to use, either 'cpu' or 'gpu0', 'gpu1',...
# GPUs with usage under the constant threshold will be chosen first,
# but subject to that constraint, selection is random.
#
# Warning: This is hacky and brittle, and can break if nvidia-smi ch... |
import logging
import json
import time
from . import StorageBase, StorageException
from sqlalchemy import (Column, Integer, String, Text, Float,
create_engine, MetaData, text)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
Base = declarative_bas... |
from __future__ import unicode_literals
import os
import re
from collections import OrderedDict
from itertools import cycle
import csv
from nameparser import HumanName
from clld.util import jsonload, slug
from clld.db.meta import DBSession
from clld.db.models.common import (
ValueSet, Value, Contribution, DomainE... |
from .base import PdoBase, Maps, Map, Variable
import logging
import collections
import itertools
import canopen
logger = logging.getLogger(__name__)
class PDO(PdoBase):
"""PDO Class for backwards compatibility
:param rpdo: RPDO object holding the Receive PDO mappings
:param tpdo: TPDO object holding th... |
from distutils.version import StrictVersion
import datetime
import hashlib
import os
import re
import socket
import shutil
import time
import sys
import urllib
try:
import requests
except ImportError:
print('Please install or update the requests module.')
sys.exit(1)
import seesaw
from seesaw.config import... |
from contextlib import closing
import graphlite.sql as SQL
class AbortSignal(Exception):
"""
Signals that the transaction has been aborted.
"""
pass
class Transaction(object):
"""
Represents a single, atomic transaction. All
calls are delayed jobs- they do not execute
until the trans... |
# Copyright (C) 2016 Max Rosin
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed... |
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Mathias Colpaert
#
# 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 Found... |
import subprocess
import sys
import time
import os
import re
import dicom
import datetime
import shutil
from optparse import OptionParser
from ruffus import *
from utils import dicom_count
from dicom_anon import dicom_anon
import local_settings as local
from local_settings import *
from django.core.management import ... |
import os
import time
import pygit2
import logger
log = logger.getLogger(__name__)
from user import User, NoSuchUser
from packed_keys import PackedKeys, NoKeysRef
from gizmo_factory import GizmoFactory, InvalidGizmoError
from request_registry import RequestRegistry
import settings
class Station(object):
def _... |
# encoding=utf8
import datetime
from distutils.version import StrictVersion
import hashlib
import os.path
import random
from seesaw.config import realize, NumberConfigValue
from seesaw.item import ItemInterpolation, ItemValue
from seesaw.task import SimpleTask, LimitConcurrent
from seesaw.tracker import GetItemFromTrac... |
# -*- coding: utf-8 -*-
"""
Study-agnostic Pipeline functions
Author: Scott Burns <sburns AT nmr DOT mgh DOT harvard DOT edu>
Copyright 2011 Kuperberg Lab
License: BSD,3 clause
"""
from subprocess import Popen,PIPE
import os
from os.path import join as pj
import smtplib
import time
import string
import pickle
from ... |
"""
Provides various deterministic and stochastic propagators.
"""
import numpy
import csb.core
from abc import ABCMeta, abstractmethod, abstractproperty
from csb.statistics.samplers import AbstractState
class AbstractPropagationResult(object):
"""
Abstract class providing the interface for the result
... |
print(" reset python interpreter ...")
import os
clear = lambda: os.system('clear')
clear()
import time
import random
import plot_history as ph
import image_loader as il
import tensorflow as tf
from PIL import Image, ImageDraw
import numpy as np
# computation time tick
start_clock = time.clock()
start_time = time.... |
import numpy as np
import pandas as pd
def period2pos(index, date):
x = [i for i, elem in enumerate(index) if elem == date]
if x == []:
raise ValueError('Date does not exists: ' + date.__repr__())
return x[0]
def verify_period_range(x):
if not isinstance(x, list):
raise ValueError('Ar... |
from __future__ import print_function
from re import match
from os import path
from builtins import str, range
from past.builtins import basestring
import numpy as np
import pandas as pd
import gspread
from oauth2client.client import OAuth2WebServerFlow
from oauth2client.file import Storage
from oauth2client.tools ... |
""" Pipulate lets you collect data straight off of the Web into spreadsheets.
_____ _ _ _
| __ (_) | | | |
| |__) | _ __ _ _| | __ _| |_ ___ ___ ___ _ __ ___
| ___/ | '_ \| | | | |/ _` | __/ _ \ / __/ _ \| '_ ` _ \
| | | | |_) |... |
# Copyright 2013-2015 DataStax, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... |
import json
import re
import pandas as pd
import six
from IPython.core.display import display, HTML
import semver
from ..errors import CraftAiError
DUMMY_COLUMN_NAME = "CraftGeneratedDummy"
def is_valid_property_value(key, value):
# From https://stackoverflow.com/a/19773559
# https://pythonhosted.org/six/#six.tex... |
from flask import Flask, jsonify, render_template, request, redirect
from twilio import twiml
from twilio.rest import TwilioRestClient
import random
import os
import sendText
import re
url_params = {}
url_params['term'] = 'date'
url_params['limit'] = 10
url_params['sort'] = 0
app = Flask(__name__)
app.config.from_pyf... |
# ~/ceam/tests/test_util.py
from unittest import TestCase
from datetime import timedelta
from unittest.mock import Mock
import numpy as np
import pandas as pd
from ceam.engine import SimulationModule
from ceam.util import from_yearly, to_yearly, rate_to_probability, probability_to_rate
class TestRateConversions(Te... |
# Copyright 2014 Swisscom, Sophia Engineering
#
# 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... |
#!/usr/bin/env python
from django.core.management.base import LabelCommand
from django.core.exceptions import ValidationError
from cyder.models import (TXT, AddressRecord, Nameserver, MX, CNAME,
SOA, PTR, SRV, View, Ctnr)
from lib.utilities import ensure_domain_workaround, get_label_domain_wo... |
# -*- coding: utf-8 -*-
# Copyright 2014–2015 Justin Lardinois
#
# 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... |
'''
Created July 28, 2014
@author Adam Campbell, Rachel Ehrlich, Max Fowler
'''
from settings import GRAPHDB
import mwparserfromhell
import pywikibot
from py2neo import neo4j, cypher
import re
import unicodedata
def load_by_infobox_type(infobox_type, depth):
found_pages = get_pages(infobox_type)
pages_to_cr... |
"""scons.Node.FS
File system nodes.
These Nodes represent the canonical external objects that people think
of when they think of building software: files and directories.
This holds a "default_fs" variable that should be initialized with an FS
that can be used by scripts or modules looking for the canonical default.... |
from daiquiri.core.constants import LICENSE_URLS
from daiquiri.core.serializers import JSONListField
from daiquiri.metadata.models import Schema, Table
from django.conf import settings
from django.urls import reverse
from rest_framework import serializers
class DataciteSerializer(serializers.ModelSerializer):
id... |
# -*- coding: utf-8 -*-
from collections import namedtuple
from datetime import datetime
import functools
import fnmatch
from itertools import groupby
import logging
from os import path, walk
import re
import threading
import sublime
import sublime_plugin
DEBUG = True
DEFAULT_SETTINGS = {
'result_title': 'PDBs... |
"""
WorldModellCapsule
^^^^^^^^^^^^^^^^^^
Provides information about the world model.
"""
import math
import rospy
import tf2_ros as tf2
from std_msgs.msg import Header
from tf2_geometry_msgs import PointStamped
from geometry_msgs.msg import Point, PoseWithCovarianceStamped
from tf.transformations import euler_from_q... |
from subgraph_extractor.cli import extract_from_config
import click
from cloudpathlib import AnyPath
import os
@click.command()
@click.option(
"--subgraph-config-folder",
help="The folder containing the subgraph config files",
default="config",
)
@click.option(
"--database-string",
default=os.envi... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import subprocess
import sys
import os
import time
import datetime
import random
import hashlib
import tempfile
from filelock import Timeout, FileLock
import psutil
DESCRIPTION = "A cron job wrapper to add some missing... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import urllib.parse
import urllib.request
import json
dede_user_id=""
sess_data=""
header = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Encoding": "utf-8",
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0... |
from __future__ import absolute_import
from __future__ import division
import os, traceback, math, re, zlib, base64, time, sys, platform, glob, string, stat
import cPickle as pickle
if sys.version_info[0] < 3:
import ConfigParser
else:
import configparser as ConfigParser
from Cura.util import resources
from Cura.ut... |
###############################################################################
##
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary forms, with or without
## modification, ... |
"""Trains a convolutional neural network.
Matthew Alger
The Australian National University
2016
"""
import argparse
import logging
import subprocess
import h5py
import numpy
from .config import config
PATCH_RADIUS = config['patch_radius']
PATCH_DIAMETER = PATCH_RADIUS * 2
def train(training_h5, model_json, weigh... |
from collections import defaultdict
from typing import Dict, List, Set, Callable
from copy import copy
from vnpy.trader.object import (
TickData, TradeData, OrderData, ContractData, BarData
)
from vnpy.trader.constant import Direction, Status, Offset, Interval
from vnpy.trader.utility import virtual, floor_to, ce... |
# encoding: UTF-8
"""
Please install tiger-api before use.
pip install tigeropen
"""
from copy import copy
from threading import Thread
from time import sleep
import time
import pandas as pd
from pandas import DataFrame
from tigeropen.tiger_open_config import TigerOpenClientConfig
from tigeropen.common.consts import... |
from django.db import models
from django.contrib.auth.models import User, AbstractBaseUser
from datetime import datetime
from django.utils import timezone
class RegistrationModel(models.Model):
user = models.OneToOneField(User)
activation_key = models.CharField(max_length=40)
created = models.DateTimeField... |
from datetime import datetime
from twisted.trial.unittest import TestCase
from twisted.internet.defer import inlineCallbacks, returnValue
from vumi.message import TransportUserMessage, TransportEvent
from vumi.dispatchers.base import (BaseDispatchWorker, ToAddrRouter,
FromAddrMultip... |
import os
import re
import logging
import boto
import urllib.request
import zipfile
import numpy as np
import pandas as pd
from math import ceil
from sqlalchemy.dialects.postgresql import insert
from sqlalchemy.exc import IntegrityError
from dataactcore.logging import configure_logging
from dataactcore.config import... |
from .base import *
import djcelery
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
TEMPLATE_DEBUG = False
# Compress static files offline
# http://django-compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_OFFLINE
COMPRESS_OFFLINE = False
COMPRESS_ENABLED = T... |
import datahandling
import matplotlib.pyplot as _plt
import numpy as _np
import scipy.signal
from bisect import bisect_left as _bisect_left
from scipy.optimize import curve_fit as _curve_fit
import uncertainties as _uncertainties
from mpl_toolkits.mplot3d.axes3d import Axes3D
from matplotlib import rcParams
import matp... |
# Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
########################################################################
#
# algorithms.py - This file is part of the Spectral Python (SPy)
# package.
#
# Copyright (C) 2001-2010 Thomas Boggs
#
# Spectral Python is free software; you can redistribute it and/
# or modify it under the terms of the GNU General P... |
import datahandling.LeCroy
import matplotlib.pyplot as _plt
import numpy as _np
import scipy.signal
from bisect import bisect_left as _bisect_left
from scipy.optimize import curve_fit as _curve_fit
import uncertainties as _uncertainties
from mpl_toolkits.mplot3d.axes3d import Axes3D
from matplotlib import rcParams
impo... |
try:
import sqlalchemy
except ImportError:
raise ImportError('Requires sqlalchemy')
import logging
import os
import arrow
from sqlalchemy import Column, Integer, create_engine, DateTime, UnicodeText, Text
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_se... |
"""
Django settings for stables project.
Generated by 'django-admin startproject' using Django 1.8.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build path... |
import sys
import os, os.path
import subprocess
def CheckParameter():
fbxConvPath = None
outputType = None
runDir = None
count = len(sys.argv)-1
if count >= 6:
for i in xrange(1, count):
if sys.argv[i] == "-FBXConvPath":
fbxConvPath = sys.argv[i+1]
elif sys.argv[i] == "-OutputType":
output... |
import numpy as np
import uuid
from functools import wraps
from metadataStore.api.collection import (insert_begin_run,
insert_beamline_config)
from metadataStore.commands import insert_end_run # missing from the api
from ...broker.struct import BrokerStruct
def stepped_ramp(... |
# -*- coding: utf-8 -*-
from sphinx.util.compat import Directive
from sphinx.builders.html import StandaloneHTMLBuilder
from docutils import nodes
from os import path
import sys, os, datetime, stat, re
try:
from hashlib import md5
except ImportError:
# 2.4 compatibility
from md5 import md5
def setup(app... |
"""
The haxby dataset: face vs house in object recognition
=======================================================
A significant part of the running time of this example is actually spent
in loading the data: we load all the data but only use the face and
houses conditions.
"""
### Load Haxby dataset ################... |
try:
import sqlalchemy
except ImportError:
raise ImportError('Requires sqlalchemy')
import logging
import os
import arrow
from sqlalchemy import Column, Integer, create_engine, DateTime, UnicodeText, Text
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_se... |
#!/usr/bin/env python
# ami.py
# Copyright (C) 2006 CCLRC, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# 18th June 2007
#
# Top-level interface for AMI - Analyse My Intensities
#
import sys
import os
import time
import... |
# -*- coding: utf-8 -*-
from util import build_context_script, exec_remote_command
from dbaas_cloudstack.models import HostAttr, PlanAttr
from dbaas_nfsaas.models import HostAttr as HostAttrNfsaas
from workflow.steps.util.base import BaseInstanceStep
class PlanStep(BaseInstanceStep):
def __init__(self, instance)... |
#! /usr/bin/env python
#
# Builds binary and source RPMs for a CSDMS model or tool.
#
# Examples:
# $ python build.py --help
# $ python build.py --version
# $ python build.py hydrotrend
# $ python build.py babel
# $ python build.py cem --tag 0.2
# $ python build.py hydrotrend --local $HOME/rpm_models
# $ ... |
"""
Usage:
QuantConnect.Visualizer.py DATAFILE [--assembly assembly_path] [--output output_folder] [--size height,width]
Arguments:
DATAFILE Absolute or relative path to a zipped data file to plot.
Optionally the zip entry file can be declared by using '#' as separator.
Options:
-h --help... |
from __future__ import print_function
# Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016,2017
import sys
import sysconfig
import inspect
if sys.version_info.major == 2:
import funcsigs
import imp
import glob
import os
import shutil
import argparse
import subprocess
import xml.etree.ElementTree as ET
im... |
#!/usr/bin/env python
import climate
import collections
import lmj.cubes
import pagoda.viewer
BLACK = (0, 0, 0)
WHITE = (1, 1, 1)
RED = (0.9, 0.2, 0.2)
YELLOW = (0.9, 0.9, 0.2)
ORANGE = (0.9, 0.6, 0.3)
GREEN = (0.2, 0.9, 0.2)
BLUE = (0.2, 0.3, 0.9)
COLORS = (WHITE, RED, YELLOW, GREEN, BLUE, ORANGE)
class Window(pag... |
"""
Module for reading and indexing Starbound assets
"""
# TODO: this file should end up similar to save_file in that it has no external
# deps. need to:
# - custom exception classes
import os, json, re, sqlite3, logging, random
from io import BytesIO
from PIL import Image
import starbound
import starbound.btreedb4... |
# -*- coding: utf-8 -*-
from django.core.exceptions import ObjectDoesNotExist
from requests import post, delete, put
from dbaas_credentials.models import CredentialType
from dbaas_dnsapi.utils import get_dns_name_domain, add_dns_record
from physical.models import Vip
from util import get_credentials_for
from base impor... |
# Copyright (C) 2009, Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the... |
# -*- coding: utf-8 -*-
"""
Helpers for graph plotting
References:
http://www.graphviz.org/content/attrs
http://www.graphviz.org/doc/info/attrs.html
Ignore:
http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.38.msi
pip uninstall pydot
pip uninstall pyparsing
pip install -Iv https:/... |
VERSION = '4.1.0'
|
#########
# Copyright (c) 2015 GigaSpaces Technologies 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... |
# Copyright (c) 2016 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from PyQt5.QtCore import pyqtSignal, pyqtProperty, pyqtSlot, QObject, QVariant #For communicating data and events to Qt.
import UM.Application #To get the global container stack to find the current machine.
import UM.Logge... |
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from PyQt5.QtCore import QTimer
from UM.Scene.SceneNode import SceneNode
from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator
from UM.Math.Vector import Vector
from UM.Math.AxisAlignedBox import AxisAlig... |
try:
from django.core.exceptions import ImproperlyConfigured
except ImportError:
ImproperlyConfigured = RuntimeError
try:
from rest_framework.views import exception_handler as _exception_handler
except (ImportError, ImproperlyConfigured):
_exception_handler = None
def post_exception_handler(exc, cont... |
# Copyright (c) 2016 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from PyQt5.QtCore import QObject, QVariant, pyqtProperty, pyqtSlot, pyqtSignal
from PyQt5.QtQml import QQmlPropertyMap
from UM.Logger import Logger
from UM.Settings.SettingFunction import SettingFunction
import UM.Sett... |
# Copyright (c) 2016 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from PyQt5.QtCore import QObject, QVariant, pyqtProperty, pyqtSlot, pyqtSignal
from UM.Logger import Logger
import UM.Settings
## This class provides the value and change notifications for the properties of a single ... |
"""
Management command for rubber.
"""
from datetime import datetime
from optparse import make_option
import concurrent.futures as futures
import sys
from django.core.paginator import Paginator
from tqdm import tqdm
from rubber.management.base import ESBaseCommand
class Command(ESBaseCommand):
option_list = ES... |
from multiprocessing.pool import ThreadPool
from threading import Lock
from cloudshell.helpers.scripts import cloudshell_scripts_helpers as helpers
from cloudshell.api.cloudshell_api import *
from cloudshell.api.common_cloudshell_api import CloudShellAPIError
from cloudshell.core.logger import qs_logger
from sandbox_... |
# -*- coding: utf-8 -*-
import os
import django
import sass
from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.template.loader import get_template # noqa Leave this in to preload template locations
from django.utils.importlib ... |
from __future__ import division, print_function, unicode_literals, absolute_import
import sys,os
num_tol = 1e-10 #effectively zero for our purposes
def isANumber(x):
'''Checks if x can be converted to a float.
@ In, x, a variable or value
@ Out, bool, True if x can be converted to a float.
'''
try:
flo... |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Standalone python script to zip a set of files. Intended to be used by 'zip'
recipe module internally. Should not be used elsewhere.
"""
import json
impo... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Kevin Brebanov <https://github.com/kbrebanov>
# Based on pacman (Afterburn <http://github.com/afterburn>, Aaron Bull Schaefer <aaron@elasticdog.com>)
# and apt (Matthew Williams <matthew@flowroute.com>>) modules.
#
# This module is free software: you can redistribu... |
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2013, Dylan Martin <dmartin@seattlecentral.edu>
#
# This file is part of Ansible
#
# Ansible 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 v... |
# Lint as: python3
# Copyright 2018 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 ... |
# Copyright 2019 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... |
__version__ = '2.34.5'
|
#ipc_lista1.8
#Professor: Jucimar Junior
#Any Mendes Carvalho - 1615
|
# EQUIPE 2
#
#Ana Beatriz Frota - 1615310027
#Nahan Trindade Passos - 1615310021
#
#
#
cont = 1
numero = 1
while (cont <= 49):
numero= numero + 1
cont = cont + 1
if (numero%2 !=0):
print(numero)
|
import os
import sys
import Test
import TestRunner
import Util
kIsWindows = sys.platform in ['win32', 'cygwin']
class GoogleTest(object):
def __init__(self, test_sub_dir, test_suffix):
self.test_sub_dir = os.path.normcase(str(test_sub_dir)).split(';')
self.test_suffix = str(test_suffix)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.