Skip to content

Instantly share code, notes, and snippets.

View hamzahkhan's full-sized avatar

Hamzah Khan hamzahkhan

View GitHub Profile
@hamzahkhan
hamzahkhan / semaphore24.r1cs
Created May 4, 2022 03:24
semaphore zkpart
Verification transcript for semaphore24 phase 2 contribution.
Contributor number 368
Circuit Hash:
1ee0c45c ea3a1fe6 22a1e66f 956d352a
a12e24c5 fdc98e83 0360ef80 bd9918e7
fecb367e 19f90aad 37917891 68e04a8d
b7b22d17 65bfbd21 69780b53 47f4be4e
-------------------------
contribution #348 MohamedDz07:
10bf1092 9103ed1b bf25fbbc c8f9c12c
@hamzahkhan
hamzahkhan / my_topology.py
Last active April 10, 2022 07:27
topology creation file for nyu lab
#!/usr/bin/python"""This setup the topology in lab4"""
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.node import Controller, RemoteController
from mininet.cli import CLI
from mininet.log import setLogLevel, info
from mininet.util import dumpNodeConnections
from mininet.link import Link, Intf, TCLink
import os
@hamzahkhan
hamzahkhan / sample_code_modified.py
Created April 10, 2022 07:17
switch controller for lab
from ryu.base import app_manager
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_3
from ryu.lib.packet import packet
from ryu.lib.packet import ethernet
from ryu.lib.packet import ether_types
from ryu.lib.packet import arp
from ryu.lib.packet import ipv4
#include <bits/stdc++.h>
using namespace std;
int predict(vector<int> v, vector<int> &fr, int pn, int index)
{
int res = -1, farthest = index;
for (int i = 0; i < fr.size(); i++)
{
int j;
for (j = index; j < pn; j++)
@hamzahkhan
hamzahkhan / [email protected]
Created December 5, 2021 07:47
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
@hamzahkhan
hamzahkhan / UiHandlerMdex.cs
Created November 8, 2021 18:04
UiHandlerMdex
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System.Numerics;
using System;
using TMPro;
public class UiHandlerMdex : MonoBehaviour
{
private string input;
@hamzahkhan
hamzahkhan / helloDungeon.sol
Created November 8, 2021 05:50
helloDungeon.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
interface Activity {
function activityName() external returns (string memory);
function activityDescription() external returns (string memory);
function xpName() external returns (string memory);
function xpForAdventurer(address) external returns (uint256);
}
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
void printLab4(int n, int a, int *fibo)
{
int i;
#include <linux/miscdevice.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/module.h>
static int sample_open(struct inode *inode, struct file *file)
{
pr_info("I have been awoken\n");
return 0;
}
@hamzahkhan
hamzahkhan / Task_Modelling&Debug.ipynb
Last active February 21, 2020 19:43
DSI Instructor Challenge submission
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.