Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Gopesh Neptune998

🎯
Focusing
View GitHub Profile
View TestRunner.java
package TestAutomation.TestRunner;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
//Cucumber Runner class
@RunWith(Cucumber.class)
@Neptune998
Neptune998 / SpiceJetStepDef.java
Created Aug 28, 2021
Java code or StepDefination.
View SpiceJetStepDef.java
package TestAutomation.StepDef;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
View SpiceJetTicketBooking.feature
@Smoke
Feature: Book Ticket
I want to book Ticket in Spice Jet
@Test1
Scenario: Book Ticket from Delhi to Bengaluru
Given I Open URL "https://www.spicejet.com/" and launch driver
When I search ticket from "Delhi" to "Bengaluru" Depart on "10-April-2021" return on "11-June-2021"
Then I close driver
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);
}