Skip to content

Instantly share code, notes, and snippets.

View markroxor's full-sized avatar

Mohit Rathore markroxor

View GitHub Profile

How do I do this thing?

I'm not aware of how to use Google, how do I do this basic thing in Language X?

tagged coding, question

edited by Grammar Nazi (2.5M), asked by 1337z0r (2)

Answer 1 (12)

@markroxor
markroxor / becca_gym.py
Created September 25, 2018 16:23
testing becca gym
import numpy as np
import becca.brain as becca_brain
from becca.base_world import World as BaseWorld
import gym
class World(BaseWorld):
def __init__(self, env_name, seed=None):
BaseWorld.__init__(self)
self.name = 'gym_cartPole'
const axios = require('axios');
// Make a request for a user with a given ID
var server_url = 'http://127.0.0.1:5000'
var url = server_url + '/v1/envs/';
var msg = {'env_id': 'CartPole-v0'};
let axiosConfig = {
headers: {
'Content-Type': 'application/json',
"use strict";
var axios = require("axios");
var Client = (function () {
function Client(remote) {
this.remote = remote;
this.shouldLog = (process.env.SHOULD_LOG === "true");
if (this.shouldLog) {
console.log("Logging enabled");
}
else {
"use strict";
var gymHTTPClient_1 = require("/home/markroxor/Documents/RL/gym-http-api/binding-js/dist/lib/gymHTTPClient");
var RandomDiscreteAgent = (function () {
function RandomDiscreteAgent(n) {
this.n = n;
}
RandomDiscreteAgent.prototype.act = function (observation, reward, done) {
return Math.floor(Math.random() * this.n);
};
return RandomDiscreteAgent;
@markroxor
markroxor / stn_example.ipynb
Created September 1, 2018 14:36
Testing Keras STN.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
>>> list.__doc__
"list() -> new empty list\nlist(iterable) -> new list initialized from iterable's items"
>>> list().__doc__
"list() -> new empty list\nlist(iterable) -> new list initialized from iterable's items"
>>> help(list)
Help on class list in module builtins:

class list(object)
 |  list() -> new empty list
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@markroxor
markroxor / min-char-rnn.py
Created February 23, 2018 08:29 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@markroxor
markroxor / IDW.txt
Created February 3, 2018 14:16
IDW rules
Leader - Akshay
Will take care of recruitment and who fights in CW.
Senior player - Scorpion
Will take care of recruitment and is the person of contact for any issues.
Members -
1. Yogi
2. Majin Buu
3. DJ