
Recherche avancée
Médias (10)
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (63)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
Activation de l’inscription des visiteurs
12 avril 2011, parIl est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)
Sur d’autres sites (11102)
-
How to visualize matplotlib animation in Jupyter notebook
23 avril 2020, par anonymous13I am trying to create a racing bar chart similar to the one in the link (https://towardsdatascience.com/bar-chart-race-in-python-with-matplotlib-8e687a5c8a41). 
However I am unable to see the animation in my Jupyter notebook



code



import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.animation as animation
from IPython.display import HTML

df = pd.read_csv('https://gist.githubusercontent.com/johnburnmurdoch/4199dbe55095c3e13de8d5b2e5e5307a/raw/fa018b25c24b7b5f47fd0568937ff6c04e384786/city_populations', 
 usecols=['name', 'group', 'year', 'value'])

current_year = 2018
dff = (df[df['year'].eq(current_year)]
 .sort_values(by='value', ascending=True)
 .head(10))

colors = dict(zip(
 ['India', 'Europe', 'Asia', 'Latin America',
 'Middle East', 'North America', 'Africa'],
 ['#adb0ff', '#ffb3ff', '#90d595', '#e48381',
 '#aafbff', '#f7bb5f', '#eafb50']
))
group_lk = df.set_index('name')['group'].to_dict()


fig, ax = plt.subplots(figsize=(15, 8))
def draw_barchart(year):
 dff = df[df['year'].eq(year)].sort_values(by='value', ascending=True).tail(10)
 ax.clear()
 ax.barh(dff['name'], dff['value'], color=[colors[group_lk[x]] for x in dff['name']])
 dx = dff['value'].max() / 200
 for i, (value, name) in enumerate(zip(dff['value'], dff['name'])):
 ax.text(value-dx, i, name, size=14, weight=600, ha='right', va='bottom')
 ax.text(value-dx, i-.25, group_lk[name], size=10, color='#444444', ha='right', va='baseline')
 ax.text(value+dx, i, f'{value:,.0f}', size=14, ha='left', va='center')
 # ... polished styles
 ax.text(1, 0.4, year, transform=ax.transAxes, color='#777777', size=46, ha='right', weight=800)
 ax.text(0, 1.06, 'Population (thousands)', transform=ax.transAxes, size=12, color='#777777')
 ax.xaxis.set_major_formatter(ticker.StrMethodFormatter('{x:,.0f}'))
 ax.xaxis.set_ticks_position('top')
 ax.tick_params(axis='x', colors='#777777', labelsize=12)
 ax.set_yticks([])
 ax.margins(0, 0.01)
 ax.grid(which='major', axis='x', linestyle='-')
 ax.set_axisbelow(True)
 ax.text(0, 1.12, 'The most populous cities in the world from 1500 to 2018',
 transform=ax.transAxes, size=24, weight=600, ha='left')
 ax.text(1, 0, 'by @pratapvardhan; credit @jburnmurdoch', transform=ax.transAxes, ha='right',
 color='#777777', bbox=dict(facecolor='white', alpha=0.8, edgecolor='white'))
 plt.box(False)

draw_barchart(2018)

import matplotlib.animation as animation
from IPython.display import HTML
fig, ax = plt.subplots(figsize=(15, 8))
animator = animation.FuncAnimation(fig, draw_barchart, frames=range(1968, 2019))
HTML(animator.to_jshtml()) 





Below is what I tried using and the errors



HTML(animator.to_jshtml()) <-- Static output with buttons unable to visualize animation
plt.rcParams["animation.html"] = "jshtml" <- no error and output
HTML(animator.to_html5_video()) <---Requested MovieWriter (ffmpeg) not available 





Note I have FFmpeg installed in my system.
Can you help me with the issue


-
Animated line chart with pandas, matplotlib and ffmpeg
10 avril 2020, par Mark KIn producing an animated line chart, I have below data and codes.



But when the chart produced, it shows no line. What did I do wrong ?



Thank you.



import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as animation

title = 'Heroin Overdoses'

data = {'Year' : ["1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016"], 
'Heroin Overdoses' : [280,443,413,486,475,148,197,170,448,103,137,160,483,356,352,300,466,278]}
overdose = pd.DataFrame(data)

Writer = animation.writers['ffmpeg']
writer = Writer(fps=20, metadata=dict(artist='Me'), bitrate=1800)

fig = plt.figure(figsize=(10,6))
plt.xlim(1999, 2016)
plt.ylim(np.min(overdose)[0], np.max(overdose)[0])
plt.xlabel('Year',fontsize=20)
plt.ylabel(title,fontsize=20)
plt.title('Heroin Overdoses per Year',fontsize=20)

def animate(i):
 data = overdose.iloc[:int(i+1)] #select data range
 p = sns.lineplot(x=data.index, y=data[title], data=data, color="r")
 p.tick_params(labelsize=17)
 plt.setp(p.lines,linewidth=7)

ani = matplotlib.animation.FuncAnimation(fig, animate, frames=17, repeat=True)

ani.save('C:\\folder\\line chart.mp4', writer=writer)



-
How to use YouTube-dl to stream from Bloomberg TV ?
1er janvier 2020, par Mr. Demetrius MichaelAny help would be appreciated !
This isn’t getting the correct stream from Bloomberg LiveTV, and I’m unsure why and how to fix.
$ youtube-dl https://www.bloomberg.com/live
Here’s a snippet of the errors that I get from that link :
[mp4 @ 0x7ffd13860c00] Invalid DTS: 9009 PTS: 3003 in output stream 0:0, replacing by guess
[mp4 @ 0x7ffd13860c00] Invalid DTS: 12012 PTS: 9009 in output stream 0:0, replacing by guess
[mp4 @ 0x7ffd13860c00] Invalid DTS: 21021 PTS: 15015 in output stream 0:0, replacing by guess
[mp4 @ 0x7ffd13860c00] Invalid DTS: 24024 PTS: 21021 in output stream 0:0, replacing by guess
[mp4 @ 0x7ffd13860c00] Invalid DTS: 33033 PTS: 27027 in output stream 0:0, replacing by guess
[mp4 @ 0x7ffd13860c00] Invalid DTS: 36036 PTS: 33033 in output stream 0:0, replacing by guess
[mp4 @ 0x7ffd13860c00] Invalid DTS: 45045 PTS: 39039 in output stream 0:0, replacing by guess
[mp4 @ 0x7ffd13860c00] Invalid DTS: 48048 PTS: 45045 in output stream 0:0, replacing by guess
[mp4 @ 0x7ffd13860c00] Invalid DTS: 57057 PTS: 51051 in output stream 0:0, replacing by guess
[mp4 @ 0x7ffd13860c00] Invalid DTS: 60060 PTS: 57057 in output stream 0:0, replacing by guess
[mpegts @ 0x7ffd14810000] Invalid timestamps stream=0, pts=963063, dts=969069, size=12512
[mpegts @ 0x7ffd14810000] Invalid timestamps stream=0, pts=969069, dts=972072, size=12513
[hls @ 0x7ffd14000400] Invalid timestamps stream=0, pts=963063, dts=969069, size=12512
[mp4 @ 0x7ffd13860c00] Invalid DTS: 69069 PTS: 63063 in output stream 0:0, replacing by guess
[hls @ 0x7ffd14000400] Invalid timestamps stream=0, pts=969069, dts=972072, size=12513
[mp4 @ 0x7ffd13860c00] Invalid DTS: 72072 PTS: 69069 in output stream 0:0, replacing by guess
[mpegts @ 0x7ffd14810000] Invalid timestamps stream=0, pts=975075, dts=981081, size=12512
[mpegts @ 0x7ffd14810000] Invalid timestamps stream=0, pts=981081, dts=984084, size=12513
[hls @ 0x7ffd14000400] Invalid timestamps stream=0, pts=975075, dts=981081, size=12512
[mp4 @ 0x7ffd13860c00] Invalid DTS: 81081 PTS: 75075 in output stream 0:0, replacing by guess
[hls @ 0x7ffd14000400] Invalid timestamps stream=0, pts=981081, dts=984084, size=12513
[mp4 @ 0x7ffd13860c00] Invalid DTS: 84084 PTS: 81081 in output stream 0:0, replacing by guess
[mpegts @ 0x7ffd14810000] Invalid timestamps stream=0, pts=987087, dts=993093, size=12512
[mpegts @ 0x7ffd14810000] Invalid timestamps stream=0, pts=993093, dts=996096, size=12513
[hls @ 0x7ffd14000400] Invalid timestamps stream=0, pts=987087, dts=993093, size=12512
[mp4 @ 0x7ffd13860c00] Invalid DTS: 93093 PTS: 87087 in output stream 0:0, replacing by guess
[hls @ 0x7ffd14000400] Invalid timestamps stream=0, pts=993093, dts=996096, size=12513
[mp4 @ 0x7ffd13860c00] Invalid DTS: 96096 PTS: 93093 in output stream 0:0, replacing by guess
[mpegts @ 0x7ffd14810000] Invalid timestamps stream=0, pts=999099, dts=1005105, size=12512
[mpegts @ 0x7ffd14810000] Invalid timestamps stream=0, pts=1005105, dts=1008108, size=12513
[hls @ 0x7ffd14000400] Invalid timestamps stream=0, pts=999099, dts=1005105, size=12512
[mp4 @ 0x7ffd13860c00] Invalid DTS: 105105 PTS: 99099 in output stream 0:0, replacing by guess
[hls @ 0x7ffd14000400] Invalid timestamps stream=0, pts=1005105, dts=1008108, size=12513Ideally I would be able to get all of their available programming :
https://www.bloomberg.com/live/us
https://www.bloomberg.com/live/us/btv
https://www.bloomberg.com/live/europe
https://www.bloomberg.com/live/asia
https://www.bloomberg.com/live/australia
https://www.bloomberg.com/live/stream
https://www.bloomberg.com/live/emea
https://www.bloomberg.com/live/asia_stream
https://www.bloomberg.com/live/politics