hexsha string | size int64 | ext string | lang string | max_stars_repo_path string | max_stars_repo_name string | max_stars_repo_head_hexsha string | max_stars_repo_licenses list | max_stars_count int64 | max_stars_repo_stars_event_min_datetime string | max_stars_repo_stars_event_max_datetime string | max_issues_repo_path string | max_issues_repo_name string | max_issues_repo_head_hexsha string | max_issues_repo_licenses list | max_issues_count int64 | max_issues_repo_issues_event_min_datetime string | max_issues_repo_issues_event_max_datetime string | max_forks_repo_path string | max_forks_repo_name string | max_forks_repo_head_hexsha string | max_forks_repo_licenses list | max_forks_count int64 | max_forks_repo_forks_event_min_datetime string | max_forks_repo_forks_event_max_datetime string | content string | avg_line_length float64 | max_line_length int64 | alphanum_fraction float64 | qsc_code_num_words_quality_signal int64 | qsc_code_num_chars_quality_signal float64 | qsc_code_mean_word_length_quality_signal float64 | qsc_code_frac_words_unique_quality_signal float64 | qsc_code_frac_chars_top_2grams_quality_signal float64 | qsc_code_frac_chars_top_3grams_quality_signal float64 | qsc_code_frac_chars_top_4grams_quality_signal float64 | qsc_code_frac_chars_dupe_5grams_quality_signal float64 | qsc_code_frac_chars_dupe_6grams_quality_signal float64 | qsc_code_frac_chars_dupe_7grams_quality_signal float64 | qsc_code_frac_chars_dupe_8grams_quality_signal float64 | qsc_code_frac_chars_dupe_9grams_quality_signal float64 | qsc_code_frac_chars_dupe_10grams_quality_signal float64 | qsc_code_frac_chars_replacement_symbols_quality_signal float64 | qsc_code_frac_chars_digital_quality_signal float64 | qsc_code_frac_chars_whitespace_quality_signal float64 | qsc_code_size_file_byte_quality_signal float64 | qsc_code_num_lines_quality_signal float64 | qsc_code_num_chars_line_max_quality_signal float64 | qsc_code_num_chars_line_mean_quality_signal float64 | qsc_code_frac_chars_alphabet_quality_signal float64 | qsc_code_frac_chars_comments_quality_signal float64 | qsc_code_cate_xml_start_quality_signal float64 | qsc_code_frac_lines_dupe_lines_quality_signal float64 | qsc_code_cate_autogen_quality_signal float64 | qsc_code_frac_lines_long_string_quality_signal float64 | qsc_code_frac_chars_string_length_quality_signal float64 | qsc_code_frac_chars_long_word_length_quality_signal float64 | qsc_code_frac_lines_string_concat_quality_signal float64 | qsc_code_cate_encoded_data_quality_signal float64 | qsc_code_frac_chars_hex_words_quality_signal float64 | qsc_code_frac_lines_prompt_comments_quality_signal float64 | qsc_code_frac_lines_assert_quality_signal float64 | qsc_codepython_cate_ast_quality_signal float64 | qsc_codepython_frac_lines_func_ratio_quality_signal float64 | qsc_codepython_cate_var_zero_quality_signal bool | qsc_codepython_frac_lines_pass_quality_signal float64 | qsc_codepython_frac_lines_import_quality_signal float64 | qsc_codepython_frac_lines_simplefunc_quality_signal float64 | qsc_codepython_score_lines_no_logic_quality_signal float64 | qsc_codepython_frac_lines_print_quality_signal float64 | qsc_code_num_words int64 | qsc_code_num_chars int64 | qsc_code_mean_word_length int64 | qsc_code_frac_words_unique null | qsc_code_frac_chars_top_2grams int64 | qsc_code_frac_chars_top_3grams int64 | qsc_code_frac_chars_top_4grams int64 | qsc_code_frac_chars_dupe_5grams int64 | qsc_code_frac_chars_dupe_6grams int64 | qsc_code_frac_chars_dupe_7grams int64 | qsc_code_frac_chars_dupe_8grams int64 | qsc_code_frac_chars_dupe_9grams int64 | qsc_code_frac_chars_dupe_10grams int64 | qsc_code_frac_chars_replacement_symbols int64 | qsc_code_frac_chars_digital int64 | qsc_code_frac_chars_whitespace int64 | qsc_code_size_file_byte int64 | qsc_code_num_lines int64 | qsc_code_num_chars_line_max int64 | qsc_code_num_chars_line_mean int64 | qsc_code_frac_chars_alphabet int64 | qsc_code_frac_chars_comments int64 | qsc_code_cate_xml_start int64 | qsc_code_frac_lines_dupe_lines int64 | qsc_code_cate_autogen int64 | qsc_code_frac_lines_long_string int64 | qsc_code_frac_chars_string_length int64 | qsc_code_frac_chars_long_word_length int64 | qsc_code_frac_lines_string_concat null | qsc_code_cate_encoded_data int64 | qsc_code_frac_chars_hex_words int64 | qsc_code_frac_lines_prompt_comments int64 | qsc_code_frac_lines_assert int64 | qsc_codepython_cate_ast int64 | qsc_codepython_frac_lines_func_ratio int64 | qsc_codepython_cate_var_zero int64 | qsc_codepython_frac_lines_pass int64 | qsc_codepython_frac_lines_import int64 | qsc_codepython_frac_lines_simplefunc int64 | qsc_codepython_score_lines_no_logic int64 | qsc_codepython_frac_lines_print int64 | effective string | hits int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a2764c0279379f0efa7677e9b610176cee5cd3c2 | 784 | py | Python | oceans/sw_extras/__init__.py | Michelly-GC/python-oceans | 7b0e12a00cd125683e7b89acea0cdd67f7729a43 | [
"BSD-3-Clause"
] | 47 | 2015-05-06T02:00:59.000Z | 2021-12-23T12:16:16.000Z | oceans/sw_extras/__init__.py | Michelly-GC/python-oceans | 7b0e12a00cd125683e7b89acea0cdd67f7729a43 | [
"BSD-3-Clause"
] | 27 | 2015-02-18T14:04:45.000Z | 2022-03-31T15:16:46.000Z | oceans/sw_extras/__init__.py | Michelly-GC/python-oceans | 7b0e12a00cd125683e7b89acea0cdd67f7729a43 | [
"BSD-3-Clause"
] | 34 | 2015-03-01T23:17:39.000Z | 2022-01-18T12:30:48.000Z | from oceans.sw_extras.gamma_GP_from_SP_pt import gamma_GP_from_SP_pt
from oceans.sw_extras.sw_extras import (
N,
cor_beta,
cph,
cr_depth,
inertial_period,
kdpar,
o2sol_SP_pt_benson_krause_84,
photic_depth,
psu2ppt,
richnumb,
shear,
sigma_t,
sigmatheta,
soundspeed,... | 15.68 | 68 | 0.641582 | 102 | 784 | 4.480392 | 0.382353 | 0.043764 | 0.078775 | 0.118162 | 0.785558 | 0.68709 | 0.68709 | 0.68709 | 0.68709 | 0.68709 | 0 | 0.014388 | 0.290816 | 784 | 49 | 69 | 16 | 0.807554 | 0 | 0 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.0625 | 0 | 0.0625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a2768f9535ee17b57f1a1a0e52151e0a5fc5e104 | 75 | py | Python | pbesa/social/poolcontroller/pooltype.py | akenfactory/pbesa | 2ebc731a680f14e0fba85ffef0248eb9ea4bd944 | [
"MIT"
] | 2 | 2020-10-22T22:23:40.000Z | 2021-09-14T01:18:01.000Z | pbesa/social/poolcontroller/pooltype.py | akenfactory/pbesa | 2ebc731a680f14e0fba85ffef0248eb9ea4bd944 | [
"MIT"
] | 2 | 2020-05-27T13:59:42.000Z | 2022-03-02T14:58:12.000Z | pbesa/social/poolcontroller/pooltype.py | akenfactory/pbesa | 2ebc731a680f14e0fba85ffef0248eb9ea4bd944 | [
"MIT"
] | 1 | 2020-05-27T13:50:40.000Z | 2020-05-27T13:50:40.000Z | from enum import Enum
class PoolType(Enum):
BLOCK = 1
NO_BLOCK = 2
| 15 | 21 | 0.666667 | 12 | 75 | 4.083333 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.036364 | 0.266667 | 75 | 4 | 22 | 18.75 | 0.854545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a27c66a69b26589a80d9884f217bed319fab12ce | 399 | py | Python | Students/Zephyr/Exercise 4.py | MikelShifrin/Python1 | 0096a327023a28e0c639042ae01268b07e61943e | [
"MIT"
] | 3 | 2019-07-02T13:46:23.000Z | 2019-08-19T14:41:25.000Z | Students/Zephyr/Exercise 4.py | MikelShifrin/Python1 | 0096a327023a28e0c639042ae01268b07e61943e | [
"MIT"
] | null | null | null | Students/Zephyr/Exercise 4.py | MikelShifrin/Python1 | 0096a327023a28e0c639042ae01268b07e61943e | [
"MIT"
] | null | null | null |
num = int(input('Please enter a number between 1 and 10:\n'))
if num == 1:
print("I")
elif num == 2:
print("II")
elif num == 3:
print("III")
elif num == 4:
print("IV")
elif num == 5:
print("V")
elif num == 6:
print("VI")
elif num == 7:
print("VII")
elif num == 8:
print("VIII")
elif num... | 15.346154 | 61 | 0.518797 | 65 | 399 | 3.184615 | 0.538462 | 0.304348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.04811 | 0.270677 | 399 | 25 | 62 | 15.96 | 0.66323 | 0 | 0 | 0 | 0 | 0 | 0.168342 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.478261 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
a28c7cb3475a2fa28ef305723bf2b98a31312e4f | 1,668 | py | Python | source-code-from-author-book/Chapter7/graphimpl.py | robrac/algorithms-exercises-with-python | 5780171517eacc1c7133fdc32cf079623cd14cf9 | [
"MIT"
] | null | null | null | source-code-from-author-book/Chapter7/graphimpl.py | robrac/algorithms-exercises-with-python | 5780171517eacc1c7133fdc32cf079623cd14cf9 | [
"MIT"
] | null | null | null | source-code-from-author-book/Chapter7/graphimpl.py | robrac/algorithms-exercises-with-python | 5780171517eacc1c7133fdc32cf079623cd14cf9 | [
"MIT"
] | null | null | null | class Vertex:
def __init__(self,key):
self.id = key
self.connectedTo = {}
def addNeighbor(self,nbr,weight=0):
self.connectedTo[nbr] = weight
def __str__(self):
return str(self.id) + ' connectedTo: ' + str([x.id for x in self.connectedTo])
def getConnections(self):
... | 22.24 | 86 | 0.57494 | 235 | 1,668 | 3.995745 | 0.242553 | 0.140575 | 0.059638 | 0.031949 | 0.068158 | 0.068158 | 0.068158 | 0 | 0 | 0 | 0 | 0.027096 | 0.291966 | 1,668 | 74 | 87 | 22.540541 | 0.767993 | 0 | 0 | 0 | 0 | 0 | 0.014988 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.232143 | false | 0 | 0 | 0.125 | 0.446429 | 0.035714 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
a2985550cedf9979ebc2bf5d680906504cc42433 | 882 | py | Python | catalog/migrations/0003_auto_20161222_1344.py | meiordac/eCommerce | 0efce9ebf5ecb55378890445b0bed16c07613121 | [
"MIT"
] | 2 | 2017-01-13T12:39:18.000Z | 2020-05-28T21:27:26.000Z | catalog/migrations/0003_auto_20161222_1344.py | meiordac/eCommerce | 0efce9ebf5ecb55378890445b0bed16c07613121 | [
"MIT"
] | 1 | 2020-05-28T21:31:14.000Z | 2020-05-28T21:31:14.000Z | catalog/migrations/0003_auto_20161222_1344.py | meiordac/eCommerce | 0efce9ebf5ecb55378890445b0bed16c07613121 | [
"MIT"
] | 1 | 2017-10-16T08:30:59.000Z | 2017-10-16T08:30:59.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-22 13:44
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('catalog', '0002_auto_20160228_0141'),
]
operations = [
migrations.AlterFiel... | 28.451613 | 118 | 0.606576 | 93 | 882 | 5.55914 | 0.591398 | 0.116054 | 0.145068 | 0.168279 | 0.232108 | 0.232108 | 0 | 0 | 0 | 0 | 0 | 0.067293 | 0.27551 | 882 | 30 | 119 | 29.4 | 0.741784 | 0.077098 | 0 | 0.391304 | 1 | 0 | 0.159063 | 0.02836 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.086957 | 0 | 0.217391 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a29a183ffb050c4309f21aa6843f70274f7d1fae | 1,837 | py | Python | Plugins/UnrealEnginePython/Content/Scripts/upymodule_importer.py | JustinACoder/H22-GR3-UnrealAI | 361eb9ef1147f8a2991e5f98c4118cd823184adf | [
"MIT"
] | 6 | 2022-02-04T18:12:24.000Z | 2022-03-21T23:57:12.000Z | Plugins/UnrealEnginePython/Content/Scripts/upymodule_importer.py | JustinACoder/H22-GR3-UnrealAI | 361eb9ef1147f8a2991e5f98c4118cd823184adf | [
"MIT"
] | null | null | null | Plugins/UnrealEnginePython/Content/Scripts/upymodule_importer.py | JustinACoder/H22-GR3-UnrealAI | 361eb9ef1147f8a2991e5f98c4118cd823184adf | [
"MIT"
] | 1 | 2022-02-08T03:53:23.000Z | 2022-02-08T03:53:23.000Z | #Imports upymodule.json modules and resolves dependencies
#example test
#import upymodule_importer as upym
#upym.parseJson("D:/Users/Admin/Documents/GitHub/tensorflow-ue4-mnist-example/Plugins/tensorflow-ue4/Content/Scripts/upymodule.json")
import upypip as pip
import sys
import unreal_engine as ue
import js... | 31.672414 | 192 | 0.703865 | 224 | 1,837 | 5.723214 | 0.459821 | 0.079563 | 0.054602 | 0.085803 | 0.049922 | 0.049922 | 0.049922 | 0 | 0 | 0 | 0 | 0.00269 | 0.190528 | 1,837 | 57 | 193 | 32.22807 | 0.859449 | 0.235166 | 0 | 0.157895 | 0 | 0 | 0.261389 | 0.069455 | 0 | 0 | 0 | 0.017544 | 0 | 1 | 0.052632 | false | 0 | 0.342105 | 0 | 0.447368 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
a29f179d47f1aa74ae93149616f1945686e94898 | 606 | py | Python | 11/11.6/args.py | Gridelen/core-python-ex | 18b654b42ab29af07549926e722eb07de680b191 | [
"MIT"
] | 1 | 2019-03-10T13:03:01.000Z | 2019-03-10T13:03:01.000Z | 11/11.6/args.py | Gridelen/core-python-ex | 18b654b42ab29af07549926e722eb07de680b191 | [
"MIT"
] | null | null | null | 11/11.6/args.py | Gridelen/core-python-ex | 18b654b42ab29af07549926e722eb07de680b191 | [
"MIT"
] | null | null | null | '''
11-6. Variable-Length Arguments. Write a function called printf(). There is one positional
argument, a format string. The rest are variable arguments that need to be displayed
to standard output based on the values in the format string, which allows the special
string format operator directives such as %d, %f, etc.... | 46.615385 | 92 | 0.747525 | 97 | 606 | 4.649485 | 0.608247 | 0.039911 | 0.088692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009843 | 0.161716 | 606 | 13 | 93 | 46.615385 | 0.877953 | 0.788779 | 0 | 0 | 0 | 0 | 0.198347 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
a2ab06982f1e6e87bce86f1dbe15addacd3e86d8 | 3,745 | py | Python | interfaces/ATS_VM/utils/airtime-test-stream.py | krattai/AEBL | a7b12c97479e1236d5370166b15ca9f29d7d4265 | [
"BSD-2-Clause"
] | 4 | 2016-04-26T03:43:54.000Z | 2016-11-17T08:09:04.000Z | interfaces/ATS_VM/utils/airtime-test-stream.py | krattai/AEBL | a7b12c97479e1236d5370166b15ca9f29d7d4265 | [
"BSD-2-Clause"
] | 17 | 2015-01-05T21:06:22.000Z | 2015-12-07T20:45:44.000Z | interfaces/ATS_VM/utils/airtime-test-stream.py | krattai/AEBL | a7b12c97479e1236d5370166b15ca9f29d7d4265 | [
"BSD-2-Clause"
] | 3 | 2016-04-26T03:43:55.000Z | 2020-11-06T11:02:08.000Z | import subprocess
import os
import pwd
import grp
import sys
import getopt
"""
we need to run the program as non-root because Liquidsoap refuses to run as root.
It is possible to run change the effective user id (seteuid) before calling Liquidsoap
but this introduces other problems (fake root user is not part of audi... | 30.696721 | 184 | 0.610681 | 513 | 3,745 | 4.424951 | 0.366472 | 0.030837 | 0.022467 | 0.014097 | 0.054185 | 0.054185 | 0.054185 | 0.054185 | 0 | 0 | 0 | 0.006486 | 0.259012 | 3,745 | 121 | 185 | 30.950413 | 0.811532 | 0.055007 | 0 | 0.104651 | 0 | 0.034884 | 0.387996 | 0.038045 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.093023 | 0.069767 | null | null | 0.290698 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
a2bcb72b704e041e91d6c614ebb79d0c8ff79218 | 1,088 | py | Python | paasta_tools/autoscaling/utils.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 1,711 | 2015-11-10T18:04:56.000Z | 2022-03-23T08:53:16.000Z | paasta_tools/autoscaling/utils.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 1,689 | 2015-11-10T17:59:04.000Z | 2022-03-31T20:46:46.000Z | paasta_tools/autoscaling/utils.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 267 | 2015-11-10T19:17:16.000Z | 2022-02-08T20:59:52.000Z | #!/usr/bin/env python
# Copyright 2015-2016 Yelp Inc.
#
# 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/LICENSE-2.0
#
# Unless required by applicable law ... | 32.969697 | 75 | 0.774816 | 152 | 1,088 | 5.434211 | 0.572368 | 0.072639 | 0.031477 | 0.038741 | 0.16707 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013086 | 0.157169 | 1,088 | 32 | 76 | 34 | 0.887677 | 0.525735 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.272727 | false | 0 | 0.272727 | 0.090909 | 0.818182 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
a2c2c670dbe75277d6cd5949c7d61015d15d2b11 | 1,621 | py | Python | transboost/weak_learner/weak_learner_base.py | jsleb333/transboost | 998b1e3294ebfbc4aa060047fb00e42db9fc0f12 | [
"MIT"
] | 1 | 2018-08-27T22:56:30.000Z | 2018-08-27T22:56:30.000Z | quadboost/weak_learner/weak_learner_base.py | jsleb333/quadboost | b4b980ff4af727d5cec0348484a34f34e82168cd | [
"MIT"
] | null | null | null | quadboost/weak_learner/weak_learner_base.py | jsleb333/quadboost | b4b980ff4af727d5cec0348484a34f34e82168cd | [
"MIT"
] | null | null | null | from sklearn.metrics import accuracy_score
import inspect
class _Cloner:
"""
This class is essentially a decorator around the constructor of its subclasses, but without the inconveniences of decorators (with pickling).
The class becomes clonable with the same init args and kwargs when the object is calle... | 35.23913 | 191 | 0.682295 | 218 | 1,621 | 4.834862 | 0.431193 | 0.062619 | 0.053131 | 0.034156 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.241826 | 1,621 | 45 | 192 | 36.022222 | 0.857608 | 0.387415 | 0 | 0.083333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.083333 | 0.041667 | 0.541667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
a2c9c5e8ce2b5870894f9f7582d8d4f2ceb0b5b9 | 717 | py | Python | coding/learn_elasticsearch/connection_error_test.py | yatao91/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | 3 | 2021-05-25T16:58:52.000Z | 2022-02-05T09:37:17.000Z | coding/learn_elasticsearch/connection_error_test.py | yataosu/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | null | null | null | coding/learn_elasticsearch/connection_error_test.py | yataosu/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
author: 苏亚涛
email: yataosu@gmail.com
create_time: 2019/10/25 16:34
file: connection_error_test.py
ide: PyCharm
"""
from elasticsearch import Elasticsearch
from http.client import RemoteDisconnected
from urllib3.exceptions import NewConnectionError
from elasticsearch... | 22.40625 | 52 | 0.668061 | 91 | 717 | 5.230769 | 0.582418 | 0.02521 | 0.067227 | 0.063025 | 0.132353 | 0.132353 | 0.132353 | 0 | 0 | 0 | 0 | 0.059859 | 0.20781 | 717 | 31 | 53 | 23.129032 | 0.778169 | 0.476987 | 0 | 0 | 0 | 0 | 0.061453 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.090909 | 0.363636 | 0 | 0.363636 | 0.181818 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 2 |
a2ce463fa2353d3475b6c818431f2ca92b455861 | 775 | py | Python | postgres_utils.py | Julian1520/banking_app | eda33e38b26700d558e1e075264eb6e3929a5684 | [
"MIT"
] | null | null | null | postgres_utils.py | Julian1520/banking_app | eda33e38b26700d558e1e075264eb6e3929a5684 | [
"MIT"
] | null | null | null | postgres_utils.py | Julian1520/banking_app | eda33e38b26700d558e1e075264eb6e3929a5684 | [
"MIT"
] | null | null | null | import pandas as pd
from sqlalchemy import create_engine
class BankingDatabase(object):
def __init__(self, user, password, host, port, database_name):
# ====== Connection ======
# Connecting to PostgreSQL by providing a sqlachemy engine
self.engine = create_engine(
'postgresql... | 36.904762 | 112 | 0.64129 | 92 | 775 | 5.206522 | 0.51087 | 0.06263 | 0.066806 | 0.083507 | 0.133612 | 0.133612 | 0 | 0 | 0 | 0 | 0 | 0 | 0.228387 | 775 | 20 | 113 | 38.75 | 0.801003 | 0.203871 | 0 | 0 | 0 | 0 | 0.037582 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.272727 | false | 0.181818 | 0.181818 | 0 | 0.636364 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
a2d129f5c3ababdef7cd482ec8467fdb1610e5ae | 736 | py | Python | Hyeongdo/greedy/boj/1339.py | sonnysorry/codingtest | 478e0168e3209eb97b6b16910027bf12ccc3ccd0 | [
"MIT"
] | 2 | 2021-09-27T19:10:36.000Z | 2021-11-09T05:40:39.000Z | Hyeongdo/greedy/boj/1339.py | sonnysorry/codingtest | 478e0168e3209eb97b6b16910027bf12ccc3ccd0 | [
"MIT"
] | 1 | 2021-11-15T14:56:54.000Z | 2021-11-15T14:56:54.000Z | Hyeongdo/greedy/boj/1339.py | sonnysorry/codingtest | 478e0168e3209eb97b6b16910027bf12ccc3ccd0 | [
"MIT"
] | null | null | null | # 단어수학
n = int(input())
num_list = []
for _ in range(n):
num_list.append(input())
num_dict = {"*": 0}
# 요소 길이 순 정렬
num_list.sort(key=len, reverse=True)
chk = 9
for i in range(n):
if len(num_list[i]) < len(num_list[0]):
b = (len(num_list[0]) - len(num_list[i])) * "*" + num_list[i]
num_list[... | 19.891892 | 70 | 0.547554 | 127 | 736 | 3.007874 | 0.307087 | 0.293194 | 0.209424 | 0.115183 | 0.246073 | 0.157068 | 0 | 0 | 0 | 0 | 0 | 0.013109 | 0.274457 | 736 | 36 | 71 | 20.444444 | 0.702247 | 0.02038 | 0 | 0 | 0 | 0 | 0.002789 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.04 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a2e02b03bdaed8f6a6886c73b0eb741e9d9d1646 | 1,165 | py | Python | send_times.py | Dharisd/iss_bot | 37115e72d7e13bbbf6bb4c37a3ca0b99c75b78f6 | [
"MIT"
] | 3 | 2019-08-13T08:32:36.000Z | 2020-04-26T14:51:25.000Z | send_times.py | Dharisd/iss_bot | 37115e72d7e13bbbf6bb4c37a3ca0b99c75b78f6 | [
"MIT"
] | null | null | null | send_times.py | Dharisd/iss_bot | 37115e72d7e13bbbf6bb4c37a3ca0b99c75b78f6 | [
"MIT"
] | 1 | 2020-01-22T20:26:38.000Z | 2020-01-22T20:26:38.000Z | import telegram
from iss import get_passes
from datetime import date
'''
replace token and coords with your values
change chatid to your channel/chatid
'''
bot = telegram.Bot(token='')
def send(bot, pass_data):
message_string = ""
if len(pass_data) > 0:
dt = date.today().strftime("%Y-%m-%... | 20.438596 | 89 | 0.603433 | 164 | 1,165 | 4.140244 | 0.439024 | 0.114875 | 0.044183 | 0.061856 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.052154 | 0.242918 | 1,165 | 56 | 90 | 20.803571 | 0.717687 | 0 | 0 | 0 | 0 | 0 | 0.096246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.56 | 0.12 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
a2e38114d5d16646cf89a3ef720f0325ce382418 | 335 | py | Python | src/helpers/helpers_analysis/get_fpr_tpr_ths.py | ibrahimberb/Predicting-Mutation-Effects | 1522103f3a822b8bdcae89c7b630835ff5aa5a97 | [
"MIT"
] | null | null | null | src/helpers/helpers_analysis/get_fpr_tpr_ths.py | ibrahimberb/Predicting-Mutation-Effects | 1522103f3a822b8bdcae89c7b630835ff5aa5a97 | [
"MIT"
] | null | null | null | src/helpers/helpers_analysis/get_fpr_tpr_ths.py | ibrahimberb/Predicting-Mutation-Effects | 1522103f3a822b8bdcae89c7b630835ff5aa5a97 | [
"MIT"
] | null | null | null | from sklearn import metrics
import numpy as np
def get_fpr_tpr_ths(y_param, scores_param):
"""
Returns fpr, tpr, thresholds.
Positive label is +.
"""
y = np.array(y_param)
scores = np.array(scores_param)
fpr, tpr, thresholds = metrics.roc_curve(y, scores, pos_label='+')
return fpr, t... | 20.9375 | 70 | 0.668657 | 48 | 335 | 4.479167 | 0.520833 | 0.111628 | 0.223256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.220896 | 335 | 15 | 71 | 22.333333 | 0.823755 | 0.149254 | 0 | 0 | 0 | 0 | 0.003774 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.285714 | 0 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
a2fc43a2f55305c09c2688237aee0995777f989e | 92 | py | Python | atcoder/abc/a063.py | tomato-300yen/coding | db6f440a96d8c83f486005c650461a69f27e3926 | [
"MIT"
] | null | null | null | atcoder/abc/a063.py | tomato-300yen/coding | db6f440a96d8c83f486005c650461a69f27e3926 | [
"MIT"
] | null | null | null | atcoder/abc/a063.py | tomato-300yen/coding | db6f440a96d8c83f486005c650461a69f27e3926 | [
"MIT"
] | null | null | null | A, B = tuple(map(int, input().split()))
sum_ = A + B
print("error" if sum_ >= 10 else sum_)
| 23 | 39 | 0.597826 | 17 | 92 | 3.058824 | 0.764706 | 0.076923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.026667 | 0.184783 | 92 | 3 | 40 | 30.666667 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0.054348 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a2fff177e82e5b61e81b8c400cdc5c7dc8379140 | 111 | py | Python | previewer/__init__.py | Photonomie/previewer | 5353f453b7ae60f506af2f013ae8f870c1eec90c | [
"MIT"
] | 7 | 2017-02-10T12:40:21.000Z | 2021-01-31T23:17:56.000Z | previewer/__init__.py | Photonomie/previewer | 5353f453b7ae60f506af2f013ae8f870c1eec90c | [
"MIT"
] | null | null | null | previewer/__init__.py | Photonomie/previewer | 5353f453b7ae60f506af2f013ae8f870c1eec90c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = """Pierre Dulac"""
__email__ = 'pierre@dulaccc.me'
__version__ = '0.1.0'
| 18.5 | 31 | 0.621622 | 14 | 111 | 4.071429 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042105 | 0.144144 | 111 | 5 | 32 | 22.2 | 0.557895 | 0.189189 | 0 | 0 | 0 | 0 | 0.386364 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
0c03aa6e4bb71ae6b2cddc76532d768db1c6e7ec | 307 | py | Python | parser.py | anned20/scrapman | b5d050bc149c911247096cec92129ebf8b2597f1 | [
"MIT"
] | 3 | 2019-02-20T16:27:27.000Z | 2019-08-25T23:42:39.000Z | parser.py | anned20/scrapman | b5d050bc149c911247096cec92129ebf8b2597f1 | [
"MIT"
] | 1 | 2021-06-01T23:27:06.000Z | 2021-06-01T23:27:06.000Z | parser.py | anned20/scrapman | b5d050bc149c911247096cec92129ebf8b2597f1 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
from logger import logger
def parse_page(text):
"""Parse the page and return a BeautifulSoup object
Keyword Arguments:
text : string
"""
soup = BeautifulSoup(text, 'html.parser')
logger.debug(f'Title of page is {soup.title.string}')
return soup
| 20.466667 | 57 | 0.693811 | 41 | 307 | 5.170732 | 0.609756 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004167 | 0.218241 | 307 | 14 | 58 | 21.928571 | 0.879167 | 0.263844 | 0 | 0 | 0 | 0 | 0.227053 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
0c1a84de13dc4f4af440cbe4200f4f6cb813bd87 | 298 | py | Python | cursoemvideoPy/Mundo2/aula12.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo2/aula12.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo2/aula12.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | nome = str(input('Qual é seu nome ? '))
if nome == 'Bruno':
print('Que nome bonito!')
elif nome == 'Pedro' or nome == 'Maria' or nome == 'Silva':
print('Seu nome é bem popular no Brasil.')
elif nome in 'Alessandra':
print('Belo nome feminino.')
else:
print('Seu nome é bem normal.') | 33.111111 | 59 | 0.624161 | 46 | 298 | 4.043478 | 0.565217 | 0.112903 | 0.129032 | 0.139785 | 0.172043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.208054 | 298 | 9 | 60 | 33.111111 | 0.788136 | 0 | 0 | 0 | 0 | 0 | 0.461538 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.444444 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
0c2b3ac34442b47e4b5f6e27c2696ef5010895c4 | 848 | py | Python | src/geocurrency/converters/views.py | comradekingu/geocurrency | 00131739555438b6926caea7c5b237bb23b9848d | [
"MIT"
] | null | null | null | src/geocurrency/converters/views.py | comradekingu/geocurrency | 00131739555438b6926caea7c5b237bb23b9848d | [
"MIT"
] | null | null | null | src/geocurrency/converters/views.py | comradekingu/geocurrency | 00131739555438b6926caea7c5b237bb23b9848d | [
"MIT"
] | null | null | null | from django.http import HttpResponseNotFound
from drf_yasg.utils import swagger_auto_schema
from rest_framework.decorators import action
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import BaseConverter, Batch
from .serializers import BatchSerializer
class WatchV... | 36.869565 | 73 | 0.747642 | 96 | 848 | 6.458333 | 0.572917 | 0.03871 | 0.082258 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004255 | 0.168632 | 848 | 22 | 74 | 38.545455 | 0.875177 | 0 | 0 | 0 | 0 | 0 | 0.050708 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0 | 0.388889 | 0 | 0.611111 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
0c310170d35409303d760320d744bad972241bb2 | 361 | py | Python | app/app/tests.py | root1911/recipe-app-api | 42c3987ce561e7e02c61be0a31fb7e37368ce9e4 | [
"MIT"
] | 1 | 2020-03-15T09:56:58.000Z | 2020-03-15T09:56:58.000Z | app/app/tests.py | root1911/recipe-app-api | 42c3987ce561e7e02c61be0a31fb7e37368ce9e4 | [
"MIT"
] | null | null | null | app/app/tests.py | root1911/recipe-app-api | 42c3987ce561e7e02c61be0a31fb7e37368ce9e4 | [
"MIT"
] | null | null | null | from django.test import TestCase
from app.calc import add, subtract
class CalcTests(TestCase):
def test_add_numbers(self):
"""test that two numbers are added together"""
self.assertEqual(add(3,8),11)
def test_subtract_number(self):
"""test that values are subtracted and returned"""
... | 27.769231 | 58 | 0.689751 | 50 | 361 | 4.9 | 0.6 | 0.057143 | 0.097959 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027875 | 0.204986 | 361 | 12 | 59 | 30.083333 | 0.825784 | 0.235457 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.285714 | 1 | 0.285714 | false | 0 | 0.285714 | 0 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
0c48fdd3db1f0ae397746380c72b3ccc40298f8b | 125 | py | Python | Bangu/Semana 2/Exemplos de Sala de aula/Exemplo004/main.py | profoswaldo/Unisuam_2022-1 | cd0faad61480030d1320515a8104373ada70545b | [
"MIT"
] | 2 | 2022-03-25T02:04:11.000Z | 2022-03-25T09:26:44.000Z | Bangu/Semana 2/Exemplos de Sala de aula/Exemplo004/main.py | profoswaldo/Unisuam_2022-1 | cd0faad61480030d1320515a8104373ada70545b | [
"MIT"
] | null | null | null | Bangu/Semana 2/Exemplos de Sala de aula/Exemplo004/main.py | profoswaldo/Unisuam_2022-1 | cd0faad61480030d1320515a8104373ada70545b | [
"MIT"
] | null | null | null | valor1 = "5.2"
valor2= 7
soma = float(valor1) + valor2
concatenacao = valor1 + str(valor2)
print(soma)
print(concatenacao) | 13.888889 | 35 | 0.712 | 17 | 125 | 5.235294 | 0.588235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.084906 | 0.152 | 125 | 9 | 36 | 13.888889 | 0.754717 | 0 | 0 | 0 | 0 | 0 | 0.02381 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
0c4945410ba05f53b2c960b37d5a597e8389ea2c | 1,631 | py | Python | model-tests.py | tdicola/pi-ricecooker | ad8dde28c9d257926270bf9cc99c45cdc4cfece6 | [
"CC-BY-3.0"
] | 2 | 2016-04-14T15:31:21.000Z | 2019-06-11T09:45:25.000Z | model-tests.py | tdicola/pi-ricecooker | ad8dde28c9d257926270bf9cc99c45cdc4cfece6 | [
"CC-BY-3.0"
] | null | null | null | model-tests.py | tdicola/pi-ricecooker | ad8dde28c9d257926270bf9cc99c45cdc4cfece6 | [
"CC-BY-3.0"
] | null | null | null | import unittest, datetime
from model import RiceCookerModel
class RiceCookerModelTests(unittest.TestCase):
def test_getFrequency_defaults_to_one(self):
model = RiceCookerModel(TestGPIO(100))
assert model.getFrequency() == 1
def test_setFrequency(self):
model = RiceCookerModel(TestGPIO(100))
model.setFrequen... | 26.737705 | 52 | 0.744329 | 193 | 1,631 | 6.098446 | 0.290155 | 0.041631 | 0.142736 | 0.190314 | 0.4435 | 0.292268 | 0.15633 | 0.15633 | 0 | 0 | 0 | 0.032951 | 0.144083 | 1,631 | 61 | 53 | 26.737705 | 0.810172 | 0 | 0 | 0.375 | 0 | 0 | 0.014706 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.208333 | false | 0 | 0.041667 | 0.020833 | 0.3125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
0c4961697df1d5ec49886b392ef9163275d6a931 | 449 | py | Python | old_code/plt_font.py | yuguiyang/python_demo | 1be2406bfc920e22a0f92bf10d9a3665984067ba | [
"Apache-2.0"
] | null | null | null | old_code/plt_font.py | yuguiyang/python_demo | 1be2406bfc920e22a0f92bf10d9a3665984067ba | [
"Apache-2.0"
] | null | null | null | old_code/plt_font.py | yuguiyang/python_demo | 1be2406bfc920e22a0f92bf10d9a3665984067ba | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 10 16:24:02 2017
@author: hexo
"""
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
#引用Windows中的字体
font_set = FontProperties(fname=r'C:\Windows\Fonts\simsun.ttc', size=15)
plt.figure(u'中文')
plt.plot([1,2,3,4],[-2,-1,0,1])
plt.title... | 18.708333 | 72 | 0.721604 | 75 | 449 | 4.253333 | 0.666667 | 0.087774 | 0.197492 | 0.225705 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.056931 | 0.100223 | 449 | 24 | 73 | 18.708333 | 0.732673 | 0.191537 | 0 | 0 | 0 | 0 | 0.098592 | 0.076056 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.222222 | 0 | 0.222222 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
0c509bf3305eab5d2be993b0c13d49a296d28360 | 2,011 | py | Python | libs/WhatcmsColor.py | recall704/what_cms | 8cd6c6cd2d61669d175520ae67afb929113f8034 | [
"CC0-1.0"
] | 3 | 2016-12-08T02:41:18.000Z | 2018-12-04T13:58:09.000Z | libs/WhatcmsColor.py | recall704/what_cms | 8cd6c6cd2d61669d175520ae67afb929113f8034 | [
"CC0-1.0"
] | null | null | null | libs/WhatcmsColor.py | recall704/what_cms | 8cd6c6cd2d61669d175520ae67afb929113f8034 | [
"CC0-1.0"
] | 2 | 2016-12-08T02:41:19.000Z | 2019-10-04T14:23:10.000Z | #!/usr/bin/env python
#coding:utf-8
from os import name
if name == 'nt':
'''windows color table'''
#global BLACK,BLUE,GREEN,CYAN,RED,PURPLE,YELLOW,WHITE,GREY
BLACK = 0x0
BLUE = 0x01
GREEN = 0x02
CYAN = 0x03
RED = 0x04
PURPLE= 0x05
YELLOW= 0x06
WHITE = 0x07
... | 26.813333 | 86 | 0.535554 | 233 | 2,011 | 4.480687 | 0.377682 | 0.022989 | 0.042146 | 0.043103 | 0.250958 | 0.214559 | 0.214559 | 0.214559 | 0.214559 | 0.214559 | 0 | 0.064248 | 0.342118 | 2,011 | 74 | 87 | 27.175676 | 0.724868 | 0.072601 | 0 | 0.223881 | 0 | 0 | 0.679724 | 0.184908 | 0 | 0 | 0.020161 | 0 | 0 | 0 | null | null | 0.014925 | 0.029851 | null | null | 0.134328 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
0c51de4a373804031a97c9c3338518bcfd272e80 | 554 | py | Python | src/config.py | helish88/AnimateaBot | 2ff03b62a31ef19ce4436858ed38c090682e3629 | [
"Apache-2.0"
] | null | null | null | src/config.py | helish88/AnimateaBot | 2ff03b62a31ef19ce4436858ed38c090682e3629 | [
"Apache-2.0"
] | null | null | null | src/config.py | helish88/AnimateaBot | 2ff03b62a31ef19ce4436858ed38c090682e3629 | [
"Apache-2.0"
] | null | null | null | import os
import typing
import functools
from src import errors
import dotenv
dotenv.load_dotenv()
__all__: tuple[str, ...] = ("EnvConfig",)
class EnvConfig:
def __getitem__(self, item: str) -> typing.Any:
return self.get(item)
def __getattr__(self, attr: str) -> typing.Any:
return self.... | 19.785714 | 78 | 0.638989 | 71 | 554 | 4.802817 | 0.507042 | 0.079179 | 0.105572 | 0.105572 | 0.146628 | 0.146628 | 0 | 0 | 0 | 0 | 0 | 0 | 0.249097 | 554 | 27 | 79 | 20.518519 | 0.819712 | 0 | 0 | 0 | 0 | 0 | 0.052347 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.277778 | 0.111111 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
0c60762caf2ed9e28f8b938aa735f075c23b9a64 | 1,092 | py | Python | torch/distributed/algorithms/ddp_comm_hooks/debugging_hooks.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 60,067 | 2017-01-18T17:21:31.000Z | 2022-03-31T21:37:45.000Z | torch/distributed/algorithms/ddp_comm_hooks/debugging_hooks.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 66,955 | 2017-01-18T17:21:38.000Z | 2022-03-31T23:56:11.000Z | torch/distributed/algorithms/ddp_comm_hooks/debugging_hooks.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 19,210 | 2017-01-18T17:45:04.000Z | 2022-03-31T23:51:56.000Z | from typing import Any
import torch
import torch.distributed as dist
def noop_hook(_: Any, bucket: dist.GradBucket) -> torch.futures.Future[torch.Tensor]:
"""
This DDP communication hook returns the a future that wraps the input,
so it is a noop that does not incur any communication overheads.
This ... | 40.444444 | 110 | 0.750916 | 156 | 1,092 | 5.211538 | 0.596154 | 0.04428 | 0.066421 | 0.056581 | 0.071341 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002273 | 0.194139 | 1,092 | 26 | 111 | 42 | 0.921591 | 0.688645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.428571 | 0 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
a74d9402b6b8b479923e5be55539242fb36741ad | 543 | py | Python | ansible/ansiblelints/rules/EmptyPassword0.py | KalmanMeth/defect-prediction | 0a4b549b8af5259241f41eaee77dd841e98e0064 | [
"Apache-2.0"
] | null | null | null | ansible/ansiblelints/rules/EmptyPassword0.py | KalmanMeth/defect-prediction | 0a4b549b8af5259241f41eaee77dd841e98e0064 | [
"Apache-2.0"
] | null | null | null | ansible/ansiblelints/rules/EmptyPassword0.py | KalmanMeth/defect-prediction | 0a4b549b8af5259241f41eaee77dd841e98e0064 | [
"Apache-2.0"
] | null | null | null | from ansiblelint import AnsibleLintRule
class EmptyPassword0(AnsibleLintRule):
id = 'ANSIBLE0004'
description = 'check if password is empty'
severity = 'HIGH'
tags = {'incomplete'}
version_added = 'v1.0.0'
_modules = ['add_host']
shortdesc = 'EmptyPassword'
def matchtask(self, file, t... | 30.166667 | 65 | 0.646409 | 60 | 543 | 5.6 | 0.716667 | 0.095238 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019277 | 0.235727 | 543 | 17 | 66 | 31.941176 | 0.790361 | 0 | 0 | 0 | 0 | 0 | 0.254144 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0.428571 | 0.071429 | 0 | 0.785714 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 |
a76e2254513c8607aaefef883d1f8c880dd7e75d | 8,257 | py | Python | src/named_colours.py | Josue-Martinez-Moreno/raspiled | cd0ac2df3fdeb9f20f61869f6d440283e614679d | [
"MIT"
] | null | null | null | src/named_colours.py | Josue-Martinez-Moreno/raspiled | cd0ac2df3fdeb9f20f61869f6d440283e614679d | [
"MIT"
] | null | null | null | src/named_colours.py | Josue-Martinez-Moreno/raspiled | cd0ac2df3fdeb9f20f61869f6d440283e614679d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Raspiled - LED strip light control from Raspberry Pi!
Named colours (CSS4 set)
"""
from __future__ import unicode_literals
CSS4_COLOURS = {
'indigo': '#4B0082',
'gold': '#FFD700',
'hotpink': '#FF69B4',
'firebrick': '#B22222',
'india... | 25.803125 | 57 | 0.499213 | 637 | 8,257 | 6.453689 | 0.934066 | 0.011676 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.223217 | 0.242582 | 8,257 | 319 | 58 | 25.884013 | 0.434122 | 0.014775 | 0 | 0 | 0 | 0 | 0.520035 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.003257 | 0 | 0.003257 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a775ab91f476c265978afd107c3c0003060b99f4 | 325 | py | Python | July21/EssentialPython/projecteuler/euler5.py | pythonbykhaja/intesivepython | d3074f35bf36a04d4d1d9b4ff4631733d40b5817 | [
"Apache-2.0"
] | 2 | 2021-05-29T18:21:50.000Z | 2021-07-24T13:03:30.000Z | July21/EssentialPython/projecteuler/euler5.py | pythonbykhaja/intesivepython | d3074f35bf36a04d4d1d9b4ff4631733d40b5817 | [
"Apache-2.0"
] | null | null | null | July21/EssentialPython/projecteuler/euler5.py | pythonbykhaja/intesivepython | d3074f35bf36a04d4d1d9b4ff4631733d40b5817 | [
"Apache-2.0"
] | 2 | 2021-05-25T10:19:54.000Z | 2021-09-21T12:20:48.000Z | max_number = 5
hcm = 1
index = 1
while index <= max_number:
hcm *= index
index += 1
lcm = max_number
while lcm <= hcm:
index = 1
while index <= max_number:
if lcm % index != 0:
break
index = index + 1
else:
print(lcm)
break
lcm = lcm + max_n... | 16.25 | 30 | 0.507692 | 43 | 325 | 3.72093 | 0.302326 | 0.28125 | 0.1375 | 0.2 | 0.3125 | 0.3125 | 0 | 0 | 0 | 0 | 0 | 0.036082 | 0.403077 | 325 | 20 | 31 | 16.25 | 0.78866 | 0 | 0 | 0.352941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.058824 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a788ae36b986685f9ddacd85c652fcc862c0dfe3 | 2,042 | py | Python | py/phl/phlmail_sender.py | aevri/phabricator-tools | ef7501bcaee83e98d168d16f64b3f73e744d3336 | [
"Apache-2.0"
] | 150 | 2015-01-21T15:52:22.000Z | 2021-11-09T05:53:36.000Z | py/phl/phlmail_sender.py | aevri/phabricator-tools | ef7501bcaee83e98d168d16f64b3f73e744d3336 | [
"Apache-2.0"
] | 72 | 2015-05-08T04:33:08.000Z | 2017-01-27T09:37:36.000Z | py/phl/phlmail_sender.py | aevri/phabricator-tools | ef7501bcaee83e98d168d16f64b3f73e744d3336 | [
"Apache-2.0"
] | 38 | 2015-01-30T10:33:47.000Z | 2021-11-09T05:53:30.000Z | """A mail sender that sends mail via a configured sendmail."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# phlmail_sender
#
# Public Classes:
# MailSender
# .send
#
# -------------------... | 35.824561 | 79 | 0.556807 | 222 | 2,042 | 4.959459 | 0.513514 | 0.049046 | 0.043597 | 0.027248 | 0.08356 | 0.08356 | 0.08356 | 0.08356 | 0.08356 | 0.08356 | 0 | 0.007001 | 0.160627 | 2,042 | 56 | 80 | 36.464286 | 0.635356 | 0.700784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.583333 | 0.083333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
a78a68316a704850f56b7fb6ec1efc821e70f8c5 | 3,461 | py | Python | characters/models.py | mpirnat/django-tutorial-v2 | 3d128301357e687542c6627f9d8eca026e04faaa | [
"MIT"
] | 6 | 2015-01-06T20:53:15.000Z | 2021-09-09T12:12:03.000Z | characters/models.py | mpirnat/django-tutorial-v2 | 3d128301357e687542c6627f9d8eca026e04faaa | [
"MIT"
] | null | null | null | characters/models.py | mpirnat/django-tutorial-v2 | 3d128301357e687542c6627f9d8eca026e04faaa | [
"MIT"
] | 2 | 2015-01-06T20:53:20.000Z | 2021-09-09T12:12:04.000Z | import random
from django.contrib.auth.models import User
from django.db import models
def generate_stat():
"""Roll 3D6 to make a stat!"""
return roll_dice(3, 6)
def roll_dice(times, sides, modifier=0):
"""
Simulate a dice roll of XdY + Z.
"Rolls" a die of Y sides X times, gets the sum, and ad... | 25.262774 | 79 | 0.661658 | 421 | 3,461 | 5.287411 | 0.361045 | 0.097035 | 0.134771 | 0.088949 | 0.30009 | 0.155885 | 0.073226 | 0.060198 | 0.060198 | 0.060198 | 0 | 0.01898 | 0.223635 | 3,461 | 136 | 80 | 25.448529 | 0.809453 | 0.151401 | 0 | 0.173333 | 1 | 0 | 0.050505 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.093333 | false | 0 | 0.04 | 0.066667 | 0.826667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
a78d2a7508d038a0d9214154f10a8c3ddb927e1c | 1,283 | py | Python | timml/__init__.py | d-brakenhoff/timml | ca94c8f155e59e5c02db3cb5c3dd50a7d478896e | [
"MIT"
] | null | null | null | timml/__init__.py | d-brakenhoff/timml | ca94c8f155e59e5c02db3cb5c3dd50a7d478896e | [
"MIT"
] | null | null | null | timml/__init__.py | d-brakenhoff/timml | ca94c8f155e59e5c02db3cb5c3dd50a7d478896e | [
"MIT"
] | null | null | null | '''
Copyright (C), 2015, Mark Bakker.
Mark Bakker, Delft University of Technology
mark dot bakker at tudelft dot nl
TimML is a computer program for the simulation of steady-state
multiaquifer flow with analytic elements and consists of a
library of Python scripts and FORTRAN extensions.
'''
#from __future__ import div... | 38.878788 | 122 | 0.828527 | 149 | 1,283 | 6.979866 | 0.61745 | 0.028846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011484 | 0.117693 | 1,283 | 32 | 123 | 40.09375 | 0.907244 | 0.31021 | 0 | 0 | 0 | 0 | 0.019429 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.823529 | 0 | 0.823529 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
a78e007aacf35f2162bac1889058b3e59651b516 | 2,050 | py | Python | Markov_Chains.py | JCDJulian/groupme-markov-simulator | 330357af333f891a833dbcc6eb793158c130cb39 | [
"Apache-2.0"
] | null | null | null | Markov_Chains.py | JCDJulian/groupme-markov-simulator | 330357af333f891a833dbcc6eb793158c130cb39 | [
"Apache-2.0"
] | null | null | null | Markov_Chains.py | JCDJulian/groupme-markov-simulator | 330357af333f891a833dbcc6eb793158c130cb39 | [
"Apache-2.0"
] | null | null | null | import markovify
import random
import language_check
"""
Handles all aspects of the Markov chains. Training from data, generating new posts from chains.
"""
def generate_markov_models(user_names):
"""
Builds a dictionary of user_name :: Markov text models from the text corpus of each user.
:param user_nam... | 37.962963 | 120 | 0.709756 | 299 | 2,050 | 4.749164 | 0.431438 | 0.070423 | 0.01831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006234 | 0.217561 | 2,050 | 53 | 121 | 38.679245 | 0.879052 | 0.461463 | 0 | 0 | 1 | 0 | 0.059072 | 0 | 0 | 0 | 0 | 0.018868 | 0 | 1 | 0.083333 | false | 0 | 0.125 | 0 | 0.291667 | 0.083333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a7aa4ca9f97caa97e17afcd1b701361ad0f9ccaf | 189 | py | Python | categorias/iniciante/python/1114.py | carlos3g/URI-solutions | dc7f9b896cdff88aedf67611917b178d3ad60ab3 | [
"MIT"
] | 1 | 2022-01-26T23:38:17.000Z | 2022-01-26T23:38:17.000Z | categorias/iniciante/python/1114.py | carlos3g/URI-solutions | dc7f9b896cdff88aedf67611917b178d3ad60ab3 | [
"MIT"
] | 1 | 2020-07-12T00:49:35.000Z | 2021-06-26T20:53:18.000Z | categorias/iniciante/python/1114.py | carlos3g/URI-solutions | dc7f9b896cdff88aedf67611917b178d3ad60ab3 | [
"MIT"
] | 1 | 2020-07-04T03:27:04.000Z | 2020-07-04T03:27:04.000Z | # -*- coding: utf-8 -*-
senha = 2002
s = 0
while s != senha:
s = int(input())
if s == senha:
print('Acesso Permitido')
elif s != senha:
print('Senha Invalida')
| 17.181818 | 33 | 0.513228 | 25 | 189 | 3.88 | 0.64 | 0.185567 | 0.226804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.046154 | 0.312169 | 189 | 10 | 34 | 18.9 | 0.7 | 0.111111 | 0 | 0 | 0 | 0 | 0.180723 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a7ac7f958210166a9ef81342c5ea790ae54063c3 | 143 | py | Python | output/models/ibm_data/valid/d3_4_6/d3_4_6v07_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ibm_data/valid/d3_4_6/d3_4_6v07_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ibm_data/valid/d3_4_6/d3_4_6v07_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ibm_data.valid.d3_4_6.d3_4_6v07_xsd.d3_4_6v07 import (
Nametest,
Root,
)
__all__ = [
"Nametest",
"Root",
]
| 14.3 | 73 | 0.657343 | 22 | 143 | 3.727273 | 0.681818 | 0.109756 | 0.170732 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115044 | 0.20979 | 143 | 9 | 74 | 15.888889 | 0.610619 | 0 | 0 | 0 | 0 | 0 | 0.083916 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.125 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
a7c7eb100af5a543c8a1a1091825670345e1241f | 588 | py | Python | vad/training/checkpointers/checkpointer.py | zsl24/voice-activity-detection | a034be23c6283121c6b72e778c6ff6711045cbe3 | [
"MIT"
] | 74 | 2021-02-22T17:35:52.000Z | 2022-03-29T03:08:12.000Z | vad/training/checkpointers/checkpointer.py | zsl24/voice-activity-detection | a034be23c6283121c6b72e778c6ff6711045cbe3 | [
"MIT"
] | 1 | 2021-08-15T07:56:39.000Z | 2021-08-15T07:56:39.000Z | vad/training/checkpointers/checkpointer.py | zsl24/voice-activity-detection | a034be23c6283121c6b72e778c6ff6711045cbe3 | [
"MIT"
] | 9 | 2021-07-22T16:46:11.000Z | 2022-03-27T13:19:24.000Z | from abc import ABC, abstractmethod
from dataclasses import dataclass
from enum import Enum
import torch
from torch import nn
from torch.optim import Optimizer
from torch.optim.lr_scheduler import _LRScheduler
@dataclass
class ModelInfo:
model: nn.Module
optimizer: Optimizer
lr_scheduler: _LRScheduler
... | 19.6 | 71 | 0.736395 | 74 | 588 | 5.756757 | 0.527027 | 0.06338 | 0.065728 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.19898 | 588 | 29 | 72 | 20.275862 | 0.904459 | 0 | 0 | 0 | 0 | 0 | 0.010204 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.045455 | false | 0.045455 | 0.318182 | 0 | 0.863636 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
a7cb56c051a4f09960bcc4779e5f02dc59e616ea | 1,211 | py | Python | src/models/nn.py | borismattijssen/mushrooms | 768925d1332fe8102e562f924128f520abea95e5 | [
"MIT"
] | null | null | null | src/models/nn.py | borismattijssen/mushrooms | 768925d1332fe8102e562f924128f520abea95e5 | [
"MIT"
] | null | null | null | src/models/nn.py | borismattijssen/mushrooms | 768925d1332fe8102e562f924128f520abea95e5 | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.neural_network import MLPClassifier
from sklearn.metrics import make_scorer, accuracy_score, precision_score, recall_score, roc_auc_score, classification_report
from sklearn.metrics import accuracy_score
from sklearn.model_selection i... | 39.064516 | 124 | 0.710157 | 184 | 1,211 | 4.472826 | 0.467391 | 0.065614 | 0.038882 | 0.060753 | 0.157959 | 0.082625 | 0.082625 | 0 | 0 | 0 | 0 | 0.043129 | 0.176713 | 1,211 | 30 | 125 | 40.366667 | 0.782347 | 0.117258 | 0 | 0.095238 | 0 | 0 | 0.034873 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.047619 | false | 0 | 0.428571 | 0 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
a7cf3e348bad908691bad78d6afa1e9b7d49bcd7 | 9,975 | py | Python | esim/smart.py | gbsoslab/abse | 44191ab88e53cabd6da967ea5abfd5b81c990cb0 | [
"MIT"
] | null | null | null | esim/smart.py | gbsoslab/abse | 44191ab88e53cabd6da967ea5abfd5b81c990cb0 | [
"MIT"
] | null | null | null | esim/smart.py | gbsoslab/abse | 44191ab88e53cabd6da967ea5abfd5b81c990cb0 | [
"MIT"
] | null | null | null | import contexts
import sys,os
from evsim.system_simulator import SystemSimulator
from evsim.behavior_model_executor import BehaviorModelExecutor
from evsim.system_message import SysMessage
from evsim.definition import *
from config import *
from adev.clock import Clock
from adev.agent import Agent, AgentOpt
from ade... | 89.0625 | 166 | 0.379649 | 964 | 9,975 | 3.643154 | 0.129668 | 0.083998 | 0.143508 | 0.181093 | 0.511959 | 0.45672 | 0.4459 | 0.427107 | 0.419419 | 0.034453 | 0 | 0.070146 | 0.5198 | 9,975 | 111 | 167 | 89.864865 | 0.663048 | 0.047619 | 0 | 0 | 0 | 0 | 0.053442 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.158537 | 0 | 0.158537 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ac28123c45f0a1b5dbdd64c55903846b7dfd0cc3 | 389 | py | Python | colvar/__init__.py | kzinovjev/colvar | 726a6f7d50b962bd3f935c033fef580188068525 | [
"Apache-2.0"
] | null | null | null | colvar/__init__.py | kzinovjev/colvar | 726a6f7d50b962bd3f935c033fef580188068525 | [
"Apache-2.0"
] | null | null | null | colvar/__init__.py | kzinovjev/colvar | 726a6f7d50b962bd3f935c033fef580188068525 | [
"Apache-2.0"
] | null | null | null | import json
from .compilers import compile_schema
from .evaluators import evaluate_schema
class ColVar:
def __init__(self, schema):
self._schema = compile_schema(schema)
@classmethod
def from_file(cls, filename):
with open(filename, 'r') as f:
return cls(json.load(f))
de... | 21.611111 | 47 | 0.673522 | 50 | 389 | 4.94 | 0.52 | 0.121457 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.236504 | 389 | 17 | 48 | 22.882353 | 0.83165 | 0 | 0 | 0 | 0 | 0 | 0.002571 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0.083333 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
ac2eeadb16ef2565936c5c549cc5496e502ba8b0 | 251 | py | Python | L1TriggerConfig/DTTrackFinder/python/L1DTTFRSKeysOnline_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | L1TriggerConfig/DTTrackFinder/python/L1DTTFRSKeysOnline_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | L1TriggerConfig/DTTrackFinder/python/L1DTTFRSKeysOnline_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
L1DTTFRSKeysOnline = cms.ESProducer("DTTFRSKeysOnlineProd",
onlineAuthentication = cms.string('.'),
subsystemLabel = cms.string('DTTF'),
onlineDB = cms.string('oracle://CMS_OMDS_LB/CMS_TRG_R')
)
| 25.1 | 59 | 0.737052 | 27 | 251 | 6.703704 | 0.703704 | 0.149171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004566 | 0.12749 | 251 | 9 | 60 | 27.888889 | 0.821918 | 0 | 0 | 0 | 0 | 0 | 0.220884 | 0.120482 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.166667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ac3300de7f3aefafe8411e87cbf809699c355a6f | 258 | py | Python | marsyas-vamp/marsyas/scripts/Python/batchPeakClustering.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/Python/batchPeakClustering.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/Python/batchPeakClustering.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | import os
from glob import glob
beginCommand = "./peakClustering "
endCommand = " -a -s -p 2 -c 3 -o ~/output -N music ";
for name in glob("../../../Database/*V.wav"):
command = beginCommand+name+endCommand
print command
os.system(command)
| 25.8 | 56 | 0.643411 | 35 | 258 | 4.742857 | 0.742857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009709 | 0.20155 | 258 | 9 | 57 | 28.666667 | 0.796117 | 0 | 0 | 0 | 0 | 0 | 0.325301 | 0.096386 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.25 | null | null | 0.125 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ac427ad564ff303ec98b396d9bfe3111f3da1157 | 305 | py | Python | scripts/templates/fastApiModule/partials/handle_route.py | sulthonzh/zaruba | ec9262f43da17d86330da2c593b7da451aabd60f | [
"Apache-2.0"
] | null | null | null | scripts/templates/fastApiModule/partials/handle_route.py | sulthonzh/zaruba | ec9262f43da17d86330da2c593b7da451aabd60f | [
"Apache-2.0"
] | null | null | null | scripts/templates/fastApiModule/partials/handle_route.py | sulthonzh/zaruba | ec9262f43da17d86330da2c593b7da451aabd60f | [
"Apache-2.0"
] | null | null | null | @self.app.zarubaHttpMethod('zarubaUrl')
def zarubaHttpMethod_zaruba_url():
try:
return 'OK'
except HTTPException as error:
raise error
except Exception as error:
print(traceback.format_exc())
raise HTTPException(status_code=500, detail='Internal Server Error') | 33.888889 | 76 | 0.695082 | 34 | 305 | 6.117647 | 0.764706 | 0.067308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012552 | 0.216393 | 305 | 9 | 76 | 33.888889 | 0.857741 | 0 | 0 | 0 | 0 | 0 | 0.104575 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | true | 0 | 0 | 0 | 0.222222 | 0.111111 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ac45b572172f865b20abd6d9c31830ded1617541 | 337 | py | Python | analysis/final_test_accuracy_lottery.py | daiyaanarfeen/open_lth | 70e17b6d4f42bf6a1991f088c9044f311c42125f | [
"MIT"
] | null | null | null | analysis/final_test_accuracy_lottery.py | daiyaanarfeen/open_lth | 70e17b6d4f42bf6a1991f088c9044f311c42125f | [
"MIT"
] | null | null | null | analysis/final_test_accuracy_lottery.py | daiyaanarfeen/open_lth | 70e17b6d4f42bf6a1991f088c9044f311c42125f | [
"MIT"
] | null | null | null | import sys
import os
import pandas as pd
paths = os.listdir(sys.argv[1])
paths = [os.path.join(sys.argv[1], p, sys.argv[2], 'logger') for p in paths]
paths = paths[int(sys.argv[3]): int(sys.argv[4])+1]
dfs = [pd.read_csv(p, header=None) for p in paths]
print([max(dfs[i].loc[dfs[i][0] == "test_accuracy"][2]) for i in r... | 33.7 | 82 | 0.661721 | 69 | 337 | 3.202899 | 0.492754 | 0.158371 | 0.072398 | 0.099548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027027 | 0.121662 | 337 | 9 | 83 | 37.444444 | 0.719595 | 0 | 0 | 0 | 0 | 0 | 0.05638 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.375 | 0 | 0.375 | 0.125 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
ac4cd8b9a6934d241efdaabd54005b876adc6082 | 12,987 | py | Python | engula/v1/database_pb2.py | engula/client-python | c200dd52c79f9d10edb4a7543a069fd54e6a7e5a | [
"Apache-2.0"
] | 4 | 2022-02-11T03:07:59.000Z | 2022-03-18T14:55:10.000Z | engula/v1/database_pb2.py | engula/client-python | c200dd52c79f9d10edb4a7543a069fd54e6a7e5a | [
"Apache-2.0"
] | null | null | null | engula/v1/database_pb2.py | engula/client-python | c200dd52c79f9d10edb4a7543a069fd54e6a7e5a | [
"Apache-2.0"
] | 1 | 2022-02-19T04:20:00.000Z | 2022-02-19T04:20:00.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: engula/v1/database.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descrip... | 52.366935 | 3,964 | 0.785786 | 1,746 | 12,987 | 5.544674 | 0.166667 | 0.061151 | 0.023241 | 0.049582 | 0.355955 | 0.269807 | 0.245016 | 0.214131 | 0.214131 | 0.208553 | 0 | 0.109187 | 0.066297 | 12,987 | 247 | 3,965 | 52.578947 | 0.68918 | 0.107338 | 0 | 0.208333 | 1 | 0.005208 | 0.444867 | 0.371184 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.03125 | 0 | 0.03125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ac5413a77521d387188ec7060c87246f206ba7f4 | 298 | py | Python | tests/test_day02.py | Whatapalaver/aoc_21 | 6cf13aa09fcda60cf4f505f789ed145c3db25bf4 | [
"MIT"
] | null | null | null | tests/test_day02.py | Whatapalaver/aoc_21 | 6cf13aa09fcda60cf4f505f789ed145c3db25bf4 | [
"MIT"
] | null | null | null | tests/test_day02.py | Whatapalaver/aoc_21 | 6cf13aa09fcda60cf4f505f789ed145c3db25bf4 | [
"MIT"
] | null | null | null | from aoc.day02 import part1, part2
#
# --- Part One ---
#
sample_input = ["forward 5", "down 5", "forward 8", "up 3", "down 8", "forward 2"]
def test_part1():
assert part1.result(sample_input) == 150
#
# --- Part Two ---
#
def test_part2():
assert part2.result(sample_input) == 900
| 14.190476 | 82 | 0.607383 | 42 | 298 | 4.190476 | 0.571429 | 0.1875 | 0.193182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.084388 | 0.204698 | 298 | 20 | 83 | 14.9 | 0.658228 | 0.110738 | 0 | 0 | 0 | 0 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0.333333 | false | 0 | 0.166667 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ac555adcbea8242fcef1b392bd32f7379c95fe3b | 292 | py | Python | TelegramBot.Util.Python/Module/PyRPCMethods.py | rheech/TelegramBot | 2fdf53c66771ef0409a6b4ed996bdcf3604dc076 | [
"Apache-2.0"
] | 2 | 2017-10-21T16:48:11.000Z | 2020-02-27T15:03:36.000Z | TelegramBot.Util.Python/Module/PyRPCMethods.py | rheech/TelegramBot | 2fdf53c66771ef0409a6b4ed996bdcf3604dc076 | [
"Apache-2.0"
] | null | null | null | TelegramBot.Util.Python/Module/PyRPCMethods.py | rheech/TelegramBot | 2fdf53c66771ef0409a6b4ed996bdcf3604dc076 | [
"Apache-2.0"
] | null | null | null | from Module.OpenWeather import *
class PyRPCMethods():
def __init__(self):
return
def Addition(self, a, b):
return a + b
def Subtraction(self, a, b):
return a - b
def GetWeatherByLocation(self, locName):
return getWeatherByLocation(locName) | 20.857143 | 44 | 0.633562 | 33 | 292 | 5.484848 | 0.484848 | 0.044199 | 0.066298 | 0.132597 | 0.187845 | 0.187845 | 0.187845 | 0 | 0 | 0 | 0 | 0 | 0.277397 | 292 | 14 | 45 | 20.857143 | 0.85782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0.1 | 0.4 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
ac5d1fa72a8d36ba494f744dd51d000195ce9b06 | 4,046 | py | Python | cubes/errors.py | devvmh/cubes | 6d83f04acb34eeb0b904dd1af0e97eda6621bf6c | [
"MIT"
] | 2 | 2021-07-20T10:26:06.000Z | 2021-07-21T01:40:12.000Z | cubes/errors.py | zshwuhan/cubes | 6d83f04acb34eeb0b904dd1af0e97eda6621bf6c | [
"MIT"
] | null | null | null | cubes/errors.py | zshwuhan/cubes | 6d83f04acb34eeb0b904dd1af0e97eda6621bf6c | [
"MIT"
] | 1 | 2021-07-21T01:40:27.000Z | 2021-07-21T01:40:27.000Z | # -*- coding: utf-8 -*-
"""Exceptions used in Cubes.
The base exception calss is :class:`.CubesError`."""
from collections import OrderedDict
class CubesError(Exception):
"""Generic error class."""
class InconsistencyError(CubesError):
"""Raised when something bad happened in cubes – very likely an edge
... | 30.19403 | 108 | 0.713297 | 487 | 4,046 | 5.862423 | 0.402464 | 0.035026 | 0.016813 | 0.019965 | 0.101576 | 0.039229 | 0 | 0 | 0 | 0 | 0 | 0.000309 | 0.200198 | 4,046 | 133 | 109 | 30.421053 | 0.881644 | 0.533861 | 0 | 0.125 | 0 | 0 | 0.059799 | 0 | 0 | 0 | 0 | 0.015038 | 0 | 1 | 0.104167 | false | 0.041667 | 0.020833 | 0.041667 | 0.791667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
ac68b8a80b367c4f5e728186c6ca29f9b7ce65c6 | 23,690 | py | Python | pycqed/measurement/waveform_control_CC/multi_qubit_qasm_seqs.py | nuttamas/PycQED_py3 | 1ee35c7428d36ed42ba4afb5d4bda98140b2283e | [
"MIT"
] | 60 | 2016-08-03T10:00:18.000Z | 2021-11-10T11:46:16.000Z | pycqed/measurement/waveform_control_CC/multi_qubit_qasm_seqs.py | nuttamas/PycQED_py3 | 1ee35c7428d36ed42ba4afb5d4bda98140b2283e | [
"MIT"
] | 512 | 2016-08-03T17:10:02.000Z | 2022-03-31T14:03:43.000Z | pycqed/measurement/waveform_control_CC/multi_qubit_qasm_seqs.py | nuttamas/PycQED_py3 | 1ee35c7428d36ed42ba4afb5d4bda98140b2283e | [
"MIT"
] | 34 | 2016-10-19T12:00:52.000Z | 2022-03-19T04:43:26.000Z | from pycqed.utilities.general import mopen
from os.path import join, dirname
base_qasm_path = join(dirname(__file__), 'qasm_files')
# Calibration pulses for all two qubit sequences globally defined
cal_points_2Q = [['', ''],
['X180 {}\n', ''],
['', 'X180 {}\n'],
['X1... | 39.157025 | 92 | 0.558337 | 3,058 | 23,690 | 4.11707 | 0.093198 | 0.088959 | 0.160127 | 0.036537 | 0.745592 | 0.703018 | 0.689595 | 0.662828 | 0.640349 | 0.627006 | 0 | 0.045785 | 0.309455 | 23,690 | 604 | 93 | 39.221854 | 0.723822 | 0.253145 | 0 | 0.688022 | 0 | 0 | 0.134174 | 0.011677 | 0 | 0 | 0 | 0.001656 | 0 | 1 | 0.027855 | false | 0.002786 | 0.005571 | 0 | 0.058496 | 0.002786 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ac7261a5bf9eb62ab7e345bf3130d2b2f1552f3e | 1,617 | py | Python | tests/mindspore_test_framework/pipeline/forward/verify_exception.py | unseenme/mindspore | 4ba052f0cd9146ac0ccc4880a778706f1b2d0af8 | [
"Apache-2.0"
] | 2 | 2020-04-28T03:49:10.000Z | 2020-04-28T03:49:13.000Z | tests/mindspore_test_framework/pipeline/forward/verify_exception.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 7 | 2020-03-30T08:31:56.000Z | 2020-04-01T09:54:39.000Z | tests/mindspore_test_framework/pipeline/forward/verify_exception.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 1 | 2020-03-30T17:07:43.000Z | 2020-03-30T17:07:43.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 42.552632 | 115 | 0.703154 | 194 | 1,617 | 5.706186 | 0.572165 | 0.054201 | 0.023487 | 0.028907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011949 | 0.171923 | 1,617 | 37 | 116 | 43.702703 | 0.814787 | 0.429808 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.714286 | 0 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
ac76e811470a95dc6d40c2e6a649be7c667812c1 | 498 | py | Python | bugtests/test236.py | clach04/bb_import_jython | 4529a0f578186a1c33c476300294ab42658eaf7c | [
"CNRI-Jython"
] | 332 | 2015-08-22T12:43:56.000Z | 2022-03-17T01:05:43.000Z | bugtests/test236.py | clach04/bb_import_jython | 4529a0f578186a1c33c476300294ab42658eaf7c | [
"CNRI-Jython"
] | 36 | 2015-05-30T08:39:19.000Z | 2022-03-04T20:42:33.000Z | bugtests/test236.py | clach04/bb_import_jython | 4529a0f578186a1c33c476300294ab42658eaf7c | [
"CNRI-Jython"
] | 74 | 2015-05-29T17:18:53.000Z | 2022-01-15T14:06:44.000Z |
import support, os
support.compileJava("classes/test236j1.java", force=1)
os.remove("classes/test236j2.class")
onimport = 1
import java
try:
import test236j1
onimport = 0
test236j1()
except ImportError:
raise support.TestError, "Should not raise a simple ImportError"
except java.lang.NoClassDefFoundErro... | 20.75 | 87 | 0.753012 | 61 | 498 | 6.147541 | 0.557377 | 0.096 | 0.112 | 0.144 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.045783 | 0.166667 | 498 | 23 | 88 | 21.652174 | 0.857831 | 0 | 0 | 0 | 0 | 0 | 0.319838 | 0.091093 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.5625 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
3ba6315be20f2be789e0738fdecd1ba2e96107d4 | 279 | py | Python | ExerciseFiles/Ch04/04_01/04_01_Start.py | rlwheelwright/PY3_StandardLib | 0d9acc02f5ca934eab774bbdd5acc3c92eff7191 | [
"Apache-2.0"
] | null | null | null | ExerciseFiles/Ch04/04_01/04_01_Start.py | rlwheelwright/PY3_StandardLib | 0d9acc02f5ca934eab774bbdd5acc3c92eff7191 | [
"Apache-2.0"
] | null | null | null | ExerciseFiles/Ch04/04_01/04_01_Start.py | rlwheelwright/PY3_StandardLib | 0d9acc02f5ca934eab774bbdd5acc3c92eff7191 | [
"Apache-2.0"
] | null | null | null | # Datetime Module Part I
from datetime import datetime # Importing the datetime class from the datetime module
now = datetime.now()
print(now.date())
print(now.year)
print(now.month)
print(now.hour)
print(now.minute)
print(now.second)
print(now.time())
| 14.684211 | 86 | 0.695341 | 40 | 279 | 4.85 | 0.45 | 0.28866 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.193548 | 279 | 18 | 87 | 15.5 | 0.862222 | 0.272401 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.111111 | 0 | 0.111111 | 0.777778 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
3ba9c9c5b4b7618ff86fe48a753c2ffb7e1fd6a6 | 715 | py | Python | Ago-Dic-2020/rodriguez-martinez-jesus-angel/Practica-1/Practica-1.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ago-Dic-2020/rodriguez-martinez-jesus-angel/Practica-1/Practica-1.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ago-Dic-2020/rodriguez-martinez-jesus-angel/Practica-1/Practica-1.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | #!/usr/bin/env python
# Java war flashbacks intensifies...
class Matrix:
def __init__(self, data):
self.data = [[int(column) for column in row.split()] for row in data.splitlines()]
def get_row(self, row_position):
return list(self.data[row_position-1])
def get_column(self, column_positio... | 31.086957 | 90 | 0.707692 | 114 | 715 | 4.315789 | 0.438596 | 0.065041 | 0.03252 | 0.069106 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018395 | 0.163636 | 715 | 23 | 91 | 31.086957 | 0.801003 | 0.123077 | 0 | 0 | 0 | 0 | 0.150883 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.214286 | false | 0 | 0 | 0.142857 | 0.428571 | 0.142857 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
3bb031ffe2fe108e1fa05eb813fdb51e53cb2117 | 18,715 | py | Python | release/stubs.min/Rhino/UI/Gumball.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/Rhino/UI/Gumball.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/Rhino/UI/Gumball.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | # encoding: utf-8
# module Rhino.UI.Gumball calls itself Gumball
# from RhinoCommon,Version=5.1.30000.16,Culture=neutral,PublicKeyToken=552281e97c755530
# by generator 1.145
""" NamespaceTracker represent a CLS namespace. """
# no imports
# no functions
# classes
class GumballAppearanceSettings(object):
"... | 23.810433 | 229 | 0.710072 | 2,078 | 18,715 | 6.23051 | 0.138595 | 0.09732 | 0.058392 | 0.077856 | 0.41276 | 0.396076 | 0.39206 | 0.39206 | 0.39206 | 0.39206 | 0 | 0.003758 | 0.175314 | 18,715 | 785 | 230 | 23.840764 | 0.835104 | 0.011274 | 0 | 0.478261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.279503 | 0 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
3bc007c6be3c0fcbb924562bd3b9d4c39ae4e91e | 1,443 | py | Python | integration-box/pandas/py_scripts/examples.py | ryanmaclean/treasure-boxes | 034270a5184094fe086315da4b79225c4ffce027 | [
"MIT"
] | 1 | 2019-10-07T16:01:11.000Z | 2019-10-07T16:01:11.000Z | integration-box/pandas/py_scripts/examples.py | ryanmaclean/treasure-boxes | 034270a5184094fe086315da4b79225c4ffce027 | [
"MIT"
] | null | null | null | integration-box/pandas/py_scripts/examples.py | ryanmaclean/treasure-boxes | 034270a5184094fe086315da4b79225c4ffce027 | [
"MIT"
] | null | null | null | # Because we do not allow custom image currently, this is how you can add 3rd party
# libraries instead
import os
import sys
import tdclient
os.system(f"{sys.executable} -m pip install -U pytd==0.6.2")
import pytd.pandas_td as td
apikey = os.environ['TD_API_KEY']
endpoint = os.environ['TD_API_SERVER']
con = td.conn... | 32.066667 | 96 | 0.715177 | 217 | 1,443 | 4.580645 | 0.437788 | 0.084507 | 0.044266 | 0.056338 | 0.356137 | 0.251509 | 0.102616 | 0.102616 | 0.102616 | 0.102616 | 0 | 0.008313 | 0.16632 | 1,443 | 44 | 97 | 32.795455 | 0.817955 | 0.169785 | 0 | 0.214286 | 0 | 0 | 0.188758 | 0.066275 | 0 | 0 | 0 | 0.022727 | 0 | 1 | 0.071429 | false | 0.071429 | 0.214286 | 0 | 0.285714 | 0.035714 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
3bc3817d74c7d83303bf553ebe3e9ab3784ce890 | 582 | py | Python | data/train/python/3bc3817d74c7d83303bf553ebe3e9ab3784ce890present_team_list.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/python/3bc3817d74c7d83303bf553ebe3e9ab3784ce890present_team_list.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/python/3bc3817d74c7d83303bf553ebe3e9ab3784ce890present_team_list.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | from board import present_team_list
from django.views.generic import View
from whiteboard_web.observers.present_team_list_observer import PresentTeamListObserver
from whiteboard_web.repositories.team_repository import TeamRepository
class PresentTeamListView(View):
@staticmethod
def get(request):
obs... | 34.235294 | 87 | 0.738832 | 57 | 582 | 7.315789 | 0.491228 | 0.134293 | 0.107914 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.207904 | 582 | 17 | 88 | 34.235294 | 0.904555 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0 | 0.307692 | 0 | 0.538462 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
3bdb46c0a61f074f6c1a149824d0e4eeb6f43164 | 286 | py | Python | core/job/urls.py | v-adhithyan/india-elections | 504772bd90bffaab32bad473523731021315afd1 | [
"MIT"
] | 7 | 2018-09-14T06:42:36.000Z | 2019-06-14T03:46:14.000Z | core/job/urls.py | v-adhithyan/india-elections | 504772bd90bffaab32bad473523731021315afd1 | [
"MIT"
] | 40 | 2019-01-01T01:56:20.000Z | 2022-03-11T23:40:57.000Z | core/job/urls.py | v-adhithyan/india-elections | 504772bd90bffaab32bad473523731021315afd1 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from core.job.views import TweetFetchSaveJob, TweetPredictionJob
urlpatterns = [
url(r'^save-tweets/', TweetFetchSaveJob.as_view(), name="job-save-tweets"),
url(r'^tweet-prediction/', TweetPredictionJob.as_view(), name="job-predict-tweets"),
]
| 35.75 | 88 | 0.748252 | 36 | 286 | 5.888889 | 0.583333 | 0.037736 | 0.09434 | 0.122642 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.097902 | 286 | 7 | 89 | 40.857143 | 0.821705 | 0 | 0 | 0 | 0 | 0 | 0.223776 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
3bdc9573e4773f365b90190bf866ab759ce6a655 | 19,978 | py | Python | asana/resources/gen/tasks.py | shubhamdipt/python-asana | 8e05328fe8605638128be9fce449fbd34a646e01 | [
"MIT"
] | null | null | null | asana/resources/gen/tasks.py | shubhamdipt/python-asana | 8e05328fe8605638128be9fce449fbd34a646e01 | [
"MIT"
] | null | null | null | asana/resources/gen/tasks.py | shubhamdipt/python-asana | 8e05328fe8605638128be9fce449fbd34a646e01 | [
"MIT"
] | null | null | null |
class _Tasks:
"""The _task_ is the basic object around which many operations in Asana are
centered. In the Asana application, multiple tasks populate the middle pane
according to some view parameters, and the set of selected tasks determines
the more detailed information presented in the details pane.
... | 42.871245 | 327 | 0.614226 | 2,585 | 19,978 | 4.711025 | 0.135783 | 0.066185 | 0.040729 | 0.045985 | 0.608392 | 0.564543 | 0.498604 | 0.458203 | 0.42002 | 0.371407 | 0 | 0.000418 | 0.281159 | 19,978 | 465 | 328 | 42.963441 | 0.847573 | 0.615627 | 0 | 0.361702 | 0 | 0 | 0.107406 | 0.051216 | 0 | 0 | 0 | 0 | 0 | 1 | 0.340426 | false | 0 | 0 | 0 | 0.680851 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
3bed5a618b3246b35f36a7e6edca21076f949dfd | 362 | py | Python | foresight/sampler/max_count_aware_sampler.py | thundra-io/thundra-agent-python | 448e18c17d8730c381b2e2a773782cf80c5a7cfb | [
"Apache-2.0"
] | 15 | 2021-07-28T08:03:50.000Z | 2021-11-08T08:36:06.000Z | foresight/sampler/max_count_aware_sampler.py | thundra-io/thundra-agent-python | 448e18c17d8730c381b2e2a773782cf80c5a7cfb | [
"Apache-2.0"
] | 1 | 2021-08-08T07:45:45.000Z | 2021-08-08T12:41:36.000Z | foresight/sampler/max_count_aware_sampler.py | thundra-io/thundra-agent-python | 448e18c17d8730c381b2e2a773782cf80c5a7cfb | [
"Apache-2.0"
] | 3 | 2021-08-07T14:19:23.000Z | 2021-12-08T15:35:40.000Z | from thundra.samplers.base_sampler import BaseSampler
import fastcounter
class MaxCountAwareSampler(BaseSampler):
def __init__(self, max_count):
self.max_count = max_count
self.counter = fastcounter.FastWriteCounter()
def is_sampled(self, args=None):
self.counter.increment()
r... | 30.166667 | 53 | 0.732044 | 42 | 362 | 6.071429 | 0.571429 | 0.12549 | 0.141176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.185083 | 362 | 12 | 54 | 30.166667 | 0.864407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.222222 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
ce08925c539ccf182c3e7942edfa6f9a3d47cd1e | 655 | py | Python | livefeedback_hub/helper/set_queue.py | fritterhoff/livefeedback-hub | c737baf9d7564ca54cdfe89671b60ac224f481af | [
"BSD-3-Clause"
] | 3 | 2021-06-30T14:30:30.000Z | 2021-09-12T08:32:00.000Z | livefeedback_hub/helper/set_queue.py | fritterhoff/livefeedback-hub | c737baf9d7564ca54cdfe89671b60ac224f481af | [
"BSD-3-Clause"
] | 66 | 2021-09-11T12:45:45.000Z | 2022-03-31T20:45:58.000Z | livefeedback_hub/helper/set_queue.py | fritterhoff/livefeedback-hub | c737baf9d7564ca54cdfe89671b60ac224f481af | [
"BSD-3-Clause"
] | null | null | null | from queue import Queue
from livefeedback_hub.helper.ordered_set import OrderedSet
class SetQueue(Queue):
def _init(self, maxsize):
self.maxsize = maxsize
self.queue = OrderedSet()
def _put(self, item):
self.queue.add(item)
def _get(self):
return self.queue.pop()
d... | 21.833333 | 58 | 0.551145 | 80 | 655 | 4.425 | 0.3875 | 0.152542 | 0.073446 | 0.079096 | 0.254237 | 0.254237 | 0.254237 | 0.254237 | 0.254237 | 0.254237 | 0 | 0 | 0.363359 | 655 | 29 | 59 | 22.586207 | 0.848921 | 0 | 0 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.238095 | false | 0 | 0.095238 | 0.047619 | 0.52381 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
ce225e0d595590e068b05774a47f486b0a6344a7 | 462 | py | Python | handlers/base_handler.py | erlichmen/jugoflogs | 48d3f728f327eb86a44a12134321c4015665642f | [
"MIT"
] | null | null | null | handlers/base_handler.py | erlichmen/jugoflogs | 48d3f728f327eb86a44a12134321c4015665642f | [
"MIT"
] | null | null | null | handlers/base_handler.py | erlichmen/jugoflogs | 48d3f728f327eb86a44a12134321c4015665642f | [
"MIT"
] | null | null | null | from webapp2_extras import jinja2
import webapp2
def nl2br(value):
return value.replace('\n', '<br>\n')
class BaseHandler(webapp2.RequestHandler):
@webapp2.cached_property
def jinja2(self):
j2 = jinja2.get_jinja2(app=self.app)
j2.environment.filters['nl2br'] = nl2br
return j2
... | 23.1 | 83 | 0.69697 | 57 | 462 | 5.526316 | 0.508772 | 0.088889 | 0.126984 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.039788 | 0.183983 | 462 | 19 | 84 | 24.315789 | 0.795756 | 0 | 0 | 0 | 0 | 0 | 0.0282 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.166667 | 0.083333 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
ce230c631520b957926625ee1627e76f9289591b | 649 | py | Python | apps/inventory/viewsets/batch_viewset.py | ivanmtoroc/superdrogas | 77762bfd09ca7c4973e3a05c415218d6e2c04b84 | [
"MIT"
] | 8 | 2021-02-26T14:29:50.000Z | 2022-03-22T07:44:35.000Z | apps/inventory/viewsets/batch_viewset.py | luishgranja/superdrogas | 721327fca32374199e434d38bb77ca714e2da25c | [
"MIT"
] | 16 | 2020-02-12T00:32:20.000Z | 2022-03-11T23:48:38.000Z | apps/inventory/viewsets/batch_viewset.py | ivanmtoroc/superdrogas | 77762bfd09ca7c4973e3a05c415218d6e2c04b84 | [
"MIT"
] | 9 | 2020-05-01T06:54:28.000Z | 2022-02-11T11:31:49.000Z | """
Batch viewset
Viewset to batch serializer
"""
# Django Rest Framework
from rest_framework import viewsets
# Inventory models
from apps.inventory.models import Batch
# Inventory serializers
from apps.inventory.serializers import BatchSerializer
class BatchViewSet(viewsets.ModelViewSet):
"""
Batch views... | 20.28125 | 61 | 0.711864 | 72 | 649 | 6.333333 | 0.541667 | 0.052632 | 0.074561 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.218798 | 649 | 31 | 62 | 20.935484 | 0.899408 | 0.320493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0.333333 | 0 | 0.777778 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
ce29fb63d4819dc3d773767221ccaa82a6ecbe0f | 503 | py | Python | stack.py | sachinumrao/data_structures_python | 430b0472ac028275c155ba41ef5b64922231b69a | [
"MIT"
] | null | null | null | stack.py | sachinumrao/data_structures_python | 430b0472ac028275c155ba41ef5b64922231b69a | [
"MIT"
] | null | null | null | stack.py | sachinumrao/data_structures_python | 430b0472ac028275c155ba41ef5b64922231b69a | [
"MIT"
] | null | null | null | class Stack:
def __init__(self):
self.stack = []
def push(self, x):
self.stack.append(x)
def pop(self):
if len(self.stack) == 0:
print("Nothing To Pop \n")
else:
x = self.stack[-1]
self.stack = self.stack[:-1]
return ... | 18.62963 | 40 | 0.471173 | 61 | 503 | 3.688525 | 0.393443 | 0.32 | 0.133333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013201 | 0.397614 | 503 | 27 | 41 | 18.62963 | 0.729373 | 0 | 0 | 0 | 0 | 0 | 0.049603 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | false | 0.05 | 0 | 0.1 | 0.5 | 0.05 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ce2ba4ca81229f928c94201104425889f31d07b5 | 193 | py | Python | hamming/hamming.py | ederst/exercism-python | 8791f145ff4ce1a3b78ac3566fbe428ce3a3bd7b | [
"Unlicense"
] | 1 | 2021-06-25T16:09:02.000Z | 2021-06-25T16:09:02.000Z | hamming/hamming.py | ederst/exercism-python | 8791f145ff4ce1a3b78ac3566fbe428ce3a3bd7b | [
"Unlicense"
] | 1 | 2021-05-17T23:45:29.000Z | 2021-05-17T23:46:01.000Z | hamming/hamming.py | ederst/exercism-python | 8791f145ff4ce1a3b78ac3566fbe428ce3a3bd7b | [
"Unlicense"
] | null | null | null | def distance(strand_a: str, strand_b: str) -> int:
if len(strand_a) != len(strand_b):
raise ValueError("Invalid input.")
return sum(x != y for x, y in zip(strand_a, strand_b))
| 32.166667 | 58 | 0.642487 | 33 | 193 | 3.575758 | 0.606061 | 0.177966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.212435 | 193 | 5 | 59 | 38.6 | 0.776316 | 0 | 0 | 0 | 0 | 0 | 0.072539 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ce2e0cabca54313613c22828f21baa95500656b5 | 1,548 | gyp | Python | test/copies/src/copies.gyp | chlorm-forks/gyp | a8921fcaab1a18c8cf7e4ab09ceb940e336918ec | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | test/copies/src/copies.gyp | chlorm-forks/gyp | a8921fcaab1a18c8cf7e4ab09ceb940e336918ec | [
"BSD-3-Clause"
] | 1,432 | 2017-06-21T04:08:48.000Z | 2020-08-25T16:21:15.000Z | test/copies/src/copies.gyp | chlorm-forks/gyp | a8921fcaab1a18c8cf7e4ab09ceb940e336918ec | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | # Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'copies1',
'type': 'none',
'copies': [
{
'destination': 'copies-out',
'files': ... | 21.802817 | 77 | 0.44832 | 134 | 1,548 | 5.08209 | 0.485075 | 0.073421 | 0.10279 | 0.183554 | 0.276065 | 0.276065 | 0.276065 | 0.215859 | 0.215859 | 0 | 0 | 0.008511 | 0.392765 | 1,548 | 70 | 78 | 22.114286 | 0.715957 | 0.240956 | 0 | 0.435484 | 0 | 0 | 0.362468 | 0.105398 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ce41f09292e8b86f32990e101b50a6a2d6e965d3 | 286 | py | Python | alchemy/inference/random_model.py | edu-gp/annotation_tool | c383cfeca9f5773e540deaad8d06996ecbb95b32 | [
"Apache-2.0"
] | 2 | 2020-07-17T11:45:05.000Z | 2020-07-17T13:39:14.000Z | alchemy/inference/random_model.py | georgianpartners/annotation_tool | c383cfeca9f5773e540deaad8d06996ecbb95b32 | [
"Apache-2.0"
] | 46 | 2020-09-30T14:40:45.000Z | 2021-02-26T14:31:14.000Z | alchemy/inference/random_model.py | edu-gp/annotation_tool | c383cfeca9f5773e540deaad8d06996ecbb95b32 | [
"Apache-2.0"
] | null | null | null | from typing import List
import numpy as np
from .base import ITextCatModel
class RandomModel(ITextCatModel):
def predict(self, text_list: List[str]) -> List:
res = list(np.random.uniform(size=len(text_list)))
res = [{"score": s} for s in res]
return res
| 22 | 58 | 0.664336 | 41 | 286 | 4.585366 | 0.634146 | 0.085106 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.227273 | 286 | 12 | 59 | 23.833333 | 0.850679 | 0 | 0 | 0 | 0 | 0 | 0.017483 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.375 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
0219f3b2e7bd44c0626cf8fbefb59df9958988e7 | 9,339 | py | Python | test/selenium/common/Global_Locators.py | ycyun/ablestack-cloud | b7bd36a043e2697d05303246373988aa033c9229 | [
"Apache-2.0"
] | 1,131 | 2015-01-08T18:59:06.000Z | 2022-03-29T11:31:10.000Z | test/selenium/common/Global_Locators.py | ycyun/ablestack-cloud | b7bd36a043e2697d05303246373988aa033c9229 | [
"Apache-2.0"
] | 5,908 | 2015-01-13T15:28:37.000Z | 2022-03-31T20:31:07.000Z | test/selenium/common/Global_Locators.py | ycyun/ablestack-cloud | b7bd36a043e2697d05303246373988aa033c9229 | [
"Apache-2.0"
] | 1,083 | 2015-01-05T01:16:52.000Z | 2022-03-31T12:14:10.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 40.428571 | 192 | 0.629618 | 1,305 | 9,339 | 4.433716 | 0.245977 | 0.042171 | 0.06533 | 0.040097 | 0.340304 | 0.31075 | 0.222261 | 0.219323 | 0.203768 | 0.202385 | 0 | 0.013243 | 0.110611 | 9,339 | 230 | 193 | 40.604348 | 0.683361 | 0.428954 | 0 | 0 | 0 | 0.283019 | 0.587375 | 0.41981 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.018868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
02263dfd7be6fb902317e4c4037738f15b4a6e93 | 1,713 | py | Python | pathmatch/pattern.py | demurgos/py-pathmatch | cb1b12eecf5ed2396562805364a5ab66b6b6bd74 | [
"MIT"
] | 4 | 2018-03-17T21:51:39.000Z | 2019-08-13T09:39:08.000Z | pathmatch/pattern.py | demurgos/py-pathmatch | cb1b12eecf5ed2396562805364a5ab66b6b6bd74 | [
"MIT"
] | 2 | 2018-09-14T08:03:45.000Z | 2020-05-03T23:30:32.000Z | pathmatch/pattern.py | demurgos/py-pathmatch | cb1b12eecf5ed2396562805364a5ab66b6b6bd74 | [
"MIT"
] | 1 | 2020-11-08T07:23:08.000Z | 2020-11-08T07:23:08.000Z | # -*- coding: utf8 -*-
u"""
Abstract pattern
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import with_statement
from abc import ABCMeta, abstractmethod
import re
# noinspection PyCompatibility
... | 28.081967 | 100 | 0.56042 | 174 | 1,713 | 5.344828 | 0.402299 | 0.053763 | 0.086022 | 0.051613 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000794 | 0.264448 | 1,713 | 60 | 101 | 28.55 | 0.737302 | 0.374197 | 0 | 0.173913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.130435 | false | 0.086957 | 0.391304 | 0 | 0.608696 | 0.043478 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 2 |
022d1cedc2e9c4db6cefea48ad58f1ed8df0b641 | 7,871 | py | Python | example_cycles/N+3ref/N3_Fan_map.py | naylor-b/pyCycle | 787743b39b17443631debb145a976b0ccdee43ab | [
"Apache-2.0"
] | null | null | null | example_cycles/N+3ref/N3_Fan_map.py | naylor-b/pyCycle | 787743b39b17443631debb145a976b0ccdee43ab | [
"Apache-2.0"
] | null | null | null | example_cycles/N+3ref/N3_Fan_map.py | naylor-b/pyCycle | 787743b39b17443631debb145a976b0ccdee43ab | [
"Apache-2.0"
] | 2 | 2020-06-26T16:54:56.000Z | 2020-06-26T16:58:04.000Z | import numpy as np
from pycycle.maps.map_data import MapData
"""Python version of CFM56 Fan map from NPSS"""
FanMap = MapData()
# Map design point values
FanMap.defaults = {}
FanMap.defaults['alphaMap'] = 0.0
FanMap.defaults['NcMap'] = 1.0
FanMap.defaults['PR'] = 1.39
FanMap.defaults['RlineMap'] = 2.00
FanMap.Rline... | 75.682692 | 159 | 0.639055 | 1,555 | 7,871 | 3.22508 | 0.458521 | 0.008973 | 0.010768 | 0.013958 | 0.229511 | 0.202991 | 0.190229 | 0.163709 | 0.091924 | 0.066999 | 0 | 0.589509 | 0.137721 | 7,871 | 103 | 160 | 76.417476 | 0.149403 | 0.025283 | 0 | 0 | 0 | 0 | 0.028605 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.02381 | 0 | 0.02381 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
0232b009473cd89cc7680036c9728ad0db30d2c2 | 682 | py | Python | eventex/subscriptions/tests/test_model_subscription.py | klasrak/eventex | b57b7c3f0417931b0f905303c98c4708acb3c954 | [
"MIT"
] | null | null | null | eventex/subscriptions/tests/test_model_subscription.py | klasrak/eventex | b57b7c3f0417931b0f905303c98c4708acb3c954 | [
"MIT"
] | null | null | null | eventex/subscriptions/tests/test_model_subscription.py | klasrak/eventex | b57b7c3f0417931b0f905303c98c4708acb3c954 | [
"MIT"
] | null | null | null | from datetime import datetime
from django.test import TestCase
from eventex.subscriptions.models import Subscription
class SubscriptionModelTest(TestCase):
def setUp(self):
self.obj = Subscription(
name="Danilo Augusto", cpf="12345678901", email="daniloaugusto@mailinator.com", phone="18-9111... | 28.416667 | 113 | 0.693548 | 80 | 682 | 5.8375 | 0.55 | 0.059957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.040293 | 0.199413 | 682 | 23 | 114 | 29.652174 | 0.815018 | 0.067449 | 0 | 0 | 0 | 0 | 0.126984 | 0.044444 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0.266667 | false | 0 | 0.2 | 0 | 0.533333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
02359739b2d437100d550bdcab41454215b21668 | 1,283 | py | Python | bump.py | yavorsky/SublimeBump | b2542750699a4a9d283cc3ade6d5b03a2364568c | [
"MIT",
"Unlicense"
] | 1 | 2017-10-25T22:55:35.000Z | 2017-10-25T22:55:35.000Z | bump.py | yavorsky/SublimeBump | b2542750699a4a9d283cc3ade6d5b03a2364568c | [
"MIT",
"Unlicense"
] | null | null | null | bump.py | yavorsky/SublimeBump | b2542750699a4a9d283cc3ade6d5b03a2364568c | [
"MIT",
"Unlicense"
] | null | null | null | import json
import os
from string import Template
import sublime
import sublime_plugin
from . import parser
from . import log
from . import request
from . import cache
from . import transfrom
from . import commands
from . import settings as conf
from . import persist
def plugin_loaded():
"""Entry point for SL pl... | 26.183673 | 67 | 0.705378 | 167 | 1,283 | 5.149701 | 0.407186 | 0.093023 | 0.039535 | 0.053488 | 0.060465 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.198753 | 1,283 | 48 | 68 | 26.729167 | 0.836576 | 0.063913 | 0 | 0.057143 | 0 | 0 | 0.013502 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.171429 | false | 0 | 0.371429 | 0 | 0.628571 | 0.028571 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
023b6097ca049846668e6364163b7676dd3a23d8 | 151 | py | Python | bench/fib_tail.py | maaku/forthy2 | 7ee996ff25830f45e14d7dac29933f45b0fb6175 | [
"MIT"
] | 53 | 2019-10-20T00:56:59.000Z | 2021-02-18T20:30:16.000Z | bench/fib_tail.py | maaku/forthy2 | 7ee996ff25830f45e14d7dac29933f45b0fb6175 | [
"MIT"
] | 2 | 2019-10-28T11:02:10.000Z | 2020-06-28T20:10:22.000Z | bench/fib_tail.py | maaku/forthy2 | 7ee996ff25830f45e14d7dac29933f45b0fb6175 | [
"MIT"
] | 6 | 2019-10-28T10:55:59.000Z | 2021-02-18T20:30:18.000Z | from bench import bench
print(bench(100000, '''
def fib(n, a=0, b=1):
if n > 1: fib(n-1, b, a+b)
return a if n == 0 else b
''', '''
fib(20)
'''))
| 15.1 | 28 | 0.529801 | 32 | 151 | 2.5 | 0.5 | 0.1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 0.225166 | 151 | 9 | 29 | 16.777778 | 0.57265 | 0 | 0 | 0 | 0 | 0 | 0.589404 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.125 | 0 | 0.25 | 0.125 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
0242a3fc5ed108aa36152833b659e19aff16b438 | 6,737 | py | Python | tests/cli_test.py | jku/coveralls-python | 582b6ac76f1bc5923ea9573bcfa89fcda0ea88db | [
"MIT"
] | 191 | 2017-02-17T11:27:57.000Z | 2021-01-12T16:00:20.000Z | tests/cli_test.py | jku/coveralls-python | 582b6ac76f1bc5923ea9573bcfa89fcda0ea88db | [
"MIT"
] | 123 | 2017-02-13T19:58:26.000Z | 2021-01-13T07:12:47.000Z | tests/cli_test.py | jku/coveralls-python | 582b6ac76f1bc5923ea9573bcfa89fcda0ea88db | [
"MIT"
] | 130 | 2017-02-17T11:26:28.000Z | 2021-01-12T08:11:53.000Z | import json
import os
from unittest import mock
import responses
import coveralls.cli
from coveralls.exception import CoverallsException
EXC = CoverallsException('bad stuff happened')
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
EXAMPLE_DIR = os.path.join(BASE_DIR, 'example')
def req_json(request):
... | 33.02451 | 73 | 0.644055 | 832 | 6,737 | 5.022837 | 0.159856 | 0.064609 | 0.050251 | 0.080402 | 0.782484 | 0.752094 | 0.715004 | 0.643455 | 0.616415 | 0.583154 | 0 | 0.008037 | 0.205878 | 6,737 | 203 | 74 | 33.187192 | 0.773084 | 0.024788 | 0 | 0.563291 | 0 | 0 | 0.155101 | 0.014031 | 0 | 0 | 0 | 0 | 0.164557 | 1 | 0.094937 | false | 0.018987 | 0.037975 | 0.006329 | 0.139241 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
02494f387e7e84ed9b10a2f5fdff50c3e440340b | 72 | py | Python | Software/python serial test/write_test.py | alifele/Glucose-Instrument | 026eacd9ebe15b60a461f2ff48dbc4151856c2de | [
"MIT"
] | null | null | null | Software/python serial test/write_test.py | alifele/Glucose-Instrument | 026eacd9ebe15b60a461f2ff48dbc4151856c2de | [
"MIT"
] | null | null | null | Software/python serial test/write_test.py | alifele/Glucose-Instrument | 026eacd9ebe15b60a461f2ff48dbc4151856c2de | [
"MIT"
] | null | null | null | f = open('myfile','w')
f.write("hello there how are you")
f.close()
| 9 | 34 | 0.597222 | 13 | 72 | 3.307692 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.180556 | 72 | 7 | 35 | 10.285714 | 0.728814 | 0 | 0 | 0 | 0 | 0 | 0.428571 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
02508caaef10068ff5d643f7e5a5af992d9f3971 | 250 | py | Python | src/data_training.py | AntoineToubhans/trellearn | ce12262371cdbdcb79126b74ca7a7692c9c672c5 | [
"MIT"
] | 2 | 2016-11-09T11:09:39.000Z | 2018-08-01T06:50:30.000Z | src/data_training.py | AntoineToubhans/trellearn | ce12262371cdbdcb79126b74ca7a7692c9c672c5 | [
"MIT"
] | null | null | null | src/data_training.py | AntoineToubhans/trellearn | ce12262371cdbdcb79126b74ca7a7692c9c672c5 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn.multiclass import OneVsRestClassifier
def train(X, Y):
print('Training !')
clf = OneVsRestClassifier(LogisticRegression())
clf.fit(X, Y)
return clf
| 22.727273 | 51 | 0.752 | 30 | 250 | 6.233333 | 0.666667 | 0.117647 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.168 | 250 | 10 | 52 | 25 | 0.899038 | 0 | 0 | 0 | 0 | 0 | 0.04 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.375 | 0 | 0.625 | 0.125 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
02635f0bfb19351f405538f029afcebcd7bb5883 | 2,720 | gyp | Python | src/trusted/validator_mips/validator_mips.gyp | kapkic/native_client | 51c8bc8c249d55606232ae011bdfc8b4cab3d794 | [
"BSD-3-Clause"
] | 1 | 2021-12-23T00:36:43.000Z | 2021-12-23T00:36:43.000Z | src/trusted/validator_mips/validator_mips.gyp | kapkic/native_client | 51c8bc8c249d55606232ae011bdfc8b4cab3d794 | [
"BSD-3-Clause"
] | null | null | null | src/trusted/validator_mips/validator_mips.gyp | kapkic/native_client | 51c8bc8c249d55606232ae011bdfc8b4cab3d794 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2012, Google Inc.
# Copyright 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can
# be found in the LICENSE file.
{
# ----------------------------------------------------------------------
# Default settings
# -------------------... | 29.565217 | 88 | 0.450735 | 227 | 2,720 | 5.176211 | 0.577093 | 0.020426 | 0.035745 | 0.037447 | 0.151489 | 0.059574 | 0 | 0 | 0 | 0 | 0 | 0.005536 | 0.269485 | 2,720 | 91 | 89 | 29.89011 | 0.585808 | 0.330515 | 0 | 0.287671 | 0 | 0 | 0.509424 | 0.185698 | 0 | 0 | 0 | 0.010989 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
027162fcef91040b74ebec1018db19675c59e446 | 2,066 | py | Python | py/drmmessages.py | cmrudolph/kattis | 90e89eb1901bf48d25a4fe4006441c7a062439ec | [
"MIT"
] | null | null | null | py/drmmessages.py | cmrudolph/kattis | 90e89eb1901bf48d25a4fe4006441c7a062439ec | [
"MIT"
] | null | null | null | py/drmmessages.py | cmrudolph/kattis | 90e89eb1901bf48d25a4fe4006441c7a062439ec | [
"MIT"
] | null | null | null | # NAME : DRM Messages
# URL : https://open.kattis.com/problems/drmmessages
# =============================================================================
# Straightforward application of the string manipulation rules. No
# performance constraints, so Python is adequate.
# =============================================... | 29.098592 | 79 | 0.64424 | 294 | 2,066 | 4.404762 | 0.401361 | 0.012355 | 0.021622 | 0.012355 | 0.11583 | 0.11583 | 0.11583 | 0.11583 | 0.11583 | 0.11583 | 0 | 0.021199 | 0.200871 | 2,066 | 70 | 80 | 29.514286 | 0.763174 | 0.546951 | 0 | 0 | 0 | 0 | 0.008743 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.206897 | false | 0 | 0.034483 | 0.172414 | 0.413793 | 0.034483 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
65f3cf9f222b21bcbfd7ca169b115c8ce7066651 | 1,497 | py | Python | src/spatula/sources.py | morden35/spatula | cdbcc3231696890af236064a6082232af9d4d407 | [
"MIT"
] | null | null | null | src/spatula/sources.py | morden35/spatula | cdbcc3231696890af236064a6082232af9d4d407 | [
"MIT"
] | null | null | null | src/spatula/sources.py | morden35/spatula | cdbcc3231696890af236064a6082232af9d4d407 | [
"MIT"
] | null | null | null | from typing import Optional
import requests
import scrapelib
class Source:
pass
class URL(Source):
def __init__(
self, url: str, method: str = "GET", data: dict = None, headers: dict = None, verify: bool = True
):
"""
Defines a resource to fetch via URL, particularly useful for h... | 27.218182 | 110 | 0.631931 | 188 | 1,497 | 4.914894 | 0.361702 | 0.030303 | 0.030303 | 0.038961 | 0.21645 | 0.21645 | 0.166667 | 0.166667 | 0.166667 | 0.166667 | 0 | 0 | 0.284569 | 1,497 | 54 | 111 | 27.722222 | 0.862745 | 0.320641 | 0 | 0.275862 | 0 | 0 | 0.00324 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.172414 | false | 0.034483 | 0.103448 | 0.137931 | 0.517241 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 |
65f910e6d129c111d108446a76e891a530b88e3c | 280 | py | Python | learning/matplot/cyberpunk.py | HypoChloremic/python_learning | 3778f6d7c35cdd54a85a3418aba99f2b91d32775 | [
"Apache-2.0"
] | 2 | 2019-06-23T07:17:30.000Z | 2019-07-06T15:15:42.000Z | learning/matplot/cyberpunk.py | HypoChloremic/python_learning | 3778f6d7c35cdd54a85a3418aba99f2b91d32775 | [
"Apache-2.0"
] | null | null | null | learning/matplot/cyberpunk.py | HypoChloremic/python_learning | 3778f6d7c35cdd54a85a3418aba99f2b91d32775 | [
"Apache-2.0"
] | 1 | 2019-06-23T07:17:43.000Z | 2019-06-23T07:17:43.000Z | import matplotlib.pyplot as plt
import mplcyberpunk
plt.style.use("cyberpunk")
plt.plot([1, 3, 9, 5, 2, 1, 1], marker='o')
plt.plot([4, 5, 5, 7, 9, 8, 6], marker='v')
plt.plot([2, 3, 4, 3, 4, 5, 3], marker='s')# Add glow effects-Optional
mplcyberpunk.add_glow_effects()
plt.show() | 35 | 70 | 0.660714 | 54 | 280 | 3.388889 | 0.518519 | 0.114754 | 0.153005 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085714 | 0.125 | 280 | 8 | 71 | 35 | 0.661224 | 0.089286 | 0 | 0 | 0 | 0 | 0.047244 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.25 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
5a092e6928a3853fc55be33868bd11a7f24001b4 | 460 | py | Python | tests/test_imported_function.py | Urhengulas/python-ext-wasm | cdc70ebf549aa9bb04e592a2c034e9839acdeaa7 | [
"MIT"
] | null | null | null | tests/test_imported_function.py | Urhengulas/python-ext-wasm | cdc70ebf549aa9bb04e592a2c034e9839acdeaa7 | [
"MIT"
] | null | null | null | tests/test_imported_function.py | Urhengulas/python-ext-wasm | cdc70ebf549aa9bb04e592a2c034e9839acdeaa7 | [
"MIT"
] | null | null | null | from wasmer import Instance
import inspect
import os
import pytest
here = os.path.dirname(os.path.realpath(__file__))
TEST_BYTES = open(here + '/imported_function.wasm', 'rb').read()
#def sum(x: int, y: int) -> int:
# return x + y
#
#def test_imported_function():
# instance = Instance(
# TEST_BYTES,
# ... | 20 | 64 | 0.558696 | 56 | 460 | 4.410714 | 0.607143 | 0.048583 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009174 | 0.28913 | 460 | 22 | 65 | 20.909091 | 0.746177 | 0.536957 | 0 | 0 | 0 | 0 | 0.125628 | 0.115578 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.833333 | 0 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
5a1532fe3787b4ecf4169a647f4658d2a8e2f7b9 | 523 | py | Python | awardsapp/forms.py | KiyaiB/Accords | 32f86c19598f48a18d3c310e7b51a1be71def868 | [
"Unlicense"
] | 1 | 2022-01-08T17:27:53.000Z | 2022-01-08T17:27:53.000Z | awardsapp/forms.py | KiyaiB/Accords | 32f86c19598f48a18d3c310e7b51a1be71def868 | [
"Unlicense"
] | null | null | null | awardsapp/forms.py | KiyaiB/Accords | 32f86c19598f48a18d3c310e7b51a1be71def868 | [
"Unlicense"
] | null | null | null | from django import forms
from django.db.models import fields
from django.forms import ModelForm
from .models import *
class ProfileForm(ModelForm):
class Meta:
model = Profile
exclude = ['user','email']
class UpdateProfileForm(forms.ModelForm):
class Meta:
model = Profile
fiel... | 23.772727 | 89 | 0.66348 | 56 | 523 | 6.160714 | 0.5 | 0.086957 | 0.156522 | 0.2 | 0.173913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.221797 | 523 | 21 | 90 | 24.904762 | 0.847666 | 0 | 0 | 0.3125 | 0 | 0 | 0.157088 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
5a293e5e6e2639050d5ff33f65ef4461a37a2803 | 229 | py | Python | OpenCV/start.py | Sid200026/Misc-Programs | d50a1689a89d331d2567486a5dd22fb2311a0d87 | [
"MIT"
] | 3 | 2021-05-13T13:36:39.000Z | 2021-09-01T05:33:48.000Z | OpenCV/start.py | rosy2000/Misc-Programs | d50a1689a89d331d2567486a5dd22fb2311a0d87 | [
"MIT"
] | 4 | 2021-10-06T08:46:33.000Z | 2022-02-26T21:19:42.000Z | OpenCV/start.py | rosy2000/Misc-Programs | d50a1689a89d331d2567486a5dd22fb2311a0d87 | [
"MIT"
] | 2 | 2021-09-01T05:33:51.000Z | 2021-09-06T14:39:15.000Z | import cv2
print("OpenCV version:")
print(cv2.__version__)
img = cv2.imread("clouds.jpg")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imshow("Over the Clouds", img)
cv2.imshow("Over the Clouds - gray", gray)
cv2.waitKey(0)
| 22.9 | 44 | 0.733624 | 36 | 229 | 4.527778 | 0.5 | 0.110429 | 0.159509 | 0.196319 | 0.269939 | 0 | 0 | 0 | 0 | 0 | 0 | 0.04878 | 0.104803 | 229 | 9 | 45 | 25.444444 | 0.746341 | 0 | 0 | 0 | 0 | 0 | 0.270742 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.125 | 0.25 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
5a2ab2912ba0134235eeea944c861c7d6d9370f6 | 16,464 | py | Python | DRL/models/oct/6-carbon/session4/test_reward.py | EXYNOS-999/AWS_JPL_DRL | ea9df7f293058b0ca2dc63753e68182fcc5380f5 | [
"Apache-2.0"
] | null | null | null | DRL/models/oct/6-carbon/session4/test_reward.py | EXYNOS-999/AWS_JPL_DRL | ea9df7f293058b0ca2dc63753e68182fcc5380f5 | [
"Apache-2.0"
] | 1 | 2020-01-08T06:52:03.000Z | 2020-01-08T07:05:44.000Z | DRL/models/oct/7-nitrogen/session4/test_reward.py | EXYNOS-999/AWS_JPL_DRL | ea9df7f293058b0ca2dc63753e68182fcc5380f5 | [
"Apache-2.0"
] | null | null | null | """
reward function unit tests
"""
import unittest
import math
import numpy
import time
import reward
from numpy import array
from shapely.geometry import Point, Polygon
from shapely.geometry.polygon import LinearRing, LineString
class TestReward(unittest.TestCase):
""" Test the reward.py module. Hard-coded numeri... | 48.710059 | 174 | 0.678997 | 2,546 | 16,464 | 4.192852 | 0.092302 | 0.021733 | 0.135738 | 0.086651 | 0.749696 | 0.709133 | 0.682248 | 0.660703 | 0.63719 | 0.540703 | 0 | 0.069383 | 0.177114 | 16,464 | 337 | 175 | 48.854599 | 0.718556 | 0.098943 | 0 | 0.287879 | 0 | 0 | 0.037674 | 0 | 0 | 0 | 0 | 0.002967 | 0.420455 | 1 | 0.079545 | false | 0 | 0.030303 | 0.003788 | 0.117424 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
5a2ccb126c5fdd3eff380543975228a2b9928fde | 1,796 | py | Python | autolibs/githooks/packer/prepush.py | ColOfAbRiX/python-autolibs | 94938e91d7acaa9d9ca2fc7bb18541e3a9e1225e | [
"MIT"
] | null | null | null | autolibs/githooks/packer/prepush.py | ColOfAbRiX/python-autolibs | 94938e91d7acaa9d9ca2fc7bb18541e3a9e1225e | [
"MIT"
] | null | null | null | autolibs/githooks/packer/prepush.py | ColOfAbRiX/python-autolibs | 94938e91d7acaa9d9ca2fc7bb18541e3a9e1225e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# MIT License
#
# Copyright (c) 2017 Fabrizio Colonna <colofabrix@tin.it>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction... | 29.933333 | 80 | 0.739421 | 267 | 1,796 | 4.895131 | 0.569288 | 0.06733 | 0.019893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007412 | 0.173719 | 1,796 | 60 | 81 | 29.933333 | 0.873315 | 0.643653 | 0 | 0 | 0 | 0 | 0.139837 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.095238 | false | 0 | 0.428571 | 0 | 0.571429 | 0.333333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
5a2f8992c34ba393872e1e994c4b807fe7fef037 | 2,247 | py | Python | app/auth.py | w4149/website | daf944fbe7a524a8b9b521ab8029aed17e7fbb61 | [
"MIT"
] | 4 | 2020-12-06T12:07:11.000Z | 2020-12-17T15:39:05.000Z | app/auth.py | w4149/website | daf944fbe7a524a8b9b521ab8029aed17e7fbb61 | [
"MIT"
] | null | null | null | app/auth.py | w4149/website | daf944fbe7a524a8b9b521ab8029aed17e7fbb61 | [
"MIT"
] | null | null | null | import functools
from flask import Blueprint, flash, g, redirect, render_template, request, session, url_for
from werkzeug.security import check_password_hash, generate_password_hash
from app.database import db, User, Activity
bp = Blueprint('auth', __name__, url_prefix='/auth')
@bp.route('/regist/', methods=('GET'... | 32.1 | 91 | 0.624388 | 268 | 2,247 | 5.123134 | 0.268657 | 0.09177 | 0.116533 | 0.13984 | 0.477058 | 0.430444 | 0.380189 | 0.215586 | 0.154406 | 0.154406 | 0 | 0.001717 | 0.222519 | 2,247 | 69 | 92 | 32.565217 | 0.784201 | 0 | 0 | 0.240741 | 1 | 0 | 0.138407 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.092593 | false | 0.148148 | 0.074074 | 0 | 0.425926 | 0.037037 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
5a343d1b6873b7196bcfeef8e6d66bc03477dffa | 169 | py | Python | Algorithms/Bit Manipulation/Check Odd or Even/check.py | AlphaBAT69/Competitive-Programming | 6c3b0645bce2f0900d13b4ca50c25ecb0cd532ae | [
"MIT"
] | 26 | 2019-07-17T11:05:43.000Z | 2022-02-06T08:31:40.000Z | Algorithms/Bit Manipulation/Check Odd or Even/check.py | AlphaBAT69/Competitive-Programming | 6c3b0645bce2f0900d13b4ca50c25ecb0cd532ae | [
"MIT"
] | 7 | 2019-07-16T19:52:25.000Z | 2022-01-08T08:03:44.000Z | Algorithms/Bit Manipulation/Check Odd or Even/check.py | AlphaBAT69/Competitive-Programming | 6c3b0645bce2f0900d13b4ca50c25ecb0cd532ae | [
"MIT"
] | 19 | 2020-01-14T02:44:28.000Z | 2021-12-27T17:31:59.000Z | #Checks for Odd or Even in Python
def OddOrEven(n):
binary_value = n & 1 #even if 0 and odd if 1
if binary_value == 0:
return "Even"
else:
return "Odd"
| 18.777778 | 46 | 0.633136 | 30 | 169 | 3.5 | 0.6 | 0.209524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032787 | 0.278107 | 169 | 8 | 47 | 21.125 | 0.827869 | 0.319527 | 0 | 0 | 0 | 0 | 0.061947 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
5a369b25f877b26a20d3c70785c50c6d72c13107 | 128 | py | Python | Exercises/seconds-to-minutes.py | shoriwe-upb/TallerEjercicios | ba37eb6cd673a8d38a1dfac87c5efac3f728da21 | [
"MIT"
] | null | null | null | Exercises/seconds-to-minutes.py | shoriwe-upb/TallerEjercicios | ba37eb6cd673a8d38a1dfac87c5efac3f728da21 | [
"MIT"
] | null | null | null | Exercises/seconds-to-minutes.py | shoriwe-upb/TallerEjercicios | ba37eb6cd673a8d38a1dfac87c5efac3f728da21 | [
"MIT"
] | null | null | null | def main():
seconds = float(input("Seconds: "))
print("Minutes:", seconds / 60)
if __name__ == '__main__':
main()
| 16 | 39 | 0.578125 | 14 | 128 | 4.714286 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.020202 | 0.226563 | 128 | 7 | 40 | 18.285714 | 0.646465 | 0 | 0 | 0 | 0 | 0 | 0.195313 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.2 | 0.2 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
5a4f3c5ea2e84dd75b25603e8c318455dad51f0c | 83 | py | Python | src/unicef_attachments/__init__.py | unicef/unicef-attachments | 4c3da173329c3e5f2d77970c933e9de6fcc54ed9 | [
"Apache-2.0"
] | null | null | null | src/unicef_attachments/__init__.py | unicef/unicef-attachments | 4c3da173329c3e5f2d77970c933e9de6fcc54ed9 | [
"Apache-2.0"
] | 9 | 2019-03-12T10:31:17.000Z | 2021-11-23T21:38:04.000Z | src/unicef_attachments/__init__.py | unicef/unicef-attachments | 4c3da173329c3e5f2d77970c933e9de6fcc54ed9 | [
"Apache-2.0"
] | 1 | 2019-02-27T13:54:08.000Z | 2019-02-27T13:54:08.000Z | NAME = 'unicef_attachments'
VERSION = __version__ = "0.10.1"
__author__ = 'UNICEF'
| 20.75 | 32 | 0.722892 | 10 | 83 | 5.1 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.055556 | 0.13253 | 83 | 3 | 33 | 27.666667 | 0.652778 | 0 | 0 | 0 | 0 | 0 | 0.361446 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
5a5e0d723e4abcd46aa2c211fd532dadd9933da3 | 1,063 | py | Python | contrib/bt/startup/gui/displays.py | dboogert/gaffer | d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T19:04:46.000Z | 2015-02-10T19:04:46.000Z | contrib/bt/startup/gui/displays.py | dboogert/gaffer | d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6 | [
"BSD-3-Clause"
] | null | null | null | contrib/bt/startup/gui/displays.py | dboogert/gaffer | d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6 | [
"BSD-3-Clause"
] | null | null | null | import IECore
import GafferScene
GafferScene.Displays.registerDisplay(
"AOVs/beauty",
IECore.Display(
"/tmp/beauty.####.exr",
"exr",
"rgba",
{
"quantize" : IECore.IntVectorData( [ 0, 0, 0, 0 ] ),
}
)
)
GafferScene.Displays.registerDisplay(
"AOVs/diffuse",
IECore.Display(
"/tmp/diffuse.####.ex... | 16.873016 | 55 | 0.61524 | 103 | 1,063 | 6.31068 | 0.184466 | 0.046154 | 0.046154 | 0.292308 | 0.472308 | 0.472308 | 0.472308 | 0.424615 | 0.424615 | 0.424615 | 0 | 0.023148 | 0.187206 | 1,063 | 63 | 56 | 16.873016 | 0.729167 | 0 | 0 | 0.350877 | 0 | 0 | 0.300752 | 0.115602 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.035088 | 0 | 0.035088 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
5a7039cc94777f592385050b6adfb40c3b9cc254 | 9,599 | py | Python | azure/aria/aria-extension-cloudify/src/aria/aria/cli/commands/service_templates.py | onap/archive-multicloud-azure | d3562b78879a900510c8ecb1241156d5b9bb50f6 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2018-10-13T06:32:10.000Z | 2018-10-13T06:32:10.000Z | azure/aria/aria-extension-cloudify/src/aria/aria/cli/commands/service_templates.py | onap/archive-multicloud-azure | d3562b78879a900510c8ecb1241156d5b9bb50f6 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | azure/aria/aria-extension-cloudify/src/aria/aria/cli/commands/service_templates.py | onap/archive-multicloud-azure | d3562b78879a900510c8ecb1241156d5b9bb50f6 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2020-06-16T15:13:06.000Z | 2020-06-16T15:13:06.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 39.179592 | 99 | 0.732055 | 1,180 | 9,599 | 5.711017 | 0.172034 | 0.255973 | 0.070485 | 0.048969 | 0.552159 | 0.442054 | 0.425286 | 0.374388 | 0.344116 | 0.285354 | 0 | 0.002535 | 0.177935 | 9,599 | 244 | 100 | 39.340164 | 0.851476 | 0.173456 | 0 | 0.318471 | 0 | 0 | 0.136451 | 0.016235 | 0 | 0 | 0 | 0 | 0 | 1 | 0.057325 | false | 0.127389 | 0.070064 | 0 | 0.127389 | 0.025478 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
5a7893972c595b5fc7a11e71da3d890ac54905fd | 12,745 | py | Python | ucloud/services/udts/schemas/apis.py | ucloud/ucloud-sdk-python3 | b96a079a5e747228049129d83f03a8067a05e881 | [
"Apache-2.0"
] | 37 | 2019-06-19T09:41:34.000Z | 2022-02-18T08:06:00.000Z | ucloud/services/udts/schemas/apis.py | ucloud/ucloud-sdk-python3 | b96a079a5e747228049129d83f03a8067a05e881 | [
"Apache-2.0"
] | 90 | 2019-08-09T09:27:33.000Z | 2022-03-30T15:54:55.000Z | ucloud/services/udts/schemas/apis.py | ucloud/ucloud-sdk-python3 | b96a079a5e747228049129d83f03a8067a05e881 | [
"Apache-2.0"
] | 19 | 2019-06-13T02:46:01.000Z | 2021-11-01T07:22:18.000Z | """ Code is generated by ucloud-model, DO NOT EDIT IT. """
from ucloud.core.typesystem import schema, fields
from ucloud.services.udts.schemas import models
""" UDTS API Schema
"""
"""
API: CheckUDTSTask
对UDTS 任务提供预检查功能
"""
class CheckUDTSTaskParamSourceMySQLNodeSyncDataSchema(schema.RequestSchema):
"""Chec... | 31.469136 | 80 | 0.66787 | 1,151 | 12,745 | 7.298871 | 0.125109 | 0.072134 | 0.178074 | 0.194501 | 0.544221 | 0.524223 | 0.47173 | 0.46923 | 0.443876 | 0.398286 | 0 | 0 | 0.186269 | 12,745 | 404 | 81 | 31.54703 | 0.810047 | 0.077364 | 0 | 0.590717 | 1 | 0 | 0.145546 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.016878 | 0.008439 | 0 | 0.244726 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
5a79b0525f2e40fde7881cced5fdfb44bcd4fbb8 | 280 | py | Python | __init__.py | fulfilio/nereid-mailchimp | 117b688268b466ca7ed38173e1d406b478f1017b | [
"BSD-3-Clause"
] | null | null | null | __init__.py | fulfilio/nereid-mailchimp | 117b688268b466ca7ed38173e1d406b478f1017b | [
"BSD-3-Clause"
] | null | null | null | __init__.py | fulfilio/nereid-mailchimp | 117b688268b466ca7ed38173e1d406b478f1017b | [
"BSD-3-Clause"
] | 1 | 2016-08-17T11:34:59.000Z | 2016-08-17T11:34:59.000Z | # -*- coding: utf-8 -*-
'''
Nereid Integration with MailChimp
'''
from trytond.pool import Pool
from site import WebSite
from party import NereidUser
def register():
Pool.register(
WebSite,
NereidUser,
module='nereid_chimp', type_='model'
)
| 16.470588 | 44 | 0.639286 | 31 | 280 | 5.709677 | 0.677419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004762 | 0.25 | 280 | 16 | 45 | 17.5 | 0.838095 | 0.2 | 0 | 0 | 0 | 0 | 0.080569 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | true | 0 | 0.333333 | 0 | 0.444444 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
5a7f46874aa12ce4af7691e7ee91e07529e2bff0 | 309 | py | Python | services/dsrp-api/app/api/orgbook/namespace.py | bcgov/dormant-site-reclamation-program | 4710434174a204a292a3128d92c8daf1de2a65a6 | [
"Apache-2.0"
] | 25 | 2018-07-09T19:04:37.000Z | 2022-03-15T17:27:10.000Z | services/core-api/app/api/orgbook/namespace.py | areyeslo/mds | e8c38e593e09b78e2a57009c0d003d6c4bfa32e6 | [
"Apache-2.0"
] | 983 | 2018-04-25T20:08:07.000Z | 2022-03-31T21:45:20.000Z | services/core-api/app/api/orgbook/namespace.py | areyeslo/mds | e8c38e593e09b78e2a57009c0d003d6c4bfa32e6 | [
"Apache-2.0"
] | 58 | 2018-05-15T22:35:50.000Z | 2021-11-29T19:40:52.000Z | from flask_restplus import Namespace
from app.api.orgbook.resources.orgbook_resources import SearchResource, CredentialResource
api = Namespace('orgbook', description='OrgBook API Gateway')
api.add_resource(SearchResource, '/search')
api.add_resource(CredentialResource, '/credential/<int:credential_id>')
| 34.333333 | 90 | 0.825243 | 35 | 309 | 7.142857 | 0.542857 | 0.128 | 0.112 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.071197 | 309 | 8 | 91 | 38.625 | 0.87108 | 0 | 0 | 0 | 0 | 0 | 0.20712 | 0.100324 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
ce46fc7e19f91564acbab728e53d3e3b9aa0edc3 | 222 | py | Python | src/common_log_format/__init__.py | danie1k/python-docker-logging-to-sentry-proxy | ae6db2bbcb27452a750626c5d5ebc43efb505a33 | [
"MIT"
] | null | null | null | src/common_log_format/__init__.py | danie1k/python-docker-logging-to-sentry-proxy | ae6db2bbcb27452a750626c5d5ebc43efb505a33 | [
"MIT"
] | null | null | null | src/common_log_format/__init__.py | danie1k/python-docker-logging-to-sentry-proxy | ae6db2bbcb27452a750626c5d5ebc43efb505a33 | [
"MIT"
] | null | null | null | from src import add_context, add_regex
from .regex import HTTPD
add_regex(HTTPD)
add_context('httpd', [
'authuser',
'content_size',
'http_status',
'referer',
'user_agent',
'user_identifier',
])
| 13.875 | 38 | 0.657658 | 27 | 222 | 5.111111 | 0.592593 | 0.144928 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.211712 | 222 | 15 | 39 | 14.8 | 0.788571 | 0 | 0 | 0 | 0 | 0 | 0.306306 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.181818 | 0 | 0.181818 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ce4dfb252f7c1c5c534e9f82ea778542601ed044 | 2,592 | py | Python | tests/unit/hosts/test_urls.py | ChrsMark/EvalAI | d70163a2465a5d69e818a342ae75f6b0a8eb4cea | [
"BSD-3-Clause"
] | 3 | 2019-02-24T10:57:09.000Z | 2019-02-24T16:49:32.000Z | tests/unit/hosts/test_urls.py | ChrsMark/EvalAI | d70163a2465a5d69e818a342ae75f6b0a8eb4cea | [
"BSD-3-Clause"
] | 4 | 2021-06-08T23:45:35.000Z | 2022-01-13T03:32:04.000Z | tests/unit/hosts/test_urls.py | ChrsMark/EvalAI | d70163a2465a5d69e818a342ae75f6b0a8eb4cea | [
"BSD-3-Clause"
] | 1 | 2020-01-15T17:27:02.000Z | 2020-01-15T17:27:02.000Z | from django.urls import reverse_lazy
from rest_framework.test import APITestCase, APIClient
from hosts.models import ChallengeHost, ChallengeHostTeam
from django.contrib.auth.models import User
class BaseAPITestClass(APITestCase):
def setUp(self):
self.client = APIClient(enforce_csrf_checks=True)
... | 45.473684 | 120 | 0.685185 | 312 | 2,592 | 5.384615 | 0.198718 | 0.263095 | 0.232738 | 0.124405 | 0.574405 | 0.523214 | 0.460119 | 0.439286 | 0.398214 | 0.36131 | 0 | 0 | 0.205247 | 2,592 | 56 | 121 | 46.285714 | 0.815534 | 0 | 0 | 0.04878 | 0 | 0 | 0.245756 | 0.205633 | 0 | 0 | 0 | 0 | 0.170732 | 1 | 0.04878 | false | 0.02439 | 0.097561 | 0 | 0.195122 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ce4fb5bdc6190fc968a8d71c4dcdb708296dba00 | 615 | py | Python | bqskit/ir/lang/language.py | jkalloor3/bqskit | ad34a6eae3c0e62d2bd960cd4cd841ba8e845811 | [
"BSD-3-Clause-LBNL"
] | 13 | 2021-05-26T21:32:26.000Z | 2022-03-15T17:48:10.000Z | bqskit/ir/lang/language.py | jkalloor3/bqskit | ad34a6eae3c0e62d2bd960cd4cd841ba8e845811 | [
"BSD-3-Clause-LBNL"
] | 20 | 2021-05-26T20:17:15.000Z | 2022-02-27T20:04:10.000Z | bqskit/ir/lang/language.py | jkalloor3/bqskit | ad34a6eae3c0e62d2bd960cd4cd841ba8e845811 | [
"BSD-3-Clause-LBNL"
] | 2 | 2021-10-05T16:00:47.000Z | 2021-10-08T01:30:06.000Z | """This module implements the Language base class and LangException class."""
from __future__ import annotations
import abc
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from bqskit.ir.circuit import Circuit
class LangException(Exception):
"""Exceptions related to language encoding and decoding."""
c... | 24.6 | 77 | 0.700813 | 74 | 615 | 5.743243 | 0.527027 | 0.051765 | 0.070588 | 0.094118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.190244 | 615 | 24 | 78 | 25.625 | 0.853414 | 0.349594 | 0 | 0.181818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.181818 | false | 0 | 0.363636 | 0 | 0.727273 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
ce622f3ac88c4081813e5c8f617a1f0bd0bac7e5 | 158 | py | Python | python/selection_sort.py | mccreery/sandbox | 43e81c7f908feedd8e1b6e28ee07870d02012f4c | [
"Unlicense"
] | 1 | 2020-06-11T21:19:25.000Z | 2020-06-11T21:19:25.000Z | python/selection_sort.py | mccreery/sandbox | 43e81c7f908feedd8e1b6e28ee07870d02012f4c | [
"Unlicense"
] | null | null | null | python/selection_sort.py | mccreery/sandbox | 43e81c7f908feedd8e1b6e28ee07870d02012f4c | [
"Unlicense"
] | 1 | 2020-06-11T21:19:26.000Z | 2020-06-11T21:19:26.000Z | def selection_sort(xs):
for i in range(len(xs)):
j = min(range(i, len(xs)), key=xs.__getitem__)
xs[i], xs[j] = xs[j], xs[i]
return xs
| 26.333333 | 54 | 0.544304 | 29 | 158 | 2.793103 | 0.482759 | 0.111111 | 0.123457 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.265823 | 158 | 5 | 55 | 31.6 | 0.698276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ce7797fd319e00ab8694aec263ff44b29acb7391 | 906 | py | Python | pynamodb/_compat.py | meawoppl/PynamoDB | a6900005f0f5ae876c8c325d136d0e7af7216af9 | [
"MIT"
] | null | null | null | pynamodb/_compat.py | meawoppl/PynamoDB | a6900005f0f5ae876c8c325d136d0e7af7216af9 | [
"MIT"
] | null | null | null | pynamodb/_compat.py | meawoppl/PynamoDB | a6900005f0f5ae876c8c325d136d0e7af7216af9 | [
"MIT"
] | null | null | null | import six
import sys
if six.PY2:
from inspect import getargspec as getfullargspec
else:
from inspect import getfullargspec
def load_module(name, path):
"""Load module using the Python version compatible function."""
if sys.version_info >= (3, 3):
from importlib.machinery import SourceFileLoa... | 33.555556 | 91 | 0.688742 | 121 | 906 | 5.057851 | 0.570248 | 0.098039 | 0.055556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008608 | 0.230684 | 906 | 26 | 92 | 34.846154 | 0.86944 | 0.4117 | 0 | 0.133333 | 0 | 0 | 0.047985 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.066667 | false | 0 | 0.4 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 |
ce7d335b94970fc44a9b9d8b71b88ceffa94ae7f | 1,093 | py | Python | app/tests/configs/conftest_code_injectors.py | GeorgianBadita/remote-code-execution-engine | 4ac3ca7567cd89cc1f979622add81efa9edfea8f | [
"MIT"
] | null | null | null | app/tests/configs/conftest_code_injectors.py | GeorgianBadita/remote-code-execution-engine | 4ac3ca7567cd89cc1f979622add81efa9edfea8f | [
"MIT"
] | null | null | null | app/tests/configs/conftest_code_injectors.py | GeorgianBadita/remote-code-execution-engine | 4ac3ca7567cd89cc1f979622add81efa9edfea8f | [
"MIT"
] | null | null | null | import pytest
@pytest.fixture
def two_sum_answer_py() -> str:
"""
Fixture which returns the twoSum solution for python
"""
return """
def two_sum(nums: list, target_sum: int) -> list:
# if there are not at least two numbers
if len(nums) < 2:
return []
seen_sums = set()
for ... | 18.216667 | 58 | 0.583715 | 143 | 1,093 | 4.27972 | 0.41958 | 0.058824 | 0.044118 | 0.062092 | 0.323529 | 0.251634 | 0.163399 | 0.163399 | 0.163399 | 0 | 0 | 0.024934 | 0.302836 | 1,093 | 59 | 59 | 18.525424 | 0.778215 | 0.097896 | 0 | 0.363636 | 0 | 0.030303 | 0.827225 | 0.031414 | 0 | 0 | 0 | 0 | 0.060606 | 1 | 0.060606 | true | 0 | 0.060606 | 0 | 0.272727 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
ce7dc67d3553fb4580efc36766fdb949c2b47dc1 | 10,394 | py | Python | typedb/connection/cluster/database.py | rpatil524/client-python | e8daba79842a81669f4f4c2799bcc8610e610551 | [
"Apache-2.0"
] | 47 | 2019-01-22T19:17:13.000Z | 2021-02-06T15:39:59.000Z | typedb/connection/cluster/database.py | rpatil524/client-python | e8daba79842a81669f4f4c2799bcc8610e610551 | [
"Apache-2.0"
] | 85 | 2019-01-22T14:51:34.000Z | 2021-04-08T15:41:43.000Z | typedb/connection/cluster/database.py | rpatil524/client-python | e8daba79842a81669f4f4c2799bcc8610e610551 | [
"Apache-2.0"
] | 24 | 2019-01-22T13:21:42.000Z | 2021-03-02T18:06:03.000Z | #
# Copyright (C) 2021 Vaticle
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0... | 42.252033 | 188 | 0.667116 | 1,207 | 10,394 | 5.458161 | 0.166529 | 0.032787 | 0.013661 | 0.018215 | 0.305252 | 0.237098 | 0.186551 | 0.140407 | 0.126442 | 0.083941 | 0 | 0.002943 | 0.248124 | 10,394 | 245 | 189 | 42.42449 | 0.840051 | 0.084953 | 0 | 0.325714 | 0 | 0 | 0.065655 | 0.02055 | 0 | 0 | 0 | 0 | 0.005714 | 1 | 0.205714 | false | 0.005714 | 0.051429 | 0.114286 | 0.485714 | 0.028571 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.