Skip to content

Instantly share code, notes, and snippets.

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

Alex Radu dragosthealex

🏠
Working from home
View GitHub Profile
@dragosthealex
dragosthealex / historical_nasdaq_ticker.py
Last active September 28, 2021 12:14
Get historical daily data from NASDAQ by ticker
import requests
import json
import pandas as pd
import datetime
def get_from_nasdaq(ticker, date_from=None, date_to=None) -> pd.DataFrame:
"""Return historical daily data for ticker from NASDAQ
Args:

How To Clone Scrypt Based Altcoins for Fun and Profit

Wait a second, why would you want to give out the secrets?!? Because its not a secret anymore and besides, why shouldn't everyone and their neighbors be able to create a plethora of these useless yet exciting math bits? The information in this article took me a few weeks to compile and what works for me is not guaranteed to work for you. Please use this guide as a starting point to learn a bit about C programming and compiling software.

#!/bin/bash
# Check if the local exteran IP of this machine is the same as the one that
# our website's domain points to.
# Used together with update_godaddy_dns.py to update the website DNS record with the new one
# Usage: replace MY_WEBSITE with the actual website address
RIP="$(dig +short myip.opendns.com @resolver1.opendns.com)"
CIP=`nslookup MY_WEBSITE | grep Address: | awk 'NR==2 {print $2}'`
echo "$RIP"
@dragosthealex
dragosthealex / update_godaddy_dns.py
Created March 4, 2017 16:37
Updates a GoDaddy DNS record (requires godaddypy module)
#!/usr/bin/python
import sys
import argparse
from godaddypy import Client, Account
KEY = 'my key'
SECRET = 'my secret'
def update(client, new_ip='127.0.0.1', domain_no=0):
dom = client.get_domains()[domain_no]