<commit_before>import skitai
import confutil
import pprint

def test_futures (app, dbpath):
    @app.route ("/")
    def index (was):
        def respond (was, rss, a):
            return was.response.API (status_code = [rs.status_code for rs in rss], a = a)
                        
        reqs = [
            was.get ("@pypi/project/skitai/"),
            was.get ("@pypi/project/rs4/"),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))
        ]
        return was.futures (reqs).then (respond, a = 100)
    
    @app.route ("/2")
    def index2 (was):
        def repond (was, rss, b, status_code):
            return was.response.API (status_code_db = [rs.status_code for rs in rss], b = b, status_code = status_code) 
        
        def checkdb (was, rss, a):
            reqs = [was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))]
            return was.futures (reqs).then (repond, b = a + 100, status_code = [rs.status_code for rs in rss])
        
        def begin ():
            reqs = [
                was.get ("@pypi/project/skitai/"),
                was.get ("@pypi/project/rs4/")            
            ]
            return was.futures (reqs).then (checkdb, a = 100)
        begin ()
    
    @app.route ("/3")
    def index3 (was):
        def respond (was, rss):
            datas = str (rss [0].fetch ()) + str (rss [1].one ())
            return datas
                            
        reqs = [            
            was.get ("@pypi/project/rs4/"),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))
        ]
        return was.futures (reqs).then (respond)
    
    @app.route ("/4")
    def index4 (was):
        def respond (was, rss):
            rss [0].one ()
                            
        reqs = [
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('---',))
        ]
        return was.futures (reqs).then (respond)
    
    @app.route ("/5")
    def index5 (was):
        reqs = [            
            was.get ("@pypi/project/rs4/"),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))
        ]
        return str ([rs.fetch () for rs in was.Tasks (reqs)])

    @app.route ("/6")
    def index6 (was):
        reqs = [            
            was.get ("@pypi/project/rs4/"),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))
        ]
        return str (was.Tasks (reqs).fetch ())    

    @app.route ("/7")
    def index7 (was):
        reqs = [            
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=? limit 1', ('RHAT',)),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=? limit 1', ('RHAT',))
        ]
        return str (was.Tasks (reqs).one ())

    @app.route ("/8")
    def index8 (was):
        reqs = [            
            was.backend ("@sqlite").execute ('SELECT * FROM ghost WHERE symbol=? limit 1', ('RHAT',)),
            was.backend ("@sqlite").execute ('SELECT * FROM ghost WHERE symbol=? limit 1', ('RHAT',))
        ]
        return str (was.Tasks (reqs).one ())

    @app.route ("/9")
    def index9 (was):
        reqs = [            
            was.backend ("@sqlite").execute ("INSERT INTO ghost (id) values (1)")            
        ]
        return str (was.Tasks (reqs).wait ())

    @app.route ("/10")
    def index9 (was):
        reqs = [            
            was.backend ("@sqlite").execute ("INSERT INTO ghost (id) values (1)")            
        ]
        return str (was.Tasks (reqs).commit ())

    @app.route ("/11")
    def index8 (was):
        reqs = [            
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=? limit 0', ('RHAT',)),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=? limit 1', ('RHAT',))
        ]
        return str (was.Tasks (reqs).one ())

        <commit_msg>add dist_call.commit ()<commit_after>import skitai
import confutil
import pprint

def test_futures (app, dbpath):
    @app.route ("/")
    def index (was):
        def respond (was, rss, a):
            return was.response.API (status_code = [rs.status_code for rs in rss], a = a)
                        
        reqs = [
            was.get ("@pypi/project/skitai/"),
            was.get ("@pypi/project/rs4/"),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))
        ]
        return was.futures (reqs).then (respond, a = 100)
    
    @app.route ("/2")
    def index2 (was):
        def repond (was, rss, b, status_code):
            return was.response.API (status_code_db = [rs.status_code for rs in rss], b = b, status_code = status_code) 
        
        def checkdb (was, rss, a):
            reqs = [was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))]
            return was.futures (reqs).then (repond, b = a + 100, status_code = [rs.status_code for rs in rss])
        
        def begin ():
            reqs = [
                was.get ("@pypi/project/skitai/"),
                was.get ("@pypi/project/rs4/")            
            ]
            return was.futures (reqs).then (checkdb, a = 100)
        begin ()
    
    @app.route ("/3")
    def index3 (was):
        def respond (was, rss):
            datas = str (rss [0].fetch ()) + str (rss [1].one ())
            return datas
                            
        reqs = [            
            was.get ("@pypi/project/rs4/"),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))
        ]
        return was.futures (reqs).then (respond)
    
    @app.route ("/4")
    def index4 (was):
        def respond (was, rss):
            rss [0].one ()
                            
        reqs = [
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('---',))
        ]
        return was.futures (reqs).then (respond)
    
    @app.route ("/5")
    def index5 (was):
        reqs = [            
            was.get ("@pypi/project/rs4/"),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))
        ]
        return str ([rs.fetch () for rs in was.Tasks (reqs)])

    @app.route ("/6")
    def index6 (was):
        reqs = [            
            was.get ("@pypi/project/rs4/"),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))
        ]
        return str (was.Tasks (reqs).fetch ())    

    @app.route ("/7")
    def index7 (was):
        reqs = [            
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=? limit 1', ('RHAT',)),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=? limit 1', ('RHAT',))
        ]
        return str (was.Tasks (reqs).one ())

    @app.route ("/8")
    def index8 (was):
        reqs = [            
            was.backend ("@sqlite").execute ('SELECT * FROM ghost WHERE symbol=? limit 1', ('RHAT',)),
            was.backend ("@sqlite").execute ('SELECT * FROM ghost WHERE symbol=? limit 1', ('RHAT',))
        ]
        return str (was.Tasks (reqs).one ())

    @app.route ("/9")
    def index9 (was):
        reqs = [            
            was.backend ("@sqlite").execute ("INSERT INTO ghost (id) values (1)")            
        ]
        return str (was.Tasks (reqs).wait ())

    @app.route ("/10")
    def index10 (was):
        reqs = [            
            was.backend ("@sqlite").execute ("INSERT INTO ghost (id) values (1)")            
        ]
        return str (was.Tasks (reqs).commit ())

    @app.route ("/11")
    def index11 (was):
        reqs = [            
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=? limit 0', ('RHAT',)),
            was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=? limit 1', ('RHAT',))
        ]
        return str (was.Tasks (reqs).one ())

        
{'fraction_non_alphanumeric': 0.16502826247235192, 'fraction_numerical': 0.01179651019906611, 'mean_word_length': 1.6204121056020606, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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}}
{'dir': 'git-commits-cleaned', 'id': '2241061', 'n_tokens_mistral': 2609, 'n_tokens_neox': 2502, 'n_words': 678}