This file contains 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 <iostream> | |
using namespace std; | |
struct Node | |
{ | |
int num; | |
Node *next; | |
}; |
This file contains 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 fitz | |
import pytesseract | |
def convert_to_img(pdf): | |
doc = fitz.open(pdf) | |
page = doc.loadPage(0) | |
pix = page.getPixmap() | |
output = f"{pdf.split(".")[0]}.png" | |
pix.writePNG(output) |
This file contains 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
from sys import argv | |
import json | |
import requests as req | |
def main(user): | |
res = req.get(f'https://api.github.com/users/{user}') | |
data = res.json() | |
with open(f'{user}.json', 'w', encoding='utf-8') as file: | |
json.dump(data, file, ensure_ascii = False, indent = 4) |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "utils/sqlite3.h" | |
#define _MAX_BUFFER 256 | |
#define MOZ_PROFILE_PATH "\\Mozilla\\Firefox\\Profiles\\" | |
#define MOZ_PROFILE_TOKEN "default-release" | |
#define MOZ_WEB_VISITS_FILE "places.sqlite" |
This file contains 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
""" | |
Discord Status Changer by ne0de | |
Needs a file called status.txt | |
Does not support emojis | |
This is not allowed by the Discord ToS | |
""" | |
from requests import get, patch | |
from time import sleep |
This file contains 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 "math.h" | |
float add(float a, float b) | |
{ | |
return a + b; | |
} | |
float sub(float a, float b) | |
{ | |
return a - b; |
This file contains 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
# Universal Gravitational Constant | |
G = 6.67408e-11 | |
def get_force(**kwargs): | |
""" | |
Calculate the gravitational force between two objects using the Newton's law of gravitation. | |
Params: |
This file contains 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 win32api as api | |
import win32con as con | |
# recording velocity in seconds | |
VELOCITY = 0.1 | |
# keys definition | |
KEY_F1 = 0x70 | |
KEY_F2 = 0x71 | |
KEY_F3 = 0x72 |
This file contains 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 required modules for parse csv file | |
pkg load io | |
# load csv files | |
boxes_data = csv2cell("boxes.csv"); | |
units_data = csv2cell("units.csv"); | |
# target column for multiply | |
target_column = 3; |
This file contains 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
''' | |
BeautifulOutput is a module for managing the terminal output of the program including colors and formatting. | |
The colors are defined in the COLORS dictionary, you can change it to whatever you want. | |
You can also add more colors, just add them to the dictionary colors. | |
To use it, just import it and call BeautifulOutput.init() before using it. | |
Then you can call BeautifulOutput(str) to print a string with the formatting. | |
Script by: Manuel Cabral (github: manucabral) | |
All rights reserved. |
OlderNewer