Python Forum
savin ideas, keeping notes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
savin ideas, keeping notes
#1
when you learn something new about Python, or see a neat trick, and anticipate some day using that but are not doing any project at this time that would use it, do you have a specific way or form you keep this in? do you just edit pynotes.txt and type in a new section at the top? do you date it do you type in a code sample?

what if i created a web site to share these new ideas?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
I do this quite frequently. It is online so i can always access it as well as it cant get accidentally deleted/corrupted. Its on github called random repo
https://github.com/metulburr/random

If it is not big enough for a file and just a few lines, ill put it on a github gist instead. IF its really big showing a structure of files, ill make a whole new repo for it.
Recommended Tutorials:
Reply
#3
BasKet?
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#4
I have a small database system written in python, but it is not currently available online. It is very simple. The data are stored in a json file containing a question -> answer dictionary. I have a command line that opens an editor to create a new entry. I write the question on the first line and the answer in the subsequent lines. When the editor exits, the program splits the temporary file in a question/answer pair and inserts it in the json dictionary. I have a small search engine on the command line that takes a word and finds all the notes containing that word (in the question or in the answer). A list of corresponding question is displayed in the terminal using module pythondialog as UI. Selecting the desired questions in the list displays the answer or opens the editor for reading or editing.
Reply
#5
If something like a db is wanted, perhaps tinydb will fit the needs.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#6
(Mar-15-2018, 05:20 PM)wavic Wrote: If something like a db is wanted, perhaps tinydb will fit the needs.
It could help me improve my system, not a bad idea, but at the cost of requiring a new library. I'll think about this.
Reply
#7
Hmmm! If I want to keep something I'm just saving it as a pdf or just saving the web page. So my hard drive space is a mess. Shy Not exactly... I know where are all things but... I have to put it in some order one day.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#8
I bookmark them, very neatly categorized. Since I have always used Firefox, the backups are in JSON format,
and the active bookmarks are sqlite3 (places.sqlite, places.sqlite-wal.
places.sqlite also keeps track of the sites you visit, and frequency of visit.
Reply
#9
Good to know. Thank you!
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#10
(Mar-15-2018, 05:20 PM)wavic Wrote: If something like a db is wanted, perhaps tinydb will fit the needs.
my concern with this is how it writes back the file (at least on POSIX type systems). does it first write a temporary file name and then move it to the permanent file name? oh yeah, i should download the source and see (need to figure out how to get source code without installing it since github doesn't work for me). it looks like a nice, simple tool.

One more use for it: a starting point for a academic course "database 101". then the next course can do SQLite, and next year more advanced SQL and non-SQL. i remember the one database course we had in college. the class developed a non-SQL database on mainframes in Fortran (because it was the one language everyone then could code in).
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Open-source codes and concept ideas. sourceduty 0 772 Aug-11-2023, 02:11 AM
Last Post: sourceduty
  keeping the last 4 records in a list Skaperen 2 1,747 Feb-23-2021, 11:22 PM
Last Post: Skaperen
  my ideas for a new sleep command Skaperen 1 1,952 Sep-02-2019, 04:17 AM
Last Post: Larz60+
  Free Programming Notes for Professionals Books buran 2 4,261 Jan-16-2018, 12:34 PM
Last Post: j.crater

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020