This file contains hidden or 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 ProductForm(forms.ModelForm): | |
product_id = forms.IntegerField( | |
widget=forms.TextInput(attrs={'class': 'form-control'}), | |
required=True | |
) | |
product_name = forms.CharField( | |
widget=forms.TextInput(attrs={'class': 'form-control'}), | |
max_length=100, | |
required=True) | |
product_image = forms.FileField( |
This file contains hidden or 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 add_product(request): | |
user = request.user | |
product_list = ProductList() | |
if request.method == 'POST': | |
print ('yoo') | |
form = ProductForm(request.POST, request.FILES) | |
print ('yoo') | |
print (form) | |
if form.is_valid(): | |
print ('yoo') |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>FunderPrenuer</title> | |
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> --> | |
<!-- <link rel="stylesheet" type="text/css" href="font-awesome.min.css"> --> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/solid.css" integrity="sha384-v2Tw72dyUXeU3y4aM2Y0tBJQkGfplr39mxZqlTBDUZAb9BGoC40+rdFCG0m10lXk" crossorigin="anonymous"> |
This file contains hidden or 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
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
#ServerName www.example.com |
This file contains hidden or 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
%------------------------------------------------------------ | |
% Edited by Sajid Samsad | |
% 1405118, Dept of CSE, BUET | |
%------------------------------------------------------------ | |
\documentclass{beamer} | |
\usepackage[utf8]{inputenc} | |
\usepackage{utopia} %font utopia imported | |
\usepackage{physics} |
This file contains hidden or 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
pragma solidity ^0.4.17; | |
contract Inbox { | |
string public message; | |
function Inbox(string initialMessage) public { | |
message = initialMessage; | |
} | |
This file contains hidden or 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
## laravel_project.conf | |
NameVirtualHost *:8080 | |
Listen 8080 | |
<VirtualHost *:8080> | |
ServerAdmin [email protected] | |
ServerName laravel.dev | |
ServerAlias www.laravel.dev | |
DocumentRoot /home/user/projects/laravel_project/public | |
This file contains hidden or 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 heapq | |
from collections import deque | |
import math | |
import numpy as np | |
import pandas as pd | |
import Queue as Q | |
import networkx as nx | |
def heuristic(a, b): |
This file contains hidden or 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
// denotes the Solidity compiler version | |
pragma solidity ^0.4.17; | |
contract Lottery { | |
// "address" is a datatype | |
// see the slides for details | |
address public manager; | |
address[] public players; | |
// "msg" is global object. You can use it from any function you create inside a contract. |
This file contains hidden or 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
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools | |
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null | |
!apt-get update -qq 2>&1 > /dev/null | |
!apt-get -y install -qq google-drive-ocamlfuse fuse | |
from google.colab import auth | |
auth.authenticate_user() | |
from oauth2client.client import GoogleCredentials | |
creds = GoogleCredentials.get_application_default() |