Skip to content

Instantly share code, notes, and snippets.

Celeo / App.js
Last active Mar 22, 2020
Simple example of using pullstate
View App.js
import React from 'react'
import { useStoreState } from "pullstate"
import { UIStore } from "./store"
function App() {
const name = useStoreState(UIStore, s =>
const onChange = (event) => {
const newVal =
UIStore.update(s => {
Celeo / script.js
Created Aug 29, 2018
Block posts and comments from Tildes users
View script.js
// ==UserScript==
// @name Block Tildes user comments
// @version 0.1
// @description Block Tildes comments
// @author
// @match*
// @grant none
// @require
// ==/UserScript==
Celeo /
Created Apr 27, 2018
Preston: scope(s) for operationId
def print_scopes_for_op_id(preston, op_id):
path = p._get_path_for_op_id(op_id)
print(f'Path for operationId "{op_id}" is "{path}"')
path_spec = p._get_spec()['paths'][path]
for key in path_spec:
if path_spec[key].get('security'):
print(f'"{path} :: {key}" requires scopes: ' + ', '.join(path_spec[key]['security'][0]['evesso']))
op_id = 'get_characters_character_id_stats'
import sqlite3
from preston.xmlapi import Preston
connection = sqlite3.connect('data.db')
cursor = connection.cursor()
cursor.execute('SELECT character_name FROM member')
character_names = [e[0] for e in cursor.fetchall()]
Celeo / ecm_calculations.html
Last active Oct 2, 2016
EVE Online ECM chance calculations
View ecm_calculations.html
<!DOCTYPE html>
<title>ECM Calculations</title>
<script src=""></script>
<link href="" rel="stylesheet">
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
<body class="grey lighten-2">
<div class="container">
Celeo /
Last active Sep 18, 2015 — forked from Synthetica9/
An interpeter for pyg, the golfed python. Fully backwards compatible with python.
# A golfed python 'accent'. Fully backwards compatible with python.
# If you DO use it for a production (non-challenge/codegolf) program, I'm not
# responsible for anything bad that happens to you, your computer,
# your spare time, your code maintainability, any kittens that god might kill,
# or the tears of blood you will weep.
import sys
from math import *
Celeo /
Last active Jan 3, 2016
Uses the character's notification system to determine if there are any new applications to their corporation.
import eveapi
from datetime import datetime
api = eveapi.EVEAPIConnection()
def main():
auth = api.auth(keyID=raw_input('keyID: '), vCode=raw_input('vCode: '))
characterID = raw_input("Your Director/CEO's character name: ")
notifications = auth.char.Notifications(characterID=characterID)
applicants = []
Celeo /
Last active Jan 2, 2016
Use eveapi to determine time all corp POSs run out of fuel
import eveapi
from datetime import datetime
api = eveapi.EVEAPIConnection()
auth = api.auth(keyID=raw_input('Key ID: '), vCode=raw_input('vCode: '))
events = auth.char.UpcomingCalendarEvents()
print ''
for event in events.upcomingEvents:
Celeo /
Created Jan 10, 2014
Use evelink to determine time all corp POSs run out of fuel
import evelink
from datetime import datetime
eve = evelink.eve.EVE()
char_id = eve.character_id_from_name(raw_input('Enter your character name: '))
api = evelink.api.API(api_key=(raw_input('Key ID: '), raw_input('vCode: ')))
char = evelink.char.Char(char_id=char_id, api=api)
events = char.calendar_events()
print ''
Celeo /
Created Dec 5, 2013
Uses Pygal and Psutil to create a graph of CPU usage over 60 seconds.
import psutil
import pygal
from time import sleep
c = pygal.Line()
c.title = 'CPU Usage Over 1 Minute'
data = []
count = 0
print 'Starting ...'
while True: