Posts

Showing posts from March, 2021

Extract note from google slide using google-slide-api in Python

    This article is one after the previous post ( https://omicsacademy.blogspot.com/2021/03/save-all-google-presentation-slides-as.html ).      In this post, you are going to see how we can extract the note information from Google slide using  google-slide-api in Python. The first part of the code is the same as the previous post .  import urllib.request import json import os.path from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request from google.oauth2.credentials import Credentials # If modifying these scopes, delete the file token.json. SCOPES = ['https://www.googleapis.com/auth/presentations.readonly'] # The ID of a sample presentation. PRESENTATION_ID = '1-aTBNXcSIqlMRzn-FHnRmRPbGlh5eY8MgZNaBwo15IM' creds = None # The file token.json stores the user's access and refresh tokens, and is # created automatically when the authorization flow completes for the first # ti

Save all Google presentation slides as images using python

Image
Prerequisites Step 1: Turn on the Google Slides API Go to the link here: https://developers.google.com/slides/quickstart/python In the "Step 1: Turn on the Google Slides API" section, Click the button to create a new Cloud Platform project and automatically enable the Google Slides API.  In resulting dialog click DOWNLOAD CLIENT CONFIGURATION and save the file  credentials.json  to your working directory. Step 2: Install the Google Client Library pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib Image I have a google slide. See the link here:  https://docs.google.com/presentation/d/ 1-aTBNXcSIqlMRzn-FHnRmRPbGlh5eY8MgZNaBwo15IM /edit?usp=sharing " 1-aTBNXcSIqlMRzn-FHnRmRPbGlh5eY8MgZNaBwo15IM " is the presentation ID.  Python code: Using the code above, you can export the slides to PNG images using Python.  Reference https://developers.google.com/slides/quickstart/python

Miniconda installation problem: concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

We got error message shown as below: [/home/omicsacademy/miniconda3] >>> PREFIX=/home/omicsacademy/miniconda3 Unpacking payload ... concurrent.futures.process._RemoteTraceback: ''' Traceback (most recent call last):   File "concurrent/futures/process.py", line 368, in _queue_management_worker   File "multiprocessing/connection.py", line 251, in recv TypeError: __init__() missing 1 required positional argument: 'msg' ''' The above exception was the direct cause of the following exception: Traceback (most recent call last):   File "entry_point.py", line 69, in <module>   File "concurrent/futures/process.py", line 484, in _chain_from_iterable_of_lists   File "concurrent/futures/_base.py", line 611, in result_iterator   File "concurrent/futures/_base.py", line 439, in result   File "concurrent/futures/_base.py", line 388, in __get_result concurrent.futures.process.BrokenProc

How To Merge Two Fastq.Gz Files?

  With gzip files, you can simply concatenate the files using `cat`: cat sample1_R1.gz sample2_R1.gz file3.gz > sample_merge_R1.gz cat sample1_R2.gz sample2_R2.gz file3.gz > sample_merge_R2.gz You can also do this: zcat sample1_R1.gz sample2_R1.gz file3.gz |gzip - > sample_merge_R1.gz zcat sample1_R2.gz sample2_R2.gz file3.gz |gzip - > sample_merge_R2.gz