Skip to content

Instantly share code, notes, and snippets.

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
django-cors-headers = "*"
django-extensions = "*"
django-redis = "*"
djangorestframework = "*"

Keybase proof

I hereby claim:

  • I am jozo on github.
  • I am jozo_io (https://keybase.io/jozo_io) on keybase.
  • I have a public key ASAZN8lZ0xMvPe1CwsUgNuWZyK5LOGKiH8D-yvUb7m_NQwo

To claim this, I am signing this object:

SELECT
department, customer, supplier,
count(id)
FROM documents
WHERE supplier = 'ORANGE Slovensko'
AND supplier IS NOT NULL
AND department IS NOT NULL
AND customer IS NOT NULL
GROUP BY CUBE
(department, customer, supplier);

Exercise 1

Write a recursive query which returns a number and its factorial for all numbers up to 10. ☕

   ------------
   | 0  | 1   |
   | 1  | 1   |
   | 2  | 2   |
   | 3  | 6   |
| 4 | 24 |

Exercise 1

[use fiitpdt/postgres for this excercise] Suppose the following relational schema exists, where there are travel agents selling flights to some destination. A flight can have multiple services from the set {business class, lunch, drinks, priority boarding, online check-in}.

AGENT (**a_id**, name)
FLIGHT (**destination**, pilot_name, a_id)
SERVICE (**flight**, **service**)
select * from planet_osm_point where amenity = 'restaurant';
select st_asgeojson(way) from planet_osm_point where amenity = 'restaurant';
select st_asgeojson(st_transform(way, 3857)) from planet_osm_point where amenity = 'restaurant';
select o2.name, st_asgeojson(o2.way) from okresy o1
join okresy o2 on st_touches(o1.way, o2.way)
@jozo
jozo / spinehero-banner.html
Created September 6, 2016 08:45
Code for html banner
<div id="spinehero" style="width:980px;height:150px;" >
<iframe
src="https://spinehero.com/static/support/index.html"
border="0"
scrolling="no"
allowtransparency="true"
width="100%"
height="100%"
style="border:0;">
</iframe>