主頁 > 後端開發 > [Paddle領航團python基礎課程大作業一]英文詞頻的統計任務

[Paddle領航團python基礎課程大作業一]英文詞頻的統計任務

2021-02-08 13:52:06 後端開發

英文詞頻的統計任務

    • 作業內容
      • 方法一:
      • 方法二

作業內容

統計英語6級試題中所有單詞的詞頻,并回傳一個如下樣式的字典

{‘and’:100,‘abandon’:5}

英語6級試題的檔案路徑./artical.txt

檔案下載傳送門

Tip: 讀取檔案的方法

def get_artical(artical_path):
    with open(artical_path) as fr:
        data = fr.read()
    return data

get_artical('./artical.txt')

處理要求

  • (a) '\n’是換行符 需要洗掉
  • (b) 標點符號需要處理
['.', ',', '!', '?', ';', '\'', '\"', '/', '-', '(', ')']
  • ? 阿拉伯數字需要處理
['1','2','3','4','5','6','7','8','9','0'] 
  • (d) 注意大小寫
    一些單詞由于在句首,首字母大寫了,需要把所有的單詞轉成小寫
'String'.lower()
  • (e) 高分項

通過自己查找資料學習正則運算式,并在代碼中使用(re模塊)

可參考資料:https://docs.python.org/3.7/library/re.html

方法一:

1.讀取檔案

2.處理資料

3.獲得詞匯

4.獲得詞頻

5.拼接

# 偽代碼
# 得到檔案內容
def get_artical(artical_path):
    with open(artical_path) as fr:
        data = fr.read()
    return data

get_artical('./artical.txt')

a = ['.', ',', '!', '?', ';', '\'', '\"', '/', '-', '(', ')']
b = ['1','2','3','4','5','6','7','8','9','0'] 

# 處理資料
新資料 = 資料.lower()  # 小寫化
自定義變數

# 臟資料的處理
回圈 新資料:
    如果 回圈的內容 不等于 a, b, '\n':
        得到新的資料

# 獲得我們要進行統計詞頻的資料(方法一)
回圈 處理以后的資料:
    查看是否在我們資料的串列
        沒有就添加
    否則
        就pass
# 獲得的新資料轉元組(方法二)
newword = tuple(newdata)


# 統計詞頻
回圈 我們要進行統計詞頻的資料:
    回圈我們處理后的newdata:
        判斷單詞的次數然后計數
    計數后放進串列

