- Our main goal is to use django to create a project.
- Since, django is a python framework, we need to install python to run it.
- However, there are 2 major versions of python available - python 2 and python 3.
- We're going to use python 3 since it's the latest version available and is way better than python 2.
- Pip is the package manager for python, we use pip to install python programs so we don't have to download, configure and install it ourselves.
- Managing python versions (2 and 3) is a bit tedious, so we're going to use virtualenv.
- Virtualenv will help us create isolated environment for our django project so we can set which python version we're going to use and not worry about anything at all. There are many other benefits of using it which you'll see later.
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
#include <stdio.h> | |
// 1 2 3 4 5 | |
// 1 3 4 5 -1 | |
void deleteItem (int list[], int z, int index) { | |
int i = index; | |
while (i < z) { | |
if ((i + 1) < z) // if there's an item on the left | |
list[i] = list[i + 1]; | |
else |
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
#include <stdio.h> | |
#define W 3 | |
#define H 2 | |
void inputMatrix (int matrix[H][W]) { | |
int i, j; | |
for (i = 0; i < H; i++) { | |
for (j = 0; j < W; j++) { | |
scanf("%d", &matrix[i][j]); | |
} |
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
// Copyright BDH Lab 2018 | |
#include <iostream> | |
#include <string> | |
using std::cout; | |
using std::string; | |
// IO class | |
class IO { | |
string output; |
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
2018-12-26T17:30:20.557758+00:00 app[web.1]: [2018-12-26 17:30:20 +0000] [10] [INFO] Worker exiting (pid: 10) | |
2018-12-26T17:30:20.860732+00:00 app[web.1]: [2018-12-26 17:30:20 +0000] [4] [INFO] Shutting down: Master | |
2018-12-26T17:30:20.861125+00:00 app[web.1]: [2018-12-26 17:30:20 +0000] [4] [INFO] Reason: Worker failed to boot. | |
2018-12-26T17:30:21.089174+00:00 heroku[web.1]: State changed from up to crashed | |
2018-12-26T17:30:21.069711+00:00 heroku[web.1]: Process exited with status 3 | |
2018-12-26T17:30:21.000000+00:00 app[api]: Build succeeded | |
2018-12-26T17:30:35.331409+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cirrhus.herokuapp.com request_id=962f35a8-2378-419b-bbb4-cd8f6b6219e5 fwd="103.195.204.5" dyno= connect= service= status=503 bytes= protocol=https | |
2018-12-26T17:30:36.799912+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/apple-touch-icon-precomposed.png" host=cirrhus.herokuapp.com request_id=e4fde1f8-856a-41c3-96a2-c12bd405681c fwd=" |
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
[18:27] <trumanshow19> Would someone mind help iron out the | |
inconsistencies in my head with respect to purity in | |
Haskell. Statement 1: Haskell is a purely functional lanugage, S2: | |
Haskell is not impure, but... S3: f :: a -> a is a "pure" function as | |
opposed to a -> IO a. | |
[18:27] <trumanshow19> If a -> is pure, to distinguish a -> IO a, then | |
how do I describe the latter, is there is no impurity in Haskell ? | |
[18:28] <trumanshow19> The only opposite of pure I know is impure. |
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 cv2 | |
import imutils | |
import numpy as np | |
import pytesseract | |
from PIL import Image | |
def wait(): | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
TIV failed to work for me when I tried to use it to view a JPEG image. Giving me this error when I tried to view a JPEG image:
[CImg] *** CImgIOException *** [instance(0,0,0,0,(nil),non-shared)] CImg<unsigned char>::load(): Failed to recognize format of file 'raw_images/9.jpg'.
Here are the details of that file:
raw_images/9.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_imx219, xresolution=156, yresolution=164, resolutionunit=2, datetime=2019:08:03 11:11:14, width=0], baseline, precision 8, 1280x720, components 3
OlderNewer