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
sudo apt install libcurl4-openssl-dev | |
mkdir build | |
cd build/ | |
CXX=g++-10 cmake -DLLAMA_NATIVE=OFF -DLLAMA_AVX=OFF -DLLAMA_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DLLAMA_ACCELERATE=OFF -DLLAMA_METAL=OFF -DLLAMA_CUBLAS=OFF -DLLAMA_CURL=ON .. | |
make -j4 |
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
<?php | |
use Magento\Framework\App\Bootstrap; | |
// Validate input parameters | |
if ($argc < 3) { | |
die("Usage: php remove_attributes.php <attribute_set_id> <attribute_code1> [attribute_code2] ...\n"); | |
} | |
$attributeSetId = (int)$argv[1]; | |
$attributeCodes = array_slice($argv, 2); |
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
<?php | |
use Magento\Framework\App\Bootstrap; | |
// Initialize Magento | |
require __DIR__ . '/app/bootstrap.php'; | |
$bootstrap = Bootstrap::create(BP, $_SERVER); | |
$objectManager = $bootstrap->getObjectManager(); | |
// Get resource connection | |
$resource = $objectManager->get(\Magento\Framework\App\ResourceConnection::class); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Team Member Evaluation</title> | |
<style> | |
body { | |
padding: 10%; |
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 yfinance as yf | |
import pandas as pd | |
from datetime import datetime, timedelta | |
# Define the ticker symbol | |
ticker_symbol = "TSLA" | |
# Calculate the date from 3 years ago | |
end_date = datetime.today().strftime('%Y-%m-%d') | |
start_date = (datetime.today() - timedelta(days=3*365)).strftime('%Y-%m-%d') |
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 pandas as pd | |
# Load the data from the CSV file | |
data = pd.read_csv("TSLA_3_years_data.csv") | |
# Initialize variables | |
total_shares = 0 | |
cumulative_cost = 0.0 | |
total_profit = 0.0 | |
data['Yesterday_Close'] = data['Close'].shift(1) |
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 binance.client import Client | |
def get_binance_exchange_info(): | |
client = Client() | |
info = client.get_exchange_info() | |
for c in info['symbols']: | |
if c['quoteAsset']=='USDT' and c['status']=="TRADING": | |
print(c['symbol']) | |
if __name__ == "__main__": |
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
<VirtualHost *:80> | |
# Name for your virtualhost | |
ServerName mailhog.myawesomedomain.com | |
# Proxy config | |
ProxyPreserveHost On | |
ProxyRequests Off | |
# Websocket proxy needs to be defined first | |
ProxyPass "/api/v2/websocket" ws://localhost:8025/api/v2/websocket |
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 readline; print('\n'.join([str(readline.get_history_item(i + 1)) for i in range(readline.get_current_history_length())])) |
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 selenium import webdriver | |
chromdriver_path='/path/to/chromedriver' | |
PROXY = "socks5://localhost:9050" | |
options = webdriver.ChromeOptions() | |
options.add_argument('--proxy-server=%s' % PROXY) | |
driver = webdriver.Chrome(chrome_options=options, executable_path=chromdriver_path) | |
driver.get("http://check.torproject.org") |
NewerOlder