Skip to content

Instantly share code, notes, and snippets.

View MAHRahat's full-sized avatar

Md. Ashraful Haq Rahat MAHRahat

  • Bangladesh Space Research and Remote Sensing Organization
  • Dhaka, Bangladesh
  • 09:06 (UTC +06:00)
  • LinkedIn in/MAHRahat
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@MAHRahat
MAHRahat / PY0101EN-2-1-Tuples.ipynb
Created June 10, 2021 02:31 — forked from anozg/PY0101EN-2-1-Tuples.ipynb
Created on Skills Network Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/* https://www.techbeamers.com/sql-query-questions-answers-for-practice/#sql-queries */
/*Q-1*/
select first_name as worker_name from worker;
/*Q-2*/
Select upper(FIRST_NAME) from Worker;
/*Q-3*/
SELECT distinct department FROM worker;
@MAHRahat
MAHRahat / readme.md
Created May 21, 2021 13:45 — forked from johan/readme.md
(Re)fork any gist, including your own

Want to fork your own gists? No fork button? No problem! Install this user script by clicking refork.user.js' "raw" link down below: ⇓

@MAHRahat
MAHRahat / README.md
Created May 21, 2021 10:41 — forked from rstacruz/README.md
How to install Docker in Mac, Windows, and Linux

Getting Docker

Docker is available for Linux, MacOS, and Windows.

MacOS

Docker for Mac is best installed with Homebrew and Homebrew Cask. For other ways to install on MacOS, see Install Docker for Mac in Docker's docs.

brew cask install docker # Install Docker
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.mixins import UpdateModelMixin, DestroyModelMixin
from .models import Todo
from .serializers import TodoSerializer
class TodoListView(
APIView, # Basic View class provided by the Django Rest Framework
@MAHRahat
MAHRahat / linkedlist.py
Created May 19, 2021 12:29 — forked from jatinsharrma/linkedlist.py
Linked List : simple Linked List
#-------------------------------------------
#------------Simple Linked List-------------
#-------------------------------------------
# Node Class
class Node:
def __init__(self, data):
self.data = data
self.link = None
@MAHRahat
MAHRahat / pyc
Created May 18, 2021 14:00 — forked from jkbrzt/pyc
Delete Python's compiled *.pyc files like a pro
#!/bin/sh
#
# Delete Python's compiled *.pyc and __pycache__ files like a pro
# https://gist.github.com/jakubroztocil/7892597
#
# Usage:
# Delele *.pyc and __pycache__ files recursively in the current directory:
# $ pyc
#
# The same, but under /path:
@MAHRahat
MAHRahat / forms.py
Created May 16, 2021 06:06 — forked from deno101/forms.py
Django-android authentication
from django import forms
from django.contrib.auth.models import User
class SignupForm(forms.ModelForm):
username = forms.CharField(max_length=100)
first_name = forms.CharField(max_length=100)
last_name = forms.CharField(max_length=100)
password = forms.CharField(max_length=100)
email = forms.CharField(max_length=100)
#!/bin/bash -ex
# NOTE: ANDROID_HOME must be configured as an environment variable.
# Kill all the existing adb servers and start over a new adb server.
function restart_adb_server() {
echo "********************* Restarting adb ... *********************"
adb kill-server
sleep 2
adb start-server
sleep 2