Press enter to see results or esc to cancel.

[Python] Html parse islemi

from lxml import html

with open(r'sozluk.html', "r") as f:
    sayfa = f.read()
t = html.fromstring(sayfa)
"""
--- ORNEK HTML ---
<p class="Normal para-style-override-2" xml:lang="tr-TR"><span class="char-style-override-3" xml:lang="en-US">abaküs </span><span class="char-style-override-4" xml:lang="en-US">abacus</span></p>
<p class="Normal para-style-override-2" xml:lang="tr-TR"><span class="char-style-override-3" xml:lang="en-US">abiyotik </span><span class="char-style-override-4" xml:lang="en-US">abiotic</span></p>
"""
kelime1 = t.xpath('//span[@class="char-style-override-3"]/text()')
kelime2 = t.xpath('//span[@class="char-style-override-4"]/text()')

ii = 0
for x,y in zip(kelime1,kelime2):
    ii += 1
    print (ii,";{};{}".format(x,y))

SVN : doesn’t match expected Error

Hata: svn: Repository UUID ‘blablablabla’ doesn’t match expected UUID ‘bilibilibili’

Local repo ile uzaktaki reponun UUID’lerinin eslesmemesi sonucu bu hatayi aliyorsunuz. (Dizin degismis olabilir, repoyu kaldirip yeniden eklemis olabilirsiniz etc..)

Cozumu :

Sunucu tarafinda : svnadmin setuuid /var/lib/svn/myraspi yeni_UUID 
Istemci tarafinda: svn switch --relocate

Repository UUID ‘xxxxxxxx’ doesn’t match expected UUID ‘yyyyyyyy’

[OpenVPN]Istemcilere statik ip atamasi

Merhaba,

Openvpn ‘de istemcilere statik ip atamasi gerektigi durumlarda asagidaki gibi yapilandirma yeterli olacaktir.

 

openvpn konfigurasyon dosyasina asagidaki satir eklenir.

client-config-dir /etc/openvpn/ccd-dir        

mkdir /etc/openvpn/ccd-dir && cd /etc/openvpn/ccd-dir        

vim client_id icine 

ifconfig-push 10.6.6.6 255.255.255.0 

eklenir ve openvpn restart edilir. /etc/ini.d/openvpn

Daha fazla bilgi icin : https://community.openvpn.net/openvpn/wiki/Concepts-Addressing