Skip to content

Instantly share code, notes, and snippets.

View Arnesh07's full-sized avatar

Arnesh Agrawal Arnesh07

  • IIT Roorkee
  • Roorkee, Uttarakhand
View GitHub Profile
@Arnesh07
Arnesh07 / attention.py
Created March 22, 2020 11:47
Attention Layer for Bi-directional LSTM/GRU Networks
class AttLayer(Layer):
def __init__(self, **kwargs):
self.init = initializations.get('normal')
#self.input_spec = [InputSpec(ndim=3)]
super(AttLayer, self).__init__(**kwargs)
def build(self, input_shape):
assert len(input_shape)==3
#self.W = self.init((input_shape[-1],1))
self.W = self.init((input_shape[-1],))
@Arnesh07
Arnesh07 / user-email-preferences.service.spec.ts
Last active January 15, 2020 10:36
Test for User Email Preferences service
// Copyright 2020 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
@Arnesh07
Arnesh07 / collection-creation-backend.service.ts
Created December 25, 2019 10:47
Backend service for creating collection
// Copyright 2019 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
@Arnesh07
Arnesh07 / test.go
Created November 16, 2019 12:12
An example of a test model in beego framework
package models
import (
)
type Test struct {
Response string
}
@Arnesh07
Arnesh07 / test.go
Last active November 16, 2019 12:18
An example of a controller in beego
package controllers
import (
"test_api/models"
"github.com/astaxie/beego"
)
type TestController struct {
beego.Controller
@Arnesh07
Arnesh07 / router.go
Last active November 15, 2019 21:48
An example of a router endpoint
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/object",
beego.NSInclude(
&controllers.ObjectController{},
),
),
beego.NSNamespace("/user",
beego.NSInclude(
&controllers.UserController{},
@Arnesh07
Arnesh07 / medals.json
Last active October 1, 2019 21:46
Medals Data Convocation 2019
{
"directorMedals": [
{
"name": "Pulkit Singal",
"enroll_no": " 15119040",
"branch": "Mechanical Engineering",
"medalName": "President Gold Medal"
},
{
"name": "Sumit Kumar Yadav",
@Arnesh07
Arnesh07 / Assignment2_18114012.asm
Created September 8, 2019 17:32
Risc Assembly Program Submission(Assignment-2)
mov r2 1 // number considering as ramanujan number
.loop1: //Initiates loop1
mov r1 0 // counter for ramanujan number
mov R1 1
mov R2 1
@Arnesh07
Arnesh07 / hotel.json
Created September 7, 2019 17:31
Hotels For Convocation
{
"Hotels-Roorkee": [
{
"hotel_name": "Ambrosia Sarovar Portico",
"address": "Patanjali Yogpeeth, 12th Milestone, NH-58, Badehri-Rajputna, Haridwar Rd. Phone Number- +919720107173, +919536900146",
"distance": "11"
},
{
"hotel_name": "Hometel Roorkee",
"address": "Delhi-Dehradun Road (NH-73), Next to Roorkee College of Pharmacy, Karondi. Phone Number- +91 9927398010, +91 9927398010",
@Arnesh07
Arnesh07 / phd.json
Last active September 24, 2019 17:03
PHD Students JSON File
{
"AH": [
{
"enroll_no": "12909022",
"name": "ALI ABBAS"
},
{
"enroll_no": "14901001",
"name": "CHANDRA PRAKASH"
},