Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Gopesh Neptune998

🎯
Focusing
View GitHub Profile
View Complete_code.py
# Libraries import
import speech_recognition as sr
import moviepy.editor as mp
# It will clip the video
# subclip(starttime, endtime) to clip portion of video
# you can remove the subclip to convert complete video
clip = mp.VideoFileClip(r"sample1.mp4").subclip(10, 100)
# It will write the audio in converted_audio.wav file.
View audio_text_conversin.py
# Libraries import
import speech_recognition as sr
# It will read audio file
audio = sr.AudioFile("Converted_audio.wav")
print("Audio file readed...")
# Here the magic start
# create an instance of recognizer as r
r = sr.Recognizer()
View Video_audio_convertion.py
# Libraries import
import moviepy.editor as mp
# It will clip the video
# subclip(starttime, endtime) to clip portion of video
# you can remove the subclip to convert complete video
clip = mp.VideoFileClip(r"sample1.mp4").subclip(10, 100)
# It will write the audio in converted_audio.wav file.
clip.audio.write_audiofile(r"Converted_audio.wav")
View javascript_scrape.js
// The name of the Python script that returns the scraped data is scrape_data.py
let scrapeJSON = 'http://bluegalaxy.info/cgi/scrape_data.py'
$.get(scrapeJSON, function(data) {
// Get JSON data from Python script
if (data){
console.log("Data returned:", data)
}
jobDataJSON = JSON.parse(data)
@Neptune998
Neptune998 / scrape_data_using_python.py
Created Aug 29, 2020
Here we can scrape data using requests module in Python.
View scrape_data_using_python.py
import requests
jsonData = requests.get(r'https://api.stagingjobshq.com/madgexWidgetJobs.php?callback=displayJobs&city=Moorhead&state=Minnesota', verify=False).text.strip()
return jsonData
@Neptune998
Neptune998 / program.slq
Created Aug 18, 2020
Program to output 0 or 1
View program.slq
def main(){
x:=H(false);
return measure(x);
}
@Neptune998
Neptune998 / function_Silq.slq
Last active Aug 18, 2020
How to write a function in silq
View function_Silq.slq
def main() {
x:=H(false);
return measure(x);
}
View sample_class.py
class Website:
def __init__(self, name, url):
self.name = name
self.url = url
def print_url(self):
print("Name of Website " + self.name + "and URL "+ self.url)
web1 = Website("NeptuneWorld", "https://neptuneworld.in/")
web1.print_url()
@Neptune998
Neptune998 / insertion_recursive_algo.py
Last active Aug 13, 2020
Insertion Recursive Algorithm
View insertion_recursive_algo.py
# Insertion Recursive Algorithm
function insertionSortR(array A, int n)
if n > 0
insertionSortR(A, n-1)
xA[n]
jn-1
while j >= 0 and A[j] > x
A[j+1] ← A[j]
jj-1
end while