Skip to content

Instantly share code, notes, and snippets.

View zareshahi's full-sized avatar
🏠
https://GhadirAI.com

Ali Zare Shahi zareshahi

🏠
https://GhadirAI.com
View GitHub Profile
@b01
b01 / download-vs-code-server.sh
Last active September 5, 2024 21:23
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/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:
@vessaldaneshvar
vessaldaneshvar / streamer.py
Last active October 28, 2020 12:10
Get data from API Twitter and using for Data Analysis
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"
@arastu
arastu / compare-strings.py
Last active October 11, 2021 07:32
Jaccard algorithms for comparing two strings and return similarity score, Port and refactor https://github.com/aceakash/string-similarity to python
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]
@amrza
amrza / run.py
Last active September 13, 2024 01:30
How to write RTL(Arabic/Persian) text on images in python.
# 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
@lopspower
lopspower / README.md
Last active November 14, 2024 08:32
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@digitaljhelms
digitaljhelms / gist:4287848
Last active November 16, 2024 01:10
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@eAmin
eAmin / en2fa.js
Created January 19, 2011 12:33
English Digit to Persian
/*
* 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 = '';