text
stringlengths
12
6.59M
#!/usr/bin/env python from OpenGL.GL import * import pygame from level import Level class UI(object): """The main user interface object""" def __init__(self): pygame.init() self.screen = pygame.display.set_mode((800, 600), pygame.OPENGL | pygame.DOUBLEBUF) pygame.display.set_caption("Mumei") py...
#!/usr/bin/env python # web framework from bottle import Bottle, template, static_file, request, redirect, app, get, post, run # python built-ins import uuid, hashlib, shutil, string import random, subprocess, sys, os, re import cgi, urllib, urllib2, json, smtplib, time import pickle try: import requests except: ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import logging logger = logging.getLogger('cfl.main') import sys import os.path import csv import zipfile import tarfile from collections import namedtuple import click import dulwich.repo import scipy.stats import numpy from gensim...
#!/usr/bin/env python import binascii import sys import os import signal import serial import time import threading # from iteadsdk import * from threading import Timer from time import localtime, strftime import RPi.GPIO as GPIO import logging import os.path import re from logging.handlers import RotatingFileHandler f...
import sys import os os.environ['PANDA_PRC_DIR'] = os.path.join(os.path.dirname(__file__), 'etc') from direct.showbase.ShowBase import ShowBase, DirectObject from direct.gui.OnscreenImage import OnscreenImage from direct.gui import DirectGui, DirectGuiGlobals from panda3d.core import * from monster import Monster ...
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Copyright 2014-2016 BigML # # 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 requi...
#!/usr/bin/env python # Core from __future__ import print_function from decimal import * from functools import wraps import logging import math import pprint import random import re import time import ConfigParser # Third-Party import argh from clint.textui import progress import funcy import html2text from PIL im...
import pdb import sys from pymongo import Connection from pymongo.son_manipulator import SONManipulator from billy.conf import settings from billy.utils import metadata as get_metadata db = Connection(host=settings.MONGO_HOST, port=settings.MONGO_PORT) db = getattr(db, settings.MONGO_DATABASE) def get_model(class...
''' Created on 28/01/2015 @author: Iuri Gomes Diniz The MIT License (MIT) Copyright (c) 2015 Iuri Gomes Diniz 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 with...
''' Notes: This ORM approach has worked reasonably well, but because the query interface it exposes returns raw mongo cursors, they can't be easily used with certain parts of django's internals, like the 'queryset' class attribute on generic view subclasses. More tinkering neeeded. ''' import pdb import sys import iter...
import re from subprocess import check_output, STDOUT, Popen, PIPE def list(section, config, count, format, file=None): result = [] if config is None: all_configs = check_output(['git', 'config', '--list']).splitlines() elif file is not None: all_configs = check_output(['git', 'config', ...
# -*- coding: utf-8 -*- ## ## This file is part of Indico. ## Copyright (C) 2002 - 2013 European Organization for Nuclear Research (CERN). ## ## Indico 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 ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
#!/usr/bin/env python import glob import os import platform import shutil import stat import sys from distutils import log from distutils import dir_util from distutils.command.build_clib import build_clib from distutils.command.sdist import sdist from distutils.core import setup from distutils.sysconfig import get_py...
#!/usr/bin/python3 import sys import csv import os.path import urllib.request helpmessage = """Usage: install <package name> remove <package name> update upgrade """ if len(sys.argv) > 1 and len(sys.argv) <= 3: if sys.argv[1] == "install": #iterating through mod list print("Installing...") if os.path.isfil...
#!/usr/bin/env python #encoding: UTF-8 ''' 网易云音乐 Menu ''' import curses import locale import sys import os import json import time import webbrowser from api import NetEase from player import Player from ui import Ui from const import Constant import logger home = os.path.expanduser("~") if os.path.isdir(Constant.co...
""" Gets information about Tipat Halav stations """ import requests from lxml import etree def get_url(page): url = "http://www.health.gov.il/Subjects/vaccines/two_drops/Pages/Vaccination_centers.aspx?WPID=WPQ8&PN=%d" % page return url def get_full_html(url): html = requests.get(url) return html.tex...
#!/usr/bin/python #---------------------------------------------------------------------- # Copyright (c) 2011-12 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restri...
#!/usr/bin/env python #---------------------------------------------------------------------- # Copyright (c) 2011-2013 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without ...
# -*- coding: utf-8 -*- # Copyright (c) 2012-2013 Thiago B. L. Silva <thiago@metareload.com> # # 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 limitatio...
import collections from utils.response import status_response from hospitals.models import Hospitals import operator import re import time from datetime import datetime, time as dtime, timedelta from operator import itemgetter import pytz import simplejson as json from dateutil.relativedelta import relativedelta from ...
import pandas as pd from django.core.management.base import BaseCommand, CommandError from django.core.exceptions import ObjectDoesNotExist from fellowms.models import Fellow, Event, Expense def conv_date(new_date): day, month, year = new_date.split('/') return "{}-{}-{}".format(year, month, day) class Comm...
from django.apps import apps from django.db.models import Q from rest_framework import generics, permissions as drf_permissions from rest_framework.exceptions import NotFound, ValidationError from guardian.shortcuts import get_perms from api.base import permissions as base_permissions from api.base.exceptions import ...
from datetime import datetime from dateutil.relativedelta import relativedelta import json import re from flaskext.mongoalchemy import BaseQuery import requests from api import db ENDPOINT = 'http://data.nasa.gov/api/' class JSONField(db.StringField): def unwrap(self, value, *args, **kwargs): """Pass ...
import datetime import json from unittest.mock import patch from django.core.urlresolvers import reverse from rest_framework import status from api.test.base import APITestBase from api.views import ( ExportBadgesView, ExportBadgesByPersonView, ExportInstructorLocationsView, ExportMembersView, ) from ...
import json import pytz from django.contrib.auth.models import User from rest_framework import status from rest_framework.authtoken.models import Token from rest_framework.test import APITestCase from api.models import * from bot.app.repository.launches_repository import LaunchRepository def setUpModule(): prin...
''' The MIT License (MIT) Copyright (c) 2014-2019 William Ivanski 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...
# coding: utf-8 """ The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) Using the rule above and starting with 13, we generate the following sequence: 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 It can be seen that this sequence (starting at 13 and...
""" Django settings for InteractiveExalted project. Generated by 'django-admin startproject' using Django 1.11.6. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """...
import numpy as np from tabulate import tabulate from itertools import chain from PyAnalysisTools.base.YAMLHandle import YAMLLoader from PyAnalysisTools.AnalysisTools.XSHandle import XSHandle import tabulate as tb tb.LATEX_ESCAPE_RULES = {} class DatasetPrinter(object): def __init__(self, **kwargs): self....
import os import re import struct from queuelib import FifoDiskQueue import leveldb from flask import Flask, Response app = Flask(__name__) app.config.from_envvar('WEBQ_SETTINGS') QEXT = '.q' def get_qfname(qname): return os.path.join(app.config['DATAPATH'], '%s.q' % qname) def get_queues(): qs = {} fo...
# -*- coding: utf-8 -*- """ This module holds an application instance that is passed to a server such as gunicorn or uWSGI. Depending on the environment variable ``TMAPS_EXECMODE``, different configs will be loaded. This variable should be set to ``DEV``, ``TEST``, or ``PROD``. The associated configs are named ``DevCo...
from django.contrib.contenttypes.models import ContentType from django.template import (Library, Node, Template, TemplateSyntaxError, Variable, loader, RequestContext) from django_comments_xtd.models import XtdComment register = Library() class XtdCommentCountNode(Node): """Store ...
""" sqldiff.py - Prints the (approximated) difference between models and database TODO: - better support for relations - better support for constraints (mainly postgresql?) - support for table spaces with postgresql - when a table is not managed (meta.managed==False) then only do a one-way sqldiff ? show differ...
from troposphere import ( GetAtt, Join, Output, Parameter, Ref, FindInMap ) from troposphere.elasticbeanstalk import ( Application, Environment, OptionSettings ) from troposphere.iam import Role, InstanceProfile from troposphere.iam import PolicyType as IAMPolicy from awacs.aws import Allow, Statemen...
""" Cloud connected autonomous RC car. Copyright 2016 Visible Energy Inc. All Rights Reserved. """ __license__ = """ 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/lic...
from yapsy.ConfigurablePluginManager import ConfigurablePluginManager import configparser PLUGIN_CONFIG_NAME="plugins.conf" class TelegramPluginManager(ConfigurablePluginManager): def __init__(self, bot): self.config = configparser.ConfigParser() self.config.read(PLUGIN_CONFIG_NAME) supe...
#!/usr/bin/env python ################################################################## # AUTHOR: Miguel A. Ibarra-Arellano (miguelib@ufl.edu) # # DESCRIPTION: Pairwise and mean standarized euclidean comparisons ################################################################## import os import logging import argpars...
#!/usr/bin/python3.4 # -*-coding:Utf-8 -* def columnLimit(value, limit, begin = True): '''function to make sure to have a good column size''' if type(value) is not str: value = str(value) if begin is True: begin = limit if len(value) > limit: return value[0:begin-1]+'…'+value[len(value)-(limit-begin)]+'|...
""" Django accounts management made easy. """ VERSION = (1, 2, 2) __version__ = '.'.join((str(each) for each in VERSION[:4])) def get_version(): """ Returns string with digit parts only as version. """ return '.'.join((str(each) for each in VERSION[:3]))
from django.http import HttpRequest from django.conf import settings from django.contrib.auth.models import User import logging from threading import currentThread class UninitializedError(Exception): pass class UserService: _user_data = {} logger = logging.getLogger(__name__) def _get_current_use...
# -*- coding: utf-8 -*- import unittest from openprocurement.tender.limited.tests.base import ( BaseTenderContentWebTest, test_tender_data, test_tender_negotiation_data, test_tender_negotiation_quick_data, test_organization, test_lots, test_tender_negotiation_data_2items, test_tender_negotiation_quick_data...
from django.db import models # Create your models here. class Poll(models.Model): question = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') class Choice(models.Model): poll = models.ForeignKey(Poll) choice_text = models.CharField(max_length=200) votes = models....
# -*- coding: utf-8 -*- # Copyright(C) 2010 Christophe Benz, Romain Bignon # # 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, version 3 of the License. # # This program is distributed in the ho...
# -*- coding: utf-8 -*- import os import httplib import logging import functools from modularodm.exceptions import NoResultsFound from modularodm.exceptions import ValidationValueError from modularodm.storage.base import KeyExistsException from framework.exceptions import HTTPError from website.addons.osfstorage imp...
# encoding: utf-8 import httplib import logging from flask import request from framework.auth import Auth from framework.flask import redirect from framework.exceptions import HTTPError from framework.analytics import update_counter from framework.auth.decorators import must_be_signed from website.models import Use...
from __future__ import unicode_literals import httplib import logging from modularodm import Q from modularodm.exceptions import NoResultsFound from modularodm.storage.base import KeyExistsException from framework.auth import Auth from framework.exceptions import HTTPError from framework.auth.decorators import must_...
""" Mezzanine page processors for jdpages. Read the mezzanine documentation for more info. """ import logging logger = logging.getLogger(__name__) from mezzanine.blog.views import blog_post_list from mezzanine.pages.page_processors import processor_for from mezzanine.pages.models import RichTextPage from website.jdp...
from __future__ import absolute_import, division # Extensions to NXMX # # "detector/underload" - trusted_range[0] # "detector/timestamp" - epochs # "entry/index" - experiment index and shared model indices # "entry/template" - save location to external files (e.g. cbf) schema_url = 'https://github.com/nexusformat...
#!/usr/bin/env python # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # To update specified repositories to default tip and provide a short list of latest checkins. ...
""" The minimum needed to take a response and render a response - url mapper utility - wsgiwrapper """ from werkzeug.routing import Map, Rule from werkzeug.exceptions import HTTPException from werkzeug.wrappers import Request, Response import json class JsonResponse(Response): """ Just like a classic Respons...
# -*- coding: utf-8 -*- import datetime import httplib as http from flask import request from modularodm import Q from modularodm.exceptions import NoResultsFound from modularodm.exceptions import ValidationValueError import framework.auth from framework.auth import cas, campaigns from framework import forms, statu...
import random from collections.abc import Sequence from copy import deepcopy NUCLIDES = {'natural_uranium': [{'id': 'U235', 'comp': 0.00711}, {'id': 'U238', 'comp': 0.99289}], 'low_enriched_uranium': [{'id': 'U235', 'comp': [0.03, 0.05]}, ...
""" Define UVParameters: data and metadata objects for interferometric data sets. UVParameters are objects to hold specific data and metadata associated with interferometric data sets. They are used as attributes for classes based on UVBase. This module also includes specialiazed sublasses for particular types of meta...
import importlib from os.path import join from django.conf import settings from django.core.management.base import BaseCommand, CommandError from geotrek.common.parsers import ImportError class Command(BaseCommand): leave_locale_alone = True def add_arguments(self, parser): parser.add_argument('par...
"""Methods for handling storm images. A "storm image" is a radar image that shares a center with the storm object (in other words, the center of the image is the centroid of the storm object). """ import os import copy import glob import numpy import pandas import netCDF4 from gewittergefahr.gg_io import netcdf_io fr...
# imports - standard imports import atexit import compileall import hashlib import os import re import shutil import sys # imports - third party imports import click # imports - module imports import frappe from frappe import _ from frappe.commands import get_site, pass_context from frappe.commands.scheduler import _...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt """This module handles the On Demand Backup utility""" from __future__ import print_function, unicode_literals import os import json from datetime import datetime import frappe from frappe import _, conf from frappe....
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
''' -- imports from python libraries -- ''' # from datetime import datetime import datetime import json ''' -- imports from installed packages -- ''' from django.http import HttpResponseRedirect # , HttpResponse uncomment when to use from django.http import HttpResponse from django.http import Http404 from django.sho...
from rl.agent.dqn import DQN from keras.layers.core import Dense, Flatten from keras.layers.convolutional import Convolution2D from keras.optimizers import RMSprop from keras import backend as K class ConvDQN(DQN): def __init__(self, *args, **kwargs): super(ConvDQN, self).__init__(*args, **kwargs) d...
from datetime import timedelta, datetime from django.shortcuts import render, get_object_or_404, redirect from django.core.urlresolvers import reverse from django.http import Http404 from django.contrib import auth from django.contrib import messages from django.utils.translation import ugettext as _ from django.views...
''' -- imports from python libraries -- ''' # from datetime import datetime import datetime import json import ast ''' -- imports from installed packages -- ''' from django.http import HttpResponseRedirect # , HttpResponse uncomment when to use from django.http import HttpResponse from django.http import Http404 from ...
import datetime import hashlib import urllib.parse import requests from django.core.management.base import OutputWrapper from django.db.models import Q from requests_toolbelt import MultipartEncoder from appconf.manager import SettingManager from requests import Session from requests.auth import HTTPBasicAuth from ze...
import numpy as np import math import multiprocessing as mp import time from flare.gp_algebra import get_like_from_ky_mat, get_like_grad_from_mats def get_ky_mat(hyps: np.ndarray, training_data: list, kernel, cutoffs=None, hyps_mask=None): # assume sigma_n is the final hyperparameter number_of_...
from datetime import timedelta from urllib.parse import urlencode from django.shortcuts import render, get_object_or_404, redirect from django.urls import reverse from django.http import Http404 from django.contrib import auth from django.views.generic import FormView from django.contrib.auth.views import PasswordRese...
''' -- imports from python libraries -- ''' # from datetime import datetime import datetime import json import ast ''' -- imports from installed packages -- ''' from django.http import HttpResponseRedirect # , HttpResponse uncomment when to use from django.http import HttpResponse from django.http import Http404 from ...
""" Copyright [2009-2014] 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 warnings import re import csv import mimetypes import time from math import ceil from werkzeug import secure_filename from flask import (current_app, request, redirect, flash, abort, json, Response, get_flashed_messages, stream_with_context) from jinja2 import contextfunction try: import...
# -*- coding: utf-8 -*- from typing import cast, Any, Dict import mock import json import requests from zerver.lib.outgoing_webhook import ( get_service_interface_class, process_success_response, ) from zerver.lib.test_classes import ZulipTestCase from zerver.models import Service, get_realm, get_user, SLACK_...
from bipy.utils import append_stem from rpy2 import robjects import os from bipy.log import logger ORG_TO_ENSEMBL = {"opossum": {"gene_ensembl": "mdomestica_gene_ensembl", "gene_symbol": "hgnc_symbol"}, "mouse": {"gene_ensembl": "mmusculus_gene_ensembl", ...
""" Update: It condiders the sequence as DNA by default unless it contains Uracil. Short sequences of RNA not containing Uracil will be reversed as DNA! Exercice 1.3.2 ReverseComplement Description: Reverse complement a nucleotide pattern. Input: A DNA (or RNA) string seq. Output: the reverse complement of s...
#! /usr/bin/python from __future__ import with_statement # needed under Python 2.5 (Leopard default) import couch import image from importer import Importer from time import sleep import os import json CONFIG = os.path.dirname(os.path.abspath(__file__)) + '/local.config.ini' class LocalHelper(couch.External): ...
import re from flask import Blueprint, render_template, flash, redirect, url_for, request, send_file from flask.ext.login import login_required from flask.ext.babel import gettext, ngettext, lazy_gettext from forms import GeneralModelConverter from .filemanager import uuid_originalname from .security.decorators import ...
'''Fairly basic set of tools for real-time data augmentation on image data. Can easily be extended to include new transformations, new preprocessing methods, etc... ''' from __future__ import absolute_import from __future__ import print_function import numpy as np import glob import re import scipy from scipy import l...
# -*- coding: utf-8 -*- """ flask.ext.plugins ~~~~~~~~~~~~~~~~~ The Plugin class that every plugin should implement :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import os from werkzeug.utils import import_string from flask import current_app def get_...
# -*- coding: utf-8 -*- """ Birdiescript built-in definitions. """ #################### Imports #################### from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from .core import * #################### Utility functions #########...
from __future__ import absolute_import import difflib from functools import wraps, partial import re from flask import request, url_for from flask import abort as original_flask_abort from flask.views import MethodView from flask.signals import got_request_exception from werkzeug.exceptions import HTTPException, Method...
from flask import request from werkzeug.datastructures import MultiDict import flask_restful class Namespace(dict): def __getattr__(self, name): try: return self[name] except KeyError: raise AttributeError(name) def __setattr__(self, name, value): self[name] = va...
# -*- coding: utf-8 -*- def log_request(self): log = self.server.log if log: if hasattr(log, 'info'): log.info(self.format_request() + '\n') else: log.write(self.format_request() + '\n') # Monkeys are made for freedom. import gevent from geventwebsocket.gunicorn.worker...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. # -*- test-case-name: flocker.volume.test.test_service -*- """Volume manager service, the main entry point that manages volumes.""" from __future__ import absolute_import import os import json import stat from uuid import UUID, uuid4 from characteristic i...
import os import re import subprocess import time import log from collections import namedtuple Video = namedtuple('Video', ['fs_path', # Path to find this flight on disk 'upload_path', # Upload path for the raw data ]) class GoPro(object): # TODO Th...
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ EPI MRI -processing workflows. Originally coded by Craig Moodie. Refactored by the CRN Developers. """ import os import os.path as op from nipype.pipelin...
""" Terminal control sequences see: https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_codes inspired by https://github.com/gwk/gloss/blob/master/python/gloss/io/cs.py """ import os import sys import tty import signal import re import termios import logging from . import events _SIGWINCH_COUNTER = 0 QUERY_CURSOR...
# the different frameworks interfer with each other and # sometimes cause segfaults or similar problems; # choosing the right import order seems to be a # workaround; given the current test order, # first import tensorflow, then pytorch and then # according to test order seems to solve it import tensorflow print(tensor...
# # Copyright 2014 Infoxchange Australia # # 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...
"Definitions of fields in APT.txt" APT_RECORDS = ( ('record_type', 3), ('facility_site_number', 11), ('facility_type', 13), ('location_identifier', 4), ('information_effective_date', 10), ('faa_region_code', 3), ('faa_district_office_code', 4), ('associated_state_post_office_code', 2), ...
__version__ = "0.4.12"
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy...
from __future__ import unicode_literals import re import frappe from frappe import _ from frappe.utils import cstr, cint, flt class InvalidColumnName(frappe.ValidationError): pass class DBTable: def __init__(self, doctype, meta=None): self.doctype = doctype self.table_name = 'tab{}'.format(doctype) self.met...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import json from frappe import _ from frappe.boot import get_allowed_pages, get_allowed_reports from frappe.desk.doctype.desktop_icon.desktop_icon import set_hidden,...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Tree (Hierarchical) Nested Set Model (nsm) # # To use the nested set model, # use the following pattern # 1. name your parent field as "parent_item_group" if not have a property nsm_parent_field as your field name in ...
import os, json, inspect import mimetypes from html2text import html2text from RestrictedPython import compile_restricted, safe_globals import RestrictedPython.Guards import frappe import frappe.utils import frappe.utils.data from frappe.website.utils import (get_shade, get_toc, get_next_link) from frappe.modules impo...
from frasco.ext import * from frasco.utils import import_class from flask import send_from_directory from flask.wrappers import Request from werkzeug import FileStorage from io import BytesIO from tempfile import TemporaryFile import uuid import os from .backend import StorageBackend, split_backend_from_filename from ...
""" Top-level module to build or re-build the JSON files for FRB host galaxies""" from pkg_resources import resource_filename import os import sys from IPython import embed import numpy as np from astropy.coordinates import SkyCoord from astropy import units from astropy.table import Table from astropy.coordinates ...
""" Top-level module to build or re-build the JSON files for FRB host galaxies""" from pkg_resources import resource_filename import os import sys import warnings from IPython import embed import numpy as np from astropy.coordinates import SkyCoord from astropy import units from astropy.table import Table from astr...
# -*- coding: utf-8 -*- from baseframe import _ from flask import request, render_template, jsonify from coaster.views import load_models from coaster.sqlalchemy import failsafe_add from .helpers import localize_date from .. import app, funnelapp, lastuser from ..models import db, Profile, Proposal, ProposalRedirect,...
""" funsize.frontend.api ~~~~~~~~~~~~~~~~~~ This module contains all the Flask related code for routing and handling the API call parameters """ import argparse import ConfigParser import flask import logging import os import sys import funsize.cache.cache as cache import funsize.backend.tasks as tasks import funsi...
# Superclass for spherical distribution functions, contains # - sphericaldf: superclass of all spherical DFs # - anisotropicsphericaldf: superclass of all anisotropic spherical DFs import numpy import pdb import scipy.interpolate from .df import df, _APY_LOADED from ..potential import flatten as flatten_potential f...