Skip to content

Instantly share code, notes, and snippets.

View arsho's full-sized avatar

Ahmedur Rahman Shovon arsho

View GitHub Profile
@rvanbruggen
rvanbruggen / 1-contacttracing-import.cql
Last active August 18, 2022 16:11
Contact tracing example #cypher #neo4j
//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
@ciiqr
ciiqr / dispatch.sh
Last active May 3, 2024 19:47
github actions, repository_dispatch with client_payload
# 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"}}'
@mattstibbs
mattstibbs / put_colon_in_offset.py
Created August 17, 2019 16:00
Add a colon to timezone offset when using datetime.strftime
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
@viniru
viniru / Unimodal.java
Created May 28, 2018 09:10
You are a given a unimodal array of n distinct elements, meaning that its entries are in increasing order up until its maximum element, after which its elements are in decreasing order. Give an algorithm to compute the maximum element that runs in O(log n) time
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]);
@Attila03
Attila03 / FK.py
Created February 19, 2018 05:37
Django bulk insert with Foreign Key
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()
@nuhil
nuhil / js.md
Last active November 20, 2021 18:06
Javascript Handbook
@entrptaher
entrptaher / array_splice.js
Last active July 17, 2017 06:08 — forked from arsho/array_splice.js
Array splice implementation to convert an existing array to target array
(() => {
/**
* 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++) {
@ratulbasak
ratulbasak / sqlite_bck.py
Created July 12, 2017 07:01
sqlite3 database backup to s3 in a specific bucket
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
Hi Anmol,
I am Reihaneh. I found your contact information on GitHub. I am contacting you because of your very high contribution on GitHub... 2523 contributions…
I am doing my PhD at Queensland University of Technology, Australia. I am doing research on user engagement on co-creation networks such as GitHub. For the purpose of my research, I need to interview people who are actively using GitHub. Would you be interested in undertaking an interview over Skype about your contribution on GitHub? You can read more in the attached ethics form. Please contact me if you are keen.
This study has been approved by the QUT Human Research Ethics Committee (approval number 1500000502).
Many thanks for your consideration of this request.
Kind regards,