Forrest99 commited on
Commit
edbccc3
·
verified ·
1 Parent(s): 5831141

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -25
app.py CHANGED
@@ -306,31 +306,30 @@ CODE_SNIPPETS = [
306
  "db.close()",
307
  "db.run('CREATE TABLE table (column TEXT)')",
308
  "db.run('DROP TABLE table')",
309
- "db.get('SELECT name FROM sqlite_master WHERE type = \"table\" AND name = ?', ['table'], (err, row) => {})",
310
- "db.all("SELECT name FROM sqlite_master WHERE type = \"table\"", ...)",
311
- "const { Model } = require('sequelize'); Model.create({ column: 'value' })",
312
- "Model.findAll({ where: { column: 'value' } })",
313
- "Model.destroy({ where: { id: 1 } })",
314
- "Model.update({ column: 'new_value' }, { where: { id: 1 } })",
315
- "class Table extends Model {}",
316
- "class ChildTable extends ParentTable {}",
317
- "Model.init({ id: { type: DataTypes.INTEGER, primaryKey: true } }, { sequelize })",
318
- "Model.init({ column: { type: DataTypes.STRING, unique: true } }, { sequelize })",
319
- "Model.init({ column: { type: DataTypes.STRING, defaultValue: 'default' } }, { sequelize })",
320
- "const csv = require('csv-parser'); fs.createReadStream('data.csv').pipe(csv())",
321
- "const xlsx = require('xlsx'); xlsx.writeFile(data, 'data.xlsx')",
322
- "const json = JSON.stringify(data)",
323
- "const workbook = xlsx.readFile('data.xlsx')",
324
- "const mergedWorkbook = xlsx.utils.book_append_sheet(workbook1, workbook2)",
325
- "xlsx.utils.book_append_sheet(workbook, worksheet, 'New Sheet')",
326
- "const style = workbook.Sheets['Sheet1']['A1'].s",
327
- "const color = workbook.Sheets['Sheet1']['A1'].s.fill.fgColor",
328
- "const font = workbook.Sheets['Sheet1']['A1'].s.font",
329
- "const cellValue = workbook.Sheets['Sheet1']['A1'].v",
330
- "workbook.Sheets['Sheet1']['A1'].v = 'New Value'",
331
- "const { width, height } = require('image-size')('image.png')",
332
- "const sharp = require('sharp'); sharp('image.png').resize(200, 200)"
333
-
334
 
335
 
336
 
 
306
  "db.close()",
307
  "db.run('CREATE TABLE table (column TEXT)')",
308
  "db.run('DROP TABLE table')",
309
+ "db.get('SELECT name FROM sqlite_master WHERE type = \"table\" AND name = ?', ['table'], (err, row) => {})",
310
+ "db.all('SELECT name FROM sqlite_master WHERE type = \"table\"', (err, rows) => {})",
311
+ "const { Model } = require('sequelize'); Model.create({ column: 'value' })",
312
+ "Model.findAll({ where: { column: 'value' } })",
313
+ "Model.destroy({ where: { id: 1 } })",
314
+ "Model.update({ column: 'new_value' }, { where: { id: 1 } })",
315
+ "class Table extends Model {}",
316
+ "class ChildTable extends ParentTable {}",
317
+ "Model.init({ id: { type: DataTypes.INTEGER, primaryKey: true } }, { sequelize })",
318
+ "Model.init({ column: { type: DataTypes.STRING, unique: true } }, { sequelize })",
319
+ "Model.init({ column: { type: DataTypes.STRING, defaultValue: 'default' } }, { sequelize })",
320
+ "const csv = require('csv-parser'); fs.createReadStream('data.csv').pipe(csv())",
321
+ "const xlsx = require('xlsx'); xlsx.writeFile(data, 'data.xlsx')",
322
+ "const json = JSON.stringify(data)",
323
+ "const workbook = xlsx.readFile('data.xlsx')",
324
+ "const mergedWorkbook = xlsx.utils.book_append_sheet(workbook1, workbook2)",
325
+ "xlsx.utils.book_append_sheet(workbook, worksheet, 'New Sheet')",
326
+ "const style = workbook.Sheets['Sheet1']['A1'].s",
327
+ "const color = workbook.Sheets['Sheet1']['A1'].s.fill.fgColor",
328
+ "const font = workbook.Sheets['Sheet1']['A1'].s.font",
329
+ "const cellValue = workbook.Sheets['Sheet1']['A1'].v",
330
+ "workbook.Sheets['Sheet1']['A1'].v = 'New Value'",
331
+ "const { width, height } = require('image-size')('image.png')",
332
+ "const sharp = require('sharp'); sharp('image.png').resize(200, 200)"
 
333
 
334
 
335