For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copyright 2023 Khalifah K. Shabazz | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the “Software”), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the | |
# Software is furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from neo4j import GraphDatabase | |
import tweepy | |
import json | |
# Connect To DataBase Neo4j | |
uri = "bolt://localhost:7687" | |
driver = GraphDatabase.driver(uri, auth=("neo4j", "twitterdata")) | |
consumer_key = "consumer_key" | |
consumer_secret = "consumer_secret" | |
access_token = "access_token" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ngram_string(string, n=3, remove_space=False): | |
if remove_space: | |
string = string.replace(' ', '') | |
if len(string) < n: | |
return {string: 1} | |
ngrams = dict() | |
for i in range(len(string)-n+1): | |
ngram = string[i:i+n] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested on Python 3.6.1 | |
# install: pip install --upgrade arabic-reshaper | |
import arabic_reshaper | |
# install: pip install python-bidi | |
from bidi.algorithm import get_display | |
# install: pip install Pillow | |
from PIL import ImageFont |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* English digit to persian | |
* Copyright(C) 2009 by Amin Akbari [ http://eAmin.me/ ] | |
* Licensed under the MIT Style License [http://www.opensource.org/licenses/mit-license.php] | |
* | |
*/ | |
String.prototype.toFaDigit = function() { | |
return this.replace(/\d+/g, function(digit) { | |
var ret = ''; |