Skip to content

Instantly share code, notes, and snippets.

View kataya1's full-sized avatar

Mo 'Kataya' Abdellatif kataya1

View GitHub Profile
/* v5.1.0 - August 2021 */
.accordion-body
.accordion-button
.accordion-collapse
.accordion-flush
.accordion-header
.accordion-item
.active
.alert
.alert-danger
@samredai
samredai / install_pipenv.sh
Created August 12, 2019 18:50
Python: Solution to 'Pipenv: Command Not Found' After 'pip install pipenv'
sudo -H pip install -U pipenv
# If you did a user install because you do not have sudo access, you have to modify your path to add your user folder
# The command on the next line tells you where your user folder is
# python3 -m site --user-base
PYTHON_BIN_PATH="$(python3 -m site --user-base)/bin"
PATH="$PATH:$PYTHON_BIN_PATH"
@udacityandroid
udacityandroid / onCreate method in MainActivity.java
Created May 13, 2016 18:17
Use OnClickListeners for All Categories - onCreate method in MainActivity.java
// Find the View that shows the numbers category
TextView numbers = (TextView) findViewById(R.id.numbers);
// Set a click listener on that View
numbers.setOnClickListener(new View.OnClickListener() {
// The code in this method will be executed when the numbers View is clicked on.
@Override
public void onClick(View view) {
Intent numbersIntent = new Intent(MainActivity.this, NumbersActivity.class);
startActivity(numbersIntent);
@mattupstate
mattupstate / example.py
Created February 5, 2015 03:37
JSON Patch SQLAlchemy models w/ Flask
from dictalchemy import make_class_dictable
from flask import Flask, request, jsonify, json
from flask_sqlalchemy import SQLAlchemy
from jsonpatch import JsonPatch, JsonPatchException
app = Flask(__name__)
app.debug = True
db = SQLAlchemy(app)
make_class_dictable(db.Model)
@mjbommar
mjbommar / fuzzy-sentence-matching-python.py
Last active May 17, 2022 15:55
Fuzzy sentence matching in Python - Bommarito Consulting, LLC: http://bommaritollc.com/2014/06/fuzzy-match-sentences-in-python
# coding: utf-8
# ## IPython Notebook for [Bommarito Consulting](http://bommaritollc.com/) Blog Post
#
# ### **Link**: [Fuzzy sentence matching in Python](http://bommaritollc.com/2014/06/fuzzy-match-sentences-in-python): http://bommaritollc.com/2014/06/fuzzy-match-sentences-in-python
#
# **Author**: [Michael J. Bommarito II](https://www.linkedin.com/in/bommarito/)
# In[159]:
@enjoylife
enjoylife / Scan.py
Created April 3, 2012 05:56
Python implementation of SCAN: A Structural Clustering Algorithm for Networks
# -*- coding: utf-8 -*-
"""
SCAN: A Structural Clustering Algorithm for Networks
As described in http://ualr.edu/nxyuruk/publications/kdd07.pdf
"""
from collections import deque
import numpy as np
from scipy.sparse import csr_matrix