แนะนำ สอบถาม ภาษา C สำหรับผู้เริ่มต้น ภาษา Java ภาษา Python
Moderator: mindphp, ผู้ดูแลกระดาน
-
jirawoot
- PHP VIP Members
- โพสต์: 3129
- ลงทะเบียนเมื่อ: 17/06/2019 10:30 am
โพสต์ที่ยังไม่ได้อ่าน
โดย jirawoot »
ตอนนี้ผมดึงไฟล์ project จาก api ของ gitlab ได้แล้วทำอย่างไรต่อครับ
โค้ด: เลือกทั้งหมด
import requests
from zipfile import ZipFile
re = requests.get('http://gitlab.example.com/api/v4/projects/254/repository/archive.zip?private_token=xxxxxxx')
print type(re.content)
with open('archive.zip', 'wb') as f:
f.write(re.content)
f.close()
# zip_test = ZipFile('sample.zip', 'w')
# zip_test.write(re.content)
# zip_test.close()
with ZipFile('archive.zip', 'r') as zipObj:
print dir(zipObj)
print zipObj.comment
zipObj.extractall()
- C++ & java & Python-1.png (20.95 KiB) Viewed 1833 times
-
tsukasaz
- PHP VIP Members
- โพสต์: 21991
- ลงทะเบียนเมื่อ: 18/04/2012 9:39 am
โพสต์ที่ยังไม่ได้อ่าน
โดย tsukasaz »
ไปสร้างไฟล์ .gitlab-ci.yml ในโปรเจค เพื่อให้ตัว ci ทำงาน โดยการทำงานของ ci ให้ไปเรียก script ที่เราเขียนไว้
ตัวอย่างสำหรับ phpโค้ด: เลือกทั้งหมด
stages:
- upload
# Select image from https://hub.docker.com/_/php/
image: php:latest
before_script:
- apt-get update && apt-get install -qqy git unzip wget
job1:
stage: upload
script: curl http://abc.com/script.php
The last bug isn't fixed until the last user is dead. (Sidney Markowitz, 1995)
-
tsukasaz
- PHP VIP Members
- โพสต์: 21991
- ลงทะเบียนเมื่อ: 18/04/2012 9:39 am
โพสต์ที่ยังไม่ได้อ่าน
โดย tsukasaz »
ใช่ครับ
The last bug isn't fixed until the last user is dead. (Sidney Markowitz, 1995)
-
-
- 3 ตอบกลับ
- 3579 แสดง
-
โพสต์ล่าสุด โดย mindphp
02/02/2022 11:13 am
-
-
- 2 ตอบกลับ
- 2477 แสดง
-
โพสต์ล่าสุด โดย mindphp
08/09/2020 8:56 pm
-
-
- 0 ตอบกลับ
- 1859 แสดง
-
โพสต์ล่าสุด โดย makup
11/10/2020 2:29 pm
-
-
- 0 ตอบกลับ
- 1066 แสดง
-
โพสต์ล่าสุด โดย jirawoot
01/04/2020 3:38 pm
-
-
- 1 ตอบกลับ
- 836 แสดง
-
โพสต์ล่าสุด โดย jirawoot
19/05/2020 7:33 pm
-
-
- 4 ตอบกลับ
- 562 แสดง
-
โพสต์ล่าสุด โดย Tookta
03/02/2023 11:38 am
-
-
- 1 ตอบกลับ
- 1096 แสดง
-
โพสต์ล่าสุด โดย jirawoot
31/03/2020 5:35 pm
สมาชิกกำลังดูบอร์ดนี้: Google Adsense [Bot] และบุคลทั่วไป 93