回圈 單詞的長度(len(newword)):
    把單詞和詞頻匹配并放進字典
{'passage': 11, 'one': 12, 'questions': 4, 'to': 95, 'are': 25, 'based': 5, 'on': 25, 'the': 169, 'following': 4, 'last': 3, 'year': 1, 'a': 87, 'child': 3, 'was': 10, 'born': 2, 'at': 7, 'hospital': 1, 'in': 61, 'uk': 1, 'with': 19, 'her': 5, 'heart': 1, 'outside': 2, 'body': 3, 'few': 3, 'babies': 1, 'survive': 1, 'this': 9, 'rare': 1, 'condition': 1, 'and': 74, 'those': 6, 'who': 3, 'do': 11, 'must': 1, 'endure': 1, 'numerous': 1, 'operations': 3, 'likely': 2, 'have': 12, 'complex': 1, 'needs': 1, 'when': 7, 'mother': 1, 'interviewed': 1, 'three': 1, 'weeks': 1, 'after': 1, 'daughter': 1, 's': 23, 'birth': 1, 'she': 4, 'asked': 2, 'if': 6, 'prepared': 1, 'for': 22, 'what': 25, 'might': 1, 'be': 18, 'daunting': 1, 'task': 1, 'caring': 1, 'answered': 1, 'without': 2, 'hesitation': 1, 'that': 25, 'as': 18, 'far': 1, 'concerned': 1, 'would': 3, 'privilege': 2, 'rarely': 1, 'has': 5, 'there': 6, 'been': 4, 'better': 4, 'example': 2, 'of': 82, 'power': 1, 'attitude': 6, 'our': 9, 'most': 4, 'powerful': 2, 'psychological': 3, 'tools': 1, 'attitudes': 8, 'allow': 1, 'us': 2, 'turn': 3, 'mistakes': 1, 'into': 3, 'opportunities': 3, 'loss': 1, 'chance': 3, 'new': 10, 'beginnings': 1, 'an': 9, 'is': 34, 'settled': 1, 'way': 6, 'thinking': 1, 'feeling': 1, 'or': 9, 'behaving': 3, 'towards': 2, 'particular': 1, 'objects': 1, 'people': 5, 'events': 3, 'ideologies': 2, 'we': 13, 'use': 1, 'filter': 1, 'interpret': 1, 'react': 1, 'world': 6, 'around': 9, 'you': 16, 'weren': 1, 't': 11, 'rather': 2, 'they': 30, 'all': 6, 'learned': 1, 'happens': 2, 'number': 1, 'ways': 3, 'influences': 1, 'occur': 1, 'during': 2, 'early': 1, 'childhood': 1, 'include': 1, 'both': 2, 'happened': 1, 'directly': 1, 'did': 2, 'said': 3, 'your': 8, 'presence': 1, 'acquire': 1, 'distinctive': 1, 'identity': 1, 'further': 3, 'refined': 1, 'by': 6, 'behavior': 6, 'whom': 1, 'identify': 1, 'family': 2, 'gender': 2, 'culture': 1, 'admire': 1, 'even': 4, 'though': 3, 'may': 10, 'not': 10, 'know': 1, 'them': 11, 'personally': 1, 'friendships': 1, 'other': 3, 'important': 2, 'relationships': 1, 'become': 4, 'increasingly': 3, 'particularly': 1, 'adolescence': 1, 'about': 13, 'same': 2, 'time': 5, 'throughout': 2, 'adulthood': 1, 'information': 1, 'receive': 1, 'especially': 1, 'ideas': 1, 'repeated': 1, 'association': 1, 'goals': 2, 'achievements': 1, 'find': 8, 'attractive': 1, 'also': 2, 'refines': 1, 'many': 10, 'assume': 1, 'internally': 2, 'consistent': 3, 'think': 5, 'feel': 4, 'someone': 1, 'something': 2, 'predicts': 1, 'however': 2, 'studies': 2, 'found': 4, 'feelings': 2, 'thoughts': 2, 'don': 7, 'necessarily': 1, 'predict': 1, 'general': 1, 'will': 12, 'only': 7, 'easy': 2, 'hold': 1, 'similar': 1, 'beliefs': 2, 'why': 3, 'say': 4, 'believe': 4, 'benefits': 1, 'recycling': 1, 'exercise': 1, 'but': 9, 'behave': 2, 'line': 3, 'their': 28, 'views': 1, 'because': 3, 'it': 19, 'takes': 1, 'awareness': 2, 'effort': 1, 'courage': 1, 'go': 1, 'beyond': 1, 'merely': 1, 'stating': 1, 'good': 3, 'idea': 2, 'effective': 1, 'change': 11, 'start': 2, 'already': 2, 'd': 21, 'prefer': 1, 'take': 2, 'some': 6, 'reflect': 1, 'anything': 1, 'consider': 2, 'burden': 1, 'than': 3, 'so': 1, 'right': 1, 'now': 1, 'latter': 1, 'case': 2, 'learn': 4, 'from': 12, 'shapes': 1, 'b': 20, 'improves': 1, 'wellbeing': 1, 'c': 20, 'determines': 1, 'how': 5, 'respond': 1, 'immediate': 4, 'environment': 4, 'changes': 3, 'interact': 1, 'another': 2, 'can': 13, 'contribute': 2, 'refinement': 1, 'according': 5, 'idols': 1, 'behaviors': 1, 'educational': 2, 'level': 3, 'contact': 1, 'opposite': 1, 'interaction': 1, 'different': 2, 'cultures': 1, 'suggest': 2, 'person': 3, 'going': 2, 'mentality': 1, 'expression': 1, 'interpersonal': 1, 'relations': 1, 'no': 5, 'matter': 1, 'come': 2, 'afford': 2, 'hypocritical': 1, 'lack': 1, 'willpower': 1, 'proposed': 3, 'strategy': 1, 'changing': 2, 'things': 1, 'require': 2, 'attention': 1, 'starting': 1, 'act': 1, 'embodies': 1, 'aspirations': 1, 'adjusting': 1, 'gradually': 1, 'over': 3, 'period': 1, 'considering': 1, 'reducing': 1, 'burdens': 1, 'two': 3, 'industrial': 3, 'fishing': 20, 'krill': 14, 'unspoilt': 1, 'waters': 5, 'antarctica': 4, 'threatening': 2, 'future': 4, 'great': 4, 'wildernesses': 1, 'report': 5, 'study': 7, 'greenpeace': 6, 'analysed': 1, 'movements': 1, 'vessels': 1, 'region': 5, 'were': 2, 'operating': 1, 'vicinity': 1, 'penguin': 7, 'colonies': 6, 'whale': 1, 'feeding': 2, 'grounds': 10, 'highlights': 1, 'incidents': 1, 'boats': 1, 'being': 6, 'involved': 1, 'groundings': 1, 'oil': 1, 'spills': 1, 'accidents': 1, 'which': 5, 'posed': 2, 'serious': 1, 'threat': 2, 'antarctic': 33, 'ecosystem': 3, 'published': 1, 'tuesday': 1, 'comes': 1, 'amid': 2, 'growing': 2, 'concern': 3, 'impact': 5, 'climate': 7, 'global': 7, 'campaign': 5, 'launched': 3, 'create': 1, 'network': 1, 'ocean': 10, 'sanctuaries': 3, 'protect': 4, 'seas': 4, 'calling': 1, 'halt': 1, 'areas': 5, 'considered': 1, 'sanctuary': 5, 'status': 1, 'frida': 1, 'bengtsson': 1, 'said:': 3, 'industry': 2, 'wants': 1, 'show': 1, 'responsible': 1, 'player': 1, 'then': 1, 'should': 6, 'voluntarily': 1, 'getting': 1, 'out': 7, 'any': 3, 'area': 4, 'instead': 1, 'backing': 1, 'protection': 2, 'these': 4, 'huge': 3, 'tracts': 1, 'tract': 1, 'protecting': 1, 'wildlife': 2, 'banning': 1, 'just': 3, 'created': 1, 'ross': 1, 'sea': 7, 'reserve': 1, 'vast': 1, 'weddell': 2, 'third': 1, 'under': 1, 'consideration': 1, 'west': 1, 'peninsula': 2, 'key': 4, 'commission': 1, 'conservation': 6, 'marine': 10, 'living': 1, 'resources': 1, 'ccamlr': 5, 'manages': 1, 'decide': 2, 'proposal': 1, 'conference': 1, 'australia': 1, 'october': 1, 'although': 3, 'decision': 1, 'expected': 2, 'until': 1, 'later': 2, 'keith': 1, 'reid': 1, 'science': 2, 'manager': 2, 'organisation': 1, 'sought': 1, 'balance': 1, 'between': 3, 'sustainable': 2, 'southern': 6, 'he': 2, 'more': 3, 'taking': 1, 'place': 1, 'nearer': 1, 'often': 1, 'happening': 1, 'season': 2, 'empty': 1, 'creation': 1, 'system': 1, 'protected': 2, 'part': 2, 'ongoing': 1, 'scientific': 2, 'policy': 2, 'discussions': 2, 'added': 1, 'long': 2, 'term': 1, 'operation': 1, 'depends': 1, 'healthy': 1, 'thriving': 1, 'always': 1, 'had': 1, 'open': 2, 'dialogue': 2, 'environmental': 1, 'non': 1, 'governmental': 1, 'organisations': 1, 'strongly': 1, 'intend': 1, 'continue': 1, 'including': 1, 'talks': 1, 'discuss': 1, 'improvements': 1, 'latest': 1, 'data': 2, 'ones': 1, 'establishment': 1, 'hope': 1, 'positively': 1, 'knowledge': 1, 'experience': 2, 'does': 8, 'caused': 1, 'penguins': 18, 'whales': 7, 'migrate': 3, 'depriving': 1, 'habitats': 3, 'carried': 1, 'too': 2, 'close': 2, 'unprecedented': 1, 'purpose': 1, 'reduce': 1, 'establish': 1, 'regulate': 1, 'publicise': 1, 'recommendation': 1, 'opting': 1, 'operate': 1, 'away': 1, 'suggested': 1, 'volunteering': 1, 'endangered': 1, 'species': 8, 'refraining': 1, 'breeding': 11, 'showing': 1, 'its': 5, 'sense': 1, 'responsibility': 1, 'leading': 1, 'aim': 1, 'raise': 1, 'public': 1, 'vulnerability': 1, 'ban': 1, 'commercial': 1, 'keep': 2, 'interference': 1, 'sustain': 1, 'damaging': 1, 'define': 1, 'role': 1, 'coordinator': 1, 'authority': 1, 'big': 1, 'analysis': 1, 'provider': 1, 'needed': 1, 'expertise': 1, 'initiator': 1, 'schools': 9, 'microcosm': 1, 'society': 4, 'mediate': 1, 'best': 2, 'seek': 1, 'alleviate': 1, 'external': 1, 'pressures': 3, 'pupils': 4, 'while': 1, 'equipping': 1, 'understand': 1, 'handle': 1, 'once': 1, 'sheltering': 1, 'broadening': 1, 'horizons': 2, 'ambitious': 2, 'circumstances': 1, 'divided': 2, 'unequal': 2, 'ideals': 1, 'clash': 1, 'outright': 1, 'trips': 7, 'adults': 1, 'adventure': 1, 'lifetime': 1, 'treks': 1, 'bomeo': 1, 'sports': 1, 'tour': 1, 'barbados': 1, 'appear': 1, 'almost': 1, 'routine': 1, 'state': 1, 'parents': 5, 'thousands': 1, 'pounds': 3, 'cannot': 3, 'profit': 1, 'companies': 1, 'arrange': 1, 'meanwhile': 1, 'arrive': 1, 'school': 6, 'hungry': 2, 'families': 2, 'breakfast': 1, 'poverty': 2, 'action': 1, 'group': 1, 'says': 2, 'nine': 1, 'every': 1, 'classroom': 1, 'fall': 1, 'below': 1, 'discrepancy': 1, 'startlingly': 1, 'apparent': 1, 'introducing': 1, 'fundraising': 2, 'requirement': 1, 'students': 15, 'help': 6, 'off': 1, 'children': 6, 'tap': 1, 'up': 2, 'richer': 1, 'aunts': 1, 'neighbours': 2, 'probing': 1, 'rock': 1, 'pools': 1, 'local': 1, 'beach': 1, 'practising': 1, 'french': 1, 'language': 1, 'exchange': 1, 'fire': 1, 'passions': 1, 'boost': 1, 'skills': 1, 'eyes': 1, 'life': 3, 'possibilities': 1, 'outings': 1, 'bright': 1, 'disadvantaged': 4, 'get': 1, 'scores': 1, 'tests': 1, 'globalised': 1, 'age': 1, 'international': 1, 'travel': 3, 'manage': 1, 'cost': 2, 'trip': 3, 'abroad': 1, 'easily': 1, 'holiday': 1, 'face': 3, 'immense': 1, 'mounting': 1, 'financial': 1, 'shown': 1, 'remarkable': 1, 'determination': 1, 'ingenuity': 3, 'ensuring': 1, 'able': 2, 'truly': 1, 'applauded': 1, 'methods': 1, 'such': 4, 'whole': 1, 'proceeds': 1, 'pooled': 1, 'extend': 1, 'fuel': 2, 'community': 4, 'spirit': 2, 'justified': 1, 'average': 1, 'income': 2, 'initiatives': 1, 'doors': 1, 'pull': 1, 'expensive': 1, 'field': 3, 'see': 4, 'little': 1, 'party': 1, 'celebration': 1, 'well': 2, 'guilt': 1, 'left': 1, 'behind': 1, 'department': 1, 'education': 1, 'guidance': 1, 'charge': 1, 'board': 1, 'lodging': 1, 'syllabus': 1, 'receiving': 1, 'government': 1, 'aid': 1, 'exempt': 1, 'costs': 1, 'seem': 1, 'ignore': 1, 'advice': 1, 'cover': 3, 'kind': 1, 'glamorous': 1, 'exotic': 1, 'becoming': 1, 'common': 1, 'bring': 1, 'together': 2, 'communities': 1, 'single': 1, 'handed': 1, 'least': 1, 'expect': 1, 'foster': 1, 'divisions': 1, 'exclude': 1, 'author': 5, 'prepare': 1, 'challenge': 1, 'social': 1, 'enable': 2, 'motivate': 1, 'develop': 1, 'physical': 1, 'intellectual': 1, 'abilities': 1, 'encourage': 1, 'achieve': 1, 'backgrounds': 1, 'mix': 1, 'each': 1, 'widen': 1, 'gap': 1, 'privileged': 1, 'give': 1, 'benefit': 2, 'rich': 2, 'relatives': 1, 'build': 1, 'aiming': 1, 'improve': 1, 'services': 1, 'activities': 3, 'mutual': 1, 'understanding': 2, 'involving': 1, 'campus': 1, 'low': 1, 'regarding': 1, 'want': 5, 'participate': 2, 'much': 2, 'kids': 2, 'hard': 1, 'miss': 1, 'broaden': 1, 'despite': 1, 'adventures': 1, 'run': 1, 'risks': 1, 'expectation': 1, 'bringing': 1, 'resolving': 1, 'existing': 1, 'discrepancies': 1, 'avoiding': 1, 'creating': 1, 'gaps': 1, 'among': 1, 'giving': 1, 'poor': 1, 'preferential': 1, 'treatment': 1, 'rising': 2, 'temperatures': 2, 'overfishing': 2, 'pristine': 3, 'could': 6, 'king': 15, 'populations': 1, 'pushed': 2, 'brink': 1, 'extinction': 2, 'end': 1, 'century': 1, 'states': 1, 'warming': 4, 'transforms': 1, 'wilderness': 2, 'percent': 2, 'either': 1, 'disappear': 3, 'forced': 2, 'co': 1, 'celine': 1, 'le': 3, 'bohec': 3, 'university': 1, 'strasbourg': 1, 'france': 1, 'warned:': 1, 're': 1, 'actions': 1, 'aimed': 1, 'halting': 1, 'controlling': 1, 'pace': 1, 'current': 2, 'human': 3, 'induced': 1, 'stays': 1, 'soon': 1, 'findings': 2, 'earlier': 1, 'month': 1, 'separate': 2, 'combination': 1, 'population': 2, 'potentially': 2, 'disastrous': 1, 'seals': 1, 'today': 1, 'starkest': 1, 'yet': 1, 'devastating': 1, 'exploitation': 1, 'delicate': 1, 'ecosystems': 4, 'unless': 1, 'greenhouse': 1, 'gas': 1, 'emissions': 1, 'drop': 1, 'million': 1, 'pairs': 1, 'relocate': 2, 'second': 2, 'largest': 2, 'type': 1, 'breed': 1, 'specific': 1, 'isolated': 2, 'islands': 4, 'where': 1, 'ice': 2, 'access': 1, 'warms': 1, 'water': 3, 'called': 1, 'polar': 2, 'front': 2, 'upward': 1, 'movement': 1, 'nutrient': 1, 'supports': 1, 'abundance': 1, 'south': 1, 'means': 1, 'feed': 2, 'fish': 1, 'kill': 2, 'leaving': 1, 'chicks': 1, 'longer': 2, 'distance': 1, 'fool': 1, 'prows': 1, 'entire': 2, 'wiped': 1, 'plight': 1, 'serve': 2, 'like': 2, 'seabirds': 1, 'mammals': 1, 'occupy': 1, 'higher': 2, 'levels': 2, 'food': 4, 'chain': 1, 'call': 1, 'bio': 1, 'indicators': 2, 'sensitive': 1, 'predicting': 1, 'impacts': 1, 'sub': 1, 'closer': 1, 'retreating': 1, 'source': 1, 'suitable': 2, 'scarce': 1, 'handful': 1, 'sustaining': 1, 'large': 1, 'happen': 1, 'verge': 1, 'dying': 1, 'rise': 2, 'melting': 1, 'destroy': 1, 'forever': 1, 'shrinking': 1, 'force': 1, 'accelerated': 1, 'recent': 1, 'years': 1, 'fatal': 1, 'certain': 1, 'worsened': 1, 'pollution': 1, 'birds': 1, 'extinct': 1, 'primarily': 1, 'kinds': 1, 'majority': 1, 'baby': 1, 'live': 1, 'invade': 1, 'distances': 1, 'reluctant': 1, 'leave': 1, 'propagation': 1, 'ultimate': 1, 'retreat': 1, 'luge': 1}

