This file contains hidden or 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
| مشکلی به نام تحریم یافیلترینگ pypi.org | |
| چند روزی است که متأسفانه دسترسی به وبسایت pypi.org و نصب بسته های پایتونی توسط pip با مشکل مواجه شده است. از این رو لازم هست از روشهای جایگزین موجود استفاده کرد از جمله : | |
| ۱. استفاده از vpn ها 😩 | |
| ۲. تحریم شکن ها ( مدعی تحریمی بودن سایت بالا که البته من ۵ تحریم شکن مختلف رو چک کردم و هیچ کدوم روی همراه اول و صبا نت جواب نداده اند!)🤥 | |
| ۳. استفاد ه از آیینه ها ( mirrors ). 🤓 | |
| برا استفاده از آیینه ها میتوانید به صورت زیر عمل کنید: | |
| pip install --trusted-host [host] -i [address] some-pckage |
This file contains hidden or 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
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <WinSock2.h> | |
| // 1: | |
| void init_sock() | |
| { | |
| WSADATA wsaData; | |
| WSAStartup(MAKEWORD(2, 2), &wsaData); | |
| } |
This file contains hidden or 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
| // ignore_for_file: empty_catches | |
| import 'dart:async'; | |
| import 'dart:convert'; | |
| import 'package:firestation_manager_app/data/helpers/constants/network_constants.dart'; | |
| import 'package:latlong2/latlong.dart'; | |
| import 'package:web_socket_channel/web_socket_channel.dart'; | |
| import 'dart:developer'; | |
| import 'dart:io'; | |
| import 'dart:isolate'; |
This file contains hidden or 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
| syntax = "proto3"; | |
| service BookService { | |
| rpc GetBooks (Empty) returns (BookList); | |
| rpc GetBookByTitle (BookTitle) returns (Book); | |
| rpc AddBook (Book) returns (Book); | |
| rpc UpdateBook (UpdateBookRequest) returns (Book); | |
| rpc DeleteBook (BookTitle) returns (DeleteBookResponse); | |
| } |
This file contains hidden or 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
| CC = gcc | |
| CFLAGS = -Wall -fPIC | |
| LIBNAME = my_lib | |
| all: $(LIBNAME).so | |
| $(LIBNAME).so: my_lib.o | |
| $(CC) -shared -o $@ $^ | |
| my_lib.o: my_lib.c my_lib.h |
This file contains hidden or 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/bash | |
| docker pull postgres:latest | |
| docker run -d \ | |
| --name shard1 \ | |
| -e POSTGRES_PASSWORD=postgres \ | |
| -e POSTGRES_USER=postgres \ | |
| -e POSTGRES_DB=postgres \ | |
| -p 5435:5432 \ |
This file contains hidden or 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
| import requests | |
| from google.oauth2 import service_account | |
| import google.auth.transport.requests | |
| import google | |
| SCOPES = ['https://www.googleapis.com/auth/firebase.messaging'] | |
| def get_access_token(): | |
| """Retrieve a valid access token that can be used to authorize requests.""" | |
| credentials = service_account.Credentials.from_service_account_file( |
This file contains hidden or 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
| deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse | |
| # deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse | |
| deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse | |
| # deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse | |
| deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse | |
| # deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse | |
| deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse |
This file contains hidden or 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
| POSTGRES_DB= | |
| pg_dump $POSTGRES_DB -U postgres | gzip > $POSTGRES_DB-$(date +%d-%m-%y_%H-%M).tar.gz | |
| gunzip -c filename.gz | psql -U u -d db |
This file contains hidden or 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
| sudo apt update | |
| echo ">> Installing vim editor..." | |
| sudo apt install vim -y | |
| echo ">> Installing python3.11..." | |
| sudo add-apt-repository ppa:deadsnakes/ppa | |
| sudo apt update | |
| sudo apt install python3.11 -y | |
| sudo apt install python3.11-venv -y |
NewerOlder