This file contains 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
var conn = new Mongo(); | |
db = conn.getDB(<DB_NAME>); | |
var cursor = db.<COLLECTION>.find(); | |
var items = []; | |
items = cursor.toArray(); | |
var dbstruc = {}; | |
for (var i = 0; i < items.length; ++i) { | |
var target = items[i]; | |
getKP(target,dbstruc); | |
} |
This file contains 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
{ | |
"_id": "5d02dd4559bfaf1280fee9c9", | |
"info": { | |
"added": "2019-06-14T06:30:44.142Z", | |
"started": "2019-06-14T06:30:45.788Z", | |
"duration": 157, | |
"analysis_path": "/home/cuckoo/.cuckoo/storage/analyses/1180", | |
"ended": "2019-06-14T06:33:23.091Z", | |
"owner": null, | |
"score": 11, |
This file contains 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 requests | |
#http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file | |
url = "http://localhost:5000/" | |
fin = open('simple_table.pdf', 'rb') | |
files = {'file': fin} | |
try: | |
r = requests.post(url, files=files) | |
print r.text |
This file contains 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/env python | |
import pyaudio | |
import socket | |
import sys | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 1 | |
RATE = 44100 | |
CHUNK = 4096 |
This file contains 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
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted |
This file contains 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
""" | |
Implementation of RSA cryptography | |
using samples of large numbers | |
""" | |
import random | |
import sys | |
import math | |
from random import randrange |
This file contains 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
''' | |
620031587 | |
Net-Centric Computing Assignment | |
Part A - RSA Encryption | |
''' | |
import random | |
''' |
This file contains 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
sample = ['GTA','GGG','CAC'] | |
def read_dna(dna_file): | |
dna_data = "" | |
with open(dna_file, "r") as f: | |
for line in f: | |
dna_data += line | |
return dna_data | |
def dna_codons(dna): |
This file contains 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 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) |