This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
""" | |
Implementation of the Tiny Encryption Algorithm (TEA) for Python | |
https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm | |
Example Usage: | |
import tea | |
# The key must be 16 characters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyttsx3 | |
import engineio | |
engineio = pyttsx3.init() | |
voices = engineio.getProperty('voices') | |
engineio.setProperty('rate', 130) # Aquí puedes seleccionar la velocidad de la voz | |
engineio.setProperty('voice',voices[0].id) | |
def speak(text): | |
engineio.say(text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2012-2013 Claudio Guarnieri. | |
# Copyright (C) 2014-2018 Cuckoo Foundation. | |
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org | |
# See the file 'docs/LICENSE' for copying permission. | |
import datetime | |
import hashlib | |
import io | |
import multiprocessing | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
from botocore.exceptions import NoCredentialsError | |
ACCESS_KEY = 'AxKIAI2772U77ALJUKS5xA' | |
SECRET_KEY = 'bxBVLKyrc2GwJuNGBE8u92AU5W4LyBiZrpIU4q9rxK' | |
def upload_to_aws(local_file, bucket, s3_file): | |
s3 = boto3.client('s3', aws_access_key_id=ACCESS_KEY, | |
aws_secret_access_key=SECRET_KEY) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.linear_model import LogisticRegression | |
from sklearn.metrics import log_loss | |
import numpy as np | |
x = np.array([-2.2, -1.4, -.8, .2, .4, .8, 1.2, 2.2, 2.9, 4.6]) | |
y = np.array([0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]) | |
logr = LogisticRegression(solver='lbfgs') | |
logr.fit(x.reshape(-1, 1), y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
__author__ = "Sahand Saba" | |
def nobody(): | |
while True: | |
yield False | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// An example of how to generate permutations | |
// using STL algorithms library | |
// | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int main () { | |
const int N = 8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, Response,render_template | |
import pyaudio | |
app = Flask(__name__) | |
#audio1 = pyaudio.PyAudio() | |
p = pyaudio.PyAudio() | |
def generate_wav(self, raw): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using Android IP Webcam video / mjpeg .jpg stream (tested) in Python37 OpenCV | |
# TheBekabe - HanyaJasa.Com - [email protected] | |
import urllib | |
import urllib.request | |
import cv2 | |
import numpy as np | |
import time | |
# Replace the URL with your own IPwebcam shot.jpg IP:port |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3.5 | |
#Ubuntu 16.04.6 LTS | |
#Apache/2.4.18 (Ubuntu) | |
#Source: https://gist.githubusercontent.com/fideloper/2710970/raw/cbe308f44bfd299a3f410bb1a06aa67a2753763a/vhost.py | |
#Modif: 12:43 11/05/2020 - [email protected] - hanyajasa.com | |
#Example: python3.5 vhost.py -d /var/www/html/lab -s lab.bekabe.my.id | |
from sys import argv | |
from os.path import exists | |
from os import makedirs |