This file contains hidden or 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
import base64 | |
import hashlib | |
import requests | |
class TypingDNA: | |
def __init__(self, apiKey, apiSecret): | |
self.apiKey = apiKey | |
self.apiSecret = apiSecret | |
self.base_url = "https://api.typingdna.com" |
This file contains hidden or 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
import time | |
import requests | |
from bs4 import BeautifulSoup | |
bot_token = "" | |
chat_id = "" | |
def get_coin_stats(coin): | |
r = requests.get(f"https://www.coingecko.com/en/coins/{coin.lower()}") |
This file contains hidden or 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
function saveContacts() { | |
var contacts = document.querySelectorAll("._ccCW.FqYAR.i0jNr"); | |
for (var i = 0; i < contacts.length; i++) { | |
var contact_name = contacts[i].title; | |
if (contact_name[0] == "+" && unsaved_contacts.find(e => e == contact_name) == null) { | |
unsaved_contacts.push(contact_name); | |
} | |
} |
This file contains hidden or 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
public class Luhn { | |
public static boolean isValid(String number) { | |
boolean isCardTypeValid = prefixMatched(number, "4") || prefixMatched(number, "5") || prefixMatched(number, "37") || prefixMatched(number, "6"); | |
if (!isCardTypeValid) { | |
return false; | |
} | |
int evenPlaceSum = sumOfDoubleEvenPlace(number); | |
int oddPlaceSum = sumOfOddPlace(number); | |
int totalSum = evenPlaceSum + oddPlaceSum; |
This file contains hidden or 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 flask import Flask | |
from flask_restful import Api, Resource, reqparse, fields, marshal_with, abort | |
app = Flask(__name__) | |
api = Api(app) | |
TODOS = {} | |
parser = reqparse.RequestParser() | |
parser.add_argument( | |
"task", |
This file contains hidden or 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 flask import * | |
from LoginRadius import LoginRadius as LR | |
app = Flask(__name__) | |
app.config["SECRET_KEY"] = "SECRET_KEY" | |
LR_AUTH_PAGE = "https://<APP_NAME>.hub.loginradius.com/auth.aspx?action={}&return_url={}" | |
LR.API_KEY = "LR_API_KEY" | |
LR.API_SECRET = "LR_API_SECRET" | |
loginradius = LR() |
This file contains hidden or 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 sequences | |
import ( | |
"errors" | |
"math" | |
) | |
func calcNextSequence(a, b, c float64, n int, apSeq bool) (float64, error) { | |
if apSeq { | |
if c - b != b - a { |
This file contains hidden or 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 | |
import ( | |
"context" | |
"fmt" | |
"github.com/portto/solana-go-sdk/client" | |
"github.com/portto/solana-go-sdk/client/rpc" | |
"github.com/portto/solana-go-sdk/common" | |
"github.com/portto/solana-go-sdk/program/sysprog" | |
"github.com/portto/solana-go-sdk/types" |
This file contains hidden or 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
import json | |
import requests | |
from bs4 import BeautifulSoup | |
def fetch_coingecko_html(): | |
# make a request to the target website | |
r = requests.get("https://www.coingecko.com") | |
if r.status_code == 200: | |
# if the request is successful return the HTML content |
This file contains hidden or 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 | |
import ( | |
"crypto/sha256" | |
"encoding/json" | |
"fmt" | |
"strconv" | |
"strings" | |
"time" | |
) |