Friday, April 26, 2024
HomePythonWant Christmas with Python and R

Want Christmas with Python and R


This publish is devoted to all of the Python and R Programming Lovers…Flaunt your information in your peer group with the next packages. As an information science skilled, you need your want to be particular on eve of christmas. Should you observe the code, you may additionally be taught 1-2 tips which you should utilize later in your each day duties.

Methodology 1 : Run the next program and see what I imply

R Code

paste(intToUtf8(acos(log(1))*180/pi-13),
toupper(substr(month.identify[2],2,2)),
paste(rep(intToUtf8(acos(exp(0)/2)*180/pi+2^4+3*2),2), collapse = intToUtf8(0)),
LETTERS[5^(3-1)], intToUtf8(atan(1/sqrt(3))*180/pi+2),
toupper(substr(month.abb[10],2,2)),
intToUtf8(acos(log(1))*180/pi-(2*3^2)),
toupper(substr(month.identify[4],3,4)),
intToUtf8(acos(exp(0)/2)*180/pi+2^4+3*2+1),
intToUtf8(acos(exp(0)/2)*180/pi+2^4+2*4),
intToUtf8(acos(log(1))*180/pi-13),
LETTERS[median(0:2)],
intToUtf8(atan(1/sqrt(3))*180/pi*3-7),
sep = intToUtf8(0)
)

Python Code

import math
import datetime

(chr(int(math.acos(math.log(1))*180/math.pi-13)) 
 + datetime.date(1900, 2, 1).strftime('%B')[1]  
 + 2 * datetime.date(1900, 2, 1).strftime('%B')[3]  
 + datetime.date(1900, 2, 1).strftime('%B')[7]  
 + chr(int(math.atan(1/math.sqrt(3))*180/math.pi+2)) 
 + datetime.date(1900, 10, 1).strftime('%B')[1] 
 + chr(int(math.acos(math.log(1))*180/math.pi-18)) 
 + datetime.date(1900, 4, 1).strftime('%B')[2:4]  
 + chr(int(math.acos(math.exp(0)/2)*180/math.pi+2**4+3*2+1)) 
 + chr(int(math.acos(math.exp(0)/2)*180/math.pi+2**4+2*4)) 
 + chr(int(math.acos(math.log(1))*180/math.pi-13)) 
 + "{:c}".format(97) 
 + chr(int(math.atan(1/math.sqrt(3))*180/math.pi*3-7))).higher()
 

Methodology 2 : Audio Want for Christmas

Activate pc audio system earlier than working the code.

R Code

set up.packages("audio")
library(audio)
christmas_file 

Python Code

#Set up packages
!pip set up requests
!pip set up playsound

import requests 
from playsound import playsound

audio_url = "https://github.com/deepanshu88/Datasets/uncooked/grasp/UploadedFiles/merrychristmas1.wav"
r = requests.get(audio_url)  

with open("christmas.wav",'wb') as f: 
      f.write(r.content material)

playsound('christmas.wav')

Ensure that requests and playsound packages are put in earlier than working the above code. Should you get “Permission Denied” error, ensure that your working listing is about the place you have got write entry. Set working listing through the use of this code. os.chdir()

Associated Posts

About Writer:

Deepanshu based ListenData with a easy goal – Make analytics straightforward to know and comply with. He has over 10 years of expertise in knowledge science. Throughout his tenure, he has labored with international purchasers in numerous domains like Banking, Insurance coverage, Personal Fairness, Telecom and Human Useful resource.



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments