Skip to content

Commit

Permalink
Refresh and optimize legacy code
Browse files Browse the repository at this point in the history
  • Loading branch information
supratimdasinfo committed Feb 21, 2024
1 parent 57e9559 commit 918e2db
Show file tree
Hide file tree
Showing 13 changed files with 641 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ For the Python programming approach, follow the steps in the README.
You can easily install the **magnetocaloric** package using pip. Open your command-line interface and run the following command:

```shell
pip install magnetocaloric==1.7.0
pip install magnetocaloric==1.7.1
```

This will install the specified version of the **magnetocaloric** package.
Expand Down Expand Up @@ -129,7 +129,7 @@ Explanation of the `interpol` function parameters:
- `final_val`: Define the maximum applied field value for data interpolation.
- `interval`: Set the interval for interpolation.
- `interpol_type`: Choose the interpolation type. For linear interpolation, use `'lin'`. For polynomial interpolation, use `'poly'`.
- `interpolation`: For polynomial interpolation, choose between `'auto'` (automatically finds the best degree) or `'manual'` (set the degree manually using the `deg` argument).
- `interpol_mode`: For polynomial interpolation, choose between `'auto'` (automatically finds the best degree) or `'manual'` (set the degree manually using the `deg` argument).
- `deg`: If using manual polynomial interpolation, specify the degree as an integer.

> **Warning**
Expand Down
4 changes: 2 additions & 2 deletions build/lib/magnetocaloric/mce_2D_Operations/T_FWHM_RCP.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def T_FWHM_RCP(n, Label_one, six_entropy_change_con):
half_max_entropy_at_T_con.append(abs(half_max_entropy_at_T))
half_max_entropy_at_T_con.append(six_entropy_change_con[0][n - 2])

# Find the temperature range for FWHM.
# Find the temperature range for FWHM
for l in range(len(half_max_entropy_at_T_con) - 1):
l_th = half_max_entropy_at_T_con[l]
l_th_plus_one = half_max_entropy_at_T_con[l + 1]
Expand All @@ -59,7 +59,7 @@ def T_FWHM_RCP(n, Label_one, six_entropy_change_con):
T_right = l_th_plus_one

T_FWHM = T_right - T_left
RCP = T_FWHM * del_S_peak
RCP = abs(T_FWHM) * abs(del_S_peak)
T_FWHM_con.append(round(T_FWHM, 4))
RCP_con.append(round(RCP, 4))

Expand Down
Binary file removed dist/magnetocaloric-1.7.0.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added dist/magnetocaloric-1.7.1.tar.gz
Binary file not shown.
273 changes: 273 additions & 0 deletions exe_activation_generator/Activation Key Generator.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,273 @@
<!DOCTYPE html>
<!-- saved from url=(0040)http://mceactivation.great-site.net/?i=1 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: "Helvetica Neue", Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-image: url('Scr.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
body::before {
content: "";
min-height: 100vh;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black overlay */
z-index: -1; /* Place the overlay behind the content */
}
::-webkit-scrollbar {
width: 0px;
}

::-webkit-scrollbar-track {
background-color: black;
}

::-webkit-scrollbar-thumb {
background-color: #333; /* Dark gray color */
border-radius: 6px;
}

#container {
background-color: #d2dae2;
border-radius: 10px;
box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
z-index: 5;

padding: 35px;
padding-top: 40px;
padding-bottom: 40px;
width: 60%;
max-width: 400px;


box-sizing: border-box;
}
#github{
display: block;
background-color: #000;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
width: 40%;
font-size: 15px;
max-width: 300px;
max-height: 530px;
min-height: 530px;
border: 4px solid #d2dae2;
border-right: none;
padding-top: 0;
overflow-y: scroll;
overflow-x: hidden;

}
#loghead{
position: sticky;
top: 0;
left: 0;
background-color: #d2dae2;
padding: 5px;
color: #000;

}
#log{
display: block;
overflow-y: scroll;
overflow-x: hidden;
padding: 15px;
text-align: left;
color: #fff;
}
#file_link{
position: sticky;
bottom: 0;
left: 0;
background-color: #d2dae2;
padding: 5px;
color: #000;

}
h1 {
margin: 0 0 5x;
margin-top: 0;
font-size: 20px;
text-align: left;
}
h2 {
margin: 0 0 10px;
position: relative;
top: -10px;
text-align: left;
}
#mb{
display: none;
margin: auto;
width: 80%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

label {
display: block;
font-weight: bold;
margin-bottom: 5px;
}

input {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}

button {
width: 100%;
padding: 10px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}

button:hover {
background-color: #0056b3;
}

link{
font-size: 15px;

}
footer {
text-align: right;
background-color: transparent;
padding: 10px 0;
position: fixed;
bottom: 0;
width: 95%;
margin: auto;
}

footer p {
margin: 0;
font-size: 14px;
color: #d2dae2;
}
.heart {
color: #d2dae2;
}

