
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (72)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (8817)
-
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