Skip to content

Instantly share code, notes, and snippets.

View sudipt1999's full-sized avatar
🥇
Code speaks

sudipt dabral sudipt1999

🥇
Code speaks
View GitHub Profile
(venv) sudipt@sudo-dev:~/Desktop/hydra-python-agent-gui$ python3 app.py
loading... of graph
creating entrypoint node
split entrypoint into 2 types of endpoints collection and classes
classes endpoint or accessing classes
accessing every collection in entrypoint
commiting
done!!!!
INFO:engineio.client:Attempting polling connection to http://localhost:8080/socket.io/?transport=polling&EIO=3
INFO:engineio.client:Polling connection accepted with {'sid': '095c603738b4483896e7f52854a7716e', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
@sudipt1999
sudipt1999 / Error
Last active February 22, 2020 17:37
Error While Running the command ```python3 app.py```
```
(venv) sudipt@sudo-dev:~/Desktop/hydra-python-agent-gui$ python3 app.py
Traceback (most recent call last):
File "/home/sudipt/Desktop/hydra-python-agent-gui/venv/lib/python3.6/site-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/home/sudipt/Desktop/hydra-python-agent-gui/venv/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/home/sudipt/Desktop/hydra-python-agent-gui/venv/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
const saveFile = (name, data) => {
return new Promise((resolve, reject) => {
fs.writeFile(name, data, function(err) {
if(err) {
console.log(err);
reject()
} else {
console.log("The file was saved!");
resolve()
}
const express = require('express')
const app = express()
const bodyParser = require('body-parser')
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())
const port = process.env.PORT || 8000
app.listen(port, ()=>{
console.log(`Server started at port ${port}`)
#code{
min-height: 40vh;
min-width: 50vw;
overflow-y: hidden;
resize: none;
}
#result{
min-width: 50vw;
min-height: 10vh;
resize: none;
@sudipt1999
sudipt1999 / App.js
Last active February 11, 2020 04:24
import React, { Component } from 'react'
import './Ide.css'
export default class App extends Component {
state={
code: "",
result: 'Submit Code to See Result',
lang: 'c++'
}
@sudipt1999
sudipt1999 / Ide.js
Last active February 10, 2020 15:16
onSubmitHandler = (e) => {
e.preventDefault()
alert("submit code")
axios.post(`http:localhost:8000/code/submit`,this.state)
.then(res=>{
console.log(res.data)
const data = res.data
if(data.err){
// Error in user code
this.setState({
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ul unsigned long long
void preprocess(int arr[], int n, vector<vector<int> >& cnt)
{
int i, j;
#include<bits/stdc++.h>
using namespace std;
#define MAX 1000000007
#define ll long long
#define ul unsigned long
const int max_size = 1e6+3;
vector<ll> adj[max_size];
map<ll, ll> beauty;
@sudipt1999
sudipt1999 / output
Last active January 20, 2020 06:08
image:
Binary {
_bsontype: 'Binary',
sub_type: 0,
position: 24810,
buffer:
<Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 78 00 78 00 00 ff e1 10 f4 45 78 69 66 00 00 4d 4d 00 2a 00 00 00 08 00 04 01 3b 00 02 00 00 00 0e 00 00 ... > }