Skip to content

Instantly share code, notes, and snippets.

View zareshahi's full-sized avatar
🏠
Working from home

Ali Zare Shahi zareshahi

🏠
Working from home
View GitHub Profile
@b01
b01 / download-vs-code-server.sh
Last active June 6, 2024 13:15
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 July 8, 2024 08:13
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 July 26, 2024 10:57
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 July 25, 2024 08:06
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 = '';