Categories
Mastering Development

How to make a rigid alternative constraint based on earn value

i want to make a rescheduling model. I have 2 modes in tuple, I declare it using ID, I want to make a constraint if the costprod * duration in present’s mode in day 1-7 <= earn value than choose mode 2. But I think something missing in model. but I didn’t know where is […]

Categories
Mastering Development

Airflow:How to select bigquery table data in to dataframe

I am new in airflow. I created my first dag below, selecting data from google big query table & saving it to a pd dataframe. Need suggestion in below Where should i provide connection id of my big query As pd.read_gbq requires authintication, how to handle same in airflow dags import os import pandas as […]

Categories
Mastering Development

Converting a string to integers and assigning them to variables

Example I have line that is "3 2 11" . I want to split that into 3 so "3" , "2", "11" and the convert them into integers and assign them into individual variables my code so far below: import sys for line in sys.stdin: print(line, end="") snailHasNotEscaped = True days = 0 totalMs = […]

Categories
Mastering Development

Optimize a large in clause from list of integer

I would like to join on a large list of integers in SQL Server instead of a big IN clause. My query : SELECT mmr.idContact, mmR.idQuestion as IdQuestion, MIN(mmR.idResponse) AS IdResponse FROM MatchResponses mmR –JOIN Contact c on c.idContact = mmR.idContact //to show the linked ids JOIN Contact c on c.idSpecific in (1,2,3…10000) WHERE myId= […]

Categories
Mastering Development

Using random.choice for discord.py within embed

I am not sure if this is the correct code, but I am trying to return a random rating when an user types the command "?rating". I have created a variable_list containing the rating numbers that the bot is supposed to return. But I am also using embed. And I am not able to get […]

Categories
Database Development

In Teradata SQL how to get random number between a pair, coming from field/column?

I am recently got stuck upon a simple problem in Teradata: how to get random number between a pair of number coming from field/column? The function RANDOM( lower_bound , upper_bound ) apparently is restricted to only accept fix number rather than field / column name. –THIS ONE FAILS: WITH TRIAL(CATEGORY, VAL_MIN, VAL_MAX) AS ( SELECT […]

Categories
Mastering Development

How to format ids for a SQL query (need quotes around and commas in between)

I have a list of IDs that I want to put in a SELECT query such as id in (‘1′,’2’,’3’…etc) The list is: 32563 32653 32741 33213 539489 546607 546608 546608 547768 1160546 1200461 1202015 1202762 1203537 1203931 1204392 1204393 1204416 1204719 1204819 1205057 1205095 1205168 1206028 1206186 1206224 1227189 1302636 1316358 1336567 1360386 1378275 […]

Categories
Mastering Development

Match regex with overlap for DNA

I am trying to match DNA sequences that begin at the beginning or a multiple of 3 letters from the beginning, and start with either ATG or CGA, followed by 6,9,12,15,… letters and ending in AGT. The following code only gets one of the matches (the longest one). I have looked into "positive lookaheads" (e.g. […]

Categories
Mastering Development System & Network

CVE-2021-26855 Explanation

I patched on 3/3 This just looks like we were probed and not compromised, can some one please confirm? I’m not sure how to interpret this. Ran Test-Hafnium.ps1 Contents of CVE-2021-26855.log #TYPE Selected.System.Management.Automation.PSCustomObject "DateTime","AnchorMailbox" "2021-03-02T09:50:56.279Z","ServerInfo~a]@Exchange001.contoso.com:444/autodiscover/autodiscover.xml?#" edit: The scan found the following entry 2021-03-02T09:50:56.279Z,5f083d36-1b8a-489b-9bdc-e3859dea08f4,15,1,2106,2,,Ecp,207.207.49.16,/ecp/y.js,,FBA,false,,,ServerInfo~a]@Exchange001.contoso.com:444/autodiscover/autodiscover.xml?#,ExchangeServicesClient/0.0.0.0,157.230.221.198,EXCHANGE001,200,200,,POST,Proxy,exchange001.contoso.com,15.00.0001.000,IntraForest,X-BEResource-Cookie,,,,347,362,,,0,0,,0,,0,,0,0,,0,295,0,0,17,0,274,0,0,0,1,0,294,1,274,4,21,21,295,,,,BeginRequest=2021-03-02T09:50:55.983Z;CorrelationID=;ProxyState-Run=None;FEAuth=BEVersion-1941962753;NewConnection=::1&0;BeginGetRequestStream=2021-03-02T09:50:55.983Z;OnRequestStreamReady=2021-03-02T09:50:55.998Z;BeginGetResponse=2021-03-02T09:50:55.998Z;OnResponseReady=2021-03-02T09:50:56.279Z;EndGetResponse=2021-03-02T09:50:56.279Z;ProxyState-Complete=ProxyResponseData;SharedCacheGuard=0;EndRequest=2021-03-02T09:50:56.279Z;,,,,,,CafeV1 In the following file "\exchange001.contoso.com\C$\Program Files\Microsoft\Exchange Server\V15\Logging\HttpProxy\Ecp\HttpProxy_2021030209-1.LOG" I did not find any […]

Categories
Database Development

UPDATE random rows

I’m working on creating a more efficient way to UPDATE random rows in a ticket allocation website we have. Currently, we pre populate the tickets table with ticket numbers in subsequent order, i.e 1,2,4 etc. Each ticket number being a row. When a customer then places their order we use the following SQL query to […]