Skip to content

Instantly share code, notes, and snippets.

View goyalankit's full-sized avatar
Working from home

Ankit Goyal goyalankit

Working from home
View GitHub Profile
goyalankit /
Last active September 23, 2022 20:12
flyte poc
import typing
from flytekit import task, workflow, get_reference_entity, kwtypes
from flytekit.models.core.identifier import ResourceType
from typing import Dict# noqa: E402
def say_hello() -> str:
return "hello world"
goyalankit /
Last active February 2, 2021 22:54
TFF Multi Node Toy Example
# Copyright 2019, The TensorFlow Federated Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# Copyright Ben Maurer
# you can distribute this under the MIT/X11 License
my $pid=shift @ARGV;
unless ($pid) {
print "./ <pid>\n";
exit 1;
"ociVersion": "1.0.0",
"process": {
"terminal": false,
"user": {
"uid": 0,
"gid": 0
"args": [
import os
import time
from functools import wraps
def memoize_until_file_modified(filepath):
""""Memoize the data until the mtime of the file at filepath changes."""
def memoize_until_file_modified_decorator(func):
def decorated(*args, **kwargs):

Keybase proof

I hereby claim:

  • I am goyalankit on github.
  • I am goyalankit ( on keybase.
  • I have a public key ASB35EigYuQtVor3E2Z5EX4pOGO8cg17amOaWGkhKMPf0wo

To claim this, I am signing this object:

goyalankit /
Last active May 9, 2017 05:37
Iterate through all the interfaces and check if they are in promiscuous mode.
# This script goes through all the network devices on the system
# and determines if the device in promiscuous mode.
# More information at:
# Usage: python
# Author: Ankit Goyal (
import os
goyalankit /
Created April 22, 2017 19:53 — forked from nerdalert/
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams


IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

goyalankit / two-hour.service
Last active February 24, 2024 19:27
Systemd unit files to restart service every two hours.
Description=Service that restarts my spread_goodness.service every two hours.
ExecStart=/usr/bin/systemctl try-restart spread_goodness.service