Raining Outside? Build a Weather CLI App With Python

You’re stuck inside because of torrential rains—again! You wonder what the weather’s like in that faraway city where your friends from the Real Python community live. You’d rather stick around in your command-line interface (CLI) than look it up in your browser. If that sounds like a task you’d want to tackle by building a command-line weather app using only the Python standard library, then this tutorial is for you. In this tutorial, you’ll learn how to: Build a functional […]

Read more

The fastest way to read a CSV in Pandas

You have a large CSV, you’re going to be reading it in to Pandas—but every time you load it, you have to wait for the CSV to load. And that slows down your development feedback loop, and might meaningfully slows down your production processing. But it’s faster to read the data in faster. Let’s see how. In this article we’ll cover: Pandas’ default CSV reading. The faster, more parallel CSV reader introduced in v1.4. A different approach that can make […]

Read more

Python client for MLflow REST API

Python client for MLflow REST API. Features: Minimal dependencies Unlike MLflow Tracking clientall REST API methods and params are exposed to user. MLflow URL is passed via constructor argument instead of env variable,so multiple client instances could be created in the same Python interpreter. Basic and Bearer auth are supported (via constructor args too). All class fields are validated with pydantic. All methods and classes are documented. Limitations: There is no integration with ML frameworks and    

Read more

An Alfred workflow to restore iTerm2 window Arrangements

This alfred workflow will list avaliable iTerm2 arrangements and let you select one to restore. Requirements iterm2: Build 3.4.15 (not tested on other versions but myght work) And the following python libraries: pip3 install iterm2 pip3 install pyobjc This workfllow will use the python from iterm2 on ~/Library/ApplicationSupport/iTerm2/Scripts/get_window_arrangements/iterm2env/versions/3.8.6/bin/python3 Usage Just type iTermA on alfred and it will: Launch iterm2 if its closed List the avaliable window arrangements Restore the selected window arrangement Download Check the releases page to download it. […]

Read more

Pytorch ViT for Image classification on the CIFAR10 dataset

Introduction This project uses ViT to perform image classification tasks on DATA set CIFAR10. The implement of Vit and pretrained weight are from https://github.com/asyml/vision-transformer-pytorch. Installation Create environment: conda create –name vit –file requirements.txt conda activate vit Datasets Download the CIFAR10 from http://www.cs.toronto.edu/~kriz/cifar.html, creat data floder and unzip the cifar-10-python.tar.gz in ‘data/’. python main.py GitHub View Github    

Read more

Some help tools for AgoraToken

Support AgoraToken version 001 – 006. But for security reasons, I recommend using version 006 and above. 1 Analyzer The analyzer can help you parse the original content of the AgoraToken, which you can use to check whether it is correct. # Example(appID: 970CA35de60c44645bbae8a215061b33, appCert: 5CFd2fd1755d40ecb72977518be15d3b) python3 analyzer.py 006970CA35de60c44645bbae8a215061b33IACV0fZUBw+72cVoL9eyGGh3Q6Poi8bgjwVLnyKSJyOXR7dIfRBXoFHlEAABAAAAR/QQAAEAAQCvKDdW # Output ## version: 006 ## [Analyze] AccessToken(V6), Signature: 95d1f654070fbbd9c5682fd7b218687743a3e88bc6e08f054b9f229227239747, AppId: 970CA35de60c44645bbae8a215061b33, CRC(ChannelName): 276646071, CRC(Uid): 3847331927, Ts: 1111111, Salt: 1, privilege: 1:1446455471 2 Checker If you want to use a checker, […]

Read more

Deep Learning on SDF for Classifying Brain Biomarkers

To reproduce the results from paper, do the following steps. install pytorch and sparceconov. The website for sparse convolution is here Download the processed dataset from here and unzip it. You would have a folder structure like the following: . +– data +– src +– readme.md +– data.zip cd src ./sh/ad/train00.sh Try different script in the folder sh to reproduce the results in the paper. GitHub View Github    

Read more
1 255 256 257 258 259 927