Skip to content

Instantly share code, notes, and snippets.

@kpostekk
kpostekk / login.py
Last active November 30, 2021 19:29
Automatyczne logowanie do Librus Synergia. Może się przyda
import requests
def do_login(login: str, password: str):
session = requests.session()
session.get('https://api.librus.pl/OAuth/Authorization?client_id=46&response_type=code&scope=mydata')
session.post('https://api.librus.pl/OAuth/Authorization/Grant?client_id=46', data={
'action': 'login',
'login': login,
'pass': password
@Nicholas-Swift
Nicholas-Swift / astar.py
Last active November 20, 2025 14:23
A* pathfinding algorithm. Please see comments below for a fork of this gist that includes bug fixes!
class Node():
"""A node class for A* Pathfinding"""
def __init__(self, parent=None, position=None):
self.parent = parent
self.position = position
self.g = 0
self.h = 0
@unitycoder
unitycoder / UITextTypeWriter.cs
Last active April 11, 2024 08:11
Type out UI text one character at a time
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
// attach to UI Text component (with the full text already there)
public class UITextTypeWriter.cs : MonoBehaviour
{
Text txt;