Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
View web3-auth.sample.tsx
Working version of
import { ADAPTER_EVENTS, CHAIN_NAMESPACES, SafeEventEmitterProvider } from "@web3auth/base";
import { Web3Auth } from "@web3auth/web3auth";
import { OpenloginAdapter } from "@web3auth/openlogin-adapter";
import { useEffect, useState } from "react";
import "./App.css";
import RPC from "../../services/EVM";
ademidun /
Created Jan 6, 2022
Some thoughts on why I think Solana is overvalued
ademidun /
Created Jun 18, 2021
Load data from an external file and save to a database in Django and add some tests to the data loader functionality.
import csv
import gspread
from django.db.models import BooleanField
from google.oauth2.service_account import Credentials
from django.contrib.postgres.fields import ArrayField
from contact.models import Contact
ademidun / createTableOfContents.js
Last active Mar 16, 2022
Dynamically create table of contents using headings on a given page.
View createTableOfContents.js
* @param parentSelector: Where to insert the new table of contents.
* Leave blank if you only wnat to return the table of contents without
* automatically prepending to the parent component.
* @see:
* @see: Used in
export function createTableOfContents(parentSelector="") {
ademidun /
Created Dec 4, 2020
Austrian quant code snippet
def execute_trade(context,data):
Execute orders according to our schedule_function() timing.
Part of the Austrian Quant blog post:
Control + F "wordpress" to find the relevant part in the blog post.
prices = data.history(assets = context.stocks, bar_count = context.historical_bars, frequency='1d', fields='price')
for stock in context.stocks:
ademidun / useful-javascript-utils.js
Created Aug 5, 2020
Useful javascript utility functions to make your life easier.
View useful-javascript-utils.js
function prettifyKeys(rawKey) {
return toTitleCase(rawKey.replace(/_/g, ' ' ));
function toTitleCase(str) {
var i, j, lowers, uppers;
str = str.replace(/([^\W_]+[^\s-]*) */g, function(txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
ademidun /
Last active Jun 10, 2020
Austrian quant code snippet
This is a template algorithm on Quantopian for you to adapt and fill in.
@author: Tomiwa Ademidun
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC, LinearSVC, NuSVC
from sklearn.ensemble import RandomForestClassifier
ademidun /
Last active Sep 26, 2020
Set up Django on Cloud 9 or Fedora
ademidun / how-to-make-website.js
Created May 3, 2020
Code samples from my How to Make a website tutorial
View how-to-make-website.js
setTimeout( () => {
$( "#name-title" ).html( "<h1>🔥</h1>" );
}, 2000);