Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View srajangarg's full-sized avatar

Srajan Garg srajangarg

  • IIT Bombay
  • Mumbai
View GitHub Profile
@srajangarg
srajangarg / allocator.h
Last active October 27, 2017 14:30
allocator
#include <bits/stdc++.h>
#include <stdlib.h>
#include <sys/mman.h>
using namespace std;
#define USE_FLASH
void print_and_exit(string s)
{
@srajangarg
srajangarg / final_submission.txt
Last active August 17, 2016 13:53
GSoC Final submission : Srajan Garg
PRs authored by me at github.com/symengine/symengine :
https://github.com/symengine/symengine/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Asrajangarg
A personal blog, explaining the work done by me on a weekly basis :
http://srajangarg.github.io/
@srajangarg
srajangarg / q12.sql
Last active July 26, 2016 17:53
DB Lab 1 Discprepancies
Your Answer:
select distinct S1.time_slot_id, S2.time_slot_id
from time_slot as S1, time_slot as S2
where S1.day = S2.day and S1.time_slot_id != S2.time_slot_id
and numrange((60*S1.start_hr+S1.start_min), 60*S1.end_hr+S1.end_min)
&& numrange(60*S2.start_hr+S2.start_min, 60*S2.end_hr+S2.end_min)
Instructor Answer:
@srajangarg
srajangarg / q9.sql
Created July 26, 2016 16:17
DB Lab 1 Discprepancies
Your Answer:
with stable as
(select course_id, sec_id, year, semester, count(ID) as numstu from takes
group by course_id, sec_id, year, semester),
enrol(max_enroll) as
(
select max(numstu) from stable
)
select course_id, sec_id, year, semester, numstu from stable, enrol
In file included from /usr/local/include/piranha/symbol_set.hpp:49:0,
from /usr/local/include/piranha/is_key.hpp:37,
from /usr/local/include/piranha/math.hpp:49,
from ./symengine/expression.h:196,
from symengine/polys/uintpoly_piranha.cpp:2:
/usr/local/include/piranha/term.hpp: In instantiation of ‘class piranha::term<SymEngine::mpq_wrapper, piranha::monomial<unsigned int> >’:
/usr/include/c++/5/type_traits:842:28: required by substitution of ‘template<class _Tp, class> static std::true_type std::__do_is_default_constructible_impl::__test(int) [with _Tp = piranha::term<SymEngine::mpq_wrapper, piranha::monomial<unsigned int> >; <template-parameter-1-2> = <missing>]’
/usr/include/c++/5/type_traits:853:35: required from ‘struct std::__is_default_constructible_impl<piranha::term<SymEngine::mpq_wrapper, piranha::monomial<unsigned int> > >’
/usr/include/c++/5/type_traits:137:12: required from ‘struct std::__and_<std::__not_<std::is_void<piran
cmake .
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- serialization
-- iostreams
-- regex
--------------------------------------------------------------------------------
+-------------------------------+
| Configuration results SUMMARY |
RCP<const Symbol> x = symbol("x");
RCP<const Symbol> y = symbol("y");
RCP<const Basic> basic, gen;
RCP<const Basic> i2 = integer(2);
RCP<const Basic> i1 = integer(1);
RCP<const Basic> i5 = integer(5);
RCP<const Basic> twopx = pow(i2, x);
RCP<const Basic> xb2 = div(x, i2);
RCP<const Basic> r3b2 = div(integer(3), i2);
RCP<const Basic> half = div(one, i2);
+-rwxrwxr-x 1 garg garg 1873 Jul 30 2015 client.down
+-rwxrwxr-x 1 garg garg 1835 Jul 30 2015 client.up
+-rw-rw-r-- 1 garg garg 5813 May 8 14:39 iitbvpn.conf
+-rwxr-xr-x 1 root root 1301 Feb 2 18:10 update-resolv-conf
@srajangarg
srajangarg / piranha_bench
Last active June 16, 2016 05:27
`testmul.cpp` requires only minimal changes for benchmarking `UIntPolyPiranha` too.
0.25 1 2 0.920732
0.25 2 2 0.870588
0.25 3 2 0.995726
0.25 4 2 1.051118
0.25 5 2 1.310433
0.25 6 2 1.345603
0.25 7 2 1.327754
0.25 8 2 1.548291
0.25 9 2 1.546229
0.25 10 2 1.686339
In file included from /usr/local/include/piranha/symbol_set.hpp:49:0,
from /usr/local/include/piranha/is_key.hpp:37,
from /usr/local/include/piranha/math.hpp:49,
from /home/garg/code/symengine/symengine/expression.h:192,
from /home/garg/code/symengine/symengine/series_piranha.h:6,
from /home/garg/code/symengine/symengine/series_piranha.cpp:2:
/usr/local/include/piranha/hash_set.hpp: In instantiation of ‘class piranha::hash_set<piranha::term<SymEngine::mpz_wrapper, piranha::monomial<unsigned int> >, piranha::detail::term_hasher<piranha::term<SymEngine::mpz_wrapper, piranha::monomial<unsigned int> > >, std::equal_to<piranha::term<SymEngine::mpz_wrapper, piranha::monomial<unsigned int> > > >’:
/usr/local/include/piranha/series.hpp:1232:72: required from ‘class piranha::series<SymEngine::mpz_wrapper, piranha::monomial<unsigned int>, piranha::polynomial<SymEngine::mpz_wrapper, piranha::monomial<unsigned int> > >’
/usr/local/incl