Simple fibonacci number calculator.
Usage: fib nth Fibonacci number
| //environment: Neo4j Desktop 1.2.7, Neo4j Enteprise 3.5.17, apoc 3.5.0.9, gds 1.1.0 | |
| //or: Neo4j Enterprise 4.0.3, apoc 4.0.0.6 (NOT later! a bug in apoc.coll.max/apoc.coll.min needs to be resolved) | |
| //contact tracing data import | |
| //full spreadsheet with synthetic data | |
| //https://docs.google.com/spreadsheets/d/1R-XVuynPsOWcXSderLpq3DacZdk10PZ8v6FiYGTncIE/edit#gid=0 | |
| // person sheet˝ | |
| // https://docs.google.com/spreadsheets/u/0/d/1R-XVuynPsOWcXSderLpq3DacZdk10PZ8v6FiYGTncIE/export?format=csv&id=1R-XVuynPsOWcXSderLpq3DacZdk10PZ8v6FiYGTncIE&gid=0 |
| # TODO: replace :token, :user, and :repo | |
| curl -H "Authorization: token :token" \ | |
| -H 'Accept: application/vnd.github.everest-preview+json' \ | |
| "https://api.github.com/repos/:user/:repo/dispatches" \ | |
| -d '{"event_type": "awesomeness", "client_payload": {"foo": "bar"}}' |
| import datetime | |
| original_timestamp = datetime.datetime.now() | |
| # Convert datetime object to a string representation | |
| timestamp_string = original_timestamp.strftime("%Y-%m-%dT%H:%M:%S%z") | |
| print(timestamp_string) | |
| # OUTPUT: 2019-08-17T00:00:00+0000 | |
| # Add a colon separator to the offset segment |
| public class Unimodal { | |
| public static void unimodal(int a[],int l,int h) | |
| { | |
| int mid = (l+h)/2; | |
| if(a[mid] < a[mid+1]) | |
| { | |
| if(a[mid+1] > a[mid+2]) | |
| { | |
| System.out.println("The max element is : "+a[mid+1]); |
A Pen by Andrew Collins on CodePen.
| from stocks import wsgi | |
| from django.core.exceptions import ObjectDoesNotExist | |
| from api.models import Stock, Company | |
| import csv | |
| csvpath = r'prices.csv' | |
| batch_size = 500 | |
| t1 = time.time() |
We have been moved for better. Look Here for an Updated Version. People are also contributing there for making it more beautiful. See you there!!!
| (() => { | |
| /** | |
| * Fill gaps of an array | |
| * @param {Object} sourceArray - The source array to compare to | |
| * @param {Object} targetArray - The target array to fill the gap | |
| * @param {string} Filler - The element to be used to fill the gap | |
| */ | |
| let similarFill = ((sourceArray, targetArray, filler) => { | |
| let pos = 0; | |
| for (let i = 0; i < targetArray.length; i++) { |
| import datetime | |
| import os | |
| import string | |
| import tarfile | |
| import shutil | |
| import boto # you need to install "boto" == 'sudo pip install boto' | |
| from boto.s3.connection import S3Connection | |
| from boto.s3.key import Key | |
| from datetime import timedelta |