Skip to content

Instantly share code, notes, and snippets.

View ShivendraAgrawal's full-sized avatar

Shivendra Agrawal ShivendraAgrawal

View GitHub Profile
@ShivendraAgrawal
ShivendraAgrawal / Try.c
Last active December 20, 2015 08:49
Trying out this thing.
#include<stdio.h>
main()
{
printf("Hello");
}
# Ok, so the change was not reflected here. Interesting!!
#This is a 2nd change in the original file.
#3rd change. It's getting confusing here :|
#include "iostream"
using namespace std;
void find_next(int num[], int n);
int main()
{
int n;
printf("enter n\n");
scanf("%d",&n);
printf("enter %d-digit no.\n",n);
int num[n];
<!DOCTYPE html>
<html lang="en">
<head>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
rel="stylesheet">
</head>
<body>
<div class="container">
<div class="header">
<h3 class="text-muted">How To Upload a File</h3>
!DOCTYPE HTML>
<html>
<body>
{% for v in onlyfiles %}
<img src="{{ url_for('static', filename = v) }}" width="1050" height="300">
{% endfor %}
</body>
</html>
import os
from os import listdir
from os.path import isfile, join
# We'll render HTML templates and access data sent by POST
# using the request object from flask. Redirect and url_for
# will be used to redirect the user once the upload is done
# and send_from_directory will help us to send/show on the
# browser the file that the user just uploaded
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
function [n2] = shivendra( image )
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
rgb = imread(image) ;
gray = rgb2gray(rgb) ;
%(gray,'gray.jpg');
%imwrite(gray>180,'undilated.jpg');
%filteredgray = medfilt2(gray,[7 7]);
function [] = automatic_select()
count = 0;
imageFiles = dir('*.jpg');
nFiles = length(imageFiles);
white_counts = zeros(nFiles);
for i = 1 : nFiles
count = count + 1;
currentFileName = imageFiles(i).name;
#!/bin/bash
convert "$1" \
-morphology EdgeIn Octagon \
-negate -normalize -blur 0x2 \
-channel RGB -level 50%,81%,0.1 \ -colorspace Gray \
"$2"
#!/bin/bash
convert "$1" \
-morphology Convolve DoG:15,100,0 \
-negate -normalize -blur 0x1 \
-channel RGB -level 60%,91%,0.1\ -colorspace Gray \
"$2"
@ShivendraAgrawal
ShivendraAgrawal / 0_reuse_code.js
Created February 15, 2016 10:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console