language stringclasses 1
value | bytes int64 142 1.53M | lines int64 1 19.7k | parse_error bool 2
classes | n_nodes int64 2 107k | n_leaves int64 1 85.3k | n_functions int64 0 1.29k | n_methods int64 0 1.03k | n_classes int64 0 808 | n_comments int64 0 7.02k | comment_bytes int64 0 188k | comment_ratio float64 0 1 | max_depth int64 1 2.46k | mean_depth float64 0.5 900 | n_imports int64 0 542 | n_strings int64 0 20.8k | n_identifiers int64 0 22k | has_docstring bool 2
classes | docstring_count int64 0 1k | shape_root stringlengths 16 16 | n_defs int64 0 1.29k | n_def_shapes int64 0 729 | row int64 0 9.48M | blob_id stringlengths 40 40 | repo stringlengths 5 140 | path stringlengths 2 604 | source_bytes int64 200 200k | license_type stringclasses 2
values | detected_licenses listlengths 0 91 | edu_score float64 2.52 5.66 | edu_int_score int64 3 5 | src_encoding stringclasses 34
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
python | 296 | 18 | false | 135 | 83 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4.837037 | 1 | 1 | 30 | false | 0 | 74b33aabd098615f | 0 | 0 | 0 | 0000000c09db24c41b430702fe71d0be87dde7d7 | CaoFangyuan/new-sys | /testbutton.py | 296 | no_license | [] | 2.71875 | 3 | UTF-8 |
python | 1,881 | 59 | false | 308 | 210 | 0 | 4 | 1 | 16 | 673 | 0.357788 | 18 | 8.006494 | 0 | 6 | 49 | false | 0 | f6989ce3bd52a2bd | 5 | 5 | 1 | 0000004d0cddb3fbaa153891801464c5ba8705d0 | jisoocha/Practice | /Questions/parctice_002.py | 1,881 | no_license | [] | 4 | 4 | UTF-8 |
python | 956 | 59 | false | 470 | 390 | 0 | 0 | 0 | 1 | 18 | 0.018828 | 11 | 4.170213 | 2 | 0 | 170 | false | 0 | a5d20d6c36175cc9 | 0 | 0 | 2 | 000000a5c80dee96819673d818eb7d0e7d906d3a | astro-pi/vbarekos-astro-pi | /SmileHappyHumidity.py | 956 | no_license | [] | 2.625 | 3 | UTF-8 |
python | 1,628 | 57 | false | 772 | 500 | 0 | 0 | 0 | 1 | 18 | 0.011057 | 10 | 5.553109 | 4 | 22 | 145 | false | 0 | 22a2224638dd3bde | 0 | 0 | 3 | 000000d51eaec005ee2266e3e20ea9def5fdcaa4 | tianyuan-lu/Tabula-Muris-Processing-single-cell-RNAseq | /heart_random_split.py | 1,628 | no_license | [] | 2.59375 | 3 | UTF-8 |
python | 304 | 13 | false | 115 | 74 | 1 | 0 | 0 | 0 | 0 | 0 | 12 | 6.686957 | 0 | 1 | 28 | false | 0 | 825899382c5d7851 | 1 | 1 | 4 | 0000013b2237ba667583ff2c3fcaf50cab3b2d9c | daniel-reich/ubiquitous-fiesta | /SQZoHFDfizBTP4HSx_24.py | 304 | no_license | [] | 3.375 | 3 | UTF-8 |
python | 384 | 18 | false | 121 | 74 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 6.487603 | 1 | 4 | 22 | false | 0 | 2f4d7be030be0a55 | 0 | 0 | 5 | 00000161008f6b44ed69726554f2141d9afe2cea | CaiqueAmancio/ExercPython | /teste.py | 384 | no_license | [] | 3.875 | 4 | UTF-8 |
python | 418 | 18 | false | 196 | 130 | 0 | 3 | 1 | 1 | 38 | 0.090909 | 9 | 5.382653 | 0 | 4 | 48 | false | 0 | 96d0125f7c157909 | 4 | 4 | 6 | 000002099b480029b81ad202eaca73cdf12a2ce6 | Faranaz08/HW | /add.py | 418 | no_license | [] | 3.75 | 4 | UTF-8 |
python | 4,950 | 168 | false | 1,366 | 916 | 12 | 0 | 0 | 14 | 629 | 0.127071 | 15 | 7.647877 | 0 | 25 | 292 | false | 0 | 77df98449b767eb3 | 12 | 8 | 7 | 000002ed45c8c128224ac23653fbb45ccd35f883 | Run-Hadid/MITx6.00.1x-CSwithPy | /pSet2-3 bindra_k code.py | 4,950 | no_license | [] | 3.234375 | 3 | UTF-8 |
python | 2,067 | 48 | true | 426 | 292 | 1 | 0 | 0 | 12 | 301 | 0.145622 | 13 | 7.478873 | 0 | 22 | 57 | false | 0 | 8c636d99c92b72af | 1 | 1 | 8 | 000003b64ee688070f2a8344b68f18ec15cebae8 | saracsit/udacity_First_Project | /print_results.py | 2,067 | no_license | [] | 3.21875 | 3 | UTF-8 |
python | 681 | 31 | false | 271 | 182 | 1 | 0 | 0 | 3 | 108 | 0.15859 | 10 | 5.416974 | 1 | 28 | 25 | false | 0 | df54f84acebce40b | 1 | 1 | 9 | 000003cf38fec94cf911560646555fa5960d77d7 | csandeepa/MaLeDiCry-PoolManage-miningcore | /Pool Managing scripts/save-file.py | 681 | no_license | [] | 3.265625 | 3 | UTF-8 |
python | 259 | 20 | false | 126 | 74 | 2 | 0 | 0 | 1 | 16 | 0.061776 | 9 | 4.944444 | 2 | 2 | 23 | false | 0 | 3b05c06ea0d90c6b | 2 | 1 | 10 | 00000411739f1d15ce789877093824d33d5479e5 | remix7/python3-nome | /learningpy3/socket/16greenlet-协程.py | 259 | no_license | [] | 2.96875 | 3 | UTF-8 |
python | 1,223 | 62 | false | 336 | 206 | 2 | 0 | 3 | 0 | 0 | 0 | 9 | 4.419643 | 2 | 11 | 63 | false | 0 | 55a56de25871c580 | 5 | 4 | 11 | 00000660c78173d3aefa6cc4bef55872f2e4a927 | noblecook/research | /PythonTutorials/OwlReady2.py | 1,223 | no_license | [] | 2.53125 | 3 | UTF-8 |
python | 9,908 | 256 | false | 2,202 | 1,439 | 0 | 22 | 2 | 21 | 674 | 0.068026 | 17 | 7.716621 | 6 | 23 | 548 | true | 1 | 9807924c1fcf5338 | 24 | 23 | 12 | 00000695227917d5d35b141bb3ddd88dce938b12 | AIRLab-POLIMI/Robotower2.0 | /control/trueskill/scripts/test_node.py | 9,908 | no_license | [] | 2.671875 | 3 | UTF-8 |
python | 614 | 35 | false | 353 | 234 | 1 | 0 | 0 | 0 | 0 | 0 | 9 | 5.206799 | 1 | 0 | 68 | false | 0 | b316c33170ba1d14 | 1 | 1 | 13 | 000006e05347dc017b9ccd21357645a08f661318 | kasrakhalafi/Computational_Intelligence_Lab | /Session1_NeuralNetwork/perceptron.py | 614 | no_license | [] | 2.9375 | 3 | UTF-8 |
python | 569 | 35 | false | 200 | 121 | 2 | 0 | 0 | 3 | 50 | 0.087873 | 9 | 4.275 | 0 | 12 | 26 | false | 0 | 5d4576f20ae063e6 | 2 | 2 | 14 | 00000842e1c3e7105911053aa675df3cccf587a3 | MatrixMike/Python | /DataIntro/eg2.py | 569 | no_license | [] | 3.703125 | 4 | UTF-8 |
python | 4,623 | 118 | false | 871 | 584 | 10 | 0 | 0 | 33 | 1,906 | 0.412286 | 15 | 6.368542 | 4 | 44 | 146 | false | 0 | a8b828ce5a0da63d | 10 | 6 | 15 | 00000886f6fb562071ff1f43afb89948948709e6 | SpasZahariev/flask-google-app-engine | /main.py | 4,623 | no_license | [] | 2.640625 | 3 | UTF-8 |
python | 626 | 29 | false | 276 | 172 | 2 | 0 | 0 | 3 | 96 | 0.153355 | 9 | 5.061594 | 0 | 7 | 54 | false | 0 | c3190df67ec59198 | 2 | 2 | 16 | 000008c754c6d3d92691b3ccf99d9886fbc0c622 | tjdgus3160/algorithm | /연습문제/회문판단.py | 626 | no_license | [] | 4.25 | 4 | UTF-8 |
python | 13,100 | 248 | false | 3,366 | 2,258 | 4 | 2 | 1 | 57 | 3,033 | 0.231527 | 25 | 8.886215 | 8 | 36 | 780 | false | 0 | 8bf746643b827985 | 7 | 6 | 17 | 000008ec64c213f3e62ca120c464464bfe611d09 | jgpATs2w/uned-matematicas-variable-compleja | /complex3d.py | 13,100 | no_license | [] | 2.765625 | 3 | UTF-8 |
python | 828 | 20 | false | 127 | 84 | 1 | 0 | 0 | 5 | 364 | 0.439614 | 8 | 4.992126 | 3 | 2 | 30 | false | 0 | b7844341a1fd39d2 | 1 | 1 | 18 | 00000a4b1defe03dd6449fff8599bb24e8082af1 | harshmehta27/DjangoWebApp | /events/traffic.py | 828 | no_license | [] | 3.09375 | 3 | UTF-8 |
python | 32,908 | 1,010 | false | 9,517 | 6,176 | 35 | 2 | 1 | 10 | 316 | 0.009603 | 20 | 8.030892 | 6 | 474 | 1,907 | false | 0 | 6f68d8bae23a1e13 | 38 | 30 | 19 | 00000ae2f6d0c051c59a2f9fb50d2e029505c1f3 | lief-project/LIEF | /api/python/examples/macho_reader.py | 32,908 | permissive | [
"Apache-2.0"
] | 2.6875 | 3 | UTF-8 |
python | 1,155 | 52 | false | 604 | 417 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 3.698675 | 0 | 9 | 88 | false | 0 | ec9670a8220d202c | 0 | 0 | 20 | 00000b065cff25921cdf72b779101c836930c4e7 | tripoloski1337/writeup-ctf | /bcactf-2019/programming/manner-of-thpeaking/solver.py | 1,155 | no_license | [] | 2.875 | 3 | UTF-8 |
python | 929 | 49 | false | 339 | 203 | 4 | 0 | 0 | 1 | 23 | 0.024758 | 12 | 6.59882 | 8 | 11 | 55 | false | 0 | 10a0fae88eb54343 | 4 | 4 | 21 | 00000b32a21a8960579ebc25ad9d4b2e72d50b0b | ezesoler/bender | /core.py | 929 | permissive | [
"Apache-2.0"
] | 2.515625 | 3 | UTF-8 |
python | 975 | 28 | false | 214 | 139 | 3 | 0 | 0 | 0 | 0 | 0 | 8 | 5.14486 | 2 | 2 | 53 | true | 2 | fc530111dccaca8f | 3 | 3 | 22 | 00000bde63825daf415defef92f728aaf2a2fa8e | josh-tobin/tf_ntm | /network/utils.py | 975 | no_license | [] | 2.859375 | 3 | UTF-8 |
python | 373 | 19 | false | 169 | 103 | 1 | 0 | 0 | 0 | 0 | 0 | 14 | 7.12426 | 0 | 1 | 31 | false | 0 | a70a352559618002 | 1 | 1 | 23 | 00000c42837c7cbc0ffda62262b5684b2e67ccc1 | aki-nlp/AtCoder | /atcoder.jp/abc063/arc075_a/Main.py | 373 | no_license | [] | 2.90625 | 3 | UTF-8 |
python | 1,325 | 60 | false | 487 | 304 | 1 | 0 | 0 | 0 | 0 | 0 | 16 | 8.383984 | 1 | 8 | 100 | false | 0 | 2925b2e36fed5f5c | 1 | 1 | 24 | 00000d2e31c1fa07f2d8d1732a19b0fb03f5a904 | amdel2020/Algorithms | /16.18.py | 1,325 | no_license | [] | 3.390625 | 3 | UTF-8 |
python | 14,449 | 313 | false | 5,088 | 3,457 | 1 | 9 | 4 | 24 | 566 | 0.039172 | 18 | 8.983097 | 7 | 116 | 1,143 | true | 10 | c1dfc2312306e727 | 14 | 14 | 25 | 00000e06750fea5b8e89d2f4bfff36ff29872cc9 | colshag/ANW | /anwmisc/anwp/gui/shipinfo.py | 14,444 | no_license | [] | 2.75 | 3 | UTF-8 |
python | 238 | 17 | false | 48 | 30 | 0 | 0 | 0 | 1 | 40 | 0.168067 | 6 | 3.5625 | 0 | 3 | 8 | false | 0 | 8136903ffdf76774 | 0 | 0 | 26 | 000010f1deea0fabc500a6e3ea83c43cd8d53647 | sebutz/python101code | /Chapter 8 - Working with Files/read_line_by_line.py | 238 | no_license | [] | 3.21875 | 3 | UTF-8 |
python | 2,007 | 42 | false | 501 | 326 | 0 | 0 | 0 | 13 | 803 | 0.4001 | 22 | 11.676647 | 0 | 3 | 107 | false | 0 | d3ec5f1f2e08977e | 0 | 0 | 27 | 00001172e1190dcc931c08d6ecd6c64b6bea599a | brahim024/Hands-On-Data-Structures-and-Algorithms-with-Python-Second-Edition | /Chapter12/Boyer_Moore.py | 2,007 | permissive | [
"MIT"
] | 3.4375 | 3 | UTF-8 |
python | 3,189 | 87 | false | 892 | 556 | 0 | 5 | 1 | 0 | 0 | 0 | 13 | 7.886771 | 3 | 12 | 220 | false | 0 | c177c529f377c491 | 6 | 6 | 28 | 000011c495661b6689b07dfc90900360e5da95e5 | pragfang/MeteringSystemCoursework | /edit_reading_class.py | 3,189 | no_license | [] | 2.578125 | 3 | UTF-8 |
python | 943 | 38 | false | 133 | 82 | 1 | 0 | 0 | 1 | 62 | 0.065748 | 12 | 5.421053 | 0 | 4 | 23 | false | 0 | 100fd5448bb80bf7 | 1 | 1 | 29 | 000011decc5414f027245591dd6f087757481c45 | linhnt31/Python | /Fundamentals/Basic/variables.py | 943 | no_license | [] | 3.875 | 4 | UTF-8 |
python | 7,178 | 211 | false | 1,543 | 1,004 | 9 | 0 | 0 | 6 | 341 | 0.047506 | 27 | 9.610499 | 6 | 56 | 285 | true | 2 | e3a46cd7e1ae05f4 | 9 | 9 | 30 | 000011ecfeacf9608095ba1c8a7f282c59d810e4 | MicrosoftDocs/bingmaps-docs | /BingMaps/msdn_migration/link_fixer.old.py | 7,178 | permissive | [
"CC-BY-4.0",
"MIT"
] | 2.796875 | 3 | UTF-8 |
python | 5,744 | 213 | false | 1,064 | 726 | 0 | 0 | 0 | 99 | 4,184 | 0.728412 | 8 | 3.738722 | 1 | 31 | 162 | false | 0 | 674272b534bf4486 | 0 | 0 | 31 | 000012630235b79b355d523743339f48588aa895 | TholhahZabri/Learn-Python | /testpython5.py | 5,738 | no_license | [] | 3.921875 | 4 | UTF-8 |
python | 4,204 | 159 | false | 824 | 543 | 5 | 0 | 0 | 41 | 1,617 | 0.384634 | 14 | 5.981796 | 5 | 20 | 169 | false | 0 | d88fd5ea56ae1085 | 5 | 5 | 32 | 000012c65f5ad2aa4261e7c3976658f59ad32a19 | terrysky18/Python-repo | /My Python Scripts/FindBuild/prime_old.py | 4,204 | no_license | [] | 2.828125 | 3 | UTF-8 |
python | 591 | 23 | false | 227 | 145 | 0 | 0 | 0 | 5 | 129 | 0.218274 | 7 | 3.806167 | 0 | 16 | 33 | false | 0 | db59032df3564b88 | 0 | 0 | 33 | 0000131e9a309bd6fba5e2bba5c591a6aa1dd51c | miftahulkhair32/python | /menthod.py | 591 | no_license | [] | 3.71875 | 4 | UTF-8 |
python | 1,065 | 48 | false | 512 | 319 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 8.546875 | 0 | 16 | 81 | false | 0 | 2f1c56d7761d8d37 | 0 | 0 | 34 | 000013a3b2f1dd9bd6d9a3192f748ca8a0bd0604 | ecwolf/Programming | /Python/Nandana_sreeraj_roman_numerals.py | 1,065 | no_license | [] | 3.421875 | 3 | UTF-8 |
python | 200 | 14 | false | 110 | 68 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 4.9 | 1 | 4 | 20 | false | 0 | 7869651bea3a0e51 | 0 | 0 | 35 | 000013e6a06a0dae1601360ccb63d3fc925ec2d8 | Im-your-hari/Interaction | /server.py | 200 | permissive | [
"MIT"
] | 2.9375 | 3 | UTF-8 |
python | 1,268 | 42 | false | 158 | 103 | 1 | 0 | 0 | 2 | 103 | 0.08123 | 9 | 5.43038 | 0 | 9 | 20 | false | 0 | 51b66c3161dfaef6 | 1 | 1 | 36 | 000014dddaf42e4560e3b693725a4cc9ec94c333 | a1ip/CheckiO-7 | /pigeons.py | 1,268 | no_license | [] | 4.0625 | 4 | UTF-8 |
python | 3,489 | 108 | false | 397 | 267 | 1 | 0 | 0 | 57 | 2,275 | 0.652049 | 14 | 6.896725 | 1 | 4 | 69 | false | 0 | 61b82d56e87ac858 | 1 | 1 | 37 | 0000157137bdb8065f937bbcdc068494e71dc78a | omiq17/py | /HackerRank/others/hr_recursion2.py | 3,489 | no_license | [] | 3.71875 | 4 | UTF-8 |
python | 11,484 | 261 | false | 3,396 | 2,372 | 3 | 0 | 0 | 51 | 2,450 | 0.21334 | 15 | 7.492344 | 6 | 59 | 722 | false | 0 | 970a95941cd15d92 | 3 | 3 | 38 | 000017d108e2143870e299296ed728fc955d6ca6 | ubc-vision-lab/ShapeTapper-Analysis | /generate_figures.py | 11,478 | no_license | [] | 2.640625 | 3 | UTF-8 |
python | 3,387 | 122 | false | 1,416 | 924 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4.575565 | 5 | 42 | 302 | false | 0 | 4de7acd59408d5ee | 0 | 0 | 39 | 0000199a02c287fda2a79dbcd3c1e70b71770ff2 | alejandrovareladopico/OCR-for-time-dependent-measurements | /Code/Previsualization.py | 3,387 | no_license | [] | 2.734375 | 3 | UTF-8 |
python | 5,248 | 142 | false | 1,124 | 731 | 0 | 8 | 1 | 20 | 640 | 0.121951 | 21 | 9.075623 | 1 | 7 | 272 | true | 7 | 69af746bfeea4d43 | 9 | 9 | 40 | 00001b138bb82a4cf552b88e3675a57e268e7fde | arkssss/machine_learning | /A1_decision_tree/dc_tree.py | 5,248 | no_license | [] | 3.453125 | 3 | UTF-8 |
python | 3,208 | 113 | false | 1,051 | 675 | 3 | 0 | 0 | 1 | 30 | 0.009352 | 13 | 6.170314 | 4 | 21 | 223 | true | 1 | d301b3de2f5baef0 | 3 | 3 | 41 | 00001bb16c629430ae7e395c6553912fa7851224 | simvisage/spirrid | /examples/masked_arrays/mask_arr_expl.py | 3,208 | no_license | [] | 3.390625 | 3 | UTF-8 |
python | 1,776 | 45 | false | 270 | 188 | 0 | 0 | 0 | 9 | 629 | 0.354167 | 17 | 6.440741 | 0 | 8 | 41 | false | 0 | 95056afab8db2e28 | 0 | 0 | 42 | 00001dc1228386527830daff4c0f2eda19d16127 | 09o/ProgrammingBasis | /auto-decryption.py | 1,776 | no_license | [] | 2.96875 | 3 | UTF-8 |
python | 1,101 | 54 | false | 363 | 246 | 0 | 0 | 0 | 12 | 277 | 0.251589 | 11 | 4.534435 | 4 | 6 | 82 | false | 0 | dd84b235f49e7c05 | 0 | 0 | 43 | 00002058da6a6a07d9d0a4fbe3a7690b8d616191 | errnox/some-python-things | /headlines-analyzer/analyzer | 1,101 | no_license | [] | 3.296875 | 3 | UTF-8 |
python | 2,622 | 97 | false | 1,114 | 752 | 1 | 8 | 4 | 3 | 66 | 0.025172 | 17 | 7.842908 | 4 | 6 | 252 | true | 1 | cf3d0fefb12a4292 | 13 | 13 | 44 | 000020898e2b4f7406a4e5833d88b65d95d2729d | DavidQiuChao/Deformable-Kernels-For-Video-Denoising | /modules/lossFunc.py | 2,622 | no_license | [] | 2.75 | 3 | UTF-8 |
python | 236 | 16 | false | 46 | 31 | 0 | 0 | 0 | 8 | 181 | 0.766949 | 7 | 3.630435 | 0 | 0 | 10 | false | 0 | 29649ce8f1a999c2 | 0 | 0 | 45 | 000022b71772497bdbc527afafde82aa74e085cb | li-mo-feng/Python | /PythonProjects/算法学习/斐波那契数列.py | 236 | no_license | [] | 3.53125 | 4 | UTF-8 |
python | 820 | 41 | false | 378 | 251 | 1 | 0 | 0 | 4 | 109 | 0.132927 | 7 | 4.296296 | 4 | 27 | 49 | false | 0 | 4e8c9385a71755e2 | 1 | 1 | 46 | 00002315dd973c8462bd14d66437ea87dcb5b74a | awaisniaz/Data_Structure_practice | /defaultDict.py | 808 | no_license | [] | 3.71875 | 4 | UTF-8 |
python | 416 | 15 | false | 92 | 60 | 1 | 0 | 0 | 0 | 0 | 0 | 10 | 5.804348 | 0 | 1 | 23 | false | 0 | 9f2e5a5fd595110a | 1 | 1 | 47 | 0000237871e5f739964650690f31091fdb3690e8 | Xw-Jia/2019_SaveYourself_GetOffer | /Leetcode/数组/Easy_01_888_FairCandySwap.py | 416 | permissive | [
"MIT"
] | 3.015625 | 3 | UTF-8 |
python | 5,177 | 198 | false | 1,873 | 1,238 | 25 | 0 | 0 | 0 | 0 | 0 | 11 | 4.662573 | 1 | 38 | 480 | false | 0 | 45008e98e516c720 | 25 | 14 | 48 | 00002408ac7f789997d6d42a90d4e71767a80102 | hunter10/Python_Minesweeper_Test | /myArtApp.py | 5,177 | no_license | [] | 2.96875 | 3 | UTF-8 |
python | 2,170 | 74 | false | 585 | 366 | 3 | 0 | 0 | 5 | 63 | 0.029032 | 12 | 6.162393 | 5 | 25 | 120 | true | 3 | ea2e822c2b7513f0 | 3 | 3 | 49 | 00002562558048516d143bd04597f85a3ef4a4d6 | sjmignot/sceance | /sceance/update_watchlist.py | 2,172 | permissive | [
"MIT"
] | 2.6875 | 3 | UTF-8 |
python | 1,011 | 41 | false | 237 | 157 | 0 | 6 | 1 | 0 | 0 | 0 | 10 | 5.383966 | 4 | 3 | 62 | true | 1 | 2d239ebfede6af95 | 7 | 6 | 50 | 000025f62a9ead342bcfba348eae943d97d18b05 | vahndi/probability | /probability/distributions/continuous/continuous_data.py | 1,011 | permissive | [
"MIT"
] | 2.78125 | 3 | UTF-8 |
python | 8,293 | 219 | false | 1,591 | 1,018 | 1 | 13 | 1 | 14 | 609 | 0.073435 | 21 | 10.701446 | 11 | 41 | 345 | true | 2 | 16336182ac427592 | 15 | 11 | 51 | 0000262ed1ec02d8e2bc6d694e0c63411e81a778 | amar3142/scraping_scripts | /telangana_scrape/telangana_scrape.py | 8,293 | no_license | [] | 2.59375 | 3 | UTF-8 |
python | 1,511 | 31 | false | 159 | 106 | 0 | 0 | 0 | 13 | 978 | 0.647253 | 11 | 4.603774 | 0 | 15 | 14 | false | 0 | b1e1375ce8ea806f | 0 | 0 | 52 | 000026ddab4d83292c7a4343944106942b11221a | RandyHodges/Self-Study | /Python/Lists/abbreviations.py | 1,511 | no_license | [] | 4.46875 | 4 | UTF-8 |
python | 6,824 | 168 | false | 1,378 | 895 | 0 | 10 | 1 | 0 | 0 | 0 | 19 | 8.541364 | 4 | 58 | 283 | true | 6 | e719b54c0c8039bc | 11 | 9 | 53 | 000027e9885850374766613376d68607d8b9dfc1 | FeatureToggleStudy/file-repository | /client/bahub/bahubapp/handler/abstractdocker.py | 6,824 | permissive | [
"Apache-2.0"
] | 2.6875 | 3 | UTF-8 |
python | 1,432 | 42 | false | 527 | 348 | 0 | 3 | 1 | 11 | 180 | 0.125698 | 14 | 7.914611 | 4 | 2 | 115 | false | 0 | 7bdc1ef26a2d5aa4 | 4 | 4 | 54 | 000027f1356c67ae9c383bc451a91a0ac8a25fc4 | METASHONGKONG/ESP8266-Python | /2. Python/si7021.py | 1,432 | no_license | [] | 2.71875 | 3 | UTF-8 |
python | 2,392 | 65 | false | 852 | 578 | 1 | 0 | 0 | 5 | 169 | 0.070652 | 13 | 7.435446 | 3 | 10 | 211 | false | 0 | 83ca586db244b5cb | 1 | 1 | 55 | 000028a94219e9c80c0836478bdf2833aa5e4b6e | martinmongi/thesis | /src/student_assignment.py | 2,392 | no_license | [] | 2.546875 | 3 | UTF-8 |
python | 221 | 16 | false | 97 | 60 | 0 | 0 | 0 | 1 | 23 | 0.104072 | 5 | 3.43299 | 1 | 1 | 18 | false | 0 | cfc329af167f5a17 | 0 | 0 | 56 | 000028e57853f0bd21373f4d5c13fb706868a007 | TugceDinc/Artificial-Intelligence | /8-Puzzle problem; BFS and GBFS/untitled2.py | 221 | no_license | [] | 2.9375 | 3 | UTF-8 |
python | 978 | 39 | false | 399 | 253 | 3 | 0 | 0 | 0 | 0 | 0 | 9 | 5.408521 | 4 | 12 | 80 | false | 0 | f2c57ce01853f03e | 3 | 3 | 57 | 0000291bc8cded4ad2e2a0a78174f7686f4c4ba9 | gowthamdongari/fsdse-python-assignment-506 | /build.py | 978 | no_license | [] | 3.4375 | 3 | UTF-8 |
python | 839 | 36 | false | 172 | 116 | 2 | 0 | 0 | 11 | 449 | 0.535161 | 7 | 3.755814 | 3 | 2 | 38 | false | 0 | 204a5badbe987a2b | 2 | 2 | 58 | 0000295f514d43266dc1a12604e20c1e47e21682 | pdefusco/dask_distributed_quickstart_cml | /utils/dask-workers/example/dask-worker-demo.py | 839 | no_license | [] | 2.796875 | 3 | UTF-8 |
python | 1,981 | 71 | false | 640 | 400 | 1 | 2 | 1 | 2 | 101 | 0.050984 | 16 | 7.375 | 5 | 15 | 136 | false | 0 | a11e1a600ba0a4c9 | 4 | 4 | 59 | 000029f8d7ad29767acafadf83daa2399c359ed5 | TETRX/local-dns-dump | /hosts/hosts_daemon.py | 1,981 | no_license | [] | 2.71875 | 3 | UTF-8 |
python | 1,093 | 43 | false | 433 | 284 | 3 | 0 | 0 | 0 | 0 | 0 | 13 | 6.517321 | 4 | 2 | 103 | false | 0 | 45fc330622fbfc8d | 3 | 3 | 60 | 00002a5b77c9232c2997e1fdc0e9396c3e26191c | EduardaAChagas/questoes-hackerrank | /fradulent.py | 1,093 | no_license | [] | 3.234375 | 3 | UTF-8 |
python | 2,091 | 86 | false | 712 | 465 | 1 | 0 | 0 | 22 | 667 | 0.318986 | 12 | 5.324438 | 6 | 27 | 130 | false | 0 | 54c3ad11918008cb | 1 | 1 | 61 | 00002a7192a48b12e5f485ba75f5491d100053c1 | myqpalzm147/sebuah-aplikasi-streamlit | /sebuah-aplikasi-streamlit.py | 2,088 | no_license | [] | 2.90625 | 3 | UTF-8 |
python | 4,276 | 121 | false | 1,222 | 810 | 0 | 7 | 2 | 1 | 22 | 0.005145 | 17 | 9.189034 | 3 | 56 | 231 | true | 3 | 7fa013d0e0d5f239 | 9 | 9 | 62 | 00002b14beab12e013973d83fbf316b7348dab78 | OMA-Devs/Binance-cluster | /LEGACY1305/client/masterRequests.py | 4,276 | no_license | [] | 2.875 | 3 | UTF-8 |
python | 820 | 41 | false | 313 | 200 | 1 | 2 | 1 | 0 | 0 | 0 | 14 | 6.399361 | 2 | 7 | 69 | false | 0 | 4545743220882c10 | 4 | 4 | 63 | 00002bb3cbf66526430913118dc9c52265df17ee | aks97cs/parallel_programming_solution | /thread_in_subclass.py | 820 | no_license | [] | 3.53125 | 4 | UTF-8 |
python | 990 | 51 | false | 438 | 291 | 6 | 0 | 0 | 4 | 63 | 0.063636 | 12 | 4.842466 | 5 | 2 | 83 | false | 0 | 64c201238597f289 | 6 | 6 | 64 | 00002c6ef426b28ef7a5db1a187b7cc3bff82eb6 | lpinilla/SIA_TP5 | /pruebas/multilayer_test.py | 990 | no_license | [] | 2.765625 | 3 | UTF-8 |
python | 2,852 | 87 | false | 752 | 536 | 4 | 0 | 0 | 8 | 261 | 0.091515 | 13 | 6.06383 | 1 | 19 | 178 | true | 1 | e4a1647e49573f8b | 4 | 4 | 65 | 00002cadc03da8f74ca9170df13f54e355dfc312 | jefferyUstc/Captcha-Identifier | /mymodel.py | 2,852 | permissive | [
"MIT"
] | 2.796875 | 3 | UTF-8 |
python | 2,381 | 99 | false | 910 | 583 | 1 | 3 | 1 | 0 | 0 | 0 | 15 | 7.486813 | 2 | 20 | 185 | false | 0 | 3f565775b7a673e2 | 5 | 5 | 66 | 00002ccad41703175b59a627b67712e4a3ecef0a | Latiyan/py-turtle | /app.py | 2,381 | no_license | [] | 3.65625 | 4 | UTF-8 |
python | 26,454 | 687 | false | 7,480 | 5,016 | 0 | 13 | 1 | 115 | 5,029 | 0.190104 | 24 | 11.591711 | 3 | 16 | 1,525 | false | 0 | 4750825302282edc | 14 | 14 | 67 | 00002cfabde624e1c540bc8f1856bfcb35d448c8 | fiberpaper/NEAT-world | /Maze.py | 26,454 | no_license | [] | 3.484375 | 3 | UTF-8 |
python | 10,112 | 325 | false | 659 | 435 | 3 | 0 | 0 | 14 | 619 | 0.061214 | 15 | 6.400607 | 4 | 8 | 156 | true | 3 | f38bff01b5066b51 | 3 | 3 | 68 | 00002dba06673581cad267204ee0f8dda8b365bd | tZ3ma/tessif-phd | /src/tessif/identify/timeframes.py | 10,112 | permissive | [
"MIT"
] | 3.390625 | 3 | UTF-8 |
python | 408 | 16 | false | 131 | 82 | 2 | 0 | 0 | 0 | 0 | 0 | 9 | 5.328244 | 2 | 2 | 32 | false | 0 | 3b484727583481f3 | 2 | 2 | 69 | 00002f077beb8f05511989847045a7570c8ceb86 | techie-shashank/Posist-problem | /security.py | 408 | no_license | [] | 2.984375 | 3 | UTF-8 |
python | 2,554 | 76 | false | 305 | 217 | 2 | 0 | 0 | 34 | 1,743 | 0.682459 | 14 | 6.491803 | 0 | 0 | 56 | false | 0 | 9d303f5cb347835b | 2 | 2 | 70 | 00002ff8117de98b4e9e530b7d39f6070d5238b6 | WillSchick/LeetCode-Solutions | /Array/searchInRotatedSortedArray.py | 2,549 | no_license | [] | 4.59375 | 5 | UTF-8 |
python | 814 | 30 | false | 311 | 204 | 0 | 1 | 1 | 1 | 19 | 0.023342 | 17 | 9.819936 | 0 | 1 | 73 | false | 0 | 0cf998ce7dcb6eda | 2 | 2 | 71 | 000030b0d004950c490d183df9020c5fcbd59efe | weihsuanchou/algorithm_py | /floodFill.py | 814 | permissive | [
"MIT"
] | 3.234375 | 3 | UTF-8 |
python | 1,735 | 50 | false | 652 | 436 | 0 | 0 | 0 | 8 | 261 | 0.150432 | 11 | 4.541411 | 6 | 28 | 136 | false | 0 | 156b73bc1b1b6054 | 0 | 0 | 72 | 000031798626a8cd2f475b3f426626c606fad0a5 | elonag/permafrostanalytics | /scripts/dv1.py | 1,735 | permissive | [
"MIT"
] | 2.6875 | 3 | UTF-8 |
python | 1,900 | 66 | false | 574 | 382 | 0 | 2 | 2 | 1 | 33 | 0.017368 | 22 | 12.174216 | 0 | 6 | 122 | false | 0 | e4cfe4a45d0ee7f2 | 4 | 4 | 73 | 0000322530cc38e7311ed63aaaa7b515365c01d9 | nebel-dev/leetcode | /Maximal Square.py | 1,900 | no_license | [] | 3.578125 | 4 | UTF-8 |
python | 57,679 | 1,392 | false | 10,661 | 6,931 | 5 | 52 | 3 | 72 | 2,588 | 0.044869 | 22 | 9.352125 | 14 | 133 | 2,550 | true | 41 | 29e67c426d3c0ecc | 60 | 53 | 74 | 0000325dffb1583c9d58e5d7669a7079a3d6f177 | bm2-lab/scMVP | /scMVP/dataset/dataset.py | 57,679 | permissive | [
"MIT"
] | 2.71875 | 3 | UTF-8 |
python | 6,065 | 240 | false | 1,543 | 1,031 | 17 | 3 | 1 | 13 | 380 | 0.062655 | 17 | 8.23396 | 4 | 32 | 336 | true | 11 | 1753b9f2a2a2379b | 21 | 21 | 75 | 00003279a89bf73ef70731fea773a759e96016eb | ArthurBernard/Fynance | /fynance/_wrappers.py | 6,045 | permissive | [
"MIT"
] | 2.828125 | 3 | UTF-8 |
python | 7,000 | 214 | false | 1,290 | 849 | 0 | 10 | 3 | 19 | 756 | 0.108 | 15 | 8.375969 | 2 | 59 | 247 | true | 13 | c43cdced756d5955 | 13 | 12 | 76 | 000032e195fe223ff06827fa1a055657e90ae30c | mellena1/Clair_Local_Multi-Image_Scanner | /docker_scan/image_scan.py | 7,000 | no_license | [] | 3.15625 | 3 | UTF-8 |
python | 325 | 11 | false | 120 | 79 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 5.325 | 0 | 4 | 19 | false | 0 | b3718f76ce7ad36e | 0 | 0 | 77 | 0000349216d1eb1b6bbfc445a0dbff4b90a3c7d3 | farrellmochammad/ar_training | /algorithm/soal4/main.py | 325 | no_license | [] | 3.609375 | 4 | UTF-8 |
python | 3,043 | 95 | false | 1,023 | 665 | 4 | 0 | 0 | 0 | 0 | 0 | 25 | 9.435973 | 9 | 27 | 229 | false | 0 | 20c3c7227a1b5b12 | 4 | 4 | 78 | 00003631a2b6a89d9426080234a53d6867e6f854 | eitamar-saraf/Transformer-OCR | /preparation/crop_words_from_oxford.py | 3,043 | permissive | [
"MIT"
] | 2.609375 | 3 | UTF-8 |
python | 1,450 | 65 | false | 462 | 307 | 5 | 0 | 0 | 7 | 167 | 0.115172 | 10 | 5.145022 | 7 | 4 | 95 | false | 0 | bfdc1d72d44c5ed8 | 5 | 5 | 79 | 00003756cb18155884835b12675817d5f6f994e7 | oanaucs/rs2 | /ex5/ex5_2.py | 1,450 | no_license | [] | 2.65625 | 3 | UTF-8 |
python | 3,704 | 135 | false | 1,500 | 976 | 3 | 4 | 2 | 0 | 0 | 0 | 24 | 8.82 | 1 | 2 | 331 | false | 0 | 50738a623877618b | 9 | 9 | 80 | 000038af5184a8e780a1effda6cf927538be96cf | letsgetcooking/Sketches | /processing/2016/starfish.py | 3,704 | no_license | [] | 2.921875 | 3 | UTF-8 |
python | 2,854 | 76 | false | 613 | 394 | 2 | 0 | 0 | 19 | 1,366 | 0.478626 | 16 | 6.203915 | 5 | 17 | 120 | false | 0 | 8546279060f9c501 | 2 | 2 | 81 | 00003951b93c6f6b7b08e547cbfc3112fc8437a9 | cyberphone/json-canonicalization | /python3/test/verify-canonicalization.py | 2,854 | permissive | [
"Apache-2.0"
] | 2.515625 | 3 | UTF-8 |
python | 4,270 | 117 | false | 1,083 | 718 | 0 | 0 | 0 | 30 | 1,042 | 0.244028 | 17 | 6.350877 | 3 | 48 | 167 | false | 0 | 19de0d3e5a265b1a | 0 | 0 | 82 | 0000395911f5911cf2384c426d362e29fa9283bf | bsccodejam2018/bsc-code-jam-2018 | /03-CoinJam/Python/Daniel/CoinJam.py | 4,270 | no_license | [] | 3.1875 | 3 | UTF-8 |
python | 2,115 | 74 | false | 344 | 224 | 2 | 2 | 1 | 1 | 37 | 0.017494 | 10 | 5.738372 | 2 | 8 | 89 | true | 4 | d9c2a9f9aeb58be2 | 5 | 5 | 83 | 00003be3e13754cb8e48a66c1e6f556a79c31d04 | christophebedard/email2pr | /email2pr/github.py | 2,115 | no_license | [] | 3.1875 | 3 | UTF-8 |
python | 2,771 | 95 | false | 810 | 517 | 7 | 0 | 0 | 14 | 507 | 0.182966 | 20 | 8.62716 | 1 | 36 | 151 | false | 0 | 595d5d2e65fde0c2 | 7 | 7 | 84 | 00003bf6422f9823f16cfccc2297cc430dddd4f2 | Allen1218/Initial_pythonProject | /Convert.py | 2,771 | no_license | [] | 2.734375 | 3 | UTF-8 |
python | 475 | 16 | false | 181 | 117 | 1 | 0 | 0 | 0 | 0 | 0 | 11 | 5.640884 | 1 | 2 | 39 | false | 0 | d46d8858258dde15 | 1 | 1 | 85 | 00003c2229ca94af7649a0a0359dccad0f3ad499 | yilmaliz/Algorithms | /algorithms/python/sorting_algorithms/insertion_sort.py | 475 | no_license | [] | 3.71875 | 4 | UTF-8 |
python | 1,576 | 45 | false | 353 | 235 | 7 | 0 | 0 | 17 | 531 | 0.336929 | 15 | 8.124646 | 1 | 11 | 67 | false | 0 | 1ecc441e9b5d5eac | 7 | 7 | 86 | 00003c3059e875b010cb88902bba7bc8eb72143f | KingJunNet/king_pro | /core/log.py | 1,576 | no_license | [] | 2.640625 | 3 | UTF-8 |
python | 612 | 21 | false | 212 | 139 | 0 | 2 | 1 | 0 | 0 | 0 | 11 | 5.886792 | 3 | 2 | 54 | false | 0 | af12e054ff5c308d | 3 | 3 | 87 | 00003cf46a7d8250ff5b5a02a7a500abcdb8831b | piperck/medivac | /fuel/models/user.py | 612 | no_license | [] | 2.546875 | 3 | UTF-8 |
python | 1,240 | 43 | false | 470 | 289 | 1 | 0 | 0 | 1 | 18 | 0.014516 | 15 | 8.502128 | 2 | 15 | 90 | true | 1 | 5de056e16c748f22 | 1 | 1 | 88 | 00003d562e1b44b830be85921a5acec9a251d6b8 | matt969696/holbertonschool-higher_level_programming | /0x0B-python-input_output/read_write_heap.py | 1,240 | no_license | [] | 3 | 3 | UTF-8 |
python | 5,169 | 167 | false | 1,063 | 695 | 4 | 0 | 0 | 2 | 93 | 0.017992 | 13 | 7.419567 | 9 | 34 | 226 | true | 4 | d7817c93f30329c3 | 4 | 4 | 89 | 00003d5f622ca11adf5dd8f26db9e523e3ce8d47 | OdysseyMomentum/Cryptomice-Eonpeers | /app/main/util/tasks.py | 5,169 | permissive | [
"MIT"
] | 2.546875 | 3 | UTF-8 |
python | 421 | 22 | false | 172 | 105 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 5.75 | 2 | 2 | 38 | false | 0 | 7787e738bc5e5c58 | 0 | 0 | 90 | 00003dc3d3623827327f5bc9d343093104c986e1 | niklasbae/adventOfCode | /2019/day1/2/run.py | 421 | no_license | [] | 3.375 | 3 | UTF-8 |
python | 985 | 26 | false | 356 | 237 | 1 | 0 | 0 | 0 | 0 | 0 | 16 | 8.008427 | 0 | 21 | 56 | false | 0 | 38cdd831aac909c8 | 1 | 1 | 91 | 00003f749f36328d9b5ff2bcfa1bf27a6bed84e1 | aptran/python-kata | /word_segments.py | 985 | no_license | [] | 3.265625 | 3 | UTF-8 |
python | 4,054 | 133 | false | 859 | 551 | 5 | 0 | 0 | 6 | 320 | 0.078934 | 14 | 6.582072 | 9 | 47 | 155 | true | 5 | 8819358fac2739a0 | 5 | 5 | 92 | 00003fab2718543ac46362b9cb1028972f9863f6 | newmediadenver/timesheet_hook | /post-commit | 4,054 | no_license | [] | 2.859375 | 3 | UTF-8 |
python | 859 | 43 | false | 290 | 197 | 0 | 0 | 0 | 6 | 159 | 0.185099 | 12 | 5.748276 | 0 | 6 | 49 | false | 0 | 5726da5cfb8fdda8 | 0 | 0 | 93 | 00004101b043faa74c5d8e732d69173a737da0b1 | djrrb/Python-for-Visual-Designer-Summer-2021 | /session-3/extras/package-demo/mySillyTool/main.py | 859 | no_license | [] | 2.90625 | 3 | UTF-8 |
python | 286 | 14 | false | 112 | 72 | 0 | 0 | 0 | 1 | 23 | 0.08042 | 10 | 5.375 | 0 | 7 | 16 | false | 0 | 5bcbcaa8806470ac | 0 | 0 | 94 | 0000423f9a99dd0f48d4ed9d07790a41380fa81c | Matos-V/exercicios_python | /code/desafio051.py | 286 | no_license | [] | 3.40625 | 3 | UTF-8 |
python | 9,549 | 270 | false | 2,719 | 1,852 | 11 | 4 | 1 | 32 | 870 | 0.091109 | 17 | 6.955131 | 8 | 53 | 639 | true | 15 | 6f71da96999ba18a | 16 | 16 | 95 | 0000426e110efd1138c47f49954a4a684c3ddd38 | kirilenkobm/pixelartor | /main.py | 9,549 | permissive | [
"MIT"
] | 2.65625 | 3 | UTF-8 |
python | 2,483 | 105 | false | 473 | 310 | 4 | 0 | 0 | 7 | 317 | 0.127668 | 11 | 5.530655 | 3 | 5 | 114 | true | 4 | 433613860d4ae2ec | 4 | 4 | 96 | 000042ed04a68bd3c393247c478922b02eb1ac0d | vworakun/Python-for-Data-Science-ece20875 | /hmwk3/problem1.py | 2,483 | no_license | [] | 3.3125 | 3 | UTF-8 |
python | 544 | 27 | false | 323 | 205 | 0 | 0 | 0 | 1 | 10 | 0.018382 | 13 | 6.668731 | 0 | 2 | 69 | false | 0 | 5e76949b4409346c | 0 | 0 | 97 | 0000446f88626334b8cbe1590ae59aad9775955a | suganoo/algorithm_and_data_structure_for_procon | /abc235_c.py | 544 | no_license | [] | 2.625 | 3 | UTF-8 |
python | 1,685 | 59 | false | 287 | 189 | 2 | 0 | 0 | 18 | 742 | 0.440356 | 12 | 5.84669 | 1 | 1 | 60 | false | 0 | 4be432f06ef8c4cd | 2 | 2 | 98 | 000044863686781c9dad45390fdf67b269f5c6c4 | Wrexie/EE381_Assignments | /Lab2/lab_2_problem_3.py | 1,685 | no_license | [] | 3.984375 | 4 | UTF-8 |
python | 799 | 23 | false | 126 | 83 | 0 | 1 | 1 | 6 | 337 | 0.421777 | 16 | 9.277778 | 0 | 0 | 31 | false | 0 | c958cdfe7fcd7c98 | 2 | 2 | 99 | 000044bbf927add5cf5e8899ccf22112e84138d0 | toad0475/Algorithm_Greenhorns | /toad0475/Add_Digits(Recursion).py | 799 | no_license | [] | 3.4375 | 3 | UTF-8 |
SWHForest (v0.2.0)
SWHForest lets you filter, search by AST structure, and detect clones across 52.1M files (340.6M functions/classes in the 10 largest languages of HuggingFaceTB/stack-edu, revision eeec5ca) before downloading source code from the Software Heritage Archive (SWH).
No source text is included. Every row is keyed by blob_id (sha1_git); surviving candidate files are fetched on demand from https://softwareheritage.s3.amazonaws.com/content/<blob_id>.
- Code, CLI & Python package: https://github.com/halykoss/swhforest
- Column-level schema:
SCHEMA.md
Download & Install
Clone the code repository and pull either the lightweight 100k Python/JS benchmark sample (catalog/, ~88 MB) or any language release (data/release/<lang>/):
git clone https://github.com/halykoss/swhforest.git && cd swhforest
pip install -r requirements.txt && pip install -e ".[all-languages,dev]"
# Download the 100k sample or one language release into the repository
hf download halykoss/swhforest --repo-type dataset --include "catalog/*" --local-dir .
hf download halykoss/swhforest --repo-type dataset --include "data/release/rust/*" --local-dir .
Quick Examples
1. Search by AST Pattern (swhforest.search + ast-grep)
Single-relation patterns (exact=True) are answered directly by the local index with 0 downloads; multi-part patterns prune the corpus locally and verify surviving candidates with ast-grep.
import swhforest
from swhforest import Pattern
# A) Single-block query -> exact answer from the local index (0 files downloaded)
p_exact = Pattern(type="function_item", contains=Pattern(type="unsafe_block"))
res = swhforest.search("data/release/rust", p_exact, language="rust")
print(res["exact"], res["n_candidates"]) # True, 29527
# B) Multi-block query -> local index pruning + live SWH fetch + ast-grep verification
call_clone = Pattern(type="call_expression", fields={
"function": Pattern(type="field_expression", fields={
"field": Pattern(type="field_identifier", text="clone")
})
})
p_loop = Pattern(type="for_expression", contains=call_clone)
res = swhforest.search("data/release/rust", p_loop, language="rust", verify_limit=10)
print(res["n_candidates"], len(res["verified_blob_ids"]))
2. Find Renamed Clones & Screen Benchmarks (swhforest.find_clones)
Every function, method, and class has a 64-bit rename-invariant AST Merkle hash (shape). Pass any snippet (e.g., a HumanEval/MBPP solution) to find structurally identical definitions across the corpus and slice their bytes directly from SWH:
import swhforest
code = """
def has_close_elements(numbers, threshold):
for idx, elem in enumerate(numbers):
for idx2, elem2 in enumerate(numbers):
if idx != idx2:
if abs(elem - elem2) < threshold:
return True
return False
"""
matches = swhforest.find_clones("data/release/python", code, language="python", min_nodes=20, limit=5)
for m in matches:
print(f"{m['repo']}:{m['path']} -> blob {m['blob_id']} [{m['start_byte']}:{m['end_byte']}]")
print(swhforest.slice_definition(m["blob_id"], m["start_byte"], m["end_byte"]))
3. Curate Subsets & Export a Reproducible View (swhforest.curate_view)
Filter files by their 17 syntactic metrics in catalog.parquet (file size, docstrings, function/class counts, AST depth, parse errors) and export a JSON manifest (blob_id list + SHA-256 checksum):
import swhforest
view = swhforest.curate_view(
"data/release/python",
where="bytes > 10000 AND has_docstring = true AND (n_functions + n_methods) >= 5",
out_manifest="curated_python.json",
)
print(f"{view['n_blobs']:,} files ({view['total_bytes'] / 1e9:.2f} GB) | SHA-256: {view['blob_ids_sha256'][:16]}...")
assert swhforest.verify_view("data/release/rust", "data/release/rust/view_release.json")
Remote Parquet Queries: You can also query the Parquet tables directly on Hugging Face without downloading them first:
import duckdb duckdb.sql(""" SELECT count(*), sum(bytes) FROM 'hf://datasets/halykoss/swhforest/data/release/python/catalog.parquet' WHERE bytes > 10000 AND has_docstring AND (n_functions + n_methods) >= 5 """).show()
Dataset Layout & Summary (v0.2.0)
Deterministic 40% SHA-1 prefix sample (blob_id < 66666666) of deduplicated 200 B–200 kB files across the 10 largest languages in Stack-Edu:
data/release/<language>/ python, javascript, java, cpp, csharp, php, c, typescript, go, rust
rows.parquet 1 row per unique blob_id: row id, blob_id, representative repo/path/license/edu_score
catalog.parquet 1 row per file: 17 syntactic metrics (AST size/depth, docstrings, definitions, imports)
functions.parquet 1 row per function/method/class: byte span [start_byte, end_byte], nodes, 64-bit shape hash
shapes.parquet 1 row per (kind, shape) cluster: count, mean_nodes, sample blob_id[start:end]
structure-<k>.parquet inverted AST feature index shards (2M files each)
view_release.json reproducible view manifest (predicate, pinned parser versions, SHA-256 checksum)
selection.json, ingest_metrics.json, missing.txt
catalog/ 100k Python/JavaScript benchmark sample (used by examples 01-03)
| Language | Files (blob_id) |
Definitions | Source Text (Not Stored) | Tables (GB) | Index (GB) |
|---|---|---|---|---|---|
| Java | 17,429,408 | 135,578,481 | 53.94 GB | 6.15 | 7.52 |
| Python | 9,481,411 | 43,406,601 | 27.10 GB | 2.82 | 3.16 |
| C++ | 6,453,978 | 39,997,408 | 17.31 GB | 2.25 | 2.71 |
| JavaScript | 5,173,711 | 39,520,638 | 13.77 GB | 2.04 | 1.77 |
| C# | 4,560,555 | 30,471,416 | 13.74 GB | 1.65 | 1.81 |
| PHP | 3,904,782 | 20,813,360 | 11.24 GB | 1.17 | 0.86 |
| C | 2,266,959 | 8,370,541 | 6.21 GB | 0.64 | 0.74 |
| TypeScript | 1,673,249 | 12,517,615 | 3.85 GB | 0.66 | 0.66 |
| Go | 752,530 | 4,823,599 | 1.84 GB | 0.26 | 0.26 |
| Rust | 448,639 | 5,149,143 | 2.12 GB | 0.23 | 0.29 |
| Total | 52,145,222 | 340,648,802 | 151.12 GB | 17.87 | 19.77 |
Authors, License & Citation
- Authors: Federico Pennino, Andrea Gurioli, Maurizio Gabbrielli (University of Bologna), and Paolo Ferragina (Sant'Anna School of Advanced Studies, Pisa).
- Dataset tables, index & manifests: CC-BY-4.0 · Code: MIT (
halykoss/swhforest) · Source blobs: fetched on demand from Software Heritage under their original upstream licenses. - Opt-out and takedowns: SWHForest follows upstream removals from The Stack v2 / Stack-Edu and Software Heritage; withdrawn
blob_ids are dropped in subsequent releases.
@misc{pennino2026swhforest,
author = {Pennino, Federico and Gurioli, Andrea and Gabbrielli, Maurizio and Ferragina, Paolo},
title = {{SWHForest}: A Structural Curation and Search Layer for Large-Scale Code Corpora},
year = {2026},
eprint = {2611.11439},
archivePrefix = {arXiv},
primaryClass = {cs.SE},
url = {https://arxiv.org/abs/2611.11439}
}
- Downloads last month
- 106