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
/* 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. |
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
#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 |
// C++ program to print inorder traversal
// using stack.
#include <bits/stdc++.h>
using namespace std;
// A binary tree Node has data, pointer to left child
// and a pointer to right child
struct Node {
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> | |
#include <cstdlib> | |
#define MAX_VALUE 65536 | |
using namespace std; | |
class N { //node declaration | |
public: | |
int k; | |
N *l, *r; | |
bool leftTh, rightTh; | |
}; |
# Use latest himawari 8 photo as wallpaper
# for Windows user
from datetime import datetime, timezone, timedelta
import requests
import ctypes
from PIL import Image, ImageDraw, ImageFont
import cv2
import numpy as np
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 <mpi.h> | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <cstdlib> | |
#include <ctime> | |
void bubble_sort(std::vector<int>& arr) { | |
int n = arr.size(); | |
for (int i = 0; i < n - 1; ++i) { |
The Windows and Linux operating systems have a slight variation in how they handle newlines in files. Typically, in the Windows environment a line is terminated with the two characters \r\n. The \r character represents a carriage return, and \n represents a newline. In Linux, only the \n character is used to terminate a line.
This causes some interesting behavior issues when moving between the Windows and Linux environment. For example, if you have a multi-line text file that was created in Linux, and then try to open it using a program such as Windows Notepad, the entire contents of the file will appear on a single line.
NewerOlder