text
stringlengths
12
6.59M
#!/usr/bin/env python # Copyright 2010 Theo Crevon # # 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...
from typing import Set, Dict, Union, Callable, Tuple from hwt.code import Concat from hwt.hdl.types.bits import Bits from hwt.hdl.types.bitsVal import BitsVal from hwt.hdl.types.sliceVal import HSliceVal from hwt.hdl.value import HValue from hwt.serializer.utils import RtlSignal_sort_key from hwt.synthesizer.rtlLevel....
# Copyright (C) 2008 Red Hat, Inc. # # This library 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 of the License, or (at your option) any later version. # # This library is distribu...
# -*- coding: utf-8 -*- """Tests for vcspull. vcspull.testsuite.config ~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals ) import tempfile import os import copy import logging import kaptan from vcspull.repo import BaseRepo, Repo, ...
""" Module supporting BirdVoxDetect NFC detectors. When this module is imported, it dynamically creates a detector class (a subclass of the `_Detector` class of this module) for each BirdVoxDetect detector in the archive database and adds it to the detector extensions of this Vesper server. BirdVoxDetect (https://git...
import re import os.path import fnmatch from subprocess import Popen, PIPE from vial import vfunc, vim from vial.utils import buffer_with_file, focus_window, \ get_ws_len, mark, get_key_code, echo, get_projects from vial.widgets import SearchDialog, ListFormatter, ListView def escape(): if len(vim.windows) ...
########################################################### # # Copyright (c) 2005-2008, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written ...
#!/usr/bin/env python from __future__ import print_function import os import re import sys import sysconfig import warnings import glob import subprocess import shutil from setuptools import setup, find_packages, Command from setuptools.extension import Extension MAJOR = 5 MINOR = 0 MICRO = 0 ISRELEASED = False VERSI...
""" Bird api consumer """ import requests from werkzeug.exceptions import abort class Bird(object): """Bird client""" def __init__(self, bird_api_base): """Initialize bird api consumer""" self.bird_api_base = bird_api_base def _api_get(self, endpoint): """Make API request and r...
#!/usr/bin/env python import sys import os def GetKV(key, vals): lk = len(key) for v in vals: if (len(v) >= len(key) and v[0:lk] == key): return v[lk:] else: return None def GetStrand(value): if (value & 16 != 0): return 1 else: return 0 def IsPrimary...
# TODO: no need to test codelist fields separately; instead test the whole serializer in once along with the code and vocabulary fields. Or is testing the fields separately preferable? from django.test import TestCase # Runs each test in a transaction and flushes database from unittest import skip import datetime f...
#!/usr/bin/env python # Repeats an interestingness test a given number of times. # If "RANGENUM" is present, it is replaced in turn with each number in the range. # # Use for: # # 1. Intermittent testcases. # # Repeating the test can make the bug occur often enough for Lithium to make progress. # # lithium.py r...
#!/usr/bin/env python """ Regression tests for PBxplore. This script run the various PBxplore programs with various argument, and makes sure the output is the expected one. The aim is to check that the programs are not broken during development. Be careful this script does not test that the output is right. It just ...
import os import pdb import json import sqlite3 as sqlite import threading import cherrypy import mpv import collections from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool, WebSocket from youtube_dl import YoutubeDL # load lua libs for mpv to play youtube urls directly w/o # translation with youtub...
from ckan.plugins import toolkit, IConfigurer, ITemplateHelpers, SingletonPlugin, IRoutes, implements, IActions, IPackageController from urlparse import urlparse from ckan.logic import check_access from ckan.logic.action.get import _group_or_org_list import pylons.config as config import ckan.plugins.toolkit as toolk...
#-*- coding:utf-8 -*- import hashlib import datetime from rrd.store import dashboard_db_conn as db_conn from rrd.store import graph_db_conn from rrd.consts import ENDPOINT_DELIMITER, COUNTER_DELIMITER class DashboardGraph(object): def __init__(self, id, title, hosts, counters, screen_id, timespan=3...
import hashlib from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APITestCase from .. models import UserProfile from .. serializers import UserSerializer class TestUserSeriali...
########################################################### # # Copyright (c) 2005-2008, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written ...
import logging import functools from datetime import date, timedelta from django.contrib.auth.models import User import requests import reversion from textile import textile_restricted from django.conf import settings from django.db import models from django.dispatch.dispatcher import receiver from django.template.de...
#! /usr/bin/env python """ arast-client -- commandline client for Assembly RAST """ import os, sys, json, shutil import appdirs import argparse import datetime import getpass import logging import requests import uuid import subprocess import time from ConfigParser import SafeConfigParser from pkg_resources import re...
# -*- coding: utf-8 -*- import json import logging import time import requests import sys from time import sleep from errbot import webhook from errbot.errBot import ErrBot from errbot.backends.base import Message, Person, Room, RoomOccupant # Can't use __name__ because of Yapsy log = logging.getLogger('errbot.backen...
#!/usr/bin/env python # -*- coding: utf-8 -*- import docutils.core,docutils.nodes,sys,re import pygments_code_block_directive import sys import os import pprint from types import StringType from docutils import __version__, __version_details__, SettingsSpec from docutils import frontend, io, utils, readers, writers fr...
#!/usr/bin/env python import os import sys import requests import json import xml.etree.ElementTree as Et import time __author__ = 'sshnaidm' STYLE = """ <style> table { font-family:Arial, Helvetica, sans-serif; color:#666; font-size:13px; text-shadow: 1px 1px 0px #fff; background:#eaebec; mar...
class Errors(object): ConvertedException = 1 NoSuchInstanceId = 2 NoSuchVmId = 3 IncorrectVmState = 4 NoSuchHost = 5 NoSuchHostId = 6 InstanceIdAlreadyExists = 7 HostNameMismatch = 8 HostNotUp = 9 HostStateError = 10 InvalidInstance = 11 UnableToResume = 12 UnableToSuspend = 13 class InstanceState(object)...
import logging import functools from datetime import date import uuid import requests import reversion from textile import textile_restricted from django.utils import timezone from django.contrib.auth.models import User from django.conf import settings from django.db import models from django.template.defaultfilters ...
#!/usr/bin/python # Copyright (c) 2010 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 tool launches several shards of a gtest-based binary in parallel on a local machine. Example usage: parallel_launcher.py pat...
from datetime import datetime from pytask.taskapp.models import Profile, Task, Comment, Credit, Claim def publishTask(task): """ set the task status to open """ sub_tasks = task.subs.all() dependencies = task.deps.all() if sub_tasks or any(map(lambda t:t.status!="CM",dependencies)): task.s...
# -*- coding: utf-8 -*- # Copyright (C) 2012 Yahoo! Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
#n -*- coding: utf-8 -*- import xlrd import json import os from uuid import NAMESPACE_OID, uuid4, uuid5 from boto.s3.connection import S3Connection from boto.s3.key import Key from ckan import model from ckan.model import Session from ckan.logic import get_action, action from ckanext.harvest.model import HarvestJob,...
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 '''Code to help make typed objects out of parsed YAML''' from typing import Callable, Dict, List, Optional, Sequence, TypeVar import yaml try: from yaml import CSafeL...
import numpy as np import cv2 from helpers import Helpers from digit import Digit class Cells(object): ''' Extracts each cell from the sudoku grid obtained from the Extractor ''' def __init__(self, gridLess): print 'Extracting cells...', self.helpers = Helpers() self.cell...
import numpy as np import matplotlib.pyplot as plt from scipy.spatial.distance import euclidean import dataloader_1b, random # number of clusters K = 3 # initialization methods FIRST_K_POINTS = 1 UNIFORMLY_K_POINTS = 2 K_MEANS_PLUS_PLUS = 3 GONZALES_ALGORITHM = 4 # data set file name DATA_SET_FILE = "data1b/C2.txt" # ...
# model.py # Compiles an OBJ model file into a C++ file that can be linked # with Apocalypse. import sys, os inFileName = sys.argv[1] outFileName = sys.argv[2] modelName = sys.argv[3] vertices = [] texCoords = [] normals = [] # Basically, each vertex is a 3-tuple of 0-based indices into # the vertices, texCoords an...
#!/usr/bin/env python2 # coding=utf-8 """ Copyright (c) by Filipp Kucheryavy aka Frizzy <filipp.s.frizzy@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: a. Redistributions of source code mus...
#!/usr/bin/env python """ Weather Module ************** Routines to deal with bulk weather data from Environment Canada WxDF Class ---------- * Update - Add years to data * Save - Save consolidated data * GetFirstDay - returns index to first day of data * GetLastDay - Returns index to last day of data ...
# -*- encoding: utf-8 -*- ############################################################################### # # # sale_quick_payment for OpenERP # # Copyright (C) 2011 Akretion Sébastien BEAU <sebast...
from PySide import QtCore, QtGui, QtDeclarative from fixture import Fixture class FixtureWidget(QtDeclarative.QDeclarativeItem): def __init__(self, parent = None): super(FixtureWidget, self).__init__(parent) self.setFlag(QtGui.QGraphicsItem.ItemHasNoContents, False) self.setAccep...
# -*- coding: utf-8 -*- ''' Manage Windows features via the ServerManager powershell module ''' from __future__ import absolute_import import logging # Import python libs try: from shlex import quote as _cmd_quote # pylint: disable=E0611 except ImportError: from pipes import quote as _cmd_quote # Import salt...
import logging, sys, readline, shlex import dbus class LRTerm(): def __init__(self): self.logger = logging.getLogger('LRTerm') self.dbus_bus = dbus.SessionBus() try: self.dbus_obj = self.dbus_bus.get_object('org.lilug.lugraffle', '/') except dbus.exceptions.DBusException: print "Unable to connect to ...
r""" =============================================================================== Submodule -- throat_diameter =============================================================================== """ from . import misc as _misc import scipy as _sp def weibull(geometry, shape, scale, loc, seeds=None, **kwargs): if ...
""" Copyright 2017-2018 Fizyr (https://fizyr.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
from django.db import models from django.utils.translation import ugettext_lazy as _ class Tag(models.Model): """ A single tag. A tag has a unique name, and data models is added to a tag via :class:`.TaggedItem`. """ class Meta: verbose_name = _('Tag') verbose_name_plural = _('Tag...
from datetime import datetime import os from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required from django.db import transaction from django.db.models import Q from django.http import HttpResponse, HttpResponseForbidden, HttpResponseBadRequest fro...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import OrderedDict from django import forms from django.db import transaction from popolo.models import Organization from candidates.views.version_data import get_change_metadata, get_client_ip from candidates.models import LoggedAction...
""" Push basic system info (hostname, IP address, etc.) to Twitter """ import sys import socket import llnet as net tw = net.Twitter('twitter_app1') time_ntp = net.get_time_ntp() hostname = socket.gethostname() msg = "[%s] %s: active at %s" % (time_ntp, hostname, net.get_ip_address('wlan0')) tw.update_status(msg)...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Changes in version 0.4.4 6-11-2009. - Improved index searching strategy. - Fix XIO compatibility with pilatus det. - Improve detector specific definitions in XIO exports. Changes in version 0.4.3 28-10-2009. - Fixe compatibility problems with Python2.2 and Python...
# -*- coding: utf-8 -*- """ Created on Sat Jul 26 23:01:44 2014 @author: Jose Capriles """ from armSimulator import Point import unittest import random from math import sqrt class PointTest(unittest.TestCase): def setUp(self): self.x = random.random() self.y = random.random() self.z...
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2015, ARM Limited and contributors. # # 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 # # ...
from datetime import date from hashlib import sha256 from urlparse import urlparse import base64 import pickle from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.db.models.query_utils import Q from django.http...
"""!image <search term> return a random result from the google image search result for <search term>""" try: from urllib import quote, unquote except ImportError: from urllib.request import quote, unquote import re import requests from random import shuffle def octal_to_html_escape(re_match): # an octal e...
# coding=utf-8 import datetime import calendar import json import time from django.shortcuts import render from django.views.generic import View from django.http import HttpResponse from django.db.models import Count from django.contrib.auth.decorators import login_required from dinner.models import Order, CalendarP...
#!/usr/bin/python """ replacement for runtest target in Makefile arg 1: test dir or test file """ import os import os.path import platform import sys import subprocess import time winsfx = ".exe" testsfx = "_test.cpp" debug = False batchSize = 25 def usage(): sys.stdout.write('usage: %s <path/test/dir(/files)>...
#!/usr/bin/env python # vim: set sw=4 et: import logging import time import threading import kombu import socket from brozzler.browser import BrowserPool, BrowsingException import brozzler import urlcanon class AmqpBrowserController: """ Consumes amqp messages representing requests to browse urls, from the ...
#!/usr/bin/python '''This module contains the functions for formatting data files''' import os import numpy as np import csv import matplotlib.mlab as plt import glob from metadata import * gcwd = os.getcwd #get current directory pd = os.path.dirname #get parent directory chdir = os.chdir #change directories jp = os...
from __future__ import division from itertools import product from textwrap import dedent from distutils.version import LooseVersion import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from .external.six import string_types from . import utils from .utils import (categoric...
from __future__ import division import sys import os import shutil import inspect import configparser from twiggy import log log = log.name('meco') import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib as mpl from ..misc import setup_log from .. import empirical as emp from .. impo...
# -*- coding: utf-8 -*- """ Copyright (c) 2012, Davyd McColl; 2013, Jaime Soffer 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 cop...
# -*- coding: utf-8 -*- # python imports import logging import re from datetime import datetime # django imports from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib import messages from django.db.models.signals import m2m_changed, post_save from django.dispatch impo...
# LOD: be sure all have the same material or a new geometry is created # # This script is licensed as public domain. # # http://www.blender.org/documentation/blender_python_api_2_57_release/bpy.props.html # http://www.blender.org/documentation/blender_python_api_2_59_0/bpy.props.html # http://www.blender.org/documen...
#!/usr/bin/env python # encoding: utf-8 # connection.py # # Created by Maan Bsat on 2013-09-02. # Copyright (c) 2013 Maan Bsat. All rights reserved. from Queue import Queue from random import randint from datetime import datetime import ib.opt from ib.opt import message from ib.ext.Contract import Contract from untw...
# # Copyright (c) 2009 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/permanent/...
#!/usr/bin/env python3 """ Dependencies: cookiecutter Usage: This needs to be run in the root of the project you are upgrading. The template branch needs to be in your local repo, but must not be active/checked out. (git doesn't like this) """ import argparse import json import subprocess import shutil import os imp...
#!/usr/bin/python import os, fcntl credentials_file = os.path.join(os.path.dirname(__file__), "credentials.oracle") if os.path.isfile(credentials_file): lock_file = "/var/lock/oracle.lock" f = open(lock_file, 'w') try: fcntl.lockf(f, fcntl.LOCK_EX | fcntl.LOCK_NB) print "no other uploads in ...
# Name: HDF5FermiSource from pathlib import Path import inviwopy as ivw import h5py import numpy as np class HDF5FermiSource(ivw.Processor): ''' Process used for reading HDF5 data pertaining to fermi surface data Outport ------- volumeOutport: ivw.data.VolumeOutport Final processed data...
#!/usr/bin/env python import os # Determining the way the library will be used modeOptions = {1 : "train", 2 : "eval", 3 : "sample"} print("You want to train, evaluate or sample a model?\n\ [1] train\n[2] evaluate\n[3] sample") while True: mode = input() if mode not in modeOptions: print("Insert only ...
#!/usr/bin/python # -*- coding: utf-8 -*- """ The Estrangement Reduction Algorithm (ERA) and various functions necessary and read the input snapshots, process information and output the results to file. For a desciption of ERA reference [1]: [1] V. Kawadia and S. Sreenivasan, "Online detection of temporal communitie...
from django.http import HttpRequest from django.conf import settings from django.contrib.auth.models import User import logging from threading import currentThread class UserService: _user_data = {} logger = logging.getLogger(__name__) def _get_current_user_data(self): return UserService._user_da...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import base64 import concurrent.futures import errno import logging import os import shutil import tempfile import traceback from collections import OrderedDict from typing import ( IO, Any, Callable, Dict, Iterable, List, ...
#!/usr/bin/env python """Helper script to run all Robot Framework's unit tests. usage: run_utest.py [options] options: -q, --quiet Minimal output -v, --verbose Verbose output -d, --doc Show test's doc string instead of name and class (implies verbosity) -h, --help ...
#!/usr/bin/env python """ A script for a grid search over pretraining hyperparameters. """ import click from functools import partial from ray import tune from ray.tune.integration.pytorch_lightning import TuneReportCallback from kraken.lib.default_specs import RECOGNITION_PRETRAIN_HYPER_PARAMS, RECOGNITION_SPEC fro...
#!/usr/bin/python # coding: utf-8 import sys, os, fcntl from os import path as os_path from re import compile as re_compile, IGNORECASE as re_IGNORECASE, sub as re_sub from struct import * from subprocess import * from urllib2 import quote as urllib2_quote, Request as urllib2_Request, urlopen as urllib2_urlopen, URLEr...
#!/usr/bin/env ccp4-python ''' 30.01.2016 @author: hlfsimko ''' import logging import os import sys from ample.ensembler.constants import SIDE_CHAIN_TREATMENTS from ample.util import version # Python 3.x --> ConfigParser renamed to configparser try: import configparser as ConfigParser except ImportError: i...
#!/usr/bin/env python import argparse import multiprocessing import os import pandas import queue import pandas.io.formats.excel import re from Bio import SeqIO INPUT_JSON_AVG_MQ_DIR = 'input_json_avg_mq_dir' INPUT_JSON_DIR = 'input_json_dir' INPUT_NEWICK_DIR = 'input_newick_dir' # Maximum columns allowed in a LibreO...
import jsonpickle from datetime import datetime from jinja2 import Environment, PackageLoader from hashlib import md5 from ..base import Base class Target(Base): unary = False def __init__(self, *args, **kargs): super(Target, self).__init__(*args, **kargs) self.jinja2_env = Environment(loade...
#!/usr/bin/env python3 # ############################################################################ # # NetJobs - a network job synchronizer. # # # # Author: Ramon A. Lovato (ramonalovato.com) ...
#!/usr/bin/env python import logging, sys, json import time import stomp #import pprint import config import yaml NETWORK_RAIL_AUTH = (config.NR_USER, config.NR_PASSWORD) feed = config.NR_TMVT_FEED_ID locations = yaml.load(open("Location_Info.dat","rb")) #pretty = pprint.PrettyPrinter(indent=4) # Sourced from http...
""" Filename: Network.py Author: Nipun Gunawardena Acknowledgements: Based off of Michael Nielsen's Neural Network and Deep Learning Tutorial code found at https://github.com/mnielsen/neural-networks-and-deep-learning/blob/master/src/network.py. Also based off of info found at http...
#!/usr/bin/env python import unittest from PythonTemplate import Model class TestModel(unittest.TestCase): def setUp(self): # TODO pass def test_do_thing(self): # do something Model.doThing() # evaluate something # TODO
#!/usr/bin/env python import socket import email.utils import mimetypes import os import sys import select ROOT = os.path.join(os.getcwd(), 'webroot') def response_ok(uri): resolved_uri = resolve_uri(uri) if resolved_uri[0] == 404: response_code = "HTTP/1.1 404 Not Found" headers = "Content-...
#!/usr/bin/env python """ This module builds HTML documentation for models by introspecting the model unit tests. """ from django.core import meta, template import runtests import inspect, os, re, sys MODEL_DOC_TEMPLATE = """ <div class="document" id="model-{{ model_name }}"> <h1 class="title">{{ title }}</h1> {{ bl...
# -*- coding: utf-8 -*- """ chibitest ~~~~~~~~ chibitest is a simple unit testing module. Less code is less bugs. Inspired by Oktest, http://www.kuwata-lab.com/oktest/. """ from __future__ import print_function import sys import inspect import traceback from difflib import unified_diff from collections import named...
''' A MPU-9150 sensor must be connected to the I2C bus to P9 and P10. ''' from machine import I2C import time import os mch = os.uname().machine if 'WiPy' in mch: print("SKIP") sys.exit() print(I2C(0)) print(I2C(0,I2C.MASTER)) print(I2C(0,I2C.MASTER,pins=('P9','P23'))) print(I2C(0,I2C.MASTER,pins=('P9','P2...
#! /usr/bin/env python import matplotlib matplotlib.use('Agg') from astrometry.util.index import * from astrometry.util.plotutils import * from astrometry.libkd.spherematch import match from astrometry.util.starutil_numpy import * from astrometry.util.pyfits_utils import * from optparse import * from pylab import * ...
# -*- coding: UTF-8 -*- # Copyright 2012-2017 Luc Saffre # License: BSD (see file COPYING for details) """Defines the classes used for generating workflows: :class:`State` and :class:`Workflow`, :class:`ChangeStateAction`. """ from builtins import str import six import logging logger = logging.getLogger(__name__) fr...
import requests from enum import Enum from linode.api import ApiError try: from urllib.parse import urlparse from urllib.parse import urlencode from urllib.parse import urlunparse except ImportError: from urlparse import urlparse from urllib import urlencode from urlparse import urlunparse cla...
__version__ = '2.31.0'
__version__ = '2.24.0'
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2018, Arm Limited and contributors. # # 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 # # ...
import sys import py py.log.setconsumer("platform", None) from pypy.config.translationoption import get_combined_translation_config from rupypy.main import create_entry_point, get_topaz_config_options entry_point = create_entry_point(get_combined_translation_config( overrides=get_topaz_config_options(), )) sys...
#ipc_lista1.4 #Professor: Jucimar Junior #Any Mendes Carvalho #Faça um Programa que peça as 4 notas bimestrais e mostre a media
#ipc_lista1.4 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um Programa que peça as 4 notas bimestrais e mostre a media print media = (nota1+nota2+nota3+nota4)/4.0 nota2 =
#ipc_lista1.8 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. #Calcule e mostre o total do seu salário no referido mês. QntHora = input("Entre com o valor de seu rendimento por hora: ") hT = input("E...
''' guilds.py - All handlers under /guilds/* ''' import json import logging from ..utils import _err, _json, strip_user_data log = logging.getLogger(__name__) class GuildsEndpoint: def __init__(self, server): self.server = server async def h_post_guilds(self, request): pass async def h_...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012, Hsiaoming Yang <http://lepture.com> # # 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 c...
from collections import defaultdict import os import random import sqlite3 import uuid # FIXME these are hardcoded in some SQL statements below. SQLite does not # seem to have the concept of variables... INITIALIZED = 0 ASSIGNED = 1 SUCCESSFUL = 2 FAILED = 3 ABORTED = 4 INCOMPLETE = 5 PUBLISHED = 6 MERGING = 7 class...
import logging import os import time from WMCore.Credential.Proxy import Proxy as WMProxy from lobster.util import Configurable, PartiallyMutable logger = logging.getLogger('lobster.cmssw.proxy') class Proxy(Configurable): """ Wrapper around CMS credentials. Parameters ---------- renew : ...
import os import string from sequana import BAM __all__ = ['bam_to_mapped_unmapped_fastq'] try: _translate = string.maketrans('ACGTacgt', 'TGCAtgca') except: _translate = bytes.maketrans(b'ACGTacgt', b'TGCAtgca') def reverse_complement(seq): # use hastag but for now, do it manually return seq.tra...
import Tkinter as tk from robot.parsing.txtreader import TxtReader import ttk import sys import re from rwb.widgets import HighlightMixin import logging #from core.transmogrifier import Transmogrifier import tcl ''' widget = ".%s" % self.text.winfo_name() # ugh! my head hurts! My eyes! The goggles do nothing! find a...
import ast import os.path import dj_database_url from django.contrib.messages import constants as messages DEBUG = ast.literal_eval(os.environ.get('DEBUG', True)) TEMPLATE_DEBUG = DEBUG SITE_ID = 1 PROJECT_ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), '..')) ROOT_URLCONF = 'saleor.urls' WSGI_AP...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. # # 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....