Skip to content

Instantly share code, notes, and snippets.

View ajoydas's full-sized avatar

Ajoy Das ajoydas

View GitHub Profile
@ajoydas
ajoydas / pubspec.yaml
Created February 4, 2023 12:00
Replace it with pubspec.yaml file in the root directory
name: women_safety_app
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
#!/bin/bash
#SBATCH --job-name=search.job
#SBATCH --output=.out/search.out
#SBATCH --error=.out/search.err
#SBATCH --time=03:00:00
#SBATCH --mem=12GB
##SBATCH --mail-type=ALL
##SBATCH --mail-user=email@ucalgary.ca
export PATH=$PATH:/home/ajoy.das/miniconda3/bin
import numpy as np
import tensorflow as tf
def get_unet_mod(patch_size = (560,560),learning_rate = 1e-3,\
learning_decay = 1e-6, drop_out = 0.1,nchannels = 1,kshape = (3,3)):
''' Get U-Net model with gaussian noise and dropout'''
dropout = drop_out
input_img = tf.keras.layers.Input((patch_size[0], patch_size[1],nchannels))
# use `route -n` to debug route table
# the nameservers may change which can create issue
Gateway=`ip route show 0.0.0.0/0 dev ppp0 | cut -d\ -f3`
echo Found Gateway: $Gateway
sudo route del -net 0.0.0.0 netmask 0.0.0.0 dev ppp0
# Route for cluster access
sudo route add -net 136.159.79.0 gw $Gateway netmask 255.255.255.0 dev ppp0
# Routes for nameservers
sudo route add -net 136.159.1.21 gw $Gateway netmask 255.255.255.255 dev ppp0
sudo route add -net 136.159.34.201 gw $Gateway netmask 255.255.255.255 dev ppp0
pragma solidity ^0.5.7;
pragma experimental ABIEncoderV2;
// import "github.com/ethereum/dapp-bin/library/stringUtils.sol";
contract Foodie {
struct Item {
string name;
uint256 price;
bool disabled;
}
@ajoydas
ajoydas / ResFix.desktop
Created July 6, 2019 14:45
Fix Resolution for VGA Switch
#!/usr/bin/env xdg-open
# save in /home/student/.config/autostart
[Desktop Entry]
Name=ResFix
Comment=Fix my resolution at 1368x768
NoDisplay=False
Exec=/home/student/.config/autostart/ResFix.sh
Terminal=true
Type=Application
Categories=Utility;
//#include <windows.h>
#include <GL/glut.h>
#include <bits/stdc++.h>
#include "bitmap_image.hpp"
#define pi (2*acos(0.0))
using namespace std;
int drawaxes;
struct point{
double x;
import pandas as pd
import numpy as np
eps = np.finfo(float).eps
from sklearn.metrics import accuracy_score
from sklearn import preprocessing
from scipy.stats import multivariate_normal
trainfile = 'data/train.txt'
testfile = 'data/test.txt'
outfile = 'data/out.txt'
import numpy as np
classes = []
with open('data/trainNN.txt') as file:
train_data = []
for i in file:
data = [float(j) for j in i.split()]
train_data.append(data)
if (int(data[-1]) not in classes):
classes.append(data[-1])
import pandas as pd
import numpy as np
eps = np.finfo(float).eps
from sklearn.metrics import accuracy_score
from sklearn import preprocessing
import time
a = 1
mu = 0.05