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
let input = | |
"190: 10 19 | |
3267: 81 40 27 | |
83: 17 5 | |
156: 15 6 | |
7290: 6 8 6 15 | |
161011: 16 10 13 | |
192: 17 8 14 | |
21037: 9 7 18 13 | |
292: 11 6 16 20";; |
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 | |
echo "describe cluster;" > /tmp/dc | |
for i in 1 2 3 4 5; do | |
echo Attempt $i | |
if nodetool status | grep "^UN"; then | |
exit 0 | |
else | |
sleep 10 | |
fi | |
done |
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
# enable wireless from the terminal | |
sudo lshw -C network | |
sudo ifconfig wlan0 up | |
# if you get the error : "SIOCSIFFLAGS: Operation not possible due to RF-kill" | |
sudo rfkill list | |
# unblock the soft block |
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 cemaat import Sakirt | |
from random import randint | |
sakirt = Sakirt() | |
sakirt.meslek = "yazilimci" if randint(1,10) % 2 == 0 else "sistemci" | |
sakirt.save() |
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
# -*- coding: utf-8 -*- | |
""" | |
An example to show how to use turbogears sqlalchemy session and model | |
outside of turbogears. | |
""" | |
from fileupload.model import DBSession, metadata, init_model | |
from fileupload.model.userfile import UserFile | |
from sqlalchemy import create_engine, sql |