Skip to content

Instantly share code, notes, and snippets.

View theeluwin's full-sized avatar
🍄
curseholic

Jamie J. Seol theeluwin

🍄
curseholic
View GitHub Profile
@slaysd
slaysd / initialize_jenkinsx.sh
Last active February 12, 2020 12:44
AWS EKS + Jenkins X 환경설치 스크립트
#!/bin/bash
CLUSTER_NAME={{TYPE YOUR CLUSTER NAME}}
REGION={{ TYPE YOUR AWS EKS REGION NAME }}
echo "AWS CLI 설치"
pip install awscli --upgrade --user
export PATH=$HOME/.local/bin:$PATH
echo 'export PATH=$HOME/.local/bin:$PATH' >> $HOME/.zshrc
@nix010
nix010 / base_crawler.py
Last active February 26, 2019 09:49
Crawl pictures from Pinterest by search a keyword | 26 Jan, 2018 (TESED )
from bs4 import BeautifulSoup as BS
import requests
class BaseCrawler(object):
api_url = None
default_headers = {
'Accept-Language' :'en-US,en,q=0.9,vi;q=0.8',
@mjdietzx
mjdietzx / pytorch-lambda-deploy.sh
Last active April 9, 2020 13:49
AWS Lambda pytorch deep learning deployment package (building pytorch and numpy from source on EC2 Amazon Linux AMI)
#
# written for Amazon Linux AMI
# creates an AWS Lambda deployment package for pytorch deep learning models (Python 3.6.1)
# assumes lambda function defined in ~/main.py
# deployment package created at ~/waya-ai-lambda.zip
#
#
# install python 3.6.1
#
@zhanwenchen
zhanwenchen / Install NVIDIA Driver and CUDA.md
Last active March 13, 2024 23:42 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
@Integralist
Integralist / Python TCP Client Example.py
Created September 18, 2016 15:07
Python TCP Client Server Example
import socket
hostname, sld, tld, port = 'www', 'integralist', 'co.uk', 80
target = '{}.{}.{}'.format(hostname, sld, tld)
# create an ipv4 (AF_INET) socket object using the tcp protocol (SOCK_STREAM)
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# connect the client
# client.connect((target, port))
sq2 :: Integer -> Integer -> [Integer]
sq2 left divider = let a = takeWhile (<= left) [(divider+i)*i | i<-[1..9]]
in if null a
then 0:sq2 (left*100) (divider*10)
else fromIntegral (length a):sq2 ((left - last a)*100) ((divider + fromIntegral (length a) * 2)*10)
main :: IO ()
main = print (sqrt (2 :: Double)) >> mapM_ (putStr . show) (sq2 2 0)
import z3
z3.init("some_path")
def flatten(v, i, j):
formula = 0
for k in range(0, j - i):
formula += pow(10, k) * v[j - k - 1]
return formula
@joseraya
joseraya / snapshot-crawler.js
Created January 21, 2014 20:15
A node script that crawls a web site and stores snapshots (taken with zombie.js) to the file system. Based on code from this article: http://www.ng-newsletter.com/posts/serious-angular-seo.html
var Browser = require('zombie'),
url = require('url'),
fs = require('fs'),
$q = require('Q'),
saveDir = __dirname + '/_snapshots';
var scriptTagRegex = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;
var stripScriptTags = function(html) {