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 csv | |
import time | |
import torch | |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig | |
P1 = """Please act as an expert Python software engineer. | |
Given the function below, generate a complete and professional Google-style docstring. | |
The docstring should not include any extra commentary, only |
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 psycopg2 | |
from psycopg2 import OperationalError | |
def connect_to_database(dbname, user, password, host='localhost', port=5432): | |
conn = psycopg2.connect( | |
dbname=dbname, | |
user=user, | |
password=password, | |
host=host, |
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
Letter | Uppercase | Lowercase | |
---|---|---|---|
Alpha | Α | α | |
Beta | Β | β | |
Gamma | Γ | γ | |
Delta | Δ | δ | |
Epsilon | Ε | ε | |
Zeta | Ζ | ζ | |
Eta | Η | η | |
Theta | Θ | θ | |
Iota | Ι | ι |
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
$fso = new-object -com Scripting.FileSystemObject | |
gci -Directory ` | |
| select @{l='Size'; e={$fso.GetFolder($_.FullName).Size}},FullName ` | |
| sort Size -Descending ` | |
| ft @{l='Size [MB]'; e={'{0:N2} ' -f ($_.Size / 1MB)}},FullName |
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
# Substitute the drive on which you | |
# want WSL to be installed if not D: | |
Set-Location D: | |
# Create a directory for WSL and change to it: | |
New-Item WSL -Type Directory | |
Set-Location .\WSL | |
# Install 22.04 from https://docs.microsoft.com/en-us/windows/wsl/install-manual#downloading-distributions | |
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2204 -OutFile Linux.appx -UseBasicParsing |
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
def parseWordDocument(String filePath) { | |
// Splitting filename from URL | |
def fileName = filePath.substring(filePath.lastIndexOf("/") + 1, filePath.size()) | |
File file = null | |
if (Files.isReadable(Paths.get(fileName))){ | |
println("[LOADING FROM CACHE]: " + filePath) | |
file = new File(fileName) | |
} else { |
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 java.util.Arrays; | |
import java.util.List; | |
/** | |
* Project: AdvancedJava | |
* Author: AFIF AL MAMUN | |
* Created in 10/12/20 | |
* Web: https://afifaniks.me | |
*/ | |
class DataHolderClass{ |
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
//Author: Afif | |
#include <bits/stdc++.h> | |
using namespace std; | |
int table[20][20]; char dir[20][20]; | |
int 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
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int main() | |
{ | |
int t; | |
double arr[10], per[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
/*Afif | |
20 March, 2017 | |
EVALUATING POSTFIX EXPRESSION WITH STACK | |
*/ | |
#include <stdio.h> | |
#define SZ 50 | |
int top=-1, stk[SZ]; |
NewerOlder