Skip to content

Instantly share code, notes, and snippets.

Avatar

Sai Krishna Teja Bobba saiteja09

View GitHub Profile
@saiteja09
saiteja09 / XboxGamerScore.js
Last active February 4, 2023 19:16
Widget for Yearly Xbox GamerScore Tracking for use with Scriptable app in iOS
View XboxGamerScore.js
let xbox_refreshtoken = null
let xbox_clientid = null
let xbox_clientsecret = null
let xbox_credential_base64 = null
let xbox_authorization = null
let xbox_id = null
let xbox_profileurl = 'https://peoplehub.xboxlive.com/users/me/people/xuids(<xid>)/decoration/detail,preferredColor,presenceDetail,multiplayerSummary'
let xbox_titleHistoryurl = 'https://titlehub.xboxlive.com/users/xuid(<xid>)/titles/titleHistory/decoration/GamePass,TitleHistory,Achievement,Stats'
let xbox_achievementsurl = 'https://achievements.xboxlive.com/users/xuid(<xid>)/achievements?orderBy=UnlockTime&unlockedOnly=true'
const xbox_tokenurl = 'https://login.live.com/oauth20_token.srf'
@saiteja09
saiteja09 / Images
Last active November 19, 2022 19:50
View Images
Image Hosting :)
@saiteja09
saiteja09 / Cricket.js
Last active September 8, 2022 10:59
Widget for Cricket Scores iOS - Scriptable
View Cricket.js
let teamsListURL = "https://gist.github.com/saiteja09/71f47ed2714a4cad479f409b2f7d7bc2/raw/49ec450f7a2ad8d662a01863f6b5f7279bd06f3a/teams.json";
let teamInfoURL = "https://hs-consumer-api.espncricinfo.com/v1/pages/team/home?lang=en&teamId=";
let matchInfoURL = "https://hs-consumer-api.espncricinfo.com/v1/pages/match/home?lang=en&seriesId=<sid>&matchId=<mid>";
// WIDGET MAIN
mainWidget = await createWidget();
if (config.runsInWidget) {
Script.setWidget(mainWidget);
@saiteja09
saiteja09 / teams.json
Last active August 30, 2022 17:13
List of Cricket Teams
View teams.json
[{"id":1,"name":"England"},{"id":2,"name":"Australia"},{"id":3,"name":"South Africa"},{"id":4,"name":"West Indies"},{"id":5,"name":"New Zealand"},{"id":6,"name":"India"},{"id":7,"name":"Pakistan"},{"id":8,"name":"Sri Lanka"},{"id":9,"name":"Zimbabwe"},{"id":10,"name":"Fiji"},{"id":11,"name":"U.S.A."},{"id":12,"name":"Bermuda"},{"id":13,"name":"Denmark"},{"id":14,"name":"E&C Africa"},{"id":15,"name":"Netherlands"},{"id":16,"name":"Malaysia"},{"id":17,"name":"Canada"},{"id":18,"name":"Gibraltar"},{"id":19,"name":"Hong Kong"},{"id":20,"name":"P.N.G."},{"id":21,"name":"Argentina"},{"id":22,"name":"Israel"},{"id":23,"name":"Singapore"},{"id":24,"name":"West Africa"},{"id":25,"name":"Bangladesh"},{"id":26,"name":"Kenya"},{"id":27,"name":"U.A.E."},{"id":28,"name":"Namibia"},{"id":29,"name":"Ireland"},{"id":30,"name":"Scotland"},{"id":31,"name":"Italy"},{"id":32,"name":"Japan"},{"id":33,"name":"Nepal"},{"id":34,"name":"France"},{"id":35,"name":"Uganda"},{"id":36,"name":"Germany"},{"id":37,"name":"Oman"},{"id":38,"nam
@saiteja09
saiteja09 / StockWidget.js
Last active October 22, 2022 17:47
Stock Widget for iOS using Scriptable
View StockWidget.js
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-blue; icon-glyph: book; share-sheet-inputs: plain-text;
// Stock Ticker Widget
let stocksInfo = await getStockData()
let widget = await createWidget()
if (config.runsInWidget) {
// The script runs inside a widget, so we pass our instance of ListWidget to be shown inside the widget on the Home Screen.
Script.setWidget(widget)
} else {
View mockdata.csv
id first_name last_name email gender
1 Elsinore Brolly ebrolly0@un.org Female
2 Vivianne Pegler vpegler1@ovh.net Female
3 Essa Gillford egillford2@whitehouse.gov Female
4 Brenna Spincks bspincks3@sitemeter.com Female
5 Thane Taillard ttaillard4@fda.gov Male
6 Nydia Tixier ntixier5@instagram.com Female
7 Reece Berthelmot rberthelmot6@google.pl Male
8 Joan Norcott jnorcott7@shutterfly.com Female
9 Bryon Legh blegh8@wordpress.org Male
@saiteja09
saiteja09 / sp_stocks.sql
Created March 29, 2018 14:42
Script for Linked Server to query REST API using ODBC driver created using Progress DataDirect OpenAccess SDK
View sp_stocks.sql
USE [Chinook2]
GO
/****** Object: StoredProcedure [dbo].[sp_stocksapi] Script Date: 3/29/2018 10:37:48 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
@saiteja09
saiteja09 / script.py
Created November 6, 2017 16:17
Glue Job Script for reading data from DataDirect Salesforce JDBC driver and write it to S3
View script.py
import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.dynamicframe import DynamicFrame
from awsglue.job import Job
args = getResolvedOptions(sys.argv, ['JOB_NAME'])