Skip to content

Instantly share code, notes, and snippets.

View CutePikachu's full-sized avatar
πŸ’­
I may be slow to respond.

Tina Ji CutePikachu

πŸ’­
I may be slow to respond.
View GitHub Profile
# Q1
connection = psycopg2.connect(ConnectionParameters)
conn = psycopg2.connect("dbname=mydb")
conn = psycopg2.connect(database="mydb")
conn = psycopg2.connect("user=jas password=abc123 dbname=mymydb")
conn = psycopg2.connect("host=db.server.org port=5432 dbname=mymydb")
cursor = connection.cursor()
cursor.execute("SQL Query")
List curr = L;
List prev = NULL;
List next = NULL;
while (curr) {
next = cur->nerxt;
curr->next = prev;
prev = curr;
curr = next;
}
return prev;
<style>
.yooo{
height: 200px;
max-width: 300px;
min-width: 90px;
border: 5px dotted black;
overflow: hidden;
padding: 20px;
margin: 20px 20px 40px 50px;
background-color: darkseagreen;
@CutePikachu
CutePikachu / πŸ“Š Weekly development breakdown
Last active October 29, 2020 15:35
Weekly development breakdown
Vue.js 3 hrs 33 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 48.5%
SQL 1 hr 53 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 25.8%
JavaScript 1 hr 30 mins β–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 20.6%
C# 18 mins β–Šβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 4.1%
JSON 4 mins ▏░░░░░░░░░░░░░░░░░░░░ 1.0%
# # hello.s ... print "Hello, MIPS"
# .data # the data segment
# msg: .asciiz "Hello, MIPS\n"
# .text # the code segment
# main:
# la $a0, msg # load the argument string
# li $v0, 4 # load the system call (print)
int a = 10;// decimal 10
int b = 0b10;// binary 10
int c = 010; // oct 10
int d = 0x10;// hex 10
int e = 9;
printf("%d\n", a & d);
/*
0xFF
typedef struct stack {
int *list;
int length;
int currItem;
}*Stack;
void init(Stack new) {
new = malloc(sizeof(new));
new->list = malloc(sizeof(int * 100));
new->length = 100;
from pandas import DataFrame
from pandas import Series
from pandas import concat
from pandas import read_csv
from pandas import datetime
from sklearn.metrics import mean_squared_error
from sklearn.preprocessing import MinMaxScaler
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
-- COMP3311 19T3 Assignment 2
--
-- check.sql ... checking functions
--
-- Written by: John Shepherd, September 2012
-- Updated by: Hayden Smith, October 2019
--
--
-- Helper functions