Skip to content

Instantly share code, notes, and snippets.

Avatar
🛰️
Python, for the love of it!

Abdur-Rahmaan Janhangeer Abdur-rahmaanJ

🛰️
Python, for the love of it!
View GitHub Profile
@Abdur-rahmaanJ
Abdur-rahmaanJ / count_class_and_funcs.py
Created Oct 5, 2020
Count number of classes and functions in the standard library
View count_class_and_funcs.py
import ast
import os
stats = {
'funcs':0,
'classes':0,
'analysed':0
}
base_path = 'C:\\Python37-32\\Lib'
@Abdur-rahmaanJ
Abdur-rahmaanJ / webview.py
Created Jul 29, 2019 — forked from techtonik/webview.py
View HTML content in Python with PySide
View webview.py
"""
Placed into public domain by
anatoly techtonik <techtonik@gmail.com>
Show HTML in GUI window through PyQt4/PySide.
[ ] position window at the center of the screen
(right now it is middle bottom)
[ ] implement lazy loading for PyQt4/PySide
"""
@Abdur-rahmaanJ
Abdur-rahmaanJ / exploring_word_vectors.ipynb
Created Jul 24, 2019 — forked from ssghost/exploring_word_vectors.ipynb
My answers for Stanford on-line course CS224N Winter 2019 Assignment-1.
View exploring_word_vectors.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View dictionary_4-1.py
#Import library
import json
# This is a python library for 'Text Processing Services', as the offcial site suggests.
import difflib
from difflib import SequenceMatcher
#Let's load the same data again
data = json.load(open("dictionary.json"))
#Run a Sequence Matcher
View snakecoin.py
import hashlib as hasher
import datetime as date
# Define what a Snakecoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
@Abdur-rahmaanJ
Abdur-rahmaanJ / snakecoin-server-full-code.py
Created Mar 1, 2018 — forked from aunyks/snakecoin-server-full-code.py
The code in this gist isn't as succinct as I'd like it to be. Please bare with me and ask plenty of questions that you may have about it.
View snakecoin-server-full-code.py
from flask import Flask
from flask import request
import json
import requests
import hashlib as hasher
import datetime as date
node = Flask(__name__)
# Define what a Snakecoin block is
class Block:
@Abdur-rahmaanJ
Abdur-rahmaanJ / transformer.js
Created Aug 31, 2017 — forked from kosamari/transformer.js
transform function for sbn compiler
View transformer.js
function transformer (ast) {
var svg_ast = {
tag : 'svg',
attr: {
width: 100, height: 100, viewBox: '0 0 100 100',
xmlns: 'http://www.w3.org/2000/svg', version: '1.1'
},
body:[]
}