hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fd89a08e7b302e42c7342a9d210047fac1b9c3fb | 3,399 | py | Python | hasdrubal/visitors/type_var_resolver.py | Armani-T/hasdrubal | 7fac381b866114533e589e964ec7c27adbd1deff | [
"MIT"
] | 2 | 2021-06-25T15:46:16.000Z | 2022-02-20T22:04:36.000Z | hasdrubal/visitors/type_var_resolver.py | Armani-T/hasdrubal | 7fac381b866114533e589e964ec7c27adbd1deff | [
"MIT"
] | 42 | 2021-07-06T05:38:23.000Z | 2022-03-04T18:09:30.000Z | hasdrubal/visitors/type_var_resolver.py | Armani-T/hasdrubal | 7fac381b866114533e589e964ec7c27adbd1deff | [
"MIT"
] | null | null | null | from typing import Container
from asts.typed import Name as TypedName
from asts import base, visitor, types_ as types
PREDEFINED_TYPES: Container[str] = (
",",
"->",
"Bool",
"Float",
"Int",
"List",
"String",
"Unit",
)
def resolve_type_vars(
node: base.ASTNode,
defined_types: ... | 31.183486 | 86 | 0.626655 | 2,460 | 0.723742 | 0 | 0 | 0 | 0 | 0 | 0 | 857 | 0.252133 |
fd8a5381cdea04589d3919c507d39969d9014954 | 3,533 | py | Python | cdist/plugin.py | acerv/pytest-cdist | 24a3f0987c3bc2821b91374c93d6b1303a7aca81 | [
"MIT"
] | null | null | null | cdist/plugin.py | acerv/pytest-cdist | 24a3f0987c3bc2821b91374c93d6b1303a7aca81 | [
"MIT"
] | null | null | null | cdist/plugin.py | acerv/pytest-cdist | 24a3f0987c3bc2821b91374c93d6b1303a7aca81 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
cdist-plugin implementation.
Author:
Andrea Cervesato <andrea.cervesato@mailbox.org>
"""
import pytest
from cdist import __version__
from cdist.redis import RedisResource
from cdist.resource import ResourceError
def pytest_addoption(parser):
"""
Plugin configurations.
"""
... | 26.765152 | 85 | 0.601472 | 2,462 | 0.696858 | 0 | 0 | 196 | 0.055477 | 0 | 0 | 1,178 | 0.333428 |
fd8a85c0cecb1f0067a9c558a9299006820a9bf0 | 2,851 | py | Python | superironic/utils.py | jimrollenhagen/superironic | 45f8c50a881a0728c3d86e0783f9ee6baa47559d | [
"Apache-2.0"
] | null | null | null | superironic/utils.py | jimrollenhagen/superironic | 45f8c50a881a0728c3d86e0783f9ee6baa47559d | [
"Apache-2.0"
] | null | null | null | superironic/utils.py | jimrollenhagen/superironic | 45f8c50a881a0728c3d86e0783f9ee6baa47559d | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 30.98913 | 79 | 0.681866 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,522 | 0.533848 |
fd8b4419a03211dab8726d274c1ded97471a7d78 | 1,150 | py | Python | cloudshell/huawei/wdm/cli/huawei_cli_handler.py | QualiSystems/cloudshell-huawei-wdm | be359a6bc81fd1644e3cb2a619b7c296a17a2e68 | [
"Apache-2.0"
] | null | null | null | cloudshell/huawei/wdm/cli/huawei_cli_handler.py | QualiSystems/cloudshell-huawei-wdm | be359a6bc81fd1644e3cb2a619b7c296a17a2e68 | [
"Apache-2.0"
] | 1 | 2021-04-11T18:57:18.000Z | 2021-04-11T18:57:18.000Z | cloudshell/huawei/wdm/cli/huawei_cli_handler.py | QualiSystems/cloudshell-huawei-wdm | be359a6bc81fd1644e3cb2a619b7c296a17a2e68 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from cloudshell.cli.service.cli_service_impl import CliServiceImpl
from cloudshell.huawei.cli.huawei_cli_handler import HuaweiCli, HuaweiCliHandler
from cloudshell.huawei.wdm.cli.huawei_command_modes import (
WDMConfigCommandMode,
WDMEnableCommandMode,
)
class Huawei... | 30.263158 | 83 | 0.727826 | 838 | 0.728696 | 0 | 0 | 253 | 0.22 | 0 | 0 | 130 | 0.113043 |
fd8b6f3ec4c3956c2a4af1d583d22afb4c1f7e8e | 1,510 | py | Python | pretalx_orcid/migrations/0001_initial.py | pretalx/pretalx-orcid | a10adf5bf5579bd7818db7697d49176114c9714e | [
"Apache-2.0"
] | 1 | 2020-02-07T12:32:15.000Z | 2020-02-07T12:32:15.000Z | pretalx_orcid/migrations/0001_initial.py | pretalx/pretalx-orcid | a10adf5bf5579bd7818db7697d49176114c9714e | [
"Apache-2.0"
] | 4 | 2019-11-26T04:02:02.000Z | 2022-03-06T02:06:54.000Z | pretalx_orcid/migrations/0001_initial.py | pretalx/pretalx-orcid | a10adf5bf5579bd7818db7697d49176114c9714e | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.7 on 2019-11-20 14:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 31.458333 | 87 | 0.47947 | 1,351 | 0.894702 | 0 | 0 | 0 | 0 | 0 | 0 | 141 | 0.093377 |
fd8bcae4d3f693f9766ffc4188aca7183ade4a41 | 980 | py | Python | python/leetcode/401.py | ParkinWu/leetcode | b31312bdefbb2be795f3459e1a76fbc927cab052 | [
"MIT"
] | null | null | null | python/leetcode/401.py | ParkinWu/leetcode | b31312bdefbb2be795f3459e1a76fbc927cab052 | [
"MIT"
] | null | null | null | python/leetcode/401.py | ParkinWu/leetcode | b31312bdefbb2be795f3459e1a76fbc927cab052 | [
"MIT"
] | null | null | null | # 二进制手表顶部有 4 个 LED 代表小时(0-11),底部的 6 个 LED 代表分钟(0-59)。
#
# 每个 LED 代表一个 0 或 1,最低位在右侧。
#
#
#
# 例如,上面的二进制手表读取 “3:25”。
#
# 给定一个非负整数 n 代表当前 LED 亮着的数量,返回所有可能的时间。
#
# 案例:
#
# 输入: n = 1
# 返回: ["1:00", "2:00", "4:00", "8:00", "0:01", "0:02", "0:04", "0:08", "0:16", "0:32"]
#
#
# 注意事项:
#
# 输出的顺序没有要求。
# 小时不会以零开头,比如 “01:00” 是不允许的... | 19.6 | 107 | 0.542857 | 372 | 0.266094 | 0 | 0 | 0 | 0 | 0 | 0 | 892 | 0.638054 |
fd8bcd859196def3cab1defab94ee20606249351 | 22,340 | py | Python | torchreid/engine/image/classmemoryloss_QA.py | Arindam-1991/deep_reid | ab68d95c2229ef5b832a6a6b614a9b91e4984bd5 | [
"MIT"
] | 1 | 2021-03-27T17:27:47.000Z | 2021-03-27T17:27:47.000Z | torchreid/engine/image/classmemoryloss_QA.py | Arindam-1991/deep_reid | ab68d95c2229ef5b832a6a6b614a9b91e4984bd5 | [
"MIT"
] | null | null | null | torchreid/engine/image/classmemoryloss_QA.py | Arindam-1991/deep_reid | ab68d95c2229ef5b832a6a6b614a9b91e4984bd5 | [
"MIT"
] | null | null | null | from __future__ import division, print_function, absolute_import
import numpy as np
import torch, sys
import os.path as osp
from torchreid import metrics
from torchreid.losses import TripletLoss, CrossEntropyLoss
from torchreid.losses import ClassMemoryLoss
from ..engine import Engine
from ..pretrainer impo... | 40.32491 | 159 | 0.555237 | 21,627 | 0.968084 | 0 | 0 | 3,640 | 0.162936 | 0 | 0 | 6,580 | 0.294539 |
fd8c2c7eeb82fbf804fe620863dfe2ae2700ad4d | 337 | py | Python | setup.py | xoolive/cartotools | 2d6217fde9dadcdb860603cd4b33814b99ae451e | [
"MIT"
] | 3 | 2018-01-09T10:53:24.000Z | 2020-06-04T16:04:52.000Z | setup.py | xoolive/cartotools | 2d6217fde9dadcdb860603cd4b33814b99ae451e | [
"MIT"
] | 1 | 2018-12-16T13:49:06.000Z | 2019-02-19T20:23:19.000Z | setup.py | xoolive/cartotools | 2d6217fde9dadcdb860603cd4b33814b99ae451e | [
"MIT"
] | 1 | 2018-01-09T11:00:39.000Z | 2018-01-09T11:00:39.000Z | from setuptools import setup
setup(
name="cartotools",
version="1.2.1",
description="Making cartopy suit my needs",
license="MIT",
packages=[
"cartotools",
"cartotools.crs",
"cartotools.img_tiles",
"cartotools.osm",
],
author="Xavier Olive",
install_requi... | 19.823529 | 47 | 0.596439 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.421365 |
fd8d82fd51795634599d592a12414f82293ec386 | 2,623 | py | Python | api/app/tests/weather_models/endpoints/test_models_endpoints.py | bcgov/wps | 71df0de72de9cd656dc9ebf8461ffe47cfb155f6 | [
"Apache-2.0"
] | 19 | 2020-01-31T21:51:31.000Z | 2022-01-07T14:40:03.000Z | api/app/tests/weather_models/endpoints/test_models_endpoints.py | bcgov/wps | 71df0de72de9cd656dc9ebf8461ffe47cfb155f6 | [
"Apache-2.0"
] | 1,680 | 2020-01-24T23:25:08.000Z | 2022-03-31T23:50:27.000Z | api/app/tests/weather_models/endpoints/test_models_endpoints.py | bcgov/wps | 71df0de72de9cd656dc9ebf8461ffe47cfb155f6 | [
"Apache-2.0"
] | 6 | 2020-04-28T22:41:08.000Z | 2021-05-05T18:16:06.000Z | """ Functional testing for /models/* endpoints.
"""
import os
import json
import importlib
import logging
import pytest
from pytest_bdd import scenario, given, then, when
from fastapi.testclient import TestClient
import app.main
from app.tests import load_sqlalchemy_response_from_json
from app.tests import load_json_fi... | 34.973333 | 110 | 0.733511 | 0 | 0 | 0 | 0 | 1,769 | 0.674419 | 0 | 0 | 777 | 0.296226 |
fd8e56403a239049d047cb2ae7cdbf57d5c4d0b6 | 3,144 | py | Python | CLE/Module_DeploymentMonitoring/urls.py | CherBoon/Cloudtopus | 41e4b3743d8f5f988373d14937a1ed8dbdf92afb | [
"MIT"
] | 3 | 2019-03-04T02:55:25.000Z | 2021-02-13T09:00:52.000Z | CLE/Module_DeploymentMonitoring/urls.py | MartinTeo/Cloudtopus | ebcc57cdf10ca2b73343f03abb33a12ab9c6edef | [
"MIT"
] | 6 | 2019-02-28T08:54:25.000Z | 2022-03-02T14:57:04.000Z | CLE/Module_DeploymentMonitoring/urls.py | MartinTeo/Cloudtopus | ebcc57cdf10ca2b73343f03abb33a12ab9c6edef | [
"MIT"
] | 2 | 2019-02-28T08:52:15.000Z | 2019-09-24T18:32:01.000Z | from django.contrib import admin
from Module_DeploymentMonitoring import views
from django.urls import path,re_path
urlpatterns = [
path('instructor/ITOperationsLab/setup/awskeys/',views.faculty_Setup_GetAWSKeys,name='itopslab_setup_AWSKeys'),
path('instructor/ITOperationsLab/monitor/',views.faculty_Monitor_Ba... | 89.828571 | 159 | 0.818702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,820 | 0.57888 |
fd8eaa1dd13d7842905f05439abe0c727ac76666 | 2,918 | py | Python | 30-Days-of-Python-master/practice_day_9/alpha_day_9/akash_prank.py | vimm0/python_exercise | 7773d95b4c25b82a9d014f7a814ac83df9ebac17 | [
"MIT"
] | null | null | null | 30-Days-of-Python-master/practice_day_9/alpha_day_9/akash_prank.py | vimm0/python_exercise | 7773d95b4c25b82a9d014f7a814ac83df9ebac17 | [
"MIT"
] | null | null | null | 30-Days-of-Python-master/practice_day_9/alpha_day_9/akash_prank.py | vimm0/python_exercise | 7773d95b4c25b82a9d014f7a814ac83df9ebac17 | [
"MIT"
] | 1 | 2018-01-04T16:27:31.000Z | 2018-01-04T16:27:31.000Z | class Akash():
msg="""
Seems like you are in trouble now. I can feel that...hahaaa
Your name:Akash
Address:Nepalgunj
"""
another="""
I am not really good friend of yours becauase i am going transfer some viruses from the internet.\n
... | 35.156627 | 119 | 0.186429 | 2,853 | 0.977724 | 0 | 0 | 0 | 0 | 0 | 0 | 2,611 | 0.894791 |
fd93406451b3b5dc2f87a2b2dbd3aa123abc1eb6 | 1,312 | py | Python | mainapp/models/user_alert.py | cyroxx/meine-stadt-transparent | d5a3f03a29a1bb97ce50ac5257d8bbd5208d9218 | [
"MIT"
] | 34 | 2017-10-04T14:20:41.000Z | 2022-03-11T18:06:48.000Z | mainapp/models/user_alert.py | cyroxx/meine-stadt-transparent | d5a3f03a29a1bb97ce50ac5257d8bbd5208d9218 | [
"MIT"
] | 588 | 2017-10-14T18:31:17.000Z | 2022-03-16T13:00:30.000Z | mainapp/models/user_alert.py | codeformuenster/meine-stadt-transparent | 1458bc6acad40183908e2b7cc98ef92165d1123a | [
"MIT"
] | 11 | 2017-11-27T10:12:59.000Z | 2022-02-09T10:27:11.000Z | from django.contrib.auth.models import User
from django.db import models
from mainapp.functions.search import params_to_search_string, search_string_to_params
from mainapp.functions.search_notification_tools import (
params_to_human_string,
params_are_equal,
)
class UserAlert(models.Model):
user = models... | 32 | 85 | 0.717988 | 1,039 | 0.791921 | 0 | 0 | 481 | 0.366616 | 0 | 0 | 0 | 0 |
fd944074d8e83c269f766de8fed07825db678f3d | 8,123 | py | Python | COT/helpers/tests/test_fatdisk.py | morneaup/cot | 3d4dc7079a33aa0c09216ec339b44f84ab69ff4b | [
"MIT"
] | 81 | 2015-01-18T22:31:42.000Z | 2022-03-14T12:34:33.000Z | COT/helpers/tests/test_fatdisk.py | morneaup/cot | 3d4dc7079a33aa0c09216ec339b44f84ab69ff4b | [
"MIT"
] | 67 | 2015-01-05T15:24:39.000Z | 2021-08-16T12:44:58.000Z | COT/helpers/tests/test_fatdisk.py | morneaup/cot | 3d4dc7079a33aa0c09216ec339b44f84ab69ff4b | [
"MIT"
] | 20 | 2015-07-09T14:20:25.000Z | 2021-09-18T17:59:57.000Z | #!/usr/bin/env python
#
# fatdisk.py - Unit test cases for COT.helpers.fatdisk submodule.
#
# March 2015, Glenn F. Matthews
# Copyright (c) 2014-2017 the COT project developers.
# See the COPYRIGHT.txt file at the top-level directory of this distribution
# and at https://github.com/glennmatthews/cot/blob/master/COPYRIG... | 40.014778 | 79 | 0.596331 | 6,912 | 0.850917 | 0 | 0 | 7,048 | 0.86766 | 0 | 0 | 2,849 | 0.350732 |
fd969867a45418ad24a3e7bb303872fc31aae097 | 541 | py | Python | scripts/set_left_arm2static_pose.py | birlrobotics/birl_kitting_experiment | 75cf42b6fd187b12e99b0e916c73058f429a556c | [
"BSD-3-Clause"
] | 2 | 2019-06-03T03:33:50.000Z | 2019-12-30T05:43:34.000Z | scripts/set_left_arm2static_pose.py | birlrobotics/birl_kitting_experiment | 75cf42b6fd187b12e99b0e916c73058f429a556c | [
"BSD-3-Clause"
] | null | null | null | scripts/set_left_arm2static_pose.py | birlrobotics/birl_kitting_experiment | 75cf42b6fd187b12e99b0e916c73058f429a556c | [
"BSD-3-Clause"
] | 1 | 2019-12-30T05:43:35.000Z | 2019-12-30T05:43:35.000Z | #!/usr/bin/env python
import baxter_interface
import rospy
if __name__ == '__main__':
rospy.init_node("set_left_arm_py")
names = ['left_e0', 'left_e1', 'left_s0', 'left_s1', 'left_w0', 'left_w1', 'left_w2']
joints = [-0.8022719520640714, 1.7184419776286348, 0.21399031991001521, 0.324436936637765, 2.586291... | 28.473684 | 156 | 0.713494 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.227357 |
fd97704e53ec2a3a2b53ad0c5d0eef703c39868d | 4,414 | py | Python | python/SessionCallbackPLSQL.py | synetcom/oracle-db-examples | e995ca265b93c0d6b7da9ad617994288b3a19a2c | [
"Apache-2.0"
] | 4 | 2019-10-26T06:21:32.000Z | 2021-02-15T15:28:02.000Z | python/SessionCallbackPLSQL.py | synetcom/oracle-db-examples | e995ca265b93c0d6b7da9ad617994288b3a19a2c | [
"Apache-2.0"
] | null | null | null | python/SessionCallbackPLSQL.py | synetcom/oracle-db-examples | e995ca265b93c0d6b7da9ad617994288b3a19a2c | [
"Apache-2.0"
] | 5 | 2019-10-26T06:21:31.000Z | 2022-03-10T12:47:13.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Sess... | 41.641509 | 79 | 0.705709 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,173 | 0.718849 |
fd9b3eca720cfbb505d3feb4ca4a2f19b87529e1 | 536 | py | Python | mbrl/env/wrappers/gym_jump_wrapper.py | MaxSobolMark/mbrl-lib | bc8ccfe8a56b58d3ce5bae2c4ccdadd82ecdb594 | [
"MIT"
] | null | null | null | mbrl/env/wrappers/gym_jump_wrapper.py | MaxSobolMark/mbrl-lib | bc8ccfe8a56b58d3ce5bae2c4ccdadd82ecdb594 | [
"MIT"
] | null | null | null | mbrl/env/wrappers/gym_jump_wrapper.py | MaxSobolMark/mbrl-lib | bc8ccfe8a56b58d3ce5bae2c4ccdadd82ecdb594 | [
"MIT"
] | null | null | null | """Reward wrapper that gives rewards for positive change in z axis.
Based on MOPO: https://arxiv.org/abs/2005.13239"""
from gym import Wrapper
class JumpWrapper(Wrapper):
def __init__(self, env):
super(JumpWrapper, self).__init__(env)
self._z_init = self.env.sim.data.qpos[1]
def step(self... | 31.529412 | 67 | 0.654851 | 386 | 0.720149 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.225746 |
fd9b964182281e0d8725c664433f2162b4f057ea | 2,102 | py | Python | img.py | svh2811/Advanced-Lane-Finding | f451f26ef126efcbef711e8c4a14d28d24b08262 | [
"MIT"
] | null | null | null | img.py | svh2811/Advanced-Lane-Finding | f451f26ef126efcbef711e8c4a14d28d24b08262 | [
"MIT"
] | null | null | null | img.py | svh2811/Advanced-Lane-Finding | f451f26ef126efcbef711e8c4a14d28d24b08262 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import cv2
from thresholding import *
# list of lists
def plot_images_along_row(images):
fig = plt.figure()
rows = len(images)
cols = len(images[0])
i = 0
for row in range(rows):
for col in range(cols):
a = fig.add_subplot(row... | 22.602151 | 84 | 0.597526 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 688 | 0.327307 |
fd9c0ebbfa6af60ce30b95d414b6de4fd9d68823 | 479 | py | Python | api/utils/signal_hup.py | AutoCoinDCF/NEW_API | f4abc48fff907a0785372b941afcd67e62eec825 | [
"Apache-2.0"
] | null | null | null | api/utils/signal_hup.py | AutoCoinDCF/NEW_API | f4abc48fff907a0785372b941afcd67e62eec825 | [
"Apache-2.0"
] | null | null | null | api/utils/signal_hup.py | AutoCoinDCF/NEW_API | f4abc48fff907a0785372b941afcd67e62eec825 | [
"Apache-2.0"
] | null | null | null | import signal
import ConfigParser
def get_config():
conf = ConfigParser.ConfigParser()
conf.read("config.cfg")
name = conf.get("test", "name")
print(name)
def update_config(signum, frame):
print("update config")
get_config()
def ctrl_c(signum, frame):
print("input ctrl c")
exit(1)
... | 14.96875 | 43 | 0.682672 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.186858 |
fd9c7ab39a034416b3b55dc333af7b177eebd1ee | 5,602 | py | Python | disease_predictor_backend/disease_prediction.py | waizshahid/Disease-Predictor | 2bf2e69631ddbf7ffce0b6c39adcb6816d4208b2 | [
"MIT"
] | null | null | null | disease_predictor_backend/disease_prediction.py | waizshahid/Disease-Predictor | 2bf2e69631ddbf7ffce0b6c39adcb6816d4208b2 | [
"MIT"
] | 7 | 2020-09-07T21:31:50.000Z | 2022-02-26T22:28:30.000Z | disease_predictor_backend/disease_prediction.py | waizshahid/Disease-Predictor | 2bf2e69631ddbf7ffce0b6c39adcb6816d4208b2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
import flask
from flask import request, jsonify
import time
import sqlite3
import random
# import the necessary packages
from keras.preprocessing.image import img_to_array
from keras.models import load_model
from keras import backend
from imutils import build_montages
... | 30.950276 | 141 | 0.632453 | 0 | 0 | 0 | 0 | 4,594 | 0.820064 | 0 | 0 | 2,324 | 0.414852 |
fd9d4c56c77881ca620b8d3d69d3ef8f45c56824 | 1,917 | py | Python | core/views.py | georgeo23/fika_backend | bff76f3be8bb4af7499bb17127b96b4d4aca14e1 | [
"MIT"
] | null | null | null | core/views.py | georgeo23/fika_backend | bff76f3be8bb4af7499bb17127b96b4d4aca14e1 | [
"MIT"
] | null | null | null | core/views.py | georgeo23/fika_backend | bff76f3be8bb4af7499bb17127b96b4d4aca14e1 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.contrib.auth.models import User
from rest_framework import permissions, status
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.views import APIView
from .serialize... | 32.491525 | 83 | 0.7277 | 1,231 | 0.642149 | 0 | 0 | 218 | 0.113719 | 0 | 0 | 203 | 0.105895 |
fd9dfebdc3992ce7b8a849f7cc5d3d65ff09d8f0 | 352 | py | Python | src/tweetvalidator/data_processing/__init__.py | JoshuaGRubin/AI-Tweet-Validator | c011b08163cfd322c637c2296dab7ae41a64ae71 | [
"MIT"
] | 5 | 2019-06-27T02:18:08.000Z | 2020-03-09T22:03:09.000Z | src/tweetvalidator/data_processing/__init__.py | JoshuaGRubin/AI-Tweet-Validator | c011b08163cfd322c637c2296dab7ae41a64ae71 | [
"MIT"
] | 11 | 2020-01-28T22:50:34.000Z | 2022-02-10T00:31:21.000Z | src/tweetvalidator/data_processing/__init__.py | JoshuaGRubin/AI-Text-Validator | c011b08163cfd322c637c2296dab7ae41a64ae71 | [
"MIT"
] | 1 | 2020-02-21T03:38:12.000Z | 2020-02-21T03:38:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .filter_tweets import filter_tweets_from_directories
from .filter_tweets import filter_tweets_from_files
from .download_tweets import get_tweets_by_user
from .embed_tweets import SentenceEncoder
from .embed_tweets import embed_tweets_from_file
from .embed_tweets impor... | 39.111111 | 57 | 0.855114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.127841 |
fd9e5a93435223ef2e9839097575d0e44e5ee1f5 | 2,132 | py | Python | portalsdmz/measureTools/models.py | larc-usp/data-transfer-tester | fd94f120961d6016f58247d31b5d04b2f2b2cd07 | [
"AFL-2.1"
] | null | null | null | portalsdmz/measureTools/models.py | larc-usp/data-transfer-tester | fd94f120961d6016f58247d31b5d04b2f2b2cd07 | [
"AFL-2.1"
] | 2 | 2017-12-13T20:57:34.000Z | 2017-12-13T20:57:35.000Z | portalsdmz/measureTools/models.py | larc-usp/data-transfer-tester | fd94f120961d6016f58247d31b5d04b2f2b2cd07 | [
"AFL-2.1"
] | null | null | null | from django.db import models
from scenarios.models import ScenarioData
# Create your models here.
class scpData(models.Model):
velocidade = models.DecimalField(max_digits=5, decimal_places=1)
scenario = models.ForeignKey(ScenarioData, null=True)
num_teste = models.SmallIntegerField()
descricao_erro = models.... | 31.352941 | 66 | 0.778612 | 2,019 | 0.946998 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.012195 |
fd9eda7f958b9bb9b2b7af7adc0477c17f9fb5fc | 19,230 | py | Python | web/app.py | Luzkan/MessengerNotifier | 462c6b1a9aa0a29a0dd6b5fc77d0677c61962d5d | [
"Linux-OpenIB"
] | 4 | 2020-06-01T09:01:47.000Z | 2021-04-16T20:07:29.000Z | web/app.py | Luzkan/NotifAyy | 462c6b1a9aa0a29a0dd6b5fc77d0677c61962d5d | [
"Linux-OpenIB"
] | 20 | 2020-06-05T16:54:36.000Z | 2020-06-09T13:25:59.000Z | web/app.py | Luzkan/MessengerNotifier | 462c6b1a9aa0a29a0dd6b5fc77d0677c61962d5d | [
"Linux-OpenIB"
] | 2 | 2020-05-07T04:51:00.000Z | 2020-05-08T17:52:55.000Z | import logging
from flask import Flask, render_template, request, redirect, flash, session, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_login import UserMixin, LoginManager, login_user, logout_user
from datetime import datetime
from passlib.hash import sha256_crypt
import msnotifier.bot.siteMonitor as s... | 36.768642 | 168 | 0.5974 | 3,596 | 0.18699 | 0 | 0 | 8,851 | 0.460246 | 0 | 0 | 7,479 | 0.388903 |
fd9edbd2527ab031760844081c4c8a7d476ee612 | 2,344 | py | Python | src/tcp/registration/pygame_labeler.py | Iszhanghailun/Traffic_Camera_Pipeline | 4dbd0e993087d46066a780f5345c125f47b28881 | [
"MIT"
] | 5 | 2019-04-04T17:30:41.000Z | 2021-12-06T15:27:43.000Z | src/tcp/registration/pygame_labeler.py | Iszhanghailun/Traffic_Camera_Pipeline | 4dbd0e993087d46066a780f5345c125f47b28881 | [
"MIT"
] | 2 | 2018-02-07T06:22:08.000Z | 2020-04-20T06:54:52.000Z | src/tcp/registration/pygame_labeler.py | Iszhanghailun/Traffic_Camera_Pipeline | 4dbd0e993087d46066a780f5345c125f47b28881 | [
"MIT"
] | 7 | 2018-02-06T23:23:29.000Z | 2020-09-20T14:48:22.000Z | import sys, os
import gym
import gym_urbandriving as uds
import cProfile
import time
import numpy as np
import pickle
import skimage.transform
import cv2
import IPython
import pygame
from random import shuffle
from gym_urbandriving.agents import KeyboardAgent, AccelAgent, NullAgent, TrafficLightAgent#, RRTAgent
from g... | 26.942529 | 103 | 0.610922 | 1,942 | 0.828498 | 0 | 0 | 0 | 0 | 0 | 0 | 748 | 0.319113 |
fd9ef32448c7395440ff57be12cda76c221914ac | 12,319 | py | Python | maccli/service/instance.py | manageacloud/manageacloud-cli | 1b7d9d5239f9e51f97d0377d223db0f58ca0ca7c | [
"MIT"
] | 6 | 2015-09-21T09:02:04.000Z | 2017-02-08T23:40:18.000Z | maccli/service/instance.py | manageacloud/manageacloud-cli | 1b7d9d5239f9e51f97d0377d223db0f58ca0ca7c | [
"MIT"
] | 3 | 2015-11-03T01:44:29.000Z | 2016-03-25T08:36:15.000Z | maccli/service/instance.py | manageacloud/manageacloud-cli | 1b7d9d5239f9e51f97d0377d223db0f58ca0ca7c | [
"MIT"
] | 4 | 2015-07-06T01:46:13.000Z | 2019-01-10T23:08:19.000Z | import os
import tempfile
import time
import urllib
import urllib.parse
import pexpect
import maccli.dao.api_instance
import maccli.helper.cmd
import maccli.helper.simplecache
import maccli.helper.metadata
from maccli.helper.exception import InstanceDoesNotExistException, InstanceNotReadyException
def list_instance... | 29.973236 | 119 | 0.583976 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,610 | 0.211868 |
fd9f2efde7a1d0ab6cab653c4c31ffe2c9cae398 | 5,741 | py | Python | odmlui/helpers.py | mpsonntag/odml-ui | bd1ba1b5a04e4409d1f5b05fc491411963ded1fd | [
"BSD-3-Clause"
] | 3 | 2017-03-06T17:00:45.000Z | 2020-05-05T20:59:28.000Z | odmlui/helpers.py | mpsonntag/odml-ui | bd1ba1b5a04e4409d1f5b05fc491411963ded1fd | [
"BSD-3-Clause"
] | 138 | 2017-02-27T17:08:32.000Z | 2021-02-10T14:06:45.000Z | odmlui/helpers.py | mpsonntag/odml-ui | bd1ba1b5a04e4409d1f5b05fc491411963ded1fd | [
"BSD-3-Clause"
] | 7 | 2017-03-07T06:39:18.000Z | 2020-04-19T12:54:51.000Z | """
The 'helpers' module provides various helper functions.
"""
import getpass
import json
import os
import subprocess
import sys
from odml import fileio
from odml.dtypes import default_values
from odml.tools.parser_utils import SUPPORTED_PARSERS
from .treemodel import value_model
try: # Python 3
from urllib.p... | 27.338095 | 82 | 0.659815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,516 | 0.438251 |
fd9fb12d6a255983397f47fb91d956bce471d4bb | 3,511 | py | Python | mindspore/dataset/transforms/c_transforms.py | Xylonwang/mindspore | ea37dc76f0a8f0b10edd85c2ad545af44552af1e | [
"Apache-2.0"
] | 1 | 2020-06-17T07:05:45.000Z | 2020-06-17T07:05:45.000Z | mindspore/dataset/transforms/c_transforms.py | Xylonwang/mindspore | ea37dc76f0a8f0b10edd85c2ad545af44552af1e | [
"Apache-2.0"
] | null | null | null | mindspore/dataset/transforms/c_transforms.py | Xylonwang/mindspore | ea37dc76f0a8f0b10edd85c2ad545af44552af1e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 31.630631 | 111 | 0.621191 | 2,541 | 0.723725 | 0 | 0 | 805 | 0.229279 | 0 | 0 | 2,334 | 0.664768 |
fda32d9ef88615859faf1c308e9468dde8a656a0 | 2,264 | py | Python | cgatpipelines/tools/pipeline_docs/pipeline_rrbs/trackers/rrbsReport.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 49 | 2015-04-13T16:49:25.000Z | 2022-03-29T10:29:14.000Z | cgatpipelines/tools/pipeline_docs/pipeline_rrbs/trackers/rrbsReport.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 252 | 2015-04-08T13:23:34.000Z | 2019-03-18T21:51:29.000Z | cgatpipelines/tools/pipeline_docs/pipeline_rrbs/trackers/rrbsReport.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 22 | 2015-05-21T00:37:52.000Z | 2019-09-25T05:04:27.000Z | import re
from CGATReport.Tracker import *
from CGATReport.Utils import PARAMS as P
# get from config file
UCSC_DATABASE = "hg19"
EXPORTDIR = "export"
###################################################################
###################################################################
##############################... | 31.444444 | 149 | 0.518993 | 849 | 0.375 | 0 | 0 | 0 | 0 | 0 | 0 | 1,036 | 0.457597 |
fda439b250b37d77743740f40f14e6a0ae152586 | 512 | py | Python | leetcode/python/985_sum_of_even_number_after_queries.py | VVKot/leetcode-solutions | 7d6e599b223d89a7861929190be715d3b3604fa4 | [
"MIT"
] | 4 | 2019-04-22T11:57:36.000Z | 2019-10-29T09:12:56.000Z | leetcode/python/985_sum_of_even_number_after_queries.py | VVKot/coding-competitions | 7d6e599b223d89a7861929190be715d3b3604fa4 | [
"MIT"
] | null | null | null | leetcode/python/985_sum_of_even_number_after_queries.py | VVKot/coding-competitions | 7d6e599b223d89a7861929190be715d3b3604fa4 | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def sumEvenAfterQueries(self,
A: List[int],
queries: List[List[int]]) -> List[int]:
even_sum = sum(num for num in A if not num & 1)
result = []
for val, idx in queries:
if not A[idx... | 26.947368 | 67 | 0.451172 | 485 | 0.947266 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fda4de20d32afa6769144964f3e6cd00599e20ed | 7,400 | py | Python | data.py | MicBrain/Laziness-Finder | 42f0a8c21ca80f81c540914b7fbe7d0491b5452b | [
"MIT"
] | 3 | 2015-01-06T19:58:47.000Z | 2015-06-08T19:47:11.000Z | data.py | MicBrain/Laziness-Finder | 42f0a8c21ca80f81c540914b7fbe7d0491b5452b | [
"MIT"
] | null | null | null | data.py | MicBrain/Laziness-Finder | 42f0a8c21ca80f81c540914b7fbe7d0491b5452b | [
"MIT"
] | null | null | null | import csv
# Finding States' Laziness Rankings: #
dataDict = {}
with open('data.csv', 'rU') as csvfile:
dataReader = csv.reader(csvfile, delimiter=',')
for row in dataReader:
state = row[0]
row.pop(0)
dataDict[state] = row
projectedmeans = []
with open('rafadata.csv', 'rb') as csvfile:
dataReader = csv.... | 24.749164 | 177 | 0.672973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,766 | 0.373784 |
fda704c8c3598728280ac25d245978289f33459f | 1,540 | py | Python | camera/start.py | IbrahimAhmad65/pythonApp | 76c6e2a6de48d34b034bfc0e045cc345b90bf45c | [
"MIT"
] | null | null | null | camera/start.py | IbrahimAhmad65/pythonApp | 76c6e2a6de48d34b034bfc0e045cc345b90bf45c | [
"MIT"
] | null | null | null | camera/start.py | IbrahimAhmad65/pythonApp | 76c6e2a6de48d34b034bfc0e045cc345b90bf45c | [
"MIT"
] | null | null | null | #/bin/python3
import numpy as np
from PIL import Image
def processbad(array):
#arr = np.zeros([array.size(),array[0].size(),array[0][0].size])
arr = np.zeros([int(np.size(array)/8),
int(np.size(array[0])/8),3],
dtype=np.byte)
# print (arr)
counter = 0
count = 0
for i in array:
... | 26.101695 | 193 | 0.555844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.178571 |
fda7b7ab5e740804c9088eb3b79d539461e5afae | 1,290 | py | Python | esque/cli/commands/edit/topic.py | real-digital/esque | 0b779fc308ce8bce45c1903f36c33664b2e832e7 | [
"MIT"
] | 29 | 2019-05-10T21:12:38.000Z | 2021-08-24T08:09:49.000Z | esque/cli/commands/edit/topic.py | real-digital/esque | 0b779fc308ce8bce45c1903f36c33664b2e832e7 | [
"MIT"
] | 103 | 2019-05-17T07:21:41.000Z | 2021-12-02T08:29:00.000Z | esque/cli/commands/edit/topic.py | real-digital/esque | 0b779fc308ce8bce45c1903f36c33664b2e832e7 | [
"MIT"
] | 2 | 2019-05-28T06:45:14.000Z | 2019-11-21T00:33:15.000Z | import click
from esque import validation
from esque.cli.autocomplete import list_topics
from esque.cli.helpers import edit_yaml, ensure_approval
from esque.cli.options import State, default_options
from esque.cli.output import pretty_topic_diffs
from esque.resources.topic import copy_to_local
@click.command("topic"... | 34.864865 | 115 | 0.762016 | 0 | 0 | 0 | 0 | 991 | 0.768217 | 0 | 0 | 245 | 0.189922 |
fda80efdae2846a2b9845cad8f9cce0c191ea1d2 | 134 | py | Python | euporie/__main__.py | joouha/euporie | 7f1cf9a3b4061b662c1e56b16a3a8883bd50e315 | [
"MIT"
] | 505 | 2021-05-08T22:52:19.000Z | 2022-03-31T15:52:43.000Z | euporie/__main__.py | joouha/euporie | 7f1cf9a3b4061b662c1e56b16a3a8883bd50e315 | [
"MIT"
] | 19 | 2021-05-09T09:06:40.000Z | 2022-03-26T14:49:35.000Z | euporie/__main__.py | joouha/euporie | 7f1cf9a3b4061b662c1e56b16a3a8883bd50e315 | [
"MIT"
] | 16 | 2021-05-09T00:07:14.000Z | 2022-03-28T09:16:11.000Z | # -*- coding: utf-8 -*-
"""Main entry point into euporie."""
from euporie.app import App
if __name__ == "__main__":
App.launch()
| 19.142857 | 36 | 0.634328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.514925 |
fda8d40081b9fb4ec44129fb7abfaa7410ce0508 | 9,535 | py | Python | robocorp-python-ls-core/src/robocorp_ls_core/pluginmanager.py | anton264/robotframework-lsp | 6f8f89b88ec56b767f6d5e9cf0d3fb58847e5844 | [
"ECL-2.0",
"Apache-2.0"
] | 92 | 2020-01-22T22:15:29.000Z | 2022-03-31T05:19:16.000Z | robocorp-python-ls-core/src/robocorp_ls_core/pluginmanager.py | anton264/robotframework-lsp | 6f8f89b88ec56b767f6d5e9cf0d3fb58847e5844 | [
"ECL-2.0",
"Apache-2.0"
] | 604 | 2020-01-25T17:13:27.000Z | 2022-03-31T18:58:24.000Z | robocorp-python-ls-core/src/robocorp_ls_core/pluginmanager.py | anton264/robotframework-lsp | 6f8f89b88ec56b767f6d5e9cf0d3fb58847e5844 | [
"ECL-2.0",
"Apache-2.0"
] | 39 | 2020-02-06T00:38:06.000Z | 2022-03-15T06:14:19.000Z | # Original work Copyright 2018 Brainwy Software Ltda (Dual Licensed: LGPL / Apache 2.0)
# From https://github.com/fabioz/pyvmmonitor-core
# See ThirdPartyNotices.txt in the project root for license information.
# All modifications Copyright (c) Robocorp Technologies Inc.
# All rights reserved.
#
# Licensed under the Ap... | 35.446097 | 100 | 0.607971 | 6,562 | 0.688201 | 0 | 0 | 599 | 0.062821 | 0 | 0 | 3,759 | 0.394232 |
fdaa4e938b8821b9a6f605b0dbe6cbeea3d62940 | 25 | py | Python | version.py | vignesh1793/gmail_reader | 8bcf8dbc4e839e8eb736c1ae2fef9fd4f9f77ded | [
"MIT"
] | 1 | 2020-07-29T03:35:26.000Z | 2020-07-29T03:35:26.000Z | version.py | thevickypedia/gmail_reader | 8bcf8dbc4e839e8eb736c1ae2fef9fd4f9f77ded | [
"MIT"
] | null | null | null | version.py | thevickypedia/gmail_reader | 8bcf8dbc4e839e8eb736c1ae2fef9fd4f9f77ded | [
"MIT"
] | null | null | null | version_info = (0, 5, 2)
| 12.5 | 24 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fdab78fe2c0240156557e76473319683d8e4d96e | 291 | py | Python | hippynn/interfaces/__init__.py | tautomer/hippynn | df4504a5ea4680cfc61f490984dcddeac7ed99ee | [
"BSD-3-Clause"
] | 21 | 2021-11-17T00:56:35.000Z | 2022-03-22T05:57:11.000Z | hippynn/interfaces/__init__.py | tautomer/hippynn | df4504a5ea4680cfc61f490984dcddeac7ed99ee | [
"BSD-3-Clause"
] | 4 | 2021-12-17T16:16:53.000Z | 2022-03-16T23:50:38.000Z | hippynn/interfaces/__init__.py | tautomer/hippynn | df4504a5ea4680cfc61f490984dcddeac7ed99ee | [
"BSD-3-Clause"
] | 6 | 2021-11-30T21:09:31.000Z | 2022-03-18T07:07:32.000Z | """
``hippynn`` currently has interfaces to the following other codes:
1. ``ase`` for atomic simulation
2. ``pyseqm`` for combined ML-seqm models
3. ``schnetpack`` for usage of schnet models in ``hippynn``.
This subpackage is not available by default; you must import it explicitly.
"""
| 24.25 | 75 | 0.721649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.996564 |
fdac411261e3837a075f2bf9d23c9a72e80c187a | 459 | py | Python | code/data_owner_1/get_connection.py | ClarkYan/msc-thesis | c4fbd901c2664aa7140e5e82fb322ed0f578761a | [
"Apache-2.0"
] | 7 | 2017-11-05T08:22:51.000Z | 2021-09-14T19:34:30.000Z | code/data_owner_1/get_connection.py | ClarkYan/msc-thesis | c4fbd901c2664aa7140e5e82fb322ed0f578761a | [
"Apache-2.0"
] | 1 | 2021-02-27T07:24:50.000Z | 2021-04-24T03:29:12.000Z | code/data_owner_1/get_connection.py | ClarkYan/msc-thesis | c4fbd901c2664aa7140e5e82fb322ed0f578761a | [
"Apache-2.0"
] | 3 | 2019-04-15T03:22:22.000Z | 2022-03-12T11:27:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Author: ClarkYAN -*-
import requests
def set_up_connection(url, sender):
# files = {'dataset': open(filename, 'rb')}
user_info = {'name': sender}
r = requests.post(url, data=user_info, headers={'Connection': 'close'})
if r.text == "success":
... | 27 | 75 | 0.625272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.431373 |
fdad3ab7cf57f8eea008adff9a2f0ea59bd908a4 | 1,553 | py | Python | signup_instagram.py | cnfreitax/all_scrapers | 35597cd3845c64b589cb2937ea7ea70ea4cd3286 | [
"Apache-2.0"
] | null | null | null | signup_instagram.py | cnfreitax/all_scrapers | 35597cd3845c64b589cb2937ea7ea70ea4cd3286 | [
"Apache-2.0"
] | null | null | null | signup_instagram.py | cnfreitax/all_scrapers | 35597cd3845c64b589cb2937ea7ea70ea4cd3286 | [
"Apache-2.0"
] | null | null | null | """
use of script to create the login method
use a fake account!
"""
from selenium import webdriver
from time import sleep
from bs4 import BeautifulSoup as bs
class Login:
def __init__(self, email, password, idPage):
self.browser = webdriver.Chrome('/home/ekoar/chromedriver')
self.email = email
... | 35.295455 | 151 | 0.647778 | 1,391 | 0.895686 | 0 | 0 | 0 | 0 | 0 | 0 | 407 | 0.262073 |
fdad5082e78e4cecb0dc06f0019827b83dac2415 | 4,699 | py | Python | ntee/utils/model_reader.py | AdityaAS/PyTorch_NTEE | a1dc5cc6cd22fc9de3f054fa35f50b975bae75ce | [
"MIT"
] | 1 | 2019-01-15T11:21:08.000Z | 2019-01-15T11:21:08.000Z | ntee/utils/model_reader.py | AdityaAS/PyTorch_NTEE | a1dc5cc6cd22fc9de3f054fa35f50b975bae75ce | [
"MIT"
] | null | null | null | ntee/utils/model_reader.py | AdityaAS/PyTorch_NTEE | a1dc5cc6cd22fc9de3f054fa35f50b975bae75ce | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import joblib
import torch
import numpy as np
from ntee.utils.my_tokenizer import RegexpTokenizer
from ntee.utils.vocab_joint import JointVocab
from ntee.utils.vocab import Vocab
class ModelReader(object):
def __init__(self, model_file):
model = joblib.load(model_file, mmap_mode='r... | 27.970238 | 83 | 0.589062 | 4,491 | 0.955735 | 0 | 0 | 701 | 0.149181 | 0 | 0 | 535 | 0.113854 |
fdae4d589a0bfe5706d084ebb885895cfa2070d3 | 1,479 | py | Python | setup.py | polishmatt/sputr | 7611d40090c8115dff69912725efc506414ac47a | [
"MIT"
] | 1 | 2017-02-13T23:09:18.000Z | 2017-02-13T23:09:18.000Z | setup.py | polishmatt/sputr | 7611d40090c8115dff69912725efc506414ac47a | [
"MIT"
] | 6 | 2017-02-18T20:14:32.000Z | 2017-09-27T19:07:06.000Z | setup.py | polishmatt/sputr | 7611d40090c8115dff69912725efc506414ac47a | [
"MIT"
] | null | null | null | from setuptools import setup
import importlib
version = importlib.import_module('sputr.config').version
setup(
name='sputr',
version=version,
description='Simple Python Unit Test Runner',
long_description="An intuitive command line and Python package interface for Python's unit testing framework.",
... | 31.468085 | 115 | 0.597025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 896 | 0.605815 |
fdb047a38cb8eadeccbc08314dec72d4acb12c4f | 1,820 | py | Python | tools/malloc-exp/plot-histogram.py | scottviteri/verified-betrfs | 7af56c8acd943880cb19ba16d146c6a206101d9b | [
"BSD-2-Clause"
] | 15 | 2021-05-11T09:19:12.000Z | 2022-03-14T10:39:05.000Z | tools/malloc-exp/plot-histogram.py | scottviteri/verified-betrfs | 7af56c8acd943880cb19ba16d146c6a206101d9b | [
"BSD-2-Clause"
] | 3 | 2021-06-07T21:45:13.000Z | 2021-11-29T23:19:59.000Z | tools/malloc-exp/plot-histogram.py | scottviteri/verified-betrfs | 7af56c8acd943880cb19ba16d146c6a206101d9b | [
"BSD-2-Clause"
] | 7 | 2021-05-11T17:08:04.000Z | 2022-02-23T07:19:36.000Z | #!/usr/bin/env python3
# Copyright 2018-2021 VMware, Inc., Microsoft Inc., Carnegie Mellon University, ETH Zurich, and University of Washington
# SPDX-License-Identifier: BSD-2-Clause
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import re
#import json
def parse_one_histogram(line):
#retur... | 24.594595 | 120 | 0.581868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 404 | 0.221978 |
fdb1f945768c5695ac9336664448e0864ebfec52 | 4,587 | py | Python | oy/models/mixins/polymorphic_prop.py | mush42/oy-cms | 66f2490be7eab9a692a68bb635099ba21d5944ae | [
"MIT"
] | 5 | 2019-02-12T08:54:46.000Z | 2021-03-15T09:22:44.000Z | oy/models/mixins/polymorphic_prop.py | mush42/oy-cms | 66f2490be7eab9a692a68bb635099ba21d5944ae | [
"MIT"
] | 2 | 2020-04-30T01:27:08.000Z | 2020-07-16T18:04:16.000Z | oy/models/mixins/polymorphic_prop.py | mush42/oy-cms | 66f2490be7eab9a692a68bb635099ba21d5944ae | [
"MIT"
] | 3 | 2019-10-16T05:53:31.000Z | 2021-10-11T09:37:16.000Z | # -*- coding: utf-8 -*-
"""
oy.models.mixins.polymorphic_prop
~~~~~~~~~~
Provides helper mixin classes for special sqlalchemy models
:copyright: (c) 2018 by Musharraf Omer.
:license: MIT, see LICENSE for more details.
"""
import sqlalchemy.types as types
from sqlalchemy import literal_column, ev... | 29.785714 | 84 | 0.625681 | 3,294 | 0.718116 | 0 | 0 | 2,089 | 0.455417 | 0 | 0 | 1,126 | 0.245476 |
fdb2d4c9f5001e0fbebe90b3cb11e75763d20dd3 | 1,735 | py | Python | tests/extensions/aria_extension_tosca/conftest.py | tnadeau/incubator-ariatosca | de32028783969bc980144afa3c91061c7236459c | [
"Apache-2.0"
] | null | null | null | tests/extensions/aria_extension_tosca/conftest.py | tnadeau/incubator-ariatosca | de32028783969bc980144afa3c91061c7236459c | [
"Apache-2.0"
] | null | null | null | tests/extensions/aria_extension_tosca/conftest.py | tnadeau/incubator-ariatosca | de32028783969bc980144afa3c91061c7236459c | [
"Apache-2.0"
] | 1 | 2020-06-16T15:13:06.000Z | 2020-06-16T15:13:06.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 35.408163 | 91 | 0.736023 | 0 | 0 | 348 | 0.200576 | 381 | 0.219597 | 0 | 0 | 1,165 | 0.67147 |
fdb6180fad4a97a9bd7fd4c10c96bb8a853e03d5 | 5,487 | py | Python | tests/test_project.py | eruber/py_project_template | f0b12ab603e1277943f0323cbd0d8fb86fd04861 | [
"MIT"
] | null | null | null | tests/test_project.py | eruber/py_project_template | f0b12ab603e1277943f0323cbd0d8fb86fd04861 | [
"MIT"
] | null | null | null | tests/test_project.py | eruber/py_project_template | f0b12ab603e1277943f0323cbd0d8fb86fd04861 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test Project Template
The code below is derived from several locations:
REFERENCES:
REF1: https://docs.pytest.org/en/latest/contents.html
REF2: https://github.com/hackebrot/pytest-cookies
LOCATIONS
LOC1: https://github.com/audreyr/cook... | 32.467456 | 101 | 0.546382 | 0 | 0 | 643 | 0.117186 | 675 | 0.123018 | 0 | 0 | 3,288 | 0.599235 |
fdbbcdb74fb497d41cae48ac2a6300801085c4fc | 2,053 | py | Python | tag.py | tom-choi/NLPforPIXIV | 77e905793c792ec97f196a4da7144456018577c7 | [
"MIT"
] | 1 | 2022-03-18T09:10:59.000Z | 2022-03-18T09:10:59.000Z | tag.py | tom-choi/NLPforPIXIV | 77e905793c792ec97f196a4da7144456018577c7 | [
"MIT"
] | null | null | null | tag.py | tom-choi/NLPforPIXIV | 77e905793c792ec97f196a4da7144456018577c7 | [
"MIT"
] | null | null | null | import json
from msilib.schema import Directory
import pandas as pd
import csv
with open('./result-#succubus Drawings, Best Fan Art on pixiv, Japan-1647491083659.json', 'r',encoding="utf-8") as f:
data = json.load(f)
Tags_Directory = {}
print(f"已經捕捉到{len(data)}條信息,準備將tag新增到字典……")
n = len(data)
for i in range(0,n):
... | 33.112903 | 117 | 0.649781 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,560 | 0.708769 |
fdbd3757fbcb05b2b219ad506437967a7305ef32 | 3,583 | py | Python | event_handlers/voyager_event_handler.py | bigpizza/VoyagerTelegramBot | 8b1e3cbebe9041b0ca341ce4d5d9835f5e12b4d9 | [
"MIT"
] | null | null | null | event_handlers/voyager_event_handler.py | bigpizza/VoyagerTelegramBot | 8b1e3cbebe9041b0ca341ce4d5d9835f5e12b4d9 | [
"MIT"
] | null | null | null | event_handlers/voyager_event_handler.py | bigpizza/VoyagerTelegramBot | 8b1e3cbebe9041b0ca341ce4d5d9835f5e12b4d9 | [
"MIT"
] | null | null | null | from abc import abstractmethod
from typing import Dict, Tuple
from curse_manager import CursesManager
from telegram import TelegramBot
class VoyagerEventHandler:
"""
A base class for all event handlers to inherit from.
To handle an incoming event from voyager application server, Most important method is... | 36.191919 | 116 | 0.597823 | 3,444 | 0.961206 | 0 | 0 | 455 | 0.126989 | 0 | 0 | 1,800 | 0.502372 |
fdbd68dd1e0a0ba0978c1bd0880d05f492ec5829 | 3,063 | py | Python | fluentcms_bootstrap_grid/content_plugins.py | edoburu/fluentcms-bootstrap-grid | 67a8255e34e22284eeb05c04517671311305d370 | [
"Apache-2.0"
] | null | null | null | fluentcms_bootstrap_grid/content_plugins.py | edoburu/fluentcms-bootstrap-grid | 67a8255e34e22284eeb05c04517671311305d370 | [
"Apache-2.0"
] | null | null | null | fluentcms_bootstrap_grid/content_plugins.py | edoburu/fluentcms-bootstrap-grid | 67a8255e34e22284eeb05c04517671311305d370 | [
"Apache-2.0"
] | null | null | null | from django import forms
from django.utils.encoding import force_text
from django.utils.translation import pgettext, ugettext_lazy as _
from fluent_contents.extensions import ContainerPlugin, plugin_pool, ContentItemForm
from . import appsettings
from .models import BootstrapRow, BootstrapColumn
GRID_COLUMNS = appset... | 32.935484 | 90 | 0.642507 | 2,167 | 0.707476 | 0 | 0 | 1,559 | 0.508978 | 0 | 0 | 762 | 0.248776 |
fdbd9c9ab6b561ed49a22efac24abb031c9653d8 | 8,083 | py | Python | study.py | Yougeeg/zhihuiguo | 21cfa4210b011e0fbc200774b88e570d21e30ab2 | [
"MIT"
] | null | null | null | study.py | Yougeeg/zhihuiguo | 21cfa4210b011e0fbc200774b88e570d21e30ab2 | [
"MIT"
] | null | null | null | study.py | Yougeeg/zhihuiguo | 21cfa4210b011e0fbc200774b88e570d21e30ab2 | [
"MIT"
] | 2 | 2017-11-04T08:46:04.000Z | 2018-09-12T08:16:44.000Z | import logging
import json
from datetime import datetime, timedelta
from getpass import getpass
import uuid
import requests
from Cryptodome.PublicKey import RSA
import utils
NONE, SIGN, TICKET = 0, 1, 2
SERVER = 'https://appstudentapi.zhihuishu.com'
SSL_VERIFY = True
TAKE_EXAMS = True
SKIP_FINAL_EXAM = False
EXAM_AU... | 39.237864 | 117 | 0.588767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,423 | 0.298878 |
fdbe327728712dcbbd59d238061b617718c7c9a0 | 244 | py | Python | autogl/module/feature/_base_feature_engineer/__init__.py | dedsec-9/AutoGL | 487f2b2f798b9b1363ad5dc100fb410b12222e06 | [
"MIT"
] | null | null | null | autogl/module/feature/_base_feature_engineer/__init__.py | dedsec-9/AutoGL | 487f2b2f798b9b1363ad5dc100fb410b12222e06 | [
"MIT"
] | null | null | null | autogl/module/feature/_base_feature_engineer/__init__.py | dedsec-9/AutoGL | 487f2b2f798b9b1363ad5dc100fb410b12222e06 | [
"MIT"
] | null | null | null | import autogl
if autogl.backend.DependentBackend.is_dgl():
from ._base_feature_engineer_dgl import BaseFeatureEngineer
else:
from ._base_feature_engineer_pyg import BaseFeatureEngineer
class BaseFeature(BaseFeatureEngineer):
...
| 22.181818 | 63 | 0.811475 | 47 | 0.192623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fdc0b230d2a0f01f084eb9ceb1e8ca8a841fb58f | 1,440 | py | Python | python/controllers/ner_annotation_api.py | barkavi87/anuvaad-corpus | 9ea832f4228f61a7d4998205976629ea4b7c3d70 | [
"MIT"
] | 2 | 2019-12-20T08:58:10.000Z | 2020-05-15T14:17:43.000Z | python/controllers/ner_annotation_api.py | barkavi87/anuvaad-corpus | 9ea832f4228f61a7d4998205976629ea4b7c3d70 | [
"MIT"
] | 73 | 2019-08-12T16:17:33.000Z | 2022-01-13T01:24:38.000Z | python/controllers/ner_annotation_api.py | barkavi87/anuvaad-corpus | 9ea832f4228f61a7d4998205976629ea4b7c3d70 | [
"MIT"
] | 1 | 2020-08-24T09:51:46.000Z | 2020-08-24T09:51:46.000Z | import os
import urllib.request
from flask import Flask, request, redirect, render_template, jsonify
from flask import Blueprint, request, current_app as app
from controllers.sc_judgment_header_ner_eval import SC_ner_annotation
import json
from models.response import CustomResponse
from models.status import Status
ner_... | 43.636364 | 107 | 0.702083 | 0 | 0 | 0 | 0 | 1,057 | 0.734028 | 0 | 0 | 201 | 0.139583 |
fdc1c97e35e98b3788187bd4a1997c5b2842cc3b | 4,594 | py | Python | HandGenerator/HandGenerator.py | VASST/SlicerLeapMotion | d20215fb657eb5c972d1fe380bdf2d0479796c93 | [
"MIT"
] | null | null | null | HandGenerator/HandGenerator.py | VASST/SlicerLeapMotion | d20215fb657eb5c972d1fe380bdf2d0479796c93 | [
"MIT"
] | 2 | 2019-09-06T16:06:20.000Z | 2020-02-16T17:15:28.000Z | HandGenerator/HandGenerator.py | VASST/SlicerLeapMotion | d20215fb657eb5c972d1fe380bdf2d0479796c93 | [
"MIT"
] | 1 | 2020-01-14T17:49:31.000Z | 2020-01-14T17:49:31.000Z | import sys
import os
import unittest
import vtk, qt, ctk, slicer
from slicer.ScriptedLoadableModule import *
import logging
import numpy as np
#
# HandGenerator
#
class HandGenerator(ScriptedLoadableModule):
def __init__(self, parent):
ScriptedLoadableModule.__init__(self, parent)
self.parent.title = "Hand ... | 38.932203 | 233 | 0.680888 | 4,401 | 0.957989 | 0 | 0 | 0 | 0 | 0 | 0 | 946 | 0.205921 |
fdc27871983c6fc23e23bf1a61087b70dff46dd6 | 238 | py | Python | test_api/movies/urls.py | xm4dn355x/drf_test | efdc38afa51d259fcb5781c9f8cc52f93e2fd81b | [
"MIT"
] | null | null | null | test_api/movies/urls.py | xm4dn355x/drf_test | efdc38afa51d259fcb5781c9f8cc52f93e2fd81b | [
"MIT"
] | null | null | null | test_api/movies/urls.py | xm4dn355x/drf_test | efdc38afa51d259fcb5781c9f8cc52f93e2fd81b | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('movie/', views.MovieListView.as_view()),
path('movie/<int:pk>/', views.MovieDetailView.as_view()),
path('review/', views.ReviewCreateView.as_view()),
]
| 21.636364 | 61 | 0.684874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.142857 |
fdc29b2d1755fa39792e6b6765f17fb3cfeeb9de | 1,166 | py | Python | commlib/utils.py | robotics-4-all/commlib-py | 9d56e0a2e13410feac0e10d9866a1c4a60ade2c7 | [
"MIT"
] | 1 | 2021-06-09T09:32:53.000Z | 2021-06-09T09:32:53.000Z | commlib/utils.py | robotics-4-all/commlib-py | 9d56e0a2e13410feac0e10d9866a1c4a60ade2c7 | [
"MIT"
] | 7 | 2022-03-10T23:57:25.000Z | 2022-03-13T19:12:54.000Z | commlib/utils.py | robotics-4-all/commlib-py | 9d56e0a2e13410feac0e10d9866a1c4a60ade2c7 | [
"MIT"
] | 1 | 2021-06-07T16:25:05.000Z | 2021-06-07T16:25:05.000Z | import re
import uuid
import time
from typing import (Any, Callable, Dict, List, Optional, Tuple, Type,
TypeVar, Union, Text)
def camelcase_to_snakecase(_str: str) -> str:
"""camelcase_to_snakecase.
Transform a camelcase string to snakecase
Args:
_str (str): String to apply ... | 21.2 | 69 | 0.588336 | 153 | 0.131218 | 0 | 0 | 0 | 0 | 0 | 0 | 590 | 0.506003 |
fdc3fc24cea107cba4ab6159b29d6bd76397bdc9 | 434 | py | Python | Pratical/Class02/metodo_da_bissecao.py | JoaoCostaIFG/MNUM | 6e042d8a6f64feb9eae9c79afec2fbab51f46fbd | [
"MIT"
] | 1 | 2019-12-07T10:34:30.000Z | 2019-12-07T10:34:30.000Z | Pratical/Class02/metodo_da_bissecao.py | JoaoCostaIFG/MNUM | 6e042d8a6f64feb9eae9c79afec2fbab51f46fbd | [
"MIT"
] | null | null | null | Pratical/Class02/metodo_da_bissecao.py | JoaoCostaIFG/MNUM | 6e042d8a6f64feb9eae9c79afec2fbab51f46fbd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Pesquisa binaria
# Read
num = int(input("Number to find the sqrt of? "))
index = 0
step = num / 2
prox = True
while abs(index * index - num) > 1e-10:
if (prox):
index += step
else:
index -= step
step = step / 2
if (index * index) < num:
prox = True
... | 17.36 | 82 | 0.534562 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.267281 |
fdc4efcf38d739230cb577df9971b45dd3d12756 | 2,625 | py | Python | final/NerualNetworks/utils/MakeData.py | XuYi-fei/HUST-EIC-MathematicalModeling | 73797bdba17d4f759be3a39603b42be081a98e5c | [
"MIT"
] | 1 | 2021-05-04T12:29:21.000Z | 2021-05-04T12:29:21.000Z | final/NerualNetworks/utils/MakeData.py | XuYi-fei/HUST-EIC-MathematicalModeling | 73797bdba17d4f759be3a39603b42be081a98e5c | [
"MIT"
] | null | null | null | final/NerualNetworks/utils/MakeData.py | XuYi-fei/HUST-EIC-MathematicalModeling | 73797bdba17d4f759be3a39603b42be081a98e5c | [
"MIT"
] | null | null | null | import pandas as pd
import os
import random
class MakeDataset():
def __init__(self, known=30, predict=7, ratio=0.4, path=None):
# ratio means the valid/(train + valid)
assert path is not None, "The path is invalid"
self.df = pd.read_excel(path)
self.columns = self.df.columns
... | 34.090909 | 196 | 0.55619 | 2,391 | 0.910857 | 0 | 0 | 0 | 0 | 0 | 0 | 388 | 0.14781 |
fdc5979ebdcfef679c432bdc3659a7c209d59706 | 326 | py | Python | chapter06/example612.py | yozw/lio-files | e036bc868207ec045a804495fc40cf3a48e37d6d | [
"MIT"
] | null | null | null | chapter06/example612.py | yozw/lio-files | e036bc868207ec045a804495fc40cf3a48e37d6d | [
"MIT"
] | null | null | null | chapter06/example612.py | yozw/lio-files | e036bc868207ec045a804495fc40cf3a48e37d6d | [
"MIT"
] | null | null | null | from math import sqrt
from numpy import matrix
from intpm import intpm
A = matrix([[1, 0, 1, 0], [0, 1, 0, 1]])
b = matrix([1, 1]).T
c = matrix([-1, -2, 0, 0]).T
mu = 100
x1 = 0.5 * (-2 * mu + 1 + sqrt(1 + 4*mu*mu))
x2 = 0.5 * (-mu + 1 + sqrt(1 + mu * mu))
x0 = matrix([x1, x2, 1 - x1, 1 - x2]).T
intpm(A, b, c, x0, ... | 18.111111 | 44 | 0.509202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fdc8a16130fbd3365668c8adfa036d8311ee21c2 | 2,205 | py | Python | DataBase/Postgres/PostgresTest.py | InverseLina/python-practice | 496d2020916d8096a32131cdedd25a4da7b7735e | [
"Apache-2.0"
] | null | null | null | DataBase/Postgres/PostgresTest.py | InverseLina/python-practice | 496d2020916d8096a32131cdedd25a4da7b7735e | [
"Apache-2.0"
] | null | null | null | DataBase/Postgres/PostgresTest.py | InverseLina/python-practice | 496d2020916d8096a32131cdedd25a4da7b7735e | [
"Apache-2.0"
] | null | null | null | import psycopg2
# encoding=utf-8
__author__ = 'Hinsteny'
def get_conn():
conn = psycopg2.connect(database="hello_db", user="hinsteny", password="welcome", host="127.0.0.1", port="5432")
return conn
def create_table(conn):
cur = conn.cursor()
cur.execute('''CREATE TABLE if not exists COMPANY
... | 24.230769 | 116 | 0.579592 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,120 | 0.507937 |
fdc9a425f145a01bd193481bd02f81259f33f97c | 21,351 | py | Python | pysnmp/DHCP-Server-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/DHCP-Server-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/DHCP-Server-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module DHCP-Server-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DHCP-SERVER-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:31:49 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 144.263514 | 4,113 | 0.793405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,890 | 0.135357 |
fdcd1b4c925a7d033b9a81f8136657b169b6bcf9 | 1,603 | py | Python | example_convert_dataset.py | fadamsyah/cv_utils | 487fc65fe4a71f05dd03df31cde21d866968c0b4 | [
"MIT"
] | null | null | null | example_convert_dataset.py | fadamsyah/cv_utils | 487fc65fe4a71f05dd03df31cde21d866968c0b4 | [
"MIT"
] | 1 | 2021-11-01T06:10:29.000Z | 2021-11-09T12:47:48.000Z | example_convert_dataset.py | fadamsyah/cv_utils | 487fc65fe4a71f05dd03df31cde21d866968c0b4 | [
"MIT"
] | null | null | null | from cv_utils.object_detection.dataset.converter import coco_to_yolo
from cv_utils.object_detection.dataset.converter import yolo_to_coco
''' COCO --> YOLO
This code uses the ultralytics/yolov5 format.
The converted dataset will be saved as follow:
- {output_folder}
- images
- {output_set_name}
... | 32.714286 | 98 | 0.651903 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,069 | 0.666875 |
fdcf6f1f635a8225a76ad32f552e3db603ad1c14 | 2,369 | py | Python | jobs/api/models/keyword.py | gitdaniel228/jobSearch | 5dc1c69a3750f92ca0bcd378dfdc500143204a5a | [
"MIT"
] | null | null | null | jobs/api/models/keyword.py | gitdaniel228/jobSearch | 5dc1c69a3750f92ca0bcd378dfdc500143204a5a | [
"MIT"
] | null | null | null | jobs/api/models/keyword.py | gitdaniel228/jobSearch | 5dc1c69a3750f92ca0bcd378dfdc500143204a5a | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib import admin
from .country import Country
from .filter import Filter
from .setting import Setting
from .site import Site
class Keyword(models.Model):
site = models.ForeignKey('Site')
phrase = models.CharField(max_length=50)
feed_url = models.CharField(
... | 31.171053 | 78 | 0.594344 | 2,164 | 0.913466 | 0 | 0 | 1,114 | 0.470241 | 0 | 0 | 461 | 0.194597 |
fdd4d7c9ea8afe2d857b858645122b0c43587a2f | 4,262 | py | Python | test/units/plugins/inventory/test_script.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | test/units/plugins/inventory/test_script.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | test/units/plugins/inventory/test_script.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 Chris Meyers <cmeyers@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (... | 40.207547 | 135 | 0.680432 | 3,137 | 0.734833 | 0 | 0 | 0 | 0 | 0 | 0 | 1,460 | 0.342 |
fdd740c29776fedc99f0ae3abe771a8f8e0fe2b3 | 2,781 | py | Python | app/routes.py | volvo007/flask_microblog | b826bcaa4fec6703a66f757e39fdf1fcced031f9 | [
"Apache-2.0"
] | null | null | null | app/routes.py | volvo007/flask_microblog | b826bcaa4fec6703a66f757e39fdf1fcced031f9 | [
"Apache-2.0"
] | null | null | null | app/routes.py | volvo007/flask_microblog | b826bcaa4fec6703a66f757e39fdf1fcced031f9 | [
"Apache-2.0"
] | null | null | null | import time
from flask import render_template, flash, redirect, url_for
from flask.globals import request
from flask_login.utils import logout_user
from werkzeug.urls import url_parse
# from flask.helpers import flash # 闪动消息
from app import app, db # 第二个 app 是 init文件里的app 对象
from app.forms import LoginForm, Registratio... | 37.08 | 82 | 0.647609 | 0 | 0 | 0 | 0 | 2,860 | 0.862745 | 0 | 0 | 1,408 | 0.424736 |
fdda757521b551e07a7f4e98103818cc6dd32745 | 10,501 | py | Python | asr_deepspeech/modules/deepspeech.py | shangdibufashi/ASRDeepSpeech | f11134abb79e98062fbc25fab99ca4cf675e538b | [
"MIT"
] | 44 | 2020-03-03T13:05:57.000Z | 2022-03-24T03:42:31.000Z | asr_deepspeech/modules/deepspeech.py | shangdibufashi/ASRDeepSpeech | f11134abb79e98062fbc25fab99ca4cf675e538b | [
"MIT"
] | 6 | 2020-12-15T10:58:19.000Z | 2021-10-12T01:59:17.000Z | asr_deepspeech/modules/deepspeech.py | shangdibufashi/ASRDeepSpeech | f11134abb79e98062fbc25fab99ca4cf675e538b | [
"MIT"
] | 13 | 2020-05-20T06:42:20.000Z | 2022-03-24T03:42:31.000Z | import math
from collections import OrderedDict
import json
from asr_deepspeech.decoders import GreedyDecoder
import os
from ascii_graph import Pyasciigraph
from asr_deepspeech.data.loaders import AudioDataLoader
from asr_deepspeech.data.samplers import BucketingSampler
from .blocks import *
from asr_deepspeech.data.da... | 42.172691 | 119 | 0.517475 | 10,093 | 0.961147 | 0 | 0 | 0 | 0 | 0 | 0 | 990 | 0.094277 |
fddb07c49fca7dc8739e0a7542a2263412a966ed | 179 | py | Python | ao2j/lt1300/046/B.py | neshdev/competitive-prog | f406a85d62e83c3dbd3ad41f42ae121ebefd0fda | [
"MIT"
] | null | null | null | ao2j/lt1300/046/B.py | neshdev/competitive-prog | f406a85d62e83c3dbd3ad41f42ae121ebefd0fda | [
"MIT"
] | null | null | null | ao2j/lt1300/046/B.py | neshdev/competitive-prog | f406a85d62e83c3dbd3ad41f42ae121ebefd0fda | [
"MIT"
] | null | null | null | n,k = [int(x) for x in input().split()]
arr = [int(x) for x in input().split()]
arr.sort()
total = 0
for i in range(k):
if arr[i] < 0:
total += -arr[i]
print(total)
| 16.272727 | 39 | 0.536313 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fddb0cd219604b7758190e6bb17c4dc60b79a754 | 1,099 | py | Python | Scripts/simulation/ensemble/ensemble_interactions.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/ensemble/ensemble_interactions.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/ensemble/ensemble_interactions.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\ensemble\ensemble_interactions.py
# Compiled at: 2016-07-13 03:28:12
# Size of source mod 2**32: 107... | 37.896552 | 107 | 0.724295 | 665 | 0.605096 | 293 | 0.266606 | 552 | 0.502275 | 0 | 0 | 334 | 0.303913 |
fddc8823ffb3b416234d50c4b32a14d5668ecba6 | 1,663 | py | Python | icmpv6socket/__init__.py | TheDiveO/icmpv6-socket | fe3ee52e6793e3739975aea87e2b6511be96fa12 | [
"Apache-2.0"
] | null | null | null | icmpv6socket/__init__.py | TheDiveO/icmpv6-socket | fe3ee52e6793e3739975aea87e2b6511be96fa12 | [
"Apache-2.0"
] | null | null | null | icmpv6socket/__init__.py | TheDiveO/icmpv6-socket | fe3ee52e6793e3739975aea87e2b6511be96fa12 | [
"Apache-2.0"
] | null | null | null |
import socket
from typing import Optional, List
__version__ = '0.1.0'
class ICMPv6Socket(socket.socket):
# From https://elixir.bootlin.com/linux/v4.18/source/include/linux/socket.h#L312
SOL_ICMPV6 = 58 # type: int
# From https://elixir.bootlin.com/linux/v4.18/source/include/uapi/linux/icmpv6.h#L139
... | 36.955556 | 89 | 0.615755 | 1,586 | 0.953698 | 0 | 0 | 0 | 0 | 0 | 0 | 724 | 0.435358 |
fddd39b69360c06e6b24844fb2887dcd6cf29f89 | 603 | py | Python | game/pkchess/res/map.py | RaenonX/Jelly-Bot-API | c7da1e91783dce3a2b71b955b3a22b68db9056cf | [
"MIT"
] | 5 | 2020-08-26T20:12:00.000Z | 2020-12-11T16:39:22.000Z | game/pkchess/res/map.py | RaenonX/Jelly-Bot | c7da1e91783dce3a2b71b955b3a22b68db9056cf | [
"MIT"
] | 234 | 2019-12-14T03:45:19.000Z | 2020-08-26T18:55:19.000Z | game/pkchess/res/map.py | RaenonX/Jelly-Bot-API | c7da1e91783dce3a2b71b955b3a22b68db9056cf | [
"MIT"
] | 2 | 2019-10-23T15:21:15.000Z | 2020-05-22T09:35:55.000Z | """Game map resource manager."""
__all__ = ("get_map_template",)
_cache = {}
def get_map_template(name: str):
"""
Get a map template by its ``name``.
Returns ``None`` if not found.
Loaded :class:`MapTemplate` will be cached until the application exits.
:param name: name of the map template.
... | 24.12 | 81 | 0.658375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 372 | 0.616915 |
fddd3e193fe076cab7c0cf9457a9b99d97220113 | 248 | py | Python | example/main_01.py | janothan/Evaluation-Framework | e53847bc352f657953933e1d7c97b68ac890c852 | [
"Apache-2.0"
] | 5 | 2020-02-12T13:11:14.000Z | 2021-01-28T12:45:22.000Z | example/main_01.py | charyeezy/Evaluation-Framework | ddfd4ea654a3d7d2abd58f062ec98a8a736f8f51 | [
"Apache-2.0"
] | 9 | 2019-07-29T17:45:30.000Z | 2022-03-17T12:24:47.000Z | example/main_01.py | charyeezy/Evaluation-Framework | ddfd4ea654a3d7d2abd58f062ec98a8a736f8f51 | [
"Apache-2.0"
] | 7 | 2020-02-12T13:22:49.000Z | 2021-11-29T01:08:50.000Z | from evaluation_framework.manager import FrameworkManager
if __name__ == "__main__":
evaluation_manager = FrameworkManager()
evaluation_manager.evaluate(
"objectFrequencyS.h5", vector_file_format="hdf5", debugging_mode=False
)
| 31 | 78 | 0.766129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.149194 |
fddd8f9fba011d6c4a116c9eb70ffe36d73e109e | 7,127 | py | Python | public_data/views.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 57 | 2016-09-01T21:55:52.000Z | 2022-03-27T22:15:32.000Z | public_data/views.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 464 | 2015-03-23T18:08:28.000Z | 2016-08-25T04:57:36.000Z | public_data/views.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 25 | 2017-01-24T16:23:27.000Z | 2021-11-07T01:51:42.000Z | from django.conf import settings
from django.contrib import messages as django_messages
from django.urls import reverse_lazy
from django.utils.decorators import method_decorator
from django.views.decorators.http import require_POST
from django.views.generic.base import RedirectView, TemplateView
from django.views.gener... | 30.852814 | 88 | 0.638698 | 6,368 | 0.893504 | 0 | 0 | 135 | 0.018942 | 0 | 0 | 1,796 | 0.251999 |
fddf95ac612e69b154ea7fc28a7e99daf0730fea | 685 | py | Python | UserAlgorithm.py | Anirudhsfc/RunTimeAlgo | eb0fb706b4c738bad603327a94c9724e3dfe8fee | [
"MIT"
] | 1 | 2019-09-03T08:28:26.000Z | 2019-09-03T08:28:26.000Z | UserAlgorithm.py | Anirudhsfc/RunTimeAlgo | eb0fb706b4c738bad603327a94c9724e3dfe8fee | [
"MIT"
] | null | null | null | UserAlgorithm.py | Anirudhsfc/RunTimeAlgo | eb0fb706b4c738bad603327a94c9724e3dfe8fee | [
"MIT"
] | null | null | null | from MakeYourOwnGraph import * #user needs to import this line
def F1(x,y):
if x<=2:
return 1
else:
return F1(x-1,y)+F1(x-2,y)
GraphOfMyAlgo(F1,2,[1,30,2,31]) #user needs to execute this line in his or her algorithm where the first argument is the name of the Algorithm Function, here F1
... | 52.692308 | 247 | 0.681752 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 459 | 0.670073 |
fde563740923e926b86419c22eb43be2e6e526e1 | 38 | py | Python | robopilot/pipeline/__init__.py | robotory/robopilot | e10207b66d06e5d169f890d1d7e57d971ca1eb5d | [
"MIT"
] | null | null | null | robopilot/pipeline/__init__.py | robotory/robopilot | e10207b66d06e5d169f890d1d7e57d971ca1eb5d | [
"MIT"
] | null | null | null | robopilot/pipeline/__init__.py | robotory/robopilot | e10207b66d06e5d169f890d1d7e57d971ca1eb5d | [
"MIT"
] | null | null | null | # The new robopilot training pipeline. | 38 | 38 | 0.815789 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 1 |
fde56cf34b5e2c673b4f1db2a825702a705cb407 | 1,257 | py | Python | dsRenamingTool/dialogBase.py | S0nic014/dsRenamingTool | 97efcd660af820ab6b5f1918222ba31a95d47788 | [
"MIT"
] | 2 | 2020-07-15T16:59:31.000Z | 2021-08-17T14:04:15.000Z | dsRenamingTool/dialogBase.py | S0nic014/dsRenamingTool | 97efcd660af820ab6b5f1918222ba31a95d47788 | [
"MIT"
] | null | null | null | dsRenamingTool/dialogBase.py | S0nic014/dsRenamingTool | 97efcd660af820ab6b5f1918222ba31a95d47788 | [
"MIT"
] | null | null | null | import sys
from PySide2 import QtCore
from PySide2 import QtWidgets
from shiboken2 import wrapInstance
import maya.OpenMayaUI as omui
def mayaMainWindow():
"""
Get maya main window as QWidget
:return: Maya main window as QWidget
:rtype: PySide2.QtWidgets.QWidget
"""
mainWindowPtr = omui.MQtUt... | 24.647059 | 87 | 0.668258 | 654 | 0.520286 | 0 | 0 | 0 | 0 | 0 | 0 | 217 | 0.172633 |
fde68e690db6e169850d5ee88a2ba6ad82e43a9a | 853 | py | Python | beyondtheadmin/invoices/templatetags/fullurl.py | gfavre/invoice-manager | 2a1db22edd51b461c090282c6fc1f290f3265379 | [
"MIT"
] | 1 | 2021-11-27T06:40:34.000Z | 2021-11-27T06:40:34.000Z | beyondtheadmin/invoices/templatetags/fullurl.py | gfavre/invoice-manager | 2a1db22edd51b461c090282c6fc1f290f3265379 | [
"MIT"
] | 2 | 2021-05-13T04:50:50.000Z | 2022-02-28T21:06:24.000Z | beyondtheadmin/invoices/templatetags/fullurl.py | gfavre/invoice-manager | 2a1db22edd51b461c090282c6fc1f290f3265379 | [
"MIT"
] | null | null | null | import math
from django import template
from django.utils.safestring import mark_safe
register = template.Library()
@register.simple_tag(takes_context=True)
def buildfullurl(context, url):
"""Converts relative URL to absolute.
For example:
{% buildfullurl article.get_absolute_url %}
or:
... | 26.65625 | 106 | 0.637749 | 0 | 0 | 0 | 0 | 728 | 0.853458 | 0 | 0 | 260 | 0.304807 |
fde73e6cb304ab68d07ceb772b316e170a4014cb | 967 | py | Python | big_o_project/Task4.py | CTylerD/Data-Structures-Algorithms-Projects | e72248a6433c0242003edf404a715d9f53e3792d | [
"MIT"
] | null | null | null | big_o_project/Task4.py | CTylerD/Data-Structures-Algorithms-Projects | e72248a6433c0242003edf404a715d9f53e3792d | [
"MIT"
] | null | null | null | big_o_project/Task4.py | CTylerD/Data-Structures-Algorithms-Projects | e72248a6433c0242003edf404a715d9f53e3792d | [
"MIT"
] | null | null | null | import csv
with open('texts.csv', 'r') as f:
reader = csv.reader(f)
texts = list(reader)
with open('calls.csv', 'r') as f:
reader = csv.reader(f)
calls = list(reader)
def create_lists_of_users():
outgoing_callers = set()
not_telemarketers = set()
for idx, call in enumerate(calls):
... | 26.861111 | 69 | 0.709411 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.073423 |
fde75eeec45ccf538859617be8047b6998c73dee | 971 | py | Python | codingstars/platinum3/subarray-sum2.py | yehyunchoi/Algorithm | 35e32159ee13b46b30b543fa79ab6e81d6719f13 | [
"MIT"
] | null | null | null | codingstars/platinum3/subarray-sum2.py | yehyunchoi/Algorithm | 35e32159ee13b46b30b543fa79ab6e81d6719f13 | [
"MIT"
] | null | null | null | codingstars/platinum3/subarray-sum2.py | yehyunchoi/Algorithm | 35e32159ee13b46b30b543fa79ab6e81d6719f13 | [
"MIT"
] | null | null | null | """
[1,2,3,4]의 부분 배열은 다음과 같이 16개가 있습니다.
[]
[1]
[1, 2]
[1, 2, 3]
[1, 2, 3, 4]
[1, 2, 4]
[1, 3]
[1, 3, 4]
[1, 4]
[2]
[2, 3]
[2, 3, 4]
[2, 4]
[3]
[3, 4]
[4]
처음에 있는 blank list([])의 값을 0으로 계산하면
모든 부분 배열의 합(subarray sum)은 80입니다.
숫자로 된 배열을 입력 받아서,
부분 배열의 합을 구하여 보세요.
Input
숫자로 된 배열이 입력됩니다.
숫자는 정수입니다.
Output
부분 배열의 합을 출력합... | 15.412698 | 93 | 0.582904 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 902 | 0.770282 |
fde7b9b224da23bd030fbd50ece0e5433d5c208e | 1,683 | py | Python | fastalite/__main__.py | nhoffman/fastalite | 2571c126976f26c8ca06401586559f288245ca8d | [
"MIT"
] | 2 | 2017-02-16T14:30:18.000Z | 2019-10-03T19:20:57.000Z | fastalite/__main__.py | nhoffman/fastalite | 2571c126976f26c8ca06401586559f288245ca8d | [
"MIT"
] | 4 | 2017-06-30T14:05:08.000Z | 2022-02-17T00:03:28.000Z | fastalite/__main__.py | nhoffman/fastalite | 2571c126976f26c8ca06401586559f288245ca8d | [
"MIT"
] | null | null | null | """Command line interface to the fastlite package
"""
import sys
import argparse
from .fastalite import fastalite, fastqlite, Opener
from . import __version__
def count(seqs, fname):
i = 1
for i, seq in enumerate(seqs, 1):
pass
print(('{}\t{}'.format(fname, i)))
def names(seqs, fname):
fo... | 28.525424 | 67 | 0.572193 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 293 | 0.174094 |
fde8def0c521fe98b37b37c32684b2ac7afe4bd0 | 142 | py | Python | music/class_/audioa/_mode/major.py | jedhsu/music | dea68c4a82296cd4910e786f533b2cbf861377c3 | [
"MIT"
] | null | null | null | music/class_/audioa/_mode/major.py | jedhsu/music | dea68c4a82296cd4910e786f533b2cbf861377c3 | [
"MIT"
] | null | null | null | music/class_/audioa/_mode/major.py | jedhsu/music | dea68c4a82296cd4910e786f533b2cbf861377c3 | [
"MIT"
] | null | null | null | """
*Major Key*
"""
from abc import ABCMeta
from ._key import ModedKey
class MajorKey(
ModedKey,
):
__metaclass__ = ABCMeta
| 8.875 | 27 | 0.640845 | 60 | 0.422535 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.176056 |
fdeadae2e6055ffb652fbc50ce8253522e83b82c | 151 | py | Python | bb_clients/__init__.py | voglster/ims_client | 34021dd81fcc0196eb2fb23820571b766a50aaa7 | [
"MIT"
] | null | null | null | bb_clients/__init__.py | voglster/ims_client | 34021dd81fcc0196eb2fb23820571b766a50aaa7 | [
"MIT"
] | null | null | null | bb_clients/__init__.py | voglster/ims_client | 34021dd81fcc0196eb2fb23820571b766a50aaa7 | [
"MIT"
] | null | null | null | """Simple python clients for the Gravitate BestBuy Services"""
__version__ = "0.1.18"
from .fc import get_fc_service
from .ims import get_ims_service
| 25.166667 | 62 | 0.781457 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.463576 |
fdeb572c08b15704dfb038c3b7db65f44b06027a | 9,482 | py | Python | RpgPiratesAndFishers/Individual.py | LucasRR94/RPG_Pirates_and_Fishers | 75bbb57e916f7a878de34676b1d988e5d2506121 | [
"Apache-2.0"
] | null | null | null | RpgPiratesAndFishers/Individual.py | LucasRR94/RPG_Pirates_and_Fishers | 75bbb57e916f7a878de34676b1d988e5d2506121 | [
"Apache-2.0"
] | null | null | null | RpgPiratesAndFishers/Individual.py | LucasRR94/RPG_Pirates_and_Fishers | 75bbb57e916f7a878de34676b1d988e5d2506121 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from libGamePiratesAndFishers import assertIfIsWeelFormat,makeSureThatIsnumberLimited
class Individual(object):
"""
This class Define object type Individual, it is a base for object used for being the base
of fishers, and is used for enemies in application.
"""
def ... | 25.489247 | 341 | 0.665999 | 9,351 | 0.986184 | 0 | 0 | 0 | 0 | 0 | 0 | 4,720 | 0.497785 |
fdedc1899cf1d0a458c3cd2aa54431d61028feb7 | 1,544 | py | Python | 08_apples_and_bananas/apples.py | FabrizioPe/tiny_python_projects | e130d55d36cac43496a8ad482b6159234b5122f3 | [
"MIT"
] | null | null | null | 08_apples_and_bananas/apples.py | FabrizioPe/tiny_python_projects | e130d55d36cac43496a8ad482b6159234b5122f3 | [
"MIT"
] | null | null | null | 08_apples_and_bananas/apples.py | FabrizioPe/tiny_python_projects | e130d55d36cac43496a8ad482b6159234b5122f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Author : FabrizioPe
Date : 2021-02-10
Purpose: Find and replace vowels in a given text
"""
import argparse
import os
# --------------------------------------------------
def get_args():
"""Get command-line arguments"""
parser = argparse.ArgumentParser(
description='Apple... | 26.169492 | 72 | 0.483808 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.373057 |
fdedd48ecc2cd5713a5620f6663699573feeb1b9 | 1,434 | py | Python | utils.py | gabrs-sousa/brasil-rugby-ranking | 78b8f6b466e688f507cb9d97dbbb80442f3c67de | [
"MIT"
] | 1 | 2020-05-30T03:34:31.000Z | 2020-05-30T03:34:31.000Z | utils.py | gabrs-sousa/brasil-rugby-ranking | 78b8f6b466e688f507cb9d97dbbb80442f3c67de | [
"MIT"
] | null | null | null | utils.py | gabrs-sousa/brasil-rugby-ranking | 78b8f6b466e688f507cb9d97dbbb80442f3c67de | [
"MIT"
] | null | null | null | import pandas as pd
from openpyxl import worksheet
def map_team_names(names_sheet: worksheet, games_sheet: worksheet):
mapped_names = []
missing_names = set()
names_last_row = names_sheet.max_row
for row in range(1, names_last_row):
team_name = names_sheet.cell(row, 1).value
if team_... | 28.117647 | 74 | 0.679916 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.131707 |
fdee1b940008dee7fb0abcb8d4fb0eaf97c8d578 | 8,889 | py | Python | mainapp/views.py | AHTOH2001/OOP_4_term | c9b0f64f3507486e0670cc95d7252862b673d845 | [
"MIT"
] | null | null | null | mainapp/views.py | AHTOH2001/OOP_4_term | c9b0f64f3507486e0670cc95d7252862b673d845 | [
"MIT"
] | null | null | null | mainapp/views.py | AHTOH2001/OOP_4_term | c9b0f64f3507486e0670cc95d7252862b673d845 | [
"MIT"
] | null | null | null | from django.core.mail import send_mail
from django.http import Http404
from django.shortcuts import render, redirect
from django.contrib import messages
from django.contrib.auth.models import User
from django.utils.datastructures import MultiValueDictKeyError
from django.utils import timezone
from django.contrib.auth i... | 39.15859 | 232 | 0.664867 | 383 | 0.039763 | 0 | 0 | 0 | 0 | 0 | 0 | 3,433 | 0.356416 |
fdef583937c7416dc3c1150c9fa7843d7266de92 | 1,941 | py | Python | extra/old-fix-midroll.py | FrederikBanke/critrolesync.github.io | ca09fff7541014d81472d687e48ecd5587cc15ff | [
"MIT"
] | 5 | 2020-06-29T13:39:07.000Z | 2022-02-07T00:43:55.000Z | extra/old-fix-midroll.py | FrederikBanke/critrolesync.github.io | ca09fff7541014d81472d687e48ecd5587cc15ff | [
"MIT"
] | 11 | 2020-06-28T09:45:38.000Z | 2022-03-30T17:56:35.000Z | extra/old-fix-midroll.py | FrederikBanke/critrolesync.github.io | ca09fff7541014d81472d687e48ecd5587cc15ff | [
"MIT"
] | 5 | 2020-06-29T21:17:13.000Z | 2021-09-08T06:34:32.000Z | def str2sec(string):
if len(string.split(':')) == 3:
hours, mins, secs = map(int, string.split(':'))
elif len(string.split(':')) == 2:
mins, secs = map(int, string.split(':'))
hours = 0
else:
raise ValueError('string must have the form [hh:]mm:ss : ' + str(string))
second... | 37.326923 | 98 | 0.548171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 581 | 0.29933 |
fdf00539d71fcfd43067729f990a71a6b54c1f86 | 415 | py | Python | 102-neopixel.d/main.py | wa1tnr/cpx-basic-studies | 772d38803bc2394980d81cea7873a4bc027dfb9f | [
"MIT"
] | null | null | null | 102-neopixel.d/main.py | wa1tnr/cpx-basic-studies | 772d38803bc2394980d81cea7873a4bc027dfb9f | [
"MIT"
] | null | null | null | 102-neopixel.d/main.py | wa1tnr/cpx-basic-studies | 772d38803bc2394980d81cea7873a4bc027dfb9f | [
"MIT"
] | null | null | null | # Adafruit CircuitPython 2.2.0
# Adafruit CircuitPlayground Express
import board ; import neopixel; import time
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=.2)
pixels.fill((0,0,0))
pixels.show()
def blue():
pixels.fill((0,0,22))
def magenta():
pixels.fill((22,0,22))
blue(); pixels.show(); t... | 23.055556 | 61 | 0.684337 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.159036 |
fdf08b92d38f1c12ce10c7842c25d8f96a214534 | 385 | py | Python | indent/migrations/0003_indentmaster_note.py | yvsreenivas/inventory2 | b92c03a398cb9831fa7a727a9a3287bdd9b17cd4 | [
"MIT"
] | null | null | null | indent/migrations/0003_indentmaster_note.py | yvsreenivas/inventory2 | b92c03a398cb9831fa7a727a9a3287bdd9b17cd4 | [
"MIT"
] | null | null | null | indent/migrations/0003_indentmaster_note.py | yvsreenivas/inventory2 | b92c03a398cb9831fa7a727a9a3287bdd9b17cd4 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2021-03-15 15:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('indent', '0002_auto_20210314_2324'),
]
operations = [
migrations.AddField(
model_name='indentmaster',
name='note',
... | 20.263158 | 48 | 0.597403 | 291 | 0.755844 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.262338 |
fdf18580611d8972ffb45869d74bebdda505d879 | 2,310 | py | Python | Ass2/lotka-volterra.py | Scoudem/modsim | a65da4a29a82ac495367278ec694a28432b30c0d | [
"Apache-2.0"
] | null | null | null | Ass2/lotka-volterra.py | Scoudem/modsim | a65da4a29a82ac495367278ec694a28432b30c0d | [
"Apache-2.0"
] | null | null | null | Ass2/lotka-volterra.py | Scoudem/modsim | a65da4a29a82ac495367278ec694a28432b30c0d | [
"Apache-2.0"
] | null | null | null | '''
File: lotka-volterra.py
Authors:
- Sjoerd Wenker, 10617558
- Tristan van Vaalen, 10551832
Contains a Lotka-Volterra Model which is simulated using the RK4 method.
'''
from integration import RungeKutta4
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider
'''
Method that simulates a Lotka-Volte... | 26.860465 | 82 | 0.558009 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 909 | 0.393506 |
fdf306a6233eb15d853aa05d6d7553accacc2060 | 3,717 | py | Python | harmoni_detectors/harmoni_stt/test/test_deepspeech.py | interaction-lab/HARMONI | 9c88019601a983a1739744919a95247a997d3bb1 | [
"MIT"
] | 7 | 2020-09-02T06:31:21.000Z | 2022-02-18T21:16:44.000Z | harmoni_detectors/harmoni_stt/test/test_deepspeech.py | micolspitale93/HARMONI | cf6a13fb85e3efb4e421dbfd4555359c0a04acaa | [
"MIT"
] | 61 | 2020-05-15T16:46:32.000Z | 2021-07-28T17:44:49.000Z | harmoni_detectors/harmoni_stt/test/test_deepspeech.py | micolspitale93/HARMONI | cf6a13fb85e3efb4e421dbfd4555359c0a04acaa | [
"MIT"
] | 3 | 2020-10-05T23:01:29.000Z | 2022-03-02T11:53:34.000Z | #!/usr/bin/env python3
# Common Imports
import io
import rospy
import sys
import unittest
# Specific Imports
import time
import wave
from harmoni_common_lib.action_client import HarmoniActionClient
from harmoni_common_lib.constants import ActionType, DetectorNameSpace, SensorNameSpace, State
from audio_common_msgs.m... | 31.235294 | 107 | 0.65456 | 2,954 | 0.794727 | 0 | 0 | 0 | 0 | 0 | 0 | 1,005 | 0.270379 |
fdf47c8f7eacc32cfd98b13ee0730f15d82165c5 | 2,196 | py | Python | smoked/management/commands/smoked.py | martinsvoboda/django-smoked | 42b64fff23a37e3df42f8fc54535ea496dd27d84 | [
"MIT"
] | 6 | 2015-01-14T12:02:58.000Z | 2021-08-17T23:18:56.000Z | smoked/management/commands/smoked.py | martinsvoboda/django-smoked | 42b64fff23a37e3df42f8fc54535ea496dd27d84 | [
"MIT"
] | 7 | 2015-01-24T11:36:07.000Z | 2015-01-26T04:55:31.000Z | smoked/management/commands/smoked.py | martinsvoboda/django-smoked | 42b64fff23a37e3df42f8fc54535ea496dd27d84 | [
"MIT"
] | 1 | 2015-01-25T20:48:06.000Z | 2015-01-25T20:48:06.000Z | # coding: utf-8
from __future__ import absolute_import, unicode_literals
from optparse import make_option
import time
from django import VERSION
from django.core.management.base import NoArgsCommand
from smoked import default_registry
from smoked.runner import run_tests
stats_msg = """
Results
=======
Total: {total}... | 27.45 | 72 | 0.539617 | 1,803 | 0.821038 | 0 | 0 | 0 | 0 | 0 | 0 | 439 | 0.199909 |
fdf91475384cb8118e074e63142b83edc4f4d2bd | 1,735 | py | Python | Data Science With Python/07-cleaning-data-in-python/4-cleaning-data-for-analysis/10-testing-your-data-with-asserts.py | aimanahmedmoin1997/DataCamp | c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d | [
"MIT"
] | 5 | 2021-02-03T14:36:58.000Z | 2022-01-01T10:29:26.000Z | Data Science With Python/07-cleaning-data-in-python/4-cleaning-data-for-analysis/10-testing-your-data-with-asserts.py | aimanahmedmoin1997/DataCamp | c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d | [
"MIT"
] | null | null | null | Data Science With Python/07-cleaning-data-in-python/4-cleaning-data-for-analysis/10-testing-your-data-with-asserts.py | aimanahmedmoin1997/DataCamp | c6a6c4d59b83f14854bd76ed5c0c7f2dddd6de1d | [
"MIT"
] | 7 | 2018-11-06T17:43:31.000Z | 2020-11-07T21:08:16.000Z | '''
Testing your data with asserts
Here, you'll practice writing assert statements using the Ebola dataset from previous chapters to programmatically check for missing values and to confirm that all values are positive. The dataset has been pre-loaded into a DataFrame called ebola.
In the video, you saw Dan use the .... | 61.964286 | 611 | 0.756196 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,620 | 0.933718 |
fdfa15c5c9e42a9b497c846a1dd12bc7ab7f4c76 | 623 | py | Python | code/waldo/conf/guisettings.py | amarallab/waldo | e38d23d9474a0bcb7a94e685545edb0115b12af4 | [
"MIT"
] | null | null | null | code/waldo/conf/guisettings.py | amarallab/waldo | e38d23d9474a0bcb7a94e685545edb0115b12af4 | [
"MIT"
] | null | null | null | code/waldo/conf/guisettings.py | amarallab/waldo | e38d23d9474a0bcb7a94e685545edb0115b12af4 | [
"MIT"
] | null | null | null | COLLIDER_SUITE_OFFSHOOT_RANGE = (0, 100)
COLLIDER_SUITE_SPLIT_ABS_RANGE = (0, 10)
COLLIDER_SUITE_SPLIT_REL_RANGE = (-1, 1, 2)
COLLIDER_SUITE_ASSIMILATE_SIZE_RANGE = (0, 10)
TAPE_FRAME_SEARCH_LIMIT_RANGE = (1, 100000)
TAPE_PIXEL_SEARCH_LIMIT_RANGE = (1, 1000000)
DEFAULT_CALIBRATION_ENCLOSURE_SIZE_RANGE = (0, 1000)
COLL... | 34.611111 | 52 | 0.781701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fdfb52a6d5dc1287a0b5c4d900e03718e519b19a | 6,084 | py | Python | aiospotipy/me.py | sizumita/aiospotipy | 3c542ca90559abde2e35268b4eedfdbbef1dab34 | [
"MIT"
] | 3 | 2019-03-09T14:53:46.000Z | 2020-06-03T12:50:33.000Z | aiospotipy/me.py | sizumita/aiospotipy | 3c542ca90559abde2e35268b4eedfdbbef1dab34 | [
"MIT"
] | null | null | null | aiospotipy/me.py | sizumita/aiospotipy | 3c542ca90559abde2e35268b4eedfdbbef1dab34 | [
"MIT"
] | 1 | 2019-03-09T08:26:46.000Z | 2019-03-09T08:26:46.000Z | from ._http import (HTTPClient,
get_id,
Route,
GET,
PUT,
DELETE,
)
import asyncio
class Me:
def __init__(self, _http: HTTPClient):
self.http = _http
self.request = _http.request
... | 34.568182 | 84 | 0.561473 | 5,886 | 0.966502 | 0 | 0 | 0 | 0 | 5,637 | 0.925616 | 2,856 | 0.468966 |
fdfb78f1a782871b71fcd4058e86788874102e55 | 582 | py | Python | iiif_prezi3/loader.py | rbturnbull/iiif-prezi3 | 0e66bc41438772c75e064c20964ed01aff1f3709 | [
"Apache-2.0"
] | null | null | null | iiif_prezi3/loader.py | rbturnbull/iiif-prezi3 | 0e66bc41438772c75e064c20964ed01aff1f3709 | [
"Apache-2.0"
] | null | null | null | iiif_prezi3/loader.py | rbturnbull/iiif-prezi3 | 0e66bc41438772c75e064c20964ed01aff1f3709 | [
"Apache-2.0"
] | null | null | null | import json
def load_extensions_from_json():
try:
extensions = json.load(open("extensions.json"))
except FileNotFoundError:
return
for ext in extensions:
__import__(f"iiif_prezi3.extensions.{ext}")
def load_extension(path):
pass
def monkeypatch_schema(schema_class, patch_c... | 22.384615 | 55 | 0.689003 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.082474 |
fdfc80e749f6ee439afc826e7feee5425163a88f | 1,237 | py | Python | android_store_service/utils/config_utils.py | gpiress/android-store-service | da81c7e79a345d790f5e744fc8fdfae0e6941765 | [
"Apache-2.0"
] | 5 | 2020-12-10T14:05:04.000Z | 2020-12-18T09:04:35.000Z | android_store_service/utils/config_utils.py | gpiress/android-store-service | da81c7e79a345d790f5e744fc8fdfae0e6941765 | [
"Apache-2.0"
] | 4 | 2020-12-15T12:34:51.000Z | 2021-06-28T14:04:34.000Z | android_store_service/utils/config_utils.py | gpiress/android-store-service | da81c7e79a345d790f5e744fc8fdfae0e6941765 | [
"Apache-2.0"
] | 5 | 2020-12-15T12:10:22.000Z | 2022-03-18T20:06:38.000Z | # Copyright 2019 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 29.452381 | 81 | 0.712207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 676 | 0.546483 |
fdfd3606a932554deb9481786f567a3095afa229 | 395 | py | Python | blog/migrations/0015_auto_20190810_1404.py | vishnu-chalil/sharecontent | bda2cb6db0ffc38f582829abfced163e8a6eafdb | [
"Apache-2.0"
] | null | null | null | blog/migrations/0015_auto_20190810_1404.py | vishnu-chalil/sharecontent | bda2cb6db0ffc38f582829abfced163e8a6eafdb | [
"Apache-2.0"
] | 7 | 2020-02-12T01:20:22.000Z | 2021-06-10T18:39:59.000Z | blog/migrations/0015_auto_20190810_1404.py | vishnu-chalil/sharecontent | bda2cb6db0ffc38f582829abfced163e8a6eafdb | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.4 on 2019-08-10 14:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0014_post_imgdata'),
]
operations = [
migrations.AlterField(
model_name='post',
name='imgdata',
... | 20.789474 | 69 | 0.594937 | 302 | 0.764557 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.243038 |
a90000a60889fa2e13612a2352497c1c01e09cb6 | 71,385 | py | Python | DeSu2SE.py | XxArcaiCxX/Devil-Survivor-2-Record-Breaker-Save-Editor | 872717f66f1d9045d48f8d4c2621a925ee4e2817 | [
"MIT"
] | null | null | null | DeSu2SE.py | XxArcaiCxX/Devil-Survivor-2-Record-Breaker-Save-Editor | 872717f66f1d9045d48f8d4c2621a925ee4e2817 | [
"MIT"
] | null | null | null | DeSu2SE.py | XxArcaiCxX/Devil-Survivor-2-Record-Breaker-Save-Editor | 872717f66f1d9045d48f8d4c2621a925ee4e2817 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import tkinter as tk
from tkinter import filedialog
from tkinter import messagebox
from tkinter import ttk
import os
import sys
print_n = sys.stdout.write
STAT_TXT = ("ST", "MA", "VI", "AG")
# Characters
CHAR_OFFSET = "0x24"
CHAR_ID = ("0x75", 2)
CHAR_LVL = ("0x79", 1)
CHAR_EXP = ("0x7C", 2)
... | 38.255627 | 118 | 0.525867 | 41,800 | 0.585557 | 0 | 0 | 0 | 0 | 0 | 0 | 23,255 | 0.325769 |
a900d8dec7fd37ab4adca645a03f1689e7145bd6 | 6,692 | py | Python | tutorials/examples/interp_plot.py | ReynLieu/tf-pwa | f354b5036bc8c37ffba95849de5ec3367934eef8 | [
"MIT"
] | 4 | 2021-05-10T15:17:24.000Z | 2021-08-16T07:40:06.000Z | tutorials/examples/interp_plot.py | ReynLieu/tf-pwa | f354b5036bc8c37ffba95849de5ec3367934eef8 | [
"MIT"
] | 45 | 2020-10-24T08:26:19.000Z | 2022-03-20T06:14:58.000Z | tutorials/examples/interp_plot.py | ReynLieu/tf-pwa | f354b5036bc8c37ffba95849de5ec3367934eef8 | [
"MIT"
] | 8 | 2020-10-24T06:41:06.000Z | 2022-01-03T01:29:49.000Z | import json
import matplotlib.animation as animation
import matplotlib.pyplot as plt
import numpy as np
import scipy.signal as signal
import yaml
from mpl_toolkits.mplot3d.axes3d import Axes3D
from scipy.interpolate import interp1d
from tf_pwa.config_loader import ConfigLoader
from tf_pwa.experimental.extra_amp impor... | 27.539095 | 78 | 0.558876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,231 | 0.183951 |
a902196e210ce0c9d3fc255989473f3fdb1ab785 | 3,316 | py | Python | scripts/val_step_images_pull.py | neuroailab/curiosity_deprecated | 65f7cde13b07cdac52eed39535a94e7544c396b8 | [
"Apache-2.0"
] | null | null | null | scripts/val_step_images_pull.py | neuroailab/curiosity_deprecated | 65f7cde13b07cdac52eed39535a94e7544c396b8 | [
"Apache-2.0"
] | 2 | 2017-11-18T00:53:33.000Z | 2017-11-18T00:53:40.000Z | scripts/val_step_images_pull.py | neuroailab/curiosity_deprecated | 65f7cde13b07cdac52eed39535a94e7544c396b8 | [
"Apache-2.0"
] | null | null | null | '''
A script for accessing visualization data (saving images at validation steps during training) and saving them to a local directory.
'''
import pymongo as pm
import pickle
import os
import gridfs
import cPickle
import numpy as np
from PIL import Image
dbname = 'future_pred_test'
collname = 'asymmetric'
port = 27017... | 29.607143 | 131 | 0.701448 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 858 | 0.258745 |
a9039f8421d00114c0ba14dfaca35466584a7fcb | 1,543 | py | Python | server/main_node/create_tables.py | noderod/DARLMID | 5737dbe222ce5a5a847c1d0a8d1af64dda87e5b2 | [
"MIT"
] | null | null | null | server/main_node/create_tables.py | noderod/DARLMID | 5737dbe222ce5a5a847c1d0a8d1af64dda87e5b2 | [
"MIT"
] | null | null | null | server/main_node/create_tables.py | noderod/DARLMID | 5737dbe222ce5a5a847c1d0a8d1af64dda87e5b2 | [
"MIT"
] | null | null | null | """
BASICS
Creates the necessary tables and users.
"""
import os
import psycopg2
con = psycopg2.connect (host = os.environ["POSTGRES_URL"], database = os.environ["POSTGRES_DB"], user = os.environ["POSTGRES_USER"], password = os.environ["POSTGRES_PASSWORD"])
cur = con.cursor()
# Creates main user table
cur.execut... | 32.829787 | 176 | 0.720674 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,024 | 0.663642 |
a90540d0d0a5a9bc45b650e47d3f81668b272c4b | 338 | py | Python | test from collections import defaultdict.py | meeve602/nn-network | 2bc422785b8d7e5fa78d73a218f5ed8d499902e7 | [
"Apache-2.0"
] | null | null | null | test from collections import defaultdict.py | meeve602/nn-network | 2bc422785b8d7e5fa78d73a218f5ed8d499902e7 | [
"Apache-2.0"
] | null | null | null | test from collections import defaultdict.py | meeve602/nn-network | 2bc422785b8d7e5fa78d73a218f5ed8d499902e7 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
computing_graph = defaultdict(list)#defaultdict(list),会构建一个默认value为list的字典,
"""
for (key, value) in data:
result[key].append(value)
print(result)#defaultdict(<class 'list'>, {'p': [1, 2, 3], 'h': [1, 2, 3]})
"""
n = 'p'
m = [1,2,23]
computing_graph[n].append(m)
print(... | 26 | 76 | 0.659763 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 0.582873 |
a905bc7c157d96b2e4f0eee9148f0267c5d741fe | 597 | py | Python | examples/web-scraper/playground.py | relikd/botlib | d0c5072d27db1aa3fad432457c90c9e3f23f22cc | [
"MIT"
] | null | null | null | examples/web-scraper/playground.py | relikd/botlib | d0c5072d27db1aa3fad432457c90c9e3f23f22cc | [
"MIT"
] | null | null | null | examples/web-scraper/playground.py | relikd/botlib | d0c5072d27db1aa3fad432457c90c9e3f23f22cc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from botlib.curl import Curl
from botlib.html2list import HTML2List, MatchGroup
URL = 'https://www.vice.com/en/topic/motherboard'
SOURCE = Curl.get(URL, cache_only=True)
SELECT = '.vice-card__content'
match = MatchGroup({
'url': r'<a href="([^"]*)"',
'title': r'<h3[^>]*><a [^>]*>([\s\S]... | 28.428571 | 62 | 0.571189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 236 | 0.39531 |