Skip to content

Instantly share code, notes, and snippets.

💬
currently typing

Remco d0p3t

💬
currently typing
Block or report user

Report or block d0p3t

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lastdied.lua
local lastDied = os.time()
local maxLastDiedAllowed = 300 -- 5 minutes
AddEventHandler(
"gameEventTriggered",
function(eventName, data)
if eventName ~= "CEventNetworkEntityDamage" then
return
end
local victim = data[1]
View playerConnecting.ts
import UserManager from '../classes/managers/userManager';
import { Ban } from '../models';
const utils = require('../utils');
on('playerConnecting', (playerName: string, setKickReason: any, deferrals: any) => {
const netId = (global as any).source;
@d0p3t
d0p3t / letsencrypt_2018.md
Created Feb 5, 2019 — forked from cecilemuller/letsencrypt_2019.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)
View letsencrypt_2018.md

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

View Display.cs
public static async Task StartSwitch(Vector4 fromWh, Vector4 toWh, int model)
{
try
{
var from = new Vector3(fromWh.X, fromWh.Y, fromWh.Z);
var to = new Vector3(toWh.X, toWh.Y, toWh.Z);
var playerPed = Game.PlayerPed;
var switchModel = new Model(model);
var switchType = GetIdealPlayerSwitchType(from.X, from.Y, from.Z, to.X, to.Y, to.Z);
var switchFlag = 1024;
View Decorator.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CitizenFX.Core;
using CitizenFX.Core.Native;
@d0p3t
d0p3t / game_agent.py
Created Oct 4, 2017
Version 1 DDQN Cloney
View game_agent.py
# =============================
# -----------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()
View Untitled1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View notes for dqn
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???
View oldtv_ocr.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View listfirst.js
var myArray = ['Bobby', 'Jack', 'Danny'];
var favCities = ['Atlanta', 'Miami'];
function listFirst(array) {
return array[0];
}
console.log(listFirst(myArray));
console.log(listFirst(favCities));
You can’t perform that action at this time.