Tumgik
#data.txt
urban-shade · 18 hours
Text
my random miscellaneous sebastian headcanons. readmore because its a LOT
current
i was thinking about if he'd use special sebastian shaped emoticons like .:} and }:. and im honestly 50/50 i can see him thinking they're funny but i can also see him not wanting to think about the fact that he's a fish now and no longer human
in general i think he has a lot of identity issues. He literally NEVER brings up the fact that he is fish-esque besides telling us that he's not going to hurt us, and telling us items are on his tail. I think if he was more comfortable with his identity he might occasionally crack a joke but I think deep down he has a mask up emotionally where he tries to forget about it all.
and that mask CRACKS a little when players repeatedly climb on him!! it brings back hard memories for him and that's the most upset we ever hear him.. he doesn't even get that upset when he kills you for flash beaconing him twice.. you can fucking hear the hurt in gianni's voice acting and its just SO . AGH.
past / pre-breakout
i like thinking about what they had him get up to as an LR-P and MR-P a lot. What if they had him assemble furniture to get him used to his new 3rd arm. He thinks he's getting new furniture for his cell but then they take it away and put it in the break room and he gets SO ANNOYED. Then the 2nd furniture they have him do he assembles it and then throws it at the observation room at the top of his cell.
He'd get a game console for like one day to ensure his mental capabilities are the same as before the experimentation and for like 2 years after that day he misses his video games until he gets to play games again when he's promoted to MR-P
I feel like near the very start of things just to get a whole overview of like everything that's changed about him even if gills is only what they really gaf about (million dollar fish might as well see what your money did) they'd be testing a lot of basic stuff. Like taste. And they'd give him some normal food of different types of tastes to see if he's lost any taste receptors and he'd be like so happy but then intentionally one of the foods is really bad. And he gets so mad
i headcanon he did dual enrollment (college+hs) since he switched his college major from business to engineering and he's only 19. And that he was a massive nerd... unfortunately his fishtuation has changed him :(
there is a massive urbanshade in-network group chat/email chain for the scientists. There are a lot of inside jokes and a lot are at sebastians expense
i feel like he got food requests on his birthdays. The highlight of his years
His first request for birthday food was like a recipe his mom made a lot and he got it and it was horrible and barely seasoned because urbanshade is the worst and also they are in Norway and he is NOT going to get properly cooked authentic chilean food. And he never requested chilean food again :( Didn't want to be disappointed
post game
i don't think he truly realizes how big he is and if he ever gets a real human frame of reference he's going to get extremely upset about it (if he was already on edge from something else.. he's practiced at hiding/burying his emotions). The blacksite doesn't have a ton of normal size comparison things for him besides smaller human objects and humans themselves, everything is sorta larger than life there and he might feel quite big but I don't think he has a proper idea of the real scale.
Even if he escapes, even if he could deal with all the problems that come from being a snake/mermaid/fishmonster guy. He is still way too big to fit in any normal human spaces. He is truly screwed unless he can get turned back human by innovation inc...
even if he does get turned back human by innovation inc he's going to have to relive his trauma all over again. i think about that a lot
i think he'd also be conflicted on turning back human like it's the one thing he's wanted for the past 10 years but also.. He's been like this for so long.. he doesn't really feel like Sebastian the kid with a guitar that liked Metallica. He's Sebastian Solace the Saboteur… The dangerous fish man who's been forced to kill a few people out of necessity (and indirectly cause the deaths of a few hundred others)
i think he'd get phantom limb pains from his 3rd arm if he lost it in the human transformation. Like he isn't even supposed to HAVE that arm as a person and yet his brain still expects it to be there. He keeps trying to use it and then it's gone
When he first meets his family again for the first time after he escapes I think he wouldn't be human yet. Before he lets them see him he like speaks to them from behind a door or something… To try and prepare them. He's really nervous about seeing them all again because he absolutely cares about them just the same but he just feels like an outsider now.. he's changed so much
All he wants is to get back to a normal life but, normal human life doesn't feel normal to him anymore. He almost misses the monotony of the blacksite. I feel like innovation inc would take a few months-year to get him turned back and he might try working for them in that time to try and adjust to being out of urbanshade since it feels familiar to him and they're more equipped to deal with a giant fish man than his family's home. But ever so often things there remind him of urbanshade and he goes back to feeling like he's about to be shot on sight.
biology
silver spiny fins are some of the best vertebrates at seeing color in low light conditions! i think he has that trait from them
mantis shrimp like to burrow. I think he has some kind of instinct where he feels more at home in small enclosed spaces (he loves blankets)
what if his upper body had sandpaper shark scales. i dont want to put him through that because can you imagine putting on a cotton shirt with sandpaper skin???? too cruel. but its fun to think about
i think he molts but its only like once a year. The first time he does it he has like absolutely no idea that's what's happening he's just like insanely itchy or something and then he realizes his tail skin has PEELED OFF and he's like (HORRIFIED) but then realizes what's going on . And then it takes forever for him to get it all off and he just stares at it like Eugh after
the second time he realizes he can use the shed to screw with the researchers. Researcher walks in his heavy containment cell in the morning and there's just like a massive translucent crumpled version of him in the corner and they just scream before realizing 2 seconds later
the scientists have a sped up video of him molting to metallica music like how people post timelapses of their snakes shedding
23 notes · View notes
datab4s3 · 6 months
Text
maybe i should become a loverboy fan page if the posts are getting that many notes
IT WAS AN APRIL FOOLS JOKE IM NOT ACTUALLY A FAN PAGE FOR LOVERBOY
4 notes · View notes
dragabond · 1 year
Text
I want to talk about many things but the body and brain both do not have the energy for such things. Quite saddening.
6 notes · View notes
totallynormalandroid · 10 months
Text
i have learned about the APOSTROPHE. d dd decided i do not . liiiike iiiitt
2 notes · View notes
codeshive · 3 months
Text
CS512 – Assignment 1 solved
  Write a Python program that creates a matrix of 10 by 10 using the Data provided below. Place the following data into a file and read the data into the matrix from a file called “Data.txt” Use random number to select three columns (ex: columns 3, 5, and 9) sort each column in ascending order and make a matrix of 10 by 3 using these three columns Use random number to select another distinct…
Tumblr media
View On WordPress
0 notes
codingprolab · 3 months
Text
CS512 – Assignment 1
  Write a Python program that creates a matrix of 10 by 10 using the Data provided below. Place the following data into a file and read the data into the matrix from a file called “Data.txt” Use random number to select three columns (ex: columns 3, 5, and 9) sort each column in ascending order and make a matrix of 10 by 3 using these three columns Use random number to select another distinct…
Tumblr media
View On WordPress
0 notes
govindhtech · 5 months
Text
TPM: A Guide to Understanding Your Computer’s Security Chip
Tumblr media
What is Trusted Platform Module (TPM) A Trusted Platform Module (TPM) is a secure cryptoprocessor chip on your computer’s motherboard.
First Contact TPM for Windows The BitLocker drive encryption, the Virtual Smart Card features, and the Crypto Provider are among the security components of the Microsoft Windows operating system that depend on TPM-based capabilities. In fact, Trusted Platform Module 2.0 needs to be activated in ALL desktop and server variants of Windows 10 and 11. By using remote attestation in conjunction with the system’s Trusted Platform Module to allow Measured Boot, the configuration of the system is protected from undetectable threats like rootkits.
On Intel’s Windows machine, Intel can quickly verify some Trusted Platform Module details by navigating to the Security Devices area of the Device Manager screen.
TPM details by navigating to the Security Devices area of the Device Manager screen.
Now let’s engage with it. Now that a terminal window is open, let’s extract some basic system data. There are numerous powershell cmdlets available in Windows that can be used right away.
Get-Tpm retrieves the following data from the module:
Intel can also use this information to deduce some details about the underlying system: For instance, if the platform is equipped with and employing Platform Trust Technologies (PTT), “Intel” will appear in the manufacturer section here. Here, a Trusted Platform Module from the company STM is being used.
Intel must communicate with Windows Core Security features, namely the Trusted Platform Module Base Services software component and related API, in order to utilise the Trusted Platform Module from an application standpoint. Microsoft offers tools and wrappers to facilitate the integration of these processes more quickly.
Then intel will begin examining these after that.
Linux-based TPM First Contact Working with keys securely across any TPM 2.0 compatible module is made feasible by a set of standardised commands and libraries that enable the use of TPMs for key loading and storage in Linux.
At a high level, you can check if a TPM is present in the system by running the following command in the system log: dmesg | grep -i tpm.
Here is a step-by-step guide to several fundamental Linux system interactions: Required conditions: Install a TPM 2.0 chip on the target machine. Install TPM 2.0 software. These packages differ per Linux distribution.The tpm2-tools and tpm2-tss packages are popular. Initialise TPM: Initialise the TPM before using it. Initialise the TPM with tpm2 startup. Establish an Application Key: Create a key that is unique to your application and that you wish to keep in the TPM.You can use a software library like OpenSSL or a Trusted Platform Module library like tpm2-tools to generate this key.
The following is one method of generating an RSA keypair: RSA algorithm -out appkey.pem -openssl genpkey
Fill the TPM with the Key: To load your application-specific key into the TPM, use the TPM 2.0 tools. For this, you’ll usually use the tpm2 load command: tpm2 load -C appkey.pub -r appkey.priv -u context.out This command saves the context of the key in the context.out file and loads it into the TPM. This context is necessary for using the key later on. Apply the resident key (TPM): You can use this commands or libraries such as tpm2-tss to execute cryptographic operations on the TPM-resident key when your programme needs to access it. To sign data using the TPM key, for instance, run the following commands: tpm2 sign -c context.out -g sha256 -m data.txt -s signature.bin Using the TPM-resident key, this command signs the data and stores the signature in signature.bin. Unload the Key (Optional): You can use the tpm2 flushcontext command to unload the TPM-resident key if you no longer require it: tpm2 flushcontext -c context.out. This releases the key’s associated TPM resources. Shutdown and Cleanup (Optional): You can use the tpm2 shutdown command to terminate the Trusted Platform Module once your programme has finished utilising it. Analysing TPM 2.0 thoroughly Advancements in Computer Security Trusted Platform Module (TPM) 2.0 hardware boosts computer security. It protects your system and encryption keys as a secure cryptoprocessor. Essential Features: Cryptographic Key Management: TPM 2.0 securely produces, stores, and utilises keys.Data encryption, digital signatures, and secure communication require these keys. TPM 2.0’s hardware isolation makes key theft and tampering much harder than with software-based systems.
Platform Integrity Validation: Trusted Platform Module 2.0 monitors firmware and other critical software. It looks for any unauthorised changes that might point to malware or efforts at tampering. TPM 2.0 can protect your data by stopping the system from booting if something suspect is found.
Platform Attestation: The firmware and software of your system can be reported on using Trusted Platform Module 2.0. Other security measures or reliable organisations can use these reports, known as attestations, to confirm the integrity of the system. This is useful for secure boot environments and for assessing a system’s health prior to allowing access to resources that are sensitive.
Benefits of TPM 2.0: BitLocker Drive TPM 2.0 securely holds encryption keys, strengthening encryption and other functions. This makes data access tougher for unauthorised parties, even if they reach your device.
Enhanced Platform Security: Your system will boot with authentic, unaltered firmware and software thanks to the platform integrity checks. This lessens the chance that malware will compromise your system remotely.
More Robust User Authentication: Trusted Platform Module 2.0 can be paired with Windows Hello and other comparable technologies to provide more reliable two-factor authentication. By requiring a physical factor in addition to a password, like a fingerprint or facial recognition, this strengthens security. TPM 2.0, Win11:
Microsoft says Windows 11 needs Trusted Platform Module 2.0. This shows how crucial hardware-based security capabilities are becoming in the battle against more complex assaults. The good news is that TPM 2.0 functionality is probably pre-installed on the majority of PCs made in the last few years. It may, however, be inactive by default in the BIOS settings.
Beyond the Fundamentals: Flexibility: TPM 2.0 takes a “library” approach, in contrast to its predecessor. This implies that Trusted Platform Module 2.0 features can be selected by manufacturers based on what best meets their device and security requirements. Wider acceptance across multiple platforms from laptops to embedded systems is made possible by this versatility.
Future-Proofing: Expansion is a key design principle of TPM 2.0. As security risks evolve, it supports the installation of new functions and algorithms. This guarantees that Trusted Platform Module 2.0 will continue to be applicable and useful when new security threats arise.
Read more on Govindhtech.com
0 notes
myprogrammingsolver · 5 months
Text
STAT 3280 HW2 Solved
(4 pts) The le \face-data.txt” contains the pixel values of four 64 64 images of faces, captured from di erent angles. For each image, the pixel values are stored in one column, in the order of vectorizing a 64 64 matrix (4096 pixel values). So, the data are stored as a 4096 4 matrix. Visualizing each of the 64 64 matrix will give one such image (actually, this is one of the most basic ways to…
Tumblr media
View On WordPress
0 notes
vespasiane · 11 months
Text
run the WordCount example with an input text and see how the content of the input file is processed by WordCount
Start a new terminal
Download hadoop-3.2.3.tar.gz to your theia environment by running the following command.
curl https://dlcdn.apache.org/hadoop/common/hadoop-3.3.6/hadoop-3.3.6.tar.gz --output hadoop-3.3.6.tar.gz
Extract the tar file in the currently directory.
tar -xvf hadoop-3.3.6.tar.gz
Navigate to the hadoop-3.3.6 directory.
cd hadoop-3.3.6
Check the hadoop command to see if it is setup. This will display the usage documentation for the hadoop script.
bin/hadoop
Run the following command to download data.txt to your current directory.
curl https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBM-BD0225EN-SkillsNetwork/labs/data/data.txt --output data.txt
Run the Map reduce application for wordcount on data.txt and store the output in /user/root/output
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.3.6.jar wordcount data.txt output
Once the word count runs successfully, you can run the following command to see the output file it has generated. You should see part-r-00000 with _SUCCESS indicating that the wordcount has been done.
ls output
Run the following command to see the word count output.
cat output/part-r-00000
0 notes
datab4s3 · 1 year
Text
hey babe i made you some coffee its in the dave strider mug
Tumblr media
4 notes · View notes
dragabond · 1 year
Text
This fly has been flying in a circuit around this room for over half an hour now. Non-stop. Literally non-stop. No end to the buzzing as it will not land at all anywhere. The sound is driving us insane.
3 notes · View notes
Text
Tumblr media
5 notes · View notes
codehunter · 1 year
Text
How to read data From *.CSV file using javascript?
My csv data looks like this:
heading1,heading2,heading3,heading4,heading5,value1_1,value2_1,value3_1,value4_1,value5_1,value1_2,value2_2,value3_2,value4_2,value5_2....
How do you read this data and convert to an array like this using Javascript?:
[heading1:value1_1 , heading2:value2_1, heading3 : value3_1, heading4 : value4_1, heading5 : value5_1 ],[heading1:value1_2 , heading2:value2_2, heading3 : value3_2, heading4 : value4_2, heading5 : value5_2 ]....
I've tried this code but no luck!:
<script type="text/javascript"> var allText =[]; var allTextLines = []; var Lines = []; var txtFile = new XMLHttpRequest(); txtFile.open("GET", "file://d:/data.txt", true); txtFile.onreadystatechange = function() { allText = txtFile.responseText; allTextLines = allText.split(/\r\n|\n/); }; document.write(allTextLines);<br> document.write(allText);<br> document.write(txtFile);<br></script>
https://codehunter.cc/a/javascript/how-to-read-data-from-csv-file-using-javascript
0 notes
programmingsolver · 2 years
Text
STAT 3280 HW2
  (4 pts) The le \face-data.txt” contains the pixel values of four 64 64 images of faces, captured from di erent angles. For each image, the pixel values are stored in one column, in the order of vectorizing a 64 64 matrix (4096 pixel values). So, the data are stored as a 4096 4 matrix. Visualizing each of the 64 64 matrix will give one such image (actually, this is one of the most basic ways to…
Tumblr media
View On WordPress
0 notes
Text
python fine tune a distilgpt llm model using attention matrix pruning, low-rank approximation and low-rank adaptation (lora)
# fine tune a model with attention matrices pruned and low-rank approximation/adaptation # https://pythonprogrammingsnippets.tumblr.com import torch from transformers import AutoTokenizer, AutoModelForCausalLM import os # load the pretrained model if it exists in _MODELS/lora_attention # otherwise load the pretrained model from huggingface if os.path.exists("_MODELS/lora_attention"): print("loading trained model") # Load the tokenizer tokenizer = AutoTokenizer.from_pretrained("_MODELS/lora_attention") # Load the pre-trained DistilGPT2 model model = AutoModelForCausalLM.from_pretrained("_MODELS/lora_attention") else: print("Downloading pretrained model from huggingface") # Load the tokenizer tokenizer = AutoTokenizer.from_pretrained("distilgpt2") # Load the pre-trained DistilGPT2 model model = AutoModelForCausalLM.from_pretrained("distilgpt2") # set padding token tokenizer.pad_token = tokenizer.eos_token # Define the training data from _DATASETS/data.txt with one sentence per line # now train with the train_data from the file _DATASETS/data.txt with one sentence per line. with open("_DATASETS/data.txt") as f: data = f.read() # now split data by \n train_data = data.split( '\n' ) # shuffle the data import random random.shuffle(train_data) # define the function for pruning the attention matrices def prune_attention_matrices(model, threshold): for name, param in model.named_parameters(): if "attention" in name and "weight" in name: data = param.data data[torch.abs(data) < threshold] = 0 param.data = data # define the function for low-rank approximation of the attention matrices def low_rank_approximation(model, rank): for name, param in model.named_parameters(): if "attention" in name and "weight" in name: data = param.data u, s, v = torch.svd(data) data = torch.mm(u[:, :rank], torch.mm(torch.diag(s[:rank]), v[:, :rank].t())) param.data = data # define the function for low-rank adaptation def low_rank_adaptation(model, train_data, tokenizer, rank, num_epochs, lr): # Define the optimizer and loss function optimizer = torch.optim.Adam(model.parameters(), lr=lr) loss_fn = torch.nn.CrossEntropyLoss() # Tokenize the training data input_ids = tokenizer(train_data, padding=True, truncation=True, return_tensors="pt")["input_ids"] # Perform low-rank adaptation fine-tuning for epoch in range(num_epochs): # Zero the gradients optimizer.zero_grad() # Get the model outputs outputs = model(input_ids=input_ids, labels=input_ids) # Get the loss loss = outputs.loss # Backpropagate the loss loss.backward() # Update the parameters optimizer.step() # Print the loss print("Epoch: {}, Loss: {}".format(epoch, loss.item())) # Low-rank approximation low_rank_approximation(model, rank) # prune the attention matrices prune_attention_matrices(model, 0.1) # low-rank approximation low_rank_approximation(model, 32) # low-rank adaptation low_rank_adaptation(model, train_data, tokenizer, 32, 5, 5e-5) # now train # Define the optimizer and loss function optimizer = torch.optim.Adam(model.parameters(), lr=5e-5) loss_fn = torch.nn.CrossEntropyLoss() # Tokenize the training data input_ids = tokenizer(train_data, padding=True, truncation=True, return_tensors="pt")["input_ids"] # Perform fine-tuning for epoch in range(5): # Zero the gradients optimizer.zero_grad() # Get the model outputs outputs = model(input_ids=input_ids, labels=input_ids) # Get the loss loss = outputs.loss # Backpropagate the loss loss.backward() # Update the parameters optimizer.step() # Print the loss print("Epoch: {}, Loss: {}".format(epoch, loss.item())) # save the model model.save_pretrained("_MODELS/lora_attention") # save the tokenizer tokenizer.save_pretrained("_MODELS/lora_attention") ## # load the model model = AutoModelForCausalLM.from_pretrained("_MODELS/lora_attention") # load the tokenizer tokenizer = AutoTokenizer.from_pretrained("_MODELS/lora_attention") # define the function for generating text def generate_text(model, tokenizer, prompt, max_length): # Tokenize the prompt input_ids = tokenizer(prompt, return_tensors="pt")["input_ids"] # Generate the text output_ids = model.generate(input_ids, max_length=max_length, do_sample=True, top_k=50, top_p=0.95, temperature=0.5, num_return_sequences=1) # Decode the text output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True) # Print the text print(output_text) # generate text generate_text(model, tokenizer, "quick brown", 125)
0 notes
codesolutionsstuff · 2 years
Text
5 Python Ideas That Will Help You Advance Your Career
Tumblr media
Using these Python Ideas in your code will make you a seasoned developer! Python is a high-level, object-oriented language that is gaining popularity and is easy to use. It is versatile, dynamic and robust, which makes it an excellent choice for both students and professionals. In addition to that, Python is the second most loved and preferred programming language after JavaScript. It is applicable in practically all technical domains. So, demand for Python developers will keep increasing in the upcoming years. The following are four important concepts that any developer would be wise to incorporate into their work in order to stay ahead of the game.
1. Understanding lists and dictionaries
This is an often overlooked concept in programming that can cause a lot of confusion. What if you create a list called ‘x’ and then, assign this list to the variable ‘y’? x = y = x Append new value in the y list and then print both lists: y.append(6) print(y) # Prints print(x) # Prints You're probably asking why the new value was added to both lists! This occurs because, unless otherwise specified, lists are not copied when assigned in Python. A new reference to this list is instead created. This means that y is just a reference to x and thus it works as you wanted it to. This means that changes in either variable will be reflected in the same list. You must use the.copy() method to make a duplicate of the list: x = y = x.copy() y.append(6) print(y) # Prints print(x) # Prints
2. Context managers
Python's Context Managers tool, a classic example of Resource Management, helps in allocating & releasing resources when the need arises and ensures that all aspects of a resource are handled properly. The most used and recognized example of a context manager is with the statement. The file-opening/closing 'with' mostly indicates the start and end of each file.. file = open(‘data.txt’,’w’) try: file.write(“Follow Me”) except: file.close() The with context manager enables you to do the task of opening a file in write mode and closing it in one line if something is not right. This would be especially useful for closing the file automatically if, for example, the user tries running the script but does not have permission to write to this file. with open (‘data.txt’,’w’) as f: f.write(“Follow Me”) Notice that we never called f.close() even though we opened it previously. Context managers handle these tasks automatically, and they will also catch exceptions if they are raised while cleanup is being done. Context Manager's usefulness goes far beyond just files; they could be used to manage a game's state or a database connection for example!
3. Generators
A generator is a kind of function that returns an object that can be iterated over. It contains at least a yield statement. The yield keyword in python is used to return a value from a function without destroying its current state or reference. A generator is a function that contains the yield keyword. A generator will only generate one piece of data and anything else you ask it to once. They are very memory efficient and take less space in the brain. Example def fib(limit): a,b = 0,1 while a < limit: yield a a, b = b, a + b for x in fib(10): print (x) Yield will pause the execution of a function and return a value from it every time. On the other hand, return terminates it.
4. Type hinting
Hints are used to make your code more self-explanatory and thus easier to read. One way you can do this is by hinting the type of the parameter & return value of a function. For example, we want to validate that the input text of a user is always an integer. To achieve this, we write a function that returns True or False based on our validations: def validate_func(input): ... Now, you see the usefulness of this function. It's not that complicated if you just take a look at the definition. Without that, it would be much more difficult to understand how this works. What is the input parameter's variable type? Where does it come from? Is it already an integer? What if it isn't? Does this function return anything, or just raise an exception when something goes wrong...? Some questions can be answered by refactoring to this code: def validate_func(input: str) -> bool: ... With this function, it's easier for a first-time reader to understand.
5. Logging
Logging is the process of recording the code that a programme runs. Logring facilitates debugging by displaying the steps made by a programmer while creating code. Python provides some modules that make logging fairly simple, and logs can be outputted to files afterwards if necessary. - You can use this to determine what is wrong with your text. - Success has been confirmed. - When an unforeseen scenario arises, issue a warning. - Error: Because of a more serious issue than a warning. - Critical: A critical error occurs after which the software is unable to run. Soon, I will provide a special article on "Logging in Python." Subscribe to receive an email when it is published.
Conclusion
Here are the Top 5 Python Ideas That Will Help You Advance Your Career. The concepts mentioned above are just a few of the Python insights that experienced developers keep in mind. I hope you found this essay useful and learned something new. Read the full article
0 notes