This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> // Includes the standard I/O library | |
#include <queue> // Includes the queue library for queue operations | |
#include <thread> // Includes the thread library for threading operations | |
#include <mutex> // Includes the mutex library for synchronization | |
#include <condition_variable> // Includes the condition_variable library for thread communication | |
std::mutex mtx; // Declares a mutex for critical section management | |
std::condition_variable cond_var; // Declares a condition variable for blocking and waking threads | |
std::queue<int> buffer; // Declares a queue to act as the buffer | |
const unsigned int MAX_BUFFER_SIZE = 10; // Sets the maximum size of the buffer |
import win32gui, win32ui, win32con
def test_get_screenshot():
# define your monitor width and height
w, h = 1920, 1080
# for now we will set hwnd to None to capture the primary monitor
#hwnd = win32gui.FindWindow(None, window_name)
hwnd = None
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Original code found at: | |
# https://gist.github.com/DenisFromHR/cc863375a6e19dce359d | |
""" | |
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic | |
Made available under GNU GENERAL PUBLIC LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Portable pseudorandom number generator | |
* Based on a 24,55 Fibonacci generator, using 55/503 rejection | |
* c.f.- TAoCP, 3.2.2(7), for j=24,k=55,m=2^64 | |
* | |
* THIS FILE IS PUBLIC DOMAIN CODE. | |
* | |
* Written by Bob Adolf. | |
* Attribution is appreciated but by no means legally required. | |
* | |
* This function is sufficient for most non-crypto applications. |
OlderNewer