code
stringlengths
1
199k
"""Main application code that ties all the other modules together.""" from __future__ import division from version import APPNAME, PACKAGE, VERSION from build_info import PKG_DATA_DIR, REVISION import gettext gettext.bindtextdomain(PACKAGE) gettext.textdomain(PACKAGE) from gi.repository import GObject, GtkClutter GObje...
from pylab import * import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from mpl_toolkits.axes_grid1 import make_axes_locatable idxset = {}; fo = open(sys.argv[1],'r'); raw = fo.readlines(); fo.close(); idxset["aratio"] = float(raw[0]); idxset["Nterms"] = int(raw[1]); idxset["i"] = zeros( (idxset["Nte...
from stickynotes.backend import Note, NoteSet from stickynotes.gui import * import stickynotes.info from stickynotes.info import MO_DIR, LOCALE_DOMAIN from gi.repository import Gtk, Gdk from gi.repository import AppIndicator3 as appindicator import os.path import locale import argparse from locale import gettext as _ f...
import pandas; import gzip; from intervaltree import IntervalTree; import argparse; import math; import sys; def main(): parser = argparse.ArgumentParser() # required parser.add_argument("--haplotypic_counts", required=True, help="Output file from phASER containing read counts for haplotype blocks. NOTE: unphased_va...
from __future__ import unicode_literals, print_function, division from sys import argv import coh import logging import os from itertools import chain import nltk from nltk.data import load import multiprocessing coh.config.from_object('config') logger = logging.getLogger(__name__) stopwords = nltk.corpus.stopwords.wor...
import datetime import lxml.html from .bills import CABillScraper from .legislators import CALegislatorScraper from .committees import CACommitteeScraper from .events import CAEventScraper settings = dict(SCRAPELIB_RPM=30) metadata = dict( name='California', abbreviation='ca', capitol_timezone='America/Los_...
""" Helper functions for the trend schema. """ from datetime import datetime, timedelta, time from contextlib import closing import logging from itertools import chain import pytz from minerva.storage.trend.trend import Trend from minerva.storage.trend.trendstore import TrendStore from minerva.storage.trend.granularity...
import sys import argparse import logging from master_crawler import MasterCrawler logging.basicConfig(filename='../log/ktf_crawler.log', format='%(asctime)s %(message)s', datefmt='%d.%m.%Y %I:%M:%S %p', level=logging.INFO) log = logging.getLogger(__name__) parser = argparse.ArgumentParser("Crawls b...
if __name__ == '__main__': import ctypes import sys if sys.platform.startswith('linux'): try: x11 = ctypes.cdll.LoadLibrary('libX11.so') x11.XInitThreads() except: print "Warning: failed to XInitThreads()" from gnuradio import eng_notation from gnuradio im...
class Contador: def __init__(self): self.__conteo = 0 # Obtener el valor de la propiedad (GET) @property def conteo(self): return self.__conteo # Definir el SET @conteo.setter def conteo(self, valor): self.__conteo = valor c1 = Contador() c1.conteo = 10 print(c1.conte...
from socket import * HOST = '::1' PORT = 21567 BUFSIZ = 1024 ADDR = (HOST, PORT) tcpCliSock = socket(AF_INET6, SOCK_STREAM) tcpCliSock.connect(ADDR) while True: data = raw_input('> ') if not data: break tcpCliSock.send(data) data = tcpCliSock.recv(BUFSIZ) if not data: break print...
from __future__ import with_statement import os import traceback import sickbeard from common import SNATCHED, Quality, SEASON_RESULT, MULTI_EP_RESULT from sickbeard import logger, db, show_name_helpers, exceptions, helpers from sickbeard import sab from sickbeard import nzbget from sickbeard import history from sickbe...
import aobd from aobd.decoders import pid def test_list_integrity(): for mode, cmds in enumerate(aobd.COMMANDS._modes): for pid, cmd in enumerate(cmds): # make sure the command tables are in mode & PID order assert mode == cmd.get_mode_int(), "Command is in the wrong mode list: ...
import re import urllib import urllib2 import random import decimal import util __name__='anyfiles' BASE_URL = 'http://video.anyfiles.pl' def supports(url): return not _regex(url) == None def _gen_random_decimal(i, d): return decimal.Decimal('%d.%d' % (random.randint(0, i), random.randint(0, d))) def _decod...
import serial import platform import zephyr from zephyr.testing import simulation_workflow input_buffer = list() def callback(value_name, value): global input_buffer if value_name == "ecg": input_buffer.append(int(value) ) if len(input_buffer) >= 50: print ','.join(map(str, input_buffer) ) del input_buffer[:] ...
import catlib import datetime import re import os import subprocess import time import pagegenerators import urllib2 import wikipedia """ Bot para copiar la fecha/hora, duración y modelo teléfono de Bambuser """ month2number = {'jan': '01', 'feb': '02', 'mar': '03', 'apr': '04', 'may': '05', 'jun': '06', 'jul': '07', '...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('interfapp', '0016_auto_20170324_1728'), ] operations = [ migrations.RemoveField( model_name='case', name='createtime', ),...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ModelFormFailureHistory', fields=[ ('id', models.AutoFiel...
# Copyright (C) 2013 Remy van Elst # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This progr...
""" This file provides support for gnathub. """ import GPS import gps_utils import os_utils gnathub_menu = "/Analyze/GNAThub/" tools = ['codepeer', 'gcov', 'gnatcoverage', 'gnatcheck', 'gnatmetric', 'spark2014'] XML = r"""<?xml version="1.0" ?> <GPS> <target-model name="gnathub"> <iconname>gps-build-all-...
from i18n.custom.word_lists.ru_di import di from classes.extras import get_word_list, word_typing_course from i18n.custom.kbrd.ru_cinderella import cinderella course = [] ru_course = [ [[3,3,3,3,3,3], ["фыва авыф ", "олдж ждло ", "фыва олдж ждло авыф ", "фоылвдаж жадвлыоф ", "фжыдвлао аовлыдфж ", "фводыалж жлаыдовф "] ...
import random class Deck: def __init__(self): ranks = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K'] suits = ['C', 'D', 'H', 'S'] self.deck = [s+r for s in suits for r in ranks] random.shuffle(self.deck) def hand(self, n=1): """Deal n ...
import os import time import json from random import uniform from gettext import gettext as _ from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject from gi.repository import GdkPixbuf from gi.repository import Pango from sugar3.graphics import style from sugar3.graphics.icon impo...
from Time2 import Time time = Time() print("The initial military time is", time.print_military()) print("\nThe initial standard time is", time.print_standard()) time.time(13, 27, 6) print("\n\nMilitary time after time is", time.print_military()) print("\nStandard time after time is", time.print_standard()) time.hour = ...
from Tkinter import * class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() self.master.title("Grid Manager") for r in range(6): self.master.rowconfigure(r, weight=1) for c in range(5): self.master.columnco...
import re import traceback import sickbeard import generic from sickbeard.common import Quality from sickbeard import logger from sickbeard import tvcache from sickbeard import show_name_helpers from sickbeard.common import Overview from sickbeard.exceptions import ex from sickbeard import clients from lib import reque...
""" Copyright (C) 2015 Louis Dijkstra This file is part of gonl-sv This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program ...
import json import re from normalizer.modules.basenormalizer import BaseNormalizer class DionaeaConnections(BaseNormalizer): channels = ('dionaea.connections',) def normalize_ip(self, ip): mat = re.match(r'[a-f0-9A-F:]+:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$', ip) if mat: return mat.g...
from conans import ConanFile, CMake import os class ExpatTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" def imports(self): self.copy("*.dll", dst="bin", src="bin") self.copy("*.dylib*", dst="lib", src="lib") self.copy("*.so*", src="...
from pylab import * from matplotlib import rc, rcParams,gridspec import matplotlib.colors as mcolors from scipy import interpolate from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.colors import LogNorm import os import glob import profile def make_colormap(seq): seq = [(None,) * 3, 0.0] + lis...
"""abc.py This module describes abstract base classes used throughout python-jss. Shea would call this non-pythonic but i'd like to verify exactly which subclasses are conforming 100% to a declared interface - mosen. """ from __future__ import absolute_import import abc class AbstractRepository(object): # If these ...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('statisticscore', '0028_auto_20160211_1628'), ] operations = [ migrations.AddField( model_name='session', name='session_type', field=models.CharField(choices=...
from flask import current_app from mini_fiction.validation.utils import safe_string_coerce USERNAME = { 'type': 'string', 'minlength': 2, 'maxlength': 32, 'coerce': [safe_string_coerce, 'strip'], 'dynregex': lambda: current_app.config['USERNAME_REGEX'], 'error_messages': { 'dynregex': la...
import sys,requests,os,json,datetime APPID = "25f70abd3ad9ca892070b7d4c647bc42" def data_collect(location): url = "http://api.openweathermap.org/data/2.5/forecast/daily?q="+location+"&APPID="+APPID+"&units=metric&cnt=5" forecast = requests.get(url) forecast.raise_for_status() weatherData = json.loads(forecast.text)...
import requests from sigma.plugin import Plugin from sigma.utils import create_logger class IMDB(Plugin): is_global = True log = create_logger('imdb') async def on_message(self, message, pfx): if message.content.startswith(pfx + 'imdb'): await self.client.send_typing(message.channel) ...
import json from django.http import HttpResponse, HttpResponseBadRequest from django.shortcuts import render from django.views.decorators.cache import cache_page from rest_framework.generics import ListAPIView from rest_framework.renderers import JSONRenderer from waffle import flag_is_active from .filters import (Adva...
import datetime import json import os from .cute_device import get_cute_device_str def get_time_str(): """ returs current time formatted nicely """ time_now = datetime.datetime.now() str_time = time_now.strftime("%y.%m.%d_%H.%M.%S") return str_time def get_path_out_name(params, ext="json"): ...
"""The lyrics viewer for gmp.""" import wx, requests, application, re, webbrowser, functions from lyrics import lyricwikiurl, getlyrics from unidecode import unidecode from threading import Thread abort_symbols = '[]()<>,!%~\\"?' avoid_symbols = '.\'#' class LyricsViewer(wx.Frame): """The lyrics frame.""" def __init_...
grade2gpa: Dict[str, float] = { 'A': 4.0, 'B': 3.0, 'C': 2.0, 'D': 1.0, 'F': 0.0 }
from setuptools import setup, find_packages import sys version = '0.5' deps = ['httplib2 == 0.7.3', 'mozfile == 1.1', 'mozhttpd == 0.7', 'mozinfo == 0.7', 'mozinstall == 1.10', 'mozprocess == 0.19', 'mozprofile == 0.27', 'mozrunner == 6.0', 'mozversion == ...
from __future__ import division from __future__ import unicode_literals from mo_fabric import Connection from mo_files import File, TempFile from mo_future import text from mo_kwargs import override from mo_logs import Log from mo_logs.strings import expand_template import mo_math from spot.instance_manager import Inst...
import mrp_product_produce
"""Users views""" from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import PasswordChangeForm from django.views.generic import CreateView, FormView from django.core.urlresolvers import reverse_lazy, reverse from django.utils.translation import ugettext as _ from django.contrib imp...
{ 'name': 'Link purchase picking', 'version': '0.1', 'category': 'Purchase', 'description': ''' Link purchase picking with open order referente ''', 'author': 'Micronaet S.r.l. - Nicola Riolini', 'website': 'http://www.micronaet.it', 'license': 'AGPL-3', 'depends': [ ...
analytic_name = "event_count" modules_to_import = ['event_count']
from . import model from . import wizard
from . import models
templs = {}
import json import logging import uuid from abc import abstractmethod, ABCMeta from brainsquared.publishers.PikaPublisher import PikaPublisher from brainsquared.subscribers.PikaSubscriber import PikaSubscriber _ROUTING_KEY = "%s:%s:%s" logging.basicConfig() _LOGGER = logging.getLogger(__name__) _LOGGER.setLevel(logging...
''' Amazon media storage module''' from io import BytesIO import json import logging from mimetypes import guess_extension from superdesk.media.media_operations import download_file_from_url from superdesk.upload import upload_url import time import boto3 import bson from eve.io.media import MediaStorage logger = loggi...
from django.contrib.auth.decorators import login_required, user_passes_test from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.decorators.http import require_http_methods from attribution import models as mdl_attr from attribution.business.attribution import get_...
from .base import MyApiTestCase from privacyidea.lib.policy import set_policy, SCOPE, ACTION, delete_policy, CONDITION_SECTION from privacyidea.lib.token import remove_token class APIPolicyTestCase(MyApiTestCase): def test_00_get_policy(self): with self.app.test_request_context('/policy/', ...
import json from xmodule.modulestore import search from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem from xmodule.x_module import ModuleSystem from xmodule.open_ended_grading_classes.controller_query_service import ControllerQueryService from x...
""" Courseware services. """ import json from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from lms.djangoapps.courseware.models import StudentModule from common.djangoapps.student.models import get_user_by_username_or_email class UserStateService(object): """ User ...
from __future__ import absolute_import, unicode_literals import datetime import json import os import pytz import time from datetime import timedelta from decimal import Decimal from django.conf import settings from django.core import mail from django.core.urlresolvers import reverse from django.test.utils import overr...
import re import os import cgi import cgitb import sys import json import uuid import subprocess as sp import redis import hashlib cgitb.enable(); FILEBASE = "/home/meow/stage" g_debug = True def log_line( l ): #logf = open("/home/meow/picsentry.log", "a") logf = open("/tmp/picsentry.log", "a") logf.write( l + "...
__author__ = 'radu' from rest_framework.decorators import api_view, parser_classes, permission_classes from rest_framework.response import Response from rest_framework import status from rest_framework.permissions import AllowAny from backend.utils import validators, helpers from rest_framework.parsers import JSONParse...
from odoo import models class IrActionsReport(models.Model): _inherit = 'ir.actions.report' def _save_in_cmis(self, record, buffer): res = super()._save_in_cmis(record, buffer) bus = self.env['bus.bus'] if self.cmis_folder_field_id: # only notify on the root folder ...
from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy.ext.declarative import declarative_base from config import CONFIG, PATH from lib.utils import getPath engine = create_engine('sqlite:///{0}'.format(getPath(CONFIG['database'])), convert_un...
from jormungandr.realtime_schedule.timeo import Timeo from jormungandr.realtime_schedule.realtime_proxy_manager import RealtimeProxyManager
from flask import Flask, request, redirect, url_for from flask import render_template, session, make_response, flash import re import csv import time import subprocess import webbrowser import pandas as pd import pickle import os url = 'http://127.0.0.1:5000/admin' webbrowser.open_new_tab(url) error_list = open(os.path...
from django.core.management.base import BaseCommand from django.db import transaction from core.models import Class, CourseStudent class Command(BaseCommand): args = '' help = 'All users in classes will be enrolled in its respective courses.' @transaction.atomic def handle(self, *args, **options): ...
import os import time import argparse import multiprocessing import gym import numpy as np import pybullet_envs from stable_baselines import SAC, TD3 from pybullet_envs.stable_baselines.utils import TimeFeatureWrapper if __name__ == '__main__': parser = argparse.ArgumentParser("Enjoy an RL agent trained using Stabl...
{ 'name': 'Show selected sheets with full width', 'version': '0.1', 'license': 'AGPL-3', 'author': 'Noviat, Odoo Community Association (OCA)', 'category': 'Hidden', 'depends': [ 'web', ], 'data': [ 'views/sheet.xml', ], 'active': False, 'installable': True, ...
import sys from decodex import decode def main(): print("OK. What are you working on?") data = sys.stdin.readline().rstrip("\n") for result, stream in decode(data): print(stream.frobber, result)
import glob, os, re, setuptools, sys from os.path import join def data(): r = {} for root, dirnames, filenames in os.walk('openerp'): for filename in filenames: if not re.match(r'.*(\.pyc|\.pyo|\~)$', filename): r.setdefault(root, []).append(os.path.join(root, filename)) ...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('datapoints', '0006_build_functions'), ] operations = [ migrations.RunSQL(''' /* -- on the old server -- DROP TABLE IF EXISTS to_ingest; ...
from funnel import app from funnel.forms import ProposalLabelsAdminForm, ProposalLabelsForm from funnel.models import Proposal def test_proposal_label_admin_form( new_main_label, new_main_label_unrestricted, new_label, new_proposal, ): assert new_main_label.restricted assert not new_main_label_u...
from odoo import fields, models, api, exceptions import re class ToproerpPartner(models.Model): _inherit = "res.partner" _description = u'客户' @api.constrains('card') def _card_info(self, card=None): ''' 当身份证改变时,获取生日、年龄、性别 Errors=['验证通过!','身份证号码位数不对!','身份证号码出生日期超出范围或含有非法字符!','身份证号...
import requests from django import forms from django.core.exceptions import ValidationError from django.forms.models import ModelForm from registration.forms import RegistrationForm from tinymce.widgets import TinyMCE from django.utils.translation import ugettext as _ from django.conf import settings from vpw.models im...
import os, json from marklog import app from marklog import posts def meta(): return { "blog_title": app.config['BLOG_TITLE'], "blog_desc": app.config['BLOG_DESC'], } def listings(page = 1): limit = 15 offset = (page - 1) * limit postquery = posts.Post.query.order_by(posts.Post.postd...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course_metadata', '0024_auto_20160901_1426'), ] operations = [ migrations.RemoveField( model_name='program', name='category', ), ]
from django.core.files.base import ContentFile from django.core.validators import RegexValidator from django.db import models from django.utils.translation import ugettext_lazy as _ from helfertool.forms import RestrictedImageField from .settings import BadgeSettings import os import posixpath import uuid from copy imp...
from cassandra_tests.porting import create_table, execute, assert_invalid def testDate(cql, test_keyspace): with create_table(cql, test_keyspace, "(k int PRIMARY KEY, t timestamp)") as table: execute(cql, table, "INSERT INTO %s (k, t) VALUES (0, '2011-02-03')"); assert_invalid(cql, table, "INSERT IN...
""" REST API for getting modulestore XBlocks as OLX """ from django.http import HttpResponse from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import UsageKey from opaque_keys.edx.locator import CourseLocator from rest_framework.decorators import api_view from rest_framework.exceptions import NotFound, ...
from datetime import datetime from os import path from openfisca_core.columns import EnumCol from pandas import DataFrame from ...gui.config import CONF, get_icon from ...gui.baseconfig import get_translation from ...gui.qt.compat import from_qvariant, to_qvariant from ...gui.qt.QtGui import (QWidget, QLabel, QVBoxLayo...
import pickle as pickle import logging import re import time from datetime import datetime import pymongo import txmongo.filter from bson import DBRef from twisted.internet import defer from twisted.spread import util from ..common.db_common import get_db from ..common.singletonmixin import Singleton from . import sett...
# coding=utf-8 from os import path from django.conf import settings from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from django.template.defaultfilters import slugify from django.contrib.contenttypes import generic from datetime import datetim...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('publisher', '0075_auto_20190213_2015'), ] operations = [ migrations.AddField( model_name='historicalseat', name='masters_track', field=models.BooleanField(de...
import re import sys from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase from django.contrib.auth.models import User, AnonymousUser from openid.message import IDENTIFIER_SELECT, OPENID1_URL_LIMIT, OPENID2_NS from identityprovider.const import SESSION_TOKEN_KEY ...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('journal', '0013_journal_nav_collections'), ] operations = [ migrations.AddField( model_name='journal', name='disable_metrics_disp...
from django import forms class LoginForm(forms.Form): email = forms.EmailField(label='Email', max_length=60) password = forms.CharField(label='Senha', max_length=12, widget=forms.PasswordInput())
__author__ = 'DataKitchen, Inc.' __email__ = 'info@datakitchen.io'
import pytest from django.urls import reverse from django.core.files.uploadedfile import SimpleUploadedFile from .. import factories as f pytestmark = pytest.mark.django_db def test_create_user_story_attachment_without_file(client): """ Bug test "Don't create attachments without attached_file" """ us = ...
from hitchtest.hitch_stacktrace import HitchStacktrace, TestPosition from hitchtest.utils import log, warn from hitchtest.scenario import Scenario from hitchtest.result import Result from hitchtest.environment import verify from os import path import inspect import time import imp import re class Test(object): def ...
import unittest import PokeAlarm.Filters as Filters import PokeAlarm.Events as Events from tests.filters import MockManager, generic_filter_test class TestGymFilter(unittest.TestCase): @classmethod def setUp(cls): cls._mgr = MockManager() @classmethod def tearDown(cls): pass def gen_...
from flask import Flask import config app = Flask(__name__) app.secret_key = '?9huDM\\H' if config.get('base', 'accel-redirect') or config.get('base', 'x-sendfile'): app.use_x_sendfile = True if config.get('base', 'debug'): app.debug = True app.config['SQLALCHEMY_ECHO'] = "debug" if config.get('base', 'log_...
""" Views for django rest framework . @author: e-science Dev-team """ import logging from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.permissions import AllowAny from kamaki.clients import ClientError from authenticate_user impor...
from __future__ import unicode_literals import logging import time from datetime import timedelta from django.utils import timezone from django.core.cache import cache from djcelery_transactions import task from redis_cache import get_redis_connection from temba.utils.mage import mage_handle_new_message, mage_handle_ne...
from flask import Blueprint, render_template, current_app, flash, url_for, redirect from flask.ext.login import login_required from flask.ext.babel import gettext as _ from twilio.rest import TwilioRestClient from ..extensions import db from sqlalchemy.sql import func from ..campaign.models import TwilioPhoneNumber, Ca...
from odoo import _, api, fields, models from odoo.exceptions import ValidationError ISSUE_TYPE = [("high", "High"), ("low", "Low"), ("change", "Change"), ("note", "Note")] LOW_TYPE = [("lack of assistance", "Lack of assistance"), ("pick-up notice", "Pick-up notice")...
import re import os from lxml import etree as etree import sys import traceback import uuid import string from datetime import datetime from datetime import timedelta from dateutil.relativedelta import relativedelta from main.models import RightsStatement, RightsStatementOtherRightsInformation, RightsStatementOtherRigh...
""" """ from .route import Route __author__ = 'Martin Martimeo <martin@martimeo.de>' __date__ = '26.06.13 - 14:25' class IndexRoute(Route): """ A Index Route """ def __init__(self, url: str='/index', **kwargs): super().__init__(url=url, kwargs=kwargs) @classmethod def isindex(cls, ot...
{ "name" : "Account Journal Entry Invoice link", "version" : "1.0", "author" : "Smart Solution (fabian.semal@smartsolution.be)", "website" : "www.smartsolution.be", "category" : "Generic Modules/Base", "description": """ Easily find invoices related to a journal items """, "depends" : ["acco...
import weakref class oset(object): """ A linked-list with a uniqueness constraint and O(1) lookups/removal. Modification during iteration is partially supported. If you remove the just yielded element, it will go on to what was the next element. If you remove the next element, it will use the ...
import re import os import sys import time import copy import json import shlex import urllib import shutil import socket import fnmatch import argparse import subprocess import ConfigParser import multiprocessing import distutils from distutils import dir_util from lxml import etree from collections import defaultdict...
""" Module simtk.unit.quantity Physical quantities with units, intended to produce similar functionality to Boost.Units package in C++ (but with a runtime cost). Uses similar API as Scientific.Physics.PhysicalQuantities but different internals to satisfy our local requirements. In particular, there is no underlying set...
import pl import sys import os module_dir = "@MODULE_DIR@" if module_dir[0] == '@': module_dir = os.getcwd () sys.path.insert (0, module_dir) def main(w): w.pladv(0) w.plvsta() w.plwind(1980.0, 1990.0, 0.0, 35.0) w.plbox("bc", 1.0, 0, "bcnv", 10.0, 0) w.plcol(2) w.pllab("Year", "Widget Sales (m...
try: from PyQt4 import QtCore, QtGui QtCore.Signal = QtCore.pyqtSignal QtCore.Slot = QtCore.pyqtSlot except ImportError: try: from PySide import QtCore, QtGui except ImportError: raise ImportError("Cannot load either PyQt or PySide") from GenSyntax import * from ParamTable import * t...
import argparse import llnl.util.tty as tty import spack import spack.cmd description = "fetch archives for packages" section = "build" level = "long" def setup_parser(subparser): subparser.add_argument( '-n', '--no-checksum', action='store_true', dest='no_checksum', help="do not check packages agai...