Skip to content

Instantly share code, notes, and snippets.

View SkyrookieYu's full-sized avatar
🏠
Working from home

SkyrookieYu SkyrookieYu

🏠
Working from home
  • Taichung, Taiwan
View GitHub Profile
@SkyrookieYu
SkyrookieYu / client.py
Created March 11, 2023 16:16 — forked from kylehounslow/client.py
Send and receive images using Flask, Numpy and OpenCV
from __future__ import print_function
import requests
import json
import cv2
addr = 'http://localhost:5000'
test_url = addr + '/api/test'
# prepare headers for http request
content_type = 'image/jpeg'

利用ssh在本機連接到Server端執行jupyter notebook來撰寫python程式

tags: Linux,Jupyter,python

背景說明

現在因為各種人工智慧的發展趨勢所以Python也成為了許多人剛入門寫程式的主要語言,而很多學校的實驗室都有架自己的Server。 平常可能都是用自己的筆電在寫code,那如果只是跑一些小東西可能還好,但如果要訓練比較大型的程式的時候可能會讓你等的非常崩潰。

那有沒有想過,==也許可以在Server上運行Jupyter來寫Python呢?==

@SkyrookieYu
SkyrookieYu / gist:4812038e7bab015904982eefd045dbd3
Created July 12, 2022 03:58 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@SkyrookieYu
SkyrookieYu / progbarDownloader.py
Created February 16, 2021 17:17 — forked from abdalla-alothman/progbarDownloader.py
Simple PyQt Progress Bar Downloader
#!/usr/bin/python3
# This is downloading class which uses python 3 with PyQt4. It shows how to use the
# QT progress bar in python. The downloading takes place in the UrlDownloader class
# which inherits from QThread.
#
# To test the widget:
# 1. try copying a URL that points to a large file.
# 2. Paste the file url into the combobox's text area, but do nothing more.
# 3. Copy another URL pointing to a large file.
@SkyrookieYu
SkyrookieYu / webserver.CC
Created May 21, 2020 15:47 — forked from nicho-n/webserver.CC
webserver
#include <iostream> // cout, cerr, etc
#include <stdio.h> // perror
#include <string.h> // bcopy
#include <netinet/in.h> // struct sockaddr_in
#include <unistd.h> // read, write, etc
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <assert.h>
@SkyrookieYu
SkyrookieYu / HttpServer.cs
Created May 21, 2020 14:58 — forked from define-private-public/HttpServer.cs
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@SkyrookieYu
SkyrookieYu / SimpleHTTPServer.cs
Created May 21, 2020 11:39 — forked from aksakalli/SimpleHTTPServer.cs
SimpleHTTPServer in C#
// MIT License - Copyright (c) 2016 Can Güney Aksakalli
// https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.IO;
@SkyrookieYu
SkyrookieYu / i2c.c
Created May 3, 2020 13:33 — forked from JamesDunne/i2c.c
C library for reading/writing I2C slave device registers from Raspberry Pi 1 Model B
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <linux/i2c-dev.h>
// Terrible portability hack between arm-linux-gnueabihf-gcc on Mac OS X and native gcc on raspbian.
#ifndef I2C_M_RD
#include <linux/i2c.h>
#endif
@SkyrookieYu
SkyrookieYu / base64_buffer
Created February 21, 2020 07:18 — forked from wang-bin/base64_buffer
js base64 to ArrayBuffer
decode64: function decodeBase64(en) {
var de = new Uint8Array(en.length); //3/4
var u = 0, q = '', x = '', c;
var map64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
for (var r=0; c=en[x++]; ~c&&(u=q%4?u*64+c:c,q++%4)?de[r++]=(255&u>>(-2*q&6)):0)
c = map64.indexOf(c);
var sub = de.subarray||de.subset||de.slice;
return sub.call(de, 0, r);
},