content
stringlengths
5
1.05M
from os.path import exists #reading from file def file_read(filename): try: f = open(filename, 'r') text = f.read().split("\n") if text[-1]=="": del text[-1] f.close() return text except: print("error in reading file") #writing in f...
def sum(a,b): return a+b a=int(input()) b=int(input()) print(sum(a,b))
import numpy as np x = np.arange(10) print(x) print(np.roll(x, 2)) print(np.roll(x, -2)) x2 = np.reshape(x, (2,5)) print(x2) #print(np.roll(x2, 1)) print("---") print(np.roll(x2, 1, axis=0)) print(np.roll(x2, -1, axis=0)) print("---") print(np.roll(x2, 1, axis=1)) print(np.roll(x2, -1, axis=1)) print("--------------...
N=int(input()) M=[[0]*N for _ in range(N)] for i in range(N): M[i]=list(input()) D=int(input()) if D==1: for i in M: print(''.join(i)) if D==2: for i in M: print(''.join(reversed(i))) if D==3: for i in reversed(M): print(''.join(i))
import requests import json import time import logging import logging.handlers LOG_FILE = 'test.log' handler = logging.handlers.RotatingFileHandler(LOG_FILE, maxBytes = 1024*1024, backupCount = 5) handler.setFormatter(logging.Formatter('%(asctime)s - %(message)s')) logger = logging.getLogger(__name__).addHandler(han...
from __future__ import division from __future__ import print_function import os import sys # dirty hack: include top level folder to path sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')) ) import itertools from argparse import ArgumentParser import datetime import...
import config import datetime import os import uuid import time from .parse_csv import ParseCSV from .parse_xls import ParseXLS from src.models import ParallelSentenceModel from src.utilities.app_context import LOG_WITHOUT_CONTEXT from anuvaad_auditor.loghandler import log_info, log_exception class ParallelSentenceRep...
from pynache.utils import to_numpy, to_tensor from skimage.color import rgb2yiq, yiq2rgb import torch def _add_color(content: torch.Tensor, generated: torch.Tensor) -> torch.Tensor: assert content.ndim == 4, "Expected input of shape (1, C, H, W)" assert generated.ndim == 4, "Expected input of shape (1, C, H, ...
import os import shutil import getpass code = r""" import subprocess import webbrowser import sys, os import pyautogui import tkinter as tk import getpass import psutil from time import * is_going = True def OpenGitHub(*args): webbrowser.open('https://github.com/thescribe11') def TaskManager(...
from django.utils.deprecation import MiddlewareMixin from django.utils import timezone # import models from _common.models import UserPreferences, UserRecent class UserRecentsMiddleware(MiddlewareMixin): """ add url to user recents on page request """ def process_request(self, request): """ """ ...
import torch import torch.nn as nn import torch.nn.functional as F # linear layers from layers.linear import BayesLinear, BayesConv2d # activation and output layers from layers.activation import BayesSign, BayesSoftmax, BayesGaussian # pooling layers from layers.pooling import BayesAvgPool2d, BayesMaxPool2d from lay...
"""" Dedicated Class to compare the Control Sample VS. HDBSCAN selected clusters Héctor Cánovas May 2019 - now """ import getpass import numpy as np import matplotlib.pyplot as plt from itertools import cycle from astropy import units as u from astropy.table import Table from lib_plotters import Li...
import os import re import sys from collections import defaultdict from pathlib import Path from typing import Dict, Iterable, List, NamedTuple, Optional, IO # HERE YOU CAN PUT A LIST OF STRINGS WITH SAMPLE THAT DID NOT PASS YOUR QC FOR OTHER REASONS QC_FAILED_SAMPLES = [] DEFAULT_FDR_THRESHOLD = 0.05 DEFAULT_QC_FAIL...
import argparse import os from tester import run_registered_test_cases import test_communication_base import test_common_process #import test_contract # This tests using call_view #import test_auction_contract # This tests using call_view #import test_bad_network # Working only in develop network (connect to custom ...
# # Copyright 2015 Zola Mahlaza <adeebnqo@gmail.com> # 19 January 2015 # # This is a script for converting from json to the plist format # import json import plistlib import sys import re #The above methods and variables were written by Martijn Pieters(http://stackoverflow.com/a/15198886/1984350) inputf = sys.argv...
import sys import os from flask import Flask from flask_socketio import SocketIO from flask_login import LoginManager # Handle import junk top_level_dir = os.path.abspath('../') # include trivia generator modules sys.path.append(top_level_dir) app = Flask(__name__) socketio = SocketIO(app) games = dict() app.config...
import math from typing import Optional, Tuple from overrides import overrides import torch import torch.nn.functional as F from transformers import XLNetConfig from transformers.modeling_auto import AutoModel from allennlp.data.tokenizers import PretrainedTransformerTokenizer from allennlp.modules.token_embedders.t...
import numpy as np import sys from util import ImageProcessing import torch import torchvision.transforms.functional as TF import util import model np.set_printoptions(threshold=sys.maxsize) checkpoint_filepath = "./pretrained_models/adobe_dpe/curl_validpsnr_23.073045286204017_validloss_0.0701291635632515_testpsn...
from django.urls import path from . import views from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('', views.welcome, name='index'), path('search/', views.search_results, name='search_results'), path('upload/', views.upload , name='upload'), path('single_i...
"""The Nature Remo integration.""" import logging import voluptuous as vol from datetime import timedelta from homeassistant.helpers import config_validation as cv, discovery from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.update_coordinator import DataUpdateCoordina...
import requests cert = '/path/to/the/cert' response = requests.get('https://example.com', cert=cert, verify='/path/to/ca-bundle.crt')
import sublime, sublime_plugin import os, tempfile, subprocess import re def is_windows(): return sublime.platform() == "windows" def is_executable_file(file_path): return os.path.isfile(file_path) and os.access(file_path, os.X_OK) def is_readable_file(file_path): return os.path.isfile(file_path) and ...
from .bot import BotRequests from .channels import ChannelRequests from .emojis import EmojiRequests from .guild import GuildRequests from .interactions import InteractionRequests from .members import MemberRequests from .messages import MessageRequests from .reactions import ReactionRequests from .scheduled_events imp...
import numpy as np import re, os from pmesh.pm import ParticleMesh from nbodykit.lab import BigFileCatalog, BigFileMesh, MultipleSpeciesCatalog, FFTPower from nbodykit import setup_logging from mpi4py import MPI import HImodels # enable logging, we have some clue what's going on. setup_logging('info') #...
import requests import time from datetime import datetime from contextlib import contextmanager from selenium import webdriver from selenium.webdriver.remote.webdriver import WebDriver from webdriver_manager.firefox import GeckoDriverManager from typing import Sequence from .portals import login from .print_util import...
from numpy import MatmulChain from numpy.random import random from numpy.testing import assert_array_almost_equal, assert_equal def test_matmul_chain(): A = random([30, 35]) B = random([35, 15]) C = random([15, 5]) D = random([5, 10]) E = random([10, 20]) F = random([20, 25]) mc = MatmulCh...
from requests import status_codes import json import codecs class Response: def __init__(self, client_connection): self.client_connection = client_connection self.status_text = 'OK' self.status_code = 200 self.headers = { 'Content-Type': 'text/html; encoding=utf8', ...
from abc import abstractmethod from functools import lru_cache from importlib import reload from operator import itemgetter from microsofttranslator import Translator from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity import src.knowledge_base as kdb imp...
from __future__ import annotations from typing import List import numpy as np from imgaug.augmentables.kps import Keypoint as ImgAug_Keypoint, KeypointsOnImage as ImgAug_Keypoints from logger import logger from .point import Point2D, Point3D, Point2D_List, Point3D_List from ..check_utils import check_type, check_type_f...
try: from astroid.nodes import ClassDef, FunctionDef, ImportFrom, AssignName, Attribute except ImportError: from astroid.nodes import Class as ClassDef, \ Function as FunctionDef, \ From as ImportFrom, \ AssName as AssignName, \ Getattr as Attribute try: from astroid.bases ...
import os import json import datetime import pathlib import time import carla from collections import deque import torch import carla import numpy as np from PIL import Image from leaderboard.autoagents import autonomous_agent from team_code.planner import RoutePlanner from aim_va.model import MultiTaskImageNetwork f...
from flask import request from garnish import Route class SimpleRoute(Route): def __call__(self, *args, **kwargs): return self.dispatch(request)(*args, **kwargs)
""" https://docs.opencv.org/master/d8/d19/tutorial_stitcher.html Stitching sample (advanced) =========================== Show how to use Stitcher API from python. """ # Python 2/3 compatibility from __future__ import print_function import argparse from collections import OrderedDict from imutils import paths import...
from itertools import chain from django.forms import widgets from django.utils.encoding import force_text class AdvancedSelectMultipleWidget(widgets.SelectMultiple): def optgroups(self, name, value, attrs=None): """Return a list of optgroups for this widget.""" default = (None, [], 0) gro...
from flask import render_template, request, Blueprint, session main = Blueprint('main', __name__) @main.route('/') @main.route('/home') def home(): session['semester'] = None session['year'] = None session['hash'] = None session['submitted_form'] = False session['is_valid'] = False return ren...
import multiprocessing import argparse import dlib ap = argparse.ArgumentParser() ap.add_argument("-t", "--training", required=True, help="path to input training XML file") ap.add_argument("-m", "--model", required=True, help="path serialized dlib shape predictor model") args = vars(ap.parse_args()) print("[INFO] ...
from django.conf.urls import include, url from django.contrib import admin from library.libraryapp.views import book_list urlpatterns = [ url(r'^$', book_list), url(r'^admin/', include(admin.site.urls)), ]
# -*- coding: utf-8 -*- """ Utils for path and URL """ import urllib def safe_url(url): """ 转义包含非 ASCII 字符的 URL """ parsed = urllib.parse.urlparse(url) safed = urllib.parse.ParseResult( scheme=parsed.scheme, netloc=parsed.netloc, path=urllib.parse.quote(parsed.path), pa...
# Copyright 2021 Invana # # 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 ...
""" @file sumodump.py @author Daniel Krajzewicz @date 2013-10-19 @version $Id$ SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ Copyright (C) 2012-2017 DLR (http://www.dlr.de/) and contributors This file is part of SUMO. SUMO is free software; you can redistribute it and/or modify it under the terms...
from __future__ import division from axelrod import Actions class RoundRobin(object): """A class to define play a round robin game of players""" def __init__(self, players, game, turns, deterministic_cache=None, cache_mutable=True, noise=0): """Initialise the players, game and determi...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, SUPERUSER_ID from odoo.tools.translate import _ from odoo.exceptions import UserError AVAILABLE_PRIORITIES = [ ('0', 'Normal'), ('1', 'Good'), ('2', 'Very Good'), ('...
from django.urls import path from ..views import GraphQLView urlpatterns = [ path("graphql/batch", GraphQLView.as_view(batch=True)), path("graphql", GraphQLView.as_view(graphiql=True)), ]
from flask import Flask, send_file from flask_sockets import Sockets from TankControl import TankControl app = Flask(__name__) sockets = Sockets(app) t = TankControl('/dev/ttyACM0') print("Tank connected!") @app.route('/') def mainPage(): return send_file('index.html') @app.route('/listener.js') def startListen...
from ..controller import ControlBoids from boids.tests.generate_fixtures import generate_example_settings import matplotlib from mock import patch def test_ControlBoids_init(): with patch('boids.controller.BuildBoids'), \ patch('boids.controller.ViewBoids'): test_data = generate_example_settings(...
import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) import lobby_classes as lc
""" Date: 24.02.2022 Author: H. Ismoilov Module: transliterator Version: 0.0.1 What does it do: This module is used to transliterate cyrillic text to latin. Or vice versa. """ class Transliteration: # latin and cyrillic letters latins = ['A', 'B', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', ...
from JumpScale import j #this is a test to see how actions can be nested and only the one with the error should be shown def action_error(): print ("ACTIONERROR") raise j.exceptions.RuntimeError("ERROR") def action_1(nr,counter=None): print ("ACTION%s"%nr) def recover_action(): print ("RECOVER") ...
from django.contrib import admin from .models import Articles,Appointments # Register your models here. admin.site.register(Articles) admin.site.register(Appointments)
""" Programmer : EOF File : detector.py E-mail : jasonleaster@163.com Date : 2016.01.18 """ from config import TRAINING_IMG_WIDTH from config import TRAINING_IMG_HEIGHT from config import HAAR_FEATURE_TYPE_I from config import HAAR_FEATURE_TYPE_II ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Gestion des canaux #4 Si l'attribut chnl est une liste, les flux seront distribués sur le canaux respectivement à la liste passée en paramètre. """ from pyo import * s = Server().boot().start() # Crée un serveur avec 8 canaux s = Server().boot() amps = [.05,.1,.15,...
import os import os.path import subprocess import pandas from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label from kivy.uix.textinput import TextInput from kivy.uix.button import Button from kivy.uix.popup import Popup from kivy.pr...
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # This work is licensed under the Creative Commons Attribution-NonCommercial # 4.0 International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to # Creative Commons, PO Box 1866, Mountain ...
class UuidHolder: def __init__(self, most_sig_bits, least_sig_bits): self.most_sig_bits = most_sig_bits self.least_sig_bits = least_sig_bits BOOLEAN = True BYTE = 113 INT = 25 LONG = -50992225 UUID = UuidHolder(123456789, 987654321) BYTEARRAY = bytearray([BYTE]) LONGARRAY = [LONG] STRING = "...
class arithmetic(object): def iterator(self): pass def show(self): pass
import math import numpy as np from CPC18PF.CPC18_getDist import CPC18_getDist from CPC18PF.CPC15_isStochasticDom import CPC15_isStochasticDom from CPC18PF.get_pBetter import get_pBetter from CPC18PF.CPC15_BEASTpred import CPC15_BEASTpred import pandas as pd def get_PF_Features(Ha, pHa, La, LotShapeA, LotNum...
from .compute_results import save_results from .job_results_to_csv import job_results_to_csv from .plot_utils import ENVCLASSES, REWARDCLASSES, KEYNAMES
from enum import Enum, EnumMeta class MetaEnum(EnumMeta): """Meta enumeration.""" def __contains__(cls, item): """Check that item is contained in the Enumeration.""" try: cls(item) except ValueError: return False return True class EdgeType(Enum, metac...
from .vtk import to_mesh_state, to_volume_state, presets, preset_as_options
def combine_words(word, **kwargs): if 'prefix' in kwargs: return kwargs['prefix'] + word elif 'suffix' in kwargs: return word + kwargs['suffix'] return word print(combine_words('child', prefix='man')) print(combine_words('child', suffix='ish')) print(combine_words('child'))
from flask import Flask from scrape import run as scrape_runner from logger import trigger_log_save import datetime app = Flask(__name__) @app.route('/', methods=['GET']) def hello_world(): return 'Hello, world. This is Flask' @app.route('/abc', methods=['GET']) def abc(): return 'Hello, world. This is Flask...
""" Custom DomainUniformConcatDataset """ import numpy as np from torch.utils.data import Dataset import torch from config import cfg np.random.seed(cfg.RANDOM_SEED) class DomainUniformConcatDataset(Dataset): """ DomainUniformConcatDataset Sample images uniformly across the domains If bs_mul is n,...
class CoresegStatus(basestring): """ The status fo the core segmentation job Possible values: <ul> <li> "queued" - Queued, <li> "running" - Running, <li> "stopping" - Stopping, <li> "finished" - Completed </ul> """ @staticmethod def get_api_name(): retur...
import pytest from board import Board from utils import Disk @pytest.fixture def board_default(): return Board(8)
import math class Turn: def __init__(self, scale, theta, initial_position, initial_angle): self.scale = scale self.theta = theta self.position = initial_position self.phi = initial_angle self.center = self.compute_center() def sin_d(self, degrees): return math.sin(math.radians...
# Put all your custom templates in this directory!
from .bot import TerraBot
import pytest import appsecrets import appsecrets.exc @pytest.fixture(autouse=True) def setup(secretsdir): secretsdir.join('_dummy_key_id').write('DUMMYKEY') def test_empty_dir_store(tmpdir): with pytest.raises(appsecrets.exc.Error) as exc: appsecrets.Secrets(str(tmpdir)) assert 'Missing key fi...
# CMD click for BaseCommand Details # class BaseCommand is at /Users/noopy/.local/share/virtualenvs/django-airbnb-clone-AcLC9Tzu/lib/python3.8/site-packages/django/core/management/base.py import random from django.core.management.base import BaseCommand from django.contrib.admin.utils import flatten # Third Party app ...
from __future__ import print_function import time import sys system_print = print def print(to_print): system_print(to_print, flush=True) for i in range(2): # print("hi", flush=True) print("hi") time.sleep(1.5) time.sleep(2)
# https://www.codewars.com/kata/56269eb78ad2e4ced1000013/train/python # You might know some pretty large perfect squares. But what about # the NEXT one? # Complete the findNextSquare method that finds the next integral # perfect square after the one passed as a parameter. Recall that # an integral perfect square is...
''' Author: your name Date: 2021-09-11 22:47:33 LastEditTime: 2021-09-12 11:44:59 LastEditors: Please set LastEditors Description: In User Settings Edit FilePath: /SmartAgricultureSolution-iGrow/liaoyang_analysis.py ''' import matplotlib as mpl import seaborn as sns import argparse import os import pandas as pd import ...
import asyncio from unittest.mock import patch import pytest import patterns.exception_handle as main @pytest.mark.asyncio async def test_func(capsys): # Call 'func' with mocked 'asyncio.sleep'. with pytest.raises(ZeroDivisionError): await main.func(0) out, err = capsys.readouterr() # Ass...
#import re import json from biothings.utils.common import dotdict, is_str, is_seq from biothings.utils.es import get_es from elasticsearch import NotFoundError, RequestError ALLOWED_OPTIONS = ['_source', 'start', 'from_', 'size', 'sort', 'explain', 'version', 'facets', 'fetch_all'] class QueryError...
import unittest from unittest.mock import patch from unittest.mock import MagicMock from app.domain.entry import Entry from app.application.services import handle_set_tags_for class TestServices(unittest.TestCase): @patch('app.application.services.extract_tags') @patch('app.application.services.entries_repo'...
from src.data.osm.street_loader import StreetLoader def test_load_streets(zurich_bellevue): bbox = zurich_bellevue loader = StreetLoader() streets = loader.load_data(bbox) assert len(streets) > 0
from rest_framework.serializers import ModelSerializer from rest_framework_gis.serializers import GeoFeatureModelSerializer class BusinessSerializer(ModelSerializer): def get_id_relationship_from_request(self, field_name_relationship): if field_name_relationship not in self.initial_data: ...
from contextlib import contextmanager # @contextmanager # def suppress(error): # try: # yield # except error: # pass # @contextmanager # def suppress(*errors): # try: # yield # except errors: # pass class ErrorInfo: exception = None traceback = None @context...
default_app_config = 'blousebrothers.catalogue.config.CatalogueConfig'
# $Id: pil_interface.py,v 1.1 1996/05/09 23:38:27 fredrik Exp fl $ # # The Python Imaging Library. # # File: # pil_interface.py -- a PIL interface for Grail # # History: # 96-04-18 fl Created # 98-06-04 fld Made minimal changes to look better with current # Grail implementation; removed timimg display. # """ This is...
from __future__ import absolute_import from threading import Thread try: from Queue import Queue, Empty except ImportError: from queue import Queue, Empty # Python 3.x class Multiplexer(object): def __init__(self, generators): self.generators = generators self.queue = Queue() def lo...
#!/usr/bin/env python from django.core.management import setup_environ import settings setup_environ(settings) from django.db.models.loading import cache as model_cache model_cache._populate() from issue.models import Issue from related_search import RelatedSearchClassifier def train_issue_classifier(results_fi...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------- from . import _io from ._graph_execution_manager_factory import GraphExe...
import gc, time # noqa import gym, gym_fast_envs # noqa import torch, numpy # noqa import utils from agents import get_agent def train_agent(cmdl): global_time = time.perf_counter() env = utils.env_factory(cmdl, "training") eval_env = utils.env_factory(cmdl, "evaluation") name = cmdl.agent_type ...
# Copyright 2017 SAS Project 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 requ...
from typing import Optional from datetime import datetime from pydantic import validator from ...basemodel import Base from ..utils import num2diffstr """ { "$schema": "https://github.com/TheSnowfield/BotArcAPI/wiki/Reference-of-v4-user-best", "song_id": "grievouslady", "difficulty": 2, "score": 0, ...
import yaml class parse(object): """ This class reads yaml parameter file and allows dictionary like access to the members. """ def __init__(self, path): with open(path, 'r') as file: self.parameters = yaml.safe_load(file) # Allow dictionary like access def __g...
from preprocessing import CorpusProcessor from preprocessing import read_txt from preprocessing import create_train_test_ds import time t1 = time.time() num_lines = None batch_size = 256 eng_sentences , marathi_sentences = read_txt('../mar.txt', num_lines) eng_processor = CorpusProcessor( eng_sentence...
types = """ type Profile { id: Int! name: String facesCount: Int thumbnail: Face faces: [Face] } type ProfilePagination { pages: Int count: Int profiles: [Profile] } type Photo { id: Int! width: Int! height: Int! array: String! faces: [Face] } type PhotoPagination ...
import glob import os import cv2 as cv import numpy as np from sklearn.model_selection import KFold dataset_location = "/home/debayan/Desktop/Kvasir-SEG/datasets/dummy/" datasets = os.listdir(dataset_location) cross_vd = 5 kf = KFold(n_splits=cross_vd,random_state=123,shuffle=True) np.random.seed(123) train_val_spl...
#!/usr/bin/env python # # collapsed reads .txt # import argparse def make_and_print_table(datas): """ Generated a contamination table columns are reference genomes, and rows are samples. """ sample_names = {} header = ['sample_id'] with open(datas[0]) as data_file: f...
# Most of the functions here assumes that the url # pass as an argument is a valid youtube url. import re def create_playlist_url(list_id): return "http://www.youtube.com/playlist?list=" + list_id def get_playlist_id(url): regexobj = re.compile(r'(?<=[&?])list=(?P<list_id>[^&?]+)') m = regexobj.search(u...
# -*- coding: utf-8 -*- # Copyright (c) 2012 theo crevon # # See the file LICENSE for copying permission. import install import config import service from fabric.api import env, task env.hosts = ['localhost'] @task def bootstrap(): """Deploy, configure, and start Fridge on hosts""" install.bootstrap() ...
#!/usr/bin/env python import pandas as pd import numpy as np import datetime import pandas as pd import plotly.graph_objects as go from plotly.subplots import make_subplots import requests api_key = 'PYR50CGFSRXWXQ6J' response = requests.get("https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=IBM...
from django.contrib import admin from .models import Default # Register your models here. admin.site.register(Default)
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime # --- UTILITY METHODS --- def _convert_dates_to_strings(row): """ Given a database row returned by psycopg2, convert all dates to strings (usually used to ensure JSON serialisability). """ for key in row: if type(row[key]) =...
"""OrderedSequence.py Classes for sequences of items subject to insertions and deletions, with fast comparisons of the positions of two items in a sequence. D. Eppstein, November 2003. """ import sys from Sequence import Sequence class SimpleOrderedSequence(Sequence): """Maintain a sequence of items subject to ...
from pyspark import SparkContext from pyspark.sql import SparkSession from pyspark.conf import SparkConf from pyspark.ml import Pipeline from pyspark.ml.feature import VectorAssembler from pyspark.ml.classification import LinearSVC from pyspark.ml.linalg import Vectors conf = SparkConf() sc = SparkContext(conf=conf) ...
"""conversion/discover tools for file formats most of these can be run as scripts """
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/uwmadison-chm/masterfile # Copyright (c) 2020 Board of Regents of the University of Wisconsin System # Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Re...