I hereby claim:
- I am svmihar on github.
- I am svmihar (https://keybase.io/svmihar) on keybase.
- I have a public key whose fingerprint is 9E97 2B8A CE2A 2EC7 13FC 205F A7BF 0E81 55B9 F6F7
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # An example to get the remaining rate limit using the Github GraphQL API. | |
| import requests | |
| headers = {"Authorization": "Bearer YOUR API KEY"} | |
| def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section. | |
| request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers) | |
| if request.status_code == 200: |
| import cv2 | |
| from time import sleep, time | |
| import sys | |
| import curses | |
| from curses import wrapper | |
| x = 160 | |
| sx = 4 |
| from bs4 import BeautifulSoup | |
| import requests | |
| # url = 'https://indeks.kompas.com/' | |
| # url='https://indeks.kompas.com/all/2019-04-01/2' | |
| url = 'https://indeks.kompas.com/all/2019-04-01/3' | |
| req = requests.get(url) | |
| # print(req.text) |
| import pandas as pd | |
| import json | |
| import requests | |
| url = 'https://www.tokopedia.com/reputationapp/review/api/v2/product/269922085?page=1&total=20' | |
| kumpulan_url = [] | |
| for i in range(1, 401): |
| """ def f(arr1, arr2): | |
| k = arr2[3] | |
| ct = 0 | |
| while k > arr2[2]-1: | |
| if (arr1[k] <= arr2[1] and not arr1[k] <= arr2[0]): | |
| ct = ct + 1 | |
| k = k - 1 | |
| return ct | |
| from multiprocessing import Process, current_process | |
| import multiprocessing | |
| def g(str): | |
| i = 0 | |
| new_str = "" | |
| while i < len(str) -1: | |
| new_str = new_str + str[i+1] | |
| i = i+1 | |
| return new_str |
At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.
git commit --amendThis will open your $EDITOR and let you change the message. Continue with your usual git push origin master.
| #CODE | |
| #Generate root password | |
| import random, string | |
| password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20)) | |
| #Download ngrok | |
| ! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
| ! unzip -qq -n ngrok-stable-linux-amd64.zip | |
| #Setup sshd |
| import os, time | |
| """ | |
| 1. install tmux | |
| 2. masuk tmux | |
| 3. install ngrok | |
| 4. ambil authtoken | |
| 5. ./ngrok authtoken ambil_authtoken | |
| 6. pip3 install jupyterlab pipenv |