Giter Site home page Giter Site logo

马喆诚's Projects

chatgpt-on-wechat icon chatgpt-on-wechat

使用ChatGPT搭建微信聊天机器人,基于OpenAI API和itchat实现。Wechat robot based on ChatGPT, which using OpenAI api and itchat library.

gale-shapleyalgorithm icon gale-shapleyalgorithm

Python版本 盖尔-沙普利算法:为了寻找一个稳定匹配而设计出的市场机制,对于市场的一方A有m个对象 另一方市场B有n个对象,A中的每个人会对B中的人有一个好感度排名,B也会有相应的排名 市场一方的对象 Ai,i=1,2,...,m 向另一方的对象 Bj,j=1,2,...,n 发出邀约,每个 Bj 会对接到的邀约进行比较,保留自己认为最好的,拒绝其它的。邀约被拒绝的 Ai 继续 向其它的 Bj 发出新的邀约,直到没有 Ai 希望再发出邀约为止。此时各 Bj 才最终接受 各自保留的邀约。该算法的一个关键之处在于,合意的邀约不会立即被接受,而只是暂时保 留不被拒绝,也就是 “延迟接受”。 注意:本算法不保证每个人都能找到相应的匹配,而是找到最稳定的匹配,即在双方这里 都没有办法找到更稳定的匹配,不会出现任一方可以接受更好的一人的可能性 算法**: while  存在男人m是自由的且还没对每个女人都求过婚       选择这个男人m                 令w是m的优先表中还没求过婚的最高排名的女人         if  w是自由的  并且w愿意接受m             (m,w)变成约会状态         else  w当前与m1约会 并且w愿意接受m               if  w更偏爱m1而不爱m                     m保持自由               else    w更偏爱m而不爱m1                    (m,w)变成约会状态                     m1变成自由               endif                   endif endwhile #本程序须知: #1.GS_matching的函数必须让list长度较小的一个在前面 #2.允许每个人可以接受的配对数不一样,即每个男士或者女士可以有数目不一样的青睐者 #3.允许男士和女士的数目不一样多 #4.返回的list里面若出现-1,则表明这个配对没有成功 可以在后续将这些进行剔除(已经进行了剔除,不会有没进行配对的出现在结果里面) #输入和输出 输入是两个list集 具体的情况参照main方法里面的输入 输出是一个list 给出了具体的配对方式

incubator-superset icon incubator-superset

Apache Superset (incubating) is a modern, enterprise-ready business intelligence web application

machinelearning icon machinelearning

Machine learning resources,including algorithm, paper, dataset, example and so on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.