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
from cx_Freeze import setup, Executable | |
include_files = [ 'app/templates/', | |
'app/static/',] | |
# Note: without 'jinja2.ext' in this list, we won't get the templates working. | |
include = [ 'jinja2', 'jinja2.ext',] | |
flaskapp = Executable(script="run.py", | |
base="Win32GUI", |
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
def quare(leng=4, height=4, hmh=2, hmv=2, counter=1): | |
if counter > hmv: | |
return True | |
def pit(inp, num): | |
print(inp * num) | |
pit("+" + "-" * leng + "+" + " ", hmh) | |
for a in range(height-1): | |
pit("|" + " " * leng + "|" + " ", hmh) | |
pit("+" + "-" * leng + "+" + " ", hmh) | |
return quare(leng, height, hmh, hmv, counter+1) |
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
def isInt(inp): | |
return isinstance(inp, int) |
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 Choice = (list) => { | |
// to choose randomly from an Array | |
let powerOfLength = Math.floor(list.length / 10) | |
if (powerOfLength <= 0) powerOfLength = 1 | |
let toReturn = list[Math.floor(Math.random() * (10 * powerOfLength))] | |
return toReturn ? toReturn : Choice(list) | |
} | |
Choice([1, 2, 3, 4, ,5]) |
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
backend = "glx"; | |
glx-no-rebind-pixmap = true; | |
shadow = false; | |
menu-opacity = 0.8; | |
inactive-opacity = 0.7; | |
active-opacity = 1; | |
frame-opacity = 0.9; | |
inactive-opacity-override = true; | |
alpha-step = 0.06; | |
blur-background = true; |
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
#!/bin/bash | |
d=$1 # Directory | |
t=$2 # Duration | |
if [ "$1" == "" ];then | |
d=~/Pictures/Cities | |
fi | |
if [ "$2" == "" ];then | |
t=300 # 5 minuts | |
fi |
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
#!/bin/bash | |
tmp_file=/tmp/redshifted | |
max_tem=7000 | |
if [ ! -f $tmp_file ];then echo $max_tem > $tmp_file ;fi | |
current_tem=$(cat $tmp_file) | |
function get_percentage () { | |
echo Redshift $(( $current_tem * 100 / $max_tem ))/100 | |
} |
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
;; Put system to sleep, if emacs idle for 1 hour | |
(defun gotoSleep () | |
(interactive) | |
(minibuffer-message "Going to Sleep !") | |
(shell-command "systemctl suspend") | |
) | |
(run-with-idle-timer (* 60 60) nil 'gotoSleep) |
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
@echo off | |
rem Latest update 13 march 2015 .. Fixing bug in retrieving files from USB | |
rem #head | |
:head | |
setlocal enabledelayedexpansion | |
:tm | |
rem The number of temproray files is 6 | |
set /a sn=6 | |
set /a an=an+1 | |
if !an! gtr !sn! ( goto :body ) |
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 getUUID = ( | |
service='https://api.ipify.org/?format=json', | |
key='ip' | |
) => { | |
return new Promise( | |
(resolve, reject) => { | |
fetch(service) | |
.then((r) => r.json()) | |
.then((j) => { | |
let r = /\D+/g |
OlderNewer