Skip to content

Instantly share code, notes, and snippets.

View sahwar's full-sized avatar
💭
https://twitter.com/ve4ernik

sahwar

💭
https://twitter.com/ve4ernik
View GitHub Profile
@sahwar
sahwar / OmniCode
Last active March 4, 2019 07:05 — forked from konfou/OmniCode
OmniCode! version 0.1.7
Description for the New Net
All codes are built in the following way:
[code symbol][attribute].[modifier].[modifier].[modifier]...
or for multiple codes:
[code symbol][attribute].[modifier]&[attribute].[modifier]...
// Source: https://twitter.com/buhtum/status/488066423282216961
// Честота на думите в българския език, на база книгите в http://chitanka.info. Обработени: 486 млн. думи, 1,2 млн. уникални.
// Stopwords are removed (taken from http://members.unine.ch/jacques.savoy/Papers/BUIR.pdf)
// Using text version of all books from Chitanka.info, punctuation removed
23:56:57.549 [main] DEBUG WordFrequency - Collected 486684661 words, unique - 1227480, took 3.213 min
23:56:58.122 [main] DEBUG WordFrequency - 457813 човек
23:56:58.122 [main] DEBUG WordFrequency - 447887 път
23:56:58.122 [main] DEBUG WordFrequency - 446313 можеше
23:56:58.122 [main] DEBUG WordFrequency - 437312 нямаше
$ urwlgt --help
URWLGT (Universal Random-Word List Generation Tool)
https://gist.github.com/sahwar/e4a90a5748f3b76a12a5
Idea-for-an-URWLGT_by_github-com_sahwar.txt
---------------
DESCRIPTION
---------------
https://gist.github.com/sahwar/d6cb7e440d93b3089e33
scraper-script-logic.txt
PHP script (v4 OLD, use v5+!!!) is here:
https://gist.github.com/sahwar/f2a8fdef42768dbfbb09
A) eurodict.com:
0. Изтегляне на отделния html файл на дадена речникова статия чрез wget (като чист html).
1. Отваряне на изтегления файл
2. Изтриване на всичко преди (БЕЗ да се включва следното):

Licence (MIT Licence)

Copyright (c) 2011 Simon Walker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

# https://gist.github.com/peio/3519414
# https://gist.github.com/sahwar/4763c3af35bfb971c1b2
#
# Source: https://twitter.com/buhtum/status/240912379834163200
# Харесваните думи от @suncho, в готов за създаване на автоматично хайку вид от @buhtum и @bozhobg ( https://twitter.com/bozhobg )
# Ако хайкуто се състои от три реда по 5-7-5 срички, то едно автоматично хайку може да се създаде като се комбинират: прилагателно-съществително;глагол-съществително-прилагателно;съществително-прилагателно като се ползва долния списък.
# Форматът е Част на речта: ДУМА брой срички
Съществително: захар 2
Съществително: далак 2
Съществително: повод 2
@sahwar
sahwar / suncho.txt
Last active June 4, 2020 03:38 — forked from peio/suncho.txt
# https://gist.github.com/peio/3518470
# https://gist.github.com/sahwar/afefdcb374c06292e513
#
# Source: https://twitter.com/buhtum/status/240912379834163200
# In response to @suncho's: "Харесвам думи, на които всяка втора буква е една и съща, като "фоторобот" и "хътъмълъ". Това какъв regexp го match-ва? ":
# re_match_second_letter = re.compile(ur"[а-я]([а-я])[а-я]\1(?:[а-я]\1)*?[а-я]?$")
# re_match_second_letter.match(word).group(0).encode('utf-8')
токов
залая
накарам
@sahwar
sahwar / py2php.py
Last active August 29, 2015 14:18 — forked from reusee/py2php.py
import ast
from cStringIO import StringIO
import sys
INFSTR = '1e308'
def interleave(inter, f, seq):
seq = iter(seq)
try:
f(next(seq))
/*!
https://gist.github.com/nickolasreynolds/9305934
https://gist.github.com/sahwar/ee1f23f53288befae4a9
Simple Inline Tooltips v1.0
http://www.infinitegyre.com/2014/03/simple-inline-tooltips.html
Copyright (c) 2014 Nickolas Reynolds
Released under the MIT license
/*!
https://gist.github.com/nickolasreynolds/9305955
https://gist.github.com/sahwar/60e6a740f2656abd6337
Stylesheet for use with Simple Inline Tooltips v1.0
http://www.infinitegyre.com/2014/03/simple-inline-tooltips.html
*/