ifconfig arp ping : icmp packets example : ping 10.6.15.254 -s 2000 -M {dont // do} for DF bit on/off wget/curl -tcp port 80 (http traffic) netstat -rn : for default gateway address arp -a : gives address in cache sudo arp -d xx.xx.xx.xx : clearing cache //filter on wireshark : eth.addr==( your mac address) to find out arp traffic sent from your computer to local network
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 re | |
from coalib.bearlib.abstractions.Lint import Lint | |
from coalib.bears.LocalBear import LocalBear | |
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY | |
class Flake8Bear(LocalBear, Lint): | |
executable = 'flake8' | |
output_regex = re.compile(r'^.+?:(?P<line>\d+):(?P<column>\d+):\s*(?:(?P<error>(?:F(?:40[24]|8(?:12|2[123]|31))|E(?:11[23]|90[12])))|(?P<warning>\w\d+))(?P<message>(?P<near>\'.+\')\s*imported but unused|.*)') |
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
██████╗ ██████╗ █████╗ ██╗ █████╗ | |
██╔════╝██╔═══██╗██╔══██╗██║ ██╔══██╗ | |
██║ ██║ ██║███████║██║ ███████║ | |
██║ ██║ ██║██╔══██║██║ ██╔══██║ | |
╚██████╗╚██████╔╝██║ ██║███████╗██║ ██║ | |
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ | |
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
from distutils.dir_util import copy_tree | |
import argparse | |
parser = argparse.ArgumentParser(prog='coala-new-bear',description='New Lint Bear') | |
parser.add_argument('-n', '--name', help='Enter Bear name') | |
args = parser.parse_args() | |
fromdir = "skeleton" | |
userProv = args.name |
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
''' | |
Author : Karan | |
For the love of pyvideo | |
''' | |
from __future__ import unicode_literals | |
import os,json,youtube_dl | |
def walker(): | |
a=[] |
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 java.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class subarray { | |
public static void main(String[] args) { |
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
'''Python document distance algo''' |
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
''' Peak Finder 1-D version. | |
Runs on an array of numbers | |
Task : Find a *peak* (IF IT EXISTS) | |
Peak iff b>=a , b>=c ( equal or greater than Right , Left elts) | |
If corner elements then equal or greater to whatever R/L | |
''' | |
'''Algo (straightforward): | |
Start from left | |
n/2 might be the peak //*\\ ( look at n/2 elts ) |
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
from collections import defaultdict |
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 java.util.Scanner; | |
import java.util.ArrayList; | |
public class hello { | |
public static void main(String[] args) throws Exception | |
{ | |
Scanner reader = new Scanner(System.in); |