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
''' | |
------------------------------------------------------------------------------ | |
File name : insta_downloader.py | |
Description : Dowload all conetents from instagram | |
Python Version : 3.6.2 | |
Copyright : Open Source (MIT) | |
------------------------------------------------------------------------------ | |
Version Date Author Remarks | |
1.1 15-July-2020 Athul Mathew Created | |
------------------------------------------------------------------------------ |
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 multiprocessing.process import Process | |
import time | |
import redis | |
def pub(myredis): | |
for n in range(10): | |
myredis.publish('channel','blah %d' % n) | |
time.sleep(5) | |
def sub(myredis, name): |
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
Building Caffe | |
Before Caffe can be build, Protobuf 3 needs to be build. | |
For best performance, you'll want: | |
• One or more NVIDIA GPUs - GeForce RTX 2080 Ti present | |
• An NVIDIA driver - NVIDIA-SMI 410.57 present | |
• A CUDA toolkit – to be installed | |
• cuDNN – to be installed | |
Building Protobuf : | |
To run Caffe and Tensorflow inside DIGITS side by side, protobuf 3 must be built from source. |
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
500 Internal Server Error – Analysis | |
1. [Python] Flask Web App in Azure throws (Internal Server Error) | |
Firstly, it works fine locally on my computer. | |
So I tried to deploy my website to azure Web App, it deployed successfully, but it shows 'Internal Server Error' as I try to browse it. Checked logs and didn't find any specific problem. Here's wsgi log: | |
2016-10-16 16:34:09.476620: Activating venv with executable at D:\home\site\wwwroot\env\Scripts\python.exe | |
2016-10-16 16:34:09.507951: Getting handler Test_Azure.app | |
2016-10-16 16:34:10.242244: Activating venv with executable at D:\home\site\wwwroot\env\Scripts\python.exe | |
2016-10-16 16:34:10.257894: Getting handler Test_Azure.app |
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
Introduction | |
Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet. It is more resource-friendly than Apache in most cases and can be used as a web server or a reverse proxy. | |
In this guide, we'll discuss how to get Nginx installed on your Ubuntu 16.04 server. | |
Prerequisites | |
Before you begin this guide, you should have a regular, non-root user with sudo privileges configured on your server. You can learn how to configure a regular user account by following our initial server setup guide for Ubuntu 16.04. |
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 sklear.liner_model import LinerRegression | |
linreg=LinerRegression() | |
data_with_null = data[['passengerid', 'class','survived', 'age']].dropna() | |
data_without_null = data_with_null.dropna() | |
train_data_x = data_without_null.iolc[:,:4] | |
train_data_y = data_without_null.iolc[:,4] |
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 pandas as pd | |
import numpy as np | |
df=pd.read_csv("/home/pima_indians_diabetes.csv",header=None) | |
# # to get a statistical summary of all columns, so that we can identify missing data by checking min value | |
# print(df.describe()) | |
# print(df.head(20)) |
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 PIL import Image | |
import matplotlib.pyplot as plt | |
import numpy as np | |
def gauss_noise(img): | |
row,col,ch= img.height, img.width,3 | |
loc = 0 | |
scale=30 |
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 PIL import Image | |
import matplotlib.pyplot as plt | |
class pixel_transformation: | |
def __init__(self): | |
self.red_added=0 | |
self.green_added=0 | |
self.blue_added=0 | |
self.red_sub=0 |
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
# Parameters | |
# image : ndarray | |
# Input image data. Will be converted to float. | |
# mode : str | |
# One of the following strings, selecting the type of noise to add: | |
# 'gauss' Gaussian-distributed additive noise. | |
# 'poisson' Poisson-distributed noise generated from the data. | |
# 'saltandpepper' Replaces random pixels with 0 or 1. |
NewerOlder