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
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 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
#!/bin/bash | |
pyinstaller -F -w \ | |
--hidden-import='email.mime.multipart' \ | |
--hidden-import='email.mime.message' \ | |
--hidden-import='email.mime.text' \ | |
--hidden-import='email.mime.image' \ | |
--hidden-import='email.mime.audio' \ | |
--hidden-import='sqlalchemy.sql.default_comparator' \ | |
--hidden-import='jinja2' \ | |
main.py |
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
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 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
def isInt(inp): | |
return isinstance(inp, int) |
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
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 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
################################# | |
# | |
# Backend | |
# | |
################################# | |
# Backend to use: "xrender" or "glx". | |
# GLX backend is typically much faster but depends on a sane driver. | |
backend = "glx"; |
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
#!/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 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
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 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
#!/bin/bash | |
config_file=/sys/class/backlight/intel_backlight/brightness | |
brightness=$(cat $config_file) | |
max_brightness=100000 | |
brightness_measure=$(( max_brightness / 10 )) | |
function get_percentage() { | |
percent=$(( $brightness * 100 / $max_brightness )) | |
echo Brightness: $percent/100 | |
} |
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
#!/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 | |
} |
OlderNewer