text
stringlengths
12
6.59M
import copy import json import logging import redis import sys from xbrowse.core.constants import GENOME_VERSION_GRCh37, GENOME_VERSION_GRCh38, ANNOTATION_GROUPS_MAP, \ ANNOTATION_GROUPS_MAP_INTERNAL from xbrowse.core.genomeloc import get_chr_pos import settings import time from xbrowse import genomeloc from xbr...
""" This library offers an API to use Tacyt in a python environment. Copyright (C) 2015 Eleven Paths """ from tacyt_sdk.utils import to_camel_case def _to_camel_case(field_name): if field_name == "app_url": return "appURL" if field_name == "direct_download_url": return "directDownloadURL" ...
import sys sys.path.append('C:/Users/A/Google Drive/Reddit/Reddit Bots/ActiveBots') from UniversalFunctions import * sys.path.append('') import random class Record(object): def __init__(self, submission, connection): # I'm immediately grabbing the submission and holding it in my object so I don't need to ...
""" Copyright 2015-2017 Knights Lab, Regents of the University of Minnesota. This software is released under the GNU Affero General Public License (AGPL) v3.0 License. """ import hashlib import os import subprocess from collections import defaultdict from contextlib import contextmanager from timeit import default_ti...
def stat_all_scale_denominators(stat): return sorted(list(set([ v['selector']['min_scale'] for v in stat['statements'] ] + \ [ v['selector']['max_scale'] for v in stat['statements'] if v['selector']['max_scale'] != None ])), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from django.core.exceptions import ImproperlyConfigured from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible, force_text from django.utils.translation import u...
import logging import pandas as pd import numpy as np from tardis.plasma.properties.base import ProcessingPlasmaProperty logger = logging.getLogger(__name__) __all__ = ['LevelNumberDensity', 'LevelNumberDensityHeNLTE'] class LevelNumberDensity(ProcessingPlasmaProperty): """ Calculates the level populations...
import warnings from typing import Any from phi import math from phi.geom import Geometry, GridCell, Box, Point from ._field import SampledField from ..geom._stack import GeometryStack from ..math import Tensor, instance from ..math.extrapolation import Extrapolation class PointCloud(SampledField): """ A poi...
import paypalrestsdk import warnings from decimal import Decimal from django.conf import settings from django.conf.urls import url from django.core.exceptions import ImproperlyConfigured from django.http.response import HttpResponseRedirect, HttpResponseBadRequest from django.urls import NoReverseMatch, resolve, rever...
from tcga_encoder.utils.helpers import * from tcga_encoder.data.data import * from tcga_encoder.analyses.everything_functions import * from tcga_encoder.analyses.everything_long import * from tcga_encoder.analyses.survival_functions import * import networkx as nx #try: from networkx.drawing.nx_agraph import graphviz_la...
# Copyright (C) 2010-2011 Mathijs de Bruin <mathijs@mathijsfietst.nl> # # This file is part of django-shopkit. # # django-shopkit 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 2, or (at...
from pilkit.lib import Image, ImageColor, ImageEnhance class ProcessorPipeline(list): """ A :class:`list` of other processors. This class allows any object that knows how to deal with a single processor to deal with a list of them. For example:: processed_image = ProcessorPipeline([ProcessorA...
# -*- coding: utf-8 -*- """ Description: Provides a general html tree class, Element (often imported as E). This file is part of NearlyPurePythonWebAppDemo https://github.com/Michael-F-Ellis/NearlyPurePythonWebAppDemo Compatibilty with Transcrypt Python to JS transpiler: By design, this module is intended for use...
# File: say.py # Purpose: 0 to 999,999,999,999 and spell out that number in English. # Programmer: Amal Shehu # Course: Exercism # Date: Wednesday 8th September 2016, 10:00 PM # #### Step 1 def say(num): num_dict = {0: 'zero', 1: 'one', 2: 'two', 3: 'three', 4: 'four', 5: 'five'...
from tokenizer import GameEvent, NewClient, PlayerinfoChange, KillClient, ItemPickup, Kill, InitGame, TeamName, Chat, WeaponStats, EndGame, ServerTime, TeamScore, FlagCapture, FlagReturn, FlagAssistReturn, FlagCarrierKill, FlagDefend, BaseDefend, FlagAssistFrag, CarrierDefend, Score from awards import give_awards from ...
"""Script which makes plots of scaling. To use this, must copy in the scaling times from profiling benchmark.py with cProfile.""" import numpy as N import matplotlib.pyplot as PLT class Scaling(object): def __init__(self): pass def lin_n1p_rainier(): """Scaling of lin_combine on rainier, one node"""...
# # Copyright (c) 2004 Specifix, 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.opensource.org/li...
# Author: Amund M. Raniseth # Date: 01.07.2021 import os from pathlib import Path import logging import cellpy import matplotlib.pyplot as plt #### WORK IN PROGRESS #### def plot(files): cellpyobjects = [] for file in files: cellpyobjects.append(cellpy.get(filename = file)) print...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Stephane Chamberland <stephane.chamberland@canada.ca> # Copyright: LGPL 2.1 """ Module vgd.base contains python wrapper to main vgrid C functions Notes: The functions described below are a very close ''port'' from the original [[Vgrid]] package.<br> ...
# Copyright 2013 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. from telemetry.internal.util import atexit_with_log import inspect import logging import os from collections import defaultdict def GetChildPids(processes...
#!/usr/bin/env python # 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 # # Authors: # - Mario Lassnig, mario.lassnig@cern.ch, 2017 # This is a stub...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC # # 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 re KNOWN_NAMED_EXAMPLES = { ('message', 'string'): "'Hello there!'", ('expires_at', 'date'): 'datetime.timedelta(minutes=5)', ('until_date', 'date'): 'datetime.timedelta(days=14)', ('view_messages', 'true'): 'None', ('send_messages', 'true'): 'None', ('limit', 'int'): '100', ('hash'...
#!/usr/bin/env python # 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 # # Authors: # - Mario Lassnig, mario.lassnig@cern.ch, 2016-2017 # - Daniel Dr...
# Copyright 2014 Openstack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
#!/usr/bin/env python2.7 # 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/. # sccache is a ccache-like tool. It is used as a compiler wrapper and # avoids compilation whe...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# # The Qubes OS Project, https://www.qubes-os.org/ # # Copyright (C) 2017 Wojtek Porczyk <woju@invisiblethingslab.com> # # 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...
"""The Session class allows for a unified (and simplified) view of interfacing with a PostgreSQL database server. Connection details are passed in as a PostgreSQL URI and connections are pooled by default, allowing for reuse of connections across modules in the Python runtime without having to pass around the object h...
#!/usr/bin/env python # coding: utf8 #from django.shortcuts import render from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.http import HttpResponseForbidden, HttpResponseRedirect, Http404 ...
#!/usr/bin/env python # coding: utf-8 # References: # man curl # https://curl.haxx.se/libcurl/c/curl_easy_getinfo.html # https://curl.haxx.se/libcurl/c/easy_getinfo_options.html # http://blog.kenweiner.com/2014/11/http-request-timings-with-curl.html from __future__ import print_function import os import json import s...
# coding: utf-8 # References: # man curl # https://curl.haxx.se/libcurl/c/curl_easy_getinfo.html # https://curl.haxx.se/libcurl/c/easy_getinfo_options.html # http://blog.kenweiner.com/2014/11/http-request-timings-with-curl.html from __future__ import print_function import os import json import sys import tempfile imp...
import math from operator import and_, or_ import types from hwt.hdlObjects.operatorDefs import concatFn from hwt.hdlObjects.constants import DIRECTION from hwt.hdlObjects.typeShortcuts import hInt, vec, vecT from hwt.hdlObjects.types.defs import BIT from hwt.hdlObjects.types.enum import Enum from hwt.hdlObjects.types...
# coding: utf-8 from __future__ import unicode_literals import traceback def get_error(title, *args, **kwargs): template = '\n\n\t\033[91m\033[1m{title}\033[0m{info}{tb}\n' info = '\n' + '\n'.join(['\t' + arg for arg in args]) if args else '' tb = _get_traceback(kwargs['tb']) if 'tb' in kwargs else '' ...
#!/usr/bin/env python """ Thorium ======= Thorium is a project that combines various python modules and tools originally sourced from Nukepedia. It provides a streamlined way of managing their versions and customizing the installation. While thorium ships as a complete package, individual submodules can be activated...
from contextlib import contextmanager from pathlib import Path from typing import Any, Dict, Iterator, List, Union, Optional, Callable, ContextManager import os import tempfile from test_driver.logger import rootlog from test_driver.machine import Machine, NixStartScript, retry from test_driver.vlan import VLan from t...
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/globocom/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com '''This is the main module in thumbor''' __version__ = "0.9.4"
# $Id$ import sys, re, os, Cookie, errno try: import cStringIO as StringIO except ImportError: import StringIO """Object-oriented CGI interface.""" class Error(Exception): """The base class for all exceptions thrown by this module.""" pass class SequencingError(Error): """The exception thrown when functi...
import boto3, os from tibanna.utils import ( printlog, upload, read_s3 ) # from datetime import timezone from datetime import datetime from datetime import timedelta # instance_id = 'i-0167a6c2d25ce5822' # filesystem = "/dev/xvdb" # filesystem = "/dev/nvme1n1" class TibannaResource(object): def __ini...
# -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing from flask import g import datetime from flask import render_template DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT...
# -*- coding: utf-8 -*- import os import logging from pyramid.config import Configurator from pyramid.session import SignedCookieSessionFactory from pyramid.view import view_config from pyramid.events import NewRequest, subscriber from pyramid.httpexceptions import HTTPFound, HTTPInternalServerError from pyramid.authe...
from copy import deepcopy import numpy as _np import matplotlib.pylab as plt from matplotlib.colors import LogNorm from atmPy.tools import plt_tools, math_functions, array_tools from atmPy.tools import pandas_tools as _panda_tools from atmPy.general import timeseries as _timeseries from atmPy.general import vertical_...
""" Django settings for htxaarhuslan project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ impo...
from django.core.urlresolvers import reverse from django.http import Http404 from django.views.generic import DetailView, ListView, RedirectView from proposals.models import TalkProposal from .models import SponsoredEvent class AcceptedTalkMixin: queryset = ( TalkProposal.objects .filter(accepte...
import os, time, numbers, math import pygame from .utils import cached_property # colors from http://clrs.cc/ color_map = { 'aqua': (127, 219, 255), 'blue': (0, 116, 217), 'navy': (0, 31, 63), 'teal': (57, 204, 204), 'green': (46, 204, 64), 'olive': (61, 153, 112), 'lime': (1, 255, 112), ...
"""Module for generating Binary to Alphabet resource.""" from PIL import Image, ImageDraw, ImageFont from utils.retrieve_query_parameter import retrieve_query_parameter def resource_image(request, resource): """Create a image for Binary to Alphabet resource. Args: request: HTTP request object ...
import cmor import cdo import cmor_utils import cmor_source import dateutil import gribapi import os # Experiment name exp_name_=None # Table root table_root_=None # Files that are being processed in the current execution loop. ifs_gridpoint_file_=None ifs_spectral_file_=None # List of depth axis ids with cmor grid...
# for execution in Cloud Functions Python 3.7.1 # modify these variables for your environment: project = 'automating-cost-optimization' authorizedUsername = "postman" authorizedPassword = "postman" # imports import datetime import googleapiclient from googleapiclient import discovery from oauth2client.client import G...
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
#!/bin/python # Copyright (c) 2013, Arvid Norberg # 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 l...
# -*- coding: utf-8 -*- """test class""" import unittest from plasoscaffolder.bll.mappings.mapping_helper import MappingHelper from tests.test_helper import path_helper class MappingHelperTest(unittest.TestCase): """ Class representing a test case for the mapping helper functions. """ def setUp(self): self....
# Pseudocolor any grayscale image import os import cv2 import numpy as np from matplotlib import pyplot as plt from plantcv.plantcv import params from plantcv.plantcv import fatal_error from plantcv.plantcv.apply_mask import apply_mask def pseudocolor(gray_img, obj=None, mask=None, cmap=None, background="image", min...
#!/bin/env python # # AutoPyfactory batch status plugin for Condor # Dedicated to handling VM job submissions and VM pool startds. import commands import subprocess import logging import os import time import threading import traceback import xml.dom.minidom import sys from datetime import datetime from pprint i...
""" .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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....
import numpy as np from numba import cuda, float32, int32, void from numba.core.errors import TypingError from numba.cuda.testing import unittest, CUDATestCase from numba.cuda.testing import skip_on_cudasim from .utils import test_struct_model_type GLOBAL_CONSTANT = 5 GLOBAL_CONSTANT_2 = 6 GLOBAL_CONSTANT_TUPLE = 5, 6...
#!/bin/python # Copyright (c) 2013, Arvid Norberg # 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 l...
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team # # 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 ...
# # Author    : Manuel Bernal Llinares # Project   : trackhub-creator # Timestamp : 18-09-2017 09:48 # --- # © 2017 Manuel Bernal Llinares <mbdebian@gmail.com> # All rights reserved. # """ This toolbox models assembly mapping services between Ensembl and UCSC """ import abc # Application imports import config_manag...
# coding=utf-8 # Copyright 2021 Google Research and The HuggingFace Inc. team. 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/LICE...
from zou.app.blueprints.export.csv.base import BaseCsvExport from zou.app.models.entity import Entity from zou.app.models.entity_type import EntityType from zou.app.models.person import Person from zou.app.models.project import Project from zou.app.models.time_spent import TimeSpent from zou.app.models.task import Tas...
from typing import List, Optional from hwtHls.clk_math import start_of_next_clk_period from hwtHls.netlist.nodes.io import HlsWrite from hwtHls.netlist.nodes.ops import HlsConst, AbstractHlsOp from hwtHls.scheduler.errors import TimeConstraintError from hwt.pyUtils.uniqList import UniqList def _asap(node: AbstractHl...
import logging import os from ..DatabaseInterface import DatabaseInterface from ..BackgroundProcess import BackgroundProcess from .MaterialsCommonsGlobusInterface import MaterialsCommonsGlobusInterface from .BuildProjectExperiment import BuildProjectExperiment from ..mcexceptions import MaterialsCommonsException from ....
# coding=utf-8 # Copyright 2021 The Fairseq Authors The HuggingFace Inc. team. 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/LICE...
""" HTTP controllers for the HXL Proxy David Megginson January 2015 License: Public Domain Documentation: http://hxlstandard.org """ import flask, hxl, io, json, requests, requests_cache, urllib, werkzeug from io import StringIO from . import app, auth, cache, dao, filters, preview, special, util, validate, excepti...
# Game made by GR8 from Legend Family. import discord from discord.ext import commands from cogs.utils import checks from .utils.dataIO import dataIO, fileIO from collections import Counter, defaultdict, namedtuple from .utils.chat_formatting import box from __main__ import send_cmd_help import os from copy import dee...
# Copyright 2017 Google 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/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from odoo import models from odoo.tests.common import SavepointCase class BaseKanbanAbstractTester(models.TransientModel): _name = 'base.kanban.abstract.tester' _inherit = 'base.kanban.a...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import requests import json from bs4 import BeautifulSoup INSPECTION_DOMAIN_NAME = b'http://info.kingcounty.gov' INSPECTION_PATH = b'/health/ehs/foodsafety/inspections/Results.aspx' INSPECTION_PARAMETERS = {'Output': 'W', 'Busines...
''' Show log output of program: To show the chalmers program control log, run: chalmers log server1 -3 ''' from __future__ import unicode_literals, print_function from argparse import RawDescriptionHelpFormatter import logging import os import sys import time from chalmers import config from chalmers.program ...
import utils import warnings class provider(object): '''Base provider class. Intended to be Inherited from''' def seek(self, offset): '''Seek to a particular offset''' raise NotImplementedError('Developer forgot to overload this method') def consume(self, amount): '''Read some numbe...
# -*- coding: utf-8 -*- # ocitysmap, city map and street index generator from OpenStreetMap data # Copyright (C) 2010 David Decotigny # Copyright (C) 2010 Frédéric Lehobey # Copyright (C) 2010 Pierre Mauduit # Copyright (C) 2010 David Mentré # Copyright (C) 2010 Maxime Petazzoni # Copyright (C) 2010 Thomas Petaz...
from acd import BooleanParameter, ToggleParameter class ApplicationRef(object): """ A reference to an application EMBOSS App, EMBASSY App, of build binary """ def __init__(self, name, embassy_package=None, is_build=False): self.name = name if embassy_package: self.embass...
import logging from argparse import ArgumentParser from httplib import BadStatusLine from traceback import print_exc from urllib2 import HTTPError from urllib2 import URLError from bs4 import BeautifulSoup from srs.db import download_db from srs.db import open_db from srs.db import open_dt from srs.db import show_tab...
import re from time import sleep from cassandra import (InvalidRequest, ReadFailure, ReadTimeout, Unauthorized, Unavailable, WriteFailure, WriteTimeout) from cassandra.query import SimpleStatement from nose.tools import (assert_equal, assert_false, assert_regexp_matches, ...
from utils.db_base import read_record __author__ = 'chengxue' from taskflow import task from utils.db_handlers import tenants as db_handler import logging from utils.helper import * from keystoneclient import exceptions as keystone_exceptions from utils.resourcetype import ResourceType from utils import exceptions L...
""" Pyrex wrapper to provide python interfaces to PROJ.4 (http://proj.maptools.org) functions. Performs cartographic transformations (converts from longitude,latitude to native map projection x,y coordinates and vice versa, or from one map projection coordinate system directly to another). Example usage: >>> from p...
#!/usr/bin/env python import curses, cv from random import choice from os import environ class PyCamera(object): kPALETTE_A = list(' .,/c(@#8') kPALETTE_B = list(' .;-:!>7?Co$QHNM') kPALETTE_C = list(' .,:;irsXA253hMHGS#9B&@') def __init__(self, stdscr): self._palette = None self.stds...
# -*- coding: utf-8 -*- from bs4 import BeautifulSoup import copy from random import shuffle, random import requests import re import sys import sqlite3 import time LIST_CHARID_RE = re.compile('animedb.pl\?show=character&amp;charid=(\d+)') PAGE_URL_TEMPLATE = 'https://anidb.net/perl-bin/animedb.pl?{}' CHARACTER_PAGE...
#!/usr/bin/env python import csv import logging import os import re import smtplib import sys from datetime import datetime from email import message from time import sleep import config # setup logging to specified log file logging.basicConfig(filename=config.LOG_FILENAME, level=logging.DEBUG) class PyMailer(): ...
#modocDB/scraper.py """ Scrapes the Missouri Department of Corrections Offender web search site for offender data. Stores in MongoDB collection """ #import lxml #TODO: implement this to speed up parsing import os import psycopg2 import urlparse import requests from bs4 import BeautifulSoup class docScraper: def ...
#!/usr/bin/python import subprocess ### PYMALLET class pymallet(object): """class documentation string""" def __init__(self): print "Welcome to pymallet" pass ### POSSIBLY INCLUDE A FUNCTION TO DO BASIC PRE-PROCESSING LIKE REMOVING ### STOPWORDS AND STEMMING ### INPUT A CSV FILE AND RETURN A TEMPORARY ...
import logging from argparse import ArgumentParser from traceback import print_exc from urllib2 import HTTPError from srs.db import download_db from srs.db import open_db from srs.db import open_dt from srs.db import show_tables from srs.scrape import scrape_facebook_url from srs.scrape import scrape_soup from srs.scr...
#!/usr/bin/env python """This module is for reading ACE-format cross sections. ACE stands for "A Compact ENDF" format and originated from work on MCNP_. It is used in a number of other Monte Carlo particle transport codes. ACE-format cross sections are typically generated from ENDF_ files through a cross section proc...
from instagram.client import InstagramAPI from alchemyapi import AlchemyAPI from datetime import datetime, timedelta import math import json api = InstagramAPI(client_id='64de641b01d648779939696d77ccff38', client_secret='043233db9a2c4c13a40a442c7bee0c43') alchemyapi = AlchemyAPI() OUTFILE = "results.json" def fetchLa...
#!/usr/bin/env python """This module is for reading ACE-format cross sections. ACE stands for "A Compact ENDF" format and originated from work on MCNP_. It is used in a number of other Monte Carlo particle transport codes. ACE-format cross sections are typically generated from ENDF_ files through a cross section proc...
from django.conf.urls import * from views import * from django.views.generic.simple import direct_to_template urlpatterns = patterns('questionnaire.views', #url(r'^/$', view = '<view_name>',name = 'a_name'), url (r'^$', direct_to_template, { 'template': 'a...
# # Scraping Utilities # import urllib import logging from collections import OrderedDict # # Retrieves a URL to the card's image as represented by http://magiccards.info # def getCardImageURL(cardName, cardSet): magicInfoURL = "http://magiccards.info/query?q=" + urllib.quote(cardName) if cardSet: ...
# # # Copyright (C) 2007, 2008 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distri...
import re import sys import operator import numpy as np import numpy.linalg as linalg from sets import Set import pdb high_cost = ['ARRAYLEN_GC_OP', 'STRLEN_OP', 'STRGETITEM_OP', 'GETFIELD_GC_PURE_OP', 'GETFIELD_RAW_PURE_OP', 'GETARRAYITEM_GC_PURE_OP', 'GETARRAYITEM_RAW_PURE_OP', 'UNICODEL...
## Copyright 2015-2018 Tom Brown (FIAS), Jonas Hoersch (FIAS) ## 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. ## T...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2013, Bruno Gonzalez <stenyak@stenyak.com>. This software is licensed under the Affero General Public License version 3 or later. See the LICENSE file. import os, urllib, time import json from functools import wraps from flask import request, g, session, ...
# coding: utf-8 """ Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path opera...
# coding: utf-8 """ Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path opera...
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Oros # Contributors : puyoulu, 1kali2kali # 2017/08/01 # License : CC0 1.0 Universal """ This program shows you IMSI numbers of cellphones around you. /!\ This program was made to understand how GSM network work. Not for bad hacking ! What you need : 1 PC 1 USB D...
#coding: utf-8 import os import glob from django.test import TestCase from django.test import Client from django import template from django.db.models import get_model from django.contrib.auth.models import User from ocradmin.core.tests import testutils from nodetree import script, node class Testmaker(TestCase): ...
#!/usr/bin/env python3 # Copyright 2021 Stanford University, NVIDIA Corporation # # 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 ...
import datetime from functools import total_ordering from racconto.settings_manager import SettingsManager as SETTINGS # # Content containers (Post and Page) # class ContentBase(object): """ Base class for compiled content """ def __init__(self, options): self.title = options["title"] self.tem...
import collections from copy import deepcopy import simplejson as json from django.conf import settings from django.contrib.auth.decorators import login_required from django.db.models import Q from django.http import HttpResponse from django.shortcuts import render from django.utils import dateformat from django.views...
import discord from discord.ext import commands from redbot.core import Config from datetime import datetime import os import sys import asyncio import glob from subprocess import PIPE, Popen from threading import Thread import shlex try: from Queue import Queue, Empty except ImportError: from queue import Queue, ...
#!/usr/bin/env python # # Copyright (C) 2019 The Falco Authors. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...