Are you over 18 and want to see adult content?
More Annotations
Complete List of Schools, Colleges, Training Institutes and Universities in Qatar
Are you over 18 and want to see adult content?
LEXICON SOFTWARE - Εφαρμογές Νέων Τεχνολογιών - LEXICON SOFTWARE
Are you over 18 and want to see adult content?
Buy dinosaur toys, educational gifts for kids and more | Natural History Museum online shop
Are you over 18 and want to see adult content?
Alchetron, Free Social Encyclopedia for The World
Are you over 18 and want to see adult content?
Pixelosaur | Beautifully Crafted Website Templates
Are you over 18 and want to see adult content?
Favourite Annotations
A complete backup of edith-russ-haus.de
Are you over 18 and want to see adult content?
A complete backup of nordstadtblogger.de
Are you over 18 and want to see adult content?
A complete backup of bookingwhistler.com
Are you over 18 and want to see adult content?
A complete backup of loisirs-parcdelatetedor.com
Are you over 18 and want to see adult content?
Text
PAUL GANSSLE
Software Developer. Paul Ganssle. Software Developer ABOUT • PAUL GANSSLE Paul Ganssle is a software developer at Google and contributor to various open source projects. Among other projects, he is a core developer of the Python language and (poorly) maintains python-dateutil.. He previously was a physical chemist working onlow-field NMR.
TALKS • PAUL GANSSLE Talks The Stable Interface Paradox (2020-12-05) Given at PyConf Hyderabad 2020, this is a 1-hour keynote talk.It introduce what I call the “stable interface paradox” — the unfortunate catch-22 that the fewer users of your interface you have, the less information you have about the right way to design the interface, but the more users you have, the harder it is to actually change that PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
PAUL GANSSLE
Without the self.subTest context manager, this test would fail immediately when i=1 and execution would end, reporting that test_loop has failed.With the context manager, though, the failures in each subTest's context don't cause the test to exit and execution continues.The result of running this test is that you'll see successes reported for 0, 2 and 4 with failures reported for 1 and 3. CURRICULUM VITAE • PAUL GANSSLE Graded lab reports and homeworks, attended class, proctored exams. Ran a weekly lab section for ~20 students, preparing pre-lab talks and guiding students through experiments. Teaching Assistant, University of Massachusetts, Amherst. Chemistry 110/111: General Chemistry (Lab), Fall 2007. Instructor: Dr. Thomas Whelan.PAUL GANSSLE
Ambiguous datetimes. Why was pytz designed this way, given that it doesn't mesh well with Python's standard time zone model? Consider the scenario of an ambiguous datetime, which occurs during a daylight saving time transition, e.g. 2018-11-04 01:30-04:00, and an hour later, 2018-11-04 01:30-05:00.How would you write a function that takes the 2018-11-04 01:30 portion of that datetime, andPAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
This is why the example that I started this post off with fails. The .timestamp() method gives a representation of a fixed point in time, not a point on the calendar; it returns Unix time, which is the number of seconds since 1970-01-01T00:00:00 UTC, and if you call it on a naive datetime, Python will assume that that datetime represents your machine's local time, even if you originallyPAUL GANSSLE
These functions were written for Python 3.6+ and are not tested withother versions.
PAUL GANSSLE
Software Developer. Paul Ganssle. Software Developer ABOUT • PAUL GANSSLE Paul Ganssle is a software developer at Google and contributor to various open source projects. Among other projects, he is a core developer of the Python language and (poorly) maintains python-dateutil.. He previously was a physical chemist working onlow-field NMR.
TALKS • PAUL GANSSLE Talks The Stable Interface Paradox (2020-12-05) Given at PyConf Hyderabad 2020, this is a 1-hour keynote talk.It introduce what I call the “stable interface paradox” — the unfortunate catch-22 that the fewer users of your interface you have, the less information you have about the right way to design the interface, but the more users you have, the harder it is to actually change that PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
PAUL GANSSLE
Without the self.subTest context manager, this test would fail immediately when i=1 and execution would end, reporting that test_loop has failed.With the context manager, though, the failures in each subTest's context don't cause the test to exit and execution continues.The result of running this test is that you'll see successes reported for 0, 2 and 4 with failures reported for 1 and 3. CURRICULUM VITAE • PAUL GANSSLE Graded lab reports and homeworks, attended class, proctored exams. Ran a weekly lab section for ~20 students, preparing pre-lab talks and guiding students through experiments. Teaching Assistant, University of Massachusetts, Amherst. Chemistry 110/111: General Chemistry (Lab), Fall 2007. Instructor: Dr. Thomas Whelan.PAUL GANSSLE
Ambiguous datetimes. Why was pytz designed this way, given that it doesn't mesh well with Python's standard time zone model? Consider the scenario of an ambiguous datetime, which occurs during a daylight saving time transition, e.g. 2018-11-04 01:30-04:00, and an hour later, 2018-11-04 01:30-05:00.How would you write a function that takes the 2018-11-04 01:30 portion of that datetime, andPAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
This is why the example that I started this post off with fails. The .timestamp() method gives a representation of a fixed point in time, not a point on the calendar; it returns Unix time, which is the number of seconds since 1970-01-01T00:00:00 UTC, and if you call it on a naive datetime, Python will assume that that datetime represents your machine's local time, even if you originallyPAUL GANSSLE
These functions were written for Python 3.6+ and are not tested withother versions.
PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
PAUL GANSSLE
These functions were written for Python 3.6+ and are not tested withother versions.
PAUL GANSSLE
Paul Ganssle is a software engineer at Google and contributor to various open source projects. Among other projects, he maintains python-dateutil and setuptools and is a Python core developer.. He previously was a physical chemist working on low-field NMR. TESTING WEAK REFERENCES This is just one implementation using weak references, but there are others. One could make the argument that the final line of test_get_example_cache_weakref is actually testing the fact that the key_example_ref weak reference is deleted and using that as a proxy for "all weak references, including those in the cache, have been deleted", in which case it would be more explicit to register aPAUL GANSSLE
makepkg and root. Packages in Arch Linux are built with makepkg, which is a multi-use tool that does things like install and build packages from a PKGBUILD file. For various reasons, makepkg cannot be run as root; if you try to do so, you'll get this scary-looking message:PAUL GANSSLE
If your CI runs all jobs as root (like Gitlab's does), you may have trouble testing Arch Linux's makepkg utility, which cannot run as root. This short blog post explains how I solved the problem. A CURIOUS CASE OF NON-TRANSITIVE DATETIME COMPARISON To summarize: x, y and z should all represent the same datetime – they all have the same time zone, and y and z are the result of converting x into a timestamp and then back into a datetime, but for some reason x != y, and, even more curiously, x == z, even though the only difference between y and z is that z uses a different tzinfo object (representing the same zone). SEMANTICS OF TIMEZONE-AWARE DATETIME ARITHMETIC One of the most frequent items on my list of reasons why one can't "just use UTC" in all situations is that frequently you need "wall time" semantics – i.e., the property you care about is the relationship between two times as displayed by the clock on the wall, regardless of the absolute elapsed duration between them.. In a previous post, I explained the somewhat bizarre property of PythonPAUL GANSSLE
Software Developer. Paul Ganssle. Software Developer ABOUT • PAUL GANSSLE Paul Ganssle is a software developer at Google and contributor to various open source projects. Among other projects, he is a core developer of the Python language and (poorly) maintains python-dateutil.. He previously was a physical chemist working onlow-field NMR.
PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
TALKS • PAUL GANSSLE Talks The Stable Interface Paradox (2020-12-05) Given at PyConf Hyderabad 2020, this is a 1-hour keynote talk.It introduce what I call the “stable interface paradox” — the unfortunate catch-22 that the fewer users of your interface you have, the less information you have about the right way to design the interface, but the more users you have, the harder it is to actually change that CURRICULUM VITAE • PAUL GANSSLE Graded lab reports and homeworks, attended class, proctored exams. Ran a weekly lab section for ~20 students, preparing pre-lab talks and guiding students through experiments. Teaching Assistant, University of Massachusetts, Amherst. Chemistry 110/111: General Chemistry (Lab), Fall 2007. Instructor: Dr. Thomas Whelan.PAUL GANSSLE
Without the self.subTest context manager, this test would fail immediately when i=1 and execution would end, reporting that test_loop has failed.With the context manager, though, the failures in each subTest's context don't cause the test to exit and execution continues.The result of running this test is that you'll see successes reported for 0, 2 and 4 with failures reported for 1 and 3.PAUL GANSSLE
Ambiguous datetimes. Why was pytz designed this way, given that it doesn't mesh well with Python's standard time zone model? Consider the scenario of an ambiguous datetime, which occurs during a daylight saving time transition, e.g. 2018-11-04 01:30-04:00, and an hour later, 2018-11-04 01:30-05:00.How would you write a function that takes the 2018-11-04 01:30 portion of that datetime, andPAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
Optimizing string concatenation. The naïve approach to concatenating immutable strings, which I assumed was the actual approach taken by the Python interpreter, would be to allocate a string of length len(s1) + len(s2) and then fill it with the characters from s1 and s2, leaving s1 and s2 alone. Using this method, repeatedly concatenating multiple strings to a single base would indeed havePAUL GANSSLE
This is why the example that I started this post off with fails. The .timestamp() method gives a representation of a fixed point in time, not a point on the calendar; it returns Unix time, which is the number of seconds since 1970-01-01T00:00:00 UTC, and if you call it on a naive datetime, Python will assume that that datetime represents your machine's local time, even if you originallyPAUL GANSSLE
Software Developer. Paul Ganssle. Software Developer ABOUT • PAUL GANSSLE Paul Ganssle is a software developer at Google and contributor to various open source projects. Among other projects, he is a core developer of the Python language and (poorly) maintains python-dateutil.. He previously was a physical chemist working onlow-field NMR.
PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
TALKS • PAUL GANSSLE Talks The Stable Interface Paradox (2020-12-05) Given at PyConf Hyderabad 2020, this is a 1-hour keynote talk.It introduce what I call the “stable interface paradox” — the unfortunate catch-22 that the fewer users of your interface you have, the less information you have about the right way to design the interface, but the more users you have, the harder it is to actually change that CURRICULUM VITAE • PAUL GANSSLE Graded lab reports and homeworks, attended class, proctored exams. Ran a weekly lab section for ~20 students, preparing pre-lab talks and guiding students through experiments. Teaching Assistant, University of Massachusetts, Amherst. Chemistry 110/111: General Chemistry (Lab), Fall 2007. Instructor: Dr. Thomas Whelan.PAUL GANSSLE
Without the self.subTest context manager, this test would fail immediately when i=1 and execution would end, reporting that test_loop has failed.With the context manager, though, the failures in each subTest's context don't cause the test to exit and execution continues.The result of running this test is that you'll see successes reported for 0, 2 and 4 with failures reported for 1 and 3.PAUL GANSSLE
Ambiguous datetimes. Why was pytz designed this way, given that it doesn't mesh well with Python's standard time zone model? Consider the scenario of an ambiguous datetime, which occurs during a daylight saving time transition, e.g. 2018-11-04 01:30-04:00, and an hour later, 2018-11-04 01:30-05:00.How would you write a function that takes the 2018-11-04 01:30 portion of that datetime, andPAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
Optimizing string concatenation. The naïve approach to concatenating immutable strings, which I assumed was the actual approach taken by the Python interpreter, would be to allocate a string of length len(s1) + len(s2) and then fill it with the characters from s1 and s2, leaving s1 and s2 alone. Using this method, repeatedly concatenating multiple strings to a single base would indeed havePAUL GANSSLE
This is why the example that I started this post off with fails. The .timestamp() method gives a representation of a fixed point in time, not a point on the calendar; it returns Unix time, which is the number of seconds since 1970-01-01T00:00:00 UTC, and if you call it on a naive datetime, Python will assume that that datetime represents your machine's local time, even if you originallyPAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
Paul Ganssle is a software engineer at Google and contributor to various open source projects. Among other projects, he maintains python-dateutil and setuptools and is a Python core developer.. He previously was a physical chemist working on low-field NMR.PAUL GANSSLE
These functions were written for Python 3.6+ and are not tested withother versions.
TESTING WEAK REFERENCES This is just one implementation using weak references, but there are others. One could make the argument that the final line of test_get_example_cache_weakref is actually testing the fact that the key_example_ref weak reference is deleted and using that as a proxy for "all weak references, including those in the cache, have been deleted", in which case it would be more explicit to register aPAUL GANSSLE
If your CI runs all jobs as root (like Gitlab's does), you may have trouble testing Arch Linux's makepkg utility, which cannot run as root. This short blog post explains how I solved the problem.PAUL GANSSLE
I recently created a utility for backing up file system metadata called metadata-backup, which is my first project to make use of Gitlab's CI/CD offering. It was pretty easy to set up, but I was shocked to find that by default, all CI pipelines are run as root; this is because Gitlab uses docker for their CI, and docker containers default to running commands as root. A CURIOUS CASE OF NON-TRANSITIVE DATETIME COMPARISON To summarize: x, y and z should all represent the same datetime – they all have the same time zone, and y and z are the result of converting x into a timestamp and then back into a datetime, but for some reason x != y, and, even more curiously, x == z, even though the only difference between y and z is that z uses a different tzinfo object (representing the same zone). SEMANTICS OF TIMEZONE-AWARE DATETIME ARITHMETIC One of the most frequent items on my list of reasons why one can't "just use UTC" in all situations is that frequently you need "wall time" semantics – i.e., the property you care about is the relationship between two times as displayed by the clock on the wall, regardless of the absolute elapsed duration between them.. In a previous post, I explained the somewhat bizarre property of PythonPAUL GANSSLE
Software Developer. Paul Ganssle. Software Developer ABOUT • PAUL GANSSLE Paul Ganssle is a software developer at Google and contributor to various open source projects. Among other projects, he is a core developer of the Python language and (poorly) maintains python-dateutil.. He previously was a physical chemist working onlow-field NMR.
PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
TALKS • PAUL GANSSLE Talks The Stable Interface Paradox (2020-12-05) Given at PyConf Hyderabad 2020, this is a 1-hour keynote talk.It introduce what I call the “stable interface paradox” — the unfortunate catch-22 that the fewer users of your interface you have, the less information you have about the right way to design the interface, but the more users you have, the harder it is to actually change that CURRICULUM VITAE • PAUL GANSSLE Graded lab reports and homeworks, attended class, proctored exams. Ran a weekly lab section for ~20 students, preparing pre-lab talks and guiding students through experiments. Teaching Assistant, University of Massachusetts, Amherst. Chemistry 110/111: General Chemistry (Lab), Fall 2007. Instructor: Dr. Thomas Whelan.PAUL GANSSLE
Without the self.subTest context manager, this test would fail immediately when i=1 and execution would end, reporting that test_loop has failed.With the context manager, though, the failures in each subTest's context don't cause the test to exit and execution continues.The result of running this test is that you'll see successes reported for 0, 2 and 4 with failures reported for 1 and 3.PAUL GANSSLE
Ambiguous datetimes. Why was pytz designed this way, given that it doesn't mesh well with Python's standard time zone model? Consider the scenario of an ambiguous datetime, which occurs during a daylight saving time transition, e.g. 2018-11-04 01:30-04:00, and an hour later, 2018-11-04 01:30-05:00.How would you write a function that takes the 2018-11-04 01:30 portion of that datetime, andPAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
Optimizing string concatenation. The naïve approach to concatenating immutable strings, which I assumed was the actual approach taken by the Python interpreter, would be to allocate a string of length len(s1) + len(s2) and then fill it with the characters from s1 and s2, leaving s1 and s2 alone. Using this method, repeatedly concatenating multiple strings to a single base would indeed havePAUL GANSSLE
This is why the example that I started this post off with fails. The .timestamp() method gives a representation of a fixed point in time, not a point on the calendar; it returns Unix time, which is the number of seconds since 1970-01-01T00:00:00 UTC, and if you call it on a naive datetime, Python will assume that that datetime represents your machine's local time, even if you originallyPAUL GANSSLE
Software Developer. Paul Ganssle. Software Developer ABOUT • PAUL GANSSLE Paul Ganssle is a software developer at Google and contributor to various open source projects. Among other projects, he is a core developer of the Python language and (poorly) maintains python-dateutil.. He previously was a physical chemist working onlow-field NMR.
PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
TALKS • PAUL GANSSLE Talks The Stable Interface Paradox (2020-12-05) Given at PyConf Hyderabad 2020, this is a 1-hour keynote talk.It introduce what I call the “stable interface paradox” — the unfortunate catch-22 that the fewer users of your interface you have, the less information you have about the right way to design the interface, but the more users you have, the harder it is to actually change that CURRICULUM VITAE • PAUL GANSSLE Graded lab reports and homeworks, attended class, proctored exams. Ran a weekly lab section for ~20 students, preparing pre-lab talks and guiding students through experiments. Teaching Assistant, University of Massachusetts, Amherst. Chemistry 110/111: General Chemistry (Lab), Fall 2007. Instructor: Dr. Thomas Whelan.PAUL GANSSLE
Without the self.subTest context manager, this test would fail immediately when i=1 and execution would end, reporting that test_loop has failed.With the context manager, though, the failures in each subTest's context don't cause the test to exit and execution continues.The result of running this test is that you'll see successes reported for 0, 2 and 4 with failures reported for 1 and 3.PAUL GANSSLE
Ambiguous datetimes. Why was pytz designed this way, given that it doesn't mesh well with Python's standard time zone model? Consider the scenario of an ambiguous datetime, which occurs during a daylight saving time transition, e.g. 2018-11-04 01:30-04:00, and an hour later, 2018-11-04 01:30-05:00.How would you write a function that takes the 2018-11-04 01:30 portion of that datetime, andPAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
Optimizing string concatenation. The naïve approach to concatenating immutable strings, which I assumed was the actual approach taken by the Python interpreter, would be to allocate a string of length len(s1) + len(s2) and then fill it with the characters from s1 and s2, leaving s1 and s2 alone. Using this method, repeatedly concatenating multiple strings to a single base would indeed havePAUL GANSSLE
This is why the example that I started this post off with fails. The .timestamp() method gives a representation of a fixed point in time, not a point on the calendar; it returns Unix time, which is the number of seconds since 1970-01-01T00:00:00 UTC, and if you call it on a naive datetime, Python will assume that that datetime represents your machine's local time, even if you originallyPAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
Paul Ganssle is a software engineer at Google and contributor to various open source projects. Among other projects, he maintains python-dateutil and setuptools and is a Python core developer.. He previously was a physical chemist working on low-field NMR.PAUL GANSSLE
These functions were written for Python 3.6+ and are not tested withother versions.
TESTING WEAK REFERENCES This is just one implementation using weak references, but there are others. One could make the argument that the final line of test_get_example_cache_weakref is actually testing the fact that the key_example_ref weak reference is deleted and using that as a proxy for "all weak references, including those in the cache, have been deleted", in which case it would be more explicit to register aPAUL GANSSLE
Tue 28 April 2020. Subtests in Python; Mon 30 December 2019. Testing an Arch Linux package in Gitlab CI; Fri 15 November 2019. String concatenation in PythonPAUL GANSSLE
makepkg and root. Packages in Arch Linux are built with makepkg, which is a multi-use tool that does things like install and build packages from a PKGBUILD file. For various reasons, makepkg cannot be run as root; if you try to do so, you'll get this scary-looking message:PAUL GANSSLE
If your CI runs all jobs as root (like Gitlab's does), you may have trouble testing Arch Linux's makepkg utility, which cannot run as root. This short blog post explains how I solved the problem. A CURIOUS CASE OF NON-TRANSITIVE DATETIME COMPARISON To summarize: x, y and z should all represent the same datetime – they all have the same time zone, and y and z are the result of converting x into a timestamp and then back into a datetime, but for some reason x != y, and, even more curiously, x == z, even though the only difference between y and z is that z uses a different tzinfo object (representing the same zone). SEMANTICS OF TIMEZONE-AWARE DATETIME ARITHMETIC One of the most frequent items on my list of reasons why one can't "just use UTC" in all situations is that frequently you need "wall time" semantics – i.e., the property you care about is the relationship between two times as displayed by the clock on the wall, regardless of the absolute elapsed duration between them.. In a previous post, I explained the somewhat bizarre property of PythonPAUL GANSSLE
Software Developer. Paul Ganssle. Software Developer ABOUT • PAUL GANSSLE Paul Ganssle is a software developer at Google and contributor to various open source projects. Among other projects, he is a core developer of the Python language and (poorly) maintains python-dateutil.. He previously was a physical chemist working onlow-field NMR.
PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
TALKS • PAUL GANSSLE Talks The Stable Interface Paradox (2020-12-05) Given at PyConf Hyderabad 2020, this is a 1-hour keynote talk.It introduce what I call the “stable interface paradox” — the unfortunate catch-22 that the fewer users of your interface you have, the less information you have about the right way to design the interface, but the more users you have, the harder it is to actually change that CURRICULUM VITAE • PAUL GANSSLE Graded lab reports and homeworks, attended class, proctored exams. Ran a weekly lab section for ~20 students, preparing pre-lab talks and guiding students through experiments. Teaching Assistant, University of Massachusetts, Amherst. Chemistry 110/111: General Chemistry (Lab), Fall 2007. Instructor: Dr. Thomas Whelan.PAUL GANSSLE
Without the self.subTest context manager, this test would fail immediately when i=1 and execution would end, reporting that test_loop has failed.With the context manager, though, the failures in each subTest's context don't cause the test to exit and execution continues.The result of running this test is that you'll see successes reported for 0, 2 and 4 with failures reported for 1 and 3.PAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
Optimizing string concatenation. The naïve approach to concatenating immutable strings, which I assumed was the actual approach taken by the Python interpreter, would be to allocate a string of length len(s1) + len(s2) and then fill it with the characters from s1 and s2, leaving s1 and s2 alone. Using this method, repeatedly concatenating multiple strings to a single base would indeed havePAUL GANSSLE
This is why the example that I started this post off with fails. The .timestamp() method gives a representation of a fixed point in time, not a point on the calendar; it returns Unix time, which is the number of seconds since 1970-01-01T00:00:00 UTC, and if you call it on a naive datetime, Python will assume that that datetime represents your machine's local time, even if you originallyPAUL GANSSLE
Thus, Python's model is that any tzinfo subclass should implement the following three methods: tzname (self, dt): The name of the offset at the given datetime (e.g. EST, PDT) utcoffset (self, dt): The offset from UTC at the given datetime. dst (self, dt): The difference between the current offset and the zone's "standard offset"PAUL GANSSLE
Software Developer. Paul Ganssle. Software Developer ABOUT • PAUL GANSSLE Paul Ganssle is a software developer at Google and contributor to various open source projects. Among other projects, he is a core developer of the Python language and (poorly) maintains python-dateutil.. He previously was a physical chemist working onlow-field NMR.
PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
TALKS • PAUL GANSSLE Talks The Stable Interface Paradox (2020-12-05) Given at PyConf Hyderabad 2020, this is a 1-hour keynote talk.It introduce what I call the “stable interface paradox” — the unfortunate catch-22 that the fewer users of your interface you have, the less information you have about the right way to design the interface, but the more users you have, the harder it is to actually change that CURRICULUM VITAE • PAUL GANSSLE Graded lab reports and homeworks, attended class, proctored exams. Ran a weekly lab section for ~20 students, preparing pre-lab talks and guiding students through experiments. Teaching Assistant, University of Massachusetts, Amherst. Chemistry 110/111: General Chemistry (Lab), Fall 2007. Instructor: Dr. Thomas Whelan.PAUL GANSSLE
Without the self.subTest context manager, this test would fail immediately when i=1 and execution would end, reporting that test_loop has failed.With the context manager, though, the failures in each subTest's context don't cause the test to exit and execution continues.The result of running this test is that you'll see successes reported for 0, 2 and 4 with failures reported for 1 and 3.PAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
Optimizing string concatenation. The naïve approach to concatenating immutable strings, which I assumed was the actual approach taken by the Python interpreter, would be to allocate a string of length len(s1) + len(s2) and then fill it with the characters from s1 and s2, leaving s1 and s2 alone. Using this method, repeatedly concatenating multiple strings to a single base would indeed havePAUL GANSSLE
This is why the example that I started this post off with fails. The .timestamp() method gives a representation of a fixed point in time, not a point on the calendar; it returns Unix time, which is the number of seconds since 1970-01-01T00:00:00 UTC, and if you call it on a naive datetime, Python will assume that that datetime represents your machine's local time, even if you originallyPAUL GANSSLE
Thus, Python's model is that any tzinfo subclass should implement the following three methods: tzname (self, dt): The name of the offset at the given datetime (e.g. EST, PDT) utcoffset (self, dt): The offset from UTC at the given datetime. dst (self, dt): The difference between the current offset and the zone's "standard offset"PAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
These functions were written for Python 3.6+ and are not tested withother versions.
PAUL GANSSLE
Optimizing string concatenation. The naïve approach to concatenating immutable strings, which I assumed was the actual approach taken by the Python interpreter, would be to allocate a string of length len(s1) + len(s2) and then fill it with the characters from s1 and s2, leaving s1 and s2 alone. Using this method, repeatedly concatenating multiple strings to a single base would indeed have TESTING WEAK REFERENCES This is just one implementation using weak references, but there are others. One could make the argument that the final line of test_get_example_cache_weakref is actually testing the fact that the key_example_ref weak reference is deleted and using that as a proxy for "all weak references, including those in the cache, have been deleted", in which case it would be more explicit to register aPAUL GANSSLE
Tue 28 April 2020. Subtests in Python; Mon 30 December 2019. Testing an Arch Linux package in Gitlab CI; Fri 15 November 2019. String concatenation in PythonPAUL GANSSLE
makepkg and root. Packages in Arch Linux are built with makepkg, which is a multi-use tool that does things like install and build packages from a PKGBUILD file. For various reasons, makepkg cannot be run as root; if you try to do so, you'll get this scary-looking message:PAUL GANSSLE
If your CI runs all jobs as root (like Gitlab's does), you may have trouble testing Arch Linux's makepkg utility, which cannot run as root. This short blog post explains how I solved the problem. A CURIOUS CASE OF NON-TRANSITIVE DATETIME COMPARISON To summarize: x, y and z should all represent the same datetime – they all have the same time zone, and y and z are the result of converting x into a timestamp and then back into a datetime, but for some reason x != y, and, even more curiously, x == z, even though the only difference between y and z is that z uses a different tzinfo object (representing the same zone). SEMANTICS OF TIMEZONE-AWARE DATETIME ARITHMETIC One of the most frequent items on my list of reasons why one can't "just use UTC" in all situations is that frequently you need "wall time" semantics – i.e., the property you care about is the relationship between two times as displayed by the clock on the wall, regardless of the absolute elapsed duration between them.. In a previous post, I explained the somewhat bizarre property of PythonPAUL GANSSLE
Software Developer. Paul Ganssle. Software Developer ABOUT • PAUL GANSSLE Paul Ganssle is a software developer at Google and contributor to various open source projects. Among other projects, he is a core developer of the Python language and (poorly) maintains python-dateutil.. He previously was a physical chemist working onlow-field NMR.
PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
TALKS • PAUL GANSSLE Talks The Stable Interface Paradox (2020-12-05) Given at PyConf Hyderabad 2020, this is a 1-hour keynote talk.It introduce what I call the “stable interface paradox” — the unfortunate catch-22 that the fewer users of your interface you have, the less information you have about the right way to design the interface, but the more users you have, the harder it is to actually change that CURRICULUM VITAE • PAUL GANSSLE Graded lab reports and homeworks, attended class, proctored exams. Ran a weekly lab section for ~20 students, preparing pre-lab talks and guiding students through experiments. Teaching Assistant, University of Massachusetts, Amherst. Chemistry 110/111: General Chemistry (Lab), Fall 2007. Instructor: Dr. Thomas Whelan.PAUL GANSSLE
Without the self.subTest context manager, this test would fail immediately when i=1 and execution would end, reporting that test_loop has failed.With the context manager, though, the failures in each subTest's context don't cause the test to exit and execution continues.The result of running this test is that you'll see successes reported for 0, 2 and 4 with failures reported for 1 and 3.PAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
Optimizing string concatenation. The naïve approach to concatenating immutable strings, which I assumed was the actual approach taken by the Python interpreter, would be to allocate a string of length len(s1) + len(s2) and then fill it with the characters from s1 and s2, leaving s1 and s2 alone. Using this method, repeatedly concatenating multiple strings to a single base would indeed havePAUL GANSSLE
This is why the example that I started this post off with fails. The .timestamp() method gives a representation of a fixed point in time, not a point on the calendar; it returns Unix time, which is the number of seconds since 1970-01-01T00:00:00 UTC, and if you call it on a naive datetime, Python will assume that that datetime represents your machine's local time, even if you originallyPAUL GANSSLE
Thus, Python's model is that any tzinfo subclass should implement the following three methods: tzname (self, dt): The name of the offset at the given datetime (e.g. EST, PDT) utcoffset (self, dt): The offset from UTC at the given datetime. dst (self, dt): The difference between the current offset and the zone's "standard offset"PAUL GANSSLE
Software Developer. Paul Ganssle. Software Developer ABOUT • PAUL GANSSLE Paul Ganssle is a software developer at Google and contributor to various open source projects. Among other projects, he is a core developer of the Python language and (poorly) maintains python-dateutil.. He previously was a physical chemist working onlow-field NMR.
PROJECTS • PAUL GANSSLE Projects python-dateutil (maintainer) Popular python datetime library with support for datetime string parsing, time zones, recurrence rulesand more.
TALKS • PAUL GANSSLE Talks The Stable Interface Paradox (2020-12-05) Given at PyConf Hyderabad 2020, this is a 1-hour keynote talk.It introduce what I call the “stable interface paradox” — the unfortunate catch-22 that the fewer users of your interface you have, the less information you have about the right way to design the interface, but the more users you have, the harder it is to actually change that CURRICULUM VITAE • PAUL GANSSLE Graded lab reports and homeworks, attended class, proctored exams. Ran a weekly lab section for ~20 students, preparing pre-lab talks and guiding students through experiments. Teaching Assistant, University of Massachusetts, Amherst. Chemistry 110/111: General Chemistry (Lab), Fall 2007. Instructor: Dr. Thomas Whelan.PAUL GANSSLE
Without the self.subTest context manager, this test would fail immediately when i=1 and execution would end, reporting that test_loop has failed.With the context manager, though, the failures in each subTest's context don't cause the test to exit and execution continues.The result of running this test is that you'll see successes reported for 0, 2 and 4 with failures reported for 1 and 3.PAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
Optimizing string concatenation. The naïve approach to concatenating immutable strings, which I assumed was the actual approach taken by the Python interpreter, would be to allocate a string of length len(s1) + len(s2) and then fill it with the characters from s1 and s2, leaving s1 and s2 alone. Using this method, repeatedly concatenating multiple strings to a single base would indeed havePAUL GANSSLE
This is why the example that I started this post off with fails. The .timestamp() method gives a representation of a fixed point in time, not a point on the calendar; it returns Unix time, which is the number of seconds since 1970-01-01T00:00:00 UTC, and if you call it on a naive datetime, Python will assume that that datetime represents your machine's local time, even if you originallyPAUL GANSSLE
Thus, Python's model is that any tzinfo subclass should implement the following three methods: tzname (self, dt): The name of the offset at the given datetime (e.g. EST, PDT) utcoffset (self, dt): The offset from UTC at the given datetime. dst (self, dt): The difference between the current offset and the zone's "standard offset"PAUL GANSSLE
Below is the full code that can be used to run the three micro-benchmarks described in my post about string concatenation:PAUL GANSSLE
These functions were written for Python 3.6+ and are not tested withother versions.
PAUL GANSSLE
Optimizing string concatenation. The naïve approach to concatenating immutable strings, which I assumed was the actual approach taken by the Python interpreter, would be to allocate a string of length len(s1) + len(s2) and then fill it with the characters from s1 and s2, leaving s1 and s2 alone. Using this method, repeatedly concatenating multiple strings to a single base would indeed have TESTING WEAK REFERENCES This is just one implementation using weak references, but there are others. One could make the argument that the final line of test_get_example_cache_weakref is actually testing the fact that the key_example_ref weak reference is deleted and using that as a proxy for "all weak references, including those in the cache, have been deleted", in which case it would be more explicit to register aPAUL GANSSLE
Tue 28 April 2020. Subtests in Python; Mon 30 December 2019. Testing an Arch Linux package in Gitlab CI; Fri 15 November 2019. String concatenation in PythonPAUL GANSSLE
makepkg and root. Packages in Arch Linux are built with makepkg, which is a multi-use tool that does things like install and build packages from a PKGBUILD file. For various reasons, makepkg cannot be run as root; if you try to do so, you'll get this scary-looking message:PAUL GANSSLE
If your CI runs all jobs as root (like Gitlab's does), you may have trouble testing Arch Linux's makepkg utility, which cannot run as root. This short blog post explains how I solved the problem. A CURIOUS CASE OF NON-TRANSITIVE DATETIME COMPARISON To summarize: x, y and z should all represent the same datetime – they all have the same time zone, and y and z are the result of converting x into a timestamp and then back into a datetime, but for some reason x != y, and, even more curiously, x == z, even though the only difference between y and z is that z uses a different tzinfo object (representing the same zone). SEMANTICS OF TIMEZONE-AWARE DATETIME ARITHMETIC One of the most frequent items on my list of reasons why one can't "just use UTC" in all situations is that frequently you need "wall time" semantics – i.e., the property you care about is the relationship between two times as displayed by the clock on the wall, regardless of the absolute elapsed duration between them.. In a previous post, I explained the somewhat bizarre property of PythonPAUL GANSSLE
Software Developer
* Blog
* Talks
* Projects
* Curriculum Vitae
* About
-------------------------PROFILES
* Github
* Keybase
Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0