Skip to content

Instantly share code, notes, and snippets.

@Vimalraj571
Vimalraj571 / index.html
Created May 16, 2022 19:43
Thinking In React: Step 5
<div id="container">
<!-- This element's contents will be replaced with your component. -->
</div>
@Vimalraj571
Vimalraj571 / forward_reverse_loop.java
Created November 5, 2021 06:36
Writing the reverse from i to 0 inside the forward loop from 0 to n. Example in Insertion Sort we are using this kind of loop.....
public class Main {
public static void main(String[] args) {
int[] input = {6,5,3,1,8,7,2,4};
int j;
for (int i = 1; i < input.length; i++) {
// From 1 to n loop with index as i
j = i - 1;
while (j >= 0) {
// From i to 0 with index as j
System.out.println(j);
@Vimalraj571
Vimalraj571 / java_input_reader.java
Created November 3, 2021 18:32
Reading the input for the java
// Reading from the coding platform for following line
// 3 - Test case
// 4 1 2 3 4 [4 - Array Length, 1 2 3 4 - Elements in array]
// 3 1 1 1 [3 - Array Length, 1 1 1 1 - Elements in array]
// 2 1 3 [2 - Array Length, 1 3 - Elements in array]
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import gym
import numpy as np
import random
import math
from time import sleep
## Initialize the "Cart-Pole" environment
env = gym.make('CartPole-v0')
@Vimalraj571
Vimalraj571 / Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Created December 7, 2017 08:14 — forked from IamAdiSri/Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Setting up and using Python3, Pip3, Virtualenv (for Python3) and Virtualenvwrapper (for Python3)
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py
$ cd <download location>
$ sudo -H ./get-pip.py
Use pip to install pip3
$ sudo -H pip install pip3
Installing pip3 also installs Python3
To run Python3
$ python3