python – How to create multiple .md files based on a .csv file and enter the correct rows of the .csv file into each newly created .md file?

Basically I have a .csv file with similar data structure to the following:

Name | Department | Committees | Years

Jack | Finance    | Party      | 7.0
Jen  | Marketing  | Risk       | 15.0     

I would like to be able to create individual markdown files based on the Name column in the .csv and then write into each Markdown file, the (Department)(Committees)(Years) info for each person in this format:

  • ((Finance))
  • ((Social))
  • ((University))
  • ((7))

So far I have been able to figure out how to create the individual Markdown files by Name but I cannot figure out how to write the correct data inside the file and format it accordingly.

Code so far:

import pandas as pd
import csv

data = pd.read_csv("Employee_Directory.csv")
names = data.Name.to_list()

for n in names:
    name = n.split(", ")
   
    file_name = name(0).replace("n", "") + ".md"

    new_file = open(file_name, "w+")
    new_file.write = ""
    new_file.close()

print("Success")

Any help would be greatly appreciated.

dnd 5e – Can an Echo Knight fighter with two echoes created by the Legion of One feature move both echoes 30 feet each on the same turn?

Each echo has all of the attendant features of the Manifest Echo ability.

An echo created with the Manifest Echo feature has the following ability:

On your turn, you can mentally command the echo to move up to 30 feet in any direction (no action required).

With Legion of One, you create two echoes, we will call them Echo 1 and Echo 2.

Since each echo was created with the ability Manifest Echo, each echo has all of the attendant features of the Manifest Echo ability.

Thus, Echo 1 has this ability:

On your turn, you can mentally command the echo to move up to 30 feet in any direction (no action required).

And, Echo 2 has this ability:

On your turn, you can mentally command the echo to move up to 30 feet in any direction (no action required).

Each echo can move 30 feet on your turn, no action required.

Or to think of it another way: Legion of One creates two echoes, not one echo in two places.

dnd 5e – Can the pocket dimension created by the mirror of life trapping be returned to by using the Gate spell?

A wizard needs a few decades to think over a problem, and decides to do so in his mirror of life trapping to prevent himself from aging. He packs a bag full of writing supplies and a 5000gp diamond, and has a servant activate the mirror to trap the wizard inside. After a few years have past, the wizard realizes he misses his liquor cabinet, and casts Gate to return to his study. After grabbing a couple bottles and regaining his 9th level spell slot (he took too long and the gate had run its duration), he wishes to return to the mirror. Can the wizard recast gate and step back into the mirror, or must he return to the mirror by his servant reactivating the mirror? Does the extra dimensional cell remain in existence when the wizard leaves it, or collapse until the cell is refilled? What if the wizard leaves his notes, are they ejected when the wizard leaves?

If applicable, what other pocket dimension can or cannot be returned too in this way?

entities – How to properly manage field types for a content type created by a module for Drupal 9?

I’m a bit confused about two different errors I get, which seem to contradict each other. I guess I didn’t register my field types properly. The first one appears when I try to uninstall my module.

DrupalCoreFieldFieldException: Attempt to create a field field_example that does not exist on entity type node. in DrupalfieldEntityFieldConfig->getFieldStorageDefinition() (line 312 of coremodulesfieldsrcEntityFieldConfig.php).

The second one appears as an error message within the UI when I try to fix it by introducing another module which should only create the field type.

Unable to install Helper, field.field.node.content_type_example.field_example already exists in active configuration.

In general, the module calls an external API and fetches data which is then used to create nodes with several fields. These are defined inside the config/install directory. Furthermore, inside src/Plugin/Field there are FieldType, FieldFormatter and FieldWidget classes, more or less as described here.

I used this module when I tried to fix the first error without a helper module. With its help, I removed the field types created by my module in the first place. Unfortunately, I don’t know a lot about drush, which seems to be capable of solving the issue. On the other hand, it would be great if it was possible to “reset” the content type and the field types programmatically whenever the module is installed or uninstalled. So far, I tried the following code, without much luck:

<?php
// mymodule.install file
use DrupalfieldEntityFieldStorageConfig;

function mymodule_install() {
  if (FieldStorageConfig::loadByName('node', 'field_example')) {
    FieldStorageConfig::loadByName('node', 'field_example')->delete();
  }
}

Does someone know how I can fix the error and how I should manage these fields in the future? Thanks!

Magento 2.4 How created dynamic custom category layout?

How i can create dynamic custom layout for each Category and Category page?
enter image description here

I can used catalog_category_view_id_{{id}}.xml and created custom layout for current Category{{id}} like this: http://sumankc.com/2016/12/10/different-template-for-different-categories-in-magento-2-category_id-layout-handle-in-m2/

Example: I created catalog_category_view_id_10_customLayout.xml for my category with id 10.
enter image description here

But i don’t know how i can use my custom layout for Category without additional manipulation in code.

Tell me how I can do this, please. Thank you so much!

sharepoint online – Automatically create set of libraries when a site is created using teams

Stack Exchange Network


Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

sharepoint enterprise – Automatically generating pages when subsite is created

Migrating from Sharepoint 2010 to 2019 (On-Prem, Classic UI) and I need to implement a solution that automatically generates pages (3 for example) when a subsite is created.

An example would be subsites and subsite pages for departments in a business:

EX: If I create a new ‘Finance’ subsite under my root site and set the page layout via a terminal command, the solution should automatically generate 3 pages under that subsite in addition to the /default.aspx page: a ‘People’ page, ‘Overview’ page, and ‘Contact’ page. Each would use a custom layout set via a terminal command.

Am I looking for site definitions? Or a module (as described here)? I’ve poured through Microsoft’s documentation but the specifications of our implementation (2019, On-Prem, Classic UI) have made it difficult to discern the next steps.

It would also be great to automatically generate lists when subsites are created too. Would a similar process be used to accomplish both? Or are they different solutions?

I have access to Sharepoint Designer and Visual Studio. I’m familiar with Sharepoint Designer, it’s purpose, and how it interacts with our Sharepoint environment. Not as familiar with Visual Studio, so I dont know what I dont know about the tool.

Any help in the right direction would be much appreciated. Thank you!

8 – When I create or modify a page, a random URL is created

Usually I set an URL with the title of the page, but even if I set the URL I would like, I got a 404 error if I try to visit a page using that URL, but if I try to visit the page from the contents list, the page has a random link that comes from another website installed on the server using drupal (different installation, not on multi-site).
Is there a way to get rid of this random-generation and use the URL I set?
Thanks in advane

macos – file created in bash shell not showing up in finder

I created a json file in a bash shell. When I do ls file.json in the bash window it appears.

When I navigate to the same directory in finder I cannot see it. I kill the finder window and restart finder and navigate to same dir…no file to be seen. This is driving me nuts…what is going on??? Would appreciate some help. Thanks

UPDATE:
when i use finder’s search I see the file. otherwise I don’t. how stupid is MACOS?? So that sort of solves my immediate issue. but for god’s sake what is going on? still would love to know. MS Windows utterly superior user experience. Don’t see any this kind of nonsense. Sorry had to vent

ajax – I want to create a database table when a new post has been created

I want to create a database table when a new post of a custom post type has been created. Then when this post has been edited, I want to delete the previous table and I want to create a new one. Actually, my application creates dynamic forms as a post type. When a user submits a form I want to save the date on a database table.

Do you have any ideas about that?