Skip to content

Instantly share code, notes, and snippets.

@shivamy
shivamy / output_proc_shell_check_files
Last active March 9, 2018 23:17
output_proc_shell_check_files #oracle #shell #sql
Connecting to the database ora-shell-shiva.
ORA-20000: ORU-10027: buffer overflow, limit of 20000 bytes
ORA-06512: at "SYS.DBMS_OUTPUT", line 32
ORA-06512: at "SYS.DBMS_OUTPUT", line 97
ORA-06512: at "SYS.DBMS_OUTPUT", line 112
ORA-06512: at "EA_SCHEMA.PROC_TEMP_ANALYSIS_CHECK_FILES", line 10
ORA-06512: at line 2
SELECT count(1) cnt FROM ea_schema.temp_analysis_information_item WHERE SYS.UTL_MATCH.EDIT_DISTANCE_SIMILARITY('Corridor.sgy', original_file_name) > 90
1 : 0
SELECT count(1) cnt FROM ea_schema.temp_analysis_information_item WHERE SYS.UTL_MATCH.EDIT_DISTANCE_SIMILARITY('Corridor_tvsw.sgy', original_file_name) > 90
@shivamy
shivamy / talus_output.txt
Last active March 8, 2018 07:50
Oracle Talus db output of counts of varchar columns
-- ------------ For tables/colums in EA_SCHEMA.temp_analysis_cols with sl_num between 0 and 100
Connecting to the database ora-shell-shiva.
1| SELECT COUNT(1) ct FROM EA_SCHEMA."SEISMIC_INTEREST" WHERE "SEISMIC_LINE_ID" LIKE '%segy' | Count: 0
2| SELECT COUNT(1) ct FROM EA_SCHEMA."SEISMIC_INTEREST" WHERE "BA_ID" LIKE '%segy' | Count: 0
3| SELECT COUNT(1) ct FROM EA_SCHEMA."SEISMIC_INTEREST" WHERE "R_INTEREST_TYPE" LIKE '%segy' | Count: 0
4| SELECT COUNT(1) ct FROM EA_SCHEMA."SEISMIC_INTEREST" WHERE "FIRST_SHOT_POINT" LIKE '%segy' | Count: 0
5| SELECT COUNT(1) ct FROM EA_SCHEMA."SEISMIC_INTEREST" WHERE "LAST_SHOT_POINT" LIKE '%segy' | Count: 0
6| SELECT COUNT(1) ct FROM EA_SCHEMA."SEISMIC_INTEREST" WHERE "SOURCE" LIKE '%segy' | Count: 0
7| SELECT COUNT(1) ct FROM EA_SCHEMA."SEISMIC_INTEREST" WHERE "REMARK" LIKE '%segy' | Count: 0
@shivamy
shivamy / bengaluru_rents.ipynb
Last active March 7, 2018 02:34
craigslist_housing_analysis #craigslist #housing #rental
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shivamy
shivamy / hello_pluto_again.bf
Created July 17, 2015 19:30
Hello Pluto again!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .
------------------------------------------------------------------------ .
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .
----------------------------------------------------------------------------------------------------- .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .
------------------------------------------------------------------------------------------------------------ .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .
------------------------------------------------------------------------------------------------------------ .
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .
------------------------------------------------------------------------------------------------------------
@shivamy
shivamy / hello_pluto_1.bf
Created July 17, 2015 19:25
Hello Pluto!
++++++++
[
>>++>++++>++++++>++++++++>++++++++++>++++++++++++>
++++++++++++++>++++++++++++++++>++++++++++++++++++>++++++++++++++++++++>
++++++++++++++++++++++>++++++++++++++++++++++++>++++++++++++++++++++++++++>
++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++<<<<<<<<<<<<<<<<
-
]
>>>>>++++++++ .
>>+++++ .
@shivamy
shivamy / nasa_orion_journey_names.py
Last active August 29, 2015 14:10
Nasa Orion Journey Names Analysis
#!/Users/shiva/anaconda/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import re
import locale
import pprint
import scraperwiki
from bs4 import BeautifulSoup
@shivamy
shivamy / ssh_terminal_bg_color_change
Last active August 29, 2015 14:07
Terminal background color change for remote ssh
#!/bin/bash
# Notes:
# Local window font is white on black background. On exiting from any ssh active terminal window resets to this config.
# Remote ssh terminal is chosen with type of server connected - Prod has reddish bg, dev vm has gray bg, etc.
HOSTNAME=`echo $@ | sed s/.*@//`
# echo $HOSTNAME, $@
if [ ${HOSTNAME} ]; then
echo "ssh to $HOSTNAME"
@shivamy
shivamy / Windows powershell
Created February 13, 2014 23:01
Powershell vars and more
# Start powershell and in the PS window
# File $HOME\USER_profile.ps1
$env:Path += ";C:\cygwin64\bin;C:\cygwin64\sbin"
> Set-ExecutionPolicy RemoteSigned # Set policy so that you can execute local scripts!
> . .\A_USER_profile.ps1 # Source a profile file
> $v = $env:path; $v.split(";") # Print the path one per line
C:\Windows\system32