Skip to content

Instantly share code, notes, and snippets.

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

Oyetoke Tobiloba CITGuru

🏠
Working from home
View GitHub Profile
import math
def solution(area):
a = []
while area >= 1 and area <=10000000:
square = math.pow(math.floor(math.sqrt(area)), 2)
area = area - square
a.append(int(square))
return a
print(solution(12))
let panelsArrangement = []
const ucheSolution = (area) => {
// Uchenna Jeremiah
// https://gist.github.com/ucejtech/74a7b9f408e0f5081ea2c6ac63140764
'use strict'
if (area >= 1 && area <= 1000000) {
import timeit
print("GeekyAdams")
print("https://gist.github.com/GeekyADAMS/85af9d7de96b37688ef432bcfe499b6c")
code_to_test = """
from math import sqrt, pow
def solution(area):
function nebsochiSolution($n)
{
$squares = $n == 1 ? 1 : ($n == 0 ? null : pow(floor(sqrt($n)), 2).','.nebsochiSolution($n - pow(floor(sqrt($n)), 2)));
return rtrim($squares,',');
}
function SetThingsStraight($No){
$Results = [];
for($i = 1; $i <= $No; $i++){
$p = $i * $i;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#accordion-wrapper{
margin-top: 20px;
const webdriver = require('selenium-webdriver'),
By = webdriver.By,
until = webdriver.until;
const driver = new webdriver.Builder()
.forBrowser('chrome')
.build();
const URL ='http://svelte3-todo.surge.sh/'
const URL ='http://localhost:5000/'
driver.get(URL).then(function(){
@CITGuru
CITGuru / mocha_test.js
Created April 23, 2020 12:57
Mocha Selenium Frontend Testing
var assert = require('assert')
const webdriver = require('selenium-webdriver');
const URL = "http://svelte3-todo.surge.sh/"
// const URL = "http://localhost:5000"
describe('Svelte Todo App Test', function() {
var driver;
before(function() {
driver = new webdriver.Builder()
const webdriver = require('selenium-webdriver');
const { until } = require('selenium-webdriver');
const { By } = require('selenium-webdriver');
const assert = require('assert');
describe('webdriver', () => {
let driver;
before(async () => {
driver = new webdriver.Builder().forBrowser('chrome')
.build();
<html lang="en" class="js-focus-visible"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>GoldenSuperNG - Homepage</title>
<link href="assets/style.css" rel="stylesheet">
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
</head>
<body data-gr-c-s-loaded="true">
<header class="text-center p-2" style="font-size: 60px">
@CITGuru
CITGuru / User.js
Last active January 26, 2020 08:14
User Schema Model : Plain
const mongoose = require("mongoose");
const validator = require("validator");
const bcrypt = require("bcrypt");
const uuid = require("uuid");
const { Schema } = mongoose;
const UserSchema = new Schema({
first_name: {
type: String,
required: false