What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-27 13:10:01
window.partitionby
import sys from pyspark.sql.window import Window import pyspark.sql.functions as func windowSpec = \ Window .partitionBy(df['category']) \ .orderBy(df['revenue'].desc()) \ .rangeBetween(-sys.maxsize, sys.maxsize) dataFrame = sqlContext.tabl... Add solution -
Python 2022-03-12 23:10:18
text detection from image using opencv python
#wasim shaikh github:httperror451 import cv2 import numpy as np import pytesseract pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe" # Load image, convert to HSV format, define lower/upper ranges, and perf... Add solution -
Python 2022-03-12 02:45:03
python diffie hellman
import pyDH d1 = pyDH.DiffieHellman() d2 = pyDH.DiffieHellman() d1_pubkey = d1.gen_public_key() d2_pubkey = d2.gen_public_key() d1_sharedkey = d1.gen_shared_key(d2_pubkey) d2_sharedkey = d2.gen_shared_key(d1_pubkey) print(d1_sharedkey == d2_sharedkey) p... Add solution -
Python 2022-02-27 12:00:02
hack wifi password using python
1 import pywifi 2 3 from pywifi import const Refer to some definitions 4 5 import time 6 7 8 def getwifi(wifilist, wificount): 9 wifi = pywifi.PyWiFi() Grab the NIC interface10 ifaces = wifi.interfaces()[0] Get NIC11 ifaces.scan()12 time.sleep(8)13 b... Add solution -
SQL 2022-02-26 23:35:10
excel export from sql using python
import pandas as pd import xlsxwriter import pyodbc conn = pyodbc.connect('Driver={SQL Server}; Server=ServerIP; uid=UID; pwd=Password; Trusted_Connection=No;') with pd.ExcelWriter("Output.xlsx", engine="xlsxwriter", options = {'str... Add solution -
Python 2022-02-24 19:45:12
record and store audio in pythn
import pyaudio import wave chunk = 1024 # Record in chunks of 1024 samples sample_format = pyaudio.paInt16 # 16 bits per sample channels = 2 fs = 44100 # Record at 44100 samples per second seconds = 3 filename = "output.wav" p = pyaudio.PyA... Add solution