This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.image as mpimg | |
import numpy as np | |
from matplotlib import pyplot as plt | |
import cv2 | |
import os | |
def load_images_from_folder(folder): | |
images = [] | |
c=0 | |
for filename in os.listdir(folder): | |
if c<=100: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
input="/home/pulkit/micrograph.txt" | |
x=0; | |
while IFS= read -r var | |
do | |
i=${var##*,} | |
#echo $i | |
a[x]=${i::-1} | |
x=$((x+1)) | |
done < "$input" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function a(p) | |
{ | |
var name="pulkit"; | |
this.sam=p; | |
console.log(this.name); | |
this.b=function() | |
{ | |
console.log(pul); | |
console.log(name); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
register=new Register(name.getText().toString(),pass.getText().toString(),email.getText().toString()); | |
api.Factory.getInstance().register(register).enqueue(new Callback<String>() { | |
@Override | |
public void onResponse(Call<String> call, retrofit2.Response<String> response) { | |
Toast.makeText(getApplicationContext(), response.body().toString(), Toast.LENGTH_LONG).show(); | |
} | |
@Override | |
public void onFailure(Call<String> call, Throwable t) { | |
Toast.makeText(getApplicationContext(), "asf", Toast.LENGTH_LONG).show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Register { | |
String name, password, email; | |
public Register(String name, String pass, String email) { | |
this.name = name; | |
this.password = pass; | |
this.email = email; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface api { | |
String baseurl = " http://10.42.0.1:8080/"; | |
@POST("polls/register") | |
Call<String> register(@Body Register reg); | |
@POST("polls/login") | |
Call<Token> login(@Body Register reg); | |
@POST("polls/questions") |