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
import java.io.ByteArrayInputStream; | |
import java.io.Console; | |
import java.util.List; | |
import jdk.jshell.*; | |
import jdk.jshell.Snippet.Status; | |
class ExampleJShell { | |
public static void main(String[] args) { | |
Console console = System.console(); | |
try (JShell js = JShell.create()) { |
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 | |
echo "Add the following to your ~/.bashrc file and run 'source ~/.bashrc'" | |
alias jshell=`echo $(/usr/libexec/java_home)`/bin/jshell |
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 | |
echo "Install MiniShift on MacOS: " | |
echo " Note: assumes machine not pre-setup with prerequisites!!!" | |
brew update | |
echo "Install Homebrew Casks:" | |
brew install caskroom/cask/brew-cask |
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 |
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
<!-- -*- 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
#!/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
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
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")) |