Skip to content

Instantly share code, notes, and snippets.

yearOne = 0
yearTwo = -1
def getYears():
global yearOne, yearTwo
prompt = "Enter the years you would like movies for: "
import dpkt
from socket import inet_ntoa
try:
import cPickle as pickle
except:
import pickle
from multiprocessing import Process, Queue
data = {'source':set([]),
'destination':set([]),
from pomegranate import *
import dpkt, traceback, random, time
# Small test, 1 for all data, 0 for none
def log(text):
fileName = "HMM-output.txt"
with open(fileName, "a+") as output:
output.write(text)
import dpkt
from socket import inet_ntoa
import traceback
import datetime
import sys
import csv
myAddress = '10.0.0.3'
badFrames = 0
import dpkt
from socket import inet_ntoa
import traceback
import datetime
import multiprocessing
import sys
try:
import cPickle as pickle
except:
import pickle
@aurorapar
aurorapar / storepcap.py
Created April 23, 2019 11:08
Parses a network traffic file and stores into a pickled dictionary
import dpkt
from socket import inet_ntoa
import traceback
import datetime
import multiprocessing
try:
import cPickle as pickle
except:
import pickle
import UIKit
// Assuming this is the values, not the even indexes
func sumOfEvens(array: [Int]) -> Int
{
var total = 0
for value in array
{
if value % 2 == 0
{
@aurorapar
aurorapar / fuzzysystem.py
Created December 4, 2018 02:43
Lets get this running for every input value
import numpy as np
import skfuzzy as fuzz
from skfuzzy import control as ctrl
import json, sys
class FuzzyPlantSystem:
def __init__(self, humidity, temp, waterLevel):
# Input/output sets
self._a_temp = ctrl.Antecedent(np.arange(32, 213, 1), 'temperature')
import java.io.*;
import java.net.*;
import java.lang.*;
import java.nio.charset.*;
import java.util.*;
import java.util.concurrent.TimeUnit;
class NetworkDiscovery
{
protected static final int BCAST_PORT = 9050;
@aurorapar
aurorapar / add.php
Created August 30, 2018 18:17
DIctionary for SE
<?php
include 'index.txt';
include 'diclib.php';
$theParts = array('Noun','Adjective','Adverb','Conjunction','Pronoun','Verb','Preposition','Interjection');
$key = $parts = $definition = "";
if ($_SERVER["REQUEST_METHOD"] == "POST")
{