When it comes to python development it can be difficult to know which websites to focus on for the best up-to-date information. Below is a list of go-to websites for all the latest and greatest python information:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"os" | |
"log" | |
"path/filepath" | |
"strings" | |
) | |
func findFolderLike(dir string, match string) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.io.IOUtils; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.annotation.*; | |
import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; | |
import java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
@Controller | |
public class StreamControllerExample { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 0 ] | |
then | |
echo "./installCertificate.sh <HOSTNAME> <PORT>" | |
exit | |
fi | |
HOSTNAME=$1 | |
PORT=$2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "net/http" | |
func main() { | |
mainMux := http.NewServeMux() | |
mainMux.HandleFunc("/speak", func(res http.ResponseWriter, req *http.Request) { | |
if req.Method == "GET" { | |
res.Write([]byte("Hello, World!\n")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker pull docker.bintray.io/jfrog/artifactory-oss:latest | |
docker run --name artifactory -d -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss | |
# In browser open http://localhost:8081 and follow basic steps | |
# Add new remote repository: http://localhost:8081/artifactory/webapp/#/admin/repositories/remote | |
# URL: https://registry.npmjs.org | |
# RepositoryLayout: NPM default | |
# Add new virtual repository of type "Generic" using remote repository above |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import re | |
import argparse | |
import requests | |
jenkins_url = "https://localhost:8080" | |
# Add new jobs here: | |
jobs = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- -*- indent-tabs-mode:t; -*- --> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Reveal Example Slides</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> | |
<link rel="stylesheet" href="./reveal.js/css/reveal.css"/> | |
<link rel="stylesheet" href="./reveal.js/css/theme/night.css" id="theme"/> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nip.io supports the use of wildcards when setting host ip addresses (e.g. *.nip.io) | |
Some routers do not support DNS for nip.io support. To fix set 8.8.8.8 and 8.8.4.4 as your DNS entry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import argparse | |
# Constants | |
PIP_HOST = "artifactory.my.domain.com" | |
PIP_URL = "http://%s/artifactory/api/pypi" % PIP_HOST | |
def setup_pypric(args): | |
fullpath = "%s/.pypirc" % args.userhome |