Skip to content

Instantly share code, notes, and snippets.

View hiroto-takatoshi's full-sized avatar
🇯🇵

Hiroto.Takatoshi hiroto-takatoshi

🇯🇵
View GitHub Profile
@hiroto-takatoshi
hiroto-takatoshi / getgamemem.py
Created March 5, 2018 19:53
get game memory
import psutil
def findgame():
for _ in psutil.pids():
try:
name = psutil.Process(_).name()
except psutil.NoSuchProcess:
continue
if name == "TslGame.exe":
% encoded in UTF-8
\documentclass[a4paper]{article}
\usepackage{CJKutf8}
\usepackage{amsmath}
\usepackage{lmodern}
\usepackage{algorithm}
\usepackage{algorithmic}
% \Ja{text}: Outputs Japanese text.
\newcommand*{\Ja}[1]{%
\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}
@hiroto-takatoshi
hiroto-takatoshi / interference.cpp
Last active December 26, 2017 21:08
Nasty code to create an interference graph for register assignment. This code produces in[], out[], interference matrix. C++ language. Edit the data by yourselves, folks, if anyone is doing compiler assignments.
#include <iostream>
#include <memory.h>
//using namepsace std;
enum Var { m, v, r, s, x }; // Change your variables here
char str[10] = "mvrsx"; // And here.
int in[20], out[20], def[20], use[20];
@hiroto-takatoshi
hiroto-takatoshi / BurstyWordTopology.java
Last active December 18, 2017 00:08
main topology(not exactly)
package bigdatateam.burstyword;
import java.util.HashMap;
import java.util.Map;
import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.StormSubmitter;
import org.apache.storm.task.ShellBolt;
import org.apache.storm.spout.ShellSpout;
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hiroto-takatoshi
hiroto-takatoshi / stable.ipynb
Last active October 3, 2017 18:24
stable version, tells you coordinates, direction
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hiroto-takatoshi
hiroto-takatoshi / Untitled.ipynb
Last active October 3, 2017 01:44
current pos and dir detection
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hiroto-takatoshi
hiroto-takatoshi / mul.py
Last active September 24, 2017 11:49
para ver. pic subtraction
import multiprocessing
from multiprocessing import Pool
import cv2
import numpy as np
import ctypes
shared_array_base = multiprocessing.Array(ctypes.c_uint8, 1080*1920*3)
shared_array = np.ctypeslib.as_array(shared_array_base.get_obj())
shared_array = shared_array.reshape(1080, 1920, 3)
@hiroto-takatoshi
hiroto-takatoshi / Untitled.ipynb
Last active September 24, 2017 06:09
semi circles
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.