Try   HackMD

Корисні бібліотеки

https://github.com/vinta/awesome-python#command-line-tools

Консольні штучки

  • ipython

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • howdoi

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • requests
    Вивести всі версії Майнкрафта

    ​​import requests
    ​​for item in requests.get('https://launchermeta.mojang.com/mc/game/version_manifest.json').json()['versions']:
    ​​    print(item["id"])
    

Наука

Тексти

Автоматизація

  • pyautogui
  • keyboard
  • mouse
  • pyperclip
  • pytelegrambotapi

Графіка і діаграми

  • діаграми

    • matplotlib
    • pyvis
      ​​​​​​​​from pyvis.network import Network
      ​​​​​​​​import pandas as pd
      
      ​​​​​​​​got_net = Network(height='750px', width='100%', bgcolor='#222222', font_color='white')
      
      ​​​​​​​​# set the physics layout of the network
      ​​​​​​​​got_net.barnes_hut()
      ​​​​​​​​got_data = pd.read_csv('https://www.macalester.edu/~abeverid/data/stormofswords.csv')
      
      ​​​​​​​​sources = got_data['Source']
      ​​​​​​​​targets = got_data['Target']
      ​​​​​​​​weights = got_data['Weight']
      
      ​​​​​​​​edge_data = zip(sources, targets, weights)
      
      ​​​​​​​​for e in edge_data:
      ​​​​​​​​    src = e[0]
      ​​​​​​​​    dst = e[1]
      ​​​​​​​​    w = e[2]
      
      ​​​​​​​​    got_net.add_node(src, src, title=src)
      ​​​​​​​​    got_net.add_node(dst, dst, title=dst)
      ​​​​​​​​    got_net.add_edge(src, dst, value=w)
      
      ​​​​​​​​neighbor_map = got_net.get_adj_list()
      
      ​​​​​​​​# add neighbor data to node hover data
      ​​​​​​​​for node in got_net.nodes:
      ​​​​​​​​    node['title'] += ' Neighbors:<br>' + '<br>'.join(neighbor_map[node['id']])
      ​​​​​​​​    node['value'] = len(neighbor_map[node['id']])
      
      ​​​​​​​​got_net.show('gameofthrones.html')
      ​​​​​​​​
      
  • pillow

  • opencv

  • розпізнавання:

    • tesserocr
    • face_recognition
      ​​​​​​​​import io
      ​​​​​​​​import face_recognition
      ​​​​​​​​import matplotlib.pyplot as plt
      ​​​​​​​​import pyautogui
      ​​​​​​​​from PIL import Image, ImageDraw
      ​​​​​​​​
      ​​​​​​​​focus = False
      ​​​​​​​​default_region = (0, 0, 1920, 1080)
      
      ​​​​​​​​plt.ion()
      ​​​​​​​​fig = plt.figure()
      ​​​​​​​​region = default_region
      ​​​​​​​​
      ​​​​​​​​while True:
      ​​​​​​​​    reg = (region[0], region[1], region[2]-region[0], region[3]- region[1])
      ​​​​​​​​    img = pyautogui.screenshot(region=reg)
      ​​​​​​​​    out = io.BytesIO()
      ​​​​​​​​    img.save(out, 'JPEG')
      ​​​​​​​​    faceimg = face_recognition.load_image_file(out)
      ​​​​​​​​    loc = face_recognition.face_locations(faceimg)
      ​​​​​​​​    if loc:
      ​​​​​​​​        loc = loc[0]
      ​​​​​​​​        top, right, bottom, left = loc
      ​​​​​​​​        #pyautogui.moveTo((loc[0]+loc[2])/2, (loc[1]+loc[3])/2)
      ​​​​​​​​        print(loc)
      ​​​​​​​​        if focus:
      ​​​​​​​​            mg = 200 # margin
      ​​​​​​​​            region = (max(0, left-mg), max(0, top-mg),
      ​​​​​​​​                  min(default_region[2]-1, right+mg), min(default_region[3]-1, bottom+mg))
      
      ​​​​​​​​        draw = ImageDraw.Draw(img)
      ​​​​​​​​        draw.rectangle(((left, top), (right, bottom)), width=10, outline=(255, 255, 255))
      ​​​​​​​​    else:
      ​​​​​​​​        print("no img")
      ​​​​​​​​        region = default_region
      ​​​​​​​​    plt.imshow(img)
      ​​​​​​​​    fig.canvas.draw()       
      
  • графіка для ігор