回购股份超过回购价格

tech2022-08-27  129

回购股份超过回购价格

It’s time for our monthly hunt for new open source libraries to use and contribute to!

现在该是我们每月一次寻找使用新的开源库并做出贡献的时候了 !

If you’re new to Sourcehunt, it’s our monthly post for promoting open source projects that seem interesting or promising and could use help in terms of Github stars or pull requests.

如果您是Sourcehunt的新手,这是我们的月度帖子,用于推广看起来有趣或有前途的开源项目,这些项目可以在Github明星或请求请求方面使用帮助。

It’s our way of giving back – promoting projects that we use (or could use) so that they gain enough exposure to attract a wider audience, a powerful community and, possibly, new contributors or sponsors.

这是我们回馈的方式-推广我们使用(或可以使用)的项目,使它们获得足够的曝光度,以吸引更广泛的受众,强大的社区,并可能吸引新的贡献者或赞助者。



genkgo /存档流 [5★] (genkgo/archive-stream [5 ★])

We stumbled upon this package following this very interesting read about streamed file zipping and downloading in PHP.

在偶然阅读了有关PHP中流式文件压缩和下载的非常有趣的读物之后,我们偶然发现了这个软件包。

This package provides a memory efficient API for streaming ZIP files as PSR 7 messages. It comes with certain limitations, namely that only the Zip64 (version 4.5 of the Zip specification) format is supported, and files cannot be resumed if a download fails before finishing, but apart from that, using it is incredibly straightforward if you’re already wading through the PSR-7 waters:

该软件包提供了一种内存高效的API,用于将ZIP文件作为PSR 7消息进行流传输。 它具有一定的局限性,即仅支持Zip64(Zip规范的4.5版本)格式,如果下载在完成之前失败,则无法恢复文件,但除此之外,如果您已经使用它,则使用起来非常简单在PSR-7水域中涉水:

$archive = (new Archive()) ->withContent(new CallbackStringContent('callback.txt', function () { return 'data'; })) ->withContent(new StringContent('string.txt', 'data')) ->withContent(new FileContent('file.txt', 'local/file/name.txt')) ->withContent(new EmptyDirectory('directory')); $response = $response->withBody( new Psr7Stream(new ZipReader($archive)) );

The library, while having many contributors who have done a professional job of fool-proofing it, and being over 8 months old, lacks exposure. Oddly enough, there are no issues (the issues feature itself is disabled) and no PRs to review, but the authors could always use more testers, tech writers to present the lib in blogs, and maintainers.

图书馆虽然有许多贡献者,他们都做过专门的防呆工作,而且已经超过8个月大了,但是却缺乏曝光。 奇怪的是,没有问题(问题功能本身已被禁用),也没有PR可供审阅,但是作者始终可以使用更多的测试人员,技术作家来在博客中展示该库以及维护者。

How do you usually send ZIPs, if at all? Why not give this a go?

如果有的话,您通常如何发送ZIP? 为什么不试一试呢?



patrickschur /语言检测 [270★] (patrickschur/language-detection [270 ★])

Patrick originally contacted us via our Facebook page asking to be mentioned in this month’s sourcehunt, and given the excellence of this package, we couldn’t resist.

帕特里克(Patrick)最初是通过我们的Facebook页面与我们联系的,要求在本月的Sourcehunt中被提及,并且鉴于此软件包的出色表现,我们无法抗拒。

The package deals with using specific training materials to find the frequency of occurring words, and matching that with a test sample to detect its language. As per the README:

该软件包涉及使用特定的培训材料来查找出现单词的频率,并将其与测试样本进行匹配以检测其语言。 根据自述文件:

This library can detect the language of a given text string. It can parse given training text in many different idioms into a sequence of N-grams and builds a database file in JSON format to be used in the detection phase. Then it can take a given text and detect its language using the database previously generated in the training phase. The library comes with text samples used for training and detecting text in 106 languages.