@media(max-width: 450px){
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-image: none;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
#mb{
display: block;
margin: auto;
width: 80%;
position: absolute;
color: #d2dae2;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

#container {
display: none;
background-color: #d2dae2;
border-radius: 5px;
box-shadow: 0 0 0px rgba(0, 0, 0, 0.1);
padding: 20px;
padding-top: 40px;
padding-bottom: 40px;
width: 90%;
margin: 5%;
max-width: 400px;
min-width: 300px;
box-sizing: border-box;
}
#github{
display: none;
}
footer{
display: none;
}
}

</style>
<title>Activation Key Generator</title>
</head>
<body>
<div id="mb">
<h3>😖 This content is only visible on desktop!</h3>
<p style="font-size: 10px;">Explore the Magnetocaloric mcepy project on GitHub: <a style="color:#d2dae2;" href="https://github.com/supratimdasinfo/magnetocaloric.mcepy">Magnetocaloric mcepy Repository</a></p>
</div>

<div id="github">
<div id="loghead">
<p id="audit" style="margin: 0; font-weight: bold;"> ❍ audit log</p>

</div>
<div id="log">
No records found.
</div>
<div id="file_link">
<p style="margin:0px; font-size: 12px;">Download the Latest Version – Click to Access on Google Drive <a style="color: #000; font-size: 13px;" href="" class="download-button">📁 magnetocaloric.exe</a></p>


</div>

</div>
<div id="container">
<h1>🅜 magnetocaloric.exe</h1><h2>
</h2><h2>Activation Key Generator</h2><br>

<form id="contact-form" action="http://mceactivation.great-site.net/access.php" method="post">
<label for="email">Email:</label>
<input type="email" id="email" name="email" placeholder="example@gmail.com" required="">

<label for="password">Password:</label>
<input type="password" id="password" name="password" placeholder="MAgneto@4321" required="">

<label for="date">Valid Until:</label>
<input type="date" id="date" name="date" required="">
<p>The generated activation key will remain active until the specified date of tenure.</p>

<br><button type="submit" name="submit">Generate Activation Key</button>
<p style="font-size: 10px;">Explore the Magnetocaloric mcepy project on GitHub: <a href="https://github.com/supratimdasinfo/magnetocaloric.mcepy">Magnetocaloric mcepy Repository</a></p>
</form>

</div>
<footer>

<p>© 2023 Supratim Das. All Rights Reserved</p>
</footer>



</body></html>
53 changes: 53 additions & 0 deletions exe_activation_generator/access.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
//$con = mysqli_connect('localhost', 'id21136245_supratim0707','#SUpratim@0707');
//mysqli_select_db($con, 'id21136245_mceactivation');
//$con = mysqli_connect('localhost', 'root','','login');
$con = mysqli_connect('sql201.infinityfree.com', 'if0_34799485','qHVg8EPV8li','if0_34799485_mceactivation');
if (!$con) {
?>
<script type="text/javascript">
alert('Error Found')
</script>
<?php

}else {
$email = $_POST["email"];
$password = $_POST["password"];
$end_date = $_POST["date"];
$ac = "SELECT * FROM `mceaccess` WHERE email = '$email' && password = '$password'";
$timestampdb = date("Y-m-d H:i:s");
$result = mysqli_query($con, $ac);
$num = mysqli_num_rows($result);
if ($num >= 1){
$key_nd_dif = generateActivationKey($end_date);
$activationKeys = $key_nd_dif[0][0] . ", " . $key_nd_dif[0][1];
$num_day = $key_nd_dif[1];
$status = "Key Generated Successfully!";
$rec = "INSERT INTO `mceaccessrec`(`email`, `validity`, `date`, `status`) VALUES ('$email', '$num_day', '$timestampdb', '$status')";
$str = mysqli_query($con, $rec);
echo '<div class="confirmation">
<p>Activation Key Generated Successfully!</p>
<span class="tick-mark">&#9996;</span>
<p>Activation Keys : <span>' . $activationKeys . '</span></p>
</div><style>.confirmation {position: absolute; top: 50%; left: 50%;transform: translate(-50%, -50%); width: 50%; margin: auto; text-align: center;background-color: #f2f2f2;border: 1px solid #ccc;padding: 20px;border-radius: 10px;} .tick-mark {font-size: 36px;color: #00a300;}</style>';
}else{
$key_nd_dif = generateActivationKey($end_date);
$num_day = $key_nd_dif[1];
$status = "Authentication failed!";
$rec = "INSERT INTO `mceaccessrec`(`email`, `validity`, `date`, `status`) VALUES ('$email', '$num_day', '$timestampdb', '$status')";
$str = mysqli_query($con, $rec);
echo '<div class="confirmation">
<p>Authentication failed!</p>
<span class="tick-mark">&#128546;</span>
</div><style>.confirmation {position: absolute; top: 50%; left: 50%;transform: translate(-50%, -50%); width: 50%; margin: auto; text-align: center;background-color: #f2f2f2;border: 1px solid #ccc;padding: 20px;border-radius: 10px;} .tick-mark {font-size: 36px;color: red;}</style>';
}
}
function generateActivationKey($end_date) {

'''
--- generateActivationKey
'''

}

?>
1 change: 1 addition & 0 deletions exe_activation_generator/google5e6be91dc615fcf6.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-site-verification: google5e6be91dc615fcf6.html
Loading

0 comments on commit 918e2db

Please sign in to comment.