Skip to content

Instantly share code, notes, and snippets.

View dsapandora's full-sized avatar
🏠
Working from home

Ariel Vernaza dsapandora

🏠
Working from home
View GitHub Profile
@dsapandora
dsapandora / demo_drone.py
Created August 15, 2022 12:47
Demo Drone parrot
import pygame
from pyardrone import ARDrone
def main():
pygame.init()
W, H = 320, 240
screen = pygame.display.set_mode((W, H))
drone = ARDrone()
from flask import Flask
import socketio
import eventlet
from keras.models import load_model
import tensorflow as tf
import base64
from io import BytesIO
from PIL import Image
import numpy as np
import cv2
from math import inf
from bisect import bisect_left as bLeft, bisect_right as bRight
from collections import defaultdict
def getHealth(seq, first, last, largest):
h, ls = 0, len(seq)
for f in range(ls):
for j in range(1, largest+1):
if f+j > ls:
import h5py
import os
import requests
import numpy as np
DOWNLOADS_DIR = <folder>
username=<user>
password=<Password>
country = <filename>
i= 0
@dsapandora
dsapandora / version.cpp
Created April 14, 2020 00:04
Swap Kth node from beginning with Kth node from end in a Linked List
// A C++ program to swap Kth node from beginning with kth node from end
#include <bits/stdc++.h>
using namespace std;
// A Linked List node
struct Node
{
int data;
struct Node *next;
};
@dsapandora
dsapandora / version.cpp
Created April 13, 2020 19:32
Level Order Tree Traversal
/* C++ program to print level order traversal using STL */
#include <bits/stdc++.h>
using namespace std;
// A Binary Tree Node
struct Node
{
int data;
struct Node *left, *right;
};
@dsapandora
dsapandora / version.cpp
Last active April 13, 2020 05:04
Arrange given numbers to form the biggest number
// Given an array of numbers, program to arrange the numbers to form the
// largest number
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
// A comparison function which is used by sort() in printLargest()
int myCompare(string X, string Y)
@dsapandora
dsapandora / version.cpp
Last active April 13, 2020 04:26
The Celebrity Problem
// C++ program to find
// celebrity in O(n) time
// and O(1) extra space
#include <bits/stdc++.h>
using namespace std;
// Max # of persons in the party
#define N 8
// Person with 2 is celebrity
@dsapandora
dsapandora / version.cpp
Created April 13, 2020 03:31
Print a Binary Tree in Vertical Order
#include <iostream>
using namespace std;
// A node of binary tree
struct Node
{
int data;
struct Node *left, *right;
};