Python class to perform AB test analysis

Python class to perform AB test analysis Overview This repo contains a Python class to perform an A/B/C… test analysis with proportion-based metrics (including posthoc test). In practice, the class is can be used along with any appropriate RDBMS retrieval tool (e.g. google.cloud.bigquery module for BigQuery) so that, together, they result in an end-to-end analysis process, i.e. from querying the experiment data stored originally in SQL to arriving at the complete analysis results. The ABTest Class The class is named […]

Read more

Ergodic Experiment With Python

Based on this video. Run this experiment with this command: python main.py Try adjusting the BET_PERCENT to .25 to see the median amount won increase. Conclusion By having more “small bets” in the system, you increase your chances of winning the game. Example Output Here’s an example output when every ensemble does the max bet (100%). In other words, only 1 bet. Number OF ENSEMBLES: 1000 Number OF Coin Flips: 1000 Total Money in System: $2,620,888.98 Max Final Balance: $9,228.53 […]

Read more

Enhanced Strawberry GraphQL integration with Django

Enhanced Strawberry integration with Django. Built on top of strawberry-djangointegration, enhancing its overall functionality. Features All of supported features by strawberry-django. Extension that automatically optimize queries (usingonly/select_related/prefetch_related) to solve graphql N+1 problems, with support forfragment spread, inline fragments, @include/@skip directives, prefetch merging, etc Improved sync/async resolver that priorizes the model’s cache to avoid have to usesync_to_asyncwhen not needed. Support for Django choices enums using (requiresdjango-choices-field) Relay support for queries, connections and input mutations. Django Debug Toolbar integration with graphiql todisplay […]

Read more

Working With Pipenv

Managing multiple Python projects with their own third-party packages can get complicated. It is best practice to use a virtual environment to sandbox the requirements for each of your projects. Enter pipenv, the official recommended package management tool for Python. It handles both installation and virtual environments to help you manage your Python dependencies. In this course, you’ll learn about: How to use pip to install a package Where Python puts packages by default How to use pipenv to create […]

Read more

Augmentation for Single-Image-Super-Resolution

Augmentation for Single-Image-Super-Resolution Implimentation CutBlur Cutout CutMix Cutup CutMixup Blend RGBPermutation Identity OneOf License cf. @solafune(https://solafune.com) コンテストの参加以外を目的とした利用及び商用利用は禁止されています。商用利用・その他当コンテスト以外で利用したい場合はお問い合わせください。() cf. @solafune(https://solafune.com) Use for any purpose other than participation in the competition or commercial use is prohibited. If you would like to use them for any of the above purposes, please contact us. GitHub View Github    

Read more

A simple visualization toolbox (script) for transformer attention visualization

This is a super simple visualization toolbox (script) for transformer attention visualization ✌ 1. How to prepare your attention matrix? Just convert it to numpy array like this 👇 # build an attetion matrixs as torch-output like token_num = 6 case_num = 3 layer_num = 2 head_num = 4 attention_map_mhml = [np.stack([make_attention_map_mh(head_num, token_num)]*case_num, 0) for _ in range(layer_num)] # 4cases’ 3 layers attention, with 3 head per layer( 每个case相同) _ = [print(i.shape) for i in attention_map_mhml] “”” >>>(3, 4, 6, […]

Read more

Create QR Code for link using Python

Quick Response QR is short and named for a quick read from a cell phone. Used to view information from transitory media and put it on your cell phone. To create QR codes with Python you only need to install a Python module. Installation The pyqrcode module is a QR code generator that is simple to use and written in pure python. The module can automates most of the building process for creating QR codes. Most codes can be created […]

Read more
1 290 291 292 293 294 939