Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Omochin
Omochin / update_monthly_ranking.sh
Created November 13, 2018 14:11
The script to aggregate ranking(https://evekatsu.github.io/ranking) and generate monthly an article(https://evekatsu.github.io/news).
if [ $# -lt 2 ] ; then
echo Need year and month as arguments
exit
fi
YEAR=$1
MONTH=$2
commit_and_push() {
git add .
{"11000020": "D-R00020", "11000001": "A-R00001", "11000018": "D-R00018", "11000025": "E-R00025", "11000016": "D-R00016", "11000017": "D-R00017", "11000024": "E-R00024", "11000019": "D-R00019", "11000021": "D-R00021", "11000009": "C-R00009", "11000005": "B-R00005", "11000004": "B-R00004", "11000031": "G-R00031", "11000015": "C-R00015", "11000012": "C-R00012", "11000013": "C-R00013", "11000014": "C-R00014", "11000032": "H-R00032", "11000002": "A-R00002", "11000023": "D-R00023", "11000028": "E-R00028", "11000026": "E-R00026", "11000027": "E-R00027", "11000029": "E-R00029", "11000022": "D-R00022", "11000003": "A-R00003", "11000008": "B-R00008", "11000006": "B-R00006", "11000007": "B-R00007", "11000011": "C-R00011", "11000030": "F-R00030", "11000033": "K-R00033", "11000010": "C-R00010", "12000001": "12000001", "12000002": "12000002", "12000005": "12000005", "12000004": "12000004", "12000003": "12000003", "10000041": "Syndicate", "10000004": "UUA-F4", "10000063": "PeriodBasis", "10000058": "Fountain", "10000035": "
{"178": "Carbonized Lead S", "179": "Nuclear S", "180": "Proton S", "181": "Depleted Uranium S", "182": "Titanium Sabot S", "183": "Fusion S", "184": "Phased Plasma S", "185": "EMP S", "186": "Carbonized Lead M", "187": "Nuclear M", "188": "Proton M", "189": "Depleted Uranium M", "190": "Titanium Sabot M", "191": "Fusion M", "192": "Phased Plasma M", "193": "EMP M", "194": "Carbonized Lead L", "195": "Nuclear L", "196": "Proton L", "197": "Depleted Uranium L", "198": "Titanium Sabot L", "199": "Fusion L", "200": "Phased Plasma L", "201": "EMP L", "202": "Mjolnir Cruise Missile", "203": "Scourge Cruise Missile", "204": "Inferno Cruise Missile", "205": "Nova Cruise Missile", "206": "Nova Heavy Missile", "207": "Mjolnir Heavy Missile", "208": "Inferno Heavy Missile", "209": "Scourge Heavy Missile", "210": "Scourge Light Missile", "211": "Inferno Light Missile", "212": "Mjolnir Light Missile", "213": "Nova Light Missile", "215": "Iron Charge S", "216": "Tungsten Charge S", "217": "Iridium Charge S", "218": "Lead
{"31001643": ["J104404", -1.0, "11000020"], "31001638": ["J100142", -1.0, "11000020"], "31001639": ["J101129", -1.0, "11000020"], "31001640": ["J141220", -1.0, "11000020"], "31001642": ["J121558", -1.0, "11000020"], "31001641": ["J112450", -1.0, "11000020"], "31001647": ["J211817", -1.0, "11000020"], "31001648": ["J144329", -1.0, "11000020"], "31001646": ["J113227", -1.0, "11000020"], "31001645": ["J104624", -1.0, "11000020"], "31001644": ["J152633", -1.0, "11000020"], "31001649": ["J154102", -1.0, "11000020"], "31001635": ["J143922", -1.0, "11000020"], "31001632": ["J212028", -1.0, "11000020"], "31001636": ["J225234", -1.0, "11000020"], "31001633": ["J164835", -1.0, "11000020"], "31001631": ["J223312", -1.0, "11000020"], "31001634": ["J115528", -1.0, "11000020"], "31001637": ["J165645", -1.0, "11000020"], "31001611": ["J131252", -1.0, "11000020"], "31001610": ["J112150", -1.0, "11000020"], "31001609": ["J115304", -1.0, "11000020"], "31001608": ["J133957", -1.0, "11000020"], "31001607": ["J204506", -1.0, "110
@Omochin
Omochin / png2jpg.py
Last active May 26, 2018 15:39
Need 'pip install pillow'
import os
from PIL import Image
def main():
input_path = './a'
output_path = './b'
quality = 30
if not os.path.isdir(output_path):
os.mkdir(output_path)
@Omochin
Omochin / added_catching_elephant.html
Last active May 20, 2018 17:34
Add size change option of Catching Elephant Theme(https://www.tumblr.com/theme/7285)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- __ __ __
.---.-.-----.--| |.--.--.| |_| |.----. .----.-----.--------.
| _ | | _ || | || _| || _|_| __| _ | |
|___._|__|__|_____||___ ||____|__||__||__|____|_____|__|__|__|
|_____| -->
<html xmlns="http://www.w3.org/1999/xhtml">
@Omochin
Omochin / eveonline_post_notifications2discord.py
Created February 26, 2018 17:39
python 3.x. Get notifications of EVE Online and post it to Discord. notification_types.json > https://gist.github.com/Omochin/b8dff8b60dff63e753240ca8dd3b03e7#file-notification_types-json
# pylint: disable=C0103,C0301
import os
import json
import datetime
import requests
from preston.xmlapi import Preston
import sqlalchemy.ext.declarative
from sqlalchemy import Column, Integer, String, DateTime
EVEONLINE_API_KEY = os.environ['EVEONLINE_API_KEY']
@Omochin
Omochin / eveonline_generate_notification_types.py
Created February 26, 2018 04:55
Python 3.x. pip install beautifulsoup4. Generate CSV and JSON of EVE Online notification types.
import csv
import json
import urllib.request
from collections import OrderedDict
import bs4
def main():
url = 'https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_notifications.html'
soup = bs4.BeautifulSoup(urllib.request.urlopen(url).read(), 'html.parser')
notification_dict = OrderedDict()
import sys
import json
from collections import OrderedDict
from preston.xmlapi import Preston
APIS = {
3333333: "codecodecodecodecodecodecodecodecodecodecodecodecodecodecodecode"
}
@Omochin
Omochin / eveonline_settings_batch.ps1
Created November 19, 2017 15:31
Input the profile name and update all the setting files in the profile's folder.
if ($args.Length -eq 0)
{
Write-Host "Please input profile name."
pause
exit
}
if (!(Test-Path ./core_user.dat -PathType Leaf))
{
Write-Host "./core_user.dat does not exist"