This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import Select, WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from time import sleep, strftime | |
def waituntil(s): | |
while strftime('%H:%M:%S') < s: | |
print strftime('%H:%M:%S') | |
sleep(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# update the TOKEN and the CHANNELID, rest is optional | |
# you may need to connect with a websocket the first time you run the bot | |
# use a library like discord.py to do so | |
curl -v \ | |
-H "Authorization: Bot TOKEN" \ | |
-H "User-Agent: myBotThing (http://some.url, v0.1)" \ | |
-H "Content-Type: application/json" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func addLevelPool(level int) { | |
if level > 9{ | |
panic("runtime error: index out of range") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slick.dbs.default.profile = "slick.jdbc.PostgresProfile$" | |
slick.dbs.default.db.driver = "org.postgresql.Driver" | |
slick.dbs.default.db.url = "jdbc:postgresql://localhost:5432/<db>" | |
slick.dbs.default.db.user = "<user>" | |
slick.dbs.default.db.password = "<password>" | |
slick.dbs.default.db.properties.ssl = "true" | |
slick.dbs.default.db.properties.sslmode = "verify-ca" | |
slick.dbs.default.db.properties.sslfactory = "org.postgresql.ssl.jdbc4.LibPQFactory" | |
slick.dbs.default.db.properties.sslpassword = "<pass>" // or comment out if no password on postgresql.pk8 | |
slick.dbs.default.db.properties.sslcert = "<path>/postgresql.crt" // the client certificate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# our first token to try out | |
token = "btc" | |
# the url for our token | |
url = f"https://web3api.io/api/v2/market/metrics/{token}/historical/sharpe" | |
# our API key | |
headers = {'x-api-key': api_key["AMBERDATA_API_KEY"]} | |
# the start and end of the period |