Skip to content

Instantly share code, notes, and snippets.

View zshanabek's full-sized avatar
🍉
eating watermelon

Zhunisali Shanabek zshanabek

🍉
eating watermelon
View GitHub Profile
@GONZOsint
GONZOsint / instagram_user_information.py
Created September 14, 2022 20:21
Script to obtain Instagram user informaption
import requests
import re
import sys
import json
def obtain_ids(user):
response = requests.get('https://www.instagram.com/' + user)
appid = re.search('appId":"(\d*)', response.text)[1]
serverid = re.search('server_revision":(\d*)', response.text)[1]
@ghandic
ghandic / fastapi_query_utils.py
Last active November 11, 2024 18:15
fastapi sortby/filter
from enum import auto
from typing import List, Optional
from collections import Counter
from fastapi_utils.enums import StrEnum
from fastapi_utils.inferring_router import InferringRouter
from pydantic import BaseModel
from fastapi import HTTPException, Query, Depends
router = InferringRouter()
@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active November 13, 2024 13:40
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
[settings]
[email protected]
EMAIL_HOST_PASSWORD=your_app_password_here
@konstantinbo
konstantinbo / custom-juno.sh
Last active February 12, 2020 20:18
Thing to do after installation of Elementary OS Juno (5.0)
# First you update your system
sudo apt update && sudo apt-get dist-upgrade
# Uninstall unnecessary programs
sudo apt purge epiphany-browser epiphany-browser-data #browser
sudo apt purge pantheon-mail
# Bring back Software and Updates from Ubuntu
sudo apt-get install software-properties-gtk
# Properties Commons (to install elementary tweaks)
@ankurk91
ankurk91 / 1-elementary-os-apps.md
Last active November 1, 2024 15:07
elementary OS 5.1 Hera

elementaryOS Apps and Configs

⚠️ No longer maintained! ⚠️

This guide has been updated for elementaryOS v5.0+.

Enbale PPA support

sudo apt-get update
sudo apt-get -y install software-properties-common
@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@javilobo8
javilobo8 / download-file.js
Last active October 27, 2024 09:15
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@subhajeet2107
subhajeet2107 / django_python_interview_questions.md
Last active May 30, 2024 06:44
Simple Interview questions for Django Developer

Django/Python Questions

  1. Find the most frequent integer in a list, Test list : [3,5,6,3,9,0,3,8,3,1,3]

  2. Find the common elements of 2 lists

        a = [2,3,4,1,1,3,6]
        b = [2,8,9,1,3]
@gonz
gonz / gist:10044002
Created April 7, 2014 20:16
MultiSerializerViewSetMixin
class MultiSerializerViewSetMixin(object):
def get_serializer_class(self):
"""
Look for serializer class in self.serializer_action_classes, which
should be a dict mapping action name (key) to serializer class (value),
i.e.:
class MyViewSet(ViewSet):
serializer_class = MyDefaultSerializer
serializer_action_classes = {