Skip to content

Instantly share code, notes, and snippets.

View rabmarjan's full-sized avatar

Abdur Rab Marjan rabmarjan

  • Golden Harvest InfoTech Ltd.
  • Bangladesh
View GitHub Profile
var foo = true;
if (foo) {
let bar = foo * 2;
const baz = "Hello baz!"
console.log( bar );
}
console.log( bar ); // ReferenceError
console.log( baz ); // ReferenceError
function foo() {
var a = 2;
function bar() {
console.log( a );
}
return bar;
}
var baz = foo();
baz(); // This is a closure
var name = 'Marjan';
function foo(){
var a = "Hello";
bar();
var x = a + name;
}
function bar(){
var b = "Hi";
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
income = [[2000], [2500], [2700], [3900], [4100], [4550]]
expenditure = [1950, 2400, 2500, 3800, 3950, 4410]
X = np.array(income)
Y = np.array(expenditure)
@rabmarjan
rabmarjan / views.py
Created September 23, 2017 18:51
Type Annoteted Django views
"""
views for organising business logic
"""
from typing import Dict, Any
from django.http import Http404
from rest_framework import status
from rest_framework.views import APIView
from rest_framework.response import Response
from contact.models import Contact
from contact.serializers import ContactSerializer
@rabmarjan
rabmarjan / server.R
Created January 9, 2016 16:02 — forked from withr/server.R
Encrypt password with md5 for Shiny-app.
library(shiny)
library(datasets)
Logged = FALSE;
PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad")
# Define server logic required to summarize and view the selected dataset
shinyServer(function(input, output) {
source("www/Login.R", local = TRUE)
observe({
if (USER$Logged == TRUE) {
@rabmarjan
rabmarjan / designer.html
Last active August 29, 2015 14:17
designer
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../yt-video/yt-search-video.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
@rabmarjan
rabmarjan / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<link rel="import" href="../topeka-elements/topeka-datasource.html">
<link rel="import" href="../topeka-elements/topeka-quiz-view.html">
<link rel="import" href="../topeka-elements/topeka-quizzes.html">
<link rel="import" href="../topeka-elements/topeka-categories.html">
<link rel="import" href="../topeka-elements/topeka-profile.html">
<polymer-element name="my-element">
@rabmarjan
rabmarjan / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
@rabmarjan
rabmarjan / designer.html
Last active August 29, 2015 14:12
designer
<link rel="import" href="../core-pages/core-pages.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<polymer-element name="my-element">
<template>
<style>