Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ryanbekabe's full-sized avatar
💭
Cuckoo Sandbox for identify Malware, JupyterLab for Machine Learning

ryanbekabe

💭
Cuckoo Sandbox for identify Malware, JupyterLab for Machine Learning
View GitHub Profile
@ryanbekabe
ryanbekabe / split_file_python.py
Created April 1, 2024 04:13
Python Split File
import os
# Fungsi untuk memotong file log menjadi file-file yang lebih kecil dengan ukuran tertentu
def potong_file_log(input_file_path, output_directory, max_file_size_bytes):
try:
os.makedirs(output_directory, exist_ok=True)
with open(input_file_path, 'rb') as input_file:
part_num = 1
while True:
output_file_path = os.path.join(output_directory, f'access_part_{part_num}.log')
Innal hamdalillaahi nahmaduhu wanasta’inuhu wanastaghfiruh,
wana’udzubillahi min syuruuri anfusinaa,
wa min sayyi ati a’malina,
man yahdihillahu fala mudhillallah,
wa man yudhlilfalaa haadiya lah.
Wa asyhadu alla ilaha illallah, wahdahu la syarikalah, wa asyhadu anna Muhammadan ‘abduhu wa Rasuluh, la nabiya ba’dah.
Allahumma shalli wasalim alaa muhammadu wa alihi wa ashabihi wamanit taba‘ahum bi ihsanin ilaa yaumiddin.
@ryanbekabe
ryanbekabe / flaskaudiostream.py
Created August 5, 2019 03:36 — forked from hosackm/flaskaudiostream.py
Flask streaming an audio file
from flask import Flask, Response
app = Flask(__name__)
@app.route("/wav")
def streamwav():
def generate():
with open("signals/song.wav", "rb") as fwav:
data = fwav.read(1024)
@ryanbekabe
ryanbekabe / python_audio_streaming.py
Last active January 16, 2024 08:34
Python Audio from Mic to streaming
from flask import Flask, Response,render_template
import pyaudio
app = Flask(__name__)
#audio1 = pyaudio.PyAudio()
p = pyaudio.PyAudio()
def generate_wav(self, raw):
"""
@ryanbekabe
ryanbekabe / client.py
Created June 29, 2019 23:43 — forked from kittinan/client.py
Python OpenCV webcam send image frame over socket
import cv2
import io
import socket
import struct
import time
import pickle
import zlib
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(('192.168.1.124', 8485))
#!/usr/bin/python
# Coded By izocin
# Turkey
import requests, re, urllib2, os, sys, codecs,binascii, json
from multiprocessing.dummy import Pool
from time import time as timer
import time
from random import sample as rand
@ryanbekabe
ryanbekabe / bot.py
Created October 9, 2023 02:34 — forked from kuldeep1337/bot.py
import requests, sys, os, re
from multiprocessing import Pool
from multiprocessing.dummy import Pool as ThreadPool
from time import time as timer
from platform import system
from colorama import Fore
from colorama import Style
from pprint import pprint
from colorama import init
@ryanbekabe
ryanbekabe / jalur_pendaftaran.html
Created May 4, 2023 01:22
Akan menampilkan DIV dengan ID selesai yang status displaynya none jika video YouTubenya sudah selesai ditonton sampai selesai di halaman web min1kotapky_com/ppdb-pendaftaran 2023
<html>
<div id="selesai" style="display:block;">
<h1 class="text-center" style="font-family: Cambria;"><b>PILIH JALUR PENDAFTARAN</b></h1>
<div class="row">
<div class="col-md-4">
<a href="http://ppdbmin.com/jalur_afirmasi/beranda/69726697">
<div class="box box-solid" style="border-radius: 5px;">
<div class="box-body text-center" style="border-radius: 5px;padding: 30px;background: #37991e;">
<img src="https://min1kotapky.com/asset/dist/img/logo_afirmasi.png">
@ryanbekabe
ryanbekabe / index.html
Created March 10, 2023 19:00
Web Speech API - Demo
<main class="content">
<h1>How to use JavaScript for Text to Speech</h1>
<p>You start by defining the content.</p>
<p>Then you pass this into the API.</p>
</main>
<select name="voices" id="voices">
</select>
@ryanbekabe
ryanbekabe / export_db_csv.py
Created March 9, 2023 06:26 — forked from madan712/export_db_csv.py
Python - Export database table to csv file
import mysql.connector
def fetch_table_data(table_name):
# The connect() constructor creates a connection to the MySQL server and returns a MySQLConnection object.
cnx = mysql.connector.connect(
host='localhost',
database='schema',
user='user',
password='password'