Skip to content

Instantly share code, notes, and snippets.

View delicb's full-sized avatar
🪲

Bojan Delić delicb

🪲
View GitHub Profile
[
{ "city" : "Beograd", "_id" : 11000 },
{ "city" : "Beograd Vozdovac", "_id" : 11010 },
{ "city" : "Beograd Čukarica", "_id" : 11030 },
{ "city" : "Beograd Zvezdara", "_id" : 11050 },
{ "city" : "Beograd Palilula", "_id" : 11060 },
{ "city" : "Novi Beograd", "_id" : 11070 },
{ "city" : "Beograd Zemun", "_id" : 11080 },
{ "city" : "Beograd Rakovica", "_id" : 11090 },
{ "city" : "Kaluđerica", "_id" : 11130 },
@delicb
delicb / ironpy_aes_crypt.py
Created January 18, 2013 10:36
IronPython AES encrypt and decrypt
# NOTE: Change this to random numbers in range (0, 255) inclusive
_key = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
_vector = [0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0]
from System import Array, Byte
from System.Text import UTF8Encoding
from System.IO import MemoryStream
__author__ = 'Bojan Delic <bojan@delic.in.rs>'
__date__ = 'Jan 11, 2013'
__copyright__ = 'Copyright (c) 2013 Bojan Delic'
class DependencyGraphException(Exception): pass
class Node(object):
''' Represents single node in graph '''
@delicb
delicb / main.py
Last active December 15, 2023 21:42
Python logging configuration example with multiple modules.
import logging
from logging.config import dictConfig
# adding custom level
logging.VERBOSE = 5
logging._levelNames.update({
5: 'VERBOSE',
'VERBOSE': 5,
})