Skip to content

Instantly share code, notes, and snippets.

View htaghizadeh's full-sized avatar

Hossein Taghi-Zadeh htaghizadeh

View GitHub Profile
@smarek
smarek / 00README.md
Last active March 11, 2025 09:35
E3372s-153 from Stick mode to HiLink mode automatic installer

E3372s from STICK to HiLink mode installer

You need

  • curl, usb-modeswitch, grep, awk, sudo (not necessary, last step can fail safely)
  • balong_flash in $PATH ( https://github.com/forth32/balongflash.git )
  • atinout in $PATH ( https://github.com/beralt/atinout.git will work fine )
  • 2 files we flash (core sw update version 22.x, WebUI installer), we use these (you can probably use different balong-compatible):
    • core sw: "E3372sUpdate_22.298.03.02.965.BIN" / "E3372sUpdate_22.298.03.02.965.exe"
    • webui: "Update_WEBUI_17.100.06.00.03_Hilink_V7R2_9x25_CPIO.exe"
@loretoparisi
loretoparisi / fasttext_confusion_matrix.py
Last active November 4, 2022 13:21
Calculate FastText Classifier Confusion Matrix
#!/usr/local/bin/python3
# @author cpuhrsch https://github.com/cpuhrsch
# @author Loreto Parisi [email protected]
import argparse
import numpy as np
from sklearn.metrics import confusion_matrix
def parse_labels(path):
with open(path, 'r') as f:
{
"provinces": [
{
"id": "AZE",
"name": "آذربايجان شرقي",
"cities": [
{
"id": "4",
"name": "تبریز",
"areas": [
@anvk
anvk / psql_useful_stat_queries.sql
Last active February 17, 2025 18:48
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@tvoinarovskyi
tvoinarovskyi / worker_pool_consumer.py
Created July 14, 2017 12:50
Kafka enhanced consumer using Thread Workers and consumer.pause().
from kafka import (
KafkaConsumer, TopicPartition, OffsetAndMetadata, ConsumerRebalanceListener
)
import queue
import threading
import time
import logging
log = logging.getLogger(__name__)
@GMMan
GMMan / ubuntu-gl502vs.md
Last active July 22, 2020 15:30
Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

NVIDIA Graphics

Nouveau does not appear to support Pascal cards right now, so you should use the proprietary NVIDIA driver, available from the Additional Drivers applet.

Panel Dithering

@ilius
ilius / jalali-plpgsql.sql
Last active June 11, 2024 05:52
Jalali Date Conversion in PL/pgSQL
create or replace function epoch_to_jd(float) RETURNS int as $$
BEGIN
return ($1 / (24*3600) + 2440588)::int;
END;
$$ LANGUAGE plpgsql;
create or replace function timestamp_to_jd(timestamp with time zone) RETURNS int as $$
BEGIN
return epoch_to_jd(extract (epoch from $1));
@ckandoth
ckandoth / uwsgi_nginx_on_centos6.7.txt
Last active August 10, 2019 22:27
Set up nginx and uwsgi emperor on a CentOS 6.7 box
# GOAL: On a CentOS 6.7 minimal install, set up nginx as a reverse proxy to uWSGI Emperor with python 2.7.11 as a plugin to run Flask apps
# ::NOTE:: All instructions below are run as a sudoer, not as root. Talk to your sysadmins if you're not a sudoer.
# Install bare essentials:
sudo yum install -y epel-release
sudo yum groupinstall 'Development Tools'
sudo yum install -y vim openssl unzip nginx openssl-devel zlib-devel sqlite-devel bzip2-devel libffi-devel lapack-devel blas-devel libpng-devel freetype-devel
# Set SELINUX=disabled in the file below, and reboot, or this tutorial will get unnecessarily complicated:
@pupadupa
pupadupa / Lravel-5-inpalce-edit-using-xeditable.php
Last active May 19, 2022 12:55
Laravel 5 inplace editing using jquery's x-editable plugin . Inline and bulk editing examples.
/**
*
* In this example we create view with inplace and bulk editing.
* Tools and plugins:
* jQuery
* xEditable jquery plugin
* twitter bootstrap
*
*/
@kylemcdonald
kylemcdonald / _tsne.pdf
Last active February 22, 2024 22:13
Exploring antonyms with word2vec.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.