Skip to content

Instantly share code, notes, and snippets.

View kabeer11000's full-sized avatar
💭
Adding Bugs to fix later

Kabeer Jaffri kabeer11000

💭
Adding Bugs to fix later
View GitHub Profile
@kabeer11000
kabeer11000 / ucsc_pdf_bbox_parser.py
Created June 15, 2022 02:12 — forked from alexpreynolds/ucsc_pdf_bbox_parser.py
Extract the bounding box of the first, leftmost rectangle dividing labels and annotations in a PDF-formatted UCSC genome browser shot
#!/usr/bin/env python
import sys
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
from pdfminer.pdfpage import PDFPage
from pdfminer.pdfpage import PDFTextExtractionNotAllowed
from pdfminer.pdfinterp import PDFResourceManager
from pdfminer.pdfinterp import PDFPageInterpreter
from pdfminer.pdfdevice import PDFDevice
@kabeer11000
kabeer11000 / rocket-loader-nice.js
Created May 15, 2022 08:45 — forked from andy0130tw/rocket-loader-nice.js
Try to de-obfusticate CloudFlare Rocket Loader script as of 20190521.
'use strict';
!function() {
/**
* @return {?}
*/
function t$jscomp$0() {
return "cf-marker-" + Math.random().toString().slice(2);
}
/**
* @return {undefined}
@kabeer11000
kabeer11000 / split.py
Created May 4, 2022 08:19 — forked from dmorrison42/split.py
Podcast Splitting Script
#!/usr/bin/env python
# Dependencies:
# ffmpeg: https://www.ffmpeg.org/download.html
# fpcalc: https://acoustid.org/chromaprint
from datetime import datetime
import os
import os.path
import json
import math
import shutil
@kabeer11000
kabeer11000 / analytics.js
Created May 10, 2021 00:46 — forked from kevlened/analytics.js
Manually Deobfuscated Google Analytics js
/*
*
* This is currently a WIP
* Source originally pulled 3/28/2018
* https://www.google-analytics.com/analytics.js
*
* Tools:
* 1) Google Chrome source formatter
* 2) VS Code right-click rename symbol
*
class NeuMF(torch.nn.Module):
def __init__(self, config):
super(NeuMF, self).__init__()
#mf part
self.embedding_user_mf = torch.nn.Embedding(num_embeddings=self.num_users, embedding_dim=self.latent_dim_mf)
self.embedding_item_mf = torch.nn.Embedding(num_embeddings=self.num_items, embedding_dim=self.latent_dim_mf)
#mlp part
self.embedding_user_mlp = torch.nn.Embedding(num_embeddings=self.num_users, embedding_dim=self.latent_dim_mlp)
@kabeer11000
kabeer11000 / cache-proxy.php
Created March 2, 2021 18:59 — forked from hubgit/cache-proxy.php
PHP caching proxy
<?php
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, OPTIONS');
header('Access-Control-Allow-Headers: accept, x-requested-with, content-type');
exit();
}
$url = $_GET['url'];
@kabeer11000
kabeer11000 / iris.csv
Created February 5, 2021 10:44 — forked from netj/iris.csv
sepal.length sepal.width petal.length petal.width variety
5.1 3.5 1.4 .2 Setosa
4.9 3 1.4 .2 Setosa
4.7 3.2 1.3 .2 Setosa
4.6 3.1 1.5 .2 Setosa
5 3.6 1.4 .2 Setosa
5.4 3.9 1.7 .4 Setosa
4.6 3.4 1.4 .3 Setosa
5 3.4 1.5 .2 Setosa
4.4 2.9 1.4 .2 Setosa
@kabeer11000
kabeer11000 / inline_worker_with_fallback.html
Created December 9, 2020 14:47 — forked from romannurik/inline_worker_with_fallback.html
An example of using simple inline Web Workers with a fallback for browsers that can't support this technique.
<!DOCTYPE html>
<html>
<!--
Copyright 2011 Google Inc.
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
@kabeer11000
kabeer11000 / jwtRS256.sh
Created November 17, 2020 07:57 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@kabeer11000
kabeer11000 / render-promise-in-react.js
Created October 17, 2020 20:42 — forked from hex13/render-promise-in-react.js
how to render promises in React
//License CC0 1.0: https://creativecommons.org/publicdomain/zero/1.0/
class Deferred extends React.Component {
constructor(props) {
super(props);
this.state = {
value: ''
};
}
componentDidMount() {