Frequency of cantrips outside of battle

Despite being “at will”, how often can a cantrip be cast outside of battle? For example, how long must a player wait before shooting 2 fire bolts, and is there a limit to how many could be cast or can they just go at it continuously for a day without incurring penalties?

Some Background

I have recently started DM’ing and there’s a few concepts that still elude me, or at least I am finding some trouble reconciling my interpretation of the rules and practical balance.

As I understand it, cantrips can be cast “at-will”. That’s fine inside of battle, but outside of it, things begin to get extremely broken. I have a player whose solution to most challenges is to “fire bolt it”. Is there a reinforced door? A stone wall? A shielded altar? He will just fire bolt it for 8 consecutive hours… Now, on most occasions I have been able to come up with counter-measures, like, bouncing the fire bolts back at him when they hit the altar’s shield, but still, it sounds ridiculous to me that you could just cast continuously for 2/3 of a day if you wished it so, without incurring any penalties… it’s simply absurd on so many levels! And yes, I know you technically could say “I hit it with my club for 8 hours”, and it would be just as ridiculous in my mind that there would be no fatigue, no weapon deterioration, etc…

I have told my player he can cast once every 6 seconds (since that’s the duration of a turn in battle), but I have no idea if that is correct, and it still feels unbalanced.

Given node and value find frequency of given value from node to root in a tree

A tree with N vertices and N-1 edges is present.

A value x can be inserted in any of the nodes.

A single node may contain multiple values.

How do I answer queries of the given type?

Given a node n and value v find frequency of v in the path from node n to the root of the tree.

I require an algorithm that answers such queries in log(N) time.

wholesale Solid State High Frequency Welder

COMPANY INTRODUCTION
Our History:
ZSHC Mechanical & Electrical Equipment Co., Ltd. was established in 2009, covering 20,000 square meters, with more than 100 employees. It has developed into a comprehensive enterprise integrating R&D, production, sales and service.
Our Factory:
The company has offices, technology department, purchasing department, sales department, foreign trade department, after-sales service center, production workshop, assembly workshop, commissioning workshop, inspection workshop, finished product workshop, etc. The organization structure is complete and closely linked, which ensures the company’s sustainable and healthy development. The technical department specializes in the development of technology, provides technical guidance for after-sales, provides a strong impetus for the company’s development in technology, ensures the maintenance of equipment and relieves customers’ worries. Debugging and inspection workshop, inspection refined to the surface treatment of each screw and casing.
Our Product:
The company mainly engaged in products: solid-state high-frequency welding machine, high-efficiency switch welding machine, high-frequency straight welded pipe mill line, intermediate-frequency annealing equipment, zinc spraying machine, shear butt welding, cooling equipment, palletizer, ultra-audio equipment and so on.
Product Application:
High Frequency Welding, Medium Frequency On-line Weld Annealing, Heat Treatment and other Induction Heating Equipment, and Industrial Automation Control Devices
Our Certificate:
Our company has obtained CE certification and ISO 9001 quality management system certification. Three new inventions and patents in high frequency welding
Production Equipment
Production Market:
Our products are exported to India, Thailand, Indonesia, Albania, Uzbekistan, Syria, Vietnam, Greece, Nepal and Many other countries and Areas.
Our service:
● Pre-sale Service:
1. Assist the buyer to do a good job in engineering planning and system demand analysis, and cooperate with the design institute to designate a complete engineering design plan according to the actual situation.
2. Work closely with the buyer to fully consider the customer’s systematic and functional structure, the functions of the outsourced equipment required by the system and the selection of software.
3. Provide professional technical advisory services.
4. Provide visits and reception at any time and various conveniences.
5. Select professional and technical personnel, business personnel for technical exchanges, technical communication, throughout the process, timely provide product performance, characteristics, schematic design drawings. As well as various parameters, actively cooperate with the buyer to select satisfactory products.
● Sale Service:
1. After the signing of the contract, the buyer’s technical specifications will be compiled, and the technical specifications will be perfected, supplemented and refined accordingly, so that the technical specifications will become the actual implementation technical documents, which will be executed after the buyer’s approval, and the technical agreement will be used as an annex to the equipment order contract.
2. Within the shortest time after the signing of the technical agreement, our company will submit to the buyer a list of standards for the design, manufacture, assembly, installation, commissioning, acceptance, testing, operation and maintenance of the contracted equipment for confirmation.
3. Provide the buyer with the drawings and information stipulated in the contract in time.
4. For the complete set of equipment purchased by the buyer in connection with the contract, our company takes the initiative to meet the technical conditions and information of the equipment interface requirements.
5. The quality problems arising in the process of equipment manufacturing shall be notified to the buyer without concealment.
6. Manufacturing of products, experimental testing of materials and products shall be carried out in accordance with relevant standards, and routine project inspection shall be carried out conscientiously.
7. factory acceptance. Debugging and testing the equipment before leaving the factory according to the contract and technical standards to ensure that the products are fully qualified.
8. After the equipment arrives at the site, our company will send experienced engineers to the site to guide installation, commissioning, operation and so on, and on-site technical guidance and training for the buyer’s operators to ensure the normal and safe use of equipment by the buyer.
● After Sale Service:
Our company has sufficient spare parts inventory and experienced technical after-sales personnel in China, able to respond quickly, and provide 7 x 24 hours full response service. Special commitment is made to provide free after-sales service within one-year warranty period and life-long paid service, and spare parts at the best price to ensure reliable and safe operation of the equipment during its service life.wholesale Solid State High Frequency Welder
website:http://www.metowd.com/
website2:http://www.metoht.com/

Information Theory: Comparing surprisal of words with varying count frequency

This is a very broad question, I’m not sure if cstheory is the better place.

How can I compare the conditional surprisal of words that vary in frequency?

$ S(w|context)=−log(p(w|context))=−log(\frac{count(w,context)}{count(context)})$

The $ count(w,context)$ depends on the frequency of the word w because this can be further broken down to $ p(w|context)count(w)$ . This means a word that is more frequent will have a lower surprisal.

Is there a way to compare the surprisal of words with varying count/frequency, i.e control for frequency? Do I just divide $ count(w,context)$ by $ count(w)$ to normalize by count?

Disable CPU frequency scaling?

I need to run ATLAS on my ubuntu laptop, but the software won’t run unless you dissable CPU frequency scaling. I’ve tried the instructions from here http://math-atlas.sourceforge.net/atlas_install/node5.html but they aren’t working on my Toshiba laptop. With freq-scaling on the software becomes useless.

Can anyone help?

Frequency analysis based anagram checker

I uploaded code solutions for some problems of the book Cracking the Coding Interview, 6th Edition to GitHub, I would like to know your rating and potential improvement of the code I wrote.

Here is the first problem of chapter 1 (anagrams):

#include <stdio.h> #include <string.h>  /*check if one string is an anagram of another, it uses an int array  * called alphabet to store frequencies of chars in both strings, add  * 1 for s1 and subtract 1 for s2*/ int are_anagrams(const char *s1, const char *s2) {     int alphabet[26] = { 0 };     int index1, index2;     size_t l1 = strlen(s1), l2 = strlen(s2), i;      /*if the strings have different lengths are not anagrams */     if (l1 != l2) return 0;      /* count the frequencies of characters */     for (i = 0; i < l1; ++i) {         index1 = s1[i] - 'a';         index2 = s2[i] - 'a';         ++alphabet[index1];         --alphabet[index2];     }     /* all the alphabet letters should be 0, otherwise the strings are not      * anagrams */     for (i = 0; i < 26; ++i)         if (alphabet[i] != 0) return 0;      return 1; }  int main() {     char s1[] = "aaabbbccc";     char s2[] = "aabbaccbc";     printf("%d\n", are_anagrams(s1, s2));     return 0; } 

Any suggestion or advice is welcome, thanks for your time.

Building a frequency dictionary from a pandas dataframe without looping

I need to make a frequency dictionary from a pandas series (from the ‘amino_acid’ column in dataframe below) that also adds an adjacent row for each entry in the dictionary (from ‘templates’ column).

    templates   amino_acid 0   118         CAWSVGQYSNQPQHF 1   635         CASSLRGNQPQHF 2   468         CASSHGTAYEQYF 3   239         CASSLDRLSSGEQYF 4   51          CSVEDGPRGTQYF 

My current approach of iterating through the dataframe seems to be inefficient and even an anti-pattern according to this post. How can I improve the efficiency/use best practice for doing this?

My current approach:

sequence_counts = {} seqs= list(zip(df.amino_acid, df.templates))  for seq in seqs:     if seq[0] not in sequence_counts:         sequence_counts[seq[0]] = 0     sequence_counts[seq[0]] += seq[1] 

I’ve seen people the below way, but can’t figure out how to adjust it to add each respective ‘templates’ entry:

sequence_counts = df['amino_acid'].value_counts().to_dict() 

Any help/feedback would be greatly appreciated! 🙂

Is frequency vector a good choice for minimizing chain code derivative vector?

I’m trying to implement a feedforward neural network that recognize a type of cable based on chain codes derivative vector. The size of my chain codes derivative vectors is variable, and I would like them to converge to the same length. As a solution I’m thinking about a frequency vector that will contain each direction(8 in total). So from a variable length, all the vectors will converge to vectors of length 8. Is this approach ok?