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
// Make a call to GlideRecordUtil and get the entire current object. | |
var gru = Packages.com.glide.script.GlideRecordUtil.get(current); | |
//Invoke the function called getChangedFieldNames(); | |
var fieldsChangedList = gru.getChangedFieldNames(); | |
// One important thing to note is that, the object thats here is a Java object, so we will now use j2js to convert it into a | |
// Javascript Array. |
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 requests; | |
from bs4 import BeautifulSoup | |
list_of_url = []; | |
def read_ghantasala(): | |
url = 'http://ghantasala.info/allsongs/'; | |
r = requests.get(url); | |
soup = BeautifulSoup(r.text); | |
for link in soup.find_all('a'): | |
if(link.get('href').find('mp3') > -1): |
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
def smoothPalindrome(string): | |
count =0; | |
dic = {c:string.count(c) for c in string}; | |
i=0; | |
while i < len(string): | |
if(string[i] != string[len(string)-1-i]): | |
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
var _ = require('underscore')._; | |
fs = require('fs') | |
fs.readFile('Output.json', 'utf8', function (err,data) { | |
if (err) { | |
return console.log(err); | |
} | |
var data = JSON.parse(data); | |
var filteredJSON = _.uniq(data,false,function(d){return d.name}) | |
var tags = {}; |
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 re | |
class ProcessMovieName: | |
# 1 > we substring them, for the year. So incase if the string contains | |
# any of the year mentioned, then it truncates it. | |
listOfYears = range(1900,2020) # So i don't have to bother till 2020, instead | |
# we could just set the current year too. | |
processedName =''; | |
def cleanName(self,name): | |
pattern = re.compile('[()\[\]]') | |
name = pattern.sub('',name); |
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 os | |
from ProcessMovieName import ProcessMovieName | |
from stack import custom_stack | |
from IMDBCall import IMDBCall | |
import json | |
#for making calls to IMDB | |
imdbcall = IMDBCall(); | |
#Custom stack implementation for easiness. | |
stack = custom_stack(); |
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 httplib2 | |
import urllib | |
from bs4 import BeautifulSoup | |
import ast | |
import json | |
import re | |
class IMDBCall: | |
''' This class gets JSON output for every search of IMDB API. | |
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
/* | |
* JSUtil already has some utility functions, Some more utility functions. | |
* Written by [email protected] | |
* Re-written for Service Now from underscore.js: http://underscorejs.org/ | |
* | |
*/ | |
var JSUtil2 = Class.create(); |
NewerOlder