技術情報
- 2023年05月15日
- 技術情報
new CEO for twitter
Elon Musk says he has found a new CEO for Twitter.
Musk didn’t say who would replace him, but the Wall Street Journal now reports that NBCUniversal communications director Linda Yaccarino is “in talks” for the role. . In a tweet, Musk announced that he would be transitioning from his role as CTO. The new CEO is expected to take over within six weeks.

Musk bought the twitter for $44 billion in October last year, after originally proposing an acquisition in April 2022. Once the deal was completed, he took over as CEO and quickly fired former Twitter CEO and other executives. He then laid off half of the staff in November.
Musk has previously said he plans to step down as CEO by the end of 2023 and appoint a new chief executive, saying he will respect the findings of the investigation as to whether he should remain in charge of the company. But so far he has not nominated a candidate.
During his time as CEO, Musk overhauled Twitter’s policies and features, prompting several major advertisers to stop spending on the twitter.
Musk’s decision to appoint Twitter’s new CEO should appease Tesla investors who fear that his time on Twitter is distracting him from his role as CEO of Tesla. Musk will soon step down as CEO of Twitter, but he remains the company’s owner. Musk recently changed the name of Twitter to Company X.
Yuuma
yuuma at 2023年05月15日 10:00:00
- 2023年05月09日
- 技術情報
Rotating and cropping the images in Python using opencv
Today, I would like to share how to rotate and crop the images in Python using opencv.
Rotating and cropping are common image processing techniques used to manipulate digital images. Python OpenCV is a powerful library for image processing that provides numerous tools for image manipulation. In this tutorial, we will learn how to rotate and crop images using Python OpenCV.
1. Installing OpenCV
First, we need to install OpenCV in our system. If you haven’t installed OpenCV yet, you can install it using pip:
pip install opencv-python
2. Loading an Image
After installing OpenCV, we can load an image using the imread() function. The imread() function takes the image file path as an argument and returns an array representing the image.
import cv2
# Load image
image = cv2.imread('path/to/image.jpg')
3. Rotating an Image
Rotating an image involves changing the orientation of the image. We can use the cv2.rotate() function to rotate an image. The cv2.rotate() function takes three arguments: the image, the rotation type, and the angle of rotation.
# Rotate image
rotated_image = cv2.rotate(image, cv2.cv2.ROTATE_90_CLOCKWISE)
In the above example, we have rotated the image 90 degrees clockwise.
4. Cropping an Image
Cropping an image involves selecting a portion of the image and discarding the rest. We can use array slicing to crop an image. The array slicing notation is [start_row:end_row, start_column:end_column].
# Crop image
cropped_image = image[start_row:end_row, start_column:end_column]
In the above example, we have cropped the image from start_row to end_row and start_column to end_column.
5. Displaying Images
After rotating or cropping an image, we can display the images using the cv2.imshow() function. The cv2.imshow() function takes two arguments: the name of the window and the image.
# Display images
cv2.imshow('Original Image', image)
cv2.imshow('Rotated Image', rotated_image)
cv2.imshow('Cropped Image', cropped_image)
# Wait for a key press and close all windows
cv2.waitKey(0)
cv2.destroyAllWindows()
6. Saving an Image
We can save the rotated or cropped image using the cv2.imwrite() function. The cv2.imwrite() function takes two arguments: the name of the file and the image.
# Save image
cv2.imwrite('path/to/saved/image.jpg', rotated_image)
In the above example, we have saved the rotated image to a file named ‘saved_image.jpg’ in the specified path.
Conclusion
In this tutorial, we have learned how to rotate and crop images using Python OpenCV. We have also learned how to display and save images. These are just a few of the many image processing techniques that can be performed using OpenCV. With OpenCV, we can perform a wide range of image processing tasks, from simple operations like cropping and rotating to more complex operations like edge detection and object recognition.
This is all for now. Hope you enjoy that.
By Asahi
waithaw at 2023年05月09日 10:00:00
- 2023年05月01日
- 技術情報
Hugging Face releases HuggingChat
Hugging Face, an AI startup backed by tens of millions of venture capitalists, has released an open-source alternative to OpenAI’s AI-powered viral chatbot ChatGPT called HuggingChat.
HuggingChat can be tested via a web interface or integrated with existing apps and services via the Hugging Face API. HuggingChat can handle many of the same tasks as ChatGPT, such as writing code, writing emails, and writing song lyrics.

