px.bar(..., template="simple_white")
px.bar(..., labels={"gndr": "Gender", "cnt": "Total Participants"})
fig.for_each_xaxis(lambda xaxis: xaxis.update(showticklabels=True))
fig.for_each_yaxis(lambda yaxis: yaxis.update(showticklabels=True))
px.bar(..., template="simple_white")
px.bar(..., labels={"gndr": "Gender", "cnt": "Total Participants"})
fig.for_each_xaxis(lambda xaxis: xaxis.update(showticklabels=True))
fig.for_each_yaxis(lambda yaxis: yaxis.update(showticklabels=True))
import re | |
def get_tokens_with_entities(raw_text: str): | |
raw_tokens = re.split(r"\s(?![^\[]*\])", raw_text) | |
entity_value_pattern = r"\[(?P<value>.+?)\]\((?P<entity>.+?)\)" | |
entity_value_pattern_compiled = re.compile(entity_value_pattern, flags=re.I|re.M) | |
tokens_with_entities = [] | |
for raw_token in raw_tokens: | |
match = entity_value_pattern_compiled.match(raw_token) |
{"all_awardings":[],"author":"bbynug","author_created_utc":1524515156,"author_flair_background_color":null,"author_flair_css_class":null,"author_flair_richtext":[],"author_flair_template_id":null,"author_flair_text":null,"author_flair_text_color":null,"author_flair_type":"text","author_fullname":"t2_10irg672","author_patreon_flair":false,"body":"JP: \u201cMen are order and women are chaos\u201d\n\nYou: Yup, makes perfect sense \n\nAlso you: Wait ok first of all when did Jordan Peterson say anything derogatory about women?","can_gild":true,"can_mod_post":false,"collapsed":false,"collapsed_reason":null,"controversiality":0,"created_utc":1559347200,"distinguished":null,"edited":false,"gilded":0,"gildings":{},"id":"epom079","is_submitter":false,"link_id":"t3_bvaldc","locked":false,"no_follow":false,"parent_id":"t1_epok9jx","permalink":"\/r\/iamverysmart\/comments\/bvaldc\/in_a_thread_about_old_town_road\/epom079\/","quarantined":false,"removal_reason":null,"retrieved_on":1568677945,"score":9,"send_replies":true," |
//in upload.ctp, | |
<?php echo $this->Form->input('proxyfile',array('type' => 'file', 'class' => 'btn btn-default btn-file')) ?> | |
//in controller | |
public function upload(){ | |
$filename = WWW_ROOT . "/files/".$this->data['Proxy']['proxyfile']['name']; | |
/* copy uploaded file */ | |
if (move_uploaded_file($this->data['Proxy']['proxyfile']['tmp_name'],$filename)) { | |
/* save message to session */ |
void dynamic_scheduling(){ | |
printf("Dynamic Scheduling demo...\n"); | |
int N = 16; | |
int i; | |
printf("Using static scheduling\n"); | |
auto t1 = Clock::now(); | |
#pragma omp parallel for num_threads(4) schedule(static, 2) | |
for (i = 0; i < N; i++){ | |
printf("Thread no = %d, i = %d\n", omp_get_thread_num(), i); |
void static_scheduling(){ | |
printf("Static Scheduling demo...\n"); | |
int N = 30; | |
int i; | |
#pragma omp parallel for num_threads(7) schedule(static, 2) | |
for (i = 0; i < N; i++){ | |
printf("Rank is %d, i is %d\n", omp_get_thread_num(), i); | |
} | |