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
from django.contrib.auth.models import User | |
from django.db import models | |
from django.utils import timezone | |
class Catagory(models.Model): | |
title = models.CharField(max_length=100) | |
def __str__(self): | |
return self.title |
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
class Calculator(): | |
def __init__(self, variable): | |
self.variable = variable | |
def add(self, adition): | |
total = self.variable + adition | |
print(total) | |
print ("Calculator.add() function called") | |
return total |
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
def gviz_json(desc, model_class, columns, orderby, dist, **filt): | |
ret = model_class.objects.all().values(*columns).filter(**filt).order_by(orderby) | |
return ret |
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
class Calculator(): | |
def __init__(self, variable): | |
self.variable = variable | |
def add(self, adition): | |
self.variable = self.variable + adition | |
print(self.variable) | |
print ("Calculator.add() function called") | |
return self |
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
class Calculator(): | |
def __init__(self, variable): | |
self.variable = variable | |
def add(self, adition): | |
total = self.variable + adition | |
print(total) | |
print ("Calculator.add() function called") | |
self.variable = total |
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
var json = '{"1440167924916":{"id":1440167924916,"type":"text","content":"It\'s a test!"}}'; | |
var parsed = JSON.parse(json); |
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
let a; | |
const x = `{ | |
'quotes': | |
[ | |
{ | |
'id':1, | |
'quote':'Life isn’t about getting and having, it’s about giving and being.', | |
'author':'Kevin Kruse' | |
}, | |
{ |
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 requests module | |
import requests | |
# Making a get request | |
response = requests.get('https://medex.com.bd/search?search=Maxpro') | |
# print response | |
print(response) | |
# print json content |
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 gviz_api | |
description = {"name": ("string", "Name"), | |
"salary": ("number", "Salary"), | |
"full_time": ("boolean", "Full Time Employee")} | |
data = [{"name": "Mike", "salary": (10000, "$10,000"), "full_time": True}, | |
{"name": "Jim", "salary": (800, "$800"), "full_time": False}, | |
{"name": "Alice", "salary": (12500, "$12,500"), "full_time": True}, | |
{"name": "Bob", "salary": (7000, "$7,000"), "full_time": True}] |
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
package main | |
import ( | |
"fmt" | |
"strconv" | |
"github.com/afrinjamanbd/firstapp/help" | |
) | |
var ( |
NewerOlder