Skip to content

Instantly share code, notes, and snippets.


Mohit Rathore markroxor

View GitHub Profile


Quis custodiet ipsos custodes?

Why should I care? I am clean.

Imagine what would happen if any of the following scenarios are breached.

  • Are you aware that a regular person possess at least three devices with him which can be used for
    conducting survellience on him?

  • Are you okay with being watched and listened to all the time by an unknown person? It is proven that psychologically

markroxor /
Created Apr 13, 2019
Calculates net usage by Excitel broadband services.
from bs4 import BeautifulSoup
with open('Excitel.htm', 'r') as f:
html =
parsed_html = BeautifulSoup(html, "lxml")
total_usage = 0
for i, a in enumerate(parsed_html.findAll('table')[0].findAll('td')):
if i % 6 == 4:

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)

import sys
import matplotlib.pyplot as plt
import numpy as np
from scipy.spatial import ConvexHull
eps = np.random.rand(1)/100
def on_segment(p, q, r):
return ((q[0] <= max(p[0], r[0])) and (q[0] >= min(p[0], r[0]))
markroxor /
Created Sep 25, 2018
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) = 'gym_cartPole'
View promise_broken.js
const axios = require('axios');
// Make a request for a user with a given ID
var server_url = ''
var url = server_url + '/v1/envs/';
var msg = {'env_id': 'CartPole-v0'};
let axiosConfig = {
headers: {
'Content-Type': 'application/json',
View gymHTTPClient.js
"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 {
View rl_example.js
"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;
View stn_example.ipynb
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
You can’t perform that action at this time.