Skip to content

Instantly share code, notes, and snippets.

View Mike3285's full-sized avatar
🏴‍☠️

Michele Mike3285

🏴‍☠️
View GitHub Profile
@Mike3285
Mike3285 / merge_pptx_presentation.py
Last active November 10, 2024 12:14
This gist provides a way to merge different PowerPoint presentations into one, by appending the slides in them to the end of the first presentation of the list
from pptx import Presentation
import os
import copy
def move_slide(copyFromPres: Presentation, slideIndex: int, pasteIntoPres: Presentation):
"""Takes two Presentation objs and an index, copies the slide with index slideIndex from copyFromPres to
pasteIntoPres.
returns the slide if everything went well, but the first presentation will contain all the other one's slides
Thanks to https://stackoverflow.com/a/73954830/12380052 from which I copied the majority of this
"""
# modeled on https://stackoverflow.com/a/56074651/20159015
from multiprocessing import Pool
import pickle
from attilio.auto_picking import *
from tqdm.contrib.concurrent import process_map
# caricamento dati
def _traceback(D):
@Mike3285
Mike3285 / test.f
Created September 10, 2022 21:20
for upwork
compile with Splus SHLIB -o filename.so ph2simon.f ....
cThis code is a "subroutine" and is meant to be called within another function by the subroutine's name
c All the arguments inside the parentheses () should be given when the subroutine is called, and be of the right datatype
c c Define the inputs for this subroutine
subroutine f2bdry(m, nmax, ep1, ep2, p0, p1, cp0, cp1, bdry, peten,
1 nmax1, bprob0, bprob1)