Skip to content

Instantly share code, notes, and snippets.

# Abhijith Anilkumarabhijithanilkumar

• Sort options
Created Aug 3, 2017
question 6
View q6.py
 from itertools import groupby def splitWithIndices(a, c=' '): p=0 for k,g in groupby(s, lambda x:x:==c): q=p + sum(1 for i in g) if not k: yield p,q p=q
Last active Oct 15, 2016
View using_pyserial.py
 #import pyserial package import serial #open the serial port s = serial.Serial("/dev/ttyACM0") #change port after checking the port in which device is connected #send probe s.write('S') #read ack s.read() #create the bytearray b = bytearray(5) #bytearray of 5 bytes
Created Jul 8, 2016
View networklayout_test.jl
 using LightGraphs using NetworkViz using NetworkLayout using ThreeJS using Colors main(window) = begin """ar = int(open(readdlm,"jagmesh1.mtx")) x = ar[:,1] y = ar[:,2]
Last active Jun 1, 2016
View fibo.jl
 f(a,b) = b,b+a # Function that computes the fibonacci number function fibonacci(N::int64) # Function to find first N fibonacci numbers a = 0 ; b = 1 # Errors can arise depending on the values taken for a and b. for c in 1:N # Loop that runs N times a,b = f(a,b) @show a end end
Created May 6, 2016
View lru350.cc
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** * Copyright (c) 2011-2015 Regents of the University of California. * * This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and * contributors. * * ndnSIM is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Foundation, * either version 3 of the License, or (at your option) any later version.
Created Apr 8, 2016
View changeproperties.jl
 #Run this code in Escher using NetworkViz using LightGraphs main(window) = begin num = Signal(10) width = Signal(1) nodesize = Signal(0.2) edgewidth = Signal(0.5) toggle = Signal(true)
Last active Mar 13, 2016
View bfs.jl
 using ThreeJS using Escher using LightGraphs using NetworkViz g = CompleteGraph(10) drawGraph(g,1) @show typeof(g)
You can’t perform that action at this time.