This file contains 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
(define (domain n64-zelda-majora) | |
(:requirements :typing :fluents :durative-actions) | |
(:types | |
item cycevt location object | |
) | |
(:constants | |
bow ocarina powder-keg goron-mask eponas-song song-of-time - item |
This file contains 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
#include <future> | |
#include <iostream> | |
#include <vector> | |
// for use of std::accumulate | |
#if _MSC_VER | |
#include <numeric> | |
#else | |
#include <algorithm> | |
#endif |
This file contains 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
# This can be used to get the branch for any case needed. | |
# Eliminate the white spaces in the beginning and the end of the string | |
BRANCH=`git branch | grep "*" | cut -d "*" -f2 | sed 's/^[ \t]*//;s/[ \t]*$//'` |
This file contains 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
using UnityEngine; | |
using System.Collections; | |
public class follow_camera: MonoBehaviour { | |
public GameObject player; //Public variable to store a reference to the player game object | |
private Vector3 offset; //Private variable to store the offset distance between the player and camera |
This file contains 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
using CnControls; //Free Packege CN control | |
using UnityEngine; | |
namespace CustomJoystick | |
{ | |
//Requieres to work | |
[RequireComponent(typeof (Animator))] | |
[RequireComponent(typeof (CapsuleCollider))] | |
[RequireComponent(typeof (Rigidbody))] |
This file contains 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
speed = (transform.position - lastPosition).magnitude; |
This file contains 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
GameObject FindClosestEnemy() | |
{ | |
GameObject[] gos; | |
gos = GameObject.FindGameObjectsWithTag("Enemy"); | |
GameObject closest = null; | |
float distance = Mathf.Infinity; | |
Vector3 position = transform.position; | |
foreach (GameObject go in gos) | |
{ | |
Vector3 diff = go.transform.position - position; |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <time.h> | |
#define LEARNING_RATE 0.1 | |
#define MAX_ITERATION 100 | |
float randomFloat() | |
{ |
This file contains 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 java.util.*; | |
import java.io.*; | |
import java.text.*; | |
import java.math.*; | |
class Perceptron | |
{ | |
static int MAX_ITER = 100; | |
static double LEARNING_RATE = 0.1; | |
static int NUM_INSTANCES = 100; |
This file contains 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 | |
class Perceptron: | |
def __init__(self, n_inputs, learning_rate): | |
""" | |
:param n_inputs: the number of inputs of the perceptron | |
:param learning_rate: the learning rate | |
""" | |
self.n_inputs = n_inputs |
OlderNewer