Based on this post: https://qxf2.com/blog/saving-cprofile-stats-to-a-csv-file/
if __name__ == "__main__":
pr = cProfile.Profile()
pr.enable()
Based on this post: https://qxf2.com/blog/saving-cprofile-stats-to-a-csv-file/
if __name__ == "__main__":
pr = cProfile.Profile()
pr.enable()
#!/usr/bin/python3 | |
header="DEC HEX CHR" | |
spacer=" " * 5 | |
def row(i): | |
return f"{i:3} {i:02x} {chr(i)} " | |
if __name__ == "__main__": | |
print(spacer.join((header for _ in range(6)))) |
/* eslint-disable no-console */ | |
import React, { createContext, useContext, useMemo, useReducer } from 'react'; | |
import ReactDOM from 'react-dom'; | |
// Example of a React app with complex state. | |
// Use separate context to avoid unnecessary renders. | |
// ## ContextProvider | |
const FooContext = createContext(); |