First, clone the project:
git clone https://github.com/devsisters/NAF-tensorflow/
cd NAF-tensorflow
To train a model for Pendulum:
python main.py --env_name=Pendulum-v0 --is_train=True
import hashlib | |
import json | |
import os | |
import time | |
from concurrent.futures import Future, ThreadPoolExecutor | |
from functools import lru_cache | |
from pathlib import Path | |
from typing import Any, Dict, List, Literal, Optional | |
import requests |
# {ai/scripts/head/head_reducer.py} | |
""" | |
Head size adjustment based on head-to-body ratio | |
Pipeline | |
1) Person pose with YOLOv8 to estimate full body height in pixels | |
2) Head box with MediaPipe Face Detection | |
3) Compute shrink/enlarge factor from target head count (or ratio) | |
4) Apply smooth elliptical radial warp |
https://docs.google.com/presentation/d/1EgG3jmUwJjZb64_U-x-yWZCJqajXwsQX/edit?usp=sharing&ouid=113640288960877923196&rtpof=true&sd=true |
#-*- coding: utf-8 -*- | |
import json | |
import requests | |
from tqdm import tqdm | |
DIST = 0.01 | |
HEADERS = { |
import requests | |
r = requests.get("http://naver.com") | |
html = r.text | |
idx = html.find("<title>") | |
print html[idx:idx+20] |
#!/usr/bin/python | |
import smtplib | |
from email.mime.text import MIMEText | |
import netrc | |
from docopt import docopt | |
DEFAULTFROM = "[email protected]" | |
DEFAULTTO = "[email protected]" | |
SMSADDRESS = "[email protected]" | |
DEFAULTSUBJECT = "Job finished from PAIL Minsky" |
Modern applications usually make use of back-end API servers to provide their services. With a non-transparent HTTPs proxy, which intercepts the communication between clients and servers (aka the man-in-the-middle scheme), you can easily manipulate both API requests and responses.
This manual helps you create your own proxy with Python and mitmproxy/libmproxy. Mitmproxy ships with both a standalone command-line tool (mitmproxy
) and a Python library (libmproxy).
#!/bin/bash | |
PREFIX=/home/carpedm20/lib | |
## make ! | |
{ | |
## clean just incase | |
make clean -C . | |
## build |