Skip to content

Instantly share code, notes, and snippets.

View underyx's full-sized avatar
🦊
Yay!

Bence Nagy underyx

🦊
Yay!
View GitHub Profile

Keybase proof

I hereby claim:

  • I am underyx on github.
  • I am underyx (https://keybase.io/underyx) on keybase.
  • I have a public key whose fingerprint is B07D 23CA 602F 5C5A D147 C2DD E45A 2B0E B35D 2590

To claim this, I am signing this object:

# Translations template for PROJECT.
# Copyright (C) 2014 ORGANIZATION
# This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
# This Python file uses the following encoding: utf8
import sys
import re
def oooParser(filename):
text = [re.sub("[/\t].+","",line) for line in open(filename).read().splitlines()]
return text
def androidWriter(filename,outtext):
outfile = open(filename, 'w')
import sys, re
open(sys.argv[2], 'w').write("|".join([re.sub("[/\t].+","",line) for line in open(sys.argv[1]).read().splitlines()]))
@underyx
underyx / CFGchooser
Last active December 20, 2015 14:29
#include <sourcemod>
public Plugin:myinfo =
{
name = "---",
author = "---",
description = "---",
version = "---",
url = "---"
};
#!/usr/bin/env python3
print('testy')
@underyx
underyx / wk2bm.py
Last active July 16, 2018 07:14
Syncs my wanikani review queue length to Beeminder
#!/usr/bin/env python3
import requests
from os import environ
r = requests.get(
'https://api.wanikani.com/v2/summary',
headers={'Authorization': f'Bearer {environ["WANIKANI_TOKEN"]}'},
)
r.raise_for_status()
@underyx
underyx / rohlikovac.sh
Last active July 16, 2018 07:51
Get credits from rohlik
#!/usr/bin/env bash
curl 'https://www.rohlik.cz/stranka/rohlikovac?do=creditForge-roll' \
-H 'pragma: no-cache' \
-H "cookie: $ROHLIK_COOKIES" \
-H 'accept-encoding: gzip, deflate, br' \
-H 'accept-language: en-US,en;q=0.9,hu-HU;q=0.8,hu;q=0.7,ja-JP;q=0.6,ja;q=0.5,cs-CZ;q=0.4,cs;q=0.3' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' \
-H 'accept: */*' \
-H 'cache-control: no-cache' \
-H 'authority: www.rohlik.cz' \
#!/usr/bin/env python3
import os
from requests_html import HTMLSession
session = HTMLSession()
webhook_url = os.environ["SLACK_WEBHOOK_URL"]
r = session.get("https://www.czc.cz/sony%20wh-1000xm2/hledat")
r.raise_for_status()
Name (time in ms) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_semgrep_rules_rule[python/deadcode/useless-eqeq.yaml] 174.1133 (2.71) 179.9553 (2.37) 176.6967 (2.55) 2.1576 (3.81) 176.4344 (2.57) 3.0305 (3.06) 2;0 5.6594 (0.39) 6 1
test_semgrep_rules_rule[python/airflow/formatted-string-bashoperator.yaml] 176.1940 (2.74) 186.62