Skip to content

Instantly share code, notes, and snippets.

View pganti's full-sized avatar

Paddy Ganti pganti

  • Instart Logic
  • Bay Area,CA
View GitHub Profile
@pganti
pganti / prebid.js
Created January 21, 2019 02:38
realvu
This file has been truncated, but you can view the full file.
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ var parentJsonpFunction = window["pbjsChunk"];
/******/ window["pbjsChunk"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [], result;
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(installedChunks[chunkId]) {
@pganti
pganti / js
Created November 2, 2018 18:09
cnet
/*!
* jQuery JavaScript Library v1.8.3
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
@pganti
pganti / g00
Created October 17, 2018 20:22
var EPLAYER_BUILDNUMBER = "1.134.0 - marcin.derlatka.master.53591f61";
!function(a) {
"use strict";
!function(a) {
if (function() {
var b = !0
, c = !1
, d = "";
try {
var e = "object" == typeof a.IXC_246_12615068276446206 && a.IXC_246_12615068276446206;
curl 'https://c-7npsfqifvt34x24tfdvsfqvcbetx2ehx2eepvcmfdmjdlx2eofu.g00.yorkshireeveningpost.co.uk/g00/3_c-7x78x78x78.zpsltijsffwfojohqptu.dp.vl_/c-7NPSFQIFVT34x24iuuqtx3ax2fx2ftfdvsfqvcbet.h.epvcmfdmjdl.ofux2fhbnqbex2fbetx3fhegq_sfrx3d2x26qwtjex3d4885038985293480x26dpssfmbupsx3d4209417396294326x26pvuqvux3dktpo_iunmx26dbmmcbdlx3dhpphmfubh.jnqm.qvcbet.dbmmcbdlQspyz2x26jnqmx3dgjgtx26betjex3dOUx26ktpo_bx3d2x26fjex3d32172757x253D32172854x253D32173688x26wshx3d350x26ugdex3d1x26hvdjx3d3.3.1.1.3.3.1x26tdx3d2x26tgwx3d2-1-30x26jv_qbsutx3d9168x253Dmffet.kqx253Dipnfx26fod_qsfw_jvtx3d1x253G2x253G3x253D1x253G2x253G3x253D1x253G2x253G3x253D1x253G2x253G3x253D1x253G2x253G3x253D1x253G2x253G3x253D1x253G2x253G3x26qsfw_jv_tatx3d081y361x258D839y01x253D3y3x253D411y711x258D411y361x253D411y361x253D411y361x253D839y01x253D839y01x26qsfw_tdqx3dqptx254Eupqx2537ic_tjaf_bqqofyvtx254E839y01x2537ic_qc_bqqofyvtx254E1.71x2537ic_beje_bqqofyvtx254E3854b2683b27ebx2537ic_cjeefs_bqqofyvtx254Ebqqofyvtx2537ic_tjaf_svcjdpox254E839y01x2537ic_qc_svcjdpox2
@pganti
pganti / markov.py
Created August 30, 2018 03:37
markov chain
from collections import defaultdict, Counter
import random
import sys
# This is the length of the "state" the current character is predicted from.
# For Markov chains with memory, this is the "order" of the chain. For n-grams,
# n is STATE_LEN+1 since it includes the predicted character as well.
STATE_LEN = 4
data = sys.stdin.read()
try {
var cX = cX || {};
cX.callQueue = cX.callQueue || [];
if (!cX.library) {
cX.library = {
eventReceiverBaseUrl: cX.eventReceiverBaseUrl || "http" + (location.protocol == "https:" ? "s://s" : "://") + "comcluster.cxense.com/Repo/rep.html",
eventReceiverBaseUrlGif: cX.eventReceiverBaseUrlGif || "http" + (location.protocol == "https:" ? "s://s" : "://") + "comcluster.cxense.com/Repo/rep.gif",
p1BaseUrl: cX.p1BaseUrl || (location.protocol == "https:" ? "https://scdn.cxense.com/sp1.html" : "http://cdn.cxense.com/p1.html"),
cxenseUserIdUrl: "https://id.cxense.com/public/user/id",
cxenseGlobalIdIframeUrl: location.protocol === "https:" ? "https://scdn.cxense.com/sglobal.html" : "http://cdn.cxense.com/global.html",
@pganti
pganti / table_extract.py
Created January 27, 2018 03:51
extract table name from html
from xml.etree import ElementTree as ET
table = ET.XML(s)
rows = iter(table)
headers = [col.text for col in next(rows)]
results = []
for row in rows:
values = [col.text for col in row]
results.append(values[0])
#print dict(zip(headers, values))
print results
<div id="check2" style="height:1px;position:absolute;z-index:-999"></div>
<div id="Ad-Container" class="ADbox" style="height:1px;position:absolute;z-index:-999"></div>
<script>
if (typeof dataLayer !== "undefined")
{
dataLayer.processadb();
dataLayer.processadb = function ()
{
var f = document.getElementById('check2');
var fs;
@pganti
pganti / .js
Created October 12, 2017 18:47
publica
<script type="text/javascript">(function(k,h,u,v,O,B,n,l){function C(a,b,c){h.body?(m(w,p+" blocked",a,b),"1"!=="0"&&(D(),setInterval(D,100))):c<P?setTimeout(function(){C(a,b,c+1)},10*(c+1)):m(w,p+" blocked; document.body miss",a,b)}function D(){for(var a=h.body.children,b=!1,c=a.length-1;0<=c;c--)a[c]&&(a[c].innerText===E?b=!0:h.body.removeChild(a[c]));if(!b)for(a=h.createElement("h1"),a.innerText=E,h.body.appendChild(a),b=0;a&&20>b;)a.style.cssText="background: white !important;",a=a.parentElement,b+=1}function m(a,b,c,d){a={code:a,message:b,block_detection:{num_requests:0}};a.code===w&&(a.site_disabled="1"!=="0");0<c&&(a.block_detection.success=c,a.block_detection.num_requests+=c);0<d&&(a.block_detection.fail=d,a.block_detection.num_requests+=d);x("error",a)}function x(a,b,c,d){d||(d=O);var e=k.location.href;b.bid_request={id:"-1",site:{page:e}};b.publisher_uuid=B;b.site_uuid=n;b.js_app_cdn_url=p;b.bootstrap_version=u;d+="/v1/log/";try{d+=a+"?"+q(JSON.stringify(b))}catch(f){d+="exception?e\x3d"+encodeURICo
@pganti
pganti / aksb.js
Created August 18, 2017 20:02
rum_timing
/*
Copyright 2010 Google Inc.
Copyright 2016 Akamai Technolgies
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0