The AI model that powers HuggingChat was developed by Open Assistant. This is a project sponsored by LAION, a German non-profit organization responsible for creating the datasets on which Stable Diffusion, a text-to-image AI model, was trained.
HuggingChat joins a growing family of open source alternatives to ChatGPT. Last week, Stability AI released StableLM. This is a suite of models that can generate code and text with basic instructions.
Some researchers have criticized the release of open source models similar to StableLM in the past, claiming they are flawed and can be used for malicious purposes such as crafting phishing emails. claim. However, some point out that many of the policed business models like ChatGPT, with their filtering and moderation systems, have proven to be flawed and exploitable.
yuuma at 2023年05月01日 10:00:00
- 2023年04月25日
- 技術情報
Creating client and server sockets using Python
Today, we will explore how to create client and server sockets using Python, along with an example code.
Client and server sockets are a fundamental part of network communication in computer science. A socket is essentially an endpoint that enables two-way communication between two devices over a network.
Server Socket
The server socket is a program that listens for incoming connections from clients. Once a connection is established, the server creates a new socket object to handle the communication with the client. Here is a basic example of a server socket program in Python:
import socket
HOST = '127.0.0.1' # Standard loopback interface address (localhost)
PORT = 65432 # Port to listen on (non-privileged ports are > 1023)
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((HOST, PORT))
s.listen()
conn, addr = s.accept()
with conn:
print('Connected by', addr)
while True:
data = conn.recv(1024)
if not data:
break
conn.sendall(data)
In the above code, we first import the socket module and define the IP address and port number for the server. Then we create a new socket object ‘s’ using the AF_INET address family and SOCK_STREAM socket type.
We then bind the socket to our defined IP address and port number, and start listening for incoming connections using the s.listen() method. Once a client connects, the s.accept() method returns a new socket object ‘conn’ representing the connection, along with the address of the client.
We then use a while loop to continuously receive data from the client using conn.recv() and send data back to the client using conn.sendall() until there is no more data to receive.
Client Socket
The client socket is a program that initiates a connection to the server socket. Here is a basic example of a client socket program in Python:
import socket
HOST = '127.0.0.1' # The server's hostname or IP address
PORT = 65432 # The port used by the server
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
s.sendall(b'Hello, world')
data = s.recv(1024)
print('Received', repr(data))
In the above code, we again import the socket module and define the IP address and port number for the server. We then create a new socket object ‘s’ using the AF_INET address family and SOCK_STREAM socket type.
We then initiate a connection to the server using s.connect() and send data to the server using s.sendall(). Finally, we receive data from the server using s.recv() and print the received data.
Conclusion
We have explored how to create client and server sockets using Python along with a basic example code. Sockets are a powerful tool for network communication and are used extensively in a wide range of applications. With the above knowledge, you can build complex network applications in Python.
This is all for now. Hope you enjoy that.
By Asahi
waithaw at 2023年04月25日 10:00:00
- 2023年04月24日
- 技術情報
Google Meet now allows pausing video streams for individual tiles
Google Meet is rolling out a new feature that lets you pause streaming video for individual tiles so you can focus on the speaker or presenter who’s talking frequently.
To turn off individual sources, tap the three-dot menu next to the person’s name in the web sidebar and click Don’t See. On mobile, there’s a new “audio only” mode that disables all streams except the presenter stream. Hopefully, Google will bring this feature to the desktop as well.
The ‘audio only’ mode is certainly useful for saving data if you’re on the go.

According to Google, Meet won’t notify others when you turn off the video stream. Also, the meeting experience will not change.
The company says it has already started rolling out this feature and will have it available across all locations in the coming weeks. Luckily, admins can’t disable this feature for individuals, so it’s always available to users.
Yuuma
yuuma at 2023年04月24日 10:00:00