for i in $(ollama list); do name=`echo "$i" | grep ":"`; [[ ${name} != *":"* ]] || echo -e "\033[0;31m\033[1m$name\033[0m\033[0m\n`ollama show $name`" ; done
ollama list | tail -n +2 | awk '{print $1}' | xargs -I {} ollama pull {}
package main | |
import ( | |
"io" | |
"log" | |
"net" | |
"sync" | |
"github.com/denisenkom/go-mssqldb/msdsn" | |
) |
################## | |
''' | |
This script creates a proxy for mssql server. | |
1. You can start the mssql server using below docker commands - | |
docker pull mcr.microsoft.com/azure-sql-edge | |
docker run -e "ACCEPT_EULA=1" -e "MSSQL_SA_PASSWORD=password" -e "MSSQL_PID=Developer" -e "MSSQL_USER=sa" -p 1433:1433 -d --name=sql mcr.microsoft.com/azure-sql-edge | |
2. In new terminal, just copy below script and run it as `python mssql_proxy_tds.py` |
for i in $(ollama list); do name=`echo "$i" | grep ":"`; [[ ${name} != *":"* ]] || echo -e "\033[0;31m\033[1m$name\033[0m\033[0m\n`ollama show $name`" ; done
ollama list | tail -n +2 | awk '{print $1}' | xargs -I {} ollama pull {}
$script = <<-SCRIPT
echo "Provisioning..."
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4052245BD4284CDD
echo "deb https://repo.iovisor.org/apt/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/iovisor.list
sudo apt-get update
sudo apt-get -y install bcc-tools libbcc-examples linux-headers-$(uname -r)
SCRIPT
Python example
print("Hello, world!")
import imaplib | |
import email | |
# Gmail IMAP server details | |
IMAP_SERVER = "imap.gmail.com" | |
IMAP_PORT = 993 | |
# Gmail account credentials | |
EMAIL = "[email protected]" | |
PASSWORD = "your_password" |
from logging import Logger | |
import requests | |
import time | |
import datetime | |
import random | |
from multiprocessing import Process, Lock | |
# proxy server details comes from | |
# https://github.com/themiralay/Proxy-List-World | |
# https://github.com/vakhov/fresh-proxy-list |
When I mark a field in graphql schema as non-mandatory, the struct generated model contains pointers instead of actual variable.
Graphql Schema | Generated Struct |
---|---|
input NewTodo { text: String userId: String } |
type NewTodo struct { Text *string json:"text" UserID *string json:"userId" } |
When the field is marked as mandatory,
| Graphql Schema | Generated Struct |
from scapy.all import * | |
import time | |
ip = IP(dst='127.0.0.127', src='10.99.99.99') | |
udp = UDP(sport=321,dport=123) | |
payload = '\x01\x0f' | |
packet = ip/udp/payload | |
send(packet) | |
while(True): |
srcdir="/tmp"; inotifywait -e close_write --format "%f" --monitor $srcdir | | |
while IFS= read -r line | |
do | |
echo $line | |
cp "$srcdir/$line" . #this would not replicate directories | |
# tar cf - "$line" | tar -C destination/ xf - #this should replicate directories | |
done |