Skip to content

Instantly share code, notes, and snippets.

View iambrj's full-sized avatar

Bharathi Ramana Joshi iambrj

View GitHub Profile
hello, world!
#lang racket
#|
- Mention that we're writing expander, the interpreter comes later
- Show example with let-syntax
|#
#|
<expr> ::= (lambda (<id>) <expr>) ; procedure
| <id> ; variable
| (<expr> ... <expr>) ; procedure call
#lang racket
(provide (all-defined-out))
#|
(define x ...)
(define-syntax (premade-or e)
(or e x))
#include <bits/stdc++.h>
using namespace std;
map<int, int> m;
void merge(int array[], int const left, int const mid,
int const right)
{
auto const subArrayOne = mid - left + 1;
auto const subArrayTwo = right - mid;
auto *leftArray = new int[subArrayOne],
#include <bits/stdc++.h>
using namespace std;
const int NMAX = 1e6 + 5;
int n, S_cnt[NMAX];
unordered_map<string, vector<int>> payoff;
vector<string> psne;
vector<string> gen(int i) {
#lang racket
(provide (all-defined-out))
(define (my-last l)
(match l
['() (error "Too few elements")]
[`(,x) `(,x)]
[`(,_ . ,d) (my-last d)]))
#include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
using namespace std;
int mod(int x) {
return x < 0? -x : x;
}
/**********
Copyright (c) 2019-2020, Xilinx, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
# vim: filetype=i3
# export BROWSER="chromium"
# export TERMINAL="xfce4-terminal"
# #---Basic Definitions---# #
# reload config
bindsym $mod+Shift+r reload
# exit i3
bind sym $mod+Shift+e "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# Needed for i3-gaps