CombinedText
stringlengths
4
3.42M
# # Copyright 2018 Analytics Zoo 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 applicable law or agreed to...
import unittest import collections from datetime import datetime, timedelta from ..stock import Stock, StockSignal class StockTest(unittest.TestCase): def setUp(self): self.goog = Stock("GOOG") def test_price_of_a_new_stock_class_should_be_None(self): self.assertIsNone(self.goog.price) ...
""" Django settings for huts project. Generated by 'django-admin startproject' using Django 1.10.5. 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/ """ import os im...
# coding=utf-8 # Copyright 2018 The Gin-Config 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 applicable la...
# Script to convert questions in a .txt file to a .cpp file where they # are stored in a struct ques_cpp = open("ques.cpp", 'w'); ques_cpp.write('#include "quiz.h"\n') ques_cpp.write('#include <string.h>\n\n') ques_cpp.write('question questions[3][3][3];\n\n') ques_cpp.write('void init()\n{\n\n') for n in xrange(0,...
# coding: utf-8 """A lab app that runs a sub process for a demo or a test.""" from os import path as osp from os.path import join as pjoin from stat import S_IRUSR, S_IRGRP, S_IROTH import argparse import atexit import glob import json import logging import os import pkg_resources import shutil import sys import tempf...
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2022 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. import re from wtforms import ValidationError from indico.util.string impor...
import calendar import os from datetime import * import xlsxwriter """test_replicate_worksheet.py: IT on Income Statement Excel workbook""" __author__ = "Prajesh Ananthan" def test_create_XLSheet(): workbook = None tablerange = 'B3:D7' filename = getfilename() success = False data = get_mock_co...
from django.core.management.base import BaseCommand from lxml import etree, html import urllib2 from os import path import importlib class Command(BaseCommand): help = 'Processes XSLT transformation on a fetched by URL resource and outputs the result' def add_arguments(self, parser): parser....
from ..rman_utils.node_desc import NodeDesc from ..rman_utils import filepath_utils from ..rman_utils.filepath import FilePath from ..rman_utils import texture_utils from ..rman_utils import property_utils from ..rfb_logger import rfb_log from .rman_socket_utils import node_add_inputs from .rman_socket_utils import nod...
import logging from binascii import crc32 from hashlib import sha1 from pylons import app_globals class NoneResult(object): pass log = logging.getLogger(__name__) SEP="|" cacheTags = {} def _hash(data): return sha1(data).hexdigest() def add_tags(key, tags): ctags = app_globals.cache.get_multi(tags) f...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "67855c4a688ee5e915267ad27b300fdd02055cf0" TFRT_SHA256 = "481a5ebca5c856fcce534e3e1077dda772d330d7b83b12...
import click, os, sys, shutil from boiler.cli.colors import * from click import echo # ----------------------------------------------------------------------------- # Group setup # ----------------------------------------------------------------------------- @click.group(help=yellow('Welcome to project console!')) ...
#!/usr/bin/python # Copyright 2011 WebDriver committers # Copyright 2011 Google 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 # # Un...
import os, shutil from abc import ABCMeta, abstractmethod from shiftmedia import exceptions as x from pathlib import Path class Backend(metaclass=ABCMeta): """ Abstract backend This defines methods your backend must implement in order to work with media storage """ # TODO: implement s3 backen...
# -*- coding: utf-8 -*- import os.path import sys from pybtex.database.input import bibtex from citation_vim.item import Item from citation_vim.utils import check_path, raiseError class bibtexParser(object): def __init__(self, context): self.context = context self.bibtex_file = check_path(self.con...
# ERPNext - web based ERP (http://erpnext.com) # Copyright (C) 2012 Web Notes Technologies Pvt Ltd # # 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 yo...
""" This will be part of guitools Since guitools is currently in a state of flux, we will merge those to module later """ # Then build and install the modules from distutils.core import setup, Extension setup( name="guicomm", version = "0.1", description = "Python module for S...
import os cert = '/auth/cert.pem' key = '/auth/privkey.pem' pwd = '/auth/pwd.txt' # Password created with IPython.lib.passwd(). try: with open(pwd) as f: c.NotebookApp.password = f.readline().rstrip(os.linesep) except FileNotFoundError: pass # Self-signed or recognized SSL certificate. # openssl req ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # Copyright © Mike Dacre <mike.dacre@gmail.com> # # Distributed under terms of the MIT license """ #=======================================================================================# # ...
# Copyright 2019 PerfKitBenchmarker 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 appli...
# -*- coding: utf-8 -*- #The MIT License (MIT) # #Copyright (c) 2015,2018 Sami Salkosuo # #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 r...
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib.sessions.models import Session from django.core.urlresolvers import reverse from django.db.models import get_model from django.forms import ModelForm from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import rend...
# -*- Mode: Python; coding: iso-8859-1 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Stoqdrivers ## Copyright (C) 2005 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as publishe...
# coding: utf-8 from __future__ import unicode_literals import base64 import itertools import random import re import string import time from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlencode, compat_ord, ) from ..utils import ( ExtractorError, get_element_by_attribute,...
#!/usr/bin/env python """`This`_ is what an ideal Python script might look like. .. _This: https://github.com/wcmaier/python-script/blob/master/script.py The script can be used as a template for real scripts that will have several important properties; namely, they will be: * readable (:PEP:`8`); * portable (b...
# coding=utf-8 import re from lxml import etree from lxml.html import HtmlElement from six.moves.urllib.parse import urljoin from .utils import make_doc1_url, is_pdf from ..lib.html_utils import ( set_response_encoding, clean_html, fix_links_in_lxml_tree, get_html5_parsed_text, get_html_parsed_text, ) from .....
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
"""This is an example of a local_settings.py module needed by Emocracy Change as needed and rename it to local_settings.py """ SECRET_KEY = 'SERVER SPECIFIC DO NOT SHARE!' CONSUMER_KEY = "emocracy consumer key" CONSUMER_SECRET = "emocracy consumer secret" DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgre...
""" The document module provides the Document class, which is a container for all Bokeh objects that mustbe reflected to the client side BokehJS library. """ from __future__ import absolute_import import logging logger = logging.getLogger(__file__) from bokeh.util.callback_manager import _check_callback from bokeh._...
# This is a virtual instrument abstracting a homodyne # source which controls RF and LO sources import logging import numpy as np from time import time from qcodes.instrument.base import Instrument from qcodes.utils import validators as vals from qcodes.instrument.parameter import ManualParameter # Used for uploading ...
#-*- coding: utf-8 -*- from django.contrib import admin from django.contrib.admin.options import ModelAdmin from shop.models.address import Country, Address #class ClientAdmin(ModelAdmin): # pass #admin.site.register(Client, ClientAdmin) class CountryAdmin(ModelAdmin): pass class AddressAdmin(ModelAdmin): ...
#- coding: utf-8 from bs4 import BeautifulSoup import cookielib import re import urllib import urllib2 URL_CORREIOS = 'http://www.buscacep.correios.com.br/servicos/dnec/' class Correios(): def __init__(self, proxy=None): cj = cookielib.LWPCookieJar() cookie_handler = urllib2.HTTPCookieProcessor(cj...
# Copyright 2017 TensorHub, 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 required by applicable law or agreed to in writing, ...
__author__ = "Andrew Emerick" __email__ = "aemerick11@gmail.com" import yt yt.funcs.mylog.setLevel(40) from yt.fields.api import ValidateDataField, ValidateParameter from yt.units import dimensions import numpy as np from collections import Iterable from galaxy_analysis.static_data import AMU,\ MO...
from resources import loading import ast import configparser import os import sys import time from PIL import Image, ImageFilter from tqdm import tqdm from resources import customlogger as log from resources import namenum_converter as conv from resources.get_counters import get_counter # naming is hard def form...
import sys import nltk import codecs from pyspark import SparkContext from kilogram.dataset.dbpedia import NgramEntityResolver from kilogram.lang.tokenize import default_tokenize_func from kilogram.dataset.edit_histories.wikipedia import line_filter N = int(sys.argv[4]) sc = SparkContext(appName="SparkGenerateTypedNg...
from djangorestframework import mixins from djangorestframework import parsers from djangorestframework import resources from djangorestframework import views from . import models ## # The definition of a rating resource, and its corresponding views. # class RatingResource (resources.ModelResource): model = mode...
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2009 Edgewall Software # Copyright (C) 2005 Jonas Borgström <jonas@edgewall.com> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://t...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class MailingTrace(models.Model): """ MailingTrace models the statistics collected about emails. Those statistics are stored in a separated model and table to avoid bloating...
from roglick.dungeon.maps import SimpleDungeon,ConwayDungeon from roglick.dungeon import Feature,features from roglick.engine import event,random from roglick.events import MoveEvent,ClimbDownEvent,ClimbUpEvent from roglick.components import PositionComponent class WorldManager(object): """The central manager for...
from __future__ import print_function import logging logger = logging.getLogger(__name__) import io import itertools import os import time import warnings from . import browserlib from . import _glyph_functions as gf from .document import Document from .embed import notebook_div, file_html, autoload_server from .obj...
import unittest import pycqed as pq import numpy as np import os from pycqed.analysis_v2 import measurement_analysis as ma class Test_flipping_analysis(unittest.TestCase): @classmethod def setUpClass(self): self.datadir = os.path.join(pq.__path__[0], 'tests', 'test_data') ma.a_tools.datadir =...
"""Certbot main entry point.""" from __future__ import print_function import functools import logging.handlers import os import sys import configobj import zope.component from acme import jose from acme import errors as acme_errors import certbot from certbot import account from certbot import cert_manager from cer...
#!/bin/env python import libkeepass from os import environ from optparse import OptionParser def getEntry(obj_root,entryPath, fieldName): """Return a specific field from the entry given by entryPath @:param The path to the entry (sperated by /) @:param fieldName The name of the field of which the value ...
import time from contextlib import contextmanager from typing import Any, Callable, Iterator from unittest import mock, skipUnless import DNS from django.conf import settings from django.core.exceptions import ValidationError from django.http import HttpResponse from django.utils.timezone import now as timezone_now f...
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2013 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consi...
#!/usr/bin/env python3 class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' DATA = '\033[5;30;47m' TITLE = '\033[7;34;47m' C_NONE = '\033[0;00m' C_RED = '...
from __future__ import absolute_import import json import logging import datetime as dt import calendar import decimal import numpy as np try: import pandas as pd is_pandas = True except ImportError: is_pandas = False try: from dateutil.relativedelta import relativedelta is_dateutil = True excep...
import argparse import os import io import shutil import subprocess from utils import create_manifest parser = argparse.ArgumentParser(description='Processes and downloads an4.') parser.add_argument('--target_dir', default='an4_dataset/', help='Path to save dataset') parser.add_argument('--sample_rate', default=1600...
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------...
__all__ = ['shuffleMockCatalog', 'generate_upid'] import warnings from itertools import izip import numpy as np from numpy.lib.recfunctions import rename_fields def _iter_plateau_in_sorted_array(a): k = np.where(a[1:] != a[:-1])[0] k += 1 i = 0 for j in k: yield i, j i = j yield i, ...
# Copyright 2015 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...
# Dependencies: flask, tornado from __future__ import absolute_import, division, print_function # HTTP / HTML import tornado.wsgi import tornado.httpserver import flask from flask import request, redirect, url_for, make_response import optparse import logging import socket import simplejson as json # IBEIS import ibeis...
from typing import Any, Dict, Tuple from collections import OrderedDict from django.views.generic import TemplateView from django.conf import settings from django.http import HttpRequest, HttpResponse, HttpResponseNotFound from django.template import loader import os import random import re from zerver.lib.integratio...
# -*- coding: utf-8 -*- """ Dependencies: flask, tornado """ from __future__ import absolute_import, division, print_function import random from os.path import join, exists, splitext, basename import zipfile import time import math import tornado.wsgi import tornado.httpserver from flask import request, redirect, url_f...
# -*- coding: iso8859-1 -*- # # Copyright (C) 2003, 2004, 2005 Edgewall Software # Copyright (C) 2003, 2004, 2005 Jonas Borgstrm <jonas@edgewall.com> # Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have recei...
from Tkinter import * window = Tk() Delete foobar.py
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END """ Test end to end flow with: Playback south plugin FFT Filter on playback south plugin and Threshold on PI north PI Server (C) plugin """ import http.client import os import json import time import ...
""" File Manager module to take care of data dir """ import cv2 as cv import os from os.path import * from os import listdir import glob import numpy as np class Sample_Manager(): """ Class for managing files taken from kinect either for tr or ts """ """Path to the multiple data being managed""...
#!/usr/bin/env python # #3> <> rdfs:seeAlso <https://github.com/timrdf/csv2rdf4lod-automation/wiki/tic-turtle-in-comments> . #3> #3> <#> a doap:Project; #3> dcterms:description "Download a URL and compute Functional Requirements for Bibliographic Resources (FRBR) stacks using cryptograhic digests for the resulting co...
KIBOM_VERSION = "1.5" KIBOM_DATE = "2018-3-15" Update version.py KIBOM_VERSION = "1.51" KIBOM_DATE = "2018-8-10"
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Author: ryanss <ryanssdev@icl...
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS, ALL from tastypie.authorization import Authorization from tastypie import fields from models import (HeadTeacher, SchoolData, TeacherPerformanceData, LearnerPerformanceData, InboundSMS, AcademicAchievementCode, Dis...
# # Copyright 2018 Analytics Zoo 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 applicable law or agreed to...
# coding: utf-8 import collections class Goals(): def __init__(self, name): self.goals = {} self.edges = {} self.closed = set() self.selection = 1 self.previous_selection = 1 self.events = collections.deque() self.add(name) def add(self, name, add_to=0)...
#!/bin/env python # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # Name: cfg/azisetup.py # Author: Fabio Cassini <fabio.cassini@gmail.com> # Copyright: (C) 2011 Astra S.r.l. C.so Cavallotti, 122 18038 Sanremo (IM) # -----------------------------...
from textwrap import dedent from functools import partial from numpy import ( bool_, dtype, float32, float64, int32, int64, int16, uint16, ndarray, uint32, uint8, ) from six import iteritems from toolz import merge_with from zipline.errors import ( WindowLengthNotPositive...
# highway=path, with route national (Pacific Crest Trail) at zoom 9 # https://www.openstreetmap.org/way/236361475 # https://www.openstreetmap.org/relation/1225378 assert_has_feature( 9, 86, 197, 'roads', { 'kind': 'path', 'walking_network': 'nwn'}) # highway=path, with route regional (Merced Pass Trail) at zoo...
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
#!/usr/bin/env python3 import unittest import numpy as np from pgmpy.models import BayesianModel from pgmpy.models import MarkovModel from pgmpy.factors import Factor from pgmpy.factors import TabularCPD from pgmpy.inference import Inference from collections import defaultdict class TestInferenceBase(unittest.TestCas...
# Copyright 2018 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from django import template from metashare.repository.models import corpusInfoType_model, \ lexicalConceptualResourceInfoType_model, \ languageDescriptionInfoType_model # toolServiceInfoType_model, from metashare.settings import MEDIA_URL register = template.Library() class ResourceMediaTypes(template.No...
import base64 import shutil import tempfile import urllib2 import json from celery import task from django.conf import settings from django.utils.timezone import now from github.GithubObject import NotSet from github import Github, GithubException, InputGitTreeElement from ide.git import git_auth_check, get_github from...
#!/usr/bin/env python import os import sys import pickle import time import traceback import yahoo.search from yahoo.search.web import WebSearch APP_ID = 'P5ihFKzV34G69QolFfb3nN7p0rSsYfC9tPGq.IUS.NLWEeJ14SG9Lei0rwFtgwL8cDBrA6Egdw--' QUERY_MODIFIERS = '-site:txdns.net -site:sitedossier.com -mx -site:dataopedia.com -sit...
import unittest from mock import Mock import nose.tools as nt from nbx.nbmanager.gisthub import TaggedGist, GistHub from nbx.nbmanager.tests.common import hub, require_github, makeFakeGist def generate_tagged_gists(names): mocks = [] for id, name in enumerate(names, 1): mock = Mock() mock.des...
from netaddr import IPNetwork from ryu.base import app_manager from ryu.controller import ofp_event from ryu.controller.handler import MAIN_DISPATCHER from ryu.controller.handler import set_ev_cls from ryu.ofproto import ofproto_v1_0, ofproto_v1_3 from ryu.lib import hub from ryu.lib.packet import packet from ryu.lib.p...
import pandas as pd # Read in the data data = pd.read_csv('data/data.csv',index_col = 0) #get the cosine similarity scores from data def get_cossim_scores(congressman_name): for i in data: if i == congressman_name: return data[i] # create nodes and edges data frame def ndf(congressman_name): u_cols = ['id','...
Python Refactor: bert_embeddings
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
# -*- coding: iso8859-1 -*- # # Copyright (C) 2004-2005 Edgewall Software # Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at htt...
#!/usr/bin/env python """ The latest version of this package is available at: <http://github.com/jantman/biweeklybudget> ################################################################################ Copyright 2016 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com> This file is part of biweeklybu...
#!/usr/bin/env python __author__ = 'Bjorn Wouters' __email__ = "bjorn-wouters@hotmail.com" """ Description: Automatic adding and/or analysis of a specific genome in the R RnBeads package. Version: 1.0.0. Known bugs: - stdout fix for Galaxy (not showing in Galaxy except on the end). Dependencies: - RnBeads package (edi...
"""Definitions of tests for component metadata stored in the AWS S3 database.""" from behave import given, then, when from src.attribute_checks import * from src.s3interface import * from src.utils import split_comma_separated_list @then('I should find the correct component core data for package {package} version {ve...
""" Config file for survey creation """ class config: # To modify, just add the keys of the dictionary header_to_modify = [{'class': 'S', 'name': 'sid', 'text': '421498'}, {'class': 'S', 'name': 'admin_email', 'text': 'olivier.philippe@soton.ac.uk'}, {'class': ...
# Copyright (c) 2017 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import os import errno import logging import shutil import uuid from ..common import six from ..core.json import json from ..core.attr_dict import SyncedAttrDict from .hashi...
# coding=utf-8 import hashlib import hmac import requests import time from operator import itemgetter from .helpers import date_to_milliseconds, interval_to_milliseconds from .exceptions import BinanceAPIException, BinanceRequestException, BinanceWithdrawException class Client(object): API_URL = 'https://api.bi...
# Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Top-level presubmit script for swarming-server. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the...
import json import re from django.utils.translation import ugettext as _ from ide.models.files import ResourceFile, ResourceIdentifier __author__ = 'katharine' def generate_wscript_file_sdk2(project, for_export=False): jshint = project.app_jshint wscript = """ # # This file is the default set of rules to com...
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
# coding=utf-8 import platform from helpers import log from requests.auth import HTTPBasicAuth from globalvars import GlobalVars import requests import time import json if 'windows' in str(platform.platform()).lower(): # noinspection PyPep8Naming from classes import Git as git else: from sh import git # n...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import with_statement import logging logging.basicConfig(level=logging.INFO) # dev_appserver.py --log_level debug . log = logging.getLogger(__name__) import os import re import webapp2 import urllib2 import mimetypes import jinja2 import logging import Str...
#!/usr/bin/env python3 import logging_util class Fibonacci: """ https://en.wikipedia.org/wiki/Fibonacci_number Uses memoization to store previous results in a dictionary and reduce execution time https://en.wikipedia.org/wiki/Memoization """ def __init__(self): self.logger = logging...
""" Copyright (c) 2017 Jet Propulsion Laboratory, California Institute of Technology. All rights reserved """ import argparse import json import logging import uuid from random import sample import cassandra.concurrent from cassandra.cluster import Cluster from cassandra.policies import RoundRobinPolicy, TokenAwareP...
# -*- coding: utf-8 -*- import time as _time import platform as _platform if _platform.system() == 'Windows': from. import _winmouse as _os_mouse elif _platform.system() == 'Linux': from. import _nixmouse as _os_mouse elif _platform.system() == 'Darwin': from. import _darwinmouse as _os_mouse else: rai...
import json import sys from pprint import pformat import click import click_utils import xml2json import xml_utils from reflection_utils import varsdict def process(**kwargs): ctx = click.get_current_context() # debug_ = ctx.params.get('debug') or ctx.parent.params.get('debug') if ctx.parent else False ...
# -*- coding: utf-8 -*- # # Copyright (C) 2004-2008 Edgewall Software # Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de> # Copyright (C) 2005-2007 Christian Boos <cboos@neuf.fr> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of thi...
#!/usr/bin/python # Copyright (c) 2014 Greg James, Visual6502.org # # 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, cop...
import json import os import struct import socket from twisted.internet import stdio from twisted.internet import reactor from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.protocols import basic from WebAPI import setup_web from PSO2Protocols import shipdata, ShipInfoFactory, BlockSenderFactory ...
# -*- mode: python; coding: utf-8 -*- # Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 2-clause BSD License """Tests for FHD_cal object.""" import pytest import os import gc import numpy as np from pyuvdata import UVCal import pyuvdata.tests as uvtest from pyuvdata.data import DATA_PATH # se...