该库可以检测给定文本字符串的语言。 它可以将给定的训练用语在许多不同的惯用法中解析为一系列N-gram,并以JSON格式构建数据库文件以用于检测阶段。 然后,它可以使用给定的文本并使用先前在训练阶段生成的数据库来检测其语言。 该库附带了文本样本,用于训练和检测106种语言的文本。

The library is well documented, well tested, and well built – it’s very straightforward to use, and really simple to add more training data to it.

该库具有良好的文档记录,良好的测试和良好的构建-使用非常简单,并且向其中添加更多培训数据也非常简单。

The package could use some in depth tutorials and maintainers, so if you’re up for a low-maintenance gig, sign up!

该软件包可以使用一些深入的教程和维护人员,因此,如果您打算进行低维护的演出,请注册!



https://github.com/JWHennessey/phpInsight [195★] (https://github.com/JWHennessey/phpInsight [195 ★])

Used to extract sentiment from text. This can be positive, neutral, or negative. It’s like a very basic, free, open source version of Semantria.

用于从文本中提取情感。 这可以是正数,中性或负数。 这就像Semantria的一个非常基本的免费开放源代码版本。

The library has been out for a few years, and hasn’t been updated in a couple, but there’s a reason why we’re sharing it: a) it’s really interesting and fun to play with, and b) see below.

该库已经使用了几年,并且还没有进行过几次更新,但是我们共享它是有原因的:a)玩起来真的很有趣也很有趣,b)见下文。

In the meanwhile, the library could use some help with several issues, and there’s always tweaking for precision to be done. Help out if you can!

同时,该库可以在一些问题上使用一些帮助,并且总是需要对精度进行调整。 如果可以的话,帮帮忙!



isfonzar /感温计 [42★] (isfonzar/sentiment-thermometer [42 ★])

Using the PhpInsight library above, this one goes to Twitter, searches for the provided phrase or term, and measures Twitter’s sentiment towards it. This means it’ll grab the tweets that talk about this, analyze them for sentiment, and return an overall result.

使用上面的PhpInsight库,该库转到Twitter,搜索提供的短语或术语,并评估Twitter对此的情绪。 这意味着它将抓取谈论此话题的推文,分析它们的观点,并返回总体结果。

Now, you might argue that, in the demo, a Donald Trump twitter search yielding 40% positive and only 20% negative sentiment doesn’t make much sense, and the author did say the sentiment varies according to time of day and whatnot (maybe he tested when it was mid-day in Russia?), but obviously, the library could use some tweaking and fine tuning, so go ahead and jump right in. It could also use the ability to look up other social networks – Facebook’s public posts might be an interesting one, for example.

现在,您可能会争辩说,在演示中,唐纳德·特朗普的推特搜索产生40%的积极情绪而只有20%的消极情绪没有多大意义,而作者确实表示情绪会根据一天中的不同时间而有所不同(也许他在俄罗斯正午时进行了测试?),但很显然,图书馆可以进行一些调整和微调,因此继续前进并直接进入。它还可以使用查找其他社交网络的功能– Facebook的公共帖子例如,可能会很有趣。



paragonie / PHP-Cookie [7★] (paragonie/PHP-Cookie [7 ★])

There’s a new CSRF killer in town, and paragonIE’s PHP-Cookie package is the first to truly utilize it.

小镇上出现了一个新的CSRF杀手 ,而paragonIEPHP-Cookie软件包是第一个真正使用它的软件包。

In case you missed it, Cookies now support the SameSite directive in newer browsers, effectively killing CSRF in all modern clients. That still leaves old browsers vulnerable, so you definitely shouldn’t depend JUST on SameSite just yet, but it’s a step in the right direction and all we have to do is wait for adoption.

如果您错过了它,Cookie现在在较新的浏览器中支持SameSite指令,从而有效地杀死了所有现代客户端中的CSRF。 这仍然使旧的浏览器容易受到攻击,因此您绝对不应仅依赖SameSite,但这是朝着正确方向迈出的一步,我们要做的就是等待采用。

PHP-Cookie takes this a step further and adds the functionality in as a PHP package – you can now easily set SameSite cookies from PHP. In this lib:

PHP-Cookie更进一步,并以PHP软件包的形式添加了功能-您现在可以轻松地从PHP设置SameSite cookie。 在这个库中:

Secure is set to TRUE unless you override it.

除非将其覆盖,否则将Secure设置为TRUE。 HTTP-Only is set to TRUE unless you override it.

除非您将HTTP-Only设置为TRUE,否则将其覆盖。 Same-Site is set to Strict unless you override it.

除非您覆盖相同站点,否则将其设置为“严格”。

Note that PHP 7+ is a requirement.

请注意,PHP 7+是必需的。

If you’re interested, there’s also a suggestion to implement this into native PHP: https://bugs.php.net/bug.php?id=72230

如果您有兴趣,还建议将其实施到本机PHP中:https://bugs.php.net/bug.php?id=72230



kamranahmedse /人类设计模式 [7718★] (kamranahmedse/design-patterns-for-humans [7718 ★])

Last but not least, a non-code repo. This awesome compilation of human-readable explanations of design patterns blew up on Reddit and Hacker News over the weekend, and has been growing ever since.

最后但并非最不重要的是,一个非代码仓库。 在上周末的Reddit和Hacker News上,这种对人类易于理解的设计模式解释的令人赞叹的汇编大作,此后一直在增长。

The author is a non-native English speaker, so there’s still quite a few typos to fix and phrases to correct, and additional examples of design patterns are also handy. But in all honest, this repo has enough inertia to survive without further promotion – we just wanted to bring it to your attention, in case you missed it.

作者是非英语母语人士,因此仍然有很多错别字需要纠正,而短语也需要纠正,而且设计模式的其他示例也很方便。 但老实说,此回购交易具有足够的惯性,无需进一步提升即可生存-我们只是想引起您的注意,以防您错过它。



That’s it for February. Found anything you could sink your teeth into?

2月就是这样。 发现什么可以让您的牙齿陷入其中?

As always, please throw your links at us with the #sourcehunt hashtag! If you build something with the projects we’ve mentioned, or if you submit an elaborate pull request you’d like to talk about, give us a shout and we’ll make sure the world knows about it!

与往常一样,请使用#sourcehunt标签将您的链接扔给我们! 如果您使用我们提到的项目构建项目,或者提交您想谈论的详尽请求请求,请向我们喊叫,我们将确保全世界都知道!

App+Tutorial idea of the month: Add Facebook public posts into the sentiment thermometer, add language detection into the mix, use Google Translate to translate non-English posts, and then grab sentiment of all those. Build a graph of sentiment for a term every hour in a day for several days/weeks in a row, and find trends of liking and disliking a phrase. Add this mix to a dashboard where all a user has to do is define a term, and a widget is generated with trend graphs. Bonus points if terms and their values are saved for later, so that if another user requests, for example, Donald Trump, the data is already there and reused, saving bandwidth and API calls.

本月的App + Tutorial想法:将Facebook公共帖子添加到情绪温度计中,将语言检测添加到组合中,使用Google翻译翻译非英语帖子,然后掌握所有这些内容的情感。 连续几天/几周每天每天每小时建立一个情感图表,并发现喜欢和不喜欢短语的趋势。 将此混合添加到仪表板中,用户只需定义一个术语,然后便会使用趋势图生成小部件。 奖励点在于是否保存术语及其值供以后使用,这样,如果另一个用户请求唐纳德·特朗普(Donald Trump),则数据已经存在并可以重复使用,从而节省了带宽和API调用。

Happy coding!

祝您编码愉快!

翻译自: https://www.sitepoint.com/sourcehunt-idea-of-the-month-and-6-interesting-repos/

回购股份超过回购价格

相关资源:kb_template_github:默认回购文档和模板-源码
最新回复(0)