<jupyter_start><jupyter_text>IPython.display youtube url for learning https://www.youtube.com/watch?v=YPgImo9kcbg&list=PLoTScYm9O0GFVfRk_MmZt0vQXNIi36LUz&index=12<jupyter_code>from IPython.display import IFrame, YouTubeVideo, SVG, HTML<jupyter_output><empty_output><jupyter_text>Display Web page<jupyter_code>IFrame("https://matplotlib.org/examples/color/named_colors.html", width=800, height=300)
import pandas as pd
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
df=pd.read_csv('https://github.com/prasertcbs/tutorial/raw/master/msleep.csv')
df.sample(5)
df.vore.value_counts().plot.barh(color='blueviolet');<jupyter_output><empty_output><jupyter_text>Display PDFhttps://www.datacamp.com/community/data-science-cheatsheets<jupyter_code>IFrame('http://datacamp-community.s3.amazonaws.com/f9f06e72-519a-4722-9912-b5de742dbac4', 
       width=800, height=400)<jupyter_output><empty_output><jupyter_text>Embed YouTube<jupyter_code># https://www.youtube.com/watch?v=_NHyJBIxc40
YouTubeVideo('YPgImo9kcbg', 640, 360)<jupyter_output><empty_output><jupyter_text>[Mario source:](https://en.wikipedia.org/wiki/Mario)![](https://upload.wikimedia.org/wikipedia/en/9/99/MarioSMBW.png 'Mario')<jupyter_code>[Mario source:](https://en.wikipedia.org/wiki/Mario)
![](https://upload.wikimedia.org/wikipedia/en/9/99/MarioSMBW.png 'Mario')  
![]('https://upload.wikimedia.org/wikipedia/commons/7/70/Amazon_logo_plain.svg' 'amazon logo')<jupyter_output><empty_output><jupyter_text>IFrame("https://upload.wikimedia.org/wikipedia/en/9/99/MarioSMBW.png", width=300, height=300) IFrame('https://upload.wikimedia.org/wikipedia/commons/7/70/Amazon_logo_plain.svg',        width=600, height=200) IFrame('https://upload.wikimedia.org/wikipedia/commons/f/ff/Vectorized_Apple_gray_logo.svg',        width=100, height=100) IFrame('https://upload.wikimedia.org/wikipedia/commons/f/ff/Vectorized_Apple_gray_logo.svg',        width=400, height=400)<jupyter_code>## Display HTML<jupyter_output><empty_output><jupyter_text>s='''Hello Python'''HTML(s)<jupyter_code><img src=https://upload.wikimedia.org/wikipedia/en/9/99/MarioSMBW.png></img><jupyter_output><empty_output><jupyter_text><jupyter_code>s='''
<img src=https://upload.wikimedia.org/wikipedia/en/9/99/MarioSMBW.png>
<img src="https://assets.pokemon.com/assets/cms2/img/pokedex/full/729.png" width=200 height=200>
'''
HTML(s)
s='''
<table class="table table-hover table-set col-3-center table-set-border-yellow">
    <thead>
        <tr>
            <th></th>
            <th>
                <strong>ล่าสุด</strong>
            </th>
            <th>
                <strong>เปลี่ยนแปลง</strong>
            </th>
            <th>
                <strong>มูลค่า
                    <br>(ลบ.)</strong>
            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <a class="blacklink-u" href="https://marketdata.set.or.th/mkt/marketsummary.do?language=th&amp;country=TH" target="_blank">SET</a>
            </td>
            <td style="text-align: right;" class="set-color-red">
                <i class="fa fa-caret-down"></i>
                1,705.33
            </td>
            <td style="text-align: right;" class="set-color-red">-1.19</td>
            <td style="text-align: right;">61,883.85</td>
        </tr>
        <tr>
            <td>
                <a class="blacklink-u" href="https://marketdata.set.or.th/mkt/sectorquotation.do?sector=SET50&amp;language=th&amp;country=TH"
                    target="_blank">SET50</a>
            </td>
            <td style="text-align: right;" class="set-color-green">
                <i class="fa fa-caret-up"></i>
                1,091.68
            </td>
            <td style="text-align: right;" class="set-color-green">+0.62</td>
            <td style="text-align: right;">40,293.01</td>
        </tr>
        <tr>
            <td>
                <a class="blacklink-u" href="https://marketdata.set.or.th/mkt/sectorquotation.do?sector=SET100&amp;language=th&amp;country=TH"
                    target="_blank">SET100</a>
            </td>
            <td style="text-align: right;" class="set-color-red">
                <i class="fa fa-caret-down"></i>
                2,455.09
            </td>
            <td style="text-align: right;" class="set-color-red">-0.58</td>
            <td style="text-align: right;">48,948.34</td>
        </tr>
        <tr>
            <td>
                <a class="blacklink-u" href="https://marketdata.set.or.th/mkt/sectorquotation.do?sector=sSET&amp;language=th&amp;country=TH"
                    target="_blank">sSET</a>
            </td>
            <td style="text-align: right;" class="set-color-red">
                <i class="fa fa-caret-down"></i>
                1,095.13
            </td>
            <td style="text-align: right;" class="set-color-red">-11.36</td>
            <td style="text-align: right;">3,471.48</td>
        </tr>
        <tr>
            <td>
                <a class="blacklink-u" href="https://marketdata.set.or.th/mkt/sectorquotation.do?sector=SETHD&amp;language=th&amp;country=TH"
                    target="_blank">SETHD</a>
            </td>
            <td style="text-align: right;" class="set-color-green">
                <i class="fa fa-caret-up"></i>
                1,262.58
            </td>
            <td style="text-align: right;" class="set-color-green">+9.26</td>
            <td style="text-align: right;">18,259.40</td>
        </tr>
    </tbody>
</table>'''
HTML(s)<jupyter_output><empty_output><jupyter_text>get text file from url and display its content<jupyter_code>import requests
r = requests.get('https://github.com/prasertcbs/tutorial/raw/master/mtcars.csv')
print(r.text)<jupyter_output>model,mpg,cyl,disp,hp,drat,wt,qsec,vs,am,gear,carb
Mazda RX4,21.0,6,160.0,110,3.9,2.62,16.46,0,1,4,4
Mazda RX4 Wag,21.0,6,160.0,110,3.9,2.875,17.02,0,1,4,4
Datsun 710,22.8,4,108.0,93,3.85,2.32,18.61,1,1,4,1
Hornet 4 Drive,21.4,6,258.0,110,3.08,3.215,19.44,1,0,3,1
Hornet Sportabout,18.7,8,360.0,175,3.15,3.44,17.02,0,0,3,2
Valiant,18.1,6,225.0,105,2.76,3.46,20.22,1,0,3,1
Duster 360,14.3,8,360.0,245,3.21,3.57,15.84,0,0,3,4
Merc 240D,24.4,4,146.7,62,3.69,3.19,20.0,1,0,4,2
Merc 230,22.8,4,140.8,95,3.92,3.15,22.9,1,0,4,2
Merc 280,19.2,6,167.6,123,3.92,3.44,18.3,1,0,4,4
Merc 280C,17.8,6,167.6,123,3.92,3.44,18.9,1,0,4,4
Merc 450SE,16.4,8,275.8,180,3.07,4.07,17.4,0,0,3,3
Merc 450SL,17.3,8,275.8,180,3.07,3.73,17.6,0,0,3,3
Merc 450SLC,15.2,8,275.8,180,3.07,3.78,18.0,0,0,3,3
Cadillac Fleetwood,10.4,8,472.0,205,2.93,5.25,17.98,0,0,3,4
Lincoln Continental,10.4,8,460.0,215,3.0,5.424,17.82,0,0,3,4
Chrysler Imperial,14.7,8,440.0,230,3.23,5.345,17.42,0,0,3,4
Fiat 128,32.4,4,78.7,66,4.08,2.2,19.47,1,1,4,[...]
{'fraction_non_alphanumeric': 0.19611333630025218, 'fraction_numerical': 0.09909508974929536, 'mean_word_length': 3.0298864315600715, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 133, 'https://': 23, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '8450', 'license': 'MIT', 'n_tokens_mistral': 3089, 'n_tokens_neox': 2729, 'n_words': 261, 'path': 'learn_jupyter/1_jupyter IPython display.ipynb', 'repo_name': 'langsari/ftu-artificial-intelligence', 'size': '6741'}