This file contains 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
import os | |
import sys | |
import time | |
import importlib | |
import signal | |
import re | |
from fastapi import FastAPI | |
from fastapi.middleware.cors import CORSMiddleware | |
from fastapi.middleware.gzip import GZipMiddleware | |
from packaging import version |
This file contains 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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.py] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.js] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.env] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.json] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.java] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ahk] | |
"PerceivedType"="text" |
This file contains 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
const debug = 0 | |
export default class Sprite { | |
constructor(x, y, width, height) { | |
this.x = x | |
this.y = y | |
this.width = width | |
this.height = height | |
this.angle = 0 // rad |
This file contains 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
import cv2, time, torch | |
from torchvision import transforms | |
import numpy as np | |
import win32gui, win32ui, win32con, win32api # https://pypi.org/project/pywin32/ | |
def grab_screen(region=None): | |
hwin = win32gui.GetDesktopWindow() |
This file contains 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
using Godot; | |
using System; | |
using System.Text; | |
public class GenScript : TileMap { | |
private const int roomsHorz = 4; // numbers of columns of region | |
Random rnd = new Random(); | |
private _ugameCtrl cntrllr; | |
private (int left, int top, int width, int height) dim; | |
private Vector2 ul, dr; |
This file contains 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
<template> | |
<div | |
class="wf-background dsplay--flx--clmn" | |
:style="rendering?'cursor:progress':null" | |
> | |
<div | |
class="wf-container dsplay--flx--clmn" | |
@mouseup="down=[false, false]" | |
@mouseleave="down=[false, false]" | |
> |
This file contains 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
class PaginationMixin(object): | |
''' | |
Supports multiple sorting fields/anotations | |
The working principle is that it uses offset object to get | |
list of next items | |
Instruction of use: | |
step 1: inherit this mixin to your view class | |
step 2: define list of ordering fields/anotates in |
This file contains 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
find . -path "*/migrations/*.py" -not -name "__init__.py" -not -path "./venv/*" -delete | |
find . -path "*/migrations/*.pyc" -not -path "./venv/*" -delete |
This file contains 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
/ ON, OFF (in 10's of microseconds) | |
336, 160, | |
48, 118, | |
46, 120, | |
46, 42, | |
42, 42, | |
40, 44, | |
40, 120, | |
46, 42, | |
42, 42, |
This file contains 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
import urllib | |
import urllib2 | |
from bs4 import BeautifulSoup | |
from lxml import etree | |
def main(): | |
textToSearch = raw_input('tim video cho thuyet trinh: ') | |
query = urllib.quote(textToSearch) | |
url = "https://www.youtube.com/results?search_query=" + query | |
response = urllib2.urlopen(url) |
NewerOlder