Skip to content

Instantly share code, notes, and snippets.

View montaro's full-sized avatar
🎧
wired

Ahmed ElRefaey montaro

🎧
wired
View GitHub Profile
@montaro
montaro / Rotato.py
Created March 8, 2015 03:56
Image Rotator
__author__ = 'arefaey'
def rotate(image_matrix):
result = []
n = len(image_matrix)
for i in range(n):
new_row = []
for j in range(n):
new_row.append(image_matrix[n - j - 1][i])
@montaro
montaro / list_equlibrium.py
Last active August 29, 2015 14:16
List Equilibrium Index
__author__ = 'arefaey'
def list_equilibrium(l):
s = sum(l)
right_sum = s
left_sum = 0
for i in range(len(l)):
elem = l[i]
right_sum = right_sum - elem
@montaro
montaro / tcp-client-server_cmds_client_main.go
Last active February 25, 2020 23:29
go-tcp-client-server
package main
import (
"bufio"
"fmt"
"net"
"os"
)
func main() {