snapshots ---------------------------------------------------------------------------------------------------
500005
private static <K, N, S> int countMappingsInKeyGroup(final Map<N, Map<K, S>> keyGroupMap) {
		int count = 0;
		for (Map<K, S> namespaceMap : keyGroupMap.values()) {
			count += namespaceMap.size();
		}

		return count;
	}
918972
def snapshot
      { state: @state.root_hash,
        gas: gas_used,
        txs: @transactions,
        txcount: @transaction_count,
        refunds: refunds,
        suicides: suicides,
        suicides_size: suicides.size,
        logs: logs,
        logs_size: logs.size,
        journal: @journal, # pointer to reference, so is not static
        journal_size: @journal.size,
        ether_delta: ether_delta
      }
    end
104369
@Override
    public CountDownLatch snapshotCompleted(SnapshotCompletionEvent event) {
        if (!event.truncationSnapshot || !event.didSucceed) {
            VoltDB.crashGlobalVoltDB("Failed to truncate command logs by snapshot",
                                     false, null);
        } else {
            m_truncationSnapshot = event.multipartTxnId;
            m_truncationSnapshotPerPartition = event.partitionTxnIds;
            m_replayAgent.returnAllSegments();
            changeState();
        }
        return new CountDownLatch(0);
    }
98192
def make_snapshot(self):
        
        filename = join(self.output_dir, '{:010d}.pkl'.format(self.model.i))
        output_utils.model_to_file(self.model, filename)
319552
@Override
	public void snapshotState(FunctionSnapshotContext context) throws Exception {
		sessionIdsPerSnapshot.add(new Tuple2<>(context.getCheckpointId(), sessionIds));
		sessionIds = new ArrayList<>(64);
		super.snapshotState(context);
	}
152244
def snapshot(self):
        """"""

        return dict((n, self._slots[n].get()) for n in self._slots.keys())
161731
function(tick) {
		var snapshot, changes, handlers, observers = this._observers;
		if (tick.type === edb.TICK_PUBLISH_CHANGES) {
			snapshot = gui.Object.copy(this._changes);
			this._changes = Object.create(null);
			gui.Object.each(snapshot, function(instanceid, propdef) {
				if ((handlers = observers[instanceid])) {
					changes = [];
					gui.Object.each(snapshot, function(id, props) {
						if (id === instanceid) {
							gui.Object.each(props, function(name, change) {
								changes.push(change);
							});
						}
					});
					handlers.forEach(function(handler) {
						handler.onchange(changes);
					});
				}
			});
		}
	}
854138
function(tick) {
		var snapshot, handlers, observers = this._observers;
		if (tick.type === edb.TICK_PUBLISH_CHANGES) {
			snapshot = gui.Object.copy(this._changes);
			this._changes = Object.create(null);
			gui.Object.each(snapshot, function(instanceid, changes) {
				if ((handlers = observers[instanceid])) {
					handlers.forEach(function(handler) {
						handler.onchange(changes);
					});
				}
			});
		}
	}
294343
public java.util.List<Snapshot> getSnapshots() {
        if (snapshots == null) {
            snapshots = new com.amazonaws.internal.SdkInternalList<Snapshot>();
        }
        return snapshots;
    }
369828
private Snapshot createMemorySnapshot(SnapshotDescriptor descriptor) {
    HeapBuffer buffer = HeapBuffer.allocate(SnapshotDescriptor.BYTES, Integer.MAX_VALUE);
    Snapshot snapshot = new MemorySnapshot(buffer, descriptor.copyTo(buffer), this);
    LOGGER.debug("Created memory snapshot: {}", snapshot);
    return snapshot;
  }
102855
@SafeVarargs
  public static void
  takeSnapshot(DataSource... dataSources)  {
    ensureDistinctDataSources(dataSources, Function.identity());
    foreach(dataSources, 
           (callInfo, dataSource) -> dataSource.executeQuery(callInfo, true), 
           CallInfo.create());
  }
513712
private void snapshotConfig() {
    synchronized (configManager) {
      maximum = configManager.getPoolMaximum(poolInfo, getType());
      minimum = configManager.getPoolMinimum(poolInfo, getType());
      weight = configManager.getWeight(poolInfo);
      priority = configManager.getPriority(poolInfo);
      preemptable = configManager.isPoolPreemptable(poolInfo);
      shareStarvingRatio = configManager.getShareStarvingRatio();
      minPreemptPeriod = configManager.getMinPreemptPeriod();
      starvingTimeForShare = configManager.getStarvingTimeForShare();
      starvingTimeForMinimum = configManager.getStarvingTimeForMinimum();
    }
  }
321751
def snapshot(self):
        """"""
        self._snapshot = {
            'muted': self.muted,
            'volume': self.volume,
            'stream': self.stream
        }
        _LOGGER.info('took snapshot of current state of %s', self.friendly_name)
236746
function snapshotSample () {
  var processArguments = process.argv;
  if (processArguments.length !== 2) {
    console.log('Incorrect number of arguments. No arguments should be given.');
    process.exit(1);
  } 

  console.log('Starting snapshotSample.');

  // Create the container
  createContainer(function () {

    // Upload a blob
    uploadBlockBlob(function () {

      // Create a snapshot of the blob
      createSnapshot(function (snapshot) {

        // Update the blob
        blockContent[1] = blockContentAlternative2;
        uploadBlockBlob(function () {

          // Create a snapshot of the modified blob
          getSnapshotToText(snapshot, function () {

            // List the blob and its snapshots
            listSnapshots(function () {

              // Delete the snapshots
              deleteSnapshots(function () {

                // Delete the container
                deleteContainer(function () {
                  console.log('Ending snapshotSample.');
                });
              });
            });
          });
        });
      });
    });
  });
}
768560
function( isUndo ) {
			var snapshots = this.snapshots,
				currentImage = this.currentImage,
				image, i;

			if ( currentImage ) {
				if ( isUndo ) {
					for ( i = this.index - 1; i >= 0; i-- ) {
						image = snapshots[ i ];
						if ( !currentImage.equalsContent( image ) ) {
							image.index = i;
							return image;
						}
					}
				} else {
					for ( i = this.index + 1; i < snapshots.length; i++ ) {
						image = snapshots[ i ];
						if ( !currentImage.equalsContent( image ) ) {
							image.index = i;
							return image;
						}
					}
				}
			}

			return null;
		}
1111447
public function restore(Snapshot $snapshot) : void
    {
        foreach ($snapshot as [$layer, $params]) {
            if ($layer instanceof Parametric) {
                $layer->restore($params);
            }
        }
    }
631061
def snapshot(*args)
      sn = Snapshot.new self, *args
      if block_given?
        begin
          yield sn
        ensure
          sn.release
        end
      else
        sn
      end
    end