Skip to content

Instantly share code, notes, and snippets.

View upman's full-sized avatar

Ravi Kumar L upman

View GitHub Profile
@upman
upman / MPI_RING
Last active December 24, 2015 03:49
C program written using MPI which passes an integer through processes in a cyclic (ring like) pattern.
#include <stdio.h>
#include <mpi.h>
int main(int argc,char *argv[])
{
int myid, numprocs;
int tag,source,destination,count;
int buffer;
MPI_Status status;
@upman
upman / colorfultime.js
Last active August 29, 2015 14:02
Colorful time
var foo = setInterval(function(){updateTime()},1000);
function updateTime() {
var d = new Date();
var time = d.toTimeString().split(" ")[0];
var colorhex = time.replace(/:/g,"");
var container = document.getElementById("container");
var time_text = document.getElementById("time_text")
time_text.innerHTML = "#" + time;
@upman
upman / index.html
Last active August 29, 2015 14:16
Illusion
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="header">
<div class="logo">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIYAAAA5CAYAAADz5VMxAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wMDDB4LMCDOVwAAAkJJREFUeNrtnNtuwyAMhueq11Wlvv8bturhBdhNIyHWg8lsAub7pWjaSjIaf9jGkEhK6QehUjtuAWoGhoiIRbvlc+31UKdgLAZMivgkIlK2ewdAIt41l1jf89zgr0B5BYQGGjQ4GBiXULI6nFxuj/Tpd+1naECPoTHq6XiQmnZoklmJFWBokFBinVvgMQKAQcIJGAgwEGAgBBgIMBBgIMBATtqvOWmrErZVid2jj5Z90+h0PIhlRbi8H+E8hohIjdHL8v1Im4I8K8KhwLjcHqmm8rqU7/OdYuXekZ6/KzmG0whaICh/lpD0CIj3+lHIUGIx4nIoZlz/GQYMjeusCSXaEZeHGsAYNEycjgepMeK3tguMM3qMfaQv8/QYajDeGTz3TrNuEgoFRoQNPR71jjWQU/lEgNFDfQAwCEeAgUg+w+tZ0Kr2GtFCEB7jLxTdlsEBYyPldY3ZH4OYdq2kl+sCRsNR7xHvax7SjjBlDhlKtFPOxQD/NYT1FLeHKfO0s5ISCu12wFmW4Uk+DfKOiNXSXUQv4J3DlC+HiVgtDbe1zxuOFqGE5NM5b/DyGNGhmDr53ML9Wxr9cnskHh9okECOBiO7xJ1Hb8upp7XH6AoMbYd6rwa2DiXWrr87j6HtUG31scecYPScphkYHvF4ph1TW3jRtf+zCg
#include<stdio.h>
int main()
{
float lower_bound = 0.0, upper_bound, n, root;
printf("Enter n: ");
scanf("%f",&n);
upper_bound = n;
@upman
upman / launch.js
Created May 24, 2017 09:20 — forked from paambaati/launch.js
Debug mocha tests using Visual Studio Code
{
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.
// ONLY "node" and "mono" are supported, change "type" to switch.
"configurations": [
{
// Name of configuration; appears in the launch configuration drop down menu.
"name": "Run app.js",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
@upman
upman / bundle.js
Last active November 29, 2017 10:33
Check scheme
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.FallbackCustomScheme = factory());
}(this, (function () { 'use strict';
var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
@upman
upman / index.html
Last active December 9, 2017 13:11
Annotation instructions
<link href="https://s3.amazonaws.com/mturk-public/bs30/css/bootstrap.min.css" rel="stylesheet" /><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<section class="container" id="Other" style="margin-bottom:15px; padding: 10px 10px; font-family: Verdana, Geneva, sans-serif; color:#333333; font-size:0.9em;">
<div class="row col-xs-12 col-md-12"><!-- Instructions -->
<div class="panel panel-primary">
<div class="panel-heading"><strong>Instructions</strong></div>
<div class="panel-body">The sentences below is from text chats having English and Hindi words. They need to be transformed to dictionary English/Hindi words. For each word:
<ul>