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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2aa6392926d901157ed5eaa8833432c1c4328f90 | 682 | py | Python | odoo-13.0/odoo/addons/base/models/ir_exports.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 12 | 2021-03-26T08:39:40.000Z | 2022-03-16T02:20:10.000Z | odoo-13.0/odoo/addons/base/models/ir_exports.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 13 | 2020-12-20T16:00:21.000Z | 2022-03-14T14:55:30.000Z | odoo-13.0/odoo/addons/base/models/ir_exports.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 17 | 2020-08-31T11:18:49.000Z | 2022-02-09T05:57:31.000Z | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class IrExports(models.Model):
_name = "ir.exports"
_description = 'Exports'
_order = 'name'
name = fields.Char(string='Export Name')
resource = fields.Char(index=Tr... | 28.416667 | 98 | 0.683284 | 87 | 682 | 5.252874 | 0.482759 | 0.078775 | 0.065646 | 0.074398 | 0.105033 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005348 | 0.177419 | 682 | 23 | 99 | 29.652174 | 0.809269 | 0.13783 | 0 | 0 | 0 | 0 | 0.217094 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.071429 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
2aabcd68d49a5d07121205a21df46bc3df568511 | 674 | py | Python | apps/profiles/serializers.py | jhelison/challenge-weef-twitter | 3b3b970d9edd435e780b9747baee944b935eda5c | [
"MIT"
] | null | null | null | apps/profiles/serializers.py | jhelison/challenge-weef-twitter | 3b3b970d9edd435e780b9747baee944b935eda5c | [
"MIT"
] | null | null | null | apps/profiles/serializers.py | jhelison/challenge-weef-twitter | 3b3b970d9edd435e780b9747baee944b935eda5c | [
"MIT"
] | null | null | null | from rest_framework import serializers
from apps.users.serializers import UserSerializer
from apps.users.models import UserFollowing
PROFILE_ACTIONS = ["follow", "unfollow"]
class ProfileActionsSerializer(serializers.Serializer):
action = serializers.ChoiceField(choices=PROFILE_ACTIONS)
class FollowingSerial... | 24.071429 | 61 | 0.752226 | 65 | 674 | 7.630769 | 0.476923 | 0.048387 | 0.052419 | 0.100806 | 0.21371 | 0.21371 | 0.21371 | 0.21371 | 0 | 0 | 0 | 0 | 0.166172 | 674 | 27 | 62 | 24.962963 | 0.882562 | 0 | 0 | 0.25 | 0 | 0 | 0.086053 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.1875 | 0 | 0.6875 | 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 | 0 | 1 | 0 | 0 | 1 |
2ab1f2426c930ed0ef8b98f73201a39d5d6790c9 | 6,996 | py | Python | protos/model_pb2.py | ChenCongGit/Chinese-aster | 3e4ad7e1cc36ad071e4e5dd1017d7d415d686d8d | [
"MIT"
] | 6 | 2019-08-05T08:54:46.000Z | 2021-06-29T08:36:58.000Z | protos/model_pb2.py | ChenCongGit/Chinese-aster | 3e4ad7e1cc36ad071e4e5dd1017d7d415d686d8d | [
"MIT"
] | null | null | null | protos/model_pb2.py | ChenCongGit/Chinese-aster | 3e4ad7e1cc36ad071e4e5dd1017d7d415d686d8d | [
"MIT"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Chinese_aster/protos/model.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import r... | 46.64 | 906 | 0.798885 | 848 | 6,996 | 6.259434 | 0.180425 | 0.080821 | 0.125471 | 0.041447 | 0.569706 | 0.458365 | 0.301809 | 0.288244 | 0.261115 | 0.261115 | 0 | 0.030475 | 0.094768 | 6,996 | 149 | 907 | 46.95302 | 0.807674 | 0.046598 | 0 | 0.507937 | 1 | 0.007937 | 0.29131 | 0.257842 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.079365 | 0 | 0.079365 | 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 | 0 | 0 | 0 | 1 |
2ac0686b2b9e00e5aac7dab49f574203ac134c0d | 1,481 | py | Python | project_folder/project_code/naive_bayes/naive_bayes.py | Nvouk/Titanic_Survival_Classifier | 9b5c17a78c873315441a2ec1cb554ba02860b7af | [
"Unlicense"
] | null | null | null | project_folder/project_code/naive_bayes/naive_bayes.py | Nvouk/Titanic_Survival_Classifier | 9b5c17a78c873315441a2ec1cb554ba02860b7af | [
"Unlicense"
] | null | null | null | project_folder/project_code/naive_bayes/naive_bayes.py | Nvouk/Titanic_Survival_Classifier | 9b5c17a78c873315441a2ec1cb554ba02860b7af | [
"Unlicense"
] | null | null | null | from numpy import *
def naive_bayes(trainSet,trainLabels,testSet):
predictedLabels = zeros(testSet.shape[0])
features = {}
survived = 0
drowned = 0
for i in range(trainSet.shape[0]):
if trainLabels[i] == 1:
survived += 1
for j in range(trainSet.sha... | 31.510638 | 74 | 0.493585 | 146 | 1,481 | 5 | 0.212329 | 0.024658 | 0.082192 | 0.09863 | 0.278082 | 0.278082 | 0.265753 | 0.180822 | 0.180822 | 0.180822 | 0 | 0.020134 | 0.396354 | 1,481 | 47 | 75 | 31.510638 | 0.796421 | 0 | 0 | 0.205882 | 0 | 0 | 0.040486 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.029412 | false | 0.088235 | 0.029412 | 0 | 0.088235 | 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 | 0 | 0 | 0 | 1 |
2acb01b709422ec8f1deca26cf9b103b2627430a | 13,131 | py | Python | lib/hypervisor/hv_kvm/monitor.py | yiannist/pkg-ganeti | 26704f530a70d585fa576971cbe2612b1ebb0d76 | [
"BSD-2-Clause"
] | null | null | null | lib/hypervisor/hv_kvm/monitor.py | yiannist/pkg-ganeti | 26704f530a70d585fa576971cbe2612b1ebb0d76 | [
"BSD-2-Clause"
] | null | null | null | lib/hypervisor/hv_kvm/monitor.py | yiannist/pkg-ganeti | 26704f530a70d585fa576971cbe2612b1ebb0d76 | [
"BSD-2-Clause"
] | null | null | null | #
#
# Copyright (C) 2014 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and ... | 32.745636 | 79 | 0.682888 | 1,696 | 13,131 | 5.163325 | 0.244693 | 0.030147 | 0.044536 | 0.017129 | 0.2317 | 0.176202 | 0.150166 | 0.150166 | 0.132009 | 0.09421 | 0 | 0.002804 | 0.239586 | 13,131 | 400 | 80 | 32.8275 | 0.874211 | 0.207524 | 0 | 0.176136 | 0 | 0 | 0.111792 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.005682 | 0.045455 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
2acb8febfce046b3679ae0772013f47f86dbf25d | 429 | py | Python | cloudy-crocodiles/django/djangocities/pages/migrations/0002_page_file_name.py | patryk-tech/summer-code-jam-2020 | 361fecf3a0f72a92d26d934cbda880cb44058e7b | [
"MIT"
] | 40 | 2020-08-02T07:38:22.000Z | 2021-07-26T01:46:50.000Z | cloudy-crocodiles/django/djangocities/pages/migrations/0002_page_file_name.py | patryk-tech/summer-code-jam-2020 | 361fecf3a0f72a92d26d934cbda880cb44058e7b | [
"MIT"
] | 134 | 2020-07-31T12:15:45.000Z | 2020-12-13T04:42:19.000Z | cloudy-crocodiles/django/djangocities/pages/migrations/0002_page_file_name.py | patryk-tech/summer-code-jam-2020 | 361fecf3a0f72a92d26d934cbda880cb44058e7b | [
"MIT"
] | 101 | 2020-07-31T12:00:47.000Z | 2021-11-01T09:06:58.000Z | # Generated by Django 3.1 on 2020-08-08 16:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("pages", "0001_initial"),
]
operations = [
migrations.AddField(
model_name="page",
name="file_name",
field=... | 21.45 | 73 | 0.592075 | 46 | 429 | 5.413043 | 0.804348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.069079 | 0.291375 | 429 | 19 | 74 | 22.578947 | 0.75 | 0.100233 | 0 | 0 | 1 | 0 | 0.104167 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.076923 | 0 | 0.307692 | 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 | 0 | 0 | 0 | 1 |
2acdf480abe9503cf85577cd224b7428aaf3db77 | 835 | py | Python | bankruns/utils/interfaces.py | mesjou/bank-runs | d3597f581a3f9ff96f1c0f82d81177df30fe82f6 | [
"MIT"
] | null | null | null | bankruns/utils/interfaces.py | mesjou/bank-runs | d3597f581a3f9ff96f1c0f82d81177df30fe82f6 | [
"MIT"
] | null | null | null | bankruns/utils/interfaces.py | mesjou/bank-runs | d3597f581a3f9ff96f1c0f82d81177df30fe82f6 | [
"MIT"
] | null | null | null | from abc import ABC
from ray.rllib.examples.env.utils.interfaces import InfoAccumulationInterface
class MultiplePlayersInfo(InfoAccumulationInterface, ABC):
"""
Interface that adds logging capability in a multiple player discrete game.
Logs the frequency of each state.
"""
def _init_info(self):
... | 27.833333 | 78 | 0.645509 | 111 | 835 | 4.612613 | 0.45045 | 0.15625 | 0.117188 | 0.136719 | 0.144531 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00641 | 0.252695 | 835 | 29 | 79 | 28.793103 | 0.814103 | 0.129341 | 0 | 0 | 0 | 0 | 0.026874 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.111111 | 0.055556 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
2ad3eb560f6ade01e94fc90fc5667826cf935ff9 | 2,191 | py | Python | src/views/py/taskFrameQt.py | adi-bozzhanov/LeProgram | b38a3c84be2afd84851d389bec9eb2afd02bc7eb | [
"MIT"
] | null | null | null | src/views/py/taskFrameQt.py | adi-bozzhanov/LeProgram | b38a3c84be2afd84851d389bec9eb2afd02bc7eb | [
"MIT"
] | null | null | null | src/views/py/taskFrameQt.py | adi-bozzhanov/LeProgram | b38a3c84be2afd84851d389bec9eb2afd02bc7eb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/taskFrame.ui'
#
# Created by: PyQt5 UI code generator 5.14.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_taskFrame(object):
def setupUi(self, taskFrame):
tas... | 39.836364 | 82 | 0.729804 | 205 | 2,191 | 7.726829 | 0.395122 | 0.083333 | 0.051136 | 0.058712 | 0.044192 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007151 | 0.170242 | 2,191 | 54 | 83 | 40.574074 | 0.864136 | 0.084893 | 0 | 0 | 1 | 0 | 0.075075 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.051282 | false | 0 | 0.051282 | 0 | 0.128205 | 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 | 0 | 0 | 0 | 1 |
2ad58afe21a78b94a680bcfa46659dd85c6393df | 718 | py | Python | heritago/heritages/migrations/0003_auto_20170501_1918.py | SWE574-Groupago/heritago | ec7d279df667a4f2c3560dfac4b5b17046163a95 | [
"MIT"
] | 6 | 2017-02-13T10:22:18.000Z | 2017-03-11T20:38:30.000Z | heritago/heritages/migrations/0003_auto_20170501_1918.py | SWE574-Groupago/heritago | ec7d279df667a4f2c3560dfac4b5b17046163a95 | [
"MIT"
] | 172 | 2017-02-12T21:07:27.000Z | 2017-06-08T10:46:58.000Z | heritago/heritages/migrations/0003_auto_20170501_1918.py | SWE574-RenameMe/heritago | ec7d279df667a4f2c3560dfac4b5b17046163a95 | [
"MIT"
] | 17 | 2017-02-13T08:29:37.000Z | 2017-06-29T14:43:53.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-05-01 19:18
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('heritages', '0002_userprofile'),
]
operations = [
migrations.RemoveField(
... | 25.642857 | 58 | 0.51532 | 64 | 718 | 5.59375 | 0.734375 | 0.050279 | 0.111732 | 0.134078 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.054176 | 0.383008 | 718 | 27 | 59 | 26.592593 | 0.75395 | 0.094708 | 0 | 0.2 | 1 | 0 | 0.108192 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.1 | 0 | 0.25 | 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 | 0 | 0 | 0 | 1 |
2ae4fec022d333db8a0497beae39777bf7ea20b8 | 581 | py | Python | sample_networks.py | andrea-allen/epintervene-interactive | f2a0e46489f3410001d3ffecb4e11b2b7a5ec56c | [
"MIT"
] | null | null | null | sample_networks.py | andrea-allen/epintervene-interactive | f2a0e46489f3410001d3ffecb4e11b2b7a5ec56c | [
"MIT"
] | null | null | null | sample_networks.py | andrea-allen/epintervene-interactive | f2a0e46489f3410001d3ffecb4e11b2b7a5ec56c | [
"MIT"
] | null | null | null | import networkx as nx
from epintervene.simobjects import network
def erdos_renyi(n, p):
nb = network.NetworkBuilder
graph = nx.generators.erdos_renyi_graph(n, p)
adjlist = nb.create_adjacency_list(graph)
return adjlist
def balanced_tree():
nb = network.NetworkBuilder
graph = nx.generators.bala... | 27.666667 | 55 | 0.733219 | 80 | 581 | 5.15 | 0.3875 | 0.065534 | 0.167476 | 0.203884 | 0.650485 | 0.650485 | 0.553398 | 0.354369 | 0.354369 | 0 | 0 | 0.004202 | 0.180723 | 581 | 20 | 56 | 29.05 | 0.861345 | 0 | 0 | 0.529412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.176471 | false | 0 | 0.117647 | 0 | 0.470588 | 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 | 0 | 0 | 0 | 1 |
2ae89dcad5c93d0a20b20af3d7e83c654a8f39ed | 1,687 | py | Python | s3prl/pretrain/npc/dataset.py | hhhaaahhhaa/s3prl | a469787f05c42196c4d989555082f5fd9dcbe8a6 | [
"Apache-2.0"
] | 1 | 2022-03-15T04:04:23.000Z | 2022-03-15T04:04:23.000Z | s3prl/pretrain/npc/dataset.py | hhhaaahhhaa/s3prl | a469787f05c42196c4d989555082f5fd9dcbe8a6 | [
"Apache-2.0"
] | 2 | 2021-12-08T14:52:39.000Z | 2021-12-12T09:33:08.000Z | s3prl/pretrain/npc/dataset.py | hhhaaahhhaa/s3prl | a469787f05c42196c4d989555082f5fd9dcbe8a6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
"""*********************************************************************************************"""
# FileName [ pretrain/apc/dataset.py ]
# Synopsis [ the dataset that applies the apc preprocessing on audio ]
# Author [ Andy T. Liu (https://github.com/andi611) ]
# Copyri... | 38.340909 | 100 | 0.545347 | 190 | 1,687 | 4.578947 | 0.468421 | 0.041379 | 0.043678 | 0.057471 | 0.16092 | 0.11954 | 0.11954 | 0.11954 | 0.11954 | 0.11954 | 0 | 0.003797 | 0.219324 | 1,687 | 43 | 101 | 39.232558 | 0.656796 | 0.248963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.130435 | false | 0 | 0.26087 | 0 | 0.565217 | 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 | 0 | 1 | 0 | 0 | 1 |
2ae9b133408234b5577c6fb3f052bbac95fad5cf | 963 | py | Python | server/run.py | 1212087/blockchain-python-tutorial | 805098137f157e9e23915f68ed0cb8835cb5f66a | [
"MIT"
] | null | null | null | server/run.py | 1212087/blockchain-python-tutorial | 805098137f157e9e23915f68ed0cb8835cb5f66a | [
"MIT"
] | null | null | null | server/run.py | 1212087/blockchain-python-tutorial | 805098137f157e9e23915f68ed0cb8835cb5f66a | [
"MIT"
] | 1 | 2020-03-04T21:25:35.000Z | 2020-03-04T21:25:35.000Z | from argparse import ArgumentParser
from router import app
from blockchain import blockchain
from threading import Thread
from sync import sync
import mine
import apscheduler
from config import *
def run_blockchain():
sync.sync_overall()
if __name__ == '__main__':
sync.sync_overall()
from apscheduler... | 31.064516 | 99 | 0.697819 | 121 | 963 | 5.355372 | 0.495868 | 0.046296 | 0.046296 | 0.049383 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.014323 | 0.202492 | 963 | 30 | 100 | 32.1 | 0.829427 | 0.034268 | 0 | 0.08 | 0 | 0 | 0.070119 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04 | false | 0 | 0.36 | 0 | 0.4 | 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 | 0 | 0 | 0 | 1 |
2ae9d324928295f55ba5ed41b4015ed91853a736 | 841 | py | Python | week8/wee8_additionalexercise_1.py | harshonyou/SOFT1 | 1bd2b0cc26d39c549bec576389bebd0fd011387d | [
"Apache-2.0"
] | null | null | null | week8/wee8_additionalexercise_1.py | harshonyou/SOFT1 | 1bd2b0cc26d39c549bec576389bebd0fd011387d | [
"Apache-2.0"
] | null | null | null | week8/wee8_additionalexercise_1.py | harshonyou/SOFT1 | 1bd2b0cc26d39c549bec576389bebd0fd011387d | [
"Apache-2.0"
] | null | null | null | '''
Exercise 1:
1. Write a recursive function print_all(numbers) that prints all the
elements of list of integers, one per line (use no while loops or for loops).
The parameters numbers to the function is a list of int.
2. Same problem as the last one but prints out the elements in reverse order.
'''
#printing all in... | 24.735294 | 77 | 0.585018 | 128 | 841 | 3.773438 | 0.414063 | 0.115942 | 0.099379 | 0.066253 | 0.273292 | 0.273292 | 0.273292 | 0.033126 | 0 | 0 | 0 | 0.040059 | 0.198573 | 841 | 34 | 78 | 24.735294 | 0.676558 | 0.414982 | 0 | 0.533333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.133333 | false | 0 | 0 | 0 | 0.266667 | 0.733333 | 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 | 0 | 0 | 1 | 0 | 1 |
2aee317192bdbefbce5436893f9e002d371b36d2 | 591 | py | Python | patitasbackend/db/migrations/0003_alter_post_owner.py | nahuelmol/patitas | 75815aa3b388a538f32395d93b1fa25d7fb6de1a | [
"MIT"
] | 1 | 2021-05-23T16:08:41.000Z | 2021-05-23T16:08:41.000Z | patitasbackend/db/migrations/0003_alter_post_owner.py | nahuelmol/patitas | 75815aa3b388a538f32395d93b1fa25d7fb6de1a | [
"MIT"
] | null | null | null | patitasbackend/db/migrations/0003_alter_post_owner.py | nahuelmol/patitas | 75815aa3b388a538f32395d93b1fa25d7fb6de1a | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-09-03 16:16
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('db', '0002_alter_event_lik... | 26.863636 | 133 | 0.675127 | 71 | 591 | 5.478873 | 0.605634 | 0.061697 | 0.071979 | 0.113111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.038961 | 0.218274 | 591 | 21 | 134 | 28.142857 | 0.80303 | 0.072758 | 0 | 0 | 1 | 0 | 0.06044 | 0.040293 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.4 | 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 | 0 | 0 | 0 | 1 |
2af64ebf5e8c5745ee529bfc3454ee62e7d46019 | 1,509 | py | Python | reconnectTextures.py | TheDuckCow/reconnectTextures | 20a6b4177b5b569833b522e02017554d31bbb8a2 | [
"MIT"
] | null | null | null | reconnectTextures.py | TheDuckCow/reconnectTextures | 20a6b4177b5b569833b522e02017554d31bbb8a2 | [
"MIT"
] | null | null | null | reconnectTextures.py | TheDuckCow/reconnectTextures | 20a6b4177b5b569833b522e02017554d31bbb8a2 | [
"MIT"
] | 2 | 2018-09-28T23:54:47.000Z | 2019-05-30T11:45:16.000Z | """
This script is meant to eaisly reconnect textures
by taking all materials on selected objects and
searching and trying to reconnect textures in
another listed directory.
Needs to be given a UI and such
"""
import bpy
import os
def reconnectTextures(matList,directory):
for mat in matList:
for textureSlot in... | 26.017241 | 67 | 0.734924 | 209 | 1,509 | 5.272727 | 0.507177 | 0.019056 | 0.025408 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000798 | 0.169649 | 1,509 | 57 | 68 | 26.473684 | 0.878691 | 0.206759 | 0 | 0 | 0 | 0 | 0.027893 | 0.021694 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.066667 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
2af9318d961295589da7975fe66030e3d74d3f39 | 1,602 | py | Python | make_rtd.py | MatsLanGoH/xdoctest | 65282fdf58b1d4dd82f5f241dba5a2b45c264a60 | [
"Apache-2.0"
] | 142 | 2018-01-11T16:44:16.000Z | 2022-03-30T12:33:59.000Z | make_rtd.py | MatsLanGoH/xdoctest | 65282fdf58b1d4dd82f5f241dba5a2b45c264a60 | [
"Apache-2.0"
] | 113 | 2017-12-19T21:01:10.000Z | 2022-03-25T15:41:15.000Z | make_rtd.py | MatsLanGoH/xdoctest | 65282fdf58b1d4dd82f5f241dba5a2b45c264a60 | [
"Apache-2.0"
] | 8 | 2019-09-06T18:15:21.000Z | 2022-03-24T14:21:55.000Z | """
http://docs.readthedocs.io/en/latest/getting_started.html#in-rst
pip install sphinx sphinx-autobuild
pip install sphinxcontrib-napoleon
pip install sphinx_rtd_theme
"""
def initialize_docs():
from os.path import join
import setup
setupkw = setup.setupkw
full_version = setup.parse_version()
sh... | 24.272727 | 64 | 0.60362 | 187 | 1,602 | 5.037433 | 0.454545 | 0.042463 | 0.03397 | 0.031847 | 0.042463 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004055 | 0.230337 | 1,602 | 65 | 65 | 24.646154 | 0.759935 | 0.197878 | 0 | 0.054054 | 0 | 0 | 0.169586 | 0.019108 | 0 | 0 | 0 | 0.015385 | 0.027027 | 1 | 0.054054 | false | 0 | 0.135135 | 0 | 0.189189 | 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 | 0 | 0 | 0 | 1 |
2afd6a0119dcb6af1130cde20a80ba388e17b2b8 | 3,308 | py | Python | calm/dsl/store/secrets.py | tuxtof/calm-dsl | 5af67435d8304b97e170a690068f2d5975e9bfe6 | [
"Apache-2.0"
] | 37 | 2019-12-23T15:23:20.000Z | 2022-03-15T11:12:11.000Z | calm/dsl/store/secrets.py | gabybeitler/calm-dsl | bac453413cfcf800eef95d89d5a7323c83654a93 | [
"Apache-2.0"
] | 144 | 2020-03-09T11:22:09.000Z | 2022-03-28T21:34:09.000Z | calm/dsl/store/secrets.py | gabybeitler/calm-dsl | bac453413cfcf800eef95d89d5a7323c83654a93 | [
"Apache-2.0"
] | 46 | 2020-01-23T14:28:04.000Z | 2022-03-09T04:17:10.000Z | import datetime
import uuid
import peewee
from ..crypto import Crypto
from calm.dsl.db import get_db_handle
from calm.dsl.log import get_logging_handle
LOG = get_logging_handle(__name__)
class Secret:
"""Secret class implementation"""
@classmethod
def create(cls, name, value, pass_phrase="dslp4ssw0rd")... | 26.677419 | 87 | 0.61971 | 403 | 3,308 | 4.841191 | 0.245658 | 0.09226 | 0.046643 | 0.033316 | 0.408508 | 0.322911 | 0.259354 | 0.259354 | 0.22245 | 0.22245 | 0 | 0.002113 | 0.284764 | 3,308 | 123 | 88 | 26.894309 | 0.822485 | 0.081923 | 0 | 0.506173 | 0 | 0 | 0.026377 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.08642 | false | 0.148148 | 0.074074 | 0 | 0.209877 | 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 | 0 | 0 | 0 | 1 |
2afe75bd8f7b982569f36d6cdfb205f981318464 | 2,702 | py | Python | plugins/splunk/apps/securitybot_alerts/bin/send_bot_alerts.py | mew1033/securitybot | 9f65d35cd31744e73642fd05c5a2dffe17984032 | [
"Apache-2.0"
] | null | null | null | plugins/splunk/apps/securitybot_alerts/bin/send_bot_alerts.py | mew1033/securitybot | 9f65d35cd31744e73642fd05c5a2dffe17984032 | [
"Apache-2.0"
] | null | null | null | plugins/splunk/apps/securitybot_alerts/bin/send_bot_alerts.py | mew1033/securitybot | 9f65d35cd31744e73642fd05c5a2dffe17984032 | [
"Apache-2.0"
] | 1 | 2020-05-29T01:57:52.000Z | 2020-05-29T01:57:52.000Z | #!/usr/local/env python
import sys
import csv
import gzip
import logging
import json
from securitybot.sql import SQLEngine, init_sql
from securitybot.util import create_new_alert
def create_securitybot_task(search_name, hash, username, description, reason, url):
'''
Creates a new Maniphest task with the sec... | 30.704545 | 85 | 0.6151 | 321 | 2,702 | 5.056075 | 0.461059 | 0.030807 | 0.031423 | 0.034504 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001563 | 0.289785 | 2,702 | 87 | 86 | 31.057471 | 0.84419 | 0.19393 | 0 | 0.041667 | 0 | 0 | 0.144845 | 0 | 0 | 0 | 0 | 0.011494 | 0 | 1 | 0.0625 | false | 0.020833 | 0.145833 | 0 | 0.229167 | 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 | 0 | 0 | 0 | 1 |
2aff543ae3252d1fd0469388354997984388a68c | 2,097 | py | Python | setup.py | bigchaindb/pytest-rethinkdb | fbe266c27c4894255813a4d011682dc6d348ab62 | [
"MIT"
] | 2 | 2016-11-18T12:28:44.000Z | 2020-04-13T11:54:39.000Z | setup.py | bigchaindb/pytest-rethinkdb | fbe266c27c4894255813a4d011682dc6d348ab62 | [
"MIT"
] | 3 | 2016-07-25T01:33:45.000Z | 2021-01-19T19:04:41.000Z | setup.py | bigchaindb/pytest-rethinkdb | fbe266c27c4894255813a4d011682dc6d348ab62 | [
"MIT"
] | 5 | 2016-07-22T14:27:06.000Z | 2019-01-31T14:06:56.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import codecs
from setuptools import setup
def read(fname):
file_path = os.path.join(os.path.dirname(__file__), fname)
return codecs.open(file_path, encoding='utf-8').read()
tests_require = [
'coverage',
'pep8',
'pyflakes',
'pylint',
... | 26.544304 | 70 | 0.607058 | 218 | 2,097 | 5.711009 | 0.472477 | 0.137349 | 0.180723 | 0.083534 | 0.043373 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019375 | 0.237005 | 2,097 | 78 | 71 | 26.884615 | 0.75875 | 0.020029 | 0 | 0.029851 | 0 | 0 | 0.480273 | 0.035558 | 0 | 0 | 0 | 0 | 0 | 1 | 0.014925 | false | 0 | 0.044776 | 0 | 0.074627 | 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 | 0 | 0 | 0 | 1 |
630404c6487afb812e1afd4f2474e83ed7076f3b | 812 | py | Python | base/generations.py | jandecaluwe/ca | 33a763a8a8d181801d06fc4f12250173de29a8ca | [
"MIT"
] | 2 | 2015-03-08T04:39:51.000Z | 2016-07-25T21:30:44.000Z | base/generations.py | jandecaluwe/ca | 33a763a8a8d181801d06fc4f12250173de29a8ca | [
"MIT"
] | null | null | null | base/generations.py | jandecaluwe/ca | 33a763a8a8d181801d06fc4f12250173de29a8ca | [
"MIT"
] | null | null | null | class Generations(object):
def __init__(self):
self.age = self.next_age = 0
self.neighbors = [None] * 8
self.live_count = 0
def count_live_neighbors(self):
self.live_count = 0
for n in self.neighbors:
if n.age == 1:
self.live_count += 1
... | 24.606061 | 63 | 0.53202 | 110 | 812 | 3.745455 | 0.281818 | 0.135922 | 0.160194 | 0.145631 | 0.347087 | 0.347087 | 0.26699 | 0.15534 | 0.15534 | 0 | 0 | 0.023033 | 0.358374 | 812 | 32 | 64 | 25.375 | 0.767754 | 0 | 0 | 0.16 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.24 | false | 0.04 | 0 | 0 | 0.28 | 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 | 0 | 0 | 0 | 1 |
6309e0f6ce333473183ecd6ec433b6ace04ebe5c | 1,189 | py | Python | similarities/bits.py | chrsbats/similarities | 17e24c8948214e9095e3102673e8d27434a6fa48 | [
"MIT"
] | 5 | 2015-05-07T07:04:45.000Z | 2018-09-08T04:35:55.000Z | similarities/bits.py | chrsbats/similarities | 17e24c8948214e9095e3102673e8d27434a6fa48 | [
"MIT"
] | null | null | null | similarities/bits.py | chrsbats/similarities | 17e24c8948214e9095e3102673e8d27434a6fa48 | [
"MIT"
] | 2 | 2016-08-09T03:44:23.000Z | 2019-02-07T06:55:37.000Z |
def gray_to_binary(gray,bits=4):
"""converts a given gray code to its binary number"""
mask = 1 << (bits - 1)
binary = gray & mask
for i in xrange(bits-1):
bmask = 1 << (bits - i-1)
gmask = bmask >> 1
if (binary & bmask) ^ ((gray & gmask) << 1):
binary = binary | gm... | 25.297872 | 82 | 0.565181 | 174 | 1,189 | 3.793103 | 0.224138 | 0.037879 | 0.072727 | 0.042424 | 0.178788 | 0.042424 | 0.042424 | 0 | 0 | 0 | 0 | 0.033453 | 0.296047 | 1,189 | 46 | 83 | 25.847826 | 0.755078 | 0.079058 | 0 | 0.176471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.205882 | false | 0 | 0 | 0.029412 | 0.441176 | 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 | 0 | 0 | 0 | 1 |
6311eb15590037ea7313eb9fef678fa2a7794116 | 391 | py | Python | algorithms/data_structures/graphs/breadth_first_search.py | claytod5/algorithms | 565b7aa3c9a8eff95175e6cd48da9f1cf9a6993f | [
"MIT"
] | null | null | null | algorithms/data_structures/graphs/breadth_first_search.py | claytod5/algorithms | 565b7aa3c9a8eff95175e6cd48da9f1cf9a6993f | [
"MIT"
] | null | null | null | algorithms/data_structures/graphs/breadth_first_search.py | claytod5/algorithms | 565b7aa3c9a8eff95175e6cd48da9f1cf9a6993f | [
"MIT"
] | 1 | 2021-10-02T19:56:25.000Z | 2021-10-02T19:56:25.000Z | #!/usr/bin/env python
from collections import deque
def breadth_first_search(graph, start):
search_queue = deque()
search_queue += start
visited = set()
while search_queue:
node = search_queue.popleft()
for each in graph[node]:
if each not in visited:
sea... | 19.55 | 43 | 0.618926 | 48 | 391 | 4.895833 | 0.5625 | 0.234043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.296675 | 391 | 19 | 44 | 20.578947 | 0.854545 | 0.051151 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.083333 | 0 | 0.25 | 0 | 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 | 0 | 0 | 1 |
63180e7433fcc4658f90b385cd9aa22740710181 | 6,080 | py | Python | src/shortcircuit/view/gui_about.py | farshield/shortcircu | 87d45ea85b78e3e7da72b7b44755dc429b4fdf5a | [
"MIT"
] | 35 | 2016-06-22T20:07:31.000Z | 2021-04-07T11:02:08.000Z | src/shortcircuit/view/gui_about.py | farshield/shortcircu | 87d45ea85b78e3e7da72b7b44755dc429b4fdf5a | [
"MIT"
] | 15 | 2016-06-17T09:36:02.000Z | 2020-10-30T11:39:07.000Z | src/shortcircuit/view/gui_about.py | farshield/shortcircu | 87d45ea85b78e3e7da72b7b44755dc429b4fdf5a | [
"MIT"
] | 16 | 2016-10-02T16:09:18.000Z | 2021-05-29T02:51:14.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources\ui\gui_about.ui'
#
# Created: Tue Oct 04 22:22:07 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.4
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_AboutDialog(object):
... | 57.904762 | 574 | 0.732072 | 644 | 6,080 | 6.824534 | 0.285714 | 0.07372 | 0.025484 | 0.035267 | 0.37884 | 0.277588 | 0.214562 | 0.214562 | 0.170648 | 0.170648 | 0 | 0.017238 | 0.160362 | 6,080 | 104 | 575 | 58.461538 | 0.843683 | 0.039145 | 0 | 0.131868 | 1 | 0.021978 | 0.127185 | 0.015598 | 0 | 0 | 0 | 0 | 0 | 1 | 0.021978 | false | 0 | 0.021978 | 0 | 0.054945 | 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 | 0 | 0 | 0 | 1 |
631a42d8289c3d885ad07857b09522b711f3a8a0 | 2,679 | py | Python | tests/athelte_login_test.py | Brotchu/DistributedDopingTest | 50ba29eac3540b43b019ac75d0b2d0339b7b6767 | [
"MIT"
] | null | null | null | tests/athelte_login_test.py | Brotchu/DistributedDopingTest | 50ba29eac3540b43b019ac75d0b2d0339b7b6767 | [
"MIT"
] | null | null | null | tests/athelte_login_test.py | Brotchu/DistributedDopingTest | 50ba29eac3540b43b019ac75d0b2d0339b7b6767 | [
"MIT"
] | null | null | null | # from flask import Flask
from flask_mongoengine import MongoEngine, MongoEngineSessionInterface
from schema import Athlete, Emails
from app import app, db
import json
app.config['MONGODB_SETTINGS'] = {
'db': 'TestCasesDB',
'host': '127.0.0.1',
'port': 27017
}
db.init_app(app)
with app.app_context():
... | 27.336735 | 114 | 0.574841 | 271 | 2,679 | 5.494465 | 0.309963 | 0.047011 | 0.08865 | 0.056414 | 0.681666 | 0.644728 | 0.514439 | 0.48086 | 0.321021 | 0.321021 | 0 | 0.032207 | 0.29302 | 2,679 | 97 | 115 | 27.618557 | 0.75396 | 0.212393 | 0 | 0.369231 | 0 | 0 | 0.265998 | 0.050621 | 0 | 0 | 0 | 0 | 0.030769 | 1 | 0.015385 | false | 0.169231 | 0.061538 | 0 | 0.2 | 0.015385 | 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 | 0 | 0 | 0 | 1 |
6320dbcff7841484f7087b13745ef09f4fcfeab5 | 3,986 | py | Python | specter/client.py | praekelt/specter | 6f00396fcec2b4f816bf410e9b7f6a74ad2a6a17 | [
"MIT"
] | null | null | null | specter/client.py | praekelt/specter | 6f00396fcec2b4f816bf410e9b7f6a74ad2a6a17 | [
"MIT"
] | null | null | null | specter/client.py | praekelt/specter | 6f00396fcec2b4f816bf410e9b7f6a74ad2a6a17 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Specter client library
import hashlib
import base64
import hmac
import urllib
import json
from StringIO import StringIO
from zope.interface import implements
from twisted.web.iweb import IBodyProducer
from twisted.web.client import Agent
from twisted.internet import reactor, defer, protoco... | 26.052288 | 69 | 0.578274 | 425 | 3,986 | 5.371765 | 0.32 | 0.028909 | 0.024529 | 0.014017 | 0.072711 | 0.072711 | 0.072711 | 0.072711 | 0.072711 | 0.072711 | 0 | 0.007218 | 0.304817 | 3,986 | 152 | 70 | 26.223684 | 0.816673 | 0.011039 | 0 | 0.147826 | 0 | 0 | 0.029396 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.026087 | 0.113043 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
6323a472075f83f80bc92d370049866aa30c7b3f | 11,623 | py | Python | nlp4ml/preprocessing.py | penguinwang96825/nlp4ml | 0a2ffcc53fad493584c649f9dc87ab344c3e814b | [
"MIT"
] | null | null | null | nlp4ml/preprocessing.py | penguinwang96825/nlp4ml | 0a2ffcc53fad493584c649f9dc87ab344c3e814b | [
"MIT"
] | null | null | null | nlp4ml/preprocessing.py | penguinwang96825/nlp4ml | 0a2ffcc53fad493584c649f9dc87ab344c3e814b | [
"MIT"
] | null | null | null | import re
import string
import warnings
import preprocessor
import numpy as np
import pandas as pd
import nlpaug.augmenter.word as naw
from sklearn import model_selection
from wordcloud import STOPWORDS
from gensim.parsing.preprocessing import remove_stopwords
warnings.filterwarnings("ignore")
from nlp4ml.utils impor... | 40.63986 | 137 | 0.592876 | 1,895 | 11,623 | 3.562533 | 0.14934 | 0.120278 | 0.171826 | 0.18738 | 0.675455 | 0.621834 | 0.561843 | 0.515924 | 0.498445 | 0.470301 | 0 | 0.0124 | 0.215951 | 11,623 | 285 | 138 | 40.782456 | 0.7283 | 0.050503 | 0 | 0.232143 | 0 | 0 | 0.170807 | 0.004932 | 0.004464 | 0 | 0 | 0 | 0 | 1 | 0.044643 | false | 0 | 0.049107 | 0 | 0.138393 | 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 | 0 | 0 | 0 | 1 |
2d46fee61e31bccb9536c970be41f38b16c28b39 | 2,307 | py | Python | photolab/migrations/0001_initial.py | KiptooRugut/my-gallery | d2efa05e24700101f3889380efe4dda2e6f0038d | [
"MIT"
] | null | null | null | photolab/migrations/0001_initial.py | KiptooRugut/my-gallery | d2efa05e24700101f3889380efe4dda2e6f0038d | [
"MIT"
] | null | null | null | photolab/migrations/0001_initial.py | KiptooRugut/my-gallery | d2efa05e24700101f3889380efe4dda2e6f0038d | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2022-03-28 10:01
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
... | 42.722222 | 128 | 0.583008 | 231 | 2,307 | 5.701299 | 0.30303 | 0.047836 | 0.053151 | 0.083523 | 0.54366 | 0.464692 | 0.464692 | 0.464692 | 0.464692 | 0.464692 | 0 | 0.017272 | 0.272215 | 2,307 | 53 | 129 | 43.528302 | 0.767123 | 0.018639 | 0 | 0.478261 | 1 | 0 | 0.101238 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.043478 | 0 | 0.130435 | 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 | 0 | 0 | 0 | 1 |
2d509a34013485a8ddf2483e06d87b70b153b255 | 251 | py | Python | db.py | kimuson/docker-vscode | 639f291b8cc14a2843274e9254c3eb1bef05c4f4 | [
"MIT"
] | null | null | null | db.py | kimuson/docker-vscode | 639f291b8cc14a2843274e9254c3eb1bef05c4f4 | [
"MIT"
] | null | null | null | db.py | kimuson/docker-vscode | 639f291b8cc14a2843274e9254c3eb1bef05c4f4 | [
"MIT"
] | null | null | null | import sqlite3
conn = sqlite3.connect('books.sqlite')
cursor = conn.cursor()
sql_query = """ CREATE TABLE book (
id integer PRIMARY KEY,
author text NOT NULL,
language text NOT NULL,
title text NOT NULL
)"""
cursor.execute(sql_query) | 20.916667 | 38 | 0.697211 | 35 | 251 | 4.942857 | 0.657143 | 0.121387 | 0.190751 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00995 | 0.199203 | 251 | 12 | 39 | 20.916667 | 0.850746 | 0 | 0 | 0 | 0 | 0 | 0.555556 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.1 | 0 | 0.1 | 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 | 0 | 0 | 0 | 1 |
2d552a22203d1860d9cace8b05315b9933806288 | 808 | py | Python | tb_extractor/aggregator.py | eageby/tb-extractor | 76488290421cf349e9b9c579712367329ef32531 | [
"MIT"
] | null | null | null | tb_extractor/aggregator.py | eageby/tb-extractor | 76488290421cf349e9b9c579712367329ef32531 | [
"MIT"
] | null | null | null | tb_extractor/aggregator.py | eageby/tb-extractor | 76488290421cf349e9b9c579712367329ef32531 | [
"MIT"
] | null | null | null | from tb_extractor import extractor
from pathlib import Path
import numpy as np
import pandas as pd
def upsample(*frames):
indices = np.arange(1 + max([frame.index.max() for frame in frames]))
return [frame.astype(float).reindex(indices).interpolate('index', limit_direction='both') if frame.index.size > 1 else ... | 36.727273 | 150 | 0.690594 | 119 | 808 | 4.638655 | 0.394958 | 0.057971 | 0.072464 | 0.115942 | 0.318841 | 0.25 | 0.119565 | 0.119565 | 0.119565 | 0 | 0 | 0.011994 | 0.174505 | 808 | 21 | 151 | 38.47619 | 0.815592 | 0 | 0 | 0 | 0 | 0 | 0.017327 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.222222 | 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 | 0 | 0 | 1 | 0 | 0 | 1 |
2d56e95e80b6c607cc7cec6beb6793153fcabb63 | 794 | py | Python | saefportal/saef/migrations/0003_datasetsessionmetadata.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | 4 | 2020-12-16T13:14:26.000Z | 2022-03-26T08:54:12.000Z | saefportal/saef/migrations/0003_datasetsessionmetadata.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | 1 | 2022-03-26T09:09:04.000Z | 2022-03-26T09:09:04.000Z | saefportal/saef/migrations/0003_datasetsessionmetadata.py | harry-consulting/SAEF | 12ef43bbcc3178b8a988e21c1bef035881cf6e6d | [
"BSD-2-Clause"
] | 1 | 2020-12-16T13:20:17.000Z | 2020-12-16T13:20:17.000Z | # Generated by Django 3.0.3 on 2020-08-19 11:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('saef', '0002_jobsessionmetadata'),
]
operations = [
migrations.CreateModel(
name='DatasetSessio... | 34.521739 | 166 | 0.632242 | 81 | 794 | 6.074074 | 0.666667 | 0.04878 | 0.056911 | 0.089431 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035656 | 0.222922 | 794 | 22 | 167 | 36.090909 | 0.76175 | 0.056675 | 0 | 0 | 1 | 0 | 0.211513 | 0.060241 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.3125 | 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 | 0 | 0 | 0 | 1 |
2d5b85062527c06461db85010855d886b755f4e4 | 371 | py | Python | contentcuration/contentcuration/tests/utils.py | neo640228/studio | 96221a4c96b7ba4db90500b5d11c7e5d2a145ac4 | [
"MIT"
] | null | null | null | contentcuration/contentcuration/tests/utils.py | neo640228/studio | 96221a4c96b7ba4db90500b5d11c7e5d2a145ac4 | [
"MIT"
] | 4 | 2016-05-06T17:19:30.000Z | 2019-03-15T01:51:24.000Z | contentcuration/contentcuration/tests/utils.py | neo640228/studio | 96221a4c96b7ba4db90500b5d11c7e5d2a145ac4 | [
"MIT"
] | 4 | 2016-10-18T22:49:08.000Z | 2019-09-17T11:20:51.000Z | #!/usr/bin/env python
import sys
import pytest
# Mark the test class or function as a slow test, where we avoid running it
# in a normal test run due to its long running time.
# Use py.test --includeslowtests to run these kinds of tests.
slowtest = pytest.mark.skipif(
"--includeslowtests" not in sys.argv,
rea... | 28.538462 | 75 | 0.733154 | 62 | 371 | 4.387097 | 0.725806 | 0.073529 | 0.066176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.188679 | 371 | 12 | 76 | 30.916667 | 0.903654 | 0.552561 | 0 | 0 | 0 | 0 | 0.37037 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
2d64269e2cf241a939fb228758888bd3c75da130 | 387 | py | Python | scripts/module_load.py | mmeeshari/PongoKit | d1ad42c4692fd924ed4cf1c03bd152a71e410945 | [
"MIT"
] | 3 | 2020-02-06T11:24:06.000Z | 2020-04-16T09:09:18.000Z | scripts/module_load.py | AndroidOniPhone/PongoKit | 0862ef71a732c8aafd0a5f13305b25c5c5af7884 | [
"MIT"
] | null | null | null | scripts/module_load.py | AndroidOniPhone/PongoKit | 0862ef71a732c8aafd0a5f13305b25c5c5af7884 | [
"MIT"
] | null | null | null | import sys
data = open(sys.argv[1], "rb").read()
import usb.core
dev = usb.core.find(idVendor=0x05ac, idProduct=0x4141)
if dev is None:
raise ValueError('Device not found')
dev.set_configuration()
dev.ctrl_transfer(0x21, 2, 0, 0, 0)
dev.ctrl_transfer(0x21, 1, 0, 0, 0)
dev.write(2,data,100000)
if len(data) % 512 ==... | 25.8 | 54 | 0.689922 | 70 | 387 | 3.757143 | 0.542857 | 0.038023 | 0.171103 | 0.21673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121662 | 0.129199 | 387 | 14 | 55 | 27.642857 | 0.658754 | 0 | 0 | 0 | 0 | 0 | 0.069767 | 0 | 0 | 0 | 0.062016 | 0 | 0 | 1 | 0 | false | 0 | 0.153846 | 0 | 0.153846 | 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 | 0 | 0 | 0 | 1 |
2d67fdb82423d9a2bc1b6afa14823dcc267e0abb | 458 | py | Python | leetcode/1903_largest_odd_number_in_string.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | 3 | 2018-05-10T09:56:49.000Z | 2020-11-07T18:09:42.000Z | leetcode/1903_largest_odd_number_in_string.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | null | null | null | leetcode/1903_largest_odd_number_in_string.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class Solution:
def largestOddNumber(self, num: str) -> str:
for index, digit in enumerate(reversed(num)):
if int(digit) % 2 == 1:
return num[:len(num) - index]
return ''
if __name__ == '__main__':
solution = Solution()
assert '5' == so... | 26.941176 | 56 | 0.587336 | 48 | 458 | 5.4375 | 0.604167 | 0.275862 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.058651 | 0.255459 | 458 | 16 | 57 | 28.625 | 0.706745 | 0.045852 | 0 | 0 | 0 | 0 | 0.057471 | 0 | 0 | 0 | 0 | 0 | 0.272727 | 1 | 0.090909 | false | 0 | 0 | 0 | 0.363636 | 0 | 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 | 0 | 0 | 1 |
2d718f1a72d8afef85180ea69154d2ebae5edf93 | 618 | py | Python | setup.py | mkorvas/hamster-bridge | b44358978f1ea7e3315dd3d0e9d270b10136470a | [
"MIT-0"
] | 11 | 2015-02-03T07:49:39.000Z | 2019-12-27T10:02:15.000Z | setup.py | mkorvas/hamster-bridge | b44358978f1ea7e3315dd3d0e9d270b10136470a | [
"MIT-0"
] | 23 | 2015-02-17T06:03:04.000Z | 2020-01-25T07:41:43.000Z | setup.py | mkorvas/hamster-bridge | b44358978f1ea7e3315dd3d0e9d270b10136470a | [
"MIT-0"
] | 7 | 2015-02-23T10:50:39.000Z | 2020-01-02T11:59:43.000Z | #!/usr/bin/env python
from setuptools import setup
setup(
name='hamster-bridge',
description='let your hamster log your work to your favorite bugtracker',
version='0.7.0',
author='Lars Kreisz',
author_email='lars.kreisz@gmail.com',
license='MIT',
url='https://github.com/kraiz/hamster-bridg... | 29.428571 | 79 | 0.673139 | 76 | 618 | 5.355263 | 0.697368 | 0.191646 | 0.09828 | 0.127764 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011561 | 0.160194 | 618 | 20 | 80 | 30.9 | 0.77264 | 0.032362 | 0 | 0 | 0 | 0 | 0.470687 | 0.075377 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.058824 | 0 | 0.058824 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
2d767898e57124b993e3c605bcb721d426cee997 | 269 | py | Python | anella/tenor_client/drafts.py | Fundacio-i2CAT/ai4.0-tenor | cafb6127f0c9c4f0a8df1eb48cd4fa1a0ee1aed1 | [
"curl",
"Vim",
"Ruby",
"Apache-2.0"
] | null | null | null | anella/tenor_client/drafts.py | Fundacio-i2CAT/ai4.0-tenor | cafb6127f0c9c4f0a8df1eb48cd4fa1a0ee1aed1 | [
"curl",
"Vim",
"Ruby",
"Apache-2.0"
] | null | null | null | anella/tenor_client/drafts.py | Fundacio-i2CAT/ai4.0-tenor | cafb6127f0c9c4f0a8df1eb48cd4fa1a0ee1aed1 | [
"curl",
"Vim",
"Ruby",
"Apache-2.0"
] | null | null | null | import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(
paramiko.AutoAddPolicy())
ssh.connect('172.24.4.53', username='root', key_filename='keys/anella')
stdin, stdout, stderr = ssh.exec_command("uptime")
print stdout.readlines()
ssh.close()
| 22.416667 | 71 | 0.754647 | 37 | 269 | 5.324324 | 0.783784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032787 | 0.092937 | 269 | 11 | 72 | 24.454545 | 0.77459 | 0 | 0 | 0 | 0 | 0 | 0.118959 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.125 | null | null | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
2d809a359b2d5ef4e869d4c335e9a4d62a635736 | 13,891 | py | Python | sleekxmpp/plugins/stanza_pubsub.py | aristanetworks/SleekXMPP | 91f53bf1964a564f6f12477a31884e9ec38cef75 | [
"MIT"
] | null | null | null | sleekxmpp/plugins/stanza_pubsub.py | aristanetworks/SleekXMPP | 91f53bf1964a564f6f12477a31884e9ec38cef75 | [
"MIT"
] | null | null | null | sleekxmpp/plugins/stanza_pubsub.py | aristanetworks/SleekXMPP | 91f53bf1964a564f6f12477a31884e9ec38cef75 | [
"MIT"
] | 1 | 2019-12-05T12:10:16.000Z | 2019-12-05T12:10:16.000Z | from .. xmlstream.stanzabase import registerStanzaPlugin, ElementBase, ET, JID
from .. stanza.iq import Iq
from .. stanza.message import Message
from .. basexmpp import basexmpp
from .. xmlstream.xmlstream import XMLStream
import logging
from . import xep_0004
class PubsubState(ElementBase):
namespace = 'http://jabb... | 24.983813 | 78 | 0.726874 | 1,602 | 13,891 | 6.157928 | 0.094881 | 0.088799 | 0.075114 | 0.086974 | 0.700355 | 0.684136 | 0.672681 | 0.648758 | 0.52296 | 0.415813 | 0 | 0.002486 | 0.13138 | 13,891 | 555 | 79 | 25.028829 | 0.8151 | 0.022101 | 0 | 0.605634 | 0 | 0 | 0.164996 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.093897 | false | 0 | 0.016432 | 0.021127 | 0.779343 | 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 | 0 | 1 | 0 | 0 | 1 |
2d81a6f9d432b3ae551382aeb7e74776e57af9a9 | 7,107 | py | Python | hybrid_django_react/django_settings_content_changes.py | lluc2397/hybrid-django-react | 2b64f524ed74be334f5e8da54048d7c604f773f0 | [
"MIT"
] | 4 | 2021-12-15T04:39:33.000Z | 2022-03-07T09:44:53.000Z | hybrid_django_react/django_settings_content_changes.py | lluc2397/hybrid-django-react | 2b64f524ed74be334f5e8da54048d7c604f773f0 | [
"MIT"
] | 2 | 2022-01-19T14:55:34.000Z | 2022-02-01T17:48:12.000Z | hybrid_django_react/django_settings_content_changes.py | lluc2397/hybrid-django-react | 2b64f524ed74be334f5e8da54048d7c604f773f0 | [
"MIT"
] | 2 | 2021-12-15T04:57:39.000Z | 2022-01-23T19:11:32.000Z | def get_settings_dot_py_changes(config):
"""Return dictionaries with changed strings of settings.py"""
INSERTED = { # Value inserted before line with key
"from pathlib import Path": "import sys, os\n",
"# Quick-start development settings": (
'# Environment flag\n'
... | 46.45098 | 159 | 0.532433 | 715 | 7,107 | 5.097902 | 0.353846 | 0.01701 | 0.060631 | 0.072977 | 0.07572 | 0.046091 | 0.019204 | 0 | 0 | 0 | 0 | 0.008678 | 0.318981 | 7,107 | 153 | 160 | 46.45098 | 0.744421 | 0.023357 | 0 | 0.101351 | 0 | 0.006757 | 0.713506 | 0.348127 | 0 | 0 | 0 | 0 | 0 | 1 | 0.006757 | false | 0.02027 | 0.013514 | 0 | 0.027027 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
2d87e032a05e0fb41a57ea76ef68de006037eedb | 687 | py | Python | garage_sale/security.py | ShaunJorstad/Simple-Ecommerce-Site | efaaffe14b5a35cbbf879bd3574a1d114a1c2947 | [
"MIT"
] | null | null | null | garage_sale/security.py | ShaunJorstad/Simple-Ecommerce-Site | efaaffe14b5a35cbbf879bd3574a1d114a1c2947 | [
"MIT"
] | null | null | null | garage_sale/security.py | ShaunJorstad/Simple-Ecommerce-Site | efaaffe14b5a35cbbf879bd3574a1d114a1c2947 | [
"MIT"
] | null | null | null | import base64
import os
from cryptography.fernet import Fernet
from passlib.hash import argon2
from garage_sale import server_dir
pep_file = os.path.join(server_dir, "../pepper.bin")
key = Fernet.generate_key()
pep = Fernet(key) #
# WRITE Pepper
with open("../pepper.bin", 'wb') as file:
file.write(key)
with o... | 20.205882 | 52 | 0.676856 | 105 | 687 | 4.352381 | 0.457143 | 0.039387 | 0.052516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042857 | 0.184862 | 687 | 33 | 53 | 20.818182 | 0.773214 | 0.017467 | 0 | 0.090909 | 0 | 0 | 0.052239 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0.136364 | 0.227273 | 0 | 0.409091 | 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 | 0 | 0 | 0 | 1 |
2d91348e156239c1cef0360153e79bb6dbd22f6b | 420 | py | Python | pluralsight-creating-a-model-layer-for-flask/simple_forum/models/tag.py | rockman/learn-python-flask | cd8eb5731288e66f99d5eab5dd55e82a39ace736 | [
"MIT"
] | null | null | null | pluralsight-creating-a-model-layer-for-flask/simple_forum/models/tag.py | rockman/learn-python-flask | cd8eb5731288e66f99d5eab5dd55e82a39ace736 | [
"MIT"
] | null | null | null | pluralsight-creating-a-model-layer-for-flask/simple_forum/models/tag.py | rockman/learn-python-flask | cd8eb5731288e66f99d5eab5dd55e82a39ace736 | [
"MIT"
] | null | null | null |
from simple_forum.db import db
tags_to_posts = db.Table('tags_to_posts',
db.Column('tag_id', db.Integer, db.ForeignKey('tag.id')),
db.Column('post_id', db.Integer, db.ForeignKey('post.id'))
)
class Tag(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.Text, nullable=False)... | 30 | 99 | 0.7 | 67 | 420 | 4.238806 | 0.41791 | 0.112676 | 0.116197 | 0.091549 | 0.161972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.128571 | 420 | 14 | 99 | 30 | 0.775956 | 0 | 0 | 0 | 0 | 0 | 0.111905 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.111111 | 0 | 0.555556 | 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 | 0 | 1 | 0 | 0 | 1 |
2d99429784a1ec5574baee4d39e278c3f0f154e2 | 2,594 | py | Python | pyramid_wiring/tests/test_mapper.py | veeti/pyramid_wiring | 517a2366b9816fa32531376ba26da0a04c309be0 | [
"MIT"
] | 1 | 2015-06-02T16:59:52.000Z | 2015-06-02T16:59:52.000Z | pyramid_wiring/tests/test_mapper.py | veeti/pyramid_wiring | 517a2366b9816fa32531376ba26da0a04c309be0 | [
"MIT"
] | null | null | null | pyramid_wiring/tests/test_mapper.py | veeti/pyramid_wiring | 517a2366b9816fa32531376ba26da0a04c309be0 | [
"MIT"
] | null | null | null | from pyramid.config import Configurator
from pyramid.request import Request
from pyramid.traversal import DefaultRootFactory
from pytest import fixture, mark
from webtest import TestApp
from wiring import Graph, injected
from pyramid_wiring.mapper import WiringViewMapper
# Function-based views
def view(request):
... | 23.160714 | 71 | 0.704703 | 296 | 2,594 | 5.966216 | 0.246622 | 0.05436 | 0.08154 | 0.09966 | 0.344281 | 0.248018 | 0.236693 | 0.216308 | 0.160815 | 0.15402 | 0 | 0 | 0.195066 | 2,594 | 111 | 72 | 23.369369 | 0.845785 | 0.032768 | 0 | 0.297297 | 0 | 0 | 0.0627 | 0 | 0 | 0 | 0 | 0 | 0.189189 | 1 | 0.202703 | false | 0 | 0.094595 | 0.067568 | 0.486486 | 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 | 0 | 0 | 0 | 1 |
2dc05be70117761b920004a89bf3704c737df0c2 | 715 | py | Python | evoke/lib/FLOAT.py | howiemac/evoke5 | 430d6dfd719f8c88a4c3de2b735f8736187ff19b | [
"BSD-3-Clause"
] | null | null | null | evoke/lib/FLOAT.py | howiemac/evoke5 | 430d6dfd719f8c88a4c3de2b735f8736187ff19b | [
"BSD-3-Clause"
] | null | null | null | evoke/lib/FLOAT.py | howiemac/evoke5 | 430d6dfd719f8c88a4c3de2b735f8736187ff19b | [
"BSD-3-Clause"
] | null | null | null | """
This module implements the FLOAT class, used (sparingly please!) for real number storage and manipulation.
(Ian Howie Mackenzie - April 2009, July 2017)
"""
class FLOAT(float):
"""
simple float handling
"""
def __new__(self, x=0.0):
""" create our (immutable) float
force invalid x to... | 21.666667 | 106 | 0.544056 | 88 | 715 | 4.227273 | 0.647727 | 0.056452 | 0.043011 | 0.069892 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.031447 | 0.332867 | 715 | 32 | 107 | 22.34375 | 0.748428 | 0.397203 | 0 | 0 | 0 | 0 | 0.028424 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0 | 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 | 0 | 0 | 1 | 0 | 0 | 1 |
2dc239de22bc91fe7d7633a14d467911635b69fa | 1,108 | py | Python | share/migrations/0018_store_favicons.py | felliott/SHARE | 8fd60ff4749349c9b867f6188650d71f4f0a1a56 | [
"Apache-2.0"
] | null | null | null | share/migrations/0018_store_favicons.py | felliott/SHARE | 8fd60ff4749349c9b867f6188650d71f4f0a1a56 | [
"Apache-2.0"
] | null | null | null | share/migrations/0018_store_favicons.py | felliott/SHARE | 8fd60ff4749349c9b867f6188650d71f4f0a1a56 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-01-19 16:18
from __future__ import unicode_literals
import db.deletion
from django.conf import settings
from django.db import migrations, models
import share.models.core
class Migration(migrations.Migration):
dependencies = [
('share', '0017_me... | 30.777778 | 137 | 0.620939 | 115 | 1,108 | 5.843478 | 0.608696 | 0.049107 | 0.068452 | 0.080357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.024272 | 0.256318 | 1,108 | 35 | 138 | 31.657143 | 0.791262 | 0.060469 | 0 | 0.178571 | 1 | 0 | 0.072254 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.178571 | 0 | 0.285714 | 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 | 0 | 0 | 0 | 1 |
2dc60a2f4cd38a833e723a517cf0c27e3f2fff37 | 3,212 | py | Python | accessory_functions.py | diem-ai/topic-modeling | 30907f170247184ae02e87ae6ef516f58c484e1f | [
"MIT"
] | null | null | null | accessory_functions.py | diem-ai/topic-modeling | 30907f170247184ae02e87ae6ef516f58c484e1f | [
"MIT"
] | null | null | null | accessory_functions.py | diem-ai/topic-modeling | 30907f170247184ae02e87ae6ef516f58c484e1f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
## Accessory functions for NLP
import pandas as pd
import string
import re
import nltk
from nltk.corpus import stopwords, wordnet
from nltk.tokenize import word_tokenize
from nltk.stem.wordnet import WordNetLemmatizer
### Set these according to your setup ###
nltk_path = 'data/'
goo... | 27.930435 | 106 | 0.655044 | 420 | 3,212 | 4.892857 | 0.4 | 0.027251 | 0.03747 | 0.023358 | 0.017518 | 0.017518 | 0.017518 | 0 | 0 | 0 | 0 | 0.004872 | 0.233188 | 3,212 | 115 | 107 | 27.930435 | 0.829476 | 0.106164 | 0 | 0.036364 | 0 | 0 | 0.071025 | 0.029633 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.145455 | null | null | 0.036364 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
2dc60e7fb9754f6c1fe1038ac2014a00fa330af7 | 19,560 | py | Python | sli/tools.py | PaloAltoNetworks/SLI | 0bf0aa449e45fdfd6553d69776d4fe0e8b52675e | [
"Apache-2.0"
] | null | null | null | sli/tools.py | PaloAltoNetworks/SLI | 0bf0aa449e45fdfd6553d69776d4fe0e8b52675e | [
"Apache-2.0"
] | 2 | 2021-09-10T17:42:18.000Z | 2021-09-10T18:57:59.000Z | sli/tools.py | PaloAltoNetworks/SLI | 0bf0aa449e45fdfd6553d69776d4fe0e8b52675e | [
"Apache-2.0"
] | null | null | null | import os
from os.path import expanduser
from panforge import Report
from getpass import getpass
import socket
from jinja2 import Environment
import jmespath
from lxml import etree
from io import BytesIO
from pathlib import Path
from sli.errors import AppSkilletNotFoundException
from skilletlib import Skillet
from skil... | 36.022099 | 131 | 0.599233 | 2,533 | 19,560 | 4.491512 | 0.163443 | 0.00835 | 0.012306 | 0.01046 | 0.172277 | 0.123583 | 0.113387 | 0.08025 | 0.069175 | 0.057924 | 0 | 0.00233 | 0.297751 | 19,560 | 542 | 132 | 36.088561 | 0.825932 | 0.171881 | 0 | 0.258152 | 0 | 0.002717 | 0.155481 | 0.019687 | 0 | 0 | 0 | 0 | 0 | 1 | 0.054348 | false | 0.05163 | 0.035326 | 0 | 0.160326 | 0.095109 | 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 | 0 | 0 | 0 | 1 |
2dcab64a4b3aca2aec29672766eaf519c0ea76c5 | 641 | py | Python | crop_rotator/rotator/migrations/0026_auto_20210606_1500.py | Bahusson/crop_rotator | c1d86d36ce1867a84b927708f92c62c7815250a4 | [
"MIT"
] | 1 | 2021-05-08T07:04:45.000Z | 2021-05-08T07:04:45.000Z | crop_rotator/rotator/migrations/0026_auto_20210606_1500.py | Bahusson/crop_rotator | c1d86d36ce1867a84b927708f92c62c7815250a4 | [
"MIT"
] | 80 | 2020-11-18T20:35:12.000Z | 2021-06-13T08:08:36.000Z | crop_rotator/rotator/migrations/0026_auto_20210606_1500.py | Bahusson/crop_rotator | c1d86d36ce1867a84b927708f92c62c7815250a4 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-06-06 13:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rotator', '0025_remove_cropinteraction_is_positive'),
]
operations = [
migrations.AlterField(
model_name='cropinteraction',
... | 33.736842 | 267 | 0.633385 | 74 | 641 | 5.391892 | 0.72973 | 0.035088 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.055888 | 0.218409 | 641 | 18 | 268 | 35.611111 | 0.740519 | 0.070203 | 0 | 0 | 1 | 0 | 0.341751 | 0.065657 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.083333 | 0 | 0.333333 | 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 | 0 | 0 | 0 | 1 |
2dd7eeb4a392db31ceb5631acbd11bffce428448 | 4,656 | py | Python | Assets/FbxExporters/Integrations/Autodesk/maya/scripts/UnityFbxForMaya/basetestcase.py | noura-kh/WorkShop2_FinalTables | 4a49b72c5b96c5257df443fa85b15a57277ef93e | [
"MIT"
] | null | null | null | Assets/FbxExporters/Integrations/Autodesk/maya/scripts/UnityFbxForMaya/basetestcase.py | noura-kh/WorkShop2_FinalTables | 4a49b72c5b96c5257df443fa85b15a57277ef93e | [
"MIT"
] | null | null | null | Assets/FbxExporters/Integrations/Autodesk/maya/scripts/UnityFbxForMaya/basetestcase.py | noura-kh/WorkShop2_FinalTables | 4a49b72c5b96c5257df443fa85b15a57277ef93e | [
"MIT"
] | null | null | null | ########################################################################
# Copyright (c) 2017 Unity Technologies. All rights reserved.
# NOTICE: All information contained herein is, and remains
# the property of Unity Technologies Aps. and its suppliers,
# if any. The intellectual and technical concept... | 37.548387 | 119 | 0.609107 | 485 | 4,656 | 5.713402 | 0.387629 | 0.015157 | 0.018044 | 0.025262 | 0.12703 | 0.12703 | 0.068567 | 0.068567 | 0.068567 | 0.068567 | 0 | 0.005531 | 0.262242 | 4,656 | 123 | 120 | 37.853659 | 0.801164 | 0.183419 | 0 | 0.123077 | 0 | 0 | 0.125349 | 0 | 0 | 0 | 0 | 0 | 0.015385 | 0 | null | null | 0.015385 | 0.107692 | null | null | 0.015385 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
2dda4c0a9b5c4b79d47a7735c3975ab46aaa80f2 | 447 | py | Python | dockerdetect/detect.py | agmarx/docker-detect | 0725ca39593fc3b99507f21cddbab04915d50ff0 | [
"MIT"
] | null | null | null | dockerdetect/detect.py | agmarx/docker-detect | 0725ca39593fc3b99507f21cddbab04915d50ff0 | [
"MIT"
] | null | null | null | dockerdetect/detect.py | agmarx/docker-detect | 0725ca39593fc3b99507f21cddbab04915d50ff0 | [
"MIT"
] | 1 | 2019-11-23T15:46:16.000Z | 2019-11-23T15:46:16.000Z | import logging
import os
import re
logger = logging.getLogger(__name__)
r_docker = re.compile("\d+:[\w=]+:/docker(-[ce]e)?/\w+")
def is_docker_cgroup():
pid = os.getpid()
cgroup_path = os.path.join("/proc/", str(pid), "/cgroup")
if not os.path.isfile(cgroup_path):
return False
with open(p... | 19.434783 | 61 | 0.646532 | 68 | 447 | 4.044118 | 0.573529 | 0.050909 | 0.101818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.192394 | 447 | 22 | 62 | 20.318182 | 0.761773 | 0 | 0 | 0 | 0 | 0 | 0.098434 | 0.069351 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.214286 | 0.071429 | 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 | 0 | 0 | 1 | 0 | 0 | 1 |
2de727cf30ab1ab5d5cb8c7247b32f2c45b86f55 | 2,520 | py | Python | blog/migrations/0002_auto_20201012_2033.py | andreztz/blog | 00242886331b89c3b8a638a649c70b342f5a58b6 | [
"MIT"
] | null | null | null | blog/migrations/0002_auto_20201012_2033.py | andreztz/blog | 00242886331b89c3b8a638a649c70b342f5a58b6 | [
"MIT"
] | 7 | 2020-10-12T21:17:12.000Z | 2020-10-18T15:06:51.000Z | blog/migrations/0002_auto_20201012_2033.py | andreztz/blog | 00242886331b89c3b8a638a649c70b342f5a58b6 | [
"MIT"
] | 3 | 2020-10-13T15:06:06.000Z | 2020-10-17T10:55:36.000Z | # Generated by Django 3.1.2 on 2020-10-12 20:33
import ckeditor.fields
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Categ... | 33.6 | 134 | 0.551984 | 225 | 2,520 | 6.053333 | 0.373333 | 0.052863 | 0.076358 | 0.099853 | 0.375184 | 0.32746 | 0.070485 | 0 | 0 | 0 | 0 | 0.015643 | 0.315079 | 2,520 | 74 | 135 | 34.054054 | 0.773465 | 0.017857 | 0 | 0.382353 | 1 | 0 | 0.123736 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.044118 | 0 | 0.088235 | 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 | 0 | 0 | 0 | 1 |
2decb4c21e2e393652c63e8a8f4153685167000d | 447 | py | Python | raster_compare/base/__init__.py | jomey/raster_compare | 5199005d01f569e187e944d62af0ea70c383d16a | [
"MIT"
] | 1 | 2021-11-13T12:59:53.000Z | 2021-11-13T12:59:53.000Z | raster_compare/base/__init__.py | jomey/raster_compare | 5199005d01f569e187e944d62af0ea70c383d16a | [
"MIT"
] | null | null | null | raster_compare/base/__init__.py | jomey/raster_compare | 5199005d01f569e187e944d62af0ea70c383d16a | [
"MIT"
] | null | null | null | from .median_absolute_deviation import MedianAbsoluteDeviation
from .pdal_mapper import PdalMapper
from .pixel_classifier import PixelClassifier
from .raster_data_difference import RasterDataDifference
from .raster_file import RasterFile
from .raster_file_compare import RasterFileCompare
__all__ = [
'MedianAbsolut... | 27.9375 | 62 | 0.807606 | 40 | 447 | 8.7 | 0.525 | 0.086207 | 0.08046 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.131991 | 447 | 15 | 63 | 29.8 | 0.896907 | 0 | 0 | 0 | 0 | 0 | 0.212528 | 0.051454 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 0.428571 | 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 | 0 | 0 | 0 | 1 |
2def10fc3e0d009739e51797b641b4c8bd14c00e | 1,907 | py | Python | src/main/python/geeksforgeeks/list/sum-of-two-linked-lists.py | sonymoon/algorithm | cc2a9e0125fc64bdbf6549034bad6482d2027ea2 | [
"Apache-2.0"
] | null | null | null | src/main/python/geeksforgeeks/list/sum-of-two-linked-lists.py | sonymoon/algorithm | cc2a9e0125fc64bdbf6549034bad6482d2027ea2 | [
"Apache-2.0"
] | null | null | null | src/main/python/geeksforgeeks/list/sum-of-two-linked-lists.py | sonymoon/algorithm | cc2a9e0125fc64bdbf6549034bad6482d2027ea2 | [
"Apache-2.0"
] | null | null | null | from math import fabs
class Node:
def __init__(self, val):
self.val = val
self.next = None
carry, result, diffNode = 0, None, None
def getSizeOfList(head):
if not head:
return 0
count = 0
p = head
while p:
count += 1
p = p.next
return count
def pus... | 20.073684 | 46 | 0.590456 | 233 | 1,907 | 4.815451 | 0.223176 | 0.022282 | 0.026738 | 0.085562 | 0.105169 | 0.105169 | 0.105169 | 0.105169 | 0.105169 | 0.105169 | 0 | 0.048025 | 0.32302 | 1,907 | 94 | 47 | 20.287234 | 0.821069 | 0 | 0 | 0.168831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.012987 | null | null | 0.012987 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
2df6685852146a751202e0be37341136df5e1181 | 30,218 | py | Python | app.py | 3cor/spw | c8b23ee2bc56c1390c13c1f70ae8bc769d961801 | [
"MIT"
] | null | null | null | app.py | 3cor/spw | c8b23ee2bc56c1390c13c1f70ae8bc769d961801 | [
"MIT"
] | null | null | null | app.py | 3cor/spw | c8b23ee2bc56c1390c13c1f70ae8bc769d961801 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from PyQt5 import QtCore, QtGui, QtWidgets
import modules.passgen as pg
import modules.mongodb as mg
import modules.xcrypt as xc
import hashlib
import os
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(80... | 48.117834 | 607 | 0.673109 | 3,078 | 30,218 | 6.552956 | 0.128005 | 0.038622 | 0.039663 | 0.005553 | 0.278136 | 0.144522 | 0.123153 | 0.081111 | 0.0647 | 0.048736 | 0 | 0.011715 | 0.206235 | 30,218 | 627 | 608 | 48.194577 | 0.829192 | 0.008803 | 0 | 0.154562 | 0 | 0.011173 | 0.130115 | 0.014665 | 0 | 0 | 0 | 0 | 0 | 1 | 0.057728 | false | 0.176909 | 0.013035 | 0 | 0.085661 | 0.040968 | 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 | 0 | 0 | 0 | 1 |
2dfbbc2aff554a092ccb8506917e0cac56c77802 | 1,554 | py | Python | django_b2storage/tests/mocks.py | Dopigo/django-b2storage | 429a2d6f9b52a4a96dc54768b10f669282f5d5d2 | [
"MIT"
] | 7 | 2017-02-18T20:49:26.000Z | 2021-06-16T02:45:28.000Z | django_b2storage/tests/mocks.py | Dopigo/django-b2storage | 429a2d6f9b52a4a96dc54768b10f669282f5d5d2 | [
"MIT"
] | 2 | 2020-02-11T23:41:23.000Z | 2020-06-05T17:36:45.000Z | django_b2storage/tests/mocks.py | Dopigo/django-b2storage | 429a2d6f9b52a4a96dc54768b10f669282f5d5d2 | [
"MIT"
] | 7 | 2017-04-12T15:26:50.000Z | 2019-10-04T13:25:49.000Z | import json
from django.conf import settings
from django.core.files.base import ContentFile
from .b2settings import B2TestSettings
settings.configure(**B2TestSettings)
from ..backblaze_b2 import B2Storage, encode, decode, ConnectionInfo
mock_upload_data = {
"bucketId" : settings.B2_BUCKET_ID,
"uploadUrl" :... | 22.2 | 68 | 0.678893 | 164 | 1,554 | 6.280488 | 0.439024 | 0.07767 | 0.042718 | 0.066019 | 0.309709 | 0.237864 | 0.237864 | 0.116505 | 0.081553 | 0 | 0 | 0.041096 | 0.201416 | 1,554 | 69 | 69 | 22.521739 | 0.78888 | 0 | 0 | 0.28 | 0 | 0 | 0.219434 | 0.02574 | 0 | 0 | 0 | 0 | 0 | 1 | 0.16 | false | 0 | 0.1 | 0.16 | 0.5 | 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 | 0 | 0 | 0 | 1 |
930d7aec4c453c11ba75db50b7c98c1763ba8374 | 2,124 | py | Python | PCModel.py | tomacorp/thermapythia | d6392a9e9eb9a5123ae3031812a0b4f8324d7211 | [
"BSD-3-Clause"
] | 3 | 2015-09-16T17:41:19.000Z | 2016-01-03T00:39:26.000Z | PCModel.py | tomacorp/thermapythia | d6392a9e9eb9a5123ae3031812a0b4f8324d7211 | [
"BSD-3-Clause"
] | null | null | null | PCModel.py | tomacorp/thermapythia | d6392a9e9eb9a5123ae3031812a0b4f8324d7211 | [
"BSD-3-Clause"
] | null | null | null | import Units
# Routines shared among Materials, Layers, and Vias
class PCModel:
def checkProperties(self, section, tableCols):
for elt in section:
for key in elt.keys():
if key not in tableCols:
print "Unrecognized property: " + str(key) + " in " + str(self.rowName) + " config file: " +... | 32.676923 | 132 | 0.565443 | 252 | 2,124 | 4.734127 | 0.242063 | 0.035205 | 0.050293 | 0.03772 | 0.07544 | 0.045264 | 0.045264 | 0 | 0 | 0 | 0 | 0.001358 | 0.306497 | 2,124 | 65 | 133 | 32.676923 | 0.808554 | 0.044256 | 0 | 0.254545 | 0 | 0 | 0.085306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.018182 | null | null | 0.072727 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
931d62047a34672710ccf3d14ec56c33961ea9bd | 16,864 | py | Python | scripts/mouse_tracking.py | cohnt/Deformable-Object-Manifold-Learning | 81b6d757df78fbd4427db7ab87051ed1514180ee | [
"MIT"
] | null | null | null | scripts/mouse_tracking.py | cohnt/Deformable-Object-Manifold-Learning | 81b6d757df78fbd4427db7ab87051ed1514180ee | [
"MIT"
] | null | null | null | scripts/mouse_tracking.py | cohnt/Deformable-Object-Manifold-Learning | 81b6d757df78fbd4427db7ab87051ed1514180ee | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import time
from sklearn.decomposition import PCA
from tqdm import tqdm
import coordinate_chart
import particle_filter
import visualization
import normalization
import utility
import data.mouse_dataset.mouse_dataset as mouse_dataset
##############... | 37.475556 | 162 | 0.713354 | 2,653 | 16,864 | 4.326423 | 0.147757 | 0.042865 | 0.025091 | 0.016292 | 0.430998 | 0.401289 | 0.36583 | 0.336208 | 0.325231 | 0.310507 | 0 | 0.023902 | 0.144094 | 16,864 | 450 | 163 | 37.475556 | 0.771304 | 0.147415 | 0 | 0.361272 | 0 | 0 | 0.027383 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.034682 | null | null | 0.008671 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
931f47158350438e138acc37c56a901686e64908 | 1,633 | py | Python | Apps/phsmime/smime_consts.py | mattsayar-splunk/phantom-apps | b719b78ded609ae3cbd62d7d2cc317db1a613d3b | [
"Apache-2.0"
] | 74 | 2019-10-22T02:00:53.000Z | 2022-03-15T12:56:13.000Z | Apps/phsmime/smime_consts.py | mattsayar-splunk/phantom-apps | b719b78ded609ae3cbd62d7d2cc317db1a613d3b | [
"Apache-2.0"
] | 375 | 2019-10-22T20:53:50.000Z | 2021-11-09T21:28:43.000Z | Apps/phsmime/smime_consts.py | mattsayar-splunk/phantom-apps | b719b78ded609ae3cbd62d7d2cc317db1a613d3b | [
"Apache-2.0"
] | 175 | 2019-10-23T15:30:42.000Z | 2021-11-05T21:33:31.000Z | # File: smime_consts.py
# Copyright (c) 2020 Splunk Inc.
#
# Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
# Sign email action related constants
SMIME_SIGN_PROGRESS_MSG = "Signing email message"
SMIME_SIGN_OK_MSG = "Email message signed successfully"
SMIME_SIGN_ERR_MSG = "Error occurred w... | 49.484848 | 135 | 0.818126 | 230 | 1,633 | 5.586957 | 0.286957 | 0.074708 | 0.042802 | 0.07393 | 0.352529 | 0.159533 | 0.159533 | 0.08249 | 0.08249 | 0 | 0 | 0.006969 | 0.121249 | 1,633 | 32 | 136 | 51.03125 | 0.888502 | 0.191672 | 0 | 0 | 0 | 0 | 0.635878 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
931f9076cab8b91335afb9ce6cf8c7719502550d | 1,648 | py | Python | app/exceptions/application_exception.py | mampilly/backend-global | a2248758d521bf7f136fbc5fd12902448d137b33 | [
"MIT"
] | null | null | null | app/exceptions/application_exception.py | mampilly/backend-global | a2248758d521bf7f136fbc5fd12902448d137b33 | [
"MIT"
] | null | null | null | app/exceptions/application_exception.py | mampilly/backend-global | a2248758d521bf7f136fbc5fd12902448d137b33 | [
"MIT"
] | null | null | null | '''Application Exceptions'''
import logging
from fastapi import HTTPException, status
class ApplicationExceptions:
"""Application Exceptons"""
@staticmethod
def too_many_rquests():
"""Too Many Requests"""
logging.info('🛑 Request is limited')
raise HTTPException(
status... | 30.518519 | 62 | 0.639563 | 155 | 1,648 | 6.574194 | 0.348387 | 0.111874 | 0.117763 | 0.13739 | 0.444553 | 0.444553 | 0.191364 | 0.191364 | 0.191364 | 0.133464 | 0 | 0.012407 | 0.266384 | 1,648 | 53 | 63 | 31.09434 | 0.829611 | 0.111044 | 0 | 0.447368 | 0 | 0 | 0.170749 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.131579 | false | 0.052632 | 0.052632 | 0 | 0.210526 | 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 | 0 | 0 | 0 | 1 |
932106f42540413e85540540eca654853af465a2 | 1,745 | py | Python | tests/test_iterable.py | priya1puresoftware/jsons | 65092a0a99a89abb0bd1aa0e68a99e25b12d96c4 | [
"MIT"
] | null | null | null | tests/test_iterable.py | priya1puresoftware/jsons | 65092a0a99a89abb0bd1aa0e68a99e25b12d96c4 | [
"MIT"
] | null | null | null | tests/test_iterable.py | priya1puresoftware/jsons | 65092a0a99a89abb0bd1aa0e68a99e25b12d96c4 | [
"MIT"
] | null | null | null | from typing import List, Tuple
from unittest import TestCase
import jsons
from jsons.exceptions import SerializationError
class TestIterable(TestCase):
def test_dump_list_with_cls(self):
class A:
__slots__ = ['a']
def __init__(self, a):
self.a = a
class B... | 26.439394 | 81 | 0.53639 | 226 | 1,745 | 3.951327 | 0.269912 | 0.050392 | 0.016797 | 0.022396 | 0.147816 | 0.080627 | 0.080627 | 0 | 0 | 0 | 0 | 0.03322 | 0.327221 | 1,745 | 65 | 82 | 26.846154 | 0.727428 | 0.031519 | 0 | 0.046512 | 0 | 0 | 0.008299 | 0 | 0 | 0 | 0 | 0 | 0.116279 | 1 | 0.209302 | false | 0 | 0.093023 | 0.023256 | 0.418605 | 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 | 0 | 0 | 0 | 1 |
9321ed0b96c2b19b2f787a6769c5deda08200217 | 615 | py | Python | email_c.py | harsathAI/Grocery-Bot-For-Amazon-Using-Python | 277814978a6be334b08b1c5ad450e0ae5bffab4e | [
"Apache-2.0"
] | 1 | 2019-03-30T05:56:12.000Z | 2019-03-30T05:56:12.000Z | email_c.py | harsathAI/Grocery-Bot-For-Amazon-Using-Python | 277814978a6be334b08b1c5ad450e0ae5bffab4e | [
"Apache-2.0"
] | null | null | null | email_c.py | harsathAI/Grocery-Bot-For-Amazon-Using-Python | 277814978a6be334b08b1c5ad450e0ae5bffab4e | [
"Apache-2.0"
] | null | null | null | import smtplib
import creds as config
class EmailSender:
def send_email(self,subject, msg):
try:
#Using SMTP Client For Sending Messaged Via Gmail.
server = smtplib.SMTP('smtp.gmail.com:587')
server.ehlo()
server.starttls()
server.login(config.FROM... | 36.176471 | 70 | 0.598374 | 70 | 615 | 5.185714 | 0.571429 | 0.082645 | 0.082645 | 0.115702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006928 | 0.295935 | 615 | 16 | 71 | 38.4375 | 0.831409 | 0.079675 | 0 | 0 | 0 | 0 | 0.141593 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.066667 | false | 0.066667 | 0.133333 | 0 | 0.266667 | 0.133333 | 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 | 0 | 0 | 0 | 1 |
9328338e52fcf76467aea6b97abb4d79fc1b23f0 | 441 | py | Python | wikipendium/user/forms.py | iver56/wikipendium.no | a1b9bd50a40ea599e247b901c9502c0ba1adf264 | [
"Apache-2.0"
] | null | null | null | wikipendium/user/forms.py | iver56/wikipendium.no | a1b9bd50a40ea599e247b901c9502c0ba1adf264 | [
"Apache-2.0"
] | null | null | null | wikipendium/user/forms.py | iver56/wikipendium.no | a1b9bd50a40ea599e247b901c9502c0ba1adf264 | [
"Apache-2.0"
] | null | null | null | from django.forms import Form, CharField, ValidationError
from django.contrib.auth.models import User
class UserChangeForm(Form):
username = CharField(max_length=30, label='New username')
def clean(self):
cleaned_data = super(UserChangeForm, self).clean()
if User.objects.filter(username=clea... | 29.4 | 74 | 0.716553 | 51 | 441 | 6.117647 | 0.647059 | 0.105769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00554 | 0.181406 | 441 | 14 | 75 | 31.5 | 0.858726 | 0 | 0 | 0 | 0 | 0 | 0.097506 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | 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 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
9329aa85bebb879c8745a87cc2998a1305a09146 | 3,043 | py | Python | coffin/templatetags/static.py | spothero/coffin | 9ea6a9173cbfed592c5b4776c489dba8d9280d52 | [
"BSD-3-Clause"
] | null | null | null | coffin/templatetags/static.py | spothero/coffin | 9ea6a9173cbfed592c5b4776c489dba8d9280d52 | [
"BSD-3-Clause"
] | null | null | null | coffin/templatetags/static.py | spothero/coffin | 9ea6a9173cbfed592c5b4776c489dba8d9280d52 | [
"BSD-3-Clause"
] | null | null | null | try:
from urllib.parse import urljoin
except ImportError: # Python 2
from urlparse import urljoin
from coffin.template import Library
from jinja2.ext import Extension
from jinja2 import nodes
from django.utils.encoding import iri_to_uri
register = Library()
class PrefixExtension(Extension):
def pa... | 23.229008 | 75 | 0.638843 | 348 | 3,043 | 5.405172 | 0.241379 | 0.038278 | 0.023392 | 0.036151 | 0.438596 | 0.357257 | 0.326422 | 0.275385 | 0.275385 | 0.275385 | 0 | 0.001317 | 0.251397 | 3,043 | 130 | 76 | 23.407692 | 0.824407 | 0.236609 | 0 | 0.465517 | 0 | 0 | 0.05505 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.137931 | false | 0 | 0.155172 | 0.068966 | 0.568966 | 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 | 0 | 1 | 0 | 0 | 1 |
932a19e109e3850ed242468998f01b9b0a43203a | 297 | py | Python | test/test_cthulhu.py | sholsapp/cthulhu | e86c7d485da4babe006df47dd8ce1921f0d89a94 | [
"Apache-2.0"
] | 2 | 2016-02-16T02:06:44.000Z | 2016-02-19T06:22:05.000Z | test/test_cthulhu.py | core-labs/cthulhu | e86c7d485da4babe006df47dd8ce1921f0d89a94 | [
"Apache-2.0"
] | 3 | 2016-02-14T03:17:13.000Z | 2020-02-14T21:13:46.000Z | test/test_cthulhu.py | core-labs/cthulhu | e86c7d485da4babe006df47dd8ce1921f0d89a94 | [
"Apache-2.0"
] | null | null | null | import click
from click.testing import CliRunner
from cthulhu.bin.cli import main
def test_cthulhu():
runner = CliRunner()
results = runner.invoke(main, ['--help'])
assert results.exit_code == 0
assert "Create a distributed test fixture for use on a Unix-like system." in results.output
| 27 | 93 | 0.747475 | 44 | 297 | 5 | 0.704545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004 | 0.158249 | 297 | 10 | 94 | 29.7 | 0.876 | 0 | 0 | 0 | 0 | 0 | 0.23569 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.125 | false | 0 | 0.375 | 0 | 0.5 | 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 | 0 | 0 | 0 | 1 |
932b1858a539436675f9d9607bb9d2d41cea4ab4 | 5,934 | py | Python | fgfa_rfcn/core/instance.py | sdroh1027/track_to_learn | 26dc83328bd29612a80e7d2429cdfd32926d0af6 | [
"MIT"
] | null | null | null | fgfa_rfcn/core/instance.py | sdroh1027/track_to_learn | 26dc83328bd29612a80e7d2429cdfd32926d0af6 | [
"MIT"
] | null | null | null | fgfa_rfcn/core/instance.py | sdroh1027/track_to_learn | 26dc83328bd29612a80e7d2429cdfd32926d0af6 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Instance linking
# Copyright ESoC
# Licensed under The MIT License [see LICENSE for details]
# Written by Si-Dong Roh
# --------------------------------------------------------
from bbox.bbox_transform import clip_boxes
import logging
logger = logging... | 43 | 142 | 0.604146 | 834 | 5,934 | 4.043165 | 0.166667 | 0.102017 | 0.074733 | 0.035587 | 0.479241 | 0.352906 | 0.27758 | 0.255338 | 0.238138 | 0.226275 | 0 | 0.011521 | 0.283283 | 5,934 | 138 | 143 | 43 | 0.781331 | 0.087631 | 0 | 0.330508 | 0 | 0 | 0.055682 | 0 | 0 | 0 | 0 | 0 | 0.016949 | 0 | null | null | 0 | 0.016949 | null | null | 0.025424 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
9334f4ef44a9d35dfc864a31c436522a5c3d8261 | 1,787 | py | Python | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/01-Gabarito/084.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | 1 | 2020-07-03T13:54:18.000Z | 2020-07-03T13:54:18.000Z | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/01-Gabarito/084.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | null | null | null | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/01-Gabarito/084.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | null | null | null | print("""
084) Faça um programa que leia nome e peso de várias pessoas, guardando tudo
em uma lista. No final, mostre:
A) Quantas pessoas foram cadastradas.
B) Uma listagem com as pessoas mais pesadas.
C) Uma listagem com as pessoas mais leves.
""")
listaDePessoasEPesos = []
maiorPeso = menorPeso = 0
pessoasMaisPesada... | 31.350877 | 76 | 0.651931 | 222 | 1,787 | 5.247748 | 0.459459 | 0.030901 | 0.039485 | 0.027468 | 0.087554 | 0.087554 | 0 | 0 | 0 | 0 | 0 | 0.008017 | 0.232233 | 1,787 | 56 | 77 | 31.910714 | 0.841108 | 0.147174 | 0 | 0.1 | 0 | 0 | 0.248674 | 0.019231 | 0 | 0 | 0 | 0.017857 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
933a6bce900e3b9e078639f60fc1a1ef88df789d | 355 | py | Python | src/cool_compiler/codegen/v1_mips_generate/general_macros/__init__.py | matcom-school/cool-compiler-2021 | 0a982f1708ed948a45610035a597d6ff12bab22b | [
"MIT"
] | null | null | null | src/cool_compiler/codegen/v1_mips_generate/general_macros/__init__.py | matcom-school/cool-compiler-2021 | 0a982f1708ed948a45610035a597d6ff12bab22b | [
"MIT"
] | null | null | null | src/cool_compiler/codegen/v1_mips_generate/general_macros/__init__.py | matcom-school/cool-compiler-2021 | 0a982f1708ed948a45610035a597d6ff12bab22b | [
"MIT"
] | null | null | null | _list = ['int', 'bool', 'str']
def sys_macro_load():
result = ''
for _type in _list:
with open(f'cool_compiler/codegen/v1_mips_generate/general_macros//{_type}.mips') as mips:
text = mips.read()
mips.close()
result += text[text.index('#region'): text.index('#endregi... | 23.666667 | 98 | 0.571831 | 43 | 355 | 4.488372 | 0.72093 | 0.093264 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003876 | 0.273239 | 355 | 14 | 99 | 25.357143 | 0.744186 | 0 | 0 | 0 | 1 | 0 | 0.265537 | 0.189266 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0 | 0 | 0.222222 | 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 | 0 | 0 | 0 | 1 |
933a931e35624ea17e968c23f5c06b1e3e72a3d9 | 1,035 | py | Python | src/pyams_catalog/zmi/__init__.py | Py-AMS/pyams-catalog | fa225fda2a0584713efed562afb396fd144d9711 | [
"ZPL-2.1"
] | null | null | null | src/pyams_catalog/zmi/__init__.py | Py-AMS/pyams-catalog | fa225fda2a0584713efed562afb396fd144d9711 | [
"ZPL-2.1"
] | null | null | null | src/pyams_catalog/zmi/__init__.py | Py-AMS/pyams-catalog | fa225fda2a0584713efed562afb396fd144d9711 | [
"ZPL-2.1"
] | null | null | null | #
# Copyright (c) 2015-2021 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRAN... | 31.363636 | 75 | 0.769082 | 133 | 1,035 | 5.887218 | 0.654135 | 0.034483 | 0.03576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011416 | 0.153623 | 1,035 | 32 | 76 | 32.34375 | 0.88242 | 0.524638 | 0 | 0 | 0 | 0 | 0.049145 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.5 | 0 | 0.7 | 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 | 0 | 0 | 0 | 1 |
933be3b359536ad11552e5e06071efc9bd2f0d8b | 22,960 | py | Python | gen-po-comm-invoice.py | tschutter/cctools | 6ee2c299dc599166e031b9de160ee18c3a053852 | [
"BSD-2-Clause"
] | null | null | null | gen-po-comm-invoice.py | tschutter/cctools | 6ee2c299dc599166e031b9de160ee18c3a053852 | [
"BSD-2-Clause"
] | 3 | 2015-02-28T14:52:20.000Z | 2015-02-28T17:33:17.000Z | gen-po-comm-invoice.py | tschutter/cctools | 6ee2c299dc599166e031b9de160ee18c3a053852 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python2
"""
Generates a Purchase Order / Commercial Invoice.
All known products are included. If you are never ordering a product
again, then just don't order it. Or use the --exclude-sku option.
"""
from __future__ import print_function
import ConfigParser
import argparse
import datetime
import ite... | 24.296296 | 79 | 0.572953 | 2,566 | 22,960 | 4.848012 | 0.139906 | 0.054019 | 0.038585 | 0.038183 | 0.438344 | 0.387862 | 0.316479 | 0.256592 | 0.235691 | 0.209405 | 0 | 0.008215 | 0.332012 | 22,960 | 944 | 80 | 24.322034 | 0.802895 | 0.09203 | 0 | 0.476064 | 1 | 0 | 0.080557 | 0.005416 | 0 | 0 | 0 | 0 | 0 | 1 | 0.022606 | false | 0.00133 | 0.014628 | 0 | 0.047872 | 0.00133 | 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 | 0 | 0 | 0 | 1 |
933d8df2aa972133f9ea3a3e0ee6328c9d896fe5 | 60,143 | py | Python | project_src/app/views.py | tsinghuariit/DMP | 03133fa8796e6318060f038edce2a8ef778754d9 | [
"Apache-2.0"
] | 3 | 2017-07-17T08:57:55.000Z | 2018-03-07T09:41:53.000Z | project_src/app/views.py | KNIGHTTH0R/DMP-1 | 03133fa8796e6318060f038edce2a8ef778754d9 | [
"Apache-2.0"
] | null | null | null | project_src/app/views.py | KNIGHTTH0R/DMP-1 | 03133fa8796e6318060f038edce2a8ef778754d9 | [
"Apache-2.0"
] | 4 | 2017-07-17T08:57:58.000Z | 2018-06-22T07:48:45.000Z | # coding=utf-8
import logging
import os
import random
import re
import time
import urllib
from datetime import datetime
from flask import (abort, flash, g, jsonify, redirect, render_template,
request, send_from_directory, session, url_for)
from flask_babel import gettext
from flask_login import cur... | 37.778266 | 178 | 0.651198 | 7,698 | 60,143 | 4.917121 | 0.070798 | 0.022403 | 0.034582 | 0.040685 | 0.645646 | 0.579071 | 0.516274 | 0.485628 | 0.444574 | 0.37998 | 0 | 0.005919 | 0.205045 | 60,143 | 1,591 | 179 | 37.802011 | 0.785782 | 0.062767 | 0 | 0.41918 | 0 | 0.010054 | 0.138098 | 0.055051 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.039443 | 0.025522 | null | null | 0.001547 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
93409930cc832dfb81c8d7d590c8339d62887b77 | 494 | py | Python | censusreporter/config/prod/settings.py | c-goodman/censusreporter | 0b5ebfcfbbab283eb185606772e2a67ea3dbcbf3 | [
"MIT"
] | 607 | 2015-01-05T19:25:07.000Z | 2022-03-24T12:35:34.000Z | censusreporter/config/prod/settings.py | c-goodman/censusreporter | 0b5ebfcfbbab283eb185606772e2a67ea3dbcbf3 | [
"MIT"
] | 231 | 2015-01-05T21:19:32.000Z | 2022-01-27T15:23:03.000Z | censusreporter/config/prod/settings.py | c-goodman/censusreporter | 0b5ebfcfbbab283eb185606772e2a67ea3dbcbf3 | [
"MIT"
] | 111 | 2015-01-10T18:48:15.000Z | 2022-02-19T19:19:47.000Z | from censusreporter.config.base.settings import *
import os
DEBUG = False
ROOT_URLCONF = 'censusreporter.config.prod.urls'
WSGI_APPLICATION = "censusreporter.config.prod.wsgi.application"
ALLOWED_HOSTS = ['*']
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': os.environ.get... | 23.52381 | 68 | 0.61336 | 56 | 494 | 5.321429 | 0.767857 | 0.201342 | 0.161074 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008086 | 0.248988 | 494 | 20 | 69 | 24.7 | 0.795148 | 0.117409 | 0 | 0 | 0 | 0 | 0.331797 | 0.221198 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.125 | 0 | 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 | 0 | 0 | 1 |
934243c4abefa390c22d893e3becd84c4091ee01 | 7,323 | py | Python | tests/unit/states/test_win_wusa.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-03-31T22:51:16.000Z | 2020-03-31T22:51:16.000Z | tests/unit/states/test_win_wusa.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/unit/states/test_win_wusa.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-30T07:00:01.000Z | 2021-09-30T07:00:01.000Z | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
# Import Salt Libs
import salt.states.win_wusa as wusa
from salt.exceptions import SaltInvocationError
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.sup... | 43.076471 | 80 | 0.532978 | 708 | 7,323 | 5.323446 | 0.15113 | 0.054126 | 0.047758 | 0.040594 | 0.733086 | 0.7039 | 0.675245 | 0.635978 | 0.592995 | 0.592995 | 0 | 0.006052 | 0.345623 | 7,323 | 169 | 81 | 43.331361 | 0.780467 | 0.074696 | 0 | 0.626087 | 0 | 0 | 0.133905 | 0 | 0 | 0 | 0 | 0 | 0.095652 | 1 | 0.095652 | false | 0 | 0.052174 | 0.008696 | 0.173913 | 0.008696 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
9342e0be4f458db6838f448bcd1febc63a849ef8 | 933 | py | Python | ToGit-HUB/Unsolved/automated_equity_rounds.py | MuayThaiLegz/Class-practice | 495aa95d9eac181234fb39969f91fc43aaacc77b | [
"ADSL"
] | null | null | null | ToGit-HUB/Unsolved/automated_equity_rounds.py | MuayThaiLegz/Class-practice | 495aa95d9eac181234fb39969f91fc43aaacc77b | [
"ADSL"
] | null | null | null | ToGit-HUB/Unsolved/automated_equity_rounds.py | MuayThaiLegz/Class-practice | 495aa95d9eac181234fb39969f91fc43aaacc77b | [
"ADSL"
] | null | null | null | import csv
from pathlib import Path
equity_funding = [
{"Company": "CryptoVisors", "Amount": 200000, "Series": "A"},
{"Company": "Flutterwave", "Amount": 65000000, "Series": "D"},
{"Company": "nCino", "Amount": 80000000, "Series": "D"},
{"Company": "Privacy.com", "Amount": 10000000, "Series": "B"},
]
... | 25.916667 | 69 | 0.663451 | 114 | 933 | 5.350877 | 0.578947 | 0.081967 | 0.045902 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.049032 | 0.169346 | 933 | 35 | 70 | 26.657143 | 0.738065 | 0.154341 | 0 | 0 | 0 | 0 | 0.257033 | 0.029412 | 0 | 0 | 0 | 0.028571 | 0 | 1 | 0 | false | 0 | 0.095238 | 0 | 0.095238 | 0.095238 | 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 | 0 | 0 | 0 | 1 |
93438f2aca6ab3a6071e36d01f78bdeee1ebf9c5 | 255 | py | Python | tests/test_xml2class_app.py | S-Hanin/PyXmlMapper | 3cebb387c55db881f7c163b2ab6dcd0d9ba8ed6d | [
"MIT"
] | null | null | null | tests/test_xml2class_app.py | S-Hanin/PyXmlMapper | 3cebb387c55db881f7c163b2ab6dcd0d9ba8ed6d | [
"MIT"
] | null | null | null | tests/test_xml2class_app.py | S-Hanin/PyXmlMapper | 3cebb387c55db881f7c163b2ab6dcd0d9ba8ed6d | [
"MIT"
] | null | null | null | # -*- coding: utf8 -*-
from pyxmlmapper import xml2class
def main():
filename = "./purchaseNotice_Moskva_20190829_000000_20190829_235959_daily_002.xml"
print(xml2class.create_classes_from_file(filename))
if __name__ == "__main__":
main()
| 19.615385 | 86 | 0.741176 | 29 | 255 | 5.896552 | 0.793103 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.155963 | 0.145098 | 255 | 12 | 87 | 21.25 | 0.62844 | 0.078431 | 0 | 0 | 0 | 0 | 0.330472 | 0.296137 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.166667 | 0 | 0.333333 | 0.166667 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
934b3482f5c5a562309a9985b0efad2be34bb90e | 7,367 | py | Python | Code/Poisson_2D_Dirichlet_v1_2.py | zaman13/Poisson-solver-2D | 5fba84c341d1fd79d8d857d30a31ef2e6c389c89 | [
"MIT"
] | 24 | 2020-06-20T14:26:08.000Z | 2022-02-22T15:16:50.000Z | Code/Poisson_2D_Dirichlet_v1_2.py | Babaee/Poisson-solver-2D | d0a947b73bc473ef86478c055ad940245e183ef0 | [
"MIT"
] | null | null | null | Code/Poisson_2D_Dirichlet_v1_2.py | Babaee/Poisson-solver-2D | d0a947b73bc473ef86478c055ad940245e183ef0 | [
"MIT"
] | 10 | 2020-12-10T15:47:14.000Z | 2022-03-25T10:39:44.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 18 13:03:24 2020
@author: Mohammad Asif Zaman
Code for testng differentiation matrix operators
Solves 𝛁²u(x,y) = g(x,y)
May 2, 20200: v1:
- Dirichlet boundary condition implementation
May 5, 20200: v1_1:
- Fixed a bug regarding the right-hand function
... | 35.762136 | 142 | 0.435048 | 781 | 7,367 | 4.006402 | 0.291933 | 0.006392 | 0.021093 | 0.030681 | 0.197188 | 0.152445 | 0.090125 | 0.069671 | 0.069671 | 0.022371 | 0 | 0.023656 | 0.13927 | 7,367 | 205 | 143 | 35.936585 | 0.469642 | 0.623049 | 0 | 0.101449 | 0 | 0 | 0.072173 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.028986 | false | 0 | 0.115942 | 0 | 0.173913 | 0.057971 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 1 |
934c9e1ec7c66cc617db1a351426ec5666818346 | 12,587 | py | Python | test/test_txmysql.py | Dev0n/txMySQL | 9411a7cf01020f0822ca40c52158e03e83f1971f | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2015-11-17T00:45:11.000Z | 2015-11-17T00:45:11.000Z | test/test_txmysql.py | Dev0n/txMySQL | 9411a7cf01020f0822ca40c52158e03e83f1971f | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | test/test_txmysql.py | Dev0n/txMySQL | 9411a7cf01020f0822ca40c52158e03e83f1971f | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """
Test txMySQL against a local MySQL server
This test requires 'sudo' without a password, and expects a stock Ubuntu 10.04
MySQL setup. It will start and stop MySQL and occasionally replace it with an
evil daemon which absorbs packets.
TODO: Check code coverage for every line, then manually any compound expression
... | 35.159218 | 111 | 0.612616 | 1,539 | 12,587 | 4.873294 | 0.224821 | 0.034667 | 0.06 | 0.043067 | 0.500133 | 0.4616 | 0.393067 | 0.338267 | 0.327867 | 0.317733 | 0 | 0.022123 | 0.288949 | 12,587 | 357 | 112 | 35.257703 | 0.815866 | 0.026218 | 0 | 0.528302 | 0 | 0 | 0.11341 | 0.002349 | 0 | 0 | 0 | 0.002801 | 0.084906 | 0 | null | null | 0.014151 | 0.033019 | null | null | 0.042453 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
9358643e10388e373ce2dd89924753783c1b0b28 | 4,202 | py | Python | usuario/forms.py | dyachan/django-usuario | 10712cf78d202721b965c6b89b11d4b3bd6bb67b | [
"MIT"
] | 2 | 2015-06-12T15:31:32.000Z | 2015-07-07T20:24:27.000Z | usuario/forms.py | dyachan/django-usuario | 10712cf78d202721b965c6b89b11d4b3bd6bb67b | [
"MIT"
] | null | null | null | usuario/forms.py | dyachan/django-usuario | 10712cf78d202721b965c6b89b11d4b3bd6bb67b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext as _
from django.contrib.auth.hashers import check_password
from usuario.models import Usuario
#from usuario.models import NuevoU... | 34.727273 | 119 | 0.717277 | 537 | 4,202 | 5.540037 | 0.288641 | 0.037647 | 0.023529 | 0.036303 | 0.10521 | 0.064202 | 0.034958 | 0 | 0 | 0 | 0 | 0.000585 | 0.185864 | 4,202 | 120 | 120 | 35.016667 | 0.869044 | 0.358401 | 0 | 0.070175 | 0 | 0 | 0.105426 | 0 | 0 | 0 | 0 | 0.008333 | 0 | 1 | 0.087719 | false | 0.22807 | 0.105263 | 0 | 0.421053 | 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 | 0 | 0 | 0 | 1 |
935940373161a43eb3eae459d95ca657ff3eb6bb | 11,066 | py | Python | pirates/minigame/LegendaryFish.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 81 | 2018-04-08T18:14:24.000Z | 2022-01-11T07:22:15.000Z | pirates/minigame/LegendaryFish.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 4 | 2018-09-13T20:41:22.000Z | 2022-01-08T06:57:00.000Z | pirates/minigame/LegendaryFish.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 26 | 2018-05-26T12:49:27.000Z | 2021-09-11T09:11:59.000Z | from pandac.PandaModules import NodePath
from direct.interval.IntervalGlobal import Sequence
from direct.task import Task
from panda3d.core import TextNode
from direct.gui.DirectGui import DirectFrame, DirectLabel, DirectWaitBar, DGG
from direct.gui.OnscreenImage import OnscreenImage
from pandac.PandaModules import Tra... | 79.611511 | 283 | 0.382252 | 644 | 11,066 | 6.526398 | 0.248447 | 0.019034 | 0.016417 | 0.009517 | 0.251963 | 0.199619 | 0.16631 | 0.16631 | 0.149655 | 0.149655 | 0 | 0.033387 | 0.553407 | 11,066 | 139 | 284 | 79.611511 | 0.817078 | 0 | 0 | 0.275591 | 0 | 0 | 0.027559 | 0.018072 | 0 | 0 | 0 | 0 | 0 | 1 | 0.086614 | false | 0 | 0.102362 | 0.007874 | 0.259843 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 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 | 1 |
9359411455264b931b5487b317b005030f11630a | 1,630 | py | Python | lintcode/10DataStructure/104MergeKLinkedLists.py | zhaoxinlu/leetcode-algorithms | f5e1c94c99628e7fb04ba158f686a55a8093e933 | [
"MIT"
] | null | null | null | lintcode/10DataStructure/104MergeKLinkedLists.py | zhaoxinlu/leetcode-algorithms | f5e1c94c99628e7fb04ba158f686a55a8093e933 | [
"MIT"
] | null | null | null | lintcode/10DataStructure/104MergeKLinkedLists.py | zhaoxinlu/leetcode-algorithms | f5e1c94c99628e7fb04ba158f686a55a8093e933 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Editor: Zhao Xinlu
School: BUPT
Date: 2018-03-21
算法思想: 合并k个排序链表--分治,时间复杂度为O(nklogk)
"""
"""
Definition of ListNode
"""
class ListNode(object):
def __init__(self, val, next=None):
self.val = val
self.next = next
class Solution:
"""
@param lists: a list of ListNode... | 23.623188 | 83 | 0.504294 | 183 | 1,630 | 4.469945 | 0.360656 | 0.077017 | 0.051345 | 0.066015 | 0.200489 | 0.171149 | 0.102689 | 0.102689 | 0.102689 | 0 | 0 | 0.059063 | 0.397546 | 1,630 | 69 | 84 | 23.623188 | 0.773931 | 0.166871 | 0 | 0.348837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.014493 | 0 | 1 | 0.069767 | false | 0 | 0 | 0 | 0.255814 | 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 | 0 | 0 | 0 | 1 |
935d9b0596bf5f2e7e156d164951a3e3929951f4 | 7,241 | py | Python | HeatFlow.py | ardian923/pyDoubleLayerEB | b5be33153ac05eab2032ec3dd56fb1f126647a69 | [
"MIT"
] | null | null | null | HeatFlow.py | ardian923/pyDoubleLayerEB | b5be33153ac05eab2032ec3dd56fb1f126647a69 | [
"MIT"
] | null | null | null | HeatFlow.py | ardian923/pyDoubleLayerEB | b5be33153ac05eab2032ec3dd56fb1f126647a69 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
## Soil-Plant-Atmospheric Continuum calculation emphasizing on surface energy balance
## Developed initially by Ardiansyah (UNSOED), http://ardiansyah.net
## USE WITH "OoPython-ETo.ods" !!
##ardiansyah@AL-FATIH-II:~/Desktop/OoPython-ETo$ oocalc OoPython-ETo.ods -accept="socket,host=localhost,po... | 35.321951 | 144 | 0.53639 | 1,231 | 7,241 | 3.136474 | 0.267262 | 0.018648 | 0.013986 | 0.012432 | 0.208236 | 0.188034 | 0.157213 | 0.150479 | 0.112406 | 0.112406 | 0 | 0.053168 | 0.254523 | 7,241 | 204 | 145 | 35.495098 | 0.662097 | 0 | 0 | 0.235294 | 0 | 0 | 0.039967 | 0.011011 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.045752 | null | null | 0.013072 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
93678b7a30195d5fd805bba731626469ff9467a4 | 2,619 | py | Python | contrib/fanfouapi/management/commands/callapi.py | joodo/loser-fan | ad6be4fb171ee7a8ca1fa8da572acaf11a1548b9 | [
"MIT"
] | null | null | null | contrib/fanfouapi/management/commands/callapi.py | joodo/loser-fan | ad6be4fb171ee7a8ca1fa8da572acaf11a1548b9 | [
"MIT"
] | null | null | null | contrib/fanfouapi/management/commands/callapi.py | joodo/loser-fan | ad6be4fb171ee7a8ca1fa8da572acaf11a1548b9 | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand
from django.conf import settings
from django.utils.encoding import smart_str
import sys, urllib, re
from fanfouapi import oauth, auth, api
from urllib2 import Request, urlopen
from urlparse import urljoin
import getpass
def get_api(oauth_token=settings.PUBLISHER_OAU... | 42.241935 | 121 | 0.57121 | 299 | 2,619 | 4.832776 | 0.294314 | 0.027682 | 0.03737 | 0.062284 | 0.075433 | 0.065052 | 0.042907 | 0 | 0 | 0 | 0 | 0.009065 | 0.326079 | 2,619 | 61 | 122 | 42.934426 | 0.809632 | 0.014509 | 0 | 0.192982 | 0 | 0 | 0.135271 | 0.044574 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.017544 | 0.140351 | null | null | 0.22807 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
9368844f1602c6461b5b823a451c5fc41689f370 | 721 | py | Python | Task/Roots-of-unity/Python/roots-of-unity.py | djgoku/RosettaCodeData | 91df62d46142e921b3eacdb52b0316c39ee236bc | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:38.000Z | 2018-11-09T22:08:38.000Z | Task/Roots-of-unity/Python/roots-of-unity.py | djgoku/RosettaCodeData | 91df62d46142e921b3eacdb52b0316c39ee236bc | [
"Info-ZIP"
] | null | null | null | Task/Roots-of-unity/Python/roots-of-unity.py | djgoku/RosettaCodeData | 91df62d46142e921b3eacdb52b0316c39ee236bc | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | import cmath
class Complex(complex):
def __repr__(self):
rp = '%7.5f'%self.real if not self.pureImag() else ''
ip = '%7.5fj'%self.imag if not self.pureReal() else ''
conj = '' if (self.pureImag() or self.pureReal() or self.imag<0.0) else '+'
return '0.0' if (self.pureImag() and self.pureReal(... | 34.333333 | 86 | 0.622746 | 125 | 721 | 3.56 | 0.368 | 0.080899 | 0.040449 | 0.076404 | 0.094382 | 0.094382 | 0.094382 | 0.094382 | 0.094382 | 0 | 0 | 0.054291 | 0.208044 | 721 | 20 | 87 | 36.05 | 0.725044 | 0.112344 | 0 | 0 | 0 | 0 | 0.023511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.058824 | null | null | 0.058824 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
936d85364fdc6584439b166744fc3c4e1e47c101 | 1,838 | py | Python | keycloak/exceptions.py | c0mpiler/py-keycloak | e2fee4ab0d8b2fc0f3b98291d907ddf45290cbb4 | [
"Apache-2.0"
] | 1 | 2018-08-06T00:50:30.000Z | 2018-08-06T00:50:30.000Z | keycloak/exceptions.py | c0mpiler/py-keycloak | e2fee4ab0d8b2fc0f3b98291d907ddf45290cbb4 | [
"Apache-2.0"
] | null | null | null | keycloak/exceptions.py | c0mpiler/py-keycloak | e2fee4ab0d8b2fc0f3b98291d907ddf45290cbb4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import requests
class KeycloakError(Exception):
def __init__(self, error_message="", response_code=None,
response_body=None):
Exception.__init__(self, error_message)
self.response_code = response_code
self.response_body = response_body
se... | 23.265823 | 76 | 0.686072 | 175 | 1,838 | 6.977143 | 0.297143 | 0.068796 | 0.06552 | 0.03276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007102 | 0.23395 | 1,838 | 78 | 77 | 23.564103 | 0.860085 | 0.011425 | 0 | 0.244898 | 0 | 0 | 0.009917 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.061224 | false | 0.163265 | 0.020408 | 0 | 0.367347 | 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 | 0 | 0 | 0 | 1 |
93731e01606d93be0e886599f36d0916737bb02d | 1,409 | py | Python | bot/dialogs/utils.py | elkprostoelk/fcspm-ksu-bot | d5873d375f2cc124d98b959fee99a89dbb1948fa | [
"MIT"
] | 1 | 2021-08-02T21:18:50.000Z | 2021-08-02T21:18:50.000Z | bot/dialogs/utils.py | elkprostoelk/fcspm-ksu-bot | d5873d375f2cc124d98b959fee99a89dbb1948fa | [
"MIT"
] | 4 | 2020-04-20T13:08:20.000Z | 2020-04-20T21:29:07.000Z | bot/dialogs/utils.py | elkprostoelk/fcspm-ksu-bot | d5873d375f2cc124d98b959fee99a89dbb1948fa | [
"MIT"
] | 1 | 2021-08-02T11:57:20.000Z | 2021-08-02T11:57:20.000Z | import logging
import difflib
from telegram.ext import BaseFilter
from typing import *
MINIMAL_KEYWORD_LENGTH = 7
class State:
CANCEL = 0
GENERAL_CHOOSING = 1
ORDER_CERTIFICATE_PROMPT = 20
ORDER_CERTIFICATE_AWAIT_CHOICE = 21
ORDER_CERTIFICATE_CHOICER = 30
ORDER_CERTIFICATE_NAME = 31
OR... | 25.160714 | 115 | 0.660043 | 182 | 1,409 | 4.862637 | 0.461538 | 0.126554 | 0.057627 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019266 | 0.226402 | 1,409 | 55 | 116 | 25.618182 | 0.792661 | 0 | 0 | 0 | 0 | 0.026316 | 0.106458 | 0.05252 | 0 | 0 | 0 | 0 | 0 | 1 | 0.157895 | false | 0 | 0.105263 | 0.052632 | 0.710526 | 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 | 0 | 1 | 0 | 0 | 1 |
93768aa1eec13d25f13b1f45cb3b0487c50ef73e | 544 | py | Python | src/profiles/migrations/0003_auto_20151025_1250.py | abhijithanilkumar/CollegeSeatAllocation | b8b78712c6c5f7d6dfb8445a79f543934c850e03 | [
"MIT"
] | null | null | null | src/profiles/migrations/0003_auto_20151025_1250.py | abhijithanilkumar/CollegeSeatAllocation | b8b78712c6c5f7d6dfb8445a79f543934c850e03 | [
"MIT"
] | null | null | null | src/profiles/migrations/0003_auto_20151025_1250.py | abhijithanilkumar/CollegeSeatAllocation | b8b78712c6c5f7d6dfb8445a79f543934c850e03 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profiles', '0002_auto_20151025_1127'),
]
operations = [
migrations.RenameField(
model_name='profile',
... | 21.76 | 48 | 0.577206 | 49 | 544 | 6.081633 | 0.612245 | 0.14094 | 0.174497 | 0.201342 | 0.342282 | 0.342282 | 0.342282 | 0.342282 | 0 | 0 | 0 | 0.045333 | 0.310662 | 544 | 24 | 49 | 22.666667 | 0.749333 | 0.038603 | 0 | 0.333333 | 0 | 0 | 0.163148 | 0.044146 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.111111 | 0 | 0.277778 | 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 | 0 | 0 | 0 | 1 |
937b5657c170c8c7957f837966802a3365557d87 | 281 | py | Python | wgsi.py | Healthy-Kokoro/Hiroshima | 87c6c533f97f55ceb33553a2409076bcd21a36d2 | [
"MIT"
] | null | null | null | wgsi.py | Healthy-Kokoro/Hiroshima | 87c6c533f97f55ceb33553a2409076bcd21a36d2 | [
"MIT"
] | null | null | null | wgsi.py | Healthy-Kokoro/Hiroshima | 87c6c533f97f55ceb33553a2409076bcd21a36d2 | [
"MIT"
] | null | null | null | # Standard library imports
from os import getenv
# First-party imports
from application import create_application
application = create_application(getenv('ENVIRONMENT', default='production'))
application.app_context().push()
if __name__ == '__main__':
application.run(port=80)
| 23.416667 | 77 | 0.793594 | 33 | 281 | 6.424242 | 0.69697 | 0.103774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007937 | 0.103203 | 281 | 11 | 78 | 25.545455 | 0.833333 | 0.156584 | 0 | 0 | 0 | 0 | 0.123932 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
9380409bf4a02a69b1670b00b821b11d8ba02d15 | 1,472 | py | Python | tests/stores/amazon_tests.py | krober/bapcs-stock-checker | 10fc943dd16250695188edfedeb83b76ead4081d | [
"MIT"
] | 20 | 2018-06-25T13:41:02.000Z | 2021-12-23T15:58:06.000Z | tests/stores/amazon_tests.py | krober/bapcs-stock-checker | 10fc943dd16250695188edfedeb83b76ead4081d | [
"MIT"
] | 5 | 2018-06-18T14:03:10.000Z | 2021-12-13T19:48:21.000Z | tests/stores/amazon_tests.py | krober/bapcs-stock-checker | 10fc943dd16250695188edfedeb83b76ead4081d | [
"MIT"
] | null | null | null | from src.stores.amazon import *
class AmazonSimulation:
@staticmethod
def test(url):
page = get_page(url)
text = page.text
content = page.content
tree = html.fromstring(content)
price = get_price(tree)
mpn = get_mpn(text)
print(price)
print(mp... | 30.040816 | 245 | 0.631114 | 192 | 1,472 | 4.692708 | 0.567708 | 0.053274 | 0.073252 | 0.113208 | 0.188679 | 0.166482 | 0.166482 | 0 | 0 | 0 | 0 | 0.092199 | 0.233696 | 1,472 | 48 | 246 | 30.666667 | 0.70656 | 0.571332 | 0 | 0.117647 | 0 | 0 | 0.013158 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.117647 | false | 0.058824 | 0.058824 | 0 | 0.235294 | 0.117647 | 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 | 0 | 0 | 0 | 1 |
9381a52666efd4ce3f6fa2c60e5ebb4578bd3c58 | 470 | py | Python | test/mod_gen.py | GrayScaleHY/NS_DTLN | 47610b9a8da326795a1f1356e49296fecaa893bf | [
"MIT"
] | null | null | null | test/mod_gen.py | GrayScaleHY/NS_DTLN | 47610b9a8da326795a1f1356e49296fecaa893bf | [
"MIT"
] | null | null | null | test/mod_gen.py | GrayScaleHY/NS_DTLN | 47610b9a8da326795a1f1356e49296fecaa893bf | [
"MIT"
] | null | null | null |
import os
import uuid
import time
import numpy as np
import tensorflow as tf
import external.luodong.Model2bin as mem_to_bin
mod_uuid = uuid.uuid4()
TODAY = time.strftime("%Y%m%d")
model_ids = list(np.arange(22))
mem_path = r'/home/hangz/TF_graphs/unit_test/DTLN_keras/converted_model/'
os.makedirs(os.path.join(mem_pa... | 29.375 | 118 | 0.791489 | 85 | 470 | 4.117647 | 0.552941 | 0.08 | 0.045714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009324 | 0.087234 | 470 | 15 | 119 | 31.333333 | 0.806527 | 0 | 0 | 0 | 0 | 0 | 0.160256 | 0.126068 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 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 | 0 | 0 | 0 | 1 |
fa7313b0a41a60176109d10e1bf64a07c27f9175 | 2,292 | py | Python | part-2/deploy/main.py | limxl31/NTUOSS-API-Development-Workshop | 77b616572c5d1afc604ed946f323e70787316ed0 | [
"MIT"
] | null | null | null | part-2/deploy/main.py | limxl31/NTUOSS-API-Development-Workshop | 77b616572c5d1afc604ed946f323e70787316ed0 | [
"MIT"
] | null | null | null | part-2/deploy/main.py | limxl31/NTUOSS-API-Development-Workshop | 77b616572c5d1afc604ed946f323e70787316ed0 | [
"MIT"
] | 6 | 2022-02-13T17:36:17.000Z | 2022-02-23T05:26:16.000Z | """
Introduction to API Development (Part 2)
NTUOSS TGIFHacks #132
by Jay Gupta for NTU Open Source Society
"""
# Imports
from fastapi import FastAPI, Depends, status
from pydantic import BaseModel
from typing import List, Optional
from database import SessionLocal
from schema import DBMember
from sqlalchemy import de... | 28.296296 | 83 | 0.648778 | 294 | 2,292 | 4.914966 | 0.367347 | 0.044291 | 0.035986 | 0.058131 | 0.112803 | 0.038754 | 0 | 0 | 0 | 0 | 0 | 0.003653 | 0.164049 | 2,292 | 81 | 84 | 28.296296 | 0.750522 | 0.24651 | 0 | 0.041667 | 0 | 0 | 0.047452 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.145833 | 0.083333 | 0.604167 | 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 | 0 | 1 | 0 | 0 | 1 |
fa78c7d242a3b90f2ee7a514119c062fb0691fe8 | 704 | py | Python | km_api/functional_tests/know_me/profile/profile_items/list_entries/test_delete_list_entry.py | knowmetools/km-api | e4b72484c42e88a6c0087c9b1d5fef240e66cbb0 | [
"Apache-2.0"
] | 4 | 2017-08-03T00:46:31.000Z | 2018-11-06T03:32:32.000Z | km_api/functional_tests/know_me/profile/profile_items/list_entries/test_delete_list_entry.py | knowmetools/km-api | e4b72484c42e88a6c0087c9b1d5fef240e66cbb0 | [
"Apache-2.0"
] | 526 | 2017-06-27T18:13:59.000Z | 2021-06-10T18:00:21.000Z | km_api/functional_tests/know_me/profile/profile_items/list_entries/test_delete_list_entry.py | knowmetools/km-api | e4b72484c42e88a6c0087c9b1d5fef240e66cbb0 | [
"Apache-2.0"
] | 1 | 2017-07-10T19:46:27.000Z | 2017-07-10T19:46:27.000Z | from rest_framework import status
def test_delete_list_entry(
api_client,
enable_premium_requirement,
profile_list_entry_factory,
user_factory,
):
"""
The owner of a list entry should be able to delete it if they have
an active premium subscription.
"""
password = "password"
us... | 27.076923 | 70 | 0.734375 | 97 | 704 | 4.958763 | 0.57732 | 0.112266 | 0.066528 | 0.095634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005254 | 0.18892 | 704 | 25 | 71 | 28.16 | 0.837128 | 0.139205 | 0 | 0 | 0 | 0 | 0.09215 | 0.078498 | 0 | 0 | 0 | 0 | 0.0625 | 1 | 0.0625 | false | 0.1875 | 0.0625 | 0 | 0.125 | 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 | 0 | 0 | 0 | 1 |
fa7d8a7091aae47ec682355d971ed16bb4434fe0 | 772 | py | Python | sklearnTUT/sk6_model_attribute_method.py | subshine/tutorials | 717320cbec72e3e68acefad9c367fc6c5ffb37b1 | [
"MIT"
] | 10,786 | 2016-06-10T10:58:42.000Z | 2022-03-31T06:45:24.000Z | sklearnTUT/sk6_model_attribute_method.py | linusgi/tutorials | 37de6e0d0e9291085d0876971baefb7bab00ace2 | [
"MIT"
] | 73 | 2016-07-13T08:13:22.000Z | 2020-11-08T04:57:08.000Z | sklearnTUT/sk6_model_attribute_method.py | linusgi/tutorials | 37de6e0d0e9291085d0876971baefb7bab00ace2 | [
"MIT"
] | 6,303 | 2016-06-19T03:29:27.000Z | 2022-03-31T07:58:22.000Z | # View more python learning tutorial on my Youtube and Youku channel!!!
# Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg
# Youku video tutorial: http://i.youku.com/pythontutorial
"""
Please note, this code is only for python 3+. If you are using python 2+, please modify the code acco... | 30.88 | 109 | 0.786269 | 114 | 772 | 5.149123 | 0.561404 | 0.085179 | 0.030664 | 0.034072 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010219 | 0.112694 | 772 | 24 | 110 | 32.166667 | 0.846715 | 0.453368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.230769 | 0 | 0.230769 | 0.461538 | 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 | 0 | 0 | 1 | 0 | 1 |
fa81b577c0c9528e4951e1c22c3c3928b3efd460 | 2,392 | py | Python | 2020/day_04/answer.py | ShawnFrueh/advent_of_code | cfba339224d6a3ccf9ee34348e5f6abd5f8e49c9 | [
"MIT"
] | null | null | null | 2020/day_04/answer.py | ShawnFrueh/advent_of_code | cfba339224d6a3ccf9ee34348e5f6abd5f8e49c9 | [
"MIT"
] | null | null | null | 2020/day_04/answer.py | ShawnFrueh/advent_of_code | cfba339224d6a3ccf9ee34348e5f6abd5f8e49c9 | [
"MIT"
] | null | null | null | from pathlib import Path
from copy import deepcopy
# Get the puzzle input data
input_file = Path(__file__).parent / "input.txt"
puzzle_data = input_file.read_text()
# ------------------------- Part 1/2 -------------------------
""" Puzzle Rules:
byr (Birth Year)
iyr (Issue Year)
eyr (Expiration Year)
hgt (Height)
hcl... | 31.473684 | 86 | 0.532609 | 305 | 2,392 | 4.101639 | 0.295082 | 0.061551 | 0.023981 | 0.033573 | 0.314149 | 0.223821 | 0.223821 | 0.223821 | 0.223821 | 0.223821 | 0 | 0.040548 | 0.267977 | 2,392 | 76 | 87 | 31.473684 | 0.673901 | 0.10995 | 0 | 0.480769 | 0 | 0 | 0.047398 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.519231 | 0.038462 | 0 | 0.038462 | 0.096154 | 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 | 0 | 0 | 0 | 1 |
fa8a3250c3ab7415d1e3457aeb09cb5d00d2ee69 | 1,102 | py | Python | populate_database/06_populate_db_cuisines.py | gizmo126/HiHungry | 14a3fb7f458fc81828e86f59fba26de78d63d41c | [
"MIT"
] | 2 | 2021-02-13T04:34:21.000Z | 2021-08-30T13:46:31.000Z | populate_database/06_populate_db_cuisines.py | gizmo126/HiHungry | 14a3fb7f458fc81828e86f59fba26de78d63d41c | [
"MIT"
] | null | null | null | populate_database/06_populate_db_cuisines.py | gizmo126/HiHungry | 14a3fb7f458fc81828e86f59fba26de78d63d41c | [
"MIT"
] | 1 | 2018-04-24T00:07:18.000Z | 2018-04-24T00:07:18.000Z | import MySQLdb
import json
import random
from config import DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE
# This script populates a MySQL database with possible cuisines data from the cuisines.json
def dbconnect():
try:
db = MySQLdb.connect(
host = DB_HOST,
user = DB_USER,
... | 22.958333 | 91 | 0.637931 | 142 | 1,102 | 4.809859 | 0.401408 | 0.052709 | 0.070278 | 0.087848 | 0.149341 | 0.070278 | 0 | 0 | 0 | 0 | 0 | 0 | 0.261343 | 1,102 | 47 | 92 | 23.446809 | 0.839066 | 0.107985 | 0 | 0.210526 | 0 | 0 | 0.15 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.026316 | false | 0.052632 | 0.105263 | 0 | 0.157895 | 0.105263 | 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 | 0 | 0 | 0 | 1 |
fa902a225b37a05f84d0ef71112006d3698b2903 | 898 | py | Python | blog/models.py | omidyari/django-project | 59f579b4830a68fbec9c67e17d0ddeb7f8011833 | [
"MIT"
] | null | null | null | blog/models.py | omidyari/django-project | 59f579b4830a68fbec9c67e17d0ddeb7f8011833 | [
"MIT"
] | null | null | null | blog/models.py | omidyari/django-project | 59f579b4830a68fbec9c67e17d0ddeb7f8011833 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class category(models.Model):
name = models.CharField(max_length=250)
def __str__(self):
return self.name
class post(models.Model):
image = models.ImageField(upload_to='blog/', default='blog/deful... | 32.071429 | 78 | 0.724944 | 113 | 898 | 5.575221 | 0.557522 | 0.031746 | 0.057143 | 0.07619 | 0.149206 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009383 | 0.169265 | 898 | 27 | 79 | 33.259259 | 0.835121 | 0.026726 | 0 | 0.095238 | 0 | 0 | 0.036782 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.095238 | false | 0 | 0.095238 | 0.095238 | 0.952381 | 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 | 0 | 1 | 0 | 0 | 1 |
fa92a7879257339969e9a4311b196d7d381e8790 | 6,906 | py | Python | repcrec/util.py | blr246/adbs-repcrec | 707516e1558afb3f7eb9e7060db6bfeee457d86d | [
"MIT"
] | 1 | 2021-11-21T12:50:58.000Z | 2021-11-21T12:50:58.000Z | repcrec/util.py | blr246/adbs-repcrec | 707516e1558afb3f7eb9e7060db6bfeee457d86d | [
"MIT"
] | null | null | null | repcrec/util.py | blr246/adbs-repcrec | 707516e1558afb3f7eb9e7060db6bfeee457d86d | [
"MIT"
] | null | null | null | '''
Common utilities for RepCRec including a wait-die implementation, a transaction
class, various formatters and parsers, and a class to return the result of a
database operation.
(c) 2013 Brandon Reiss
'''
import itertools as it
class WaitDie(object):
''' State management for wait-die algorithm. '''
def __init_... | 24.576512 | 79 | 0.686939 | 959 | 6,906 | 4.777894 | 0.192909 | 0.026189 | 0.018551 | 0.01746 | 0.092536 | 0.059144 | 0.041467 | 0.025316 | 0.014404 | 0 | 0 | 0.003403 | 0.191428 | 6,906 | 280 | 80 | 24.664286 | 0.817156 | 0.37938 | 0 | 0.151515 | 0 | 0 | 0.070111 | 0 | 0 | 0 | 0 | 0 | 0.007576 | 1 | 0.25 | false | 0 | 0.007576 | 0 | 0.462121 | 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 | 0 | 0 | 0 | 1 |
fa935ffbb448b529aed4e50ddf21dc9f4497cfe0 | 879 | py | Python | euchre/util/log_util.py | bradleycwojcik/euchre-cli | e4ffcdb16720d8dafe6b5b00b50eb923c1fcfe27 | [
"MIT"
] | 3 | 2020-10-07T08:23:12.000Z | 2021-11-20T16:33:40.000Z | euchre/util/log_util.py | bradleycwojcik/euchre-cli | e4ffcdb16720d8dafe6b5b00b50eb923c1fcfe27 | [
"MIT"
] | 28 | 2020-07-14T01:29:33.000Z | 2021-11-20T04:48:09.000Z | euchre/util/log_util.py | boldandbrad/euchre-cli | 6e03f76c5feb50d677ab2558707182fa7dd5d127 | [
"MIT"
] | 4 | 2020-09-07T04:25:04.000Z | 2021-11-11T07:20:01.000Z | import getpass
import os
import platform
from loguru import logger
def logger_init() -> None:
"""Configure loguru logger."""
logger.remove() # remove stdout/stderr logging since this is a CLI
is_travis = "TRAVIS" in os.environ # running in travis ci
usrname = getpass.getuser()
if platform.sys... | 32.555556 | 82 | 0.664391 | 125 | 879 | 4.576 | 0.504 | 0.061189 | 0.041958 | 0.073427 | 0.23951 | 0.23951 | 0.202797 | 0 | 0 | 0 | 0 | 0.001408 | 0.192264 | 879 | 26 | 83 | 33.807692 | 0.804225 | 0.108077 | 0 | 0 | 0 | 0.055556 | 0.301158 | 0.181467 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0.111111 | 0.222222 | 0 | 0.277778 | 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 | 0 | 0 | 0 | 1 |
fa98d35473852e94dd1d6aea8da8b89856e7a4a1 | 540 | py | Python | venv/Lib/site-packages/alpacalib/output.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | null | null | null | venv/Lib/site-packages/alpacalib/output.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | null | null | null | venv/Lib/site-packages/alpacalib/output.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | 1 | 2020-06-28T11:47:47.000Z | 2020-06-28T11:47:47.000Z | """
output.py
Output for output script
"""
import sys
import os.path
from alpacalib.options import Options
class OutputError(Exception):
pass
class Output:
def output_script(script):
name = Options.get_output()
try:
output = None
if name == None:
outpu... | 19.285714 | 60 | 0.57037 | 60 | 540 | 5.1 | 0.566667 | 0.078431 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.335185 | 540 | 27 | 61 | 20 | 0.852368 | 0.062963 | 0 | 0 | 0 | 0 | 0.032193 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0.058824 | 0.176471 | 0 | 0.352941 | 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 | 0 | 0 | 0 | 1 |
fa9bb625d07d50f6740d70d977d10e7404e12473 | 8,321 | py | Python | seq_tools/mpl_shade.py | intbio/seq_tools | 3d3b085be561bef05d0775b367ff2712f205f2f3 | [
"CC0-1.0"
] | 1 | 2019-01-12T11:09:16.000Z | 2019-01-12T11:09:16.000Z | seq_tools/mpl_shade.py | intbio/seq_tools | 3d3b085be561bef05d0775b367ff2712f205f2f3 | [
"CC0-1.0"
] | 1 | 2019-01-13T21:38:57.000Z | 2019-04-27T18:37:43.000Z | seq_tools/mpl_shade.py | intbio/seq_tools | 3d3b085be561bef05d0775b367ff2712f205f2f3 | [
"CC0-1.0"
] | 1 | 2018-12-18T12:37:32.000Z | 2018-12-18T12:37:32.000Z | # -*- coding: utf-8 -*-
"""
This module allows for plotting of annotated graphs using matplotlib
"""
import matplotlib.pyplot as plt
from matplotlib import gridspec
import matplotlib.patches as mpatches
import matplotlib.path as mpath
import numpy as np
Path=mpath.Path
def _draw_beta(ax,start,stop,label="",linewidth... | 36.982222 | 135 | 0.644754 | 1,203 | 8,321 | 4.365752 | 0.216126 | 0.025895 | 0.011424 | 0.019421 | 0.655179 | 0.655179 | 0.636519 | 0.629094 | 0.629094 | 0.612719 | 0 | 0.028495 | 0.232424 | 8,321 | 224 | 136 | 37.147321 | 0.7938 | 0.291792 | 0 | 0.570313 | 0 | 0 | 0.093888 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.039063 | false | 0 | 0.039063 | 0 | 0.078125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 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 | 1 |
faa31a0cdc72efd55c625663a0c2ea7a16af7e23 | 589 | py | Python | data_analysis_byPro/Day09-06.py | yunjung-lee/class_python_data | 67ceab73e67ec63d408894a6ab016a8d25a4e30b | [
"MIT"
] | null | null | null | data_analysis_byPro/Day09-06.py | yunjung-lee/class_python_data | 67ceab73e67ec63d408894a6ab016a8d25a4e30b | [
"MIT"
] | null | null | null | data_analysis_byPro/Day09-06.py | yunjung-lee/class_python_data | 67ceab73e67ec63d408894a6ab016a8d25a4e30b | [
"MIT"
] | null | null | null | # SQLite 접속하기.
import pymysql
con = pymysql.connect(host='192.168.174.129', user='root',
password='1234', db='userDB', charset='utf8') # 데이터베이스 지정(또는 연결)
cur = con.cursor() # 연결 통로 생성 (쿼리문을 날릴 통로)
sql = "SELECT * FROM userTable2"
cur.execute(sql)
print(' 사용자아이디 사용자이름 사용자나이')
print(' --------... | 28.047619 | 87 | 0.565365 | 79 | 589 | 4.21519 | 0.708861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.058568 | 0.217317 | 589 | 21 | 88 | 28.047619 | 0.663774 | 0.108659 | 0 | 0 | 0 | 0 | 0.247601 | 0.06142 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.058824 | 0.058824 | 0 | 0.058824 | 0.235294 | 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 | 0 | 0 | 0 | 1 |
faae7234344624a03233d0cbbd8a7387b8b099c7 | 1,519 | py | Python | invoicing/latex/latex_invoice.py | dnegreira/Invoicing | 0bc8133e989f095c10151f67482e249416274947 | [
"MIT"
] | 10 | 2018-09-28T18:16:32.000Z | 2020-08-05T13:37:12.000Z | invoicing/latex/latex_invoice.py | dnegreira/Invoicing | 0bc8133e989f095c10151f67482e249416274947 | [
"MIT"
] | 13 | 2018-10-01T14:02:41.000Z | 2020-08-16T12:55:28.000Z | invoicing/latex/latex_invoice.py | dnegreira/Invoicing | 0bc8133e989f095c10151f67482e249416274947 | [
"MIT"
] | 7 | 2018-10-01T20:36:50.000Z | 2020-03-14T11:21:10.000Z | from invoicing.latex.latex_templating import LatexTemplating
class LatexInvoice(LatexTemplating):
def generate(self, reference_code, company_name, company_address, created_at, total_cost, jobs):
template = self.latex_jinja_env.get_template('templates/Invoice.example.tex')
if len(jobs) == 0:
... | 33.755556 | 101 | 0.537196 | 161 | 1,519 | 4.795031 | 0.47205 | 0.054404 | 0.101036 | 0.093264 | 0.072539 | 0 | 0 | 0 | 0 | 0 | 0 | 0.028348 | 0.326531 | 1,519 | 44 | 102 | 34.522727 | 0.726295 | 0 | 0 | 0 | 1 | 0 | 0.15734 | 0.019092 | 0 | 0 | 0 | 0 | 0 | 1 | 0.025 | false | 0 | 0.025 | 0 | 0.075 | 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 | 0 | 0 | 0 | 1 |
fab0a77fc71ac627e6fbbb3b92c09745c35b5a11 | 2,923 | py | Python | backend/follyengine/folly_api/models.py | proman21/FollyEngine | e268902292d0cd1a5bdce0418dbf79e76617c513 | [
"MIT"
] | null | null | null | backend/follyengine/folly_api/models.py | proman21/FollyEngine | e268902292d0cd1a5bdce0418dbf79e76617c513 | [
"MIT"
] | null | null | null | backend/follyengine/folly_api/models.py | proman21/FollyEngine | e268902292d0cd1a5bdce0418dbf79e76617c513 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.text import slugify
from rest_framework.authtoken.models import Token
from django.contrib.postgres.fields import JSONField
from ulid2 import generate_ulid_a... | 33.215909 | 77 | 0.697229 | 352 | 2,923 | 5.610795 | 0.28125 | 0.031899 | 0.038987 | 0.04557 | 0.528608 | 0.49519 | 0.432911 | 0.432911 | 0.432911 | 0.432911 | 0 | 0.006441 | 0.203216 | 2,923 | 87 | 78 | 33.597701 | 0.841563 | 0.008211 | 0 | 0.446154 | 0 | 0 | 0.040732 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.061538 | false | 0 | 0.123077 | 0.030769 | 0.738462 | 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 | 0 | 1 | 0 | 0 | 1 |
fab4c6ba00290a053c953c00f06788f32a3f1805 | 3,240 | py | Python | pythonlearn/Process-Thread-Coroutine/Process/2.Multiprocessing.Pool.py | yc19890920/Learn | 3990e75b469225ba7b430539ef9a16abe89eb863 | [
"Apache-2.0"
] | 1 | 2021-01-11T06:30:44.000Z | 2021-01-11T06:30:44.000Z | pythonlearn/Process-Thread-Coroutine/Process/2.Multiprocessing.Pool.py | yc19890920/Learn | 3990e75b469225ba7b430539ef9a16abe89eb863 | [
"Apache-2.0"
] | 23 | 2020-02-12T02:35:49.000Z | 2022-02-11T03:45:40.000Z | pythonlearn/Process-Thread-Coroutine/Process/2.Multiprocessing.Pool.py | yc19890920/Learn | 3990e75b469225ba7b430539ef9a16abe89eb863 | [
"Apache-2.0"
] | 2 | 2020-04-08T15:39:46.000Z | 2020-10-10T10:13:09.000Z | # -*- coding: utf-8 -*-
import multiprocessing
import time
############################################################
# 7.1) 进程池(非阻塞)
def func(msg):
print "msg:", msg
time.sleep(3)
print "end"
# if __name__ == "__main__":
# pool = multiprocessing.Pool(processes = 3)
# for i in... | 28.421053 | 94 | 0.530864 | 361 | 3,240 | 4.66205 | 0.249307 | 0.057041 | 0.026738 | 0.040404 | 0.621509 | 0.543672 | 0.517528 | 0.427807 | 0.427807 | 0.427807 | 0 | 0.014962 | 0.236728 | 3,240 | 114 | 95 | 28.421053 | 0.665588 | 0.415741 | 0 | 0.4 | 0 | 0 | 0.203209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.06 | null | null | 0.34 | 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 | 0 | 0 | 0 | 0 | 0 | 1 |
fab4e605366186375cedd25d0fb3a3f5aafa5abe | 318 | py | Python | algorithms/1646. Get Maximum in Generated Array.py | woozway/py3-leetcode | e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf | [
"MIT"
] | 1 | 2020-12-02T13:54:30.000Z | 2020-12-02T13:54:30.000Z | algorithms/1646. Get Maximum in Generated Array.py | woozway/py3-leetcode | e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf | [
"MIT"
] | null | null | null | algorithms/1646. Get Maximum in Generated Array.py | woozway/py3-leetcode | e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf | [
"MIT"
] | null | null | null | class Solution:
def getMaximumGenerated(self, n: int) -> int:
nums = [0,1] + [0]*(n-1)
if n < 2: return nums[n]
for i in range(2, n+1):
if i % 2 == 0 and i//2 <= n:
nums[i] = nums[i//2]
if i % 2 == 1 and i//2 + 1 <= n:
nums[i] = nums[i//2] + nums[i//2+1]
return max(nums)
| 28.909091 | 47 | 0.468553 | 61 | 318 | 2.442623 | 0.311475 | 0.09396 | 0.120805 | 0.134228 | 0.161074 | 0.161074 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 0.320755 | 318 | 10 | 48 | 31.8 | 0.606481 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0 | 0 | 0.3 | 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 | 0 | 0 | 0 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.