Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
""" | |
This code will fetch all trading pairs in Binance Futures, and generate a file named binance_futures.txt which is ready | |
to be imported into TradingView as a list of all Binance Futures trading pairs to monitor. | |
If the snippet is run on Google Colab, it will download the file we wrote to. Please note that as of today 6/12/2022 fetching Binance API | |
is not possible from Google Colab and so it will fail, this is Binance restricting by Google Colab's IP access. | |
""" | |
import requests |
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
""" | |
References: | |
- https://developer.twitter.com/en/docs/twitter-api/tweets/counts/quick-start/recent-tweet-counts | |
- https://developer.twitter.com/en/docs/twitter-api/tweets/counts/introduction | |
- https://stackoverflow.com/questions/79797/how-to-convert-local-time-string-to-utc | |
- https://stackoverflow.com/questions/12468823/python-datetime-setting-fixed-hour-and-minute-after-using-strptime-to-get-day | |
- https://www.folkstalk.com/2022/10/1-day-ago-python-datetime-with-code-examples.html | |
- https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators |
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
""" | |
This snippet illustrates the usage of the __call__() magic method, how it can be used to solve a real problem. | |
Please read code comments for further details. | |
""" | |
import asyncio | |
import binance | |
from autobahn.asyncio import WebSocketClientProtocol, WebSocketClientFactory | |
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
#!/usr/bin/env python3 | |
import argparse | |
from typing import List | |
# https://stackoverflow.com/questions/31306951/how-to-sort-a-list-by-last-character-of-string | |
def last_letter(word): | |
return word[::-1] | |
def run(file_paths: List[str], output_path: str, sort=False,reverse=False, quiet=False): | |
if sort: |
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
param( | |
[Parameter(Mandatory = $false)][switch]$Linux = $False, | |
[switch]$Move = $false, | |
[switch]$Arm = $false, | |
[switch]$Alpine = $false | |
) | |
# Do not forget to replace "app" by the project name | |
# Example usage: | |
# - Build for current OS and architecture and move to $GOPATH/bin | |
# pwsh build.ps1 -Linux -Move |
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
spring: | |
application: | |
name: rest-server | |
eureka: | |
client: | |
serviceUrl: | |
defaultZone: http://localhost:8761/eureka | |
instance: | |
preferIpAddress: true |
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 com.melardev.cloud.rest; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | |
@SpringBootApplication | |
@EnableDiscoveryClient | |
public class RestApplication { |