This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"github.com/dicedb/dicedb-go" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"log" | |
"math/rand" | |
"net/http" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conda activate <env_name> | |
conda install -c conda-forge jupyter_contrib_nbextensions | |
jupyter nbextensions_configurator enable --user | |
jupyter contrib nbextension install --user | |
jupyter nbextension enable hinterland/hinterland |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cypress.Commands.add('loginOkta', () => { | |
const optionsSessionToken = { | |
method: 'POST', | |
url: Cypress.env('session_token_url'), | |
body: { | |
username: Cypress.env('username'), | |
password: Cypress.env('password'), | |
options: { | |
warnBeforePasswordExpired: 'true' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compiler/build.gradle b/compiler/build.gradle | |
index 60d3a436f..409df7a03 100644 | |
--- a/compiler/build.gradle | |
+++ b/compiler/build.gradle | |
@@ -31,6 +31,7 @@ def addLibraryIfNotLinked = { libName, argList -> | |
} | |
def String arch = rootProject.hasProperty('targetArch') ? rootProject.targetArch : osdetector.arch | |
+// arch = arch.replace('osx_arm-v8', 'osx_aarch64') | |
def boolean vcDisable = rootProject.hasProperty('vcDisable') ? rootProject.vcDisable : false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://leetcode.com/problems/merge-intervals/ | |
class Solution | |
{ | |
public: | |
vector<vector<int>> merge(vector<vector<int>> &intervals) | |
{ | |
sort(intervals.begin(), intervals.end(), [](auto &vec1, auto &vec2) { | |
// if the start timings are equal | |
if (vec1[0] == vec2[0]) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
public: | |
int minSetSize(vector<int>& arr) { | |
unordered_map<int, int> freq; | |
for(int i = 0; i < arr.size(); ++i) freq[arr[i]]++; | |
priority_queue<int> pq; | |
for(auto iter: freq) pq.push(iter.second); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
public: | |
string addBinary(string a, string b) { | |
string res; | |
int i = a.size() - 1, j = b.size() - 1; | |
int sum, carry = 0; | |
while(i >= 0 || j >= 0) { | |
sum = carry; | |
if(i >= 0) sum += a[i--] - '0'; | |
if(j >= 0) sum += b[j--] - '0'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://leetcode.com/problems/course-schedule-ii/ | |
class Solution | |
{ | |
/* | |
* finished[i] can take one of three values: | |
* -1 -> the node i has never been visited | |
* 0 -> the node i has been visited but is currently in process of completing pre-requisites | |
* 1 -> the node i has finished both the pre-requisites and the course | |
*/ | |
vector<int> res; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Definition for singly-linked list. | |
* struct ListNode { | |
* int val; | |
* ListNode *next; | |
* ListNode() : val(0), next(nullptr) {} | |
* ListNode(int x) : val(x), next(nullptr) {} | |
* ListNode(int x, ListNode *next) : val(x), next(next) {} | |
* }; | |
*/ |
NewerOlder