Coronavirus (Covid19) Megathread #2

Status
Not open for further replies.

Hyaenidae

Well-known member
  • Apr 8, 2015
    52,565
    2
    54,102
    113
    Main data set eke en na mach, hospital data wala enawa e hospital eke krapu test gana e tike count krla total eka arn thiynne :P


    "hospital_id": 1,
    "cumulative_local": 10,
    "cumulative_foreign": 10,
    "treatment_local": 10,
    "treatment_foreign": 10,
    "created_at": "2020-03-17 08:14:26",
    "cumulative_total": 20,
    "treatment_total": 20
    "hospital": {
    "id": 1,
    "name": "National Institute of Infectious Diseases",
    "created_at": "2020-03-17 08:11:42",
    "updated_at": "2020-03-17 08:11:42",
    "deleted_at": null

    Naane :oo:
     
    Last edited:

    nikdw

    Well-known member
  • Jul 17, 2016
    10,276
    4,966
    113
    නිරෝධායන කාලසීමාව දින 21ක් වෙයි
    Hirunews

    21 neme dawas 60 k danamth wedak ne wena wenama quarantine kare natnam :dull: moken mokata bowenawada kiyala hoyaganna be. yanadawasa onnam benna tiyeddi hadunoth gedara giya ayth iwarai. munta ea dawas wala kuwama uda panne sepa denan be kiyala sepa wedak isolate karanam athi.
     

    Emios

    Well-known member
  • Dec 10, 2009
    74,238
    66,660
    113
    hi emios. ive been wondering what would u do if they never opened the spas again. are u going to get married and have children? :eek:

    Will cut my dick rather than brigning kids to this nastry shit hole.I'm sure many more spas will open due to economic reasons.
     

    Hyaenidae

    Well-known member
  • Apr 8, 2015
    52,565
    2
    54,102
    113
    Will cut my dick rather than brigning kids to this nastry shit hole.I'm sure many more spas will open due to economic reasons.

    Nothing wrong with having a cut dick, some say its more hygenic and is a better experience for the female :yes:
     

    nikdw

    Well-known member
  • Jul 17, 2016
    10,276
    4,966
    113
    Will cut my dick rather than brigning kids to this nastry shit hole.I'm sure many more spas will open due to economic reasons.

    You will never know if that kid become someone like jesus. May be he will cure the evil in the world. :)
     

    Kevin_Fdo

    Well-known member
  • Jan 12, 2019
    4,660
    2,097
    113
    𝟷𝟸𝟽.𝟶.𝟶.𝟷
    Will cut my dick rather than brigning kids to this nastry shit hole.

    main-qimg-e9333d5c0b1770a53ee75e78cbded45c
     

    BLACKLIST_MEMBER

    Well-known member
  • Feb 9, 2008
    37,854
    14,812
    113
    127.0.0.1
    reddit dala apitath diyanko :)
    linux i3wm use karana ung ta witharaine ban wada karanne. anik eka athi magulak na simple lines tikak witharai custom i3block ekak gahaganna

    onna code eka
    covid-19
    Code:
    [COLOR=#808080]#!/usr/bin/env python
    [/COLOR][COLOR=#cc7832]import [/COLOR]requests
    [COLOR=#cc7832]import [/COLOR]os
    [COLOR=#cc7832]import [/COLOR]time
    
    
    
    loop = [COLOR=#6897bb]0
    [/COLOR]r = requests.get([COLOR=#6a8759]'https://www.hpb.health.gov.lk/api/get-current-statistical'[/COLOR])
    [COLOR=#cc7832]while [/COLOR]r.status_code != [COLOR=#6897bb]200 [/COLOR][COLOR=#cc7832]and [/COLOR]loop < [COLOR=#6897bb]5[/COLOR]:
        loop = loop + [COLOR=#6897bb]1
    [/COLOR]time.sleep([COLOR=#6897bb]10[/COLOR])
        r = requests.get([COLOR=#6a8759]'https://www.hpb.health.gov.lk/api/get-current-statistical'[/COLOR])
    
    r.status_code != [COLOR=#6897bb]200 [/COLOR][COLOR=#cc7832]and [/COLOR][COLOR=#8888c6]exit[/COLOR]()
    
    cases = r.json()[[COLOR=#6a8759]'data'[/COLOR]][[COLOR=#6a8759]'local_new_cases'[/COLOR]]
    deaths = r.json()[[COLOR=#6a8759]'data'[/COLOR]][[COLOR=#6a8759]'local_new_deaths'[/COLOR]]
    
    api_update_date = r.json()[[COLOR=#6a8759]'data'[/COLOR]][[COLOR=#6a8759]'update_date_time'[/COLOR]][:[COLOR=#6897bb]10[/COLOR]]
    api_update_struct_time = time.strptime(api_update_date[COLOR=#cc7832], [/COLOR][COLOR=#6a8759]"%Y-%m-%d"[/COLOR])
    struct_time_today = time.localtime()
    [COLOR=#cc7832]if [/COLOR]{api_update_struct_time.tm_mday[COLOR=#cc7832], [/COLOR]api_update_struct_time.tm_mon} != {struct_time_today.tm_mday[COLOR=#cc7832],
    [/COLOR]struct_time_today.tm_mon}:
        cases = [COLOR=#6897bb]0
    [/COLOR]deaths = [COLOR=#6897bb]0
    [/COLOR][COLOR=#6897bb]
    [/COLOR]active = r.json()[[COLOR=#6a8759]'data'[/COLOR]][[COLOR=#6a8759]'local_active_cases'[/COLOR]]
    total = r.json()[[COLOR=#6a8759]'data'[/COLOR]][[COLOR=#6a8759]'local_total_cases'[/COLOR]]
    recovered = r.json()[[COLOR=#6a8759]'data'[/COLOR]][[COLOR=#6a8759]'local_recovered'[/COLOR]]
    cases_color = [COLOR=#6a8759]'red' [/COLOR][COLOR=#cc7832]if [/COLOR]cases > [COLOR=#6897bb]0 [/COLOR][COLOR=#cc7832]else [/COLOR][COLOR=#6a8759]'green'
    [/COLOR]deaths_color = [COLOR=#6a8759]'red' [/COLOR][COLOR=#cc7832]if [/COLOR]deaths > [COLOR=#6897bb]0 [/COLOR][COLOR=#cc7832]else [/COLOR][COLOR=#6a8759]'green'
    [/COLOR][COLOR=#6a8759]
    [/COLOR]critical = requests.get([COLOR=#6a8759]'https://coronavirus-19-api.herokuapp.com/countries/Sri%20Lanka'[/COLOR]).json()[[COLOR=#6a8759]'critical'[/COLOR]]
    
    [COLOR=#8888c6]print[/COLOR](
        [COLOR=#6a8759]'cases: <span color="{cases_color}">{cases}</span> deaths: <span color="{deaths_color}">{deaths}</span> critical: <span color="yellow">{critical}</span> active: '
    [/COLOR][COLOR=#6a8759]    '<span color="red">{active}</span> recovered: <span color="green">{recovered}</span> total: <span color="red">{total}</span>'[/COLOR].format(
            [COLOR=#aa4926]cases_color[/COLOR]=cases_color[COLOR=#cc7832], [/COLOR][COLOR=#aa4926]cases[/COLOR]=cases[COLOR=#cc7832], [/COLOR][COLOR=#aa4926]deaths_color[/COLOR]=deaths_color[COLOR=#cc7832], [/COLOR][COLOR=#aa4926]deaths[/COLOR]=deaths[COLOR=#cc7832], [/COLOR][COLOR=#aa4926]active[/COLOR]=active[COLOR=#cc7832],
    [/COLOR][COLOR=#aa4926]critical[/COLOR]=critical[COLOR=#cc7832], [/COLOR][COLOR=#aa4926]recovered[/COLOR]=recovered[COLOR=#cc7832], [/COLOR][COLOR=#aa4926]total[/COLOR]=total))
    [COLOR=#808080]# print('test')
    [/COLOR]
    make it executable

    i3block.conf
    Code:
    [covid-19]
    interval=3600
    markup=pango
     
    • Like
    Reactions: MihiCherub
    Status
    Not open for further replies.