方法二

1.資料讀取

2.使用正則處理資料

3.使用函式對內容進行整理

import re
from collections import Counter


# 讀取資料
def get_artical(artical_path):
    with open(artical_path) as fr:
        data = fr.read()
    return data

get_artical('./artical.txt')


使用正則運算式獲取單詞并轉串列 # 資料處理并轉格式
print(統計詞頻并轉字典)  # 輸出統計內容


<class 'dict'>
{'passage': 11, 'one': 12, 'questions': 4, 'to': 95, 'are': 25, 'based': 5, 'on': 25, 'the': 169, 'following': 4, 'last': 3, 'year': 1, 'a': 87, 'child': 3, 'was': 10, 'born': 2, 'at': 7, 'hospital': 1, 'in': 61, 'uk': 1, 'with': 19, 'her': 5, 'heart': 1, 'outside': 2, 'body': 3, 'few': 3, 'babies': 1, 'survive': 1, 'this': 9, 'rare': 1, 'condition': 1, 'and': 74, 'those': 6, 'who': 3, 'do': 11, 'must': 1, 'endure': 1, 'numerous': 1, 'operations': 3, 'likely': 2, 'have': 12, 'complex': 1, 'needs': 1, 'when': 7, 'mother': 1, 'interviewed': 1, 'three': 1, 'weeks': 1, 'after': 1, 'daughter': 1, 's': 23, 'birth': 1, 'she': 4, 'asked': 2, 'if': 6, 'prepared': 1, 'for': 22, 'what': 25, 'might': 1, 'be': 18, 'daunting': 1, 'task': 1, 'caring': 1, 'answered': 1, 'without': 2, 'hesitation': 1, 'that': 25, 'as': 18, 'far': 1, 'concerned': 1, 'would': 3, 'privilege': 2, 'rarely': 1, 'has': 5, 'there': 6, 'been': 4, 'better': 4, 'example': 2, 'of': 82, 'power': 1, 'attitude': 6, 'our': 9, 'most': 4, 'powerful': 2, 'psychological': 3, 'tools': 1, 'attitudes': 8, 'allow': 1, 'us': 2, 'turn': 3, 'mistakes': 1, 'into': 3, 'opportunities': 3, 'loss': 1, 'chance': 3, 'new': 10, 'beginnings': 1, 'an': 9, 'is': 34, 'settled': 1, 'way': 6, 'thinking': 1, 'feeling': 1, 'or': 9, 'behaving': 3, 'towards': 2, 'particular': 1, 'objects': 1, 'people': 5, 'events': 3, 'ideologies': 2, 'we': 13, 'use': 1, 'filter': 1, 'interpret': 1, 'react': 1, 'world': 6, 'around': 9, 'you': 16, 'weren': 1, 't': 11, 'rather': 2, 'they': 30, 'all': 6, 'learned': 1, 'happens': 2, 'number': 1, 'ways': 3, 'influences': 1, 'occur': 1, 'during': 2, 'early': 1, 'childhood': 1, 'include': 1, 'both': 2, 'happened': 1, 'directly': 1, 'did': 2, 'said': 6, 'your': 8, 'presence': 1, 'acquire': 1, 'distinctive': 1, 'identity': 1, 'further': 3, 'refined': 1, 'by': 6, 'behavior': 6, 'whom': 1, 'identify': 1, 'family': 2, 'gender': 2, 'culture': 1, 'admire': 1, 'even': 4, 'though': 3, 'may': 10, 'not': 10, 'know': 1, 'them': 11, 'personally': 1, 'friendships': 1, 'other': 3, 'important': 2, 'relationships': 1, 'become': 4, 'increasingly': 3, 'particularly': 1, 'adolescence': 1, 'about': 13, 'same': 2, 'time': 5, 'throughout': 2, 'adulthood': 1, 'information': 1, 'receive': 1, 'especially': 1, 'ideas': 1, 'repeated': 1, 'association': 1, 'goals': 2, 'achievements': 1, 'find': 8, 'attractive': 1, 'also': 2, 'refines': 1, 'many': 10, 'assume': 1, 'internally': 2, 'consistent': 3, 'think': 5, 'feel': 4, 'someone': 1, 'something': 2, 'predicts': 1, 'however': 2, 'studies': 2, 'found': 4, 'feelings': 2, 'thoughts': 2, 'don': 7, 'necessarily': 1, 'predict': 1, 'general': 1, 'will': 12, 'only': 7, 'easy': 2, 'hold': 1, 'similar': 1, 'beliefs': 2, 'why': 3, 'say': 4, 'believe': 4, 'benefits': 1, 'recycling': 1, 'exercise': 1, 'but': 9, 'behave': 2, 'line': 3, 'their': 28, 'views': 1, 'because': 3, 'it': 19, 'takes': 1, 'awareness': 2, 'effort': 1, 'courage': 1, 'go': 1, 'beyond': 1, 'merely': 1, 'stating': 1, 'good': 3, 'idea': 2, 'effective': 1, 'change': 11, 'start': 2, 'already': 2, 'd': 21, 'prefer': 1, 'take': 2, 'some': 6, 'reflect': 1, 'anything': 1, 'consider': 2, 'burden': 1, 'than': 3, 'so': 1, 'right': 1, 'now': 1, 'latter': 1, 'case': 2, 'learn': 4, 'from': 12, 'shapes': 1, 'b': 20, 'improves': 1, 'wellbeing': 1, 'c': 20, 'determines': 1, 'how': 5, 'respond': 1, 'immediate': 4, 'environment': 4, 'changes': 3, 'interact': 1, 'another': 2, 'can': 13, 'contribute': 2, 'refinement': 1, 'according': 5, 'idols': 1, 'behaviors': 1, 'educational': 2, 'level': 3, 'contact': 1, 'opposite': 1, 'interaction': 1, 'different': 2, 'cultures': 1, 'suggest': 2, 'person': 3, 'going': 2, 'mentality': 1, 'expression': 1, 'interpersonal': 1, 'relations': 1, 'no': 5, 'matter': 1, 'come': 2, 'afford': 2, 'hypocritical': 1, 'lack': 1, 'willpower': 1, 'proposed': 3, 'strategy': 1, 'changing': 2, 'things': 1, 'require': 2, 'attention': 1, 'starting': 1, 'act': 1, 'embodies': 1, 'aspirations': 1, 'adjusting': 1, 'gradually': 1, 'over': 3, 'period': 1, 'considering': 1, 'reducing': 1, 'burdens': 1, 'two': 3, 'industrial': 3, 'fishing': 20, 'krill': 14, 'unspoilt': 1, 'waters': 5, 'antarctica': 4, 'threatening': 2, 'future': 4, 'great': 4, 'wildernesses': 1, 'report': 5, 'study': 7, 'greenpeace': 6, 'analysed': 1, 'movements': 1, 'vessels': 1, 'region': 5, 'were': 2, 'operating': 1, 'vicinity': 1, 'penguin': 7, 'colonies': 6, 'whale': 1, 'feeding': 2, 'grounds': 10, 'highlights': 1, 'incidents': 1, 'boats': 1, 'being': 6, 'involved': 1, 'groundings': 1, 'oil': 1, 'spills': 1, 'accidents': 1, 'which': 5, 'posed': 2, 'serious': 1, 'threat': 2, 'antarctic': 33, 'ecosystem': 3, 'published': 1, 'tuesday': 1, 'comes': 1, 'amid': 2, 'growing': 2, 'concern': 3, 'impact': 5, 'climate': 7, 'global': 7, 'campaign': 5, 'launched': 3, 'create': 1, 'network': 1, 'ocean': 10, 'sanctuaries': 3, 'protect': 4, 'seas': 4, 'calling': 1, 'halt': 1, 'areas': 5, 'considered': 1, 'sanctuary': 5, 'status': 1, 'frida': 1, 'bengtsson': 1, 'industry': 2, 'wants': 1, 'show': 1, 'responsible': 1, 'player': 1, 'then': 1, 'should': 6, 'voluntarily': 1, 'getting': 1, 'out': 7, 'any': 3, 'area': 4, 'instead': 1, 'backing': 1, 'protection': 2, 'these': 4, 'huge': 3, 'tracts': 1, 'tract': 1, 'protecting': 1, 'wildlife': 2, 'banning': 1, 'just': 3, 'created': 1, 'ross': 1, 'sea': 7, 'reserve': 1, 'vast': 1, 'weddell': 2, 'third': 1, 'under': 1, 'consideration': 1, 'west': 1, 'peninsula': 2, 'key': 4, 'commission': 1, 'conservation': 6, 'marine': 10, 'living': 1, 'resources': 1, 'ccamlr': 5, 'manages': 1, 'decide': 2, 'proposal': 1, 'conference': 1, 'australia': 1, 'october': 1, 'although': 3, 'decision': 1, 'expected': 2, 'until': 1, 'later': 2, 'keith': 1, 'reid': 1, 'science': 2, 'manager': 2, 'organisation': 1, 'sought': 1, 'balance': 1, 'between': 3, 'sustainable': 2, 'southern': 6, 'he': 2, 'more': 3, 'taking': 1, 'place': 1, 'nearer': 1, 'often': 1, 'happening': 1, 'season': 2, 'empty': 1, 'creation': 1, 'system': 1, 'protected': 2, 'part': 2, 'ongoing': 1, 'scientific': 2, 'policy': 2, 'discussions': 2, 'added': 1, 'long': 2, 'term': 1, 'operation': 1, 'depends': 1, 'healthy': 1, 'thriving': 1, 'always': 1, 'had': 1, 'open': 2, 'dialogue': 2, 'environmental': 1, 'non': 1, 'governmental': 1, 'organisations': 1, 'strongly': 1, 'intend': 1, 'continue': 1, 'including': 1, 'talks': 1, 'discuss': 1, 'improvements': 1, 'latest': 1, 'data': 2, 'ones': 1, 'establishment': 1, 'hope': 1, 'positively': 1, 'knowledge': 1, 'experience': 2, 'does': 8, 'caused': 1, 'penguins': 18, 'whales': 7, 'migrate': 3, 'depriving': 1, 'habitats': 3, 'carried': 1, 'too': 2, 'close': 2, 'unprecedented': 1, 'purpose': 1, 'reduce': 1, 'establish': 1, 'regulate': 1, 'publicise': 1, 'recommendation': 1, 'opting': 1, 'operate': 1, 'away': 1, 'suggested': 1, 'volunteering': 1, 'endangered': 1, 'species': 8, 'refraining': 1, 'breeding': 11, 'showing': 1, 'its': 5, 'sense': 1, 'responsibility': 1, 'leading': 1, 'aim': 1, 'raise': 1, 'public': 1, 'vulnerability': 1, 'ban': 1, 'commercial': 1, 'keep': 2, 'interference': 1, 'sustain': 1, 'damaging': 1, 'define': 1, 'role': 1, 'coordinator': 1, 'authority': 1, 'big': 1, 'analysis': 1, 'provider': 1, 'needed': 1, 'expertise': 1, 'initiator': 1, 'schools': 9, 'microcosm': 1, 'society': 4, 'mediate': 1, 'best': 2, 'seek': 1, 'alleviate': 1, 'external': 1, 'pressures': 3, 'pupils': 4, 'while': 1, 'equipping': 1, 'understand': 1, 'handle': 1, 'once': 1, 'sheltering': 1, 'broadening': 1, 'horizons': 2, 'ambitious': 2, 'circumstances': 1, 'divided': 2, 'unequal': 2, 'ideals': 1, 'clash': 1, 'outright': 1, 'trips': 7, 'adults': 1, 'adventure': 1, 'lifetime': 1, 'treks': 1, 'bomeo': 1, 'sports': 1, 'tour': 1, 'barbados': 1, 'appear': 1, 'almost': 1, 'routine': 1, 'state': 1, 'parents': 5, 'thousands': 1, 'pounds': 3, 'cannot': 3, 'profit': 1, 'companies': 1, 'arrange': 1, 'meanwhile': 1, 'arrive': 1, 'school': 6, 'hungry': 2, 'families': 2, 'breakfast': 1, 'poverty': 2, 'action': 1, 'group': 1, 'says': 2, 'nine': 1, 'every': 1, 'classroom': 1, 'fall': 1, 'below': 1, 'discrepancy': 1, 'startlingly': 1, 'apparent': 1, 'introducing': 1, 'fundraising': 2, 'requirement': 1, 'students': 15, 'help': 6, 'off': 1, 'children': 6, 'tap': 1, 'up': 2, 'richer': 1, 'aunts': 1, 'neighbours': 2, 'probing': 1, 'rock': 1, 'pools': 1, 'local': 1, 'beach': 1, 'practising': 1, 'french': 1, 'language': 1, 'exchange': 1, 'fire': 1, 'passions': 1, 'boost': 1, 'skills': 1, 'eyes': 1, 'life': 3, 'possibilities': 1, 'outings': 1, 'bright': 1, 'disadvantaged': 4, 'get': 1, 'scores': 1, 'tests': 1, 'globalised': 1, 'age': 1, 'international': 1, 'travel': 3, 'manage': 1, 'cost': 2, 'trip': 3, 'abroad': 1, 'easily': 1, 'holiday': 1, 'face': 3, 'immense': 1, 'mounting': 1, 'financial': 1, 'shown': 1, 'remarkable': 1, 'determination': 1, 'ingenuity': 3, 'ensuring': 1, 'able': 2, 'truly': 1, 'applauded': 1, 'methods': 1, 'such': 4, 'whole': 1, 'proceeds': 1, 'pooled': 1, 'extend': 1, 'fuel': 2, 'community': 4, 'spirit': 2, 'justified': 1, 'average': 1, 'income': 2, 'initiatives': 1, 'doors': 1, 'pull': 1, 'expensive': 1, 'field': 3, 'see': 4, 'little': 1, 'party': 1, 'celebration': 1, 'well': 2, 'guilt': 1, 'left': 1, 'behind': 1, 'department': 1, 'education': 1, 'guidance': 1, 'charge': 1, 'board': 1, 'lodging': 1, 'syllabus': 1, 'receiving': 1, 'government': 1, 'aid': 1, 'exempt': 1, 'costs': 1, 'seem': 1, 'ignore': 1, 'advice': 1, 'cover': 3, 'kind': 1, 'glamorous': 1, 'exotic': 1, 'becoming': 1, 'common': 1, 'bring': 1, 'together': 2, 'communities': 1, 'single': 1, 'handed': 1, 'least': 1, 'expect': 1, 'foster': 1, 'divisions': 1, 'exclude': 1, 'author': 5, 'prepare': 1, 'challenge': 1, 'social': 1, 'enable': 2, 'motivate': 1, 'develop': 1, 'physical': 1, 'intellectual': 1, 'abilities': 1, 'encourage': 1, 'achieve': 1, 'backgrounds': 1, 'mix': 1, 'each': 1, 'widen': 1, 'gap': 1, 'privileged': 1, 'give': 1, 'benefit': 2, 'rich': 2, 'relatives': 1, 'build': 1, 'aiming': 1, 'improve': 1, 'services': 1, 'activities': 3, 'mutual': 1, 'understanding': 2, 'involving': 1, 'campus': 1, 'low': 1, 'regarding': 1, 'want': 5, 'participate': 2, 'much': 2, 'kids': 2, 'hard': 1, 'miss': 1, 'broaden': 1, 'despite': 1, 'adventures': 1, 'run': 1, 'risks': 1, 'expectation': 1, 'bringing': 1, 'resolving': 1, 'existing': 1, 'discrepancies': 1, 'avoiding': 1, 'creating': 1, 'gaps': 1, 'among': 1, 'giving': 1, 'poor': 1, 'preferential': 1, 'treatment': 1, 'rising': 2, 'temperatures': 2, 'overfishing': 2, 'pristine': 3, 'could': 6, 'king': 15, 'populations': 1, 'pushed': 2, 'brink': 1, 'extinction': 2, 'end': 1, 'century': 1, 'states': 1, 'warming': 4, 'transforms': 1, 'wilderness': 2, 'percent': 2, 'either': 1, 'disappear': 3, 'forced': 2, 'co': 1, 'celine': 1, 'le': 3, 'bohec': 3, 'university': 1, 'strasbourg': 1, 'france': 1, 'warned': 1, 're': 1, 'actions': 1, 'aimed': 1, 'halting': 1, 'controlling': 1, 'pace': 1, 'current': 2, 'human': 3, 'induced': 1, 'stays': 1, 'soon': 1, 'findings': 2, 'earlier': 1, 'month': 1, 'separate': 2, 'combination': 1, 'population': 2, 'potentially': 2, 'disastrous': 1, 'seals': 1, 'today': 1, 'starkest': 1, 'yet': 1, 'devastating': 1, 'exploitation': 1, 'delicate': 1, 'ecosystems': 4, 'unless': 1, 'greenhouse': 1, 'gas': 1, 'emissions': 1, 'drop': 1, 'million': 1, 'pairs': 1, 'relocate': 2, 'second': 2, 'largest': 2, 'type': 1, 'breed': 1, 'specific': 1, 'isolated': 2, 'islands': 4, 'where': 1, 'ice': 2, 'access': 1, 'warms': 1, 'water': 3, 'called': 1, 'polar': 2, 'front': 2, 'upward': 1, 'movement': 1, 'nutrient': 1, 'supports': 1, 'abundance': 1, 'south': 1, 'means': 1, 'feed': 2, 'fish': 1, 'kill': 2, 'leaving': 1, 'chicks': 1, 'longer': 2, 'distance': 1, 'fool': 1, 'prows': 1, 'entire': 2, 'wiped': 1, 'plight': 1, 'serve': 2, 'like': 2, 'seabirds': 1, 'mammals': 1, 'occupy': 1, 'higher': 2, 'levels': 2, 'food': 4, 'chain': 1, 'call': 1, 'bio': 1, 'indicators': 2, 'sensitive': 1, 'predicting': 1, 'impacts': 1, 'sub': 1, 'closer': 1, 'retreating': 1, 'source': 1, 'suitable': 2, 'scarce': 1, 'handful': 1, 'sustaining': 1, 'large': 1, 'happen': 1, 'verge': 1, 'dying': 1, 'rise': 2, 'melting': 1, 'destroy': 1, 'forever': 1, 'shrinking': 1, 'force': 1, 'accelerated': 1, 'recent': 1, 'years': 1, 'fatal': 1, 'certain': 1, 'worsened': 1, 'pollution': 1, 'birds': 1, 'extinct': 1, 'primarily': 1, 'kinds': 1, 'majority': 1, 'baby': 1, 'live': 1, 'invade': 1, 'distances': 1, 'reluctant': 1, 'leave': 1, 'propagation': 1, 'ultimate': 1, 'retreat': 1, 'luge': 1}

轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/257803.html

標籤:python

上一篇:Mac如何下載python第三方庫

下一篇:2、Python介面自動化系列之unittest結合ddt的使用

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 【C++】Microsoft C++、C 和匯編程式檔案

    ......

    uj5u.com 2020-09-10 00:57:23 more
  • 例外宣告

    相比于斷言適用于排除邏輯上不可能存在的狀態,例外通常是用于邏輯上可能發生的錯誤。 例外宣告 Item 1:當函式不可能拋出例外或不能接受拋出例外時,使用noexcept 理由 如果不打算拋出例外的話,程式就會認為無法處理這種錯誤,并且應當盡早終止,如此可以有效地阻止例外的傳播與擴散。 示例 //不可 ......

    uj5u.com 2020-09-10 00:57:27 more
  • Codeforces 1400E Clear the Multiset(貪心 + 分治)

    鏈接:https://codeforces.com/problemset/problem/1400/E 來源:Codeforces 思路:給你一個陣列,現在你可以進行兩種操作,操作1:將一段沒有 0 的區間進行減一的操作,操作2:將 i 位置上的元素歸零。最終問:將這個陣列的全部元素歸零后操作的最少 ......

    uj5u.com 2020-09-10 00:57:30 more
  • UVA11610 【Reverse Prime】

    本人看到此題沒有翻譯,就附帶了一個自己的翻譯版本 思考 這一題,它的第一個要求是找出所有 $7$ 位反向質數及其質因數的個數。 我們應該需要質數篩篩選1~$10^{7}$的所有數,這里就不慢慢介紹了。但是,重讀題,我們突然發現反向質數都是 $7$ 位,而將它反過來后的數字卻是 $6$ 位數,這就說明 ......

    uj5u.com 2020-09-10 00:57:36 more
  • 統計區間素數數量

    1 #pragma GCC optimize(2) 2 #include <bits/stdc++.h> 3 using namespace std; 4 bool isprime[1000000010]; 5 vector<int> prime; 6 inline int getlist(int ......

    uj5u.com 2020-09-10 00:57:47 more
  • C/C++編程筆記:C++中的 const 變數詳解,教你正確認識const用法

    1、C中的const 1、區域const變數存放在堆疊區中,會分配記憶體(也就是說可以通過地址間接修改變數的值)。測驗代碼如下: 運行結果: 2、全域const變數存放在只讀資料段(不能通過地址修改,會發生寫入錯誤), 默認為外部聯編,可以給其他源檔案使用(需要用extern關鍵字修飾) 運行結果: ......

    uj5u.com 2020-09-10 00:58:04 more
  • 【C++犯錯記錄】VS2019 MFC添加資源不懂如何修改資源宏ID

    1. 首先在資源視圖中,添加資源 2. 點擊新添加的資源,復制自動生成的ID 3. 在解決方案資源管理器中找到Resource.h檔案,編輯,使用整個專案搜索和替換的方式快速替換 宏宣告 4. Ctrl+Shift+F 全域搜索,點擊查找全部,然后逐個替換 5. 為什么使用搜索替換而不使用屬性視窗直 ......

    uj5u.com 2020-09-10 00:59:11 more
  • 【C++犯錯記錄】VS2019 MFC不懂的批量添加資源

    1. 打開資源頭檔案Resource.h,在其中預先定義好宏 ID(不清楚其實ID值應該設定多少,可以先新建一個相同的資源項,再在這個資源的ID值的基礎上遞增即可) 2. 在資源視圖中選中專案資源,按F7編輯資源檔案,按 ID 型別 相對路徑的形式添加 資源。(別忘了先把檔案拷貝到專案中的res檔案 ......

    uj5u.com 2020-09-10 01:00:19 more
  • C/C++編程筆記:關于C++的參考型別,專供新手入門使用

    今天要講的是C++中我最喜歡的一個用法——參考,也叫別名。 參考就是給一個變數名取一個變數名,方便我們間接地使用這個變數。我們可以給一個變數創建N個參考,這N + 1個變數共享了同一塊記憶體區域。(參考型別的變數會占用記憶體空間,占用的記憶體空間的大小和指標型別的大小是相同的。雖然參考是一個物件的別名,但 ......

    uj5u.com 2020-09-10 01:00:22 more
  • 【C/C++編程筆記】從頭開始學習C ++:初學者完整指南

    眾所周知,C ++的學習曲線陡峭,但是花時間學習這種語言將為您的職業帶來奇跡,并使您與其他開發人員區分開。您會更輕松地學習新語言,形成真正的解決問題的技能,并在編程的基礎上打下堅實的基礎。 C ++將幫助您養成良好的編程習慣(即清晰一致的編碼風格,在撰寫代碼時注釋代碼,并限制類內部的可見性),并且由 ......

    uj5u.com 2020-09-10 01:00:41 more
最新发布
  • Rust中的智能指標:Box<T> Rc<T> Arc<T> Cell<T> RefCell<T> Weak

    Rust中的智能指標是什么 智能指標(smart pointers)是一類資料結構,是擁有資料所有權和額外功能的指標。是指標的進一步發展 指標(pointer)是一個包含記憶體地址的變數的通用概念。這個地址參考,或 ” 指向”(points at)一些其 他資料 。參考以 & 符號為標志并借用了他們所 ......

    uj5u.com 2023-04-20 07:24:10 more
  • Java的值傳遞和參考傳遞

    值傳遞不會改變本身,參考傳遞(如果傳遞的值需要實體化到堆里)如果發生修改了會改變本身。 1.基本資料型別都是值傳遞 package com.example.basic; public class Test { public static void main(String[] args) { int ......

    uj5u.com 2023-04-20 07:24:04 more
  • [2]SpinalHDL教程——Scala簡單入門

    第一個 Scala 程式 shell里面輸入 $ scala scala> 1 + 1 res0: Int = 2 scala> println("Hello World!") Hello World! 檔案形式 object HelloWorld { /* 這是我的第一個 Scala 程式 * 以 ......

    uj5u.com 2023-04-20 07:23:58 more
  • 理解函式指標和回呼函式

    理解 函式指標 指向函式的指標。比如: 理解函式指標的偽代碼 void (*p)(int type, char *data); // 定義一個函式指標p void func(int type, char *data); // 宣告一個函式func p = func; // 將指標p指向函式func ......

    uj5u.com 2023-04-20 07:23:52 more
  • Django筆記二十五之資料庫函式之日期函式

    本文首發于公眾號:Hunter后端 原文鏈接:Django筆記二十五之資料庫函式之日期函式 日期函式主要介紹兩個大類,Extract() 和 Trunc() Extract() 函式作用是提取日期,比如我們可以提取一個日期欄位的年份,月份,日等資料 Trunc() 的作用則是截取,比如 2022-0 ......

    uj5u.com 2023-04-20 07:23:45 more
  • 一天吃透JVM面試八股文

    什么是JVM? JVM,全稱Java Virtual Machine(Java虛擬機),是通過在實際的計算機上仿真模擬各種計算機功能來實作的。由一套位元組碼指令集、一組暫存器、一個堆疊、一個垃圾回收堆和一個存盤方法域等組成。JVM屏蔽了與作業系統平臺相關的資訊,使得Java程式只需要生成在Java虛擬機 ......

    uj5u.com 2023-04-20 07:23:31 more
  • 使用Java接入小程式訂閱訊息!

    更新完微信服務號的模板訊息之后,我又趕緊把微信小程式的訂閱訊息給實作了!之前我一直以為微信小程式也是要企業才能申請,沒想到小程式個人就能申請。 訊息推送平臺🔥推送下發【郵件】【短信】【微信服務號】【微信小程式】【企業微信】【釘釘】等訊息型別。 https://gitee.com/zhongfuch ......

    uj5u.com 2023-04-20 07:22:59 more
  • java -- 緩沖流、轉換流、序列化流

    緩沖流 緩沖流, 也叫高效流, 按照資料型別分類: 位元組緩沖流:BufferedInputStream,BufferedOutputStream 字符緩沖流:BufferedReader,BufferedWriter 緩沖流的基本原理,是在創建流物件時,會創建一個內置的默認大小的緩沖區陣列,通過緩沖 ......

    uj5u.com 2023-04-20 07:22:49 more
  • Java-SpringBoot-Range請求頭設定實作視頻分段傳輸

    老實說,人太懶了,現在基本都不喜歡寫筆記了,但是網上有關Range請求頭的文章都太水了 下面是抄的一段StackOverflow的代碼...自己大修改過的,寫的注釋挺全的,應該直接看得懂,就不解釋了 寫的不好...只是希望能給視頻網站開發的新手一點點幫助吧. 業務場景:視頻分段傳輸、視頻多段傳輸(理 ......

    uj5u.com 2023-04-20 07:22:42 more
  • Windows 10開發教程_編程入門自學教程_菜鳥教程-免費教程分享

    教程簡介 Windows 10開發入門教程 - 從簡單的步驟了解Windows 10開發,從基本到高級概念,包括簡介,UWP,第一個應用程式,商店,XAML控制元件,資料系結,XAML性能,自適應設計,自適應UI,自適應代碼,檔案管理,SQLite資料庫,應用程式到應用程式通信,應用程式本地化,應用程式 ......

    uj5u.com 2023-04-20 07:22:35 more