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
using System; | |
using System.Text.RegularExpressions; | |
namespace ConsoleApp1 | |
{ | |
class Doc_Replacer | |
{ | |
static void Main(string[] args) | |
{ |
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 itertools | |
import string | |
import requests | |
import logging as log | |
from constants import Constants | |
""" | |
S = requests.Session() | |
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
class Fetcher: | |
def __init__(self): | |
self._startlink = 'https://onepiece.fandom.com/api.php?format=json&action=' | |
self._imagestartlink = self._startlink+'imageserving&wisTitle=' | |
self._querystartlink = self._startlink+'query&' | |
self.constants = Constants() | |
def cleanName(self, name): | |
"""ignore all special characters, numbers, whitespace, case""" |
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
startlink = 'https://onepiece.fandom.com/api.php?format=json&action=query&' | |
test_name = "Monkey D. Luffy" | |
fetch_json = requests.get(startlink + 'generator=allpages&gapfrom=' + test_name + '&prop=info&inprop=url').json() | |
print(fetch_json) | |
# Gets all pages | |
all_pages = fetch_json['query']['pages'] | |
# Gets first page | |
first_page = next(iter(all_pages.values())) | |
# Gets first url |
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
#pip install requests | |
import requests | |
#import shutil | |
import xml.etree.ElementTree as ET | |
from time import localtime, strftime | |
#pip install python-dateutil | |
import dateutil.parser | |
import datetime | |
#import matplotlib.pyplot as plt | |
import json |
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
<script src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
$.ajaxSetup({ cache: false }); | |
setInterval(async () => { | |
$.ajax({ | |
url: 'callPy.php', |
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
<?php | |
$outie = exec('sudo /usr/bin/python /var/www/html/rainFetch.py'); | |
echo $outie; | |
$command = escapeshellcmd('/var/www/html/rainFetch.py'); | |
$output = shell_exec($command); | |
echo $output; | |
?> |