This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cx_Oracle | |
conn = cx_Oracle.Connection("userid/password@tns") | |
curs = conn.cursor() | |
curs.callproc("dbms_output.enable") | |
sqlCode = """ | |
some long | |
sql code | |
with dbms_output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from gimpfu import * | |
import os | |
import glob # unused | |
colorpalette = [] | |
def decolorFiles(dirname, ext, suffix): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' basic CAS authenticated page scraping using Requests and BeautifulSoup | |
''' | |
__author__ = "swiatczak" | |
import requests | |
from bs4 import BeautifulSoup as soup | |
import urllib | |
def casSoup(user, password, serviceURL, casURL, targets = None): | |
''' somehow simplistic approach that authenticates requests against CAS using Requests.Session |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' silly/fun puzzles and a proof of failures (actually this version finds a solution :( ) | |
author: swiatczak | |
doWork - | |
this one solves the following p | |
''' | |
import operator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BDAYSD = { 13: {5:1, 7:1}, 14:{7:1 , 8:1}, 15:{5:1,8:1}, 17:{6:1,8:1}, 18:{6:1}, 19:{5:1} } | |
BDAYSM = { 5: {13:1, 15:1, 19:1}, 6: {17:1, 18:1}, 7: {13:1, 14:1}, 8:{14:1, 15:1, 17:1} } | |
def removeObvious(status = False): | |
if not status: | |
b = {a: {d: BDAYSD[a][d] for d in BDAYSD[a] if BDAYSD[a][d] == 1} for a in BDAYSD } | |
for d in b: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#purpose: little birgday riddle dramma helper | |
#author: Janusz Swiatczak | |
#pthon ver 2.7 | |
BDAYSD = { 13: {5:1, 7:1}, 14:{7:1 , 8:1}, 15:{5:1,8:1}, 17:{6:1,8:1}, 18:{6:1}, 19:{5:1} } | |
BDAYSM = { 5: {13:1, 15:1, 19:1}, 6: {17:1, 18:1}, 7: {13:1, 14:1}, 8:{14:1, 15:1, 17:1} } | |
def removeObvious(): | |
b = {a: {d: BDAYSD[a][d] for d in BDAYSD[a] if BDAYSD[a][d] == 1} for a in BDAYSD } | |
m = {a: {d: BDAYSM[a][d] for d in BDAYSM[a] if BDAYSM[a][d] == 1} for a in BDAYSM } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Transform = require('stream').Transform | |
stream = require 'stream' | |
split = require 'split' | |
# references: | |
# http://nicolashery.com/parse-data-files-using-nodejs-streams/ | |
# http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options | |
# https://github.com/substack/stream-handbook | |
# https://www.npmjs.com/package/split | |
# http://codewinds.com/blog/2013-08-04-nodejs-readable-streams.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src: https://social.technet.microsoft.com/Forums/windowsserver/en-US/1d27ad79-2fa9-4e0c-9b2d-249809c64391/win2008r2-context-menu-empty-document-template-if-outside-of-user-folder?forum=winservergen | |
icacls C:\ABC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path = require 'path' | |
fs = require 'fs' | |
expat = require 'node-expat' | |
# | |
# peoplesoft XML project file parser - similar to: | |
# python version: https://github.com/swiatczak/psprojectparser | |
# | |
# just playing with class construction and chaining of the methods | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path = require 'path' | |
fs = require 'fs' | |
Fiber = require 'fibers' | |
Future = require 'fibers/future' | |
wait = Future.wait | |
readFile = Future.wrap(fs.readFile) | |
# | |
# peoplesoft XML project file parser - similar to: | |
# python version: https://github.com/swiatczak/psprojectparser |
NewerOlder