repo_name
stringlengths
3
38
repo_commit
stringlengths
40
40
repo_content
stringlengths
0
949k
repo_readme
stringlengths
34
275k
wtfpython
d2673bba08d0ec2d52bb34576e1d55772e4ba0c1
File: mixed_tabs_and_spaces.py def square(x): sum_so_far = 0 for _ in range(x): sum_so_far += x return sum_so_far # noqa: E999 # pylint: disable=mixed-indentation Python 3 will raise a TabError here print(square(10)) File: wtfpython-pypi/setup.py from setuptools import setup, find_packages if _...
<p align="center"><img src="/images/logo.png#gh-light-mode-only" alt=""><img src="/images/logo-dark.png#gh-dark-mode-only" alt=""></p> <h1 align="center">What the f*ck Python! 😱</h1> <p align="center">Exploring and understanding Python through surprising snippets.</p> Translations: [Chinese 中文](https://github.com/le...
mailinabox
ca123515aad102327701b18a7d65d180f800b815
File: tools/mail.py #!/bin/bash # This script has moved. management/cli.py "$@" File: tools/readable_bash.py #!/usr/bin/python3 # # Generate documentation for how this machine works by # parsing our bash scripts! import cgi, re import markdown from modgrammar import * def generate_documentation(): print("""<!DO...
Mail-in-a-Box ============= By [@JoshData](https://github.com/JoshData) and [contributors](https://github.com/mail-in-a-box/mailinabox/graphs/contributors). Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box. **...
HelloGitHub
739e7f170bd65fa27ad52804cef107c4fb020184
File: script/make_content/make_content.py #!/usr/bin/env python # -*- coding:utf-8 -*- # # Author : XueWeiHan # E-mail : 595666367@qq.com # Date : 16/10/21 下午1:41 # Desc : HelloGitHub项目——生成月刊脚本 """ 该脚本主要用于:生成月刊 《HelloGitHub》月刊每期内容都遵循统一格式,如果需要对通用部分的内容进行修改,需要手动修改每一 期的内容,这是不优雅的。 所以,我打算写个脚本,用于生成月...
<p align="center"> <img src="https://raw.githubusercontent.com/521xueweihan/img_logo/master/logo/readme.gif"/> <br>中文 | <a href="README_en.md">English</a> | <a href="README_ja.md">日本語</a> <br>分享 GitHub 上有趣、入门级的开源项目。<br>兴趣是最好的老师,这里能够帮你找到编程的兴趣! </p> <p align="center"> <a href="https://raw.githubusercontent.com/5...
facefusion
57016d7c778c70f58fc54c49013d57179874a505
File: run.py #!/usr/bin/env python3 from facefusion import core if __name__ == '__main__': core.cli() File: install.py #!/usr/bin/env python3 import os import subprocess os.environ['PIP_BREAK_SYSTEM_PACKAGES'] = '1' subprocess.call([ 'pip', 'install', 'inquirer', '-q' ]) from facefusion import installer if ...
FaceFusion ========== > Next generation face swapper and enhancer. [![Build Status](https://img.shields.io/github/actions/workflow/status/facefusion/facefusion/ci.yml.svg?branch=master)](https://github.com/facefusion/facefusion/actions?query=workflow:ci) ![License](https://img.shields.io/badge/license-MIT-green) Pr...
wtfpython
d2673bba08d0ec2d52bb34576e1d55772e4ba0c1
File: mixed_tabs_and_spaces.py def square(x): sum_so_far = 0 for _ in range(x): sum_so_far += x return sum_so_far # noqa: E999 # pylint: disable=mixed-indentation Python 3 will raise a TabError here print(square(10)) File: wtfpython-pypi/setup.py from setuptools import setup, find_packages if _...
<p align="center"><img src="/images/logo.png#gh-light-mode-only" alt=""><img src="/images/logo-dark.png#gh-dark-mode-only" alt=""></p> <h1 align="center">What the f*ck Python! 😱</h1> <p align="center">Exploring and understanding Python through surprising snippets.</p> Translations: [Chinese 中文](https://github.com/le...
stylegan
1e0d5c781384ef12b50ef20a62fee5d78b38e88f
File: dataset_tool.py # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # This work is licensed under the Creative Commons Attribution-NonCommercial # 4.0 International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to # Creative Commons,...
## StyleGAN &mdash; Official TensorFlow Implementation ![Python 3.6](https://img.shields.io/badge/python-3.6-green.svg?style=plastic) ![TensorFlow 1.10](https://img.shields.io/badge/tensorflow-1.10-green.svg?style=plastic) ![cuDNN 7.3.1](https://img.shields.io/badge/cudnn-7.3.1-green.svg?style=plastic) ![License CC BY-...
bert
eedf5716ce1268e56f0a50264a88cafad334ac61
File: run_classifier_with_tfhub.py # coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
# BERT **\*\*\*\*\* New March 11th, 2020: Smaller BERT Models \*\*\*\*\*** This is a release of 24 smaller BERT models (English only, uncased, trained with WordPiece masking) referenced in [Well-Read Students Learn Better: On the Importance of Pre-training Compact Models](https://arxiv.org/abs/1908.08962). We have s...
interview_internal_reference
9fe6c758e98c03c40c8908c39e78ab98a7ab53d6
## 2023年最新总结,阿里,腾讯,百度,美团,头条等技术面试题目,以及答案,专家出题人分析汇总。持续更新中。 * [阿里篇](#1) * [华为篇](#2) * [百度篇](#3) * [腾讯篇](#4) * [美团篇](#5) * [头条篇](#6) * [滴滴篇](#7) * [京东篇](#8) * [MySQL篇](#9) * [Redis篇](#10) * [MongoDB篇](#11) * [Zookeeper篇](#12) * [Nginx篇](#13) * [算法篇](#14) * [内存篇](#15) * [cpu篇](#16) * [磁盘篇](#17) * [网络通信篇](#18) * [安全篇](#19)...
learn-python
52c3a655cc2efd5ac01004f6f529c3262812a84e
File: src/data_types/test_numbers.py """Numbers. @see: https://docs.python.org/3/tutorial/introduction.html @see: https://www.w3schools.com/python/python_numbers.asp There are three numeric types in Python: - int (e.g. 2, 4, 20) - bool (e.g. False and True, acting like 0 and 1) - float (e.g. 5.0, 1.6) - complex ...
# Playground and Cheatsheet for Learning Python > 🇺🇦 UKRAINE [IS BEING ATTACKED](https://war.ukraine.ua/) BY RUSSIAN ARMY. CIVILIANS ARE GETTING KILLED. RESIDENTIAL AREAS ARE GETTING BOMBED. > - Help Ukraine via: > - [Serhiy Prytula Charity Foundation](https://prytulafoundation.org/en/) > - [Come Back Alive Char...
awesome-python
2252650cfdff3782d5a85458507fe9ec6edde7a4
File: sort.py #!/usr/bin/env python # coding: utf-8 """ The approach taken is explained below. I decided to do it simply. Initially I was considering parsing the data into some sort of structure and then generating an appropriate README. I am still considering doing it - but for now this should work. ...
# Awesome Python [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) An opinionated list of awesome Python frameworks, libraries, software and resources. Inspired by [awesome-php](https://github.com/ziadoz/awesome-...
Chinese-LLaMA-Alpaca
f213c2c53e92f2bfb41859ffdb2cf47a261c24fb
File: scripts/merge_llama_with_chinese_lora.py """ Usage: python merge_llama_with_chinese_lora.py \ --base_model path/to/llama/model \ --lora_model path/to/first/lora/model [path/to/second/lora/model] \ --output_type [pth|huggingface] \ --output_dir path/to/output/dir """ import argparse import json i...
# [Chinese-LLaMA-Alpaca-3](https://github.com/ymcui/Chinese-LLaMA-Alpaca-3)项目启动! [**🇨🇳中文**](./README.md) | [**🌐English**](./README_EN.md) | [**📖文档/Docs**](https://github.com/ymcui/Chinese-LLaMA-Alpaca/wiki) | [**❓提问/Issues**](https://github.com/ymcui/Chinese-LLaMA-Alpaca/issues) | [**💬讨论/Discussions**](https://gi...
ML-From-Scratch
a2806c6732eee8d27762edd6d864e0c179d8e9e8
File: setup.py from setuptools import setup, find_packages from codecs import open from os import path __version__ = '0.0.4' here = path.abspath(path.dirname(__file__)) # get the dependencies and installs with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f: all_reqs = f.read().split('\n') ins...
# Machine Learning From Scratch ## About Python implementations of some of the fundamental Machine Learning models and algorithms from scratch. The purpose of this project is not to produce as optimized and computationally efficient algorithms as possible but rather to present the inner workings of them in a transpar...
Python-100-Days
bf24146944745bb25c66c82307fd218abd179c6a
File: Day31-35/code/josephu.py def main(): persons = [True] * 30 counter = 0 index = 0 number = 0 while counter < 15: if persons[index]: number += 1 if number == 9: persons[index] = False number = 0 counter += 1 ...
## Python - 100天从新手到大师 > **作者**:骆昊 > > **说明**:从项目上线到获得8w+星标以来,一直收到反馈说基础部分(前15天的内容)对新手来说是比较困难的,建议有配套视频进行讲解。最近把基础部分的内容重新制作了一个名为[“Python-Core-50-Courses”](<https://github.com/jackfrued/Python-Core-50-Courses>)的项目,用更为简单通俗的方式重写了这部分内容并附带了视频讲解,初学者可以看看这个新的仓库。国内用户如果访问GitHub比较慢的话,可以关注我的**知乎号[Python-Jack](https://www.zhihu.com/p...
ddia
a735a7937df7533122defd88884ce34f67ef0505
File: bin/translate.py """Convert zh-cn to zh-tw Refer to https://github.com/BYVoid/OpenCC """ import click import opencc from pathlib import Path from pprint import pprint @click.group() def cli(): pass def convert(infile: str, outfile: str, cfg: str): """read >> convert >> write file Args: i...
# 设计数据密集型应用 - 中文翻译版 [![Webite: ddia](https://img.shields.io/badge/v1-ddia.pigsty.io-slategray?style=flat)](https://ddia.pigsty.io) [![Webite: ddia2](https://img.shields.io/badge/v2-ddia2.pigsty.io-slategray?style=flat)](https://ddia2.pigsty.io) [![GitHub Stars](https://img.shields.io/github/stars/Vonng/ddia?style=flat...
autojump
ff75f542ae6ef94d93c456f3e37c555598664ca5
File: uninstall.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function import os import platform import shutil import sys sys.path.append('bin') from autojump_argparse import ArgumentParser # noqa def is_empty_dir(path): """ Checks if any files are present within a directo...
NAME ---- autojump - a faster way to navigate your filesystem DESCRIPTION ----------- autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line. *Directories must be visited first before they can be jumped to.* USAGE ----- `j...
Deep-Learning-Papers-Reading-Roadmap
a994642f82f071926fcb472bcf6cd63e4abba7ab
File: download.py from __future__ import print_function import os import re from six.moves.urllib.error import HTTPError import shutil import argparse import mistune import bs4 as BeautifulSoup import socket import time import requests # encoding=utf8 import sys try: reload(sys) except NameError: pass try...
# Deep Learning Papers Reading Roadmap >If you are a newcomer to the Deep Learning area, the first question you may have is "Which paper should I start reading from?" >Here is a reading roadmap of Deep Learning papers! The roadmap is constructed in accordance with the following four guidelines: - From outline to de...
Real-ESRGAN
a4abfb2979a7bbff3f69f58f58ae324608821e27
File: inference_realesrgan.py import argparse import cv2 import glob import os from basicsr.archs.rrdbnet_arch import RRDBNet from basicsr.utils.download_util import load_file_from_url from realesrgan import RealESRGANer from realesrgan.archs.srvgg_arch import SRVGGNetCompact def main(): """Inference demo for R...
<p align="center"> <img src="assets/realesrgan_logo.png" height=120> </p> ## <div align="center"><b><a href="README.md">English</a> | <a href="README_CN.md">简体中文</a></b></div> <div align="center"> 👀[**Demos**](#-demos-videos) **|** 🚩[**Updates**](#-updates) **|** ⚡[**Usage**](#-quick-inference) **|** 🏰[**Model ...
requests
f12ccbef6d6b95564da8d22e280d28c39d53f0e9
File: setup.py #!/usr/bin/env python import os import sys from codecs import open from setuptools import setup CURRENT_PYTHON = sys.version_info[:2] REQUIRED_PYTHON = (3, 8) if CURRENT_PYTHON < REQUIRED_PYTHON: sys.stderr.write( """ ========================== Unsupported Python version =================...
# Requests **Requests** is a simple, yet elegant, HTTP library. ```python >>> import requests >>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass')) >>> r.status_code 200 >>> r.headers['content-type'] 'application/json; charset=utf8' >>> r.encoding 'utf-8' >>> r.text '{"authenticated"...
prophet
36421b70f077cc657f143161de5a97f5a214e18b
File: python/setup.py # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import platform from pathlib import Path from shutil import copy, copytree, rmtree from typing import List imp...
# Prophet: Automatic Forecasting Procedure ![Build](https://github.com/facebook/prophet/workflows/Build/badge.svg) [![PyPI Version](https://img.shields.io/pypi/v/prophet.svg)](https://pypi.python.org/pypi/prophet) [![PyPI Downloads Monthly](https://pepy.tech/badge/prophet/month)](https://pepy.tech/project/prophet) [...
dalle-mini
f0be4de610285a002052024a1e096126f9452cc4
File: setup.py from setuptools import setup if __name__ == "__main__": setup() File: tools/train/train.py #!/usr/bin/env python # coding=utf-8 # Copyright 2021-2022 The HuggingFace & DALL·E Mini team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use th...
# DALL·E Mini <a href="https://www.craiyon.com/"><img src="https://www.craiyon.com/thumbnail.png" width="300"></a> ## How to use it? You can use the model on [🖍️ craiyon](https://www.craiyon.com/) ## How does it work? Refer to our reports: * [DALL·E mini - Generate Images from Any Text Prompt](https://wandb.ai/d...
diagrams
4c2d8a3795d2a15a168224b2a5919c2950df679b
File: config.py # fmt: off ######################### # Application # ######################### APP_NAME = "diagrams" DIR_DOC_ROOT = "docs/nodes" DIR_APP_ROOT = "diagrams" DIR_RESOURCE = "resources" DIR_TEMPLATE = "templates" PROVIDERS = ( "base", "onprem", "aws", "azure", "digitalocea...
![diagrams logo](assets/img/diagrams.png) # Diagrams [![license](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE) [![pypi version](https://badge.fury.io/py/diagrams.svg)](https://badge.fury.io/py/diagrams) ![python version](https://img.shields.io/badge/python-%3E%3D%203.6-blue?logo=python) ![Run tests](h...
data-science-ipython-notebooks
5b3c00d462c6e9200315afe46d0093948621eb95
File: __init__.py File: deep-learning/theano-tutorial/rnn_tutorial/lstm_text.py import cPickle as pkl import time import numpy import theano from theano import config import theano.tensor as T from theano.tensor.nnet import categorical_crossentropy from fuel.datasets import TextFile from fuel.streams import Data...
<br/> <p align="center"> <img src="https://raw.githubusercontent.com/donnemartin/data-science-ipython-notebooks/master/images/README_1200x800.gif"> </p> <p align="center"> <img src="https://raw.githubusercontent.com/donnemartin/data-science-ipython-notebooks/master/images/coversmall_alt.png"> <br/> </p> # data-...
avatarify-python
862182cfbca5bd8a7473bed9c5f69f92e8d5cc7b
File: afy/arguments.py from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument("--config", help="path to config") parser.add_argument("--checkpoint", default='vox-cpk.pth.tar', help="path to checkpoint to restore") parser.add_argument("--relative", dest="relative", action="store_true", help...
![](docs/mona.gif) # Avatarify Python Photorealistic avatars for video-conferencing. Avatarify Python requires manually downloading and installing some dependencies, and is therefore best suited for users who have some experience with command line applications. [Avatarify Desktop](https://github.com/alievk/avatarify...
awesome-quant
2ab6db153bec32873c94aecb58ade6e1fb71b2c4
File: topic.py import os from github import Github # using an access token g = Github(os.environ['GITHUB_ACCESS_TOKEN']) # ts = g.search_topics('trading') # for t in ts: # print(t) # t = ts[0] # print(t) # print(t.name) # print(t.updated_at) # print(t.score) topic = 'quant' repos = g.search_repositories(quer...
# Awesome Quant A curated list of insanely awesome libraries, packages and resources for Quants (Quantitative Finance). [![](https://awesome.re/badge.svg)](https://awesome.re) ## Languages - [Python](#python) - [R](#r) - [Matlab](#matlab) - [Julia](#julia) - [Java](#java) - [JavaScript](#javascript) - [Haskell](#ha...
Shadowrocket-ADBlock-Rules
1b691dc27ac483cfc0574c7559c6f9db9293c6f7
File: factory/build_confs.py # -*- coding: utf-8 -*- import re import time # confs names in template/ and ../ # except sr_head and sr_foot confs_names = [ 'sr_top500_banlist_ad', 'sr_top500_banlist', 'sr_top500_whitelist_ad', 'sr_top500_whitelist', 'sr_adb', 'sr_direct_banad', 'sr_proxy_...
## 最完善的 iOS 翻墙规则 ### 停止更新公告 维护该项目已花费了我过多的时间,而生活中值得花费时间的东西太多,所以从即日起停止更新该项目。 ------------------------------------------------------ 这里是一系列好用的翻墙规则,针对 [Shadowrocket](https://liguangming.com/Shadowrocket) 开发,支持广告过滤。规则定义了哪些网站可以直连,哪些必须走代理,规则是一个纯文本文件,无法提供翻墙功能。使用 Python 按照一定的规则和模板定期自动生成,并且使用开源的力量,集众人之力逐渐完善。 **正在使用手机浏览本页面的用...
crewAI
322780a5f36840bf566aac97d872dc64261f4474
File: src/crewai/task.py import datetime import json import os import threading import uuid from concurrent.futures import Future from copy import copy from hashlib import md5 from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union from opentelemetry.trace import Span from pydantic import ( UUID4, ...
<div align="center"> ![Logo of crewAI, two people rowing on a boat](./docs/crewai_logo.png) # **crewAI** 🤖 **crewAI**: Cutting-edge framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks. <h...
spotify-downloader
866daddc9fdc7f764b89e8278426fcbb2af6b03e
File: scripts/build.py import os import sys from pathlib import Path import PyInstaller.__main__ # type: ignore import pykakasi import yt_dlp import ytmusicapi from spotdl._version import __version__ LOCALES_PATH = str((Path(ytmusicapi.__file__).parent / "locales")) PYKAKASI_PATH = str((Path(pykakasi.__file__).par...
<!--- mdformat-toc start --slug=github ---> <!--- !!! IF EDITING THE README, ENSURE TO COPY THE WHOLE FILE TO index.md in `/docs/` AND REMOVE THE REFERENCES TO ReadTheDocs THERE. ---> <div align="center"> # spotDL v4 **spotDL** finds songs from Spotify playlists on YouTube and downloads them - along with album art...
Hitomi-Downloader
c6dc4c421d0e3986936ad740073c3ee52e226c1f
File: src/extractor/danbooru_downloader.py #coding: utf-8 import downloader import ree as re from utils import Downloader, get_max_range, clean_title, get_print, try_n, urljoin, check_alive, LazyUrl, get_ext, limits from translator import tr_ from urllib.parse import urlparse, parse_qs, quote import clf2 class Down...
<p align="center"> <img src="imgs/card_crop.png" width="50%"/> <br> </p> [![GitHub release](https://img.shields.io/github/release/KurtBestor/Hitomi-Downloader.svg?logo=github)](https://github.com/KurtBestor/Hitomi-Downloader/releases/latest) [![GitHub downloads](https://img.shields.io/github/downloads/KurtBestor/H...
GFPGAN
7552a7791caad982045a7bbe5634bbf1cd5c8679
File: cog_predict.py # flake8: noqa # This file is used for deploying replicate models # running: cog predict -i img=@inputs/whole_imgs/10045.png -i version='v1.4' -i scale=2 # push: cog push r8.im/tencentarc/gfpgan # push (backup): cog push r8.im/xinntao/gfpgan import os os.system('python setup.py develop') os.syst...
<p align="center"> <img src="assets/gfpgan_logo.png" height=130> </p> ## <div align="center"><b><a href="README.md">English</a> | <a href="README_CN.md">简体中文</a></b></div> <div align="center"> <!-- <a href="https://twitter.com/_Xintao_" style="text-decoration:none;"> <img src="https://user-images.githubusercont...
gaussian-splatting
8a70a8cd6f0d9c0a14f564844ead2d1147d5a7ac
File: metrics.py # # Copyright (C) 2023, Inria # GRAPHDECO research group, https://team.inria.fr/graphdeco # All rights reserved. # # This software is free for non-commercial, research and evaluation use # under the terms of the LICENSE.md file. # # For inquiries contact george.drettakis@inria.fr # from pathlib imp...
# 3D Gaussian Splatting for Real-Time Radiance Field Rendering Bernhard Kerbl*, Georgios Kopanas*, Thomas Leimkühler, George Drettakis (* indicates equal contribution)<br> | [Webpage](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/) | [Full Paper](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/3d_ga...
ChatGLM3
045be71ff8df03b8819a6560866c9a86ec9be363
File: basic_demo/cli_demo.py import os import platform from transformers import AutoTokenizer, AutoModel MODEL_PATH = os.environ.get('MODEL_PATH', 'THUDM/chatglm3-6b') TOKENIZER_PATH = os.environ.get("TOKENIZER_PATH", MODEL_PATH) tokenizer = AutoTokenizer.from_pretrained(TOKENIZER_PATH, trust_remote_code=True) model...
# ChatGLM3 <p align="center"> 📄<a href="https://arxiv.org/pdf/2406.12793" target="_blank"> Report </a> • 🤗 <a href="https://huggingface.co/THUDM/chatglm3-6b" target="_blank">HF Repo</a> • 🤖 <a href="https://modelscope.cn/models/ZhipuAI/chatglm3-6b" target="_blank">ModelScope</a> • 🟣 <a href="https://www.wisemodel....
diagrams
4c2d8a3795d2a15a168224b2a5919c2950df679b
File: config.py # fmt: off ######################### # Application # ######################### APP_NAME = "diagrams" DIR_DOC_ROOT = "docs/nodes" DIR_APP_ROOT = "diagrams" DIR_RESOURCE = "resources" DIR_TEMPLATE = "templates" PROVIDERS = ( "base", "onprem", "aws", "azure", "digitalocea...
![diagrams logo](assets/img/diagrams.png) # Diagrams [![license](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE) [![pypi version](https://badge.fury.io/py/diagrams.svg)](https://badge.fury.io/py/diagrams) ![python version](https://img.shields.io/badge/python-%3E%3D%203.6-blue?logo=python) ![Run tests](h...
Mask_RCNN
3deaec5d902d16e1daf56b62d5971d428dc920bc
File: setup.py """ The build/compilations setup >> pip install -r requirements.txt >> python setup.py install """ import pip import logging import pkg_resources try: from setuptools import setup except ImportError: from distutils.core import setup def _parse_requirements(file_path): pip_ver = pkg_resour...
# Mask R-CNN for Object Detection and Segmentation This is an implementation of [Mask R-CNN](https://arxiv.org/abs/1703.06870) on Python 3, Keras, and TensorFlow. The model generates bounding boxes and segmentation masks for each instance of an object in the image. It's based on Feature Pyramid Network (FPN) and a Res...
ungoogled-chromium
1b11ca4600fc48faaa77260d53e20e259c0ee180
File: utils/filescfg.py #!/usr/bin/env python3 # -*- coding: UTF-8 -*- # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Operations with FILES.cfg (for portable packages) """ import argpa...
# ungoogled-chromium *A lightweight approach to removing Google web service dependency* **Help is welcome!** See the [docs/contributing.md](docs/contributing.md) document for more information. ## Objectives In descending order of significance (i.e. most important objective first): 1. **ungoogled-chromium is Google...
wifiphisher
bc4a077e090d59b065cf2c65b0ec1890b9eb4698
File: setup.py #!/usr/bin/env python3 r""" _ __ _ _ _ _ (_)/ _(_) | | (_) | | ((.)) __ ___| |_ _ _ __ | |__ _ ___| |__ ___ _ __ | \ \ /\ / / | _| | '_ \| '_ \| / __| '_ \ / _ \ '__| /_\ \ V V /| | | | | |_) | | | | \__ \ | ...
[![Build Status](https://travis-ci.org/wifiphisher/wifiphisher.svg?branch=master)](https://travis-ci.org/wifiphisher/wifiphisher) [![Documentation Status](https://readthedocs.org/projects/wifiphisher/badge/?version=latest)](http://wifiphisher.readthedocs.io/en/latest/?badge=latest) ![Python Version](https://img.shields...
flask
2fec0b206c6e83ea813ab26597e15c96fab08be7
File: docs/conf.py import packaging.version from pallets_sphinx_themes import get_version from pallets_sphinx_themes import ProjectLink # Project -------------------------------------------------------------- project = "Flask" copyright = "2010 Pallets" author = "Pallets" release, version = get_version("Flask") # G...
# Flask Flask is a lightweight [WSGI][] web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. It began as a simple wrapper around [Werkzeug][] and [Jinja][], and has become one of the most popular Python web application frameworks. Flas...
vit-pytorch
fcb9501cdd9e056dd040915deb3e0a6378821843
File: setup.py from setuptools import setup, find_packages with open('README.md') as f: long_description = f.read() setup( name = 'vit-pytorch', packages = find_packages(exclude=['examples']), version = '1.7.12', license='MIT', description = 'Vision Transformer (ViT) - Pytorch', long_description=long...
<img src="./images/vit.gif" width="500px"></img> ## Table of Contents - [Vision Transformer - Pytorch](#vision-transformer---pytorch) - [Install](#install) - [Usage](#usage) - [Parameters](#parameters) - [Simple ViT](#simple-vit) - [NaViT](#navit) - [Distillation](#distillation) - [Deep ViT](#deep-vit) - [CaiT](#cait...
awesome-oss-alternatives
09d7f8b76ef063c5987caf6361110904f449ece6
File: sort.py def sort_readme(): with open("README.md", "r", encoding="utf-8") as f: all = f.readlines() table_start = "|Category|Company|Description|GitHub Stars|Alternative to|\n" table_end = "<!-- END STARTUP LIST -->\n" idx = all.index(table_start) idx_end = all.index(table_end) ...
# Awesome open-source alternatives to SaaS [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) Awesome list of open-source startup alternatives to established SaaS products. Maintained by folks at [![Runa Capital](h...
python-patterns
328b2d469e92d6a0dfe17d37d3b180412723db45
File: setup.py from setuptools import find_packages, setup setup( name="patterns", packages=find_packages(), description="A collection of design patterns and idioms in Python.", classifiers=[ "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Progr...
python-patterns =============== A collection of design patterns and idioms in Python. Remember that each pattern has its own trade-offs. And you need to pay attention more to why you're choosing a certain pattern than to how to implement it. Current Patterns ---------------- __Creational Patterns__: | Pattern | De...
awesome-free-chatgpt
da28eb22153b4a34eae188335a27f14d411f7d6c
File: convert.py # convert the urls in README.md to json format, and save it to urls.json, colapse the same urls, remove the last `/` in the url import json import re # Read the content of README.md with open("README.md", "r", encoding="utf-8") as file: content = file.read() # Stop reading when reaching a l...
# Awesome Free ChatGPT ![Awesome](https://cdn.jsdelivr.net/gh/LiLittleCat/PicBed/svg/awesome/badge.svg) [![English](https://cdn.jsdelivr.net/gh/LiLittleCat/PicBed/svg/lang/english.svg)](README_en.md) ![website count](https://img.shields.io/badge/websites-297-blue?style=flat) ![last-commit](https://img.shields.io/githu...
cheat.sh
571377f2f79422398a701cb1864487124ec3dcc6
File: bin/srv.py #!/usr/bin/env python # # Serving cheat.sh with `gevent` # from gevent.monkey import patch_all from gevent.pywsgi import WSGIServer patch_all() import os import sys from app import app, CONFIG if '--debug' in sys.argv: # Not all debug mode features are available under `gevent` # https://g...
![cheat.sh logo](http://cheat.sh/files/big-logo-v2-fixed.png) Unified access to the best community driven cheat sheets repositories of the world. Let's imagine for a moment that there is such a thing as an ideal cheat sheet. What should it look like? What features should it have? * **Concise** — It should only con...
shadowsocks
938bba32a4008bdde9c064dda6a0597987ddef54
Removed according to regulations.
12306
a495af88346a0d794493c6030f6a6207debb5824
File: run.py # -*- coding=utf-8 -*- import argparse import sys def parser_arguments(argv): """ 不应该在这里定义,先放在这里 :param argv: :return: """ parser = argparse.ArgumentParser() parser.add_argument("operate", type=str, help="r: 运行抢票程序, c: 过滤cdn, t: 测试邮箱和server酱,server酱需要打开开关") return parser...
### 12306 购票小助手 #### python版本 - [ ] 2.7.10 - 2.7.15 - [x] 3.6 - 3.7.4 - [ ] 2.7.9 #### 已有功能 - [x] 自动打码 - [x] 自动登录 - [x] 准点预售和捡漏 - [x] 智能候补 - [x] 邮件通知 - [x] server酱通知 #### 依赖库 - 验证码目前可以本地识别,需要下载模型,放于项目根目录,全部代码来源于此项目 [传送门](https://github.com/zhaipro/easy12306),表示感谢 ``` 1. 模型下载链接:https://pa...
Llama-Chinese
ecff929b627122ef10da3f7ed2085caf793ba7e5
File: scripts/api/accelerate_client.py # coding=utf-8 import json import time import urllib.request import sys def test_api_server(input_text): header = {'Content-Type': 'application/json'} data = { "system_prompt": "", "history": inputs, "n" : 1, "best_of": 1, ...
<p align="left"> <a href="README_EN.md">English</a> | 中文 </p> <h1 align="center"> Llama中文社区 </h1> <p align="center" width="100%"> <img src="assets/llama.jpg" alt="Llama" style="width: 20%; display: block; margin: auto;"></a> </p> <p align="center"> <font face="黑体" color=orange size="6"> Llama3体验和微调已开放,最好的中文L...
cookiecutter
b4451231809fb9e4fc2a1e95d433cb030e4b9e06
File: setup.py """cookiecutter distutils configuration.""" from pathlib import Path from setuptools import setup def _get_version() -> str: """Read cookiecutter/VERSION.txt and return its contents.""" path = Path("cookiecutter").resolve() version_file = path / "VERSION.txt" return version_file.read...
<h1 align="center"> <img alt="cookiecutter Logo" width="200px" src="https://raw.githubusercontent.com/cookiecutter/cookiecutter/3ac078356adf5a1a72042dfe72ebfa4a9cd5ef38/logo/cookiecutter_medium.png"> </h1> <div align="center"> [![pypi](https://img.shields.io/pypi/v/cookiecutter.svg)](https://pypi.org/project/cook...
marker
6534333c6a53e023152d85d76d28563977c6ccfc
File: marker_app.py import os os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1" os.environ["IN_STREAMLIT"] = "true" import base64 import io import re import tempfile from typing import List, Any, Dict import pypdfium2 import streamlit as st from marker.convert import convert_single_pdf from marker.models import load_...
# Marker Marker converts PDF to markdown quickly and accurately. - Supports a wide range of documents (optimized for books and scientific papers) - Supports all languages - Removes headers/footers/other artifacts - Formats tables and code blocks - Extracts and saves images along with the markdown - Converts most equa...
12306
a495af88346a0d794493c6030f6a6207debb5824
File: run.py # -*- coding=utf-8 -*- import argparse import sys def parser_arguments(argv): """ 不应该在这里定义,先放在这里 :param argv: :return: """ parser = argparse.ArgumentParser() parser.add_argument("operate", type=str, help="r: 运行抢票程序, c: 过滤cdn, t: 测试邮箱和server酱,server酱需要打开开关") return parser...
### 12306 购票小助手 #### python版本 - [ ] 2.7.10 - 2.7.15 - [x] 3.6 - 3.7.4 - [ ] 2.7.9 #### 已有功能 - [x] 自动打码 - [x] 自动登录 - [x] 准点预售和捡漏 - [x] 智能候补 - [x] 邮件通知 - [x] server酱通知 #### 依赖库 - 验证码目前可以本地识别,需要下载模型,放于项目根目录,全部代码来源于此项目 [传送门](https://github.com/zhaipro/easy12306),表示感谢 ``` 1. 模型下载链接:https://pa...
codellama
e81b597e44dbecc2a0dedb9949fdf84adfc22395
File: example_infilling.py # Copyright (c) Meta Platforms, Inc. and affiliates. # This software may be used and distributed according to the terms of the Llama 2 Community License Agreement. import fire from llama import Llama def main( ckpt_dir: str, tokenizer_path: str, temperature: float = 0.0, ...
# Introducing Code Llama Code Llama is a family of large language models for code based on [Llama 2](https://github.com/facebookresearch/llama) providing state-of-the-art performance among open models, infilling capabilities, support for large input contexts, and zero-shot instruction following ability for programming...
GitHub520
586c0d2e2bebb5962c4419edada24a3a416c9e3d
File: fetch_ips.py #!/usr/bin/env python # -*- coding:utf-8 -*- # # Author : XueWeiHan # E-mail : 595666367@qq.com # Date : 2020-05-19 15:27 # Desc : 获取最新的 GitHub 相关域名对应 IP import os import re import json from typing import Any, Optional from datetime import datetime, timezone, timedelta f...
# GitHub520 <p align="center"> <a href="https://hellogithub.com/repository/d05ff820bf36470581c02cda5cbd17ea" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=d05ff820bf36470581c02cda5cbd17ea&claim_uid=8MKvZoxaWt" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="25...
shadowsocks
938bba32a4008bdde9c064dda6a0597987ddef54
Removed according to regulations.
Real-Time-Voice-Cloning
911679d0c27fb57cde8ef2b5967e9ed2dd543e10
File: encoder_preprocess.py from encoder.preprocess import preprocess_librispeech, preprocess_voxceleb1, preprocess_voxceleb2 from utils.argutils import print_args from pathlib import Path import argparse if __name__ == "__main__": class MyFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescription...
# Real-Time Voice Cloning This repository is an implementation of [Transfer Learning from Speaker Verification to Multispeaker Text-To-Speech Synthesis](https://arxiv.org/pdf/1806.04558.pdf) (SV2TTS) with a vocoder that works in real-time. This was my [master's thesis](https://matheo.uliege.be/handle/2268.2/6801). SV2...
OSX-KVM
182e2dd0715175801521f6342ac7cc715044cb12
File: fetch-macOS-v2.py #!/usr/bin/env python3 # pylint: disable=C0301,C0116,C0103,R0903 """ Gather recovery information for Macs. Copyright (c) 2019, vit9696 macrecovery is a tool that helps to automate recovery interaction. It can be used to download diagnostics and recovery as well as analyse MLB. Requires pyth...
### Note This `README.md` documents the process of creating a `Virtual Hackintosh` system. Note: All blobs and resources included in this repository are re-derivable (all instructions are included!). :green_heart: Looking for **commercial** support with this stuff? I am [available over email](mailto:dhiru.kholia@gma...
cli
f4cf43ecdd6c5c52b5c4ba91086d5c6ccfebcd6d
File: setup.py from setuptools import setup setup() File: docs/installation/generate.py import re import sys from pathlib import Path from typing import Dict import yaml from jinja2 import Template Database = Dict[str, dict] # Files HERE = Path(__file__).parent DB_FILE = HERE / 'methods.yml' DOC_FILE = HERE.pa...
<h2 align="center"> <a href="https://httpie.io" target="blank_"> <img height="100" alt="HTTPie" src="https://raw.githubusercontent.com/httpie/cli/master/docs/httpie-logo.svg" /> </a> <br> HTTPie CLI: human-friendly HTTP client for the API era </h2> <div align="center"> [![HTTPie for Desktop](h...
linux-insides
0995b4bc531fcf29b4431ecf0e29aa86e66838f4
File: Scripts/get_all_links.py #!/usr/bin/env python from __future__ import print_function from socket import timeout import os import sys import codecs import re import markdown try: # compatible for python2 from urllib2 import urlopen from urllib2 import HTTPError from urllib2 import URLError exc...
linux-insides =============== A book-in-progress about the linux kernel and its insides. **The goal is simple** - to share my modest knowledge about the insides of the linux kernel and help people who are interested in linux kernel insides, and other low-level subject matter. Feel free to go through the book [Start h...
examples
26de41904319c7094afc53a3ee809de47112d387
# PyTorch Examples ![Run Examples](https://github.com/pytorch/examples/workflows/Run%20Examples/badge.svg) https://pytorch.org/examples/ `pytorch/examples` is a repository showcasing examples of using [PyTorch](https://github.com/pytorch/pytorch). The goal is to have curated, short, few/no dependencies _high quality...
localGPT
a1dea3becb8b1ae28a87369b1636c4c4a4501c27
File: localGPT_UI.py import torch import subprocess import streamlit as st from run_localGPT import load_model from langchain.vectorstores import Chroma from constants import CHROMA_SETTINGS, EMBEDDING_MODEL_NAME, PERSIST_DIRECTORY, MODEL_ID, MODEL_BASENAME from langchain.embeddings import HuggingFaceInstructEmbedding...
# LocalGPT: Secure, Local Conversations with Your Documents 🌐 [![GitHub Stars](https://img.shields.io/github/stars/PromtEngineer/localGPT?style=social)](https://github.com/PromtEngineer/localGPT/stargazers) [![GitHub Forks](https://img.shields.io/github/forks/PromtEngineer/localGPT?style=social)](https://github.com/...
Python-100-Days
bf24146944745bb25c66c82307fd218abd179c6a
File: Day31-35/code/josephu.py def main(): persons = [True] * 30 counter = 0 index = 0 number = 0 while counter < 15: if persons[index]: number += 1 if number == 9: persons[index] = False number = 0 counter += 1 ...
## Python - 100天从新手到大师 > **作者**:骆昊 > > **说明**:从项目上线到获得8w+星标以来,一直收到反馈说基础部分(前15天的内容)对新手来说是比较困难的,建议有配套视频进行讲解。最近把基础部分的内容重新制作了一个名为[“Python-Core-50-Courses”](<https://github.com/jackfrued/Python-Core-50-Courses>)的项目,用更为简单通俗的方式重写了这部分内容并附带了视频讲解,初学者可以看看这个新的仓库。国内用户如果访问GitHub比较慢的话,可以关注我的**知乎号[Python-Jack](https://www.zhihu.com/p...
ChatterBot
4ff8af28567ed446ae796d37c246bb6a14032fe7
File: setup.py #!/usr/bin/env python """ ChatterBot setup file. """ import os import sys import platform import configparser from setuptools import setup if sys.version_info[0] < 3: raise Exception( 'You are tying to install ChatterBot on Python version {}.\n' 'Please install ChatterBot in Python...
![ChatterBot: Machine learning in Python](https://i.imgur.com/b3SCmGT.png) # ChatterBot ChatterBot is a machine-learning based conversational dialog engine build in Python which makes it possible to generate responses based on collections of known conversations. The language independent design of ChatterBot allows it...