This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
from PIL import ImageGrab | |
fourcc = cv2.cv.CV_FOURCC(*'XVID') # or cv2.VideoWriter_fourcc('X','V','I','D') if you use opencv 3.0 | |
vid = cv2.VideoWriter('record.avi', fourcc, 8, (500,490)) | |
while(True): | |
img = ImageGrab.grab(bbox=(100, 10, 600, 500)) #x, y, w, h | |
img_np = np.array(img) | |
#frame = cv2.cvtColor(img_np, cv2.COLOR_BGR2GRAY) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var anchors = {} | |
anchors["minimap"] = []; | |
anchors["center"] = []; | |
anchors["botright"] = []; | |
function ProgressBar(data) | |
{ | |
this.data = data; | |
this.value = data.value; | |
this.disp_value = data.value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RegisterServerEvent('vRP:payment') | |
RegisterServerEvent('vRP:salary') | |
AddEventHandler('vRP:payment',function(player, amount) | |
local user_id = vRP.getUserId(player) | |
if user_id ~= nil then | |
vRP.giveMoney(user_id, amount) | |
end | |
end) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tmi = require('tmi.js') | |
var options = { | |
options: { | |
debug: true | |
}, | |
connection: { | |
reconnect: true | |
}, | |
identity: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tmi = require('tmi.js'); | |
var config = require('./config.js'); | |
var client = new tmi.client(config.tmi); | |
client.connect(); | |
client.on("subscription", function (channel, username, method, message, userstate) { | |
if (method.prime === true) { | |
console.log("Prime Sub"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myArray = ['Bobby', 'Jack', 'Danny']; | |
var favCities = ['Atlanta', 'Miami']; | |
function listFirst(array) { | |
return array[0]; | |
} | |
console.log(listFirst(myArray)); | |
console.log(listFirst(favCities)); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DQN Setup Steps Cloney | |
1. init dqn in setup_play() | |
2. ?????? enter_train_mode() (WHAT IS DIFFERENCE BETWEEN RUN OBSERVER TRAIN) | |
3. next_step()????????? | |
4. build_frame_stack() and then / or update_frame_stack()?? | |
5. pick_action(RANDOM or PREDICTED at % 20) how to format action mapping | |
6. now observe = next_step()????? | |
7. append_to_replay_memory() how to use reward parameter???? | |
8. calculate_target_error() how to use observation parameter from previous step??? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================= | |
# -----------DQN TODO --------- | |
# ============================= | |
def setup_play_ddqn(self): | |
self.plugin_path = offshoot.config["file_paths"]["plugins"] | |
context_classifier_path = f"{self.plugin_path}/SerpentCloneyGameAgentPlugin/files/ml_models/cloney_context_classifier.model" | |
context_classifier = CNNInceptionV3ContextClassifier(input_shape=(288, 512, 3)) | |
context_classifier.prepare_generators() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer