Arama Sonuçları: "#python"

20 sonuç
malo21st
malo21st@malo21st·
5文字の単語リスト(約7万5千単語)から Python & 正規表現 で、4単語 まで絞り込めました。 #Wordle #Python #正規表現 Wordle 1,792 6/6 ⬛🟨⬛⬛🟨 ⬛⬛🟨⬛⬛ ⬛🟩⬛🟩🟩 ⬛🟩⬛🟩🟩 ⬛🟩🟨🟩🟩 🟩🟩🟩🟩🟩
日本語
0
0
0
4
Ivan Karabadzhak
Ivan Karabadzhak@Jakeroid·
Friday brings #Python It's going to be the shortest one. Did you know that bool is a subclass of int?
Ivan Karabadzhak tweet media
English
0
0
0
7
XeonCat ✵
XeonCat ✵@xeoncat·
It seems that the stringzilla package might have vulnerabilities that can be used by hackers (? This is not my expertise) #python
English
0
0
0
3
Manyali Vision Desk
Manyali Vision Desk@george_manyali·
#python gurus, what is wrong with this code? 😳
Manyali Vision Desk@george_manyali

import requests import json from typing import List, Dict, Optional import sys # ============================================= # Python script to trace "monarch-style" citation inheritance # from your 2013 C₃N₄ paper using the Semantic Scholar Academic Graph API # (the most practical free database for citation graphs; Scopus requires an Elsevier API key, # Google Scholar has no official public API) # # It automatically: # - Starts with your paper (Gen 0) # - At each generation, finds the SINGLE highest-cited paper that directly cites the previous one # - Pulls full reference details (title, authors, year, DOI, citationCount, paperId) # - Runs up to Gen 6 (or any number you set) # - Extracts common phrases/keywords that appear in ALL generations # ============================================= S2_BASE_URL = "api.semanticscholar.org/graph/v1" def get_paper_details(paper_id: str) -> Dict: """ Fetch details for a paper using DOI:xxx, paperId, or CorpusId:xxx format. """ url = f"{S2_BASE_URL}/paper/{paper_id}" params = { "fields": "paperId,title,authors,year,doi,citationCount,abstract" } response = requests.get(url, params=params, timeout=10) if response.status_code != 200: print(f"❌ Error fetching paper {paper_id}: {response.status_code} {response.text}") sys.exit(1) return response.json() def get_citing_papers(paper_id: str, limit: int = 100) -> List[Dict]: """ Get list of papers that cite this one. Returns the 'citingPaper' objects. """ url = f"{S2_BASE_URL}/paper/{paper_id}/citations" params = { "fields": "citingPaper.paperId,citingPaper.title,citingPaper.authors,citingPaper.year," "citingPaper.doi,citingPaper.citationCount,citingPaper.abstract", "limit": limit } response = requests.get(url, params=params, timeout=10) if response.status_code != 200: print(f"❌ Error fetching citations for {paper_id}: {response.status_code}") return [] data = response.json().get("data", []) return [item["citingPaper"] for item in data if item.get("citingPaper")] def find_highest_cited_citer(paper_id: str) -> Optional[Dict]: """ Return the single highest-cited paper that cites the given paper_id. """ citers = get_citing_papers(paper_id, limit=50) # 50 is plenty for top-1 if not citers: return None # Sort by citationCount (descending) and take the top one sorted_citers = sorted( citers, key=lambda p: p.get("citationCount", 0), reverse=True ) return sorted_citers[0] def extract_common_phrases(chain: List[Dict]) -> List[str]: """ Simple analysis: find words (length > 3) that appear in the title + abstract of EVERY paper in the chain. Returns the top 15 most common across the lineage. """ if not chain: return [] all_word_sets = [] for paper in chain: text = f"{paper.get('title', '')} {paper.get('abstract', '')}".lower() words = { word.strip(".,;:!?()[]{}") for word in text.split() if len(word) > 3 and word.isalpha() } all_word_sets.append(words) # Intersection = words present in ALL papers common_words = set.intersection(*all_word_sets) if all_word_sets else set() # Sort by total frequency across the chain (descending) word_freq = {} for word in common_words: count = sum(1 for p in chain if word in f"{p.get('title','')} {p.get('abstract','')

English
0
0
1
20
Bigtok$
Bigtok$@Ayo_dev0·
Built a voice AI pharmacy assistant using Python + Deepgram + Twilio. she handles drug info, places orders, and checks order status by ID — all over a phone call. Do you want a custom AI phone agent for your business? DM me to build one. #VoiceAI #Python #AIAgent
English
0
0
1
10
Internet Object
Internet Object@InternetObject·
IO vs JSON 🔹IO: Document-oriented, clear header/data separation, multiple schemas per document 🔹JSON: Flat structure, single schema, limited organization at scale. When complexity grows, structure matters. 👉 internetobject.org #JSON #APIs #Python
Internet Object tweet media
English
0
0
0
7