Skip to content

Instantly share code, notes, and snippets.

Avatar

Saeed Rasooli ilius

View GitHub Profile
View tree.go
type Tree interface {
Empty() bool
Size() int
Child(int) Tree
Extra interface{}
}
// for example see:
// https://github.com/emirpasic/gods/blob/master/containers/containers.go
// https://github.com/emirpasic/gods/blob/master/trees/trees.go
View type_check.py
import inspect
import typing
__all__ = [
"is_instance",
"is_subtype",
"python_type",
"is_generic",
"is_base_generic",
"is_qualified_generic",
@ilius
ilius / article-style.css
Last active May 14, 2020 — forked from babygau/article-style.css
GoldenDict Dark Theme
View article-style.css
body
{
margin-top: 1px;
margin-right: 3px;
margin-left: 2px;
margin-bottom: 3px;
background: #201F1F;
color: white;
font-family: Bookerly, Segoe UI, Palatino Linotype, Arial Unicode MS;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am ilius on github.
  • I am saeedgnu (https://keybase.io/saeedgnu) on keybase.
  • I have a public key ASAHK9jPXVnkNnR5oopdoVwChwlDTQkPrB37NrcoWNgepwo

To claim this, I am signing this object:

@ilius
ilius / Guide.md
Created Mar 14, 2018 — forked from hristian-carabulea/Guide.md
A Guide to Software Developer Job Advertisements
View Guide.md
Job Description Actual meaning
A fast-paced environment Your job will be constant firefighting
A market leader Recently started making a profit
Able to work with minimal spervision You'll be the one we blame when something goes wrong
An Agile team We have daily stand-ups
Dynamic environment Our leadership keeps changing priorities
Must be a team player Must not question authority
Ninja You do all the work alone
Passionate You wil
View foods.json
{
"key1": [{
"a" : {"name" : "chicken"},
"amount" : 1200,
"price" : 1000
},
{
"a" : {"name" : "rice"},
"amount" : 1500,
"price" : 650
View saeed.gnu-ascii-art.txt
/***
* _ _ _
* | | ____ (_) |
* ___ __ _ ___ ___ __| | __ _ _ __ _ _ / __ \ __ _ _ __ ___ __ _ _| | ___ ___ _ __ ___
* / __|/ _` |/ _ \/ _ \/ _` | / _` | '_ \| | | |/ / _` |/ _` | '_ ` _ \ / _` | | | / __/ _ \| '_ ` _ \
* \__ \ (_| | __/ __/ (_| || (_| | | | | |_| | | (_| | (_| | | | | | | (_| | | || (_| (_) | | | | | |
* |___/\__,_|\___|\___|\__,_(_)__, |_| |_|\__,_|\ \__,_|\__, |_| |_| |_|\__,_|_|_(_)___\___/|_| |_| |_|
* __/ | \____/ __/ |
* |___/ |___/
* http://patorjk.com/software/taag/#p=display&c=c&f=Big&t=TEXT
@ilius
ilius / jalali-plpgsql.sql
Last active Sep 30, 2019
Jalali Date Conversion in PL/pgSQL
View jalali-plpgsql.sql
create or replace function epoch_to_jd(float) RETURNS int as $$
BEGIN
return ($1 / (24*3600) + 2440588)::int;
END;
$$ LANGUAGE plpgsql;
create or replace function timestamp_to_jd(timestamp with time zone) RETURNS int as $$
BEGIN
return epoch_to_jd(extract (epoch from $1));
View lt-mojo-crawler.pl
#!/usr/bin/env perl
=dependencies:
sudo cpan get Mojolicious
sudo cpan get MongoDB
sudo cpan get Set::Light
sudo cpan get Log::Log4perl
sudo cpan get DateTime::Format::Strptime
sudo cpan get File::HomeDir
sudo cpan get Digest::SHA1
View sort_analyse.py
import random
from math import log
'''
findMaxDisplace = lambda array: \
max(
origIndex - sortedIndex \
for sortedIndex, (origIndex, value) in \
enumerate(
sorted(
You can’t perform that action at this time.