code
stringlengths
3
6.57k
app.route('/streams/<int:server>/<path:path>')
get_stream_file(server, path)
format(server, path)
requests.get(full_url, stream=True)
resp.iter_content(chunk_size=2 ** 16)
resp.headers.get('content-type', 'application/octet-stream')
flask.Response(content, status=status_code, mimetype=content_type)
get_args_config()
argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
vars(parser.parse_args()
make_socket()
socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind((config['host'], config['port'])
sock.listen(5)
start_wsgi_server()
make_socket()
gevent.pywsgi.WSGIServer(sock, app)
server.serve_forever()
get_args_config()
print('Listening on http://{}:{}'.format(config['host'], config['port'])
start_wsgi_server()
print(repr(e)
print('Press enter to exit')
input()
float(input()
float(input()
float(input()
float(input()
float(input()
float(input()
print(5)
print(0)
print(0)
print(0)
print(0)
print(0)
print(3, e / a)
print(3, f / c)
print(3, e / a)
print(4, e / b)
print(4, f / d)
print(1, -a / b, e / b)
print(1, -c / d, f / d)
print(2, x, y)
lamost_filepath(planid, mjd, spid, fiberid, dirpath="", extname=".fits")
mjd (use lmjd rather than mjd for DR3 and after!)
directory (prefix)
np.isscalar(planid)
planid.strip()
_.strip()
np.isscalar(mjd)
range(len(mjd)
np.isscalar(mjd)
range(len(mjd)
_test_lamost_filepath()
print(lamost_filepath("GAC_061N46_V3", 55939, 7, 78)
print(lamost_filepath("GAC_061N46_V3", 55939, 7, 78, "/")
print(lamost_filepath("GAC_061N46_V3", 55939, 7, 78, "/pool")
print(lamost_filepath("GAC_061N46_V3", 55939, 7, 78, "/pool/")
sdss_filepath(plate, mjd, fiberid, dirpath="", extname=".fits")
mjd (use lmjd rather than mjd for DR3 and after!)
directory (prefix)
np.isscalar(mjd)
range(len(mjd)
np.isscalar(mjd)
range(len(mjd)
_test_sdss_filepath()
print(sdss_filepath(2238, 52059, 1, "/")
print("")
print("@Cham: start to test the module ...")
print("")
print("@Cham: testing ""lamost_filepath"" ...")
_test_lamost_filepath()
_test_sdss_filepath()
print("@Cham: OK")
__init__(self, raw_file_f, raw_file_r=None)
downsize_single(self)
downsize_pair_uncompressed(self)
downsize_pair_gzip(self)
downsized_pair_uncompressed(self)
getattr(self, "._downsized_f", None)
self.downsize_pair()
downsized_pair_gzip(self)
getattr(self, "._downsized_f", None)
self.downsize_pair()
downsized_single(self)
getattr(self, "._downsized_f", None)
self.downsize_single()
CableTraceMixin(object)
action(detail=True, url_path='trace')
trace(self, request, pk)
of (termination, cable, termination)
get_object_or_404(self.queryset.model, pk=pk)
obj.trace()
get_serializer_for_model(near_end, prefix='Nested')
serializer_a(near_end, context={'request': request})
serializers.TracedCableSerializer(cable, context={'request': request})
get_serializer_for_model(far_end, prefix='Nested')
serializer_b(far_end, context={'request': request})
path.append((x, y, z)