#this is def 70% analysis
Explore tagged Tumblr posts
Text
Analysis of a Boss Kill: A15 RELICLESS Sentinel 8 OP
To start off, you should watch this video. It's rad as fuck. High level Arknights play literally fucks. But I really want to talk about the Phase 1 kill because It's a great example of a million different factors coming together. So, let's talk Sentinel for a moment.
Sentinel doesn't introduce us to a Crazelyseon with fancy new abilities or anything, except for it's different movement pattern. This is actually a boon for this Phase 1 kill, as it means you don't need to retreat and redeploy the operators later or wait for the boss to cycle back. But it does change one thing in particular: the Dimensional Anchoring Pylon. It now makes the boss vulnerable for five seconds instead of the traditional 10. You have an extremely limited amount of time to get your damage in, and this means that your options for DPS are extremely limited. Given Crazelyseon's modest DEF of 1,875 and its fairly meaty RES of 50, this leaves one choice as the prime DPS operator: Degenbrecher.
Degenbrecher can do her entire S3 in that five second window, since the 10 slashes take about 3s to come out and the final slash comes out in less than 2. This is basically unmatched for the conditions we need. Wis'adel, if you time it almost exactly right, can get two attacks off if she is not on a seedbed, for comparison. Degenbrecher works really well with buffs of any kind, and two buffers are used in this clear: Heidi, and Shu. Shu is fairly self-explanatory since in a low-op clear she is a good source of healing because Crazelyseon does insane damage on A15, but Heidi might need some explanation.
Why Heidi? It's pretty much all about skill cycles, although she does also do a pretty good job of buffing too: the 9% Attack buff from her Talent does a lot of work in a game-mode where all Operators have 23% more ATK from the IS4 buffs. The Dimensional Anchoring Pylon takes 40 seconds to charge fully, and makes Crazelyseon vulnerable for 5 seconds. The Pylon will start immediately charging after the skill is used (EDITING NOTE: Missed this the first time because the bar was stuck in the green of a deploy tile!), so the cycle is 40 seconds.
Since Heidi's skill is active for 10 seconds and has a 20 SP charge, meaning she will have a cycle time of 30 seconds. Good!
Sora's cycle is 75 seconds typically (30 + 45) which is quite bad for what we're doing. If she gets the refund, she will have a cycle time of 48 seconds, which is just shy to have her skill ready in time. In addition...Sora is actually less impactful! With her talent and her Inspiration buff, Heidi gives 687 ATK to Degenbrecher, while Sora only provides 541 ATK. Sora's benefit is her long duration, not the size of her buff! So she's flatly worse in every regard.
Civilight Eterna's skill cycle is 70 seconds, so too long for what we're doing. Even though she might also do some true damage, she provides less ATK to Degenbrecher and the true damage isn't enough to make up the skill cycle lost.
Skadi Alter does provide more ATK at 760 and the benefits of true damage on her skill. However, tragically, her skill cycle is still too long at 55 seconds. "Does the five seconds matter?" Yes! If you watch the video closely, the third burst on the boss (the first one for phase 2) finished just before the boss teleports! You're on a timer to get your damage in, and the extra 10 seconds Skadi Alter would need over two bursts can't be spared. There is also the additional factor that this is IS, and Heidi is a 5-star operator compared to Skadi Alter's 6-stars. This means she costs 6 less Hope overall, and Hope management is really important in IS4 as a whole.
So basically, Heidi is the only buffer that will work here. Heidibrecher is basically the gold standard for A15 Sentinel as a result. I hope they're fucking nasty.
Ela is also a really powerful damage support here, not just because of the 35% Fragile she provides powering through the boss's 15% Damage Resistance, but she is also important as a sub DPS to Degenbrecher. Thanks to the attack interval reduction on her S3 reducing her attack interval to 0.5 seconds, she can actually attack 9-10 times depending on timing against the boss. She doesn't do as much damage as Degenbrecher, only about 35% of Degenbrecher's damage, but that 35% damage is important.
Heidibrecher alone isn't enough to defeat the boss. Even with Shu's help, the combo only does 176,713 damage in total over the two bursts, only 75.3% of the damage needed to force a phase change. You could wait and do a third burst since you know you have the time, but Crazelyseon's pattern is way more erratic in Sentinel, so it's best to get it done in the time you can. Ela ends up making the damage in damage.
This phase change is insanely close: Ela and Degenbrecher do, together, 238,738 damage to the boss. It's a combination that does 102% of the bosses HP. You only have 4,844 damage in overkill. It's impressively clean. You can drop exactly one Ela attack, but not anymore than that.
The clear in general fucks and I really enjoy it. Angelina is a deeply silly operator and the combination of Ela / Wis'adel / Ines / Angelina to effectively deal with all the enemies is super cool. Trapping Shattered Champions in the blue box gives me fucking stomach acid. They move at 2.5 tiles a second! That has to be insanely hard to just eyeball.
The math for everyone will be down below. I don't know how many decimals Arknights keeps track of, so there is some very small rounding errors. For example, my final attack damage for the first burst's Degenbrecher final attack damage is one point off what is displayed. That's a rounding error of 0.00985% but it felt wrong to not mention it! I am a doll most at home in spreadsheets after all.
Degenbrecher ATK (Base): 758 Degenbrecher ATK (Stage Buff): 932.34 Heidi ATK (Base): 381 Heidi ATK (Stage Buff): 468.63 Heidi ATK (Trait + Talent Buff): 548.2971 Heidi Inspiration Buff: 603.12681 Degenbrecher ATK (Heidi Talent Buff): 1,016.2506 Degenbrecher Total ATK: 1,619.37741 Crazelyseon, the Ascedent of Cosmoi DEF: 1,875 Crazelyseon, the Ascendent of Cosmoi DEF (Talent): 1,312.5 Crazelyseon, the Ascendent of Cosmoi DR: 0.85x Ela Fragile: 1.35x Degenbrecher Slash Damage: 6,749.49007086440625 Total Slash Damage: 67,494.9007086440625 Final Attack Damage: 10,147.7383840861875 Total Skill Damage: 77,642.53909273025
w Shu
Heidi ATK (All Buffs): 665.4546 Heidi Inspiration Buff: 732.00006 Degenbrecher ATK (All non-Inspiration Buffs): 1,249.3356 Degenbrecher ATK (Total): 1,981.33566 Degenbrecher Slash Damage: 8,628.4164777339375 Total Slash Damage: 86,284.164777339375 Final Attack Damage: 12,786.230785222125 Total Skill Damage: 99,070.3955625615
Total Damage from Degenbrecher: 176,712.93465529175
Ela ATK: 755 Ela ATK (Stage Buff): 928.65 Ela ATK (S3 + Heidi Buff): 1,848.0135 Ela ATK (Inspiration Buff): 2,451.14031 Ela ATK Damage: 2,911.267810305 Ela Attacks (Burst 1): 10 Ela Total Skill Damage: 29,112.67810305
Ela ATK (S3 + Shu + Heidi Buff): 2,080.176 Ela ATK (Inspiration Buff): 2,812.17606 Ela ATK Damage: 3,656.987.15193 Ela Attacks (Burst 2): 9 Ela Total Skill Damage: 32,912.88436737
Total Damage from Ela: 62,025.56247042
Total Damage to Crazelyeon: 238,738.49712616175
27 notes
·
View notes
Note
Revolver Ocelot for the character ask game?
ze ask game
How I feel about this character
I am def not the person you should come up and ask for like. sincere ocelot analysis he is a shitpost to meee he is the russian cowboy that meows at you and decided that the best way to stop the war economy was to pretend he was being possessed by the ghost of the blond british kid he kind of let get killed. to stop the war economy. metal gear has had advanced prosthetic arms since the mid 70s and here he is in 2009 going like no yea i took this dead guys hand. normal behavior
All the people I ship romantically with this character
iiiiiii dont give a shit about ocelot shipsss or alotta ships for that matterrr but i do think he wants bb carnally. i dont think bb wants him carnally but such is life
My non-romantic OTP for this character
i love my two divorced wives ocelot and kazuhira miller. There couuldve been something interesting with his and zeros partner ship but god do i not. zero is more a concept then he is a character
My unpopular opinion about this character
im always bad at this question... idk maybe my shitpost stance but that isnt really my opinion on his character i appreciate the people who explore him on a deeper level, thats just not me doing it
One thing I wish would happen / had happened with this character in canon.
I WISH HE MEOWED MORE TBH.
5 notes
·
View notes
Text
Analysis of HIV Rates Across Urbanization Levels: A Chi-Square Test Approach
This blog post explores the relationship between HIV rates and urbanization levels using a dataset from the Gapminder Project. The goal is to examine whether urbanization is associated with higher HIV rates, utilizing a statistical approach known as the Chi-Square Test.
The Dataset: Gapminder
The dataset used in this analysis is sourced from the Gapminder Project, which provides indicators of health, wealth, and development for various countries. Two key variables are analyzed:
Urbanization Rate: The 2009 estimated HIV prevalence percentage (ages 15-49) in urban populations, defined as people living in urban areas according to national statistical offices. These estimates are calculated using World Bank population estimates and urban ratios from the United Nations World Urbanization Prospects.
HIV Rate: The 2009 estimated HIV prevalence percentage (ages 15-49). This represents the estimated number of people living with HIV per 100 individuals in the age group 15-49.
The urbanization rate is categorized into three levels:
Low: Urbanization rate less than 40%
Medium: Urbanization rate between 40% and 70%
High: Urbanization rate greater than 70%
The HIV rate is categorized into two levels:
Low: HIV prevalence less than or equal to 1%
High: HIV prevalence greater than 1%
The Code: Chi-Square Test Implementation
import pandas as pd import numpy as np import scipy.stats as stats import seaborn as sns import matplotlib.pyplot as plt
# Load the GapMinder dataset
data = pd.read_csv('gapminder.csv')
# Convert relevant columns to numeric
data['urbanrate'] = pd.to_numeric(data['urbanrate'], errors='coerce') data['hivrate'] = pd.to_numeric(data['hivrate'], errors='coerce')
# Drop missing values in both variables
data = data.dropna(subset=['urbanrate', 'hivrate'])
# Categorize urbanrate into 3 levels
def categorize_urban(x): if x < 40: return 'Low' elif 40 <= x <= 70: return 'Medium' else: return 'High'
data['urban_cat'] = data['urbanrate'].apply(categorize_urban)
# Categorize HIVrate into 2 levels
data['hiv_binary'] = data['hivrate'].apply(lambda x: 'Low' if x <= 1 else 'High')
# Create a contingency table
ct = pd.crosstab(data['hiv_binary'], data['urban_cat']) colsum = ct.sum(axis=0) colpct = ct / colsum
# Chi-square test
chi2_result = stats.chi2_contingency(ct)
# Plotting
sns.set(style="whitegrid") sns.catplot(x="urban_cat", kind="bar", y="hiv_binary", data=data.replace({'hiv_binary': {'Low': 0, 'High': 1}}), order=['Low', 'Medium', 'High'], ci=None) plt.xlabel('Urbanization Category') plt.ylabel('Proportion of High HIV Rate')
# Display ct, colpct, chi2_result
print("Contingency Table (ct):") print(ct) print("\nColumn Percentage (colpct):") print(colpct) print("\nChi-square Test Result (chi2_result):") print(chi2_result)
# Bonferroni correction: 3 comparisons → adjust alpha
adjusted_alpha = 0.05 / 3 print("\nBonferroni adjusted alpha:", adjusted_alpha)
--- Low vs Medium ---
data['Low_vs_Medium'] = data['urban_cat'].map({'Low': 'Low', 'Medium': 'Medium'}) ct_lm = pd.crosstab(data['hiv_binary'], data['Low_vs_Medium']) chi2_lm = stats.chi2_contingency(ct_lm) print("\nLow vs Medium") print(ct_lm) print("p-value:", chi2_lm[1])
--- Low vs High ---
data['Low_vs_High'] = data['urban_cat'].map({'Low': 'Low', 'High': 'High'}) ct_lh = pd.crosstab(data['hiv_binary'], data['Low_vs_High']) chi2_lh = stats.chi2_contingency(ct_lh) print("\nLow vs High") print(ct_lh) print("p-value:", chi2_lh[1])
--- Medium vs High ---
data['Medium_vs_High'] = data['urban_cat'].map({'Medium': 'Medium', 'High': 'High'}) ct_mh = pd.crosstab(data['hiv_binary'], data['Medium_vs_High']) chi2_mh = stats.chi2_contingency(ct_mh) print("\nMedium vs High") print(ct_mh) print("p-value:", chi2_mh[1])
Chi-Square Test Results
The Chi-Square test was conducted to determine whether a significant association exists between urbanization levels and HIV rates. The contingency table (ct) shows the distribution of HIV rates across different urbanization levels, while the colpct variable represents the proportion of HIV rates within each urbanization category.
The Chi-Square test result provided the following:
Chi-square Statistic: 20.493160695864322
p-value: 3.547861817282873e-05
If the p-value is less than 0.05, the null hypothesis can be rejected, indicating a significant association between urbanization level and HIV rate.
Plotting
Bonferroni Correction
Since three comparisons were made (Low vs Medium, Low vs High, Medium vs High), a Bonferroni correction was applied to adjust the significance level. The adjusted alpha level for the Bonferroni correction is calculated as:
adjusted_alpha = 0.05 / 3
This correction ensures that the risk of Type I errors (false positives) is controlled across multiple comparisons.
Post-Hoc Comparison Results
To further explore where the differences lie, post-hoc comparisons between urbanization categories (Low vs Medium, Low vs High, Medium vs High) were conducted using Chi-Square tests. The results revealed the following:
Low vs Medium: 0.02652116237203948 Since the p-value (0.0265) is greater than the Bonferroni-adjusted alpha (0.0167), we fail to reject the null hypothesis for the Low vs Medium comparison. This suggests there is no significant difference in the distribution of HIV rates between the Low and Medium urbanization categories at the 0.0167 significance level.
Low vs High: 2.0521066221293767e-05 (approximately 0.00002) The p-value is much smaller than the Bonferroni-adjusted alpha (0.0167), so we reject the null hypothesis. This indicates a significant difference in the distribution of HIV rates between the Low and High urbanization categories, suggesting that HIV rates are associated with urbanization levels when comparing these two categories.
Medium vs High: 0.015189443929207654 The p-value (0.0152) is slightly smaller than the Bonferroni-adjusted alpha (0.0167), so we reject the null hypothesis. This suggests a significant difference in the distribution of HIV rates between the Medium and High urbanization categories, indicating an association between these urbanization levels and HIV rates.
0 notes
Note
dude I just wrote out a whole long ask about the Black Dog and the Tumblr app ate it. I'm annoyed. TLDR I'm so glad we have this blog, because while maybe 30% of the interest in a song comes from Taylor's life and who the muse is, the other 70% is in the incredible art she creates, and the feelings she captures in her lyrics. I wrote out a beautiful thing that I'm so pissed that Tumblr deleted, but essentially I can't believe that so many Tumblr Swifties AND reddit Swifties are all about muses analysis or dick powered jukebox and trying to convince others of their view, when really it's like, what about that feeling when someone you loved screws you over so badly you want to set fire to everything you used to use to identify yourself. I'm trying to move on, but you're inadvertently piercing holes in my heart. I will never open up to someone else the way I did for you. Old habits die not only screaming, but rattling their chains. Do you really not miss me? Do I really not cross your mind? You convinced me you were strong enough to stand with me, and you convinced me I needed you. God, you must hate me. God, you must not think of me at all. You slinked off and never have me a second thought after that. You used to share everything with me. We used to share a magic dreamland together. I hope you're aware of every single bit of pain you caused me. I hope it's shitty in the Black Dog.
Idgaf if it's about Matty, or Joe, or Jake, or fuckin Alexander Skarsgard (I made this point so much better in my original ask)!! I love this song and I love what this song means to me and I am so grateful for Taylor the artist. I'm not discounting the gossip part of it at all cuz God knows I love this shit but I really feel life Swifties did TTPD a disservice by being like "it's about Matty, ew, next". Like shit, pretend it's fictional!
See, this is something I strongly agree with and feel very passionately about across HER WHOLE body of work. Firstly, because as much as very specific incidents DO inspire her, I don't for one second believe that the exact events directly = the song. I think the *feeling* she experienced is what inspired the music. And that's why folkmore is so good, because that's what that boils down to - NBNC is a silly song right but it's also a topic Taylor understands emotionally and feels passionately about: revenge on bad men who she feels deserve it. But while it's most obvious on folkmore, there's elements of that in all her work. As funny as it is to joke about how OCD it is of Taylor to say "we can leave the Christmas lights up till January" like... realistically Taylor's staff sorts that out lmao so it's more about the vibe of "this is our place" than Taylor taking Christmas decor down on 10 Jan. And this is true for TTPD. Like yes, it's about what happened to her (so.... Matty) but it's also about all the feelings you talk about. I think, perhaps, that's why it's not really my favourite album of hers. Idgaf about it being about Matty but nothing quite like that's happened to me lol (sorry to Tay that it did to her, seems hella shitty) and the reason she's my favourite artist is that I apply her songs to my life and connect to them really strongly. I like music *I* connect to. Obviously not only music I connect to, but for the most part like if I'm listening to heavily lyrical music, I like to be able to connect to it personally idk. And I *will* say when I was going through my last serious breakup, I would've LOVED SLL. I fucking wish she had more like that because that whole "you'll find someone, I'm not the one" and even "and I'm pissed off at giving you all of that youth for free" stuff I *do* connect with. I've never hated someone I dated enough for TSMWEL lol and I'm not sure I've been sad enough about someone for The Black Dog lmao but I do think those are also great songs? When I was in my chaos era in my early 20s I def felt very ICDWIABH like "I'm so depressed I act like it's my birthday - every day!!!" idk. Anyway, I do think the beauty of Tay's music is in the lyrics and connecting to those lyrics and while the biographical stuff is interesting it's not (for me) the point.
It's also like why I personally prefer The Beatles to The Rolling Stones (although I like both) because The Beatles - especially the early stuff - wrote a lot of things semi-autobiographically (I don't think the Stones ever really did but I've never read a Mick biography so maybe but the songs are so vague that I don't really think so?) but it's about the VIBE. Like shit would happen to them but then they'd distill it into a vibe.
1 note
·
View note
Text
Best Social Media Marketing Company for Brand Success
Introduction:
In today’s digital-first world, businesses must leverage social media to stay relevant and competitive. A Social Media Marketing (SMM) company helps brands establish a strong online presence, engage with their audience, and drive conversions. From crafting compelling content to running targeted ad campaigns, these agencies use data-driven strategies to maximize ROI.
Why Businesses Need a Social Media Marketing Company?
Expertise and Strategy: Professionals analyze market trends and create tailored strategies.
Audience Engagement: Builds customer relationships through interactive content.
Brand Awareness: Increases visibility and credibility.
Performance Tracking: Monitors analytics for continuous improvement.
Lead Generation: Converts social interactions into potential sales.
Services Offered by a Social Media Marketing Agency:
1. Social Media Strategy Development
Custom plans based on business goals.
Competitor analysis to identify opportunities.
2. Content Creation & Management
Engaging posts, graphics, and videos.
Content calendar planning for consistency.
3. Paid Advertising & Campaigns
Facebook, Instagram, LinkedIn, and TikTok ad management.
A/B testing for better ad performance.
4. Influencer Marketing
Collaborating with industry influencers.
Brand advocacy through authentic endorsements.
5. Social Media Analytics & Reporting
Tracking engagement, reach, and conversions.
Adjusting strategies based on insights.
Case Studies:
Case Study 1: Boosting E-commerce Sales by 150%
Client: Influencer Impact Blueprint
Challenge: Low brand engagement and declining online sales. Solution:
Developed an influencer-driven marketing campaign on Instagram.
Created viral reels showcasing products.
Implemented Facebook retargeting ads
Results:
150% increase in sales within three months.
80% boost in website traffic.
60% rise in social media followers.
Case Study 2: Local Restaurant’s 300% Growth in Reservations
Client: ABC Bistro Challenge: Poor online visibility and low customer footfall. Solution:
Launched a geo-targeted campaign on Facebook and Instagram.
Promoted user-generated content and online reviews.
Hosted a giveaway contest to increase engagement.
Results:
300% increase in table reservations.
250% improvement in online interactions.
40% growth in repeat customers.
Case Study 3: B2B Brand’s LinkedIn Success
Client: DEF Tech Solutions Challenge: Low LinkedIn engagement and poor B2B lead generation. Solution:
Created thought leadership content and industry insights.
Used LinkedIn Ads for precise targeting.
Implemented lead nurturing strategies through LinkedIn messaging.
Results:
200% increase in LinkedIn followers.
5X improvement in lead conversions.
70% boost in engagement rates.
Conclusion:
A social media marketing company is essential for businesses looking to expand their online reach, improve engagement, and drive revenue. Whether you’re a startup or an established enterprise, investing in professional SMM services can significantly enhance your brand’s digital footprint. With the right strategy, social media marketing can transform businesses and lead to sustainable growth.
Digivik Business Solutions is a dynamic digital marketing agency based in Pune, specializing in SEO, social media marketing, content creation, PPC campaigns, and website development. We help businesses enhance their online presence, drive targeted traffic, and achieve measurable growth through innovative and data-driven marketing strategies. With a team of experienced professionals, we craft customized solutions tailored to each client's unique needs, ensuring maximum ROI and sustainable success in the digital space.
0 notes
Text
Machine Learning for Data Analysis week4
K Mean Clustering
A k-means cluster analysis was conducted to identify underlying subgroups of adolescents based on their similarity of responses on 9 variables that represent characteristics that could have an impact on paranoide personality disorder. Clustering variables included 8 binary variables and 1 quantitative variable
quantitative variable; 'AGE' # 'AGE'
8 binary variables; 'TAB12MDX' #nicotindependence in last 12 Months 'MAJORDEPLIFE' #Major depresion 'MAJORDEPP12' #Major depresion in last 12 Months 'S4AQ4A16' #attempted suicide 'S3BQ1A6' # ever used Cocaine or Crack 'OBCOMDX2'# Obsessiv_compulsive Per.disorde 'SCHIZDX2'# Schizoid per. disorder 'HISTDX2' # histrionic per. disorder
responce variable : 'PARADX2' # Paranoid per. disorder
All clustering variables were standardized to have a mean of 0 and a standard deviation of 1.
Data were randomly split into a training set that included 70% of the observations and a test set that included 30% of the observations .
A series of k-means cluster analyses were conducted on the training data specifying k=1-20 clusters, using Euclidean distance. The variance in the clustering variables that was accounted for by the clusters (r-square) was plotted for each of the 20 cluster solutions in an elbow curve to provide guidance for choosing the number of clusters to interpret. It was for me only a test
The elbow curve was inconclusive, suggesting that the 2, 8 and 12-cluster solutions might be interpreted. The results below are for an interpretation of the 6-cluster solution.
Canonical discriminant analyses was used to reduce the 9 clustering variable down a few variables that accounted for most of the variance in the clustering variables. A scatterplot of the first two canonical variables by cluster (Figure shown below) indicated that the observations in clusters overlap very much with the other clusters.
it s mybe better to do in 3 Clusters
I have changed cluster n in 3 Clusters
The means on the clustering variables showed that, compared to the other clusters, paranoide mean in cluster 2 is higher .
They had a relatively high likelihood histrionic per.disorder and obsessiv_compulsive Per.disorder. and schizoid per.disorder.
in Cluster 2 is suiside, nicotindependence, cocain use level higher then in other clusters
Cluster 0 has the lowest Paranoide level
we have to add number of people in each cluster
Cluster (0) 4866
Cluster (1) 4318
Cluster (2) 385
In order to externally validate the clusters, an Analysis of Variance (ANOVA) was conducting to test for significant differences between the clusters on grade paranoide . A tukey test was used for post hoc comparisons between the clusters. Results indicated significant differences between the clusters on paranoide
. The tukey post hoc comparisons showed significant differences between clusters on paranoide.
paranoide in cluster 2 had the highest paranoide (mean=0.563636 sd=0.496579), and cluster 0 had the lowest paranoide (mean=0.040, sd=0.19).
my code below:
code
code
code
code
code
code
code
code
code
######################
import numpy as np import matplotlib.pyplot as plt
Definiere die Funktionen
def f1(x): return 2*x + 3
def f2(x): return 3*x + 2
def f3(x): return 4*x + 5
def f4(x): return 5*x + 4
Definiere die Funktion für die Berechnung der neuen Steigung und y-Achsenabschnitt
def adjust_function(f, x_offset): slope = (f(x_offset + 1) - f(x_offset)) / 1 # Berechne die Steigung intercept = f(x_offset) - slope * x_offset # Berechne den y-Achsenabschnitt return lambda x: slope * x + intercept # Neue Funktion mit angepasster Steigung und y-Achsenabschnitt
Wähle den Offset-Punkt
x_offset = 2
Passe die Funktionen an
f1_adjusted = adjust_function(f1, x_offset) f2_adjusted = adjust_function(f2, x_offset) f3_adjusted = adjust_function(f3, x_offset) f4_adjusted = adjust_function(f4, x_offset)
Plotte die Funktionen
x_values = np.linspace(0, 10, 100) plt.plot(x_values, f1_adjusted(x_values), label='f1 adjusted') plt.plot(x_values, f2_adjusted(x_values), label='f2 adjusted') plt.plot(x_values, f3_adjusted(x_values), label='f3 adjusted') plt.plot(x_values, f4_adjusted(x_values), label='f4 adjusted')
plt.xlabel('x') plt.ylabel('f(x)') plt.title('Adjusted linear functions') plt.legend() plt.grid(True) plt.show()
#########
import numpy as np import matplotlib.pyplot as plt
Definiere die Funktionen
def f1(x): return 2*x + 3
def f2(x): return 3*x + 2
def f3(x): if x < 7: return 4x + 5 else: return 2x - 9 # Anpassen der Funktion 3 ab x=7
def f4(x): return 5*x + 4
Definiere die Funktion für die Berechnung der neuen Steigung und y-Achsenabschnitt
def adjust_function(f, x_offset): slope = (f(x_offset + 1) - f(x_offset)) / 1 # Berechne die Steigung intercept = f(x_offset) - slope * x_offset # Berechne den y-Achsenabschnitt return lambda x: slope * x + intercept # Neue Funktion mit angepasster Steigung und y-Achsenabschnitt
Wähle den Offset-Punkt
x_offset = 1
Passe die Funktionen an
f1_adjusted = adjust_function(f1, x_offset) f2_adjusted = adjust_function(f2, x_offset) f3_adjusted = f3 # Funktion 3 wird nicht angepasst, da sie unabhängig sein soll f4_adjusted = adjust_function(f4, x_offset)
Plotte die Funktionen
x_values = np.arange(1, 26) # X-Achse von 1 bis 25 plt.plot(x_values, f1_adjusted(x_values), label='f1 adjusted') plt.plot(x_values, f2_adjusted(x_values), label='f2 adjusted') plt.plot(x_values, f3_adjusted(x_values), label='f3 adjusted') plt.plot(x_values, f4_adjusted(x_values), label='f4 adjusted')
plt.xticks(np.arange(1, 26, 1)) # Setze die Schritte der X-Achse auf 1 plt.xlabel('x') plt.ylabel('f(x)') plt.title('Adjusted linear functions') plt.legend() plt.grid(True) plt.show()
äääääääääää
import numpy as np import matplotlib.pyplot as plt
Definiere die Funktionen
def f1(x): return 2*x + 3
def f2(x): return 3*x + 2
def f3(x): return 4*x + 5
def f4(x): return 5*x + 4
Berechne den Startpunkt für alle Funktionen
x_start = 1 y_start_f1 = f1(x_start) y_start_f2 = f2(x_start) y_start_f3 = f3(x_start) y_start_f4 = f4(x_start)
Definiere die verschobenen Funktionen
def f1_shifted(x): return f1(x) - y_start_f1
def f2_shifted(x): return f2(x) - y_start_f2
def f3_shifted(x): return f3(x) - y_start_f3
def f4_shifted(x): return f4(x) - y_start_f4
Plotte die verschobenen Funktionen
x_values = np.linspace(1, 10, 100) # Annahme eines Bereichs von 1 bis 10 für x plt.plot(x_values, f1_shifted(x_values), label='f1 shifted') plt.plot(x_values, f2_shifted(x_values), label='f2 shifted') plt.plot(x_values, f3_shifted(x_values), label='f3 shifted') plt.plot(x_values, f4_shifted(x_values), label='f4 shifted')
plt.xlabel('x') plt.ylabel('f(x)') plt.title('Shifted linear functions') plt.legend() plt.grid(True) plt.show()
0 notes
Text
Coursera- Data Analysis Tools-Week 4- Assignment
My code:
import pandas import numpy import scipy.stats import seaborn import matplotlib.pyplot as plt
data = pandas.read_csv(r'C:\Users\AL58114\Downloads\gapminder.csv', low_memory = False)
data['employrate'] = pandas.to_numeric(data['employrate'],errors = 'coerce') data['urbanrate'] = pandas.to_numeric(data['urbanrate'],errors = 'coerce') data['oilperperson'] = pandas.to_numeric(data['oilperperson'],errors = 'coerce')
data_clean = data.dropna() print(scipy.stats.pearsonr(data_clean['employrate'],data_clean['urbanrate']))
def employerate (row): if row['employrate'] <= 50: return 1 if row['employrate'] <= 70: return 2 if row['employrate'] > 70: return 3
data_clean['employerate'] = data_clean.apply (lambda row: employerate (row),axis = 1)
check = data_clean['employerate'].value_counts(sort=False, dropna = False) print(check)
sub1= data_clean[(data_clean['employerate'] == 1)] sub2= data_clean[(data_clean['employerate'] == 2)] sub3= data_clean[(data_clean['employerate'] == 3)]
print ('association between employerate and urbanrate in the countries') print (scipy.stats.pearsonr(sub1['employrate'], sub1['urbanrate'])) print (' ')
print ('association between employrate and urbanrate for moderate employee rate countries') print (scipy.stats.pearsonr(sub2['employrate'], sub2['urbanrate'])) print (' ')
print ('association between employrate and urbanrate for high employee rate countries') print (scipy.stats.pearsonr(sub3['employrate'], sub3['urbanrate'])) print (' ')
scat1 = seaborn.regplot(x = "employrate", y = "urbanrate", data = sub1) plt.xlabel('employee rate') plt.ylabel('urban rate') plt.title('association between employee rate and urban rate in low employee rate countries') print(scat1)
scat2 = seaborn.regplot(x = "employrate", y = "urbanrate", data = sub1) plt.xlabel('employee rate') plt.ylabel('urban rate') plt.title('association between employee rate and urban rate in moderate employee rate countries') print(scat2)
scat3 = seaborn.regplot(x = "employrate", y = "urbanrate", data = sub1) plt.xlabel('employee rate') plt.ylabel('urban rate') plt.title('association between employee rate and urban rate in high employee rate countries') print(scat3)
Results:
Interpretation or the overall summary:
For every sub range urban rate is negatively associated with employee rate.
There are around 48 countries who has less than 70 employee rate, and around 10 countries which have less than 50 as their employee rate. and there exists only 4 countries which have more then 80% as their employee rate.
There is very significant value of 0.2235 as a co-efficient value and p value is 0.534 for low employee rate countries. It indicates the slightest positive value, where the same is indicating in the scatter plot association between the employee rate and urban rate.
0 notes
Text
8 shows to get to know me
my bae sufa @heart-ming didn’t tag me but let’s just say they did teehee. i literally mostly watched kdramas before i started bls so this list will admittedly be kdrama centric 🫣 in chronological order (i think):
that 70s show: has this show aged well? no. but there are still so many iconic moments that it holds a special place in my heart. twelve year old me would race home after school to watch re-runs. twelve year old me also thought peak romance was eric and donna dancing to abba’s fernando in the drive way in front of the vista cruiser 😭😭
reply 1988: i never thought reply ‘97 could be topped (esp after the disappointment of ‘94) but reply ‘88 knocked it out of the ball park completely. i loved every single character sm, it rlly felt like home :’) and rip to those who had sls but i’m different 💅🏼 (jk i usually have a chronic case of sls dsjkfnksjd but everything in this drama made sense, esp deok seon and taek). who else was there for soompi forum user @ packmule using colour-theory, dialogue, and frame analysis to guess who the husband was before the show finished airing???? packmule on soompi forums u will always be famous xoxo
my mister: the grip this show had on me should be studied like. i made my first fandom sideblog for this show?????? i wrote my first fanfic for this show??????? dskjfnkdjnsk the scene in which park dong hoon sits in his living room after everything is finished and then bursts out in tears and then the background music cuts off and we just hear him sOBBING in silence...... i will never recover, i fear
2gether: speaking of shows that had a grip on me ksdjfnkdsjnf i gotta be real and add this to the list since y’all who have been following me since this era bore witness to my absolute obsession. i def can objectively say that 2gether is not a good show but tine and watine remain a special place in my heart forever ♡
ofcc & cherry magic: LOL I’M CHEATING AND PUTTING THESE TWO TOGETHER but they’re both about gay salarymen so ¯\_(ツ)_/¯ idk there’s just an underlying sadness to both these fluffy jbls that i fuck with heavy
i told sunset about you: no matter how much beef i have with p’meen, p’boss has done nothing wrong in his life ever and itsay tehohaew remain my babies. y’all alrdy know itsay had me in tears weekly (i still remember watching ep 4 during class time ((covid college core)) and then my prof started saying something after i finished the ep and i BURST into tears and haven’t recovered since tbh)
to my star 1&2: god daseul invented cinema and romance, actually. this show (s2 particularly) had me on twitter spaces talking about jiwoo and seojun’s depth and complexity for 8+ hours 💀 i literally could write an entire thesis on it—have probably, if u combine my tumblr tags and tweets 😭😭😭 tms surpassed my 2gether rewatches (which @phukaoapologist & @pranpat can attest that is A LOT), and will always remain that bitch
the glory: every girliepop has a lil’ bit of blood lust in them. sometimes u need a cute lil’ revenge drama on ur list and a man that would tell you that he’d kill for you xo
tagging!: @nonkul @itoldsunset @phukaoapologist @pranpat @earthpirapat @dirhwangdaseul @ohmybitna @jaehwany @junghaesin @fordallan @deshimango @kinnkittisawasd @freensrcha @jiustian i’ll only tag a few since i bet a lot of ppl have alrdy done this but if u want to and i didn’t tag you consider urself tagged ♡
#tag game#tbh i haven't rewatched my mister in a minute and i'm sure there are shows i enjoyed more but it's solely on the list because of t#the GRIP it had on me like i was insane sdkjfnksjdnf
26 notes
·
View notes
Note
do you have any tips for writing dave or rose?
!!!! i am no expert but!
dave: rambles, asks a lot of questions without waiting for the answer. his raps are truly shit. in terms of actions, i usually think of repressed closeted gay guys who compensate w hypermasculinity + the kind of people that are overly chill bc theyre super emotionally repressed. hes clearly a smart guy but he can't help but bring in a million references in all his jokes, and he remains very casual/flippant about most things (if he got stabbed, he would quip before reacting properly). later in the comic, he becomes more rambley but this is more clearly out of anxiety/habit than to be funny. it depends on which characterization you go with (early or late comic); pesterquest kinda makes him this shy blushing guy who poorly hides behind the cool guy mask, but 2009 dave was a genuine menace/vibe terrorist. like remember him and tavros' first interaction? thats p much what i think of most when i try to write him aggressively. for his rambles, i have ADHD and i have a rambley thought pattern so i just let my thoughts wander, though you might have to force yourself to do it. sometimes theres emotional beats i want to hit so i plan it out, but usually his main dialogue can be broken down into (genuine sentiment) (pop culture reference) (train of thought rambling to hide genuine sentiment) then rinse and repeat. he has a fixation on sex and dick jokes and hes very irreverent. sometimes he can be defensive. honestly the best tip is trying to remember his main character motivations: for me, i think his is being invulnerable. he's all about being the strongest person in the room; that can translate into social capital (cool guy persona/being perceived as cool), physical prowess, or whatever u want it to be. dave is a character that constantly wants to prove to himself and others that he cannot be hurt, even though he's actually kind of a sensitive guy (a pacifist whos forced to fight). his "coolness" (which is actually just being a fucking weirdo? i dont think dirk or dave actually know what being cool means other than apathetic. i def think he was homeschooled) is a mask and a compulsion, so keep that in mind! also, i think its good to have people as contrast to him bc hes so weird/aggressively chill to emphasize the weirdness of his own actions/behavior, cuz that gets lost when hes next to the other strilondes (karkat is a good comedic striaght man). one of the biggest flaws, i think, when people write him is when they make him this shy traumatized guy who can do no wrong. he clearly is capable of hurting people (and has done so!), usually as a result of his antagonistic bluster or violence. his whole character journey is about strength and confidence in a very masculine way, and that means that people can get hurt.
rose: she's literally susan sontag. most of her writing style is very similar to 70s-80s feminist scholarship, when most essays were about freud and phallic imagery. she has mommy issues and a penchant for passive aggression. like dave w irony and coolness, she hides behind big words/intellectualism and freudian psychoanalysis. they both deeply dislike not being in power/having control, though dave's comes from being conditioned into it and rose's is a genuine compulsion from her childhood. she has trouble being vulnerable/relinquishing that control. it should be noted that her psychoanalysis, while i think she's a smart girl, is almost entirely for show bc fruedian analysis is not really regarded as helpful/viable among contemporaries. she is constantly on the defense; she interprets her mom's well-meaning actions as cruelty, and doesn't trust easily/assumes the worst out of other people. when i think of her, i mostly just think: what would a lesbian with mommy/trust issues do? and its usually pretty straight forward from there. she pretends to be calm, but is prone to a lot of impulsivity and petty anger (blowing up eridans computer, blowing up her own planet/house). ironically, she's one of the easier characters for me to write, bc her character schtick is pretty much my academic writing. if you're struggling with dialogue or tone, just read some of sontag's writing LOL. like how in detective pony dirk plagiarizes a lot of derrida, i think rose would do the same with sontag. against interpretation is a good one if you're up for the read! also shes cuttingly sarcastic and smart/sees through things easily, but that can make her a really difficult person to get along with. dont be scared to make the characters unlikeable. cuz all of the HS characters kind of are unlikeable as people, esp if you dont know them well. like, shes the type of bitch to tell you john berger style all the flaws of marvel as a piece of military propaganda when you're just trying to watch chris evans' man boobs. for her, everything is deep/more than it appears on the surface. + her alcoholism is interesting because she hates giving up control, and alcoholism is what enables her to do so. i dont think most people understand inherently that she is a darker character. people do the whole horror terror stuff fine, but i mean that she is prone to cruelty and manipulation because its how she reacts to perceived danger. shes very girl dirk in that sense. people make her hyper-competent and hyper mentally healthy, but in my opinion? dont be afraid to make her a bitch, LOL.
if you get the chance lmk how your writing goes!! ^_^
171 notes
·
View notes
Text
Critical Role Quotes and Memorable Moments - Campaign 2 (80/?)
[About the Tomb Takers' alcoholic stew] Yasha: "it's chewy." Lucien: "It's meant for chewing." Yasha: "I'll have another. I'm not driving."
Sam: "No, we all have our own unique set of goals. Some of them we've made progress on. And some are just sort of wandering around hoping that they'll solve themselves." Lucien: "Right." Caduceus: I'm mostly fine. Jester: "I would like to domesticate unicorns"
[Fjord breaking away from the group and casts Fly to engage with the dragon] Fjord: "You guys are in analysis paralysis, this is happening." Marisha: "Lord have mercy." Sam: "Fjord have mercy."
Veth's cataclysm bolt doing turning into an ice bolt against an ice dragon
Matt: "Hard to see you when you're off the map." Liam: "My favored terrain."
DM: "Fjord, you take 72 points of ice damage." Fjord: "72?!" Sam: "Don't you have some kind of resistance?" Fjord: "I only have a ring of FIRE RESISTANCE."
Two halflings hiding behind Fjord Veth: "He's my friend, you go!" Liam: "Fjord is a halfling clown car." [After a successfull check] Matt: "You both manage to stack weirdly..Like I said, it's like the Japanese game show where they have to form up to blocks of Tetris..."
[As people keep misreferring to the dragon's gender] Sam: "Can't we just change it to a boy?" DM: "No, because she's the Nightmare in Ivory and you respect that!"
[As Ashley roles double ones on throwing her sword at the dragon, which has Beau on top of it currently] Matt: "Are you serious?" [...] Alright, Beauregard..." Ashley&Marisha: "Oh no!" Marisha: "I still have Patient Defence!" Travis&Taliesin [cackling] Matt: "Nah I'm not gonna do that. Actually, it's two ones, so I have to do something with that. Roll an attack with disadvantage."
Jester: "Only for you, Fjord! I'm going to cast Heal!" Everyone: [shocked] Jester: "You regain 70 hit points!" Travis: "She loves me!" Matt: "Gelidon is like 'I wish I had someone to care for me like that!'" Sam: "Feels good, doesn't it?" Jester: "Def, whatever. [shrugs]"
[As Beau is swallowed by a creature once again] Beau: "The last thing you hear is me going 'Not again'."
69 notes
·
View notes
Photo

Pegasus Knight/Dark Flier/Falcon Knight Sylvain (Guide/Analysis)
Growths (Pegasus Knight || Dark Flier || Falcon Knight)
HP: 70% || 75% || 85%
STR: 45% || 45% || 55%
MAG: 30% || 30% || 30%
DEX: 35% || 35% || 35%
SPD: 60% || 60% || 70%
LCK: 35% || 35% || 35%
DEF: 40% || 40% || 40%
RES: 30% || 35% || 30%
CHA: 50% || 50% || 50%
New Obtainable Skills
Darting Blow
Triangle Attack
Transmute
Defiant Avoid
Analysis
In Three Houses, male lance units were severely shafted due to the fact that that they were locked out of the only Lancefaire class that offers a speed boost--and flying on top of that. Their only means of accessing Lancefaire is to take the -10% growth and -2 stat modifiers in speed as Paladins. Female units, on the other hand, get to bask in the ambiance of a +20% growth in speed and up to a +5 modifier (when mounted).
While Paladins aren’t necessarily a bad class and is a very viable endgame class for lance units, Pegasus Knight and Falcon Knight just offer other benefits that Paladin doesn’t.
With the gender-lock removed, Sylvain could finally embrace his otherwise good speed stat, while also finally obtaining access to Lancefaire atop a flying class--further optimizing his performance.
Firstly, as just mentioned, Pegasus Knight helps preserve Sylvain’s speed, while Paladin nerfs it. Rather than a 40% growth with a -1 modifier as a Paladin, he has a 60% growth and a +3 modifier in speed as a Pegasus Knight and 70% growth and a +5 modifier as a Falcon Knight. He also obtains early access to flying, allowing for him to build his flying rank as soon as possible which will help achieving the flying rank threshold for both Wyvern Lord and Falcon Knight much easier.
Not only does Sylvain benefit from the extra speed that the Pegasus Knight line offers, but he also gains Lancefaire on top of that to help maximize his damage. Sylvain WANTS Lancefaire. His relic and the fact that he has Swift Strikes means that lances are his best weapon option.
With both the extra speed and Lancefaire, he has potential to double much more reliably with an extra +10 damage. Even if he cannot double, he can fall back on Swift Strikes, in which he will have significantly more damage combined with Lancefaire. Paladin does however have an extra point in strength in its modifiers compared to Falcon Knight, so he technically will have a slightly higher damage output as a Paladin.
With his budding talent in Reason, Sylvain could potentially become a Dark Flier with ease. Pegasus Knight lacks an Advanced tier class, and Dark Flier could suffice as a fill-in before reaching Falcon Knight. This is a completely optional class, but Dark Flier offers an extra point of movement, skill, and speed compared to Pegasus Knight. His magic is fairly low, so magic shouldn’t be his main means of attacking, but he does have a few good spells up his sleeve and has pretty good potential as a mixed attacker.
Regardless, Sylvain would probably would want to end up as a Falcon Knight in endgame.
Overall, Pegasus Knight is a great class not just for Sylvain, but all the other male lance-oriented units and Swift Strikes users. He really enjoys the extra speed with flying on top of Lancefaire with his relic.
Suggested Builds
Possible Class Paths:
Noble > Pegasus Knight > Falcon Knight
Noble > Pegasus Knight > Wyvern Rider > Falcon Knight
Noble > Pegasus Knight > Dark Flier > Falcon Knight
A side promotion to Brigand is highly recommended for Death Blow
Recommended Skill Build:
Darting Blow
Death Blow
Lance Prowess
Alert Stance+
(Skill of choice)
My Personal Experience
Yeah, Sylvain really deserves to be a Pegasus Knight LOL.
Due to the fact that he doesn’t suffer from strength problems, Sylvain arguably performs better than Ingrid as a Pegasus Knight. This is also due to the fact that he has Swift Strikes, and Ingrid’s lance combat arts are pretty lackluster.
Her higher speed does set her up to be a slightly better dodge tank, but they both start with the same base and she only has a 10% lead in growth. This means on average Sylvain will either be tied with Ingrid in speed or will be trailing just behind her.
He wasn’t my de facto dodge tank of my Azure Moon run--Falcon Knight Felix and Ashe were (which I’ll be making an analysis on soon), but he had better survivability then either of them.
I only used Dark Flier as a stepping stone, so I can’t say much about his performance in the class. The most I can say is that having the extra option to use magic was nice since the Blue Lions’ only natural mage is Annette (not counting Mercedes, who’s geared to be a healer). His magic damage was low, but it was just enough to clear out some of those enemy Fortress Knights.
Overall, this build was such a breath of fresh air and well-deserved for Sylvain. A highly recommended build, and it’s probably his best possible build.
#fire emblem#fire emblem three houses#fe16#sylvain#sylvain fire emblem#pegasus knight#dark flier#falcon knight#guide#analysis
9 notes
·
View notes
Text
Carnelian analysis
(image source)
This is an analysis on the upcoming 6* Idle Caster, Carnelian. Like with all the other analyses, her kit will be dissected as well as the other aspects. This is also a translation of this analysis here with my own notes added.
Preface
Carnelian is the next Idle Caster, which indicates that, unless skills are activated, she will not attack but gain an immense DEF and RES buff. When they attack, they are True AoE and their range is a diamond around them similarly to Idle Supporters instead of only in front of them. This makes them capable of hitting enemies in tricky places. To see how well this upholds against the other AoE Casters, let’s pick some out, shall we? This is calculated at E2 max level, no potentials and disregarding talents. Not sure if this was from before or after the Caster buff, but I'm assuming before.

As expected from a 6-star, Carnelian’s stats are higher than her fellow Idle Casters. Her ATK is among the same numbers as Dusk and Ifrit, both of who have True AoE capabilities. Carnelian’s DEF and HP when idle are also on par with 6-star Defenders like Hoshiguma and a fully charged Saria. To make up for the quirkiness of Idle Casters, Carnelian’s stats are nothing to sneeze at.
Talents
Carnelian’s first talent when idle is:
Recover 40% Max HP after activating skill; When [Charged], effect is doubled
For people who are EN-only and don’t look at CN, this may require some explanation.
You see, Carnelian is the very first operator who can temporarily bypass the SP Lockout. This means that she can keep building up SP after the original SP bar is full. When she has built up double as much SP, she can release a more powerful version of the same skill and, as you see, her talent is improved.
Whereas her sister Beeswax has a passive regen, Carnelian’s is in burst. When charged, she can essentially recover 80% of her max HP. This can bring her back from the brink of death, no sweat.
The turnover rate of this talent differs depending on what skill you are planning on using. For example, her S1 has the highest uptime and her S3 (while vastly more powerful) the lowest, exacerbated by the Charging mechanic. When you don’t necessarily need a Charged skill but do see that she needs her HP back, then it’s still worth activating, especially when there’s no time for a Medic.
Carnelian’s second talent is:
When SP is above the limit, SP recovery speed +0.6 SP/s
This talent alleviates the Charging mechanic somewhat, and the good news is: it stacks with that of Mostima and with that of Ptilopsis (not all three of them at the same time though, since Ptilopsis and Mostima override eachother). With them on the field, you can gain even more momentum and the skill’s turnover rates will be higher.

It’s very obviously visible, with all three skills.
S1
1. Preface
Her S1 at level 7 is:
ATK +40%, DEF +70% Charged effect: Trait remains active during skill
2. The mechanism of the skill
This skill is a little weird. The fact that the trait remains active sorta kinda defies the point of Idle Casters. At the same time though, this means that Carnelian is actually tankier during her skill than when idle, since she gains an extra DEF buff to boot.
3. Output
To test the output of this skill, we will take these enemies.

They have 1999 HP, 0 RES, and we will test it twice: first with 3 enemies, and then with 6 of them. The first image is with 3 of them, and the other is with 6 enemies.
Carnelian’s S1 is actually exactly the same as Beeswax’ S1’s skill DPS when facing 3 enemies. The performance of the 4-stars Skyfire and Gitano can’t quite keep up except for in Average DPS.
When facing 6 enemies, Carnelian’s S1 oddly starts to fall off. Beeswax’ S1 is officially better than hers in this situation - only Gitano’s S2’s Skill DPS is lower.
Unfortunately, the original analysis did not note at which level these skills are ranked.
3. Survival and practical use
So, we’ve gone over the DPS aspects of this skill. But that’s not the first and foremost orientation of this skill, it seems to be survival. It seems only logical that we will explore this aspect next, and compare it to some other skills with the same inclination.

As I mentioned before, Carnelian’s DEF is actually higher during her skill than when she’s idle due to the DEF buff, which effects are very visible here. It may not boost her ATK as much, but this skill makes sure she remains a solid tank.
This is a skill you want to use when Carnelian functions as tank and/or bait on a ranged tile. With Posessed Throwers or Arts Master drones, Carnelian will fulfill this role. This makes her able to function even in situations you wouldn’t normally place Casters in.
You could say that it is the job of Idle Casters to tank and tank. And as such, this skill is made for it. Nothing more, nothing less.
4. Mastery effects
The multipliers on this skill aren’t great, and the skill scales like 3.6%, 18.9%, 26.9%. It is recommended to keep this skill at level 7.
5. Summary
This skill tries to offer a lot, but ultimately tilts towards defense. While it is certainly better than a generic ATK up skill, it sort of defeats the point of Idle Casters. Her other skills show what she’s made of first and foremost, really standing out instead of using this skill that makes her fall in line.
S2
1. Preface
Now, let’s talk about the first of those. Her second skill at level 7 is:
Highly reduce Attack Interval (-0.8 seconds). Attacks inflict Slow for 0.3 seconds Charged effect: ATK +15%. Slow effect is changed to Bind for 0.4 seconds
2. The mechanism of the skill
This skill offers very powerful crowd-control, and can offer both Slow and Bind depending on when you activate the skill. When Carnelian was released on CN, she had a bug where her Slow lasted 0.2 instead of the promised 0.3. I sincerely hope that this is fixed in CN and this will be fixed eventually in EN as well. This analysis handles a Slow of 0.3 seconds.
3. Output
Using the same enemies as above, we get this:
Top is with 3 enemies, bottom with 6 of them. We can see that with 3 enemies, Carnelian’s output is already higher compared to when she had her S1. It’s actually comparable to that of Mostima. Her charged skill is certainly better than her uncharged one, except for uptime and average DPS (due to the crowd-control). The increased DPS in comparison to the other Idle Casters is likely due to her decreased attack interval.
Since the emphasis of this skill lies on crowd-control, relying on her as solo DPS is not advisable. To lock down a wave of enemies and kill them off together with someone else however, is a good combination.
4. Slow/Bind and practical use
So logically, we will dive into said crowd-control. This is how her uncharged skill (thus with the Slow of 0.3) does against other AoE skills that Slow, and how her charged skill (thus with the Bind of 0.4) does against other skills that Bind.
Carnelian’s Slow is 5% worse than Magallan’s, but has a way higher uptime. In fact, the uncharged S2 has the highest uptime of all in the list.
At first sight, the Bind that Carnelian induces lies very close to Aosta’s S2, weirdly enough. Its Binding coverage and uptime are similar. However, Carnelian’s attack interval is more than two times shorter, and her range is also way larger than Aosta’s, so that she can Bind more enemies than Aosta.
Both the duration of the Slow and the Bind seem small. However, Carnelian can lock down an entire wave of enemies with it with her decreased attack interval. And with her huge DEF pool when idle, you can pop Aak’s S3 right before you pop her S2, which functions extremely well in situations like Pyrite Gorge. Because this is what happens if you decrease Carnelian’s attack interval this much with Aak:
The enemy barely gets to move.
In fact, as long as you can get them both up at the same time, you can maintain a 100% Bind. Neat, huh?
This skill also syncs with the other crowd-control listed, so there’s a lot of leeway you have when looking for combinations, the note about her DPS considered.
5. Mastery effects
The masteries of this skill increase the crowd-control time and the ATK in a varying manner. The DPS scaling with this skill goes like 0%, 4.3%, 39.1%. Only at M2, she gets an extra 5% added to that ATK buff. This makes it so that at M3, you can fully experience the lengths of both the crowd-control and ATK buff.
6. Summary
Carnelian’s S2 focuses on crowd-control and not DPS. However, this also makes her one of the most potent crowd-controllers currently in the game. It’s certainly one of the most fun skills to have and use while also being surprisingly powerful.
S3
1. Preface
Her third skill at level 7 is:
Expand Attack Range. ATK gradually increases to +200% Charged effect: Attacks increase damage taken by the target from Carnelian by 20% (up to 5 stacks), lasting until the skill ends
The range expansion makes her range as large as Saria’s S2, Beeswax’ S1, Mint’s S1…or rather, as large as everything in here.
2. The mechanism of the skill and its output
Remember both the S1 and S2 both having not much in the way of DPS? Because this skill got it, baby. A gradual increase to, at M3, 280% ATK (this updates every second and not per attack), a damage taken debuff on charge…
Still with the same comparisons, top is 3 enemies, bottom is 6 enemies.
The damage taken debuff is certainly doing its work as you can see with the charged skill. Don’t forget the gradual increase though - with 6 enemies, this skill can have a similar average DPS as that of Eyja. The uptime however is decreased due to the charging time, at which it is similar to Dusk’s S2.
3. Practical use
This skill requires Carnelian to stay alive during the entire duration of the skill. Since this skill does not have the charged effect of her S1, she will need a Medic if she’s under fire. There is a lesser need for blockers due to her range expansion but they do help her since the damage taken debuff is exclusive to damage done by her.
Another option you can go for is buff army. Mostima and Eyja specifically buff Casters (Rosmontis does this as well but she needs more brain in that regard since her buff is on a random Caster).
4. Mastery effects
The mastery of this skill does not improve its duration, but raises the buff granted. This causes its scaling being 5.2%, 10.4%, 20.8%. Its damage may not be as high as Eyja’s S3, but its higher uptime makes up for it. One will benefit from fully mastering this skill - did you already notice that her attack rising to 280% dwarfs the 260% ATK buff that Mon3tr gets? It is among the highest buffs that a skill can grant - while Glaucus has more, hers is a one-time effect while Carnelian’s is over a generous duration.
5. Summary
Carnelian’s S3 can fulfill the ‘finisher’ role nicely, arguably more so than the operators Absinthe and Provence, or as the deciding move. She can do both things equally as well. Support is very nice for her, like blockers or a buff army. Or both. Your choice.
Other aspects
1. Base skill
At E2, Carnelian’s base skill is:
When stationed at the Training Station, increase the skill training speed of Caster operators by +60%.
This is better than both Skyfire and Beeswax. Only Tomimi is better, but only when M3’ing and…be honest, who has an E2 Tomimi (if not for the art/waifu reasons)? So yeah, this is a great skill to have when training Casters.
2. Potential
Potentials are never mandatory, but if you would, Carnelian’s third and fourth pot are the best, because the third has an ATK boost and the fourth boosts her survival. She essentially gains 3.7% extra ATK.
Summary
Carnelian is often overlooked due to her being a Caster and her archetype. However, she is one of the most potent sources of crowd-control in the game. This should be worth a thought at least, especially when you have a setup ready. Ironically, Carnelian functions way better with Aak than Hung who was solely made for Aak, and she may be the very first ranged operator able to both withstand his buffing when idle with no outside help, and be extremely destructive right after.
1 note
·
View note
Note
Hey I just wanted to say I just found your blog in the great pretender tag and I really like your content. I also saw your an mcu fan which I love and I agree with your assessments of Wandavision and Falcon and wintersoldier (as much as I love seb and Anthony) but I will add that I wish there was more awkwardness to Bucky’s character, especially when it came to things like normal human interaction and flirting. Because he was this suave guy in the 40s and then he was a brainwashed assassin for 70 + years and then he came back but had to fight for his existence and the went back to the freezer only to come out and have his main interactions be Steve (a man in a very similar position as him and also on the run), a group of badass warrior guards and a 16 year old genius and her brother who just happens to be king. Those a normal interaction do not make. So it would have been cool to see him try to emulate the suaveness he once had only to come off unbearably awkward.
Sorry for this long ass rant. Just thought I would share.
Ah it’s ok!
One thank you
Two I love your assessment on Bucky.
I have a small feeling since the show was a bit certain around Sam taking up the shield, Bucky was just there on the sides like he was for Steve. But I still love them showing how Bucky was struggling to make peace and only started to make it after his convo with Sam (cause Bucky’s therapist suck, I know how shitty gov therapist are)
I could go on a whole rant about the military stuff...buuuuuuuut I came from a family with lots of people in different arm branches so I’m just a little iffy on touching on it, just cause I’m scared of getting someone in trouble somehow 🤣💧
But I can say there hit it right on how messy the system is. And how vets like Issashi and Bucky are truely treated
Actually nicquemarina on TikTok is a military vet, so if you want to watch a little more on that, you should def check her out and watch her videos. She does some skits over the shows, but also talk about how she related to the characters, and some analysis!
3 notes
·
View notes
Text
Doing an analysis of the characters of my RP partners with my characters in terms of compatibility.
John Wick:
With Eve: he'd be loved and find peace. Eve would be happy taking care of him. 100%
With Irina: oh lord. House would be on fire all the time. John would go crazy and Irina would be screeching all the time due to him forcing her to behave like an adult. 20%
With Elizabeth: no, no. Even though they both are killers, Elizabeth and her strange... passions... would never be accepted by John and he'd most likely kill her. 0%
Eilblis:
With Eve: oh no my poor bean. She'd be tortured day after day but maybe he'd break her. So I'd say 50%
With Irina: surprisingly enough, I think she would think she can win over him yet enjoy his reactions when put back in place. What can I say? This girl needs discipline. 70%
With Elizabeth: if he is not selfish to share power... They would def enjoy their sadistic pleasures together 90%
Asa Emory:
With Eve: she'd be fascinated with his citizen persona and most likely end up broken in the collection. Asa would probably enjoy an innocence and fragility to destroy and mold to his will. Therefore 90%
With Irina: this is a strong no. She would end up dead in a second. I don't even believe he'd want to collect her. 0%
With Elizabeth: Complicated. They are both psychos. But they both have different "hobbies". Asa wouldn't enjoy a woman ordering around and his lifestyle is more simple. Elizabeth needs luxury. However, they can both benefit in a work relationship and maybe ocassional sex. 30%
Michael Langdon:
With Eve: she'd be fascinated by the fact that he is the anticrist and although she would try to deny It, his elegant charm and well spoken persona would get her. Michael on the other hand, may not like her right away but he'd notice she unconciously wins his heart. 90%
With Irina: oh Michael would have so much fun disciplining her, making her embarrased and bringing her pink world down. And Irina... Irina would be glad to brag about her boyfriend being the Antichrist. 60%
With Elizabeth: hell yes. They'd both match in lifestyle, appeareance and blood thirst. I even imagine them bathing in blood together and doing a ritualistic orgy with victims. However, Michael may lack of love. 99%
Richard Firewood
With Eve: goodbye Eve. You are def dead. If he spares your life, you'll have a hard time. However, he is a type of man you'd enjoy serving. 50%
With Irina: I feel like this brat would be tamed. Like she wouldn't die only because she is a nice distraction. But if she runs her mouth too much, she'll be dead. Also, she thinks her dad Will own his hotel. 20%
With Elizabeth: these two wolves would fight for dominance but they'd enjoy killing together and dominating their victims together. Elizabeth likes his hotel and considers him a nice candidate for a future husband who maybe she won't try to kill this time. 80%
A special mention to Jesse character who I have shared some conversations as Eve. He'd def enjoy Irina!
Follow these writers:
@horrorslashergirl @thesightstoshowyou @slassher-addict @f0rtis-fortuna-adiuvat @champagne-with-words @michael-langdon-666
My RP Girls: @hisbluemonarch @thetarasovprincess @therubywidow
4 notes
·
View notes
Text
Weapon Refine Review: December 2019
Refines for Arthur, Mathilda, Clive and Mia
Arthur’s Refine
Weapon: Arthur’s Axe (400 SP)
Unique Refine: Conditional In-Combat Buffs when buffed and or inflicted with Penalties
Mt: 16. Rng: 1. If bonus granted from skills (ex. Hone, Rally) is active on unit, grants Atk/Spd/Def/Res +3 during combat. At the start of combat, if there is a penalty active on unit or if unit’s HP < 100%, grants Atk/Spd/Def/Res +5 during combat.
Analysis
Arthur’s always had a rather strange statline as an axe unit. His middling statline across the board has always left him open to multiple playstyles and sets as a unit. His newly acquired axe only seems to amplify this middle ground. So long as Arthur has a buff active on him (via Hone, Fortify, or Rally skills), he will have a constant +3 to his Atk/Spd/Def/Res while in combat. If inflicted with a penalty such as a Chill, Ploy, or Panic, he will receive +5 Atk/Spd/Def/Res while in combat. Both his +5 and +3 in-combat buffs will stack if activated at the same time, leaning the odds in our luckless hero’s favor. While he won’t be able to shake off Panic’s debuff effect, with his Axe’s dual effects will more than make up for this oversight.
Build Example
Arthur’s new axe provides an opportunity for him to shine as an offensive hero like never before. To better serve as an offensive threat we run him with a Spd IV which we help amplify with Fury. Odd Spd Wave and Even Def Wave will ensure that Arthur is always buffed and, as a result, always receives his initial in-combat buff of +3 from his axe. An HP bane will put him at a higher risk of being inflicted with a Panic debuff which, if timed right, will not only grant Arthur an additional +5 to his stats while in combat but will be enough to affect a fight’s flow. In the event his in-combat buffs prove not to be enough we run his default Lancebreaker as a safeguard, allowing him to double lance opponents and not worry about doubles from them. This skill also disables infamous armor fighter skills such as Bold Fighter and Vengeful Fighter.
On odd-numbered turns, Arthur will reach a max of 59/49/41/35 Atk/Spd/Def/Res while in combat.
On even numbered turns, Arthur will reach a max of 59/43/47/35 Atk/Spd/Def/Res while in combat.
Mathilda’s Refine
Weapon: Knightly Lance (400 SP)
Unique Refine: Slaying Lance with Support Buffs
Mt: 16. Rng: 1. Accelerates Special trigger (Cooldown Count -1). If unit is within 2 spaces of support ally, grants Atk/Spd/Def/Res +3 to unit and that ally during combat.
Analysis
Mathlida’s refine makes use of Ally Support, an in-game mechanic where players may pair units together and grant in-combat buffs to both units if working on the same team. If Mathilda and her support ally both reach S-Rank, they will gain an in-combat buff of Atk/Spd/Def/Res+2 if next to each other and Atk/Spd/Def/Res+1 if one space away from each other. This in-combat buff can prove to be the difference between losing or winning a fight. Mathilda’s Lance simply adds on to this effect, granting an additional +3 to her and her ally’s stats while in-combat and within range of each other. As such, it’s a good idea to pair Mathilda with units that can provide buffs for her such as Titania, Seth, or Eirika. Her lance also decreases her special charge by -1, allowing her to run higher cooldown skills such as Glacies or Dragon Fang.
Build Example
Mathilda possesses unusually high Res for a lance cavalry unit which we will be making use of with the following set. With a Res stat of 37 with a boon, we can reliably run ploy skills such as Spd and Atk Ploy to inflict her foes for -5 Atk/Spd if caught in her direction. This also allows her to use Glacies quite potently. When combined with Quick Riposte and Fierce Stance, Glacies will all but nuke her opponents. Her in-combat buffs from her Ally Support will also provide her with some additional firepower and allow her to shrug off a hit or two. One will have to watch out for her low Def; it’s recommended that she be run with an ally that can provide her with both offensive and defensive buffs to further augment her power and, in turn, augment theirs.
With all her skills active, Mathilda will reach a max of 56/37/26/42 Atk/Spd/Def/Res while in combat.
Clive’s Refine
Weapon: Lordly Lance (400 SP)
Unique Refine: Armor Effective Lance with Support Buffs
Mt: 16. Rng: 1. Effective against armored foes. If unit is within 2 spaces of support ally, grants Atk/Spd/Def/Res +3 during combat.
Analysis
Clive, when initially added, failed to provide much for players. Ultimately because of his min-maxed statline and limited skill inheritance options as a cavalry unit he was delegated to the role of simple sword counter. That role is more or less the same with his new lance. It does, however, provide Clive with both in-combat buffs and effectiveness against armor units. Lordly Lance carries the same Ally Support effect that Knightly Lance does. This means that if Clive is next to his support ally, in combat he will receive Atk/Spd/Def/Res +5 from his support and lance combined. His ally will also receive these buffs so it’s not a bad idea to pair him with an ally that can both buff him and benefit from his lance’s buffs themselves.
Build Example
Due to his incredibly min-maxed statline, Clive works best as a defensive wall and direct sword counter. Atk/Def Bond will allow him to make great use of his lance’s in-combat buffs while granting him Atk/Def +5 when adjacent to his support ally at the same time. Since it’s unlikely that he’ll be making the first move the majority of the time, we run Close Def to bulk up his defenses. Atk Smoke will ploy opponents within 2 spaces of his target for -7 Atk after combat allowing him to take on more than one opponent. To seal the deal we run Swordbreaker, allowing Clive to counter his sword wielding opponents.
With all his skills active, Clive reaches a max of 59/30/43/30 Atk/Spd/Def/Res during combat.
Mia’s Refine
Weapon: Resolute Blade (400 SP)
Unique Refine: True Damage based on Speed
Mt: 16. Rng: 1. Grants Atk +3. Deals +10 damage when special triggers. If unit’s Spd > foe’s Spd, deals damage = 70% of difference between stats (Maximum bonus of +7 damage. Combos with Phantom Spd).
Analysis
Mia’s blade gains a much deserved upgrade with the latest set of refines. Already a fast sword unit, her sword amplifies the need for speed granting her a maximum of +7 additional damage if her speed is 10 higher than her opponent. This additional damage will be added to her special if she’s run with an AOE special such as Blazing Wind or Growing Light but not with specials such as Moonbow or Glimmer.
Build Example
Mia’s primary goal is to ensure she is always faster than her opponent. To accomplish this, we’ll be running skills that boost her speed and ultimately rely on speed checks. We keep Flashing Blade so that, once she does fall into Desperation range, she can activate Moonbow almost immediately while in combat. Considering that she deals +10 damage when her special actives thanks to her sword’s default effects, her specials will prove to be quite powerful. Odd Spd Wave is taken to grant Mia +6 Spd on odd numbered turns. Phantom Spd, meanwhile, will grant her +10 Spd if Mia runs a skill that checks her Spd against an opponent’s. Resolute Blade’s unique refine and Flashing Blade fall into this category, granting her this additional speed buff.
With all her skills in effect, Mia will reach a max of 59 Spd while in combat.
#fire emblem heroes#fe heroes#feh#weapon refine review#Weapon Refinery Update#Arthur: Hapless Hero#Mathilda: Legendary Knight#Clive: Idealistic Knight#Mia: Lady of Blades#mod asama
9 notes
·
View notes
Text
Substitution Cipher - Solver/Decryption
This one was a bit harder to do as its clearly taken alot longer (mostly because the logic of my code was not correct 😢). However now it works relatively well it should be able to decrypt most substitution ciphers. From what I see the longer your ciphertext the less variation in the scores outputted at the end. With shorter texts it might not work as well. So below is the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
import re, random from ngram_class import nGramInfo #substitution cipher def main(): # grabs input and makes it lower case ciphertext = input("Enter the message: ") ciphertext = ciphertext.lower() # removes everything except for letters this is used for calculating the healthiness ciphertext_only_letters = re.sub("[^a-z]+", "", ciphertext) alphabet = list("abcdefghijklmnopqrstuvwxyz") #randomly shuffles the alphabet random.shuffle(alphabet) starter_key = "".join(alphabet) #starter key is random arrangement of alphabet # calculates the best keys and prints them out in a decending order of healthiness # highest healthiness (most correct) will be at the bottom best_keys = calculate_best_key(ciphertext_only_letters, starter_key, ciphertext) best_keys = sorted(best_keys) for i in range(len(best_keys)): print("================\n"+"Score:", best_keys[i][0], "\nKey:", best_keys[i][1], "\nDecryption:", substitution(ciphertext, best_keys[i][1])) # print(best_keys) #prints out the best guess #its just the last thing anyway print("\n======== BEST GUESS ========") print("Score:", best_keys[-1][0]) print("Key:", best_keys[-1][1]) print("Decryption:", substitution(ciphertext, best_keys[-1][1])) def calculate_best_key(ciphertext_only_letters, starter_key, ciphertext): #creates object to calculate fitness calculator = create_nGramInfo_class() print("\n\n\nCiphertext:", ciphertext) print("Ciphertext Healthiness Score:", calculator.calculate_fitness_score(ciphertext)) highest = [] #highest holds the highest scores and the keys associated with the scores # this is the key that is shuffled into a new key every iteration key = list('abcdefghijklmnopqrstuvwxyz') # if the thing cant be solved iterations should be increased first iteration = 0 while iteration < 15: print("Iteration:", iteration) #generates new key and calculates the fitness of the keys associated possible plaintext random.shuffle(key) new_key = "".join(key) print("new key:", new_key) high_score = calculator.calculate_fitness_score(substitution(ciphertext_only_letters, new_key)) best_key = new_key highest.append([high_score, best_key]) iteration += 1 i = 0 # this can be increased if solver not solving however changing iteration number should be first while i < 10000: prev_key = new_key #generates 2 random numbers (musnt be the same) num1 = num2 = 0 while num1 == num2: num1 = random.randint(0, 25) num2 = random.randint(0, 25) #swaps the letters new = list(new_key) new[num1], new[num2] = new[num2], new[num1] new_key = "".join(new) #creates the possible plaintext and calculates fitness plaintext = substitution(ciphertext_only_letters, new_key) new_score = calculator.calculate_fitness_score(plaintext) #if new score is higher than high score new score becomes high score and is added to highest list if new_score > high_score: high_score = new_score best_key = new_key highest.append([high_score, best_key]) if len(highest) > 20: highest = sorted(highest) highest = highest[5:] else: #if score doesnt increase it goes back to previous key new_key = prev_key i += 1 # summarises information in every iteration print("Current highest score is", high_score, "on iteration", iteration) print(best_key) print("This decodes to", substitution(ciphertext_only_letters, best_key)) print("\n\n") return highest def create_nGramInfo_class(): print("Enter '1' for monograms") print("Enter '2' for bigrams") print("Enter '3' for trigrams") print("Enter '4' for quadgrams") print("Note: quadgrams can only do analysis on messages >= 4 characters\ntrigrams for >= 3 and so on \n(if you need a program to help decipher a < 4 letter caesar cipher RIP)") mode = input("Enter Mode: ") mode = mode.strip().lower() if mode == '1': file_name = "ngrams/english_monograms.txt" elif mode == '2': file_name = "ngrams/english_bigrams.txt" elif mode == '3': file_name = "ngrams/english_trigrams.txt" elif mode == '4': file_name = "ngrams/english_quadgrams.txt" else: print("Make sure input is correct") exit() return nGramInfo(file_name) def substitution(ciphertext_only_letters, key): plaintext = "" for letter in ciphertext_only_letters: if letter.isalpha() == True: plaintext += key[ord(letter) - ord("a")] else: plaintext += letter return plaintext if __name__ == "__main__": main()
Here are some tests using it.
Test 1
Message we are encrypting: “short message test”
Key used to encrypt: “qwertyuiopasdfghjklzxcvbnm”
basically just left to right on the keyboard
Ciphertext: “ligkz dtllqut ztlz”
Program ouputs:
Running the program 2 times gives us nothing significant it is mostly just gibberish however imagine someone with more computing power than me they could run multiple versions of this program while increasing the number of iterations the program goes through. It could easily decipher these messages with little issue.
Test 2
Message we are encrypting: “longer messages should work much better with these substitution cipher solvers however i mean who is even trying to solve the shorter ones using a computer”
Key used to encrypt: “qwertyuiopasdfghjklzxcvbnm”
same one as before
Ciphertext: “sgfutk dtllqutl ligxsr vgka dxei wtzztk vozi zitlt lxwlzozxzogf eohitk lgsctkl igvtctk o dtqf vig ol tctf zknofu zg lgsct zit ligkztk gftl xlofu q egdhxztk”
Program ouputs:
Guess what it was solved on the first go despite having such a large keyspace it is still relatively easy to crack a substitution cipher
From this I was legitimately surprised at how fast the substitution cipher could be cracked even with the resources I had. As we had to do many cryptograms, which are essentially substitution ciphers, I thought that this would be harder for a computer to do because even for us it would take a decent amount of time to decrypt them. Its shocking how fast a computer can do this just be randomly generating keys and choosing the better ones.
Note: once again i don’t know if the code is visible so will leave it below (all the code is on the github anyway)
import re, random
from ngram_class import nGramInfo
#substitution cipher
def main(): # grabs input and makes it lower case ciphertext = input("Enter the message: ") ciphertext = ciphertext.lower() # removes everything except for letters this is used for calculating the healthiness ciphertext_only_letters = re.sub("[^a-z]+", "", ciphertext)
alphabet = list("abcdefghijklmnopqrstuvwxyz")
#randomly shuffles the alphabet random.shuffle(alphabet) starter_key = "".join(alphabet) #starter key is random arrangement of alphabet
# calculates the best keys and prints them out in a decending order of healthiness # highest healthiness (most correct) will be at the bottom best_keys = calculate_best_key(ciphertext_only_letters, starter_key, ciphertext) best_keys = sorted(best_keys) for i in range(len(best_keys)): print("================\n"+"Score:", best_keys[i][0], "\nKey:", best_keys[i][1], "\nDecryption:", substitution(ciphertext, best_keys[i][1])) # print(best_keys)
#prints out the best guess #its just the last thing anyway print("\n======== BEST GUESS ========") print("Score:", best_keys[-1][0]) print("Key:", best_keys[-1][1]) print("Decryption:", substitution(ciphertext, best_keys[-1][1]))
def calculate_best_key(ciphertext_only_letters, starter_key, ciphertext): #creates object to calculate fitness calculator = create_nGramInfo_class() print("\n\n\nCiphertext:", ciphertext) print("Ciphertext Healthiness Score:", calculator.calculate_fitness_score(ciphertext)) highest = [] #highest holds the highest scores and the keys associated with the scores # this is the key that is shuffled into a new key every iteration key = list('abcdefghijklmnopqrstuvwxyz')
# if the thing cant be solved iterations should be increased first iteration = 0 while iteration < 15: print("Iteration:", iteration)
#generates new key and calculates the fitness of the keys associated possible plaintext random.shuffle(key) new_key = "".join(key) print("new key:", new_key) high_score = calculator.calculate_fitness_score(substitution(ciphertext_only_letters, new_key)) best_key = new_key highest.append([high_score, best_key])
iteration += 1 i = 0 # this can be increased if solver not solving however changing iteration number should be first while i < 10000: prev_key = new_key
#generates 2 random numbers (musnt be the same) num1 = num2 = 0 while num1 == num2: num1 = random.randint(0, 25) num2 = random.randint(0, 25)
#swaps the letters new = list(new_key) new[num1], new[num2] = new[num2], new[num1] new_key = "".join(new)
#creates the possible plaintext and calculates fitness plaintext = substitution(ciphertext_only_letters, new_key) new_score = calculator.calculate_fitness_score(plaintext)
#if new score is higher than high score new score becomes high score and is added to highest list if new_score > high_score: high_score = new_score best_key = new_key highest.append([high_score, best_key]) if len(highest) > 20: highest = sorted(highest) highest = highest[5:] else: #if score doesnt increase it goes back to previous key new_key = prev_key
i += 1
# summarises information in every iteration print("Current highest score is", high_score, "on iteration", iteration) print(best_key) print("This decodes to", substitution(ciphertext_only_letters, best_key)) print("\n\n")
return highest
def create_nGramInfo_class(): print("Enter '1' for monograms") print("Enter '2' for bigrams") print("Enter '3' for trigrams") print("Enter '4' for quadgrams") print("Note: quadgrams can only do analysis on messages >= 4 characters\ntrigrams for >= 3 and so on \n(if you need a program to help decipher a < 4 letter caesar cipher RIP)") mode = input("Enter Mode: ") mode = mode.strip().lower()
if mode == '1': file_name = "ngrams/english_monograms.txt" elif mode == '2': file_name = "ngrams/english_bigrams.txt" elif mode == '3': file_name = "ngrams/english_trigrams.txt" elif mode == '4': file_name = "ngrams/english_quadgrams.txt" else: print("Make sure input is correct") exit()
return nGramInfo(file_name)
def substitution(ciphertext_only_letters, key): plaintext = "" for letter in ciphertext_only_letters: if letter.isalpha() == True: plaintext += key[ord(letter) - ord("a")] else: plaintext += letter
return plaintext
if __name__ == "__main__": main()
15 notes
·
View notes