- First download
dbfpy: http://sourceforge.net/projects/dbfpy/files/latest/download?source=files - Then install:
sudo python setup.py install
To convert DBF file to CSV:
./dbf2csv database.dbf
| app.directive('dynamicHeight', function() { | |
| return { | |
| require: ['^ionSlideBox'], | |
| link: function(scope, elem, attrs, slider) { | |
| scope.$watch(function() { | |
| return slider[0].__slider.selected(); | |
| }, function(val) { | |
| //getting the heigh of the container that has the height of the viewport | |
| var newHeight = window.getComputedStyle(elem.parent()[0], null).getPropertyValue("height"); | |
| if (newHeight) { |
| def splitDataFrameList(df,target_column,separator): | |
| ''' df = dataframe to split, | |
| target_column = the column containing the values to split | |
| separator = the symbol used to perform the split | |
| returns: a dataframe with each entry for the target column separated, with each element moved into a new row. | |
| The values in the other columns are duplicated across the newly divided rows. | |
| ''' | |
| def splitListToRows(row,row_accumulator,target_column,separator): | |
| split_row = row[target_column].split(separator) |
| package cc.cubone.turbo.core.bluetooth; | |
| /** | |
| * Interface definition for a callback to be invoked when bluetooth state changed. | |
| */ | |
| public interface BluetoothCallback { | |
| /** | |
| * Called when the bluetooth is off. | |
| */ |
| pm2 start app.js --interpreter ./node_modules/.bin/babel-node |
| package demo.plain; | |
| import org.keycloak.OAuth2Constants; | |
| import org.keycloak.admin.client.CreatedResponseUtil; | |
| import org.keycloak.admin.client.Keycloak; | |
| import org.keycloak.admin.client.KeycloakBuilder; | |
| import org.keycloak.admin.client.resource.RealmResource; | |
| import org.keycloak.admin.client.resource.UserResource; | |
| import org.keycloak.admin.client.resource.UsersResource; | |
| import org.keycloak.representations.idm.ClientRepresentation; |
dbfpy: http://sourceforge.net/projects/dbfpy/files/latest/download?source=filessudo python setup.py installTo convert DBF file to CSV:
./dbf2csv database.dbf
| import asyncore | |
| import socket | |
| import threading | |
| class ChatServer(asyncore.dispatcher): | |
| def __init__(self, host, port): | |
| asyncore.dispatcher.__init__(self) |
| class ProgressPercentage(object): | |
| ''' Progress Class | |
| Class for calculating and displaying download progress | |
| ''' | |
| def __init__(self, client, bucket, filename): | |
| ''' Initialize | |
| initialize with: file name, file size and lock. | |
| Set seen_so_far to 0. Set progress bar length | |
| ''' | |
| self._filename = filename |
| layer=$1 | |
| get_regions () { | |
| echo $(aws ssm get-parameters-by-path --region "us-east-1" --path /aws/service/global-infrastructure/services/lambda/regions --query 'Parameters[].Value' --output text | tr '[:blank:]' '\n' | grep -v -e ^cn- -e ^us-gov- | sort -r) | |
| } | |
| regions=$(get_regions) | |
| get_versions () { | |
| echo $(aws lambda list-layer-versions --layer-name "$layer" --region "$region" --output text --query LayerVersions[].Version | tr '[:blank:]' '\n') | |
| } |
| from sklearn.utils.class_weight import compute_class_weight | |
| pass_results = plays_df.loc[plays_df['passResult'].isin(category_lookup.keys()), 'passResult'] | |
| all_labels = pass_results.apply(lambda lbl: category_lookup[lbl]) | |
| # Create class weights to counter-balance classification during training | |
| y = np.stack(all_labels).argmax(axis=1) | |
| classes = np.unique(y) | |
| weights = compute_class_weight('balanced', classes=classes, y=y) | |
| class_weights = {k: v for k, v in zip(classes, weights)} | |
| print('Class weights:', class_weights) |