Skip to content

Instantly share code, notes, and snippets.

import datetime
from loguru import logger
from flexget import plugin
from flexget.event import event
from flexget.utils.database import Session
logger = logger.bind(name='est_movies_digital_tmdb')
[{"id":5611,"name":"Smoot Gateway","system_id":1,"updated_at":1570183074,"max_landing_pad_size":"L","distance_to_star":4696,"government_id":144,"government":"Patronage","allegiance_id":2,"allegiance":"Empire","states":[{"id":16,"name":"Boom"}],"type_id":3,"type":"Coriolis Starport","has_blackmarket":false,"has_market":true,"has_refuel":true,"has_repair":true,"has_rearm":true,"has_outfitting":true,"has_shipyard":true,"has_docking":true,"has_commodities":true,"import_commodities":["Polymers","Aluminium","Synthetic Fabrics"],"export_commodities":["Food Cartridges","Water Purifiers","Bauxite"],"prohibited_commodities":["Narcotics","Combat Stabilisers","Slaves","Personal Weapons","Battle Weapons","Landmines"],"economies":["Extraction","Industrial"],"shipyard_updated_at":1570183074,"outfitting_updated_at":1570183074,"market_updated_at":1570183074,"is_planetary":false,"selling_ships":["Adder","Cobra Mk. III","Eagle Mk. II","Hauler","Imperial Clipper","Imperial Courier","Imperial Eagle","Orca","Sidewinder Mk. I","Typ
We can't make this file beautiful and searchable because it's too large.
id,edsm_id,name,x,y,z,population,is_populated,government_id,government,allegiance_id,allegiance,security_id,security,primary_economy_id,primary_economy,power,power_state,power_state_id,needs_permit,updated_at,simbad_ref,controlling_minor_faction_id,controlling_minor_faction,reserve_type_id,reserve_type
17,60,"10 Ursae Majoris",0.03125,34.90625,-39.09375,0,0,176,None,5,None,64,Anarchy,10,None,,,,0,1560356158,"10 Ursae Majoris",,,3,Common
24,12009,"11 Bootis",-49.40625,285.25,65.21875,0,0,176,None,5,None,64,Anarchy,10,None,,,,0,1551339167,"11 Bootis",,,1,Pristine
26,13308,"11 Mu Aurigae",-30,0.75,-150.03125,0,0,176,None,5,None,64,Anarchy,10,None,,,,0,1546747660,,,,,
31,14818,"119 G. Aquarii",-60.8125,-148,90.375,0,0,176,None,5,None,64,Anarchy,10,None,,,,0,1547060836,,,,1,Pristine
37,505,"12 Kappa Arietis",-82.78125,-108.1875,-120.125,0,0,176,None,5,None,64,Anarchy,10,None,,,,0,1547316033,,,,,
49,16653,"14 Ophiuchi",-49.78125,86.5625,151.3125,0,0,176,None,5,None,64,Anarchy,10,None,,,,0,1547940550,"14 Ophiuchi",,
r"""HTTP/1.1 client library
<intro stuff goes here>
<other stuff, too>
HTTPConnection goes through a number of "states", which define when a client
may legally make another request or fetch the response for a particular
request. This diagram details these state transitions:
(null)
"""An extensible library for opening URLs using a variety of protocols
The simplest way to use this module is to call the urlopen function,
which accepts a string containing a URL or a Request object (described
below). It opens the URL and returns the results as file-like
object; the returned object has some extra methods described below.
The OpenerDirector manages a collection of Handler objects that do
all the actual work. Each Handler implements a particular protocol or
option. The OpenerDirector is a composite object that invokes the
@lostb1t
lostb1t / example.py
Last active May 17, 2017 14:03
ModelCollector
class UserSalesCollector(ModelCollector):
fields = [
'uuid',
'date_joined',
'birthdate.year',
'zip4',
'userrecord.num_orders',
'userrecord.total_spent',
'userrecord.num_product_views',
'loyaltycard'
@lostb1t
lostb1t / 0_reuse_code.js
Created July 28, 2016 10:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console