Skip to content

Instantly share code, notes, and snippets.

View sanuj's full-sized avatar

Sanuj Sharma sanuj

View GitHub Profile
(cirq-py3) sanuj@DESKTOP-C5HBET3:~/Cirq$ pytest cirq-core/cirq/sim/simulation_state_test.py::test_delegating_gate_channel -x -v -s
======================================================== test session starts ========================================================
platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.2.0 -- /home/sanuj/anaconda3/envs/cirq-py3/bin/python
cachedir: .pytest_cache
Using --randomly-seed=3231141503
rootdir: /home/sanuj/Cirq
configfile: pyproject.toml
plugins: xdist-2.2.1, forked-1.6.0, anyio-3.7.1, asyncio-0.21.1, randomly-3.15.0, cov-3.0.0
asyncio: mode=Mode.STRICT
@sanuj
sanuj / postgres-enums.md
Created September 14, 2017 15:41
Postgres ENUMs

Postgres enums:

Data types that comprise a static, ordered set of values.

CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');

Ordering

The order in which the values were listed when the type was created. This will work in order by queries.

@sanuj
sanuj / heap.py
Last active July 27, 2017 19:44
Simple heap implementation in Python
class Heap:
def __init__(self, arr):
self.arr = arr
self.size = len(arr)
self.init()
def l(self, i):
return 2*i+1
def r(self, i):

Keybase proof

I hereby claim:

  • I am sanuj on github.
  • I am sanuj (https://keybase.io/sanuj) on keybase.
  • I have a public key ASCiThS0gECxRMnn5s1gC8bvNCFQuptx-jc56kl2sioPFAo

To claim this, I am signing this object:

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class EeShippingStatus extends Model
{
const INITIATED = 1;
const DISPATCHED = 2;
{
"code": 200,
"message": "Successful",
"data": [{
"order_id": 75702,
"marketplace": "Flipkart",
"reference_code": "OD203825086441933000",
"address_line_1": null,
"address_line_2": null,
"city": "Chittoor",
@sanuj
sanuj / plugin_readme.md
Created September 1, 2016 12:39
Guide for Plugin Architecture in Shogun
@sanuj
sanuj / tag_readme.md
Last active September 1, 2016 12:39
Guide for Tag based Parameter Framework in Shogun
@sanuj
sanuj / GSoC Submission.md
Last active August 23, 2016 03:33
Submission for my GSoC 2016 project.

New Parameter Framework and Plugin Based Architecture for Shogun

Shogun is a machine learning toolbox, written in C++, which offers a large variety of machine learning algorithms and also supports high level languages like Python, Lua, Ruby etc. However, Shogun is not very easy to build and has lots of dependencies. Most users install Shogun to use some particular algorithms instead of all the algorithms that Shogun offers, which results in installation redundancies. Moreover, developers also have to build the entire library to test the new features which slows down the development. These problems can be solved by a plugin architecure. A new parameter framework is required to build the plugin architecture, and it also helps to improve and cleanup the API of Shogun.

Initially the goal was -

  1. To build the new parameter framework and plugin architecture.
  2. Migrate old code base to use the new parameter framework and plugin architecture.

By mid-term eva

This file has been truncated, but you can view the full file.
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.10
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
* changes to this file unless you know what you are doing--modify the SWIG
* interface file instead.
* ----------------------------------------------------------------------------- */