duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
#!/usr/bin/env python | |
def calc(gross, delivery, **d): | |
""" | |
usage: | |
>>> calc(120, 9, | |
Ashraf=40, | |
Thabet=20, | |
Awadi=20, | |
Ghanem=20) |
# encoding: utf-8 | |
from __future__ import unicode_literals | |
import os | |
import zipfile | |
def is_zip_file(path): | |
return os.path.isfile(path) and zipfile.is_zipfile(path) | |
/dev/sdb
. Delete all partitions, create a new one taking up all the space, set type to NTFS (7), and remember to set it bootable:# cfdisk /dev/sdb
or fdisk /dev/sdb (partition type 7, and bootable flag)
<!DOCTYPE html> | |
<html> | |
<!-- | |
usage: | |
1. install jq for json parsing. | |
2. go here https://takeout.google.com/settings/takeout and download "Location history" in json format and save it as location.json. | |
3. run `cat location.json|jq '.locations | map(select(has("accuracy"))) | map({lat: (.latitudeE7 / 10000000), lng: (.longitudeE7 / 10000000), accuracy: .accuracy, timestamp: (.timestampMs | tonumber / 1000)})' > google.json` | |
4. cp google.json google.js. | |
5. add `var points = ` to the beginning of google.js file. |
from Jumpscale import j | |
class Package(j.baseclasses.threebot_package): | |
def start(self): | |
for port in (443, 80): | |
website = self.openresty.get_from_port(port) | |
locations = website.locations.get(name=f"unlock_service_{port}_locations") | |
include_location = locations.get_location_custom(f"unlock_service_includes_{port}") |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<link rel="stylesheet" href="codebase/webix.css" type="text/css"> | |
<script src="codebase/webix.js" type="text/javascript"></script> | |
<script src="ansi2html.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<script type="text/javascript" charset="utf-8"> | |
webix.ui({ |
from csr1000v import Router | |
host, port = "172.18.0.3", 55443 | |
router = Router(host, port, "abdo", "1234") | |
print(router.token) | |
print(router.processes.get_total_memory_usage()) |
""" | |
Redis client | |
""" | |
from jumpscale.core.base import Base, StoredFactory | |
from jumpscale.core.base import fields | |
class Project(Base): | |
name = fields.String() |
import sys | |
from jumpscale.loader import j | |
def from_seed(seed): | |
seed = seed.strip() | |
if seed.startswith("0x"): | |
seed = seed[2:] |