Source: MoviePy
Installation:
pip install moviepy
Python script:
from moviepy.editor import VideoFileClip, concatenate_videoclips
#!/usr/bin/python | |
from PyPDF2 import PdfFileReader, PdfFileWriter | |
#split range | |
pgi=30 #start | |
pgf=37 #end | |
pdf_document = "test.pdf" | |
pdf = PdfFileReader(pdf_document) | |
pdf_writer = PdfFileWriter() | |
for page in range(pgi-1,pgf): |
import discord | |
from discord.ext import commands | |
#add this line | |
intents=intents=discord.Intents.all() | |
#if the above don't work, try with this | |
#intents = discord.Intents() | |
#intents.members = True |
''' | |
After making more than 10,000 queries, I realized that | |
each successful query takes a maximum of 15 iterations, | |
taking an average 1 second. | |
''' | |
import googletrans | |
from googletrans import Translator | |
def en_es(palabra): | |
translator = Translator() |
Código ISO-639-1 | Idioma | |
---|---|---|
af | Afrikáans | |
sq | Albanés | |
am | Amárico | |
ar | Árabe | |
hy | Armenio | |
az | Azerí | |
eu | Vasco | |
be | Bielorruso | |
bn | Bengalí |
Source: MoviePy
Installation:
pip install moviepy
Python script:
from moviepy.editor import VideoFileClip, concatenate_videoclips
Rank,Title,Genre,Description,Director,Actors,Year,Runtime (Minutes),Rating,Votes,Revenue (Millions),Metascore | |
1,Guardians of the Galaxy,"Action,Adventure,Sci-Fi",A group of intergalactic criminals are forced to work together to stop a fanatical warrior from taking control of the universe.,James Gunn,"Chris Pratt, Vin Diesel, Bradley Cooper, Zoe Saldana",2014,121,8.1,757074,333.13,76 | |
2,Prometheus,"Adventure,Mystery,Sci-Fi","Following clues to the origin of mankind, a team finds a structure on a distant moon, but they soon realize they are not alone.",Ridley Scott,"Noomi Rapace, Logan Marshall-Green, Michael Fassbender, Charlize Theron",2012,124,7,485820,126.46,65 | |
3,Split,"Horror,Thriller",Three girls are kidnapped by a man with a diagnosed 23 distinct personalities. They must try to escape before the apparent emergence of a frightful new 24th.,M. Night Shyamalan,"James McAvoy, Anya Taylor-Joy, Haley Lu Richardson, Jessica Sula",2016,117,7.3,157606,138.12,62 | |
4,Sing,"Animation,Comedy,Family","In a city of humano |
import pandas as pd | |
import requests | |
url= 'https://gitlab.com/username/repo/-/raw/master/data.xlsx' | |
myfile = requests.get(url) | |
df=pd.read_excel(myfile.content) | |
print(df) |
import pandas as pd | |
#Create a public URL | |
#https://docs.google.com/spreadsheets/d/0Ak1ecr7i0wotdGJmTURJRnZLYlV3M2daNTRubTdwTXc/edit?usp=sharing | |
#get spreadsheets key from url | |
gsheetkey = "0Ak1ecr7i0wotdGJmTURJRnZLYlV3M2daNTRubTdwTXc" | |
#sheet name | |
sheet_name = 'Sheet 1' |
A fish alias is actually implemented as a function. To save a function, you need funcsave. So this is the sequence
alias foo=bar
funcsave foo
That creates ~/.config/fish/functions/foo.fish
which will then be available in any fish session.
I prefer this method so that I can easily edit my aliases in a single file.
#pip install pytube | |
#Examples | |
url1='http://youtu.be/SA2iWivDJiE' | |
url2='http://www.youtube.com/watch?v=_oPAwA_Udwc&feature=feedu' | |
url3='http://www.youtube.com/embed/SA2iWivDJiE' | |
url4='http://www.youtube.com/v/SA2iWivDJiE?version=3&hl=en_US' | |
url5='https://www.youtube.com/watch?v=rTHlyTphWP0&index=6&list=PLjeDyYvG6-40qawYNR4juzvSOg-ezZ2a6' | |
url6='youtube.com/watch?v=_lOT2p_FCvA' | |
url7='youtu.be/watch?v=_lOT2p_FCvA' |