text
stringlengths
17
737k
from _libopenzwave import ffi, lib from libopenzwave import __version__ from libopenzwave._global import COMMAND_CLASS_DESC, PyNotifications class PyManager(object): COMMAND_CLASS_DESC = COMMAND_CLASS_DESC @classmethod def getOzwLibraryVersion(cls): return ffi.string(lib.CManagerGetVersionAsStr...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """An extensible ASCII table reader and writer. cds.py: Classes to read CDS / Vizier table format :Copyright: Smithsonian Astrophysical Observatory (2011) :Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu), \ Suyog Garg (suyog7130@gmail.com...
import json import copy import rules import threading import inspect import random import time import datetime import os import sys import traceback def _unix_now(): dt = datetime.datetime.now() epoch = datetime.datetime.utcfromtimestamp(0) delta = dt - epoch return delta.total_seconds() class Closur...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # protocol.py - Bitcoin protocol access for bitnodes. # # Copyright (c) 2013 Addy Yeow Chin Heng <ayeowch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), ...
# Software License Agreement (BSD License) # # Copyright (c) 2009, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above...
############################################################ # FlatCAM: 2D Post-processing for Manufacturing # # http://flatcam.org # # Author: Juan Pablo Caram (c) # # Date: 2/5/2014 # # MIT Licence ...
import os import sys import win32api PSSPYC_FILENAME = 'psspy.pyc' def usual_psse_paths(): """Return a List of usual PTI install locations which exist. Returns all permutations of: - every drive on the system; - both usual "Program Files" dirs used; - with 'PTI' appended o...
"""An object to represent arc records""" import re from hanzo.warctools.record import ArchiveRecord, ArchiveParser from hanzo.warctools.archive_detect import register_record_type # URL<sp>IP-address<sp>Archive-date<sp>Content-type<sp> #Result-code<sp>Checksum<sp>Location<sp> Offset<sp>Filename<sp> #Archive-length<nl...
#!/usr/bin/env python '''Rudix Package Manager -- RPM ;D Usage: rudix [help|version|list|remove-all|verify-all|update|interactive] [info <package-id>|files <package-id>|install <package-id>|remove <package-id>|search <package-id>|owner <path>|verify <package-id>|fix <package-id>] rudix [-h|-v|-l|-R|-K|-u|-z] [-I <pa...
import re from datetime import datetime from django.conf import settings from django.utils import timezone from django.db import models import django.dispatch from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse_lazy fro...
# Copyright (c) 2009 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. { 'variables': { 'feature_defines': [ 'ENABLE_DATABASE=1', 'ENABLE_DASHBOARD_SUPPORT=0', 'ENABLE_JAVASCRIPT_DEBUGGER=0', 'E...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os.path import keyring import numpy as np import re import tarfile import string import requests import warnings from pkg_resources import resource_filename from bs4 import BeautifulSoup import pyvo from six.moves.urllib_parse import urljoin impo...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Ludovic Claude <ludovic.claude@laposte.net> # DOCUMENTATION = """ module: marathon_app version_added: "1.9" short_description: start and stop applications with Marathon description: - Start and stop applications with Marathon. options: uri: required: true...
#! /usr/bin/python import argparse as ap import sys import cbclib.counts import cbclib.sites def load_sites(instl, methods, len_cutoff=10): sites = [] for_structs = [] with instl: for line in instl: site = line.strip("\n\r\t Nn-.") wrapped = [] for method in m...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2009 Camptocamp SA # @author Nicolas Bessi # @source JBA and AWST inpiration # @contributor Grzegorz Grzelak (grzegorz.grzelak@birdglobe.com), # WARNING: This program as such is intended to be used...
from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from django.conf import settings from .storage import OverwriteStorage from os.path import basename from datet...
import base64 from hashlib import sha1 import hmac import time import random from libsaas import http, port class BasicAuth(object): """ Adds a Basic authentication header to each request. """ def __init__(self, username, password): self.username = username self.password = password ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ nodeenv ~~~~~~~ Node.js virtual environment :copyright: (c) 2011 by Eugene Kalinin :license: BSD, see LICENSE for more details. """ nodeenv_version = '0.6.5' import sys import os import stat import time import logging import optparse import subpr...
#!/usr/bin/env python ''' Condor-related common utilities and library for AutoPyFactory. Focussed on properly processing output of condor_q -xml and condor_status -xml and converting to native Python data structures. ''' import commands import datetime import logging import os import re import signal import ...
""" Unit tests for wsp_cleaning.py (Washington State Patrol: Collision Analysis Tool) """ import axwx import os.path as op import numpy as np import pandas as pd import unittest from axwx import wu_metadata_scraping_test as wu_meta data_path = op.join(axwx.__path__[0], 'data') class TestWspCleaning(unittest.Test...
# -*- coding: utf-8 -*- import os import httplib as http from flask import request from flask import send_from_directory from framework import status from framework import sentry from framework.auth import cas from framework.routing import Rule from framework.flask import redirect from framework.routing import WebRen...
''' Generals.io Automated Client - https://github.com/harrischristiansen/generals-bot Client Adopted from @toshima Generals Python Client - https://github.com/toshima/generalsio ''' import logging import json import threading import time from websocket import create_connection, WebSocketConnectionClosedException fr...
#!/usr/bin/env python # # $Id$ # # somebody should probably check the randrange()s... import curses from random import randrange def next_j(j): if j == 0: j = 4 else: j -= 1 if curses.has_colors(): z = randrange(0, 3) color = curses.color_pair(z) if z: ...
#!/bin/env python3 # -*- coding: utf-8 -*- ''' Утиліта для полегшення імпорта данних Written by Andriy Danyleiko and Liudmyla Kislitsyna Send bugs to andrii.danyleiko@gmail.com ''' import math import sys import urllib import random import fastkml import overpy import lxml.html def get_pass_from_overpass(longitude_we...
import operator import unicodedata from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.views.generic.list import ListView from django.views.generic.detail import DetailView from .models import WorkflowLevel1, Country, AdminLevelOne, AdminLevelThree, AdminLevelTwo, WorkflowLevel2, SiteP...
# -*- coding: UTF-8 -*- #------------------------------------------------------------------------------- # Name: georef # Purpose: # # Authors: Maik Heistermann, Stephan Jacobi and Thomas Pfaff # # Created: 26.10.2011 # Copyright: (c) Maik Heistermann, Stephan Jacobi and Thomas Pfaff 2011 # Li...
''' Created on Dec 07, 2013 @author: Tyranic-Moron ''' from IRCMessage import IRCMessage from IRCResponse import IRCResponse, ResponseType from Function import Function import GlobalVars import re import subprocess class Instantiate(Function): Help = "update - pulls the latest code from GitHub" def GetRes...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals """ Zimbra SOAP client pythonic abstraction core classes for SOAP clients, there are also REST clients here, but used only for pre-authentification. """ import datetime try: from urllib2 import HTTPCookieProcessor, build_opener...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Author: Dongdong Tian @ USTC # # Revision History: # 2013-07-09 Dongdong Tian Initial Coding using perl # 2014-01-15 Dongdong Tian Now support selection of Organization & Network # 2014-06-16 Dongdong Tian Reimplement using new request method. # ...
import numpy as np import LSFIR import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons Fpass2 = 11.0 # MHz Passband end frequency Fstop2 = 15.0 #MHz Stopband start frequency Fstop1 = 5.0 Fpass1 = 4.0 Fsamp = 50.0 # MHz Sampling Frequency Weight = 100 # Weig...
# This file is part of LiSE, a framework for life simulation games. # Copyright (c) Zachary Spector, zacharyspector@gmail.com """The "engine" of LiSE is an object relational mapper with special stores for game data and entities, as well as properties for manipulating the flow of time. """ from random import Random fr...
import inspect import types import sys import pydoc __all__ = ['info','source'] # NOTE: pydoc defines a help function which works simliarly to this # except it uses a pager to take over the screen. # combine name and arguments and split to multiple lines of # width characters. End lines on a comma and begin argu...
from ckan.plugins.core import SingletonPlugin, implements from ckanext.harvest.interfaces import IHarvester from ckan.plugins import toolkit import urllib import urllib2 import httplib import datetime import socket import re from sqlalchemy import exists from ckan import model from ckan.logic import ValidationError,...
#!/usr/bin/env python # -*- coding: utf-8 -*- ##***** BEGIN LICENSE BLOCK ***** ##Version: MPL 1.1 ## ##The contents of this file are subject to the Mozilla Public License Version ##1.1 (the "License"); you may not use this file except in compliance with ##the License. You may obtain a copy of the License at ##http:##...
import asyncio import discord import requests import string from discord.ext import commands from Cogs import Settings # This module grabs Urban Dictionary definitions class UrbanDict: # Init with the bot reference, and a reference to the settings var and xp var def __init__(self, bot, settings): self.bot = ...
import numpy as np def inc_index(vec,index,h): ''' Auxiliary function for gradient and Hessian computation. Args: vec (array): numpy array. index (int): index. h (float): quantity that vec[index] will be increased. Returns: vec (array): numpy array vec with vec[index] ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Noark5 to RDF Converter version 1.0.0 # Author: Graham Moore, graham.moore@sesam.io import sys, os, errno import xml.sax import argparse import logging import yaml def _is_sequence(arg): """ Checks if "arg" is a proper sequence or not (i.e. list, tuple..) """ ...
""" Web Classes ~~~~~~~~~~~ """ import asyncio import json from aiohttp import web __all__ = ['Response', 'MockRequest'] class Response(web.StreamResponse): """Response object.""" def __init__(self, body=None, status=200, reason=None, headers=None): super().__init__(status=status, reason=re...
"""The MIT License (MIT) Copyright (c) 2016-2017 Marcus Ottosson 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,...
# # Parse tree nodes for expressions # import cython cython.declare(error=object, warning=object, warn_once=object, InternalError=object, CompileError=object, UtilityCode=object, TempitaUtilityCode=object, StringEncoding=object, operator=object, Naming=object, Nodes=objec...
"""Symplate, the Simple pYthon teMPLATE renderer. See README.md or https://github.com/benhoyt/symplate for documentation. """ from __future__ import with_statement import os import sys __version__ = '0.9' def html_filter(s): """Escape special HTML/XML characters in given ASCII or unicode string (this is ...
""" DCS Filter Version 2.2 By Brendan Kohrn and Scott Kennedy(1) (1)Department of Pathology, University of Washington School of Medicine, Seattle, WA 98195 August 23, 2013 Written for Python 2.7.3 Required modules: Pysam, Samtools, BioPython This program is intended to be run on a paired...
# # Pyrex - Parse tree nodes for expressions # import operator from Errors import error, warning, warn_once, InternalError from Errors import hold_errors, release_errors, held_errors, report_error from Code import UtilityCode import StringEncoding import Naming import Nodes from Nodes import Node import PyrexTypes ...
import pika import os from auth_API.helpers import get_user_information from daphne_ws.consumers import DaphneConsumer from EOSS.active import live_recommender class EOSSConsumer(DaphneConsumer): # WebSocket event handlers def receive_json(self, content, **kwargs): """ Called when we get a t...
# # Parse tree nodes for expressions # from __future__ import absolute_import import cython cython.declare(error=object, warning=object, warn_once=object, InternalError=object, CompileError=object, UtilityCode=object, TempitaUtilityCode=object, StringEncoding=object, operator=object, l...
# # Pyrex - Parse tree nodes for expressions # import operator from string import join from Errors import error, warning, InternalError from Errors import hold_errors, release_errors, held_errors, report_error import StringEncoding import Naming from Nodes import Node import PyrexTypes from PyrexTypes import py_obj...
from django.core.exceptions import ObjectDoesNotExist from tardis.tardis_portal.models import DatasetParameterSet from tardis.tardis_portal.models import DatafileParameterSet from tardis.tardis_portal.models import ExperimentParameterSet from tardis.tardis_portal.models import ParameterName from tardis.tardis_portal.m...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Jan-Piet Mens <jpmens () gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the L...
# Copyright 2017 Nokia # # 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...
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
""" Supplies Layer and related classes that allow overlaying of Views, including Overlay. A Layer is the final extension of View base class that allows Views to be overlayed on top of each other. Also supplies ViewMap which is the primary multi-dimensional Map type for indexing, slicing and animating collections of Vi...
from typing import Optional, List, Any, Dict import json import os import time import sys import requests from dev_tools.github_repository import GithubRepository class CurrentStuckGoToNextError(RuntimeError): pass class PullRequestDetails: def __init__(self, payload: Any, repo: GithubRepository) -> None...
from getpass import getpass from mutagen.mp3 import MP3 from mutagen.id3 import ID3, APIC, error, ID3NoHeaderError from mutagen.easyid3 import EasyID3 from mutagen import File #TODO: fix this so I am not importing all of mutagen import httplib import os as os import urllib#3 import urllib2 import certifi from time impo...
""" Modification of https://github.com/stanfordnlp/treelstm/blob/master/scripts/download.py Downloads the following: - Celeb-A dataset - LSUN dataset - MNIST dataset """ from __future__ import print_function import os import sys import gzip import json import shutil import zipfile import argparse import subprocess fr...
#/u/GoldenSights import praw # simple interface to the reddit API, also handles rate limiting of requests import time import os import sys import sqlite3 '''USER CONFIGURATION''' USERNAME = "" #This is the bot's Username. In order to send mail, he must have some amount of Karma. PASSWORD = "" #This is the bot's Pass...
import itertools from datetime import datetime from numpy import nan import numpy as np from pandas.core.common import _possibly_downcast_to_dtype, isnull from pandas.core.index import Index, MultiIndex, _ensure_index, _handle_legacy_indexes from pandas.core.indexing import _check_slice_bounds, _maybe_convert_indices...
from typing import Optional, Sequence import time from timeit import default_timer as timer import os import sys import threading import logging import dronekit from bugzoo.client import Client as BugZooClient from pymavlink import mavutil from .connection import CommandLong, MAVLinkConnection, MAVLinkMessage from .....
"""Objects for doing linear / pooled xs linear modeling""" from pandas.core.api import Index, Series, DataFrame, DataMatrix from datetime import datetime import scikits.statsmodels as sm import numpy.linalg as L import numpy as np __all__ = ['LinearModel', 'XSLinearModel'] #--------------------------...
# -*- coding: utf-8 -*- """ Author: Sudeep Mandal """ import matplotlib.pyplot as plt import matplotlib as mpl class EasyPlot(object): """ Class that implements thin matplotlib wrapper for easy, reusable plotting """ def __init__(self, *args, **kwargs): """ Arguments...
import sys, os, unittest # Extend PYTHONPATH with local 'lib' folder jasyroot = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir, "lib")) sys.path.insert(0, jasyroot) import jasy.js.parse.Parser as Parser import jasy.js.api.Data as Data class TestApi(unittest.TestCase): ...
""" Performs conversions of netCDF time coordinate data to/from datetime objects. """ import math, numpy, re, time from datetime import datetime as real_datetime _units = ['days','hours','minutes','seconds','day','hour','minute','second'] _calendars = ['standard','gregorian','proleptic_gregorian','noleap','julian','al...
# Copyright (C) 2013 - The MITRE Corporation # For license information, see the LICENSE.txt file # Contributors: # * Alex Ciobanu - calex@cert.europa.eu # * Mark Davidson - mdavidson@mitre.org # * Bryan Worrell - bworrell@mitre.org # * Benjamin Yates - byates@dtcc.com """ Creating, handling, and parsing TAXII 1.0 mes...
import os import operator import random import re import string from .base import ConfigObject, ConfigOption from .command import Command, KillCommand CTRL_INTERFACE_DIR = "/tmp/hostapd" IEEE80211_DIR = "/sys/class/ieee80211" # Map hardware mode strings from UCI file to hostapd.conf format. HOSTAPD_HWMODE = { ...
import json import urllib2 class Struct: def __init__(self, **entries): self.__dict__.update(entries) class Duolingo(object): def __init__(self, username): self.username = username self.user_url = "http://duolingo.com/users/%s" % self.username self.user_data = Struct(**s...
import music21 from vis.analyzers.indexers import noterest import csv def finalis(part): """ The finalis() function finds and returns a note object of the last note in a part. Rule 1: The final note in a melodic line. If the line ends on D, the mode is first or second; E, third or fourth; F, fifth...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
from __future__ import absolute_import, division, unicode_literals from six import with_metaclass import types from . import inputstream from . import tokenizer from . import treebuilders from .treebuilders._base import Marker from . import utils from .constants import ( spaceCharacters, asciiUpper2Lower, s...
from lily.accounts.models import Account from lily.search.base_mapping import BaseMapping from lily.tags.models import Tag from lily.utils.models.models import EmailAddress, PhoneNumber, Address from lily.socialmedia.models import SocialMedia from .models import Contact, Function class ContactMapping(BaseMapping): ...
# Copyright The PyTorch Lightning 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 law or agreed to i...
""" Django settings for stocktalk project, on Heroku. Fore more info, see: https://github.com/heroku/heroku-django-template For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settin...
from django.contrib.gis.db import models from django.contrib.auth.models import User, Group from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from lingcod.common.utils import get_mpa_class, get_array_class from lingcod.array.managers import ArrayManager class Mp...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
"""Base classes for filters.""" from distance.base import Transform, TransformError from distance.level import Level from distance.levelobjects import Group from distance import levelfragments as levelfrags ANIM_FRAG_TYPES = ( levelfrags.AnimatorFragment, levelfrags.EventListenerFragment, levelfrags.Tra...
"""Utilities for saving/loading Trackable objects.""" # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2016: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) 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 Sof...
"""Modifiable runtime configuration parameters.""" from __future__ import absolute_import, division, print_function import argparse # TODO: Read from file. # Default runtime configuration parameters. Somewhat similar to matplotlib. rcParamsDefault = { 'texture.methods': [ 'stats', # 'haralick', ...
from AppKit import NSObject from PyObjCTools import NibClassBuilder, AppHelper import vanilla NibClassBuilder.extractClasses("MainMenu") class SimpleAppAppDelegate(NSObject): def applicationDidFinishLaunching_(self, notification): SimpleAppWindow() class SimpleAppWindow(object): def __init__(self...
""" hitl endpoints """ from fastapi import APIRouter, HTTPException, Response from typing import Optional from common.models import Document from common.utils.logging_handler import Logger from common.config import BUCKET_NAME,DB_KEYS,ENTITY_KEYS,\ APPLICATION_FORMS,SUPPORTING_DOCS from google.cloud import storage im...
# boink/tests/test_cdbg.py # Copyright (C) 2018 Camille Scott # All rights reserved. # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. import itertools import sys import pytest from boink.tests.utils import * from boink.cdbg import display_segm...
# xpyBuild - eXtensible Python-based Build System # # This class is responsible for working out what tasks need to run, and for # scheduling them # # Copyright (c) 2013 - 2017 Software AG, Darmstadt, Germany and/or its licensors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use ...
#!/usr/bin/env python import sys, re, operator, string # Auxiliary functions that can't be lambdas # def extract_words(obj, path_to_file): with open(path_to_file) as f: obj['data'] = f.read() pattern = re.compile('[\W_]+') data_str = ''.join(pattern.sub(' ', obj['data']).lower()) obj['data'] = ...
# -*- coding: utf-8 -*- # # # Copyright 2013 Netflix, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Mara Parser ''' import ply.yacc as yacc from lexer import tokens from lexer import KEYWORDS import node import util ERROR_WINDOW = 10 class ParseError(Exception): def __init__(self, tok, lexer): data = lexer.lexdata pos = lexer.lexpos lex...
# -*- coding: UTF-8 -*- # Copyright 2014-2016 Luc Saffre # This file is part of Lino Cosi. # # Lino Cosi is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your op...
# -*- coding: utf-8 -*- # # The internetarchive module is a Python/CLI interface to Archive.org. # # Copyright (C) 2012-2019 Internet Archive # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundat...
#!/usr/bin/python # -*- coding: utf-8 -*- # 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, or (at your option) any later # version. # # This program is distributed in the hope t...
"""Test the lldb public C++ api breakpoint callbacks. """ import os, re, StringIO import unittest2 from lldbtest import * import lldbutil import subprocess class SBBreakpointCallbackCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): TestBase.setUp(self) self.lib_dir =...
import os from bento.distutils.utils \ import \ _is_setuptools_activated if _is_setuptools_activated(): from setuptools \ import \ Distribution else: from distutils.dist \ import \ Distribution from bento.commands.configure \ import \ _setup_opti...
#! /usr/bin/python # -*- coding: utf-8 -*- """ Generator of histology report """ import logging logger = logging.getLogger(__name__) import sys import os.path path_to_script = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(path_to_script, "../extern/dicom2fem/src")) import argparse import ...
import os from os import path import shutil import jupyter_core.paths as j_path from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler import nbformat from traitlets.config import Config from .hide_code_html_exporter import HideCodeHTMLExporter from .hide_code_pdf_exporter import Hid...
# -*- coding: utf-8 -*- import collections import http import logging import flask import flask_restful import marshmallow from tuxedo_mask import repositories, services, views class ApplicationsCollectionResource(flask_restful.Resource): def __init__(self): # Flask-RESTful constructs a new Resource f...
#!/usr/bin/python # -*- coding: utf-8 -*- """ ogr2osm alpha (c) Iván Sánchez Ortega, 2009 <ivan@sanchezortega.es> This piece of crap^H^H^H^Hsoftware is supposed to take just about any vector file as an input thanks to the magic of the OGR libraries, and then output a pretty OSM XML file with that data. Th...
# Copyright (c) 2012 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. import ntpath import posixpath import re from buildbot.process import factory from buildbot.process.properties import WithProperties from buildbot.steps....
import csv import json import random import os import re import itertools currentDatabase = '' def generateExampleCSV(): with open('example.csv', 'w') as output: for i in range(1000000): tempRow = str(random.randint(0,30)) for j in range(10): tempRow += ','+str(random.randint(0,30)) tempRow += '\n' ...
## # Copyright (c) 2005-2009 Apple 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.0 # # Unless required by applicable l...
import subprocess import pandas as pd import numpy as np import sys sys.path.append('../') import constants_and_names import universal_util print "Making a fileof Woods Hole biomass 2000 tiles" out = subprocess.Popen(['aws', 's3', 'ls', constants_and_names.natrl_forest_biomass_2000_dir], stdout=subprocess.PIPE, stder...
#!/usr/bin/env python # encoding: utf-8 ''' @author: Christophe Vandeplas <christophe@vandeplas.com> @copyright: AGPLv3 http://www.gnu.org/licenses/agpl.html To be implemented: - FIXME set all the config options in the class variables - FIXME validate parsing of config file - FIXME use syslog loggi...
# -*- coding: utf-8 -*- ############################################################################## # # OpenCivil module for OpenERP, module Etat-Civil # Copyright (C) 200X Company (<http://website>) pyf # # This file is a part of penCivil # # penCivil is free software: you can redistribute it and/or mo...
#ipc_lista2.02 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044