View crawl-gx-dataviews.user.js
This file contains 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
// ==UserScript== | |
// @name crawl-gx-dataviews | |
// @namespace Utils | |
// @description crawl-gx-dataviews | |
// @include http://10.20.30.214/app/Dataviews.html | |
// ==/UserScript== | |
with(document) | |
{ | |
titles = getElementsByClassName("titulosRosaBgc"); |
View Jobs_Skills_and_Candidates.sql
This file contains 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
/** | |
* This sh*t is a dummy query to help a jenius fréndo | |
* | |
* The problem: get a dataset with the Job vs Candidate - Skill analysis, and answer: which candidate better fits the given job skills? | |
* | |
* Consider: | |
* - A Job is composed by many Skills | |
* - And so is the Candidate... | |
* | |
* Use your imagination, cuz this is just a dummy script, I wont create any schema... >:D |
View gist:1146821
This file contains 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
SELECT | |
"jobs".* | |
FROM | |
"jobs" | |
INNER JOIN "skill_sets" | |
ON "skill_sets"."source_id" = "jobs"."id" | |
AND "skill_sets"."source_type" = 'Job' | |
INNER JOIN "skills" | |
ON "skills"."id" = "skill_sets"."skill_id" |
View elland.skill.candidate.sql
This file contains 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
SELECT | |
jb.* | |
FROM | |
jobs jb | |
INNER JOIN jobs_skills jbs | |
ON jbs.job_id = jb.id | |
INNER JOIN skills skj | |
ON skj.id = jbs.skill_id | |
LEFT JOIN ( |
View oraexpy.py
This file contains 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: cp1252 -*- | |
import os | |
import time | |
import re | |
import cx_Oracle | |
class Exec: | |
debug = True | |
@staticmethod |
View eq2.py
This file contains 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
# a * x**2 + b * x + c = 0, a != 0 | |
# (-b +- sqrt(d) ) / 2 * a | |
# d = b**2 - 4 * a * c | |
from math import sqrt | |
#print 3 ** 2 | |
#print sqrt(9) | |
def get_d(a, b, c): | |
return ( b ** 2 ) - ( 4 * a * c ) |
View ora_tab_cons.sql
This file contains 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
select | |
tb.table_name, count(*) as num_cons | |
from | |
user_tables tb | |
inner join user_constraints ct | |
on ct.table_name = tb.table_name | |
inner join user_cons_columns cc | |
on cc.constraint_name = ct.constraint_name | |
and cc.table_name = ct.table_name | |
where |
View ora_udt_all_fields.sql
This file contains 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
declare | |
cursor c_sql_stmt is | |
select | |
cl.table_name, | |
cl.column_name, | |
'UPDATE '||cl.table_name||' set '||cl.column_name||' = :1 where regexp_like('||cl.column_name||', :2, ''i'')' as cmd | |
from | |
user_tab_columns cl | |
inner join user_tables tb | |
on tb.table_name = cl.table_name |
View ora_compile.sql
This file contains 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
begin | |
for cur_rec in | |
( | |
select | |
object_name, | |
object_type | |
from | |
user_objects | |
where | |
status <> 'VALID' |
View SQL.sublime-build
This file contains 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
Show hidden characters
{ | |
"cmd": ["sqlplus", "dummy/dummy@local", "@$file"], | |
"selector": "source.sql", | |
"encoding": "cp1252" | |
} |
OlderNewer