Skip to content

Instantly share code, notes, and snippets.

@mvaz
mvaz / gist:973464
Created May 15, 2011 19:35
Graph listener example
package net.mvaz.examples.graph;
import org.jgrapht.DirectedGraph;
import org.jgrapht.alg.DijkstraShortestPath;
import org.jgrapht.event.ConnectedComponentTraversalEvent;
import org.jgrapht.event.TraversalListenerAdapter;
import org.jgrapht.event.VertexTraversalEvent;
import org.jgrapht.graph.SimpleDirectedGraph;
import org.jgrapht.traverse.DepthFirstIterator;
import org.jgrapht.traverse.GraphIterator;
@mvaz
mvaz / cx_oracle_to_pandas.py
Created March 9, 2012 13:24
Example of executing and reading a query into a pandas dataframe
import cx_Oracle
import pandas
connection = cx_Oracle.connect('username/pwd@host:port/dbname')
def read_query(connection, query):
cursor = connection.cursor()
try:
cursor.execute( query )
names = [ x[0] for x in cursor.description]
@mvaz
mvaz / get_metadata.sql
Created December 12, 2011 19:59
Getting metadata from oracle sql tables
select --*
col.table_name, col.column_name, cc.constraint_name , rel.table_name, rel.column_name
from user_tab_columns col,
user_cons_columns con,
user_constraints cc,
user_cons_columns rel
where col.table_name = con.table_name
and col.column_name = con.column_name
and con.constraint_name = cc.constraint_name
and cc.constraint_type = 'R'
package de.tutorials;
import java.util.Date;
import java.util.Properties;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;

Using an Airtable to embed

Keybase proof

I hereby claim:

  • I am mvaz on github.
  • I am mvaz (https://keybase.io/mvaz) on keybase.
  • I have a public key ASA-HN-EaAfc2WV9XLuEHOgdmNNU8ojmByLb8MBxcSxkSgo

To claim this, I am signing this object:

@mvaz
mvaz / dump_oracle.py
Created March 18, 2012 21:27
Dump Oracle db schema to text
# http://code.activestate.com/recipes/576534-dump-oracle-db-schema-to-text/
#!/usr/bin/env python
# -*- coding: utf8 -*-
__version__ = '$Id: schema_ora.py 928 2012-01-12 19:09:34Z tt $'
# export Oracle schema to text
# usable to compare databases that should be the same
#
pragma solidity ^0.4.18;
// File: node_modules/zeppelin-solidity/contracts/ownership/Ownable.sol
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
@mvaz
mvaz / ether_adress
Last active November 6, 2017 17:16
0x5f95fd4235cb14d25f791c1c9b4504bb37a66e99
@mvaz
mvaz / rinkeby.account
Created October 16, 2017 11:59
rinkeby wallet
0x42745feF478C4F60FE88647B9B4DBf1219cb299E