Skip to content

Instantly share code, notes, and snippets.

Abhijith Anilkumar abhijithanilkumar

Block or report user

Report or block abhijithanilkumar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
from itertools import groupby
def splitWithIndices(a, c=' '):
for k,g in groupby(s, lambda x:x:==c):
q=p + sum(1 for i in g)
if not k:
yield p,q
#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
#read ack
#create the bytearray
b = bytearray(5) #bytearray of 5 bytes
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]
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
/* -*- 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.
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)
View bfs.jl
using ThreeJS
using Escher
using LightGraphs
using NetworkViz
g = CompleteGraph(10)
@show typeof(g)
You can’t perform that action at this time.