1- start git bash 2- use zsh-bin to get zsh wget
sh -c "$(wget -O- https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
# linux | |
rm -rf ~/.config/JetBrains/IntelliJIdea*/eval/*.evaluation.key ~/.config/JetBrains/IntelliJIdea*/options/other.xml ~/.java/.userPrefs/jetbrains/idea | |
# mac os | |
rm ~/Library/Application\ Support/JetBrains/IntelliJIdea*/eval/*.evaluation.key ~/Library/Application\ Support/JetBrains/IntelliJIdea*/options/other.xml ~/Library/Preferences/jetbrains.idea.* ~/Library/Preferences/com.apple.java.util.prefs.plist |
-- this can be considerd as a hello world that does somthing example for awesome wibar widgets | |
-- you can modify this slightly to make some useful widgets (i.e. pomodoro widget) | |
local textbox = require("wibox.widget.textbox") | |
local timer = require("gears.timer") | |
local counter = 10 | |
local w = textbox() | |
local function update_timer() |
1- start git bash 2- use zsh-bin to get zsh wget
sh -c "$(wget -O- https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
""" | |
Solving Q1 in sheet 3 with Z3 the python API | |
Author: Abdullah Khaled | |
Supervised: Eng. Mai Shaaban | |
How to run this code: | |
1- install requirements | |
pip install z3 | |
# History in cache directory: | |
HISTSIZE=1000 | |
SAVEHIST=1000 | |
HISTFILE=~/.cache/zsh/history | |
# auto comp | |
autoload -Uz compinit && compinit | |
zstyle ':completion:*' menu select | |
zmodload zsh/complist | |
compinit | |
_comp_options+=(globdots) |
# simple flask dev init script | |
echo "Remember: you MUST source this script instead of running it in a sub shell if you are going to use it inside the */__init__.py" | |
echo "--------------------------------------------------" | |
export FLASK_ENV=development | |
if test -f __init__.py; then | |
wd=`pwd` | |
cd "$wd/.." | |
export FLASK_APP=`basename $wd` |
from socket import gethostbyname | |
def write_request(content_str | |
,host | |
,method="GET" | |
,path="/" | |
,content_type="application/json" | |
,new_line=r"\r\n" | |
,http_version="HTTP/1.1" | |
): | |
return method+" "+path+" "+http_version+new_line \ |
# $s0 > sign of number1 | |
# $s1 > sign of number 2 | |
# $s2 > exp of number 1 | |
# Ss3 > exp of number 2 | |
# $s4 > mantissa number 1 | |
# $s5 > mantissa of number2 | |
# $s6 > final mantissa | |
# $s7 > final exponent | |
# $t7 > final sign no need for this my task was to write strick +ve numbers addition code |
.data | |
input: .asciiz "enter your number" | |
.text | |
.globl main | |
main: | |
li $v0 , 4 | |
la $a0 , input | |
syscall | |
#fibonacci generator by abdullah khaled A-Siam | |
# April 27,2019 3:40am | |
.data | |
msg: .asciiz "x= " | |
resu: .ascii "fib: " | |
.text | |
.globl main | |
main: | |
# print (x=) | |
li $v0,4 |