semvec/pypi-packages huggingface dataset:
duckgoose 0.1.8
Utility functions for the fast ai mooc
License: MIT
Keywords: fastai,image-classification,deep-learning,class-activation-maps

# duckgoose
Utility scripts for the online [fast.ai](www.fast.ai) course. There are two main parts: one to download and organise arbitrary image classes, and one to highlight what parts of an image is activating the decision for a classification.

1. Utility for Lesson 1 experimentation with external image classes. The script:
* Downloads images from google images for specific classes
* Sanity checks that images can be opened and have three channels
* Organises the images into separate folders (train/valid/test + classes) as expected by the fast.ai library

2. Utility for creating Class Activation Maps for both classifications.

## Prerequisites 

* `chromedriver` is required. On ubuntu/debian: `sudo apt-get chromium-chromedriver`

## Installation

```python
pip install duckgoose
```

## Usage

### Fetching, sanity checking and organising images

```python
from duckgoose import fetchImagesAndPrepForClassification

# dictionary structure `class_name => search term`
image_classes = { 'ducks' : 'ducks -rubber' , 'geese' : 'geese' }
download_path = '/home/myuser/data/downloaded_from_google'
output_path = '/home/myuser/data/ducksgeese/'
number_of_images = 100

fetchImagesAndPrepForClassification(image_classes, download_path, output_path, number_of_images)
```

### Create Class Activation Maps (CAM)
*Note*: This was implemented for fastai v2 part 1.
Here is a full example of creating a class activation maps for ducks and geese using fast ai. 

```python
from fastai.imports import *
from fastai.transforms import *
from fastai.conv_learner import *
from fastai.model import *
from fastai.dataset import *
from fastai.sgdr import *
from fastai.plots import *

from duckgoose.cam import calculateAndChartHeatZoneFor

PATH = "data/ducksgeese/"
sz=224
arch = resnet34
bs = 64

m = arch(True)
m = nn.Sequential(*children(m)[:-2], 
                  nn.Conv2d(512, 2, 3, padding=1), 
                  nn.AdaptiveAvgPool2d(1),
                  Flatten(), 
                  nn.LogSoftmax())

tfms = tfms_from_model(arch, sz, aug_tfms=transforms_side_on, max_zoom=1.1)
data = ImageClassifierData.from_paths(PATH, tfms=tfms, bs=bs)
learn = ConvLearner.from_model_data(m, data)

learn.freeze_to(-4)

_, val_tfms = tfms_from_model(learn.model, sz)

learn.fit(0.01, 2)

calculateAndChartHeatZoneFor('./data/ducksgeese/test/ducks/ducks_427.jpg', val_tfms, learn)
```

![Duck and goose heatmap](images/duck.png)


# License
[The MIT License (MIT)](LICENSE.txt)
sjb.browserdriver 0.1.3
Browser Driver is a Wrapper for Selenium Web Automation
License: MIT
Keywords: selenium test testing automation browser

==============================================
browser_driver
==============================================
This project contains a wrapper for selenium, a framework to automate a browser,
and often used in testing.   This wrapper provides

    1. Logging, because good software has good logging

    2. Browser Upgrade Protection; because as they race to out-do each other, the
       browser behaves differently with some updates

    3. Selenium behavior supplementation; for instance, with an update, Chrome required
       an element to be scrolled into view or an error occurred.  Having a central wrapper
       allows for making that sort of update in one location

    4. Screenshots, because if you want to run lights-out (not visible), you'll need a
       screenshot of what went wrong to fix it.

Installation
=============

.. code-block:: python

    c:\browser_test> venv\scripts\pip -install sjb.browserdriver

To upgrade an existing installation add the additional switch

.. code-block:: python

    c:\browser_test> venv\scripts\pip -install sjb.browserdriver --upgrade

Recent Changes
==============

The full change log can be found at [TODO: update with link]

v0.1.3 - Bug fix where the setup process would update the cfg file key = value where the bat file was
updating as key=value.

v0.1.2 - Bug fix in dist_pypi.bat+browser_driver.cfg

v0.1.1 - Updated setup.py adding find_and_list_packages() method.  Updated the dist_pypi.bat script in a number of ways.
Including updating the date we uploaded to a pypi environment in the project cfg file.

v0.1.0 - First development release to test.pypi.org with Semantic Version number scheme.


Documentation
==============

This project is documented using Sphinx and reStructuredText, using a theme provided by Read the Docs.

Documentation can be found in several locations

* docs\\ as html
* docs_source\\ as reStructuredText source
* https://shawnjburke.github.io/browser_driver/
bitwise 1.0
Bitwise is a library for utilizing Python as a hardware description language
License: MIT
Keywords: bitwise hardware design

*******
Bitwise
*******

Bitwise is a Python library intended to make hardware design and simulation more accessible
for software engineers. While it can never replace a true hardware description language,
it aims to serve as a useful tool in the hardware design process, allowing a user to build and test
their digital circuits in a high-level programming language (i.e. with simpler syntax and more
flexible semantics) before implementing them using an HDL.

Getting Started
===============

Refer to the `documentation <https://bitwise.readthedocs.io/en/latest/>`_ for installation 
instructions, usage examples, API reference, and more.

Quick Example
=============

The following code creates a half-adder circuit::

    """
    Create a half-adder.
    """
    import bitwise as bw
    
    def main():
        # initialize inputs
        a = bw.wire.Wire()
        b = bw.wire.Wire()

        # initialize outputs
        sum_ = bw.wire.Wire()
        carry_out = bw.wire.Wire()

        # create circuit
        bw.gate.XORGate2(a, b, sum_)  # XORs a and b and puts the result into sum_
        bw.gate.ANDGate2(a, b, carry_out)  # ANDs a and b and puts the result into carry_out
        
    if __name__ == "__main__":
        main()

Interacting with it in a Python session::

    In [1]: a.value = 0
    
    In [2]: b.value = 0
    
    In [3]: sum_.value
    Out[3]: 0
    
    In [4]: carry_out.value
    Out[4]: 0
    
    In [5]: a.value = 1
    
    In [6]: sum_.value
    Out[6]: 1
    
    In [7]: carry_out.value
    Out[7]: 0
    
    In [8]: b.value = 1
    
    In [9]: sum_.value
    Out[9]: 0
    
    In [10]: carry_out.value
    Out[10]: 1