As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
#Sample pip requirements.txt file from: http://mathematism.com/media/static/txt/requirements.txt | |
# latest version of package on PyPI | |
python-openid | |
# package with version specified | |
Django >= 1.1 | |
// node.js geo polygon map tile rendering! | |
// requires https://github.com/learnboost/node-canvas and GeoJSON data files | |
// e.g. | |
// data from naturalearthdata.com converted to GeoJSON with GDAL's ogr2ogr | |
// or from datasf.org, reprojected too: | |
// ogr2ogr -f GeoJSON sfbay.js sfbay.shp -t_srs EPSG:4326 | |
var Canvas = require('./vendor/node-canvas/lib/canvas'), | |
http = require('http'), | |
fs = require('fs'); |
// PolylineEncoder.js copyright Mark McClure April/May 2007 | |
// | |
// This software is placed explicitly in the public | |
// domain and may be freely distributed or modified. | |
// No warranty express or implied is provided. | |
// | |
// History: | |
// V 2.1 July 2007 | |
// Minor modification in distance function to enhance | |
// speed. Suggested by Joel Rosenberg. |
countries = [ | |
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'}, | |
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'}, | |
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"}, | |
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'}, | |
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'}, | |
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'}, | |
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai |
var redis = require('redis') | |
, Pool = require('generic-pool').Pool; | |
var RedisPool = { | |
// Acquire resource. | |
// | |
// - `database` {String} redis database name | |
// - `callback` {Function} callback to call once acquired. Takes the form | |
// `callback(err, resource)` | |
acquire: function(database, callback) { |
python3 -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))' |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>A Graph</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<style> | |
article, aside, figure, footer, header, hgroup, |
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core? | |
L.TileLayer.Common = L.TileLayer.extend({ | |
initialize: function (options) { | |
L.TileLayer.prototype.initialize.call(this, this.url, options); | |
} | |
}); | |
(function () { | |