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 https://github.com/izy521/discord.io/blob/master/lib/index.js |
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 requests | |
from bs4 import BeautifulSoup | |
s = requests.session() | |
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36'} | |
url = 'http://blocgame.com' | |
data = {'username': 'USERNAME', 'password': 'PASSWORD', 'login': ''} | |
s.headers['User-Agent'] = headers['User-Agent'] |
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 bs4 import BeautifulSoup | |
import aiohttp | |
import asyncio | |
from datetime import datetime | |
import csv | |
loop = asyncio.get_event_loop() | |
client = aiohttp.ClientSession(loop=loop) | |
HEADERS = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0'} | |
BLOC = 'http://blocgame.com' |
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 os | |
def search(path, query): | |
results = [] | |
q = query.lower() | |
for root, dirs, files in os.walk(path): | |
for file in files: | |
if q in file.lower(): | |
results.append(os.path.join(root, name)) | |
for ls in dirs: |
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: https://stackoverflow.com/a/26494912 | |
$colItems = Get-ChildItem $startFolder | Where-Object {$_.PSIsContainer -eq $true} | Sort-Object | |
foreach ($i in $colItems) | |
{ | |
$subFolderItems = Get-ChildItem $i.FullName -recurse -force | Where-Object {$_.PSIsContainer -eq $false} | Measure-Object -property Length -sum | Select-Object Sum | |
$i.FullName + " -- " + "{0:N2}" -f ($subFolderItems.sum / 1MB) + " MB" | |
} |
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 os | |
path = os.getcwd() | |
for root, dirs, files in os.walk(path): | |
with open('names.txt', 'w') as f: | |
f.writelines([i +'\n' for i in files]) | |
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
#Incomplete | |
from sqlalchemy import ( | |
create_engine, | |
MetaData, | |
Table | |
) | |
from sqlalchemy.orm import sessionmaker | |
sqlite_engine = create_engine('sqlite:///main.db', echo=True) |
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
@echo off | |
rem ===================================================== | |
rem Converts a MP3 file to a M4R file using ffmpeg. | |
rem Usage: Drop a MP3 file at the top of this batch file. | |
rem ===================================================== | |
rem %~f1 = Full File Path, with drive letter | |
rem %~p1 = Drive Letter | |
rem %~p1 = Path Only | |
rem %~n1 = File Name |
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
cmake_minimum_required(VERSION 3.13) | |
project(ProjectName) | |
set(CMAKE_CXX_STANDARD 14) | |
add_executable(ProjectName main.cpp) | |
set(prefix "PATH_TO_MINGW_OR_SOMETHING_ELSE_WITH_SDL2_DEV_FILES_PASTED_INTO_IT_PATH_CANNOT_HAVE_SPACES") | |
#uses i686 32bit minwgw32 |
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; | |
int power(int a, int b) { | |
int pow = 1; | |
if (b == 0) { | |
return pow; | |
} | |
OlderNewer