Skip to content

Instantly share code, notes, and snippets.

View jiteshjha's full-sized avatar

Jitesh Kumar Jha jiteshjha

View GitHub Profile
import sklearn.cluster
import numpy as np
from math import sqrt, pow
import gc
import matplotlib.pyplot as plt
from itertools import cycle
fileStart = "training_set/mv_"
// mpirun -np 3 python a.py
from mpi4py import MPI
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
if rank == 0:
data = {'a': 7, 'b': 3.14}
comm.send(data, dest=1, tag=11)
// This program implements a vector addition using OpenCL
//gcc -o a -I/opt/intel/intel-opencl-1.2-6.3.0.1904/include a.c -lOpenCL -DCL_USE_DEPRECATED_OPENCL_2_0_APIS=1
// System includes
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
// OpenCL includes
#include <CL/cl.h>
import sys
import requests
from bs4 import BeautifulSoup as bs4
import unirest
reload(sys)
sys.setdefaultencoding('utf-8')
"""
Example usage:
@jiteshjha
jiteshjha / interview-questions.md
Created July 23, 2016 23:24 — forked from jvns/interview-questions.md
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

test "should choose i18n for home/comments" do
comment = DrupalComment.new
get 'comments', params: { @comments => comment }
assert_template partial: "home/_comments"
assert_select 'tr'
assert true
end
test "should choose i18n for layout/alerts" do
UserSession.create(User.find 2)
current_user = User.find 2
puts current_user
get "/home"
session[:openid_return_to] = request.env['ORIGINAL_FULLPATH']\
assert_select "a[href=/openid/resume]"
assert true
end
default: &default
adapter: mysql2
encoding: utf8
username: <%= ENV['C9_USER'] %>
password: ""
host: <%= ENV['IP'] %>
development:
<<: *default
database: publiclab

Name: Jitesh Kumar Jha

Affiliation (school/degree) Manipal Institute of Technology, Manipal - 4th semester, Computer Science & Engineering

Location (where you are): Manipal, India

Email: jiteshjha96@gmail.com

Phone: Will email

import java.util.Scanner;
class q2 {
static String CommasToNumericString(String digits)
{
String result = "";
int len = digits.length();
int n = 0;
for (int i = len - 1; i >= 0; i--)