Skip to content

Instantly share code, notes, and snippets.

View chc1129's full-sized avatar
💭
I may be slow to respond.

chc1129 chc1129

💭
I may be slow to respond.
View GitHub Profile
@chc1129
chc1129 / posgreInsert.py
Created June 13, 2021 13:11
PostgresSQL INSERT
import psycopg2
connection = psycopg2.connect(
host='localhost',
database='userdb',
user='user',
password='1006')
cur = connection.cursor()
@chc1129
chc1129 / postgresConect.py
Created June 13, 2021 11:42
PostgresSQL接続
import psycopg2
connection = psycopg2.connect(
host='localhost',
database='userdb',
user='user',
password='password')
cur = connection.cursor()
@chc1129
chc1129 / quereyParse.py
Created June 6, 2021 16:17
クエリをParse
from urllib.parse import urlparse, parse_qs
# Google検索 桜
prs = urlparse('https://www.google.com/search?q=%E6%A1%9C&oq=%E6%A1%9C&aqs=chrome..69i57j0i131i433j0j0i433j0j0i433l3j0i131i433j0i433.1280j0j7&sourceid=chrome&ie=UTF-8')
print( "URLをParse" )
print( prs )
print("")
@chc1129
chc1129 / .gitignore
Created February 28, 2021 15:00 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@chc1129
chc1129 / sendPrg.c
Created June 24, 2018 16:50
Unixドメイン Socket クライアントプログラム
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#define BUF_SIZE 128
@chc1129
chc1129 / recvPrg.c
Created June 24, 2018 16:47
Unixドメイン Socket サーバープログラム
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#define BUF_SIZE 128