Skip to content

Instantly share code, notes, and snippets.

Lukas Joergensen lukaspj

Block or report user

Report or block lukaspj

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
@lukaspj
lukaspj / main.go
Last active Feb 15, 2019
Can't acquire lock error
View main.go
package main
import (
"database/sql"
"fmt"
"github.com/golang-migrate/migrate/v4"
"github.com/golang-migrate/migrate/v4/database/postgres"
"github.com/pkg/errors"
"strings"
"time"
View gist:af1ca1e1f3eb68360d2d10ad7c4ca658
#ifdef TORQUE_OS_WIN
#include "windowManager/win32/win32Window.h"
#include "windowManager/win32/winDispatch.h"
extern void createFontInit(void);
extern void createFontShutdown(void);
#endif
View engineapi.xml
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<EngineExportScope name="" docs="">
<exports>
<EngineClassType name="NavPath" size="1216" isAbstract="0" isInstantiable="1" isDisposable="0" isSingleton="0" docs="" superType="SceneObject">
<properties>
<EnginePropertyGroup name="NavPath_begingroup" indexedSize="0" docs="">
<properties>
<EngineProperty name="from" indexedSize="1" isConstant="0" isTransient="0" isVisible="1" docs="World location this path starts at." />
<EngineProperty name="to" indexedSize="1" isConstant="0" isTransient="0" isVisible="1" docs="World location this path should end at." />
@lukaspj
lukaspj / exampleshader.hlsl
Created Jul 19, 2017
Example terrain shader
View exampleshader.hlsl
//*****************************************************************************
// Torque -- HLSL procedural shader
//*****************************************************************************
// Dependencies:
#include "shaders/common/terrain/terrain.hlsl"
#include "shaders/common/torque.hlsl"
// Features:
// Vert Position
View trace
Traceback (most recent call last):
File "C:/Speciale/RL/SharpShooter-Learner/src/__init__.py", line 21, in <module>
ddqrn = DDQRN(sess, fv_size, fv_size, actions_size, "main_DDQRN")
File "C:\Speciale\RL\SharpShooter-Learner\src\simple_ddqrn.py", line 28, in __init__
lstm_layer_output = self.build_lstm_layer(input_layer_output)
File "C:\Speciale\RL\SharpShooter-Learner\src\simple_ddqrn.py", line 67, in build_lstm_layer
scope=scope
File "C:\Speciale\RL\SharpShooter-Learner\venv\lib\site-packages\tensorflow\python\ops\rnn.py", line 546, in dynamic_rnn
dtype=dtype)
File "C:\Speciale\RL\SharpShooter-Learner\venv\lib\site-packages\tensorflow\python\ops\rnn.py", line 713, in _dynamic_rnn_loop
View simple_ddqrn.py
import tensorflow as tf
import numpy as np
from external.act_cell import ACTCell
class DDQRN:
def __init__(self, sess, fv_size, input_size, output_size, scope):
self.sess = sess
self.output_size = output_size
View AIClass.cs
using System;
using Torque3D;
using Torque3D.Engine.Util.Enums;
using Torque3D.Util;
namespace GameAI {
public class AIClass {
public static PlayerAction sLastAction = PlayerAction.None;
private static Random rand = new Random();
View FeatureVector.cs
using System;
using System.Runtime.InteropServices;
using Torque3D.Engine;
namespace Torque3D
{
public class FeatureVector : SimObject
{
protected override void CreateSimObjectPtr()
{
View SimplePlayerActions.cs
namespace Torque3D.Engine.Util.Enums
{
public enum PlayerAction
{
/// <summary>
/// Take no action, you damned camper.
/// </summary>
None,
/// <summary>
/// Strafe left.
View MetaData.json
This file has been truncated, but you can view the full file.
{
"functions": [
{
"Namespace": "Global",
"Type": "bool",
"Name": "addBadWord",
"Comment": " /*! @brief Add a string to the bad word filterThe bad word filter is a table containing words which will not be displayed in chat windows. Instead, a designated replacement string will be displayed. There are already a number of bad words automatically defined.@param badWord Exact text of the word to restrict.@return True if word was successfully added, false if the word or a subset of it already exists in the table@see filterString()@tsexample// In this game, \"Foobar\" is banned%badWord = \"Foobar\";// Returns true, word was successfully addedaddBadWord(%badWord);// Returns false, word has already been addedaddBadWord(\"Foobar\");@endtsexample@ingroup Game */",
"Parameters": [
{
You can’t perform that action at this time.