radboy 0.0.718__py3-none-any.whl → 0.0.721__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of radboy might be problematic. Click here for more details.

radboy/DB/rad_types.py CHANGED
@@ -57,6 +57,8 @@ class dec1(TDecimal):
57
57
  value=f"{value:.3f}"
58
58
  return super().__new__(self,value)
59
59
 
60
+ def chunker(l,size):
61
+ return [l[i:i+size] for i in range(0,len(l),int(size))]
60
62
 
61
63
  class stre(str):
62
64
  '''String Extended to include operators for some useful functionality.'''
radboy/TasksMode/Tasks.py CHANGED
@@ -1162,7 +1162,6 @@ def generateWhiteNoise():
1162
1162
  except Exception as e:
1163
1163
  print(e)
1164
1164
 
1165
-
1166
1165
  class TasksMode:
1167
1166
  def networth_ui(self):
1168
1167
  NetWorthUi()
@@ -5677,6 +5676,12 @@ where:
5677
5676
  'exec':lambda self=self: OAR.CountTo(),
5678
5677
  }
5679
5678
  count+=1
5679
+ self.options[str(uuid1())]={
5680
+ 'cmds':["#"+str(count),*[i for i in generate_cmds(startcmd=["add"],endCmd=["recycle entries",'rec. entry',])]],
5681
+ 'desc':f"add new default recycle entries",
5682
+ 'exec':lambda self=self:self.addRecycleEntries(),
5683
+ }
5684
+ count+=1
5680
5685
  #self.product_history=
5681
5686
 
5682
5687
  '''
@@ -5754,7 +5759,38 @@ where:
5754
5759
  except Exception as e:
5755
5760
  print(e)
5756
5761
  print(type(command),f"{command}")
5762
+
5757
5763
  break
5764
+ def addRecycleEntries(self):
5765
+ defaultEntries='''Aluminum Beverage Can [http://www.kadealu.com/] Stubby Container Volume: 250ml Can Ht: 92mm Can Body Diam: 66mm Can End Diam. 52/58mm Net Wt: 9.3/10.g
5766
+ Aluminum Beverage Can [http://www.kadealu.com/] Standard Container Volume: 330ml Can Ht: 116mm Can Body Diam: 66mm Can End Diam. 52mm Net Wt: 10.6g
5767
+ Aluminum Beverage Can [http://www.kadealu.com/] Standard Container Volume: 355ml Can Ht: 122mm Can Body Diam: 66mm Can End Diam. 52mm Net Wt: 11.5g
5768
+ Aluminum Beverage Can [http://www.kadealu.com/] Standard Container Volume: 475ml Can Ht: 158mm Can Body Diam: 66mm Can End Diam. 52mm Net Wt: 13g
5769
+ Aluminum Beverage Can [http://www.kadealu.com/] Standard Container Volume: 500ml Can Ht: 168mm Can Body Diam: 66mm Can End Diam. 52mm Net Wt: 13.4g
5770
+ Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 250ml Can Ht: 115mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 11.4g
5771
+ Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 270ml Can Ht: 123mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 13.4g
5772
+ Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 310ml Can Ht: 138.8mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 9.5g
5773
+ Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 330ml Can Ht: 147mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 10.8g
5774
+ Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 355ml Can Ht: 156mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 10.8g
5775
+ Aluminum Beverage Can [http://www.kadealu.com/] Slim Container Volume: 180ml Can Ht: 104mm Can Body Diam: 53mm Can End Diam. 50mm Net Wt: 8.8g
5776
+ Aluminum Beverage Can [http://www.kadealu.com/] Slim Container Volume: 250ml Can Ht: 134mm Can Body Diam: 53mm Can End Diam. 50mm Net Wt: 9.1g
5777
+ Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 200ml Can Ht: 96mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 11.4g
5778
+ '''.split("\n")
5779
+ with Session(ENGINE) as session:
5780
+ for line in defaultEntries:
5781
+ check=session.query(Entry).filter(or_(
5782
+ Entry.Barcode.icontains(line),
5783
+ Entry.Code.icontains(line),
5784
+ Entry.Name.icontains(line),
5785
+ )).first()
5786
+ if check is None:
5787
+ e=Entry(Barcode=line.lower(),Code=line.upper(),Name=line)
5788
+ session.add(e)
5789
+ else:
5790
+ session.delete(check)
5791
+ #e=Entry(Barcode=line.lower(),Code=line.upper(),Name=line)
5792
+ #session.add(e)
5793
+ session.commit()
5758
5794
 
5759
5795
  def promptForOp(self,n,total,entryIdList,barcode):
5760
5796
  with Session(ENGINE) as session:
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.718'
1
+ VERSION='0.0.721'
Binary file
@@ -145,6 +145,16 @@ Here:
145
145
  'desc':f'obtain the area of a circle using diameter',
146
146
  'exec':lambda: areaCircleDiameter(),
147
147
  },
148
+ f'{uuid1()}':{
149
+ 'cmds':[i for i in generate_cmds(startcmd=['sudoku',],endCmd=['candidates','cd'])],
150
+ 'desc':f'obtain candidates for sudoku cell',
151
+ 'exec':lambda: sudokuCandidates(),
152
+ },
153
+ f'{uuid1()}':{
154
+ 'cmds':[i for i in generate_cmds(startcmd=['sudoku',],endCmd=['candidates auto','cda'])],
155
+ 'desc':f'obtain candidates for sudoku cell for the whole grid',
156
+ 'exec':lambda: candidates(),
157
+ },
148
158
  f'{uuid1()}':{
149
159
  'cmds':['herons formula','hrns fmla'],
150
160
  'desc':f'''