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
from kubernetes import client, config | |
# Load kubeconfig file | |
config.load_kube_config() | |
# Create an instance of the Kubernetes API client | |
api_instance = client.AppsV1Api() | |
# Specify the name and namespace of the deployment to update | |
name = "my-deployment" |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: tutorial | |
spec: | |
ports: | |
- name: 80-tcp | |
port: 80 | |
protocol: TCP | |
targetPort: 80 |
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
#Program to Detect the Face and Recognise the Person based on the data from face-trainner.yml | |
import cv2 #For Image processing | |
import numpy as np #For converting Images to Numerical array | |
import os #To handle directories | |
from PIL import Image #Pillow lib for handling images | |
labels = ["ajeet", "Elon Musk"] | |
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') |
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
The docker dev start command is a development command that is used to start a development environment in Docker Desktop. This command is typically used when developing applications that run in Docker containers, as it allows you to easily test and debug your code within a containerized environment. | |
To use the docker dev start command, you will need to have a Docker Compose file that defines the services that make up your development environment. You can then run the docker dev start command, followed by the name of the Compose file: | |
`docker dev start -f docker-compose.yml` | |
This will start the development environment defined in the Compose file. You can then access your application and make changes to the code, which will be automatically reflected in the running containers. | |
It's worth noting that the docker dev start command is a development command and is not intended for production use. You should use a different approach, such as deploying your application to a production environment, when deploying y |
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
To write a script that retweets all tweets with a certain search term, you will need to use the Twitter API. Here are the steps you can follow: | |
First, you will need to sign up for a Twitter developer account and create a new project. This will give you access to the API keys and secrets that you need to authenticate your API requests. | |
Install the required libraries. You will need to install the tweepy library to access the Twitter API. You can install it using pip install tweepy. | |
Authenticate your API requests. You will need to use your API keys and secrets to authenticate your API requests. You can do this by creating an OAuth1UserHandler object and passing it your API keys and secrets. | |
Search for tweets with a certain search term. You can use the tweepy.API.search() method to search for tweets with a certain search term. You can pass in the search term as a parameter, along with the number of tweets you want to retrieve. |
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
version: '3.7' | |
services: | |
redismod: | |
image: redis/redis-stack:latest | |
container_name: redis | |
restart: unless-stopped | |
environment: | |
EMAIL: [email protected] | |
volumes: |
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
version: '3.7' | |
services: | |
redismod: | |
image: redislabs/redismod | |
container_name: redis | |
restart: unless-stopped | |
environment: | |
EMAIL: [email protected] | |
volumes: |
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
GOOGLE_CLIENT_ID= | |
GOOGLE_CLIENT_SECRET= | |
SECRET_KEY= | |
TMDB= |
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
git clone https://github.com/redis-developer/movify |
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
docker build -t redis21_backend backend/ | |
docker build -t redis21_frontend frontend/ | |
docker-compose up |