id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2,286,600 | check-waf-v1.3.py | Huck-Lim_check-waf/check-waf-v1.3.py | import os
import sys
import requests
from openpyxl import Workbook
from openpyxl.styles import Border, Side, Font, Alignment
from openpyxl.utils import get_column_letter
from datetime import datetime
from bs4 import BeautifulSoup
from publicsuffixlist import PublicSuffixList
from urllib.parse import urlsplit
... | 7,476 | Python | .py | 160 | 35.1625 | 232 | 0.601773 | Huck-Lim/check-waf | 8 | 2 | 1 | MPL-2.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,601 | extract_version.py | nicvagn_NicLink/src/thirdparty/spdlog/scripts/extract_version.py | #!/usr/bin/env python3
import os
import re
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
config_h = os.path.join(base_path, 'include', 'spdlog', 'version.h')
data = {'MAJOR': 0, 'MINOR': 0, 'PATCH': 0}
reg = re.compile(r'^\s*#define\s+SPDLOG_VER_([A-Z]+)\s+([0-9]+).*$')
with open(config_... | 497 | Python | .py | 13 | 34.461538 | 74 | 0.579167 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,602 | turn_out_all_lights.py | nicvagn_NicLink/nicsoft/turn_out_all_lights.py | # NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# NicLink is distributed in the hope that it will be useful, but WITHOUT ANY WA... | 739 | Python | .py | 9 | 80.777778 | 237 | 0.789546 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,603 | light_board.py | nicvagn_NicLink/nicsoft/light_board.py | # light_board is a part of NicLink
#
# NicLink is free software: you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation, either version 3 of the license, or (at your option) any later version.
#
# NicLink is distributed in the hope that ... | 2,365 | Python | .py | 57 | 31.824561 | 237 | 0.572237 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,604 | __main__.py | nicvagn_NicLink/nicsoft/play_stockfish/__main__.py | # NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ( at your option ) any later version.
#
# NicLink is distributed in the hope that it will be useful, but WITHOUT ANY ... | 8,070 | Python | .py | 197 | 33.93401 | 239 | 0.590392 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,605 | test_niclink_signals.py | nicvagn_NicLink/nicsoft/test/test_niclink_signals.py | # This file is a part of NicLink
#
# NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# NicLink is distributed in the hope that i... | 1,496 | Python | .py | 34 | 40 | 237 | 0.71832 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,606 | __main__.py | nicvagn_NicLink/nicsoft/test/__main__.py | # This file is a part of NicLink
#
# NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# NicLink is distributed in the hope that i... | 3,147 | Python | .py | 96 | 27.458333 | 237 | 0.667768 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,607 | test_niclink_lights.py | nicvagn_NicLink/nicsoft/test/test_niclink_lights.py | # NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# NicLink is distributed in the hope that it will be useful, but WITHOUT ANY WA... | 1,430 | Python | .py | 31 | 40.096774 | 237 | 0.653208 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,608 | test_niclink_FEN.py | nicvagn_NicLink/nicsoft/test/test_niclink_FEN.py | # NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# NicLink is distributed in the hope that it will be useful, but WITHOUT ANY WA... | 1,058 | Python | .py | 20 | 48.45 | 237 | 0.707483 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,609 | test_niclink_move_parsing.py | nicvagn_NicLink/nicsoft/test/test_niclink_move_parsing.py | # NicLink is free software you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# NicLink is distributed in the hope that it will be useful, but WITHOUT ANY WAR... | 1,364 | Python | .py | 30 | 39.3 | 236 | 0.645944 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,610 | nl_test_threading.py | nicvagn_NicLink/nicsoft/test/nl_test_threading.py | # niclink is free software: you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation, either version 3 of the license, or (at your option) any later version.
#
# niclink is distributed in the hope that it will be useful, but without any wa... | 1,352 | Python | .py | 30 | 40.8 | 237 | 0.714067 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,611 | test_niclink_board_compairison.py | nicvagn_NicLink/nicsoft/test/test_niclink_board_compairison.py | # NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# NicLink is distributed in the hope that it will be useful, but WITHOUT ANY WA... | 1,342 | Python | .py | 25 | 49.64 | 237 | 0.667433 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,612 | nl_exceptions.py | nicvagn_NicLink/nicsoft/niclink/nl_exceptions.py | # NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# NicLink is distributed in the hope that it will be useful, but WITHOUT ANY WA... | 1,580 | Python | .py | 29 | 49.551724 | 237 | 0.722114 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,613 | nl_test_bluetooth.py | nicvagn_NicLink/nicsoft/niclink/nl_test_bluetooth.py | # NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# NicLink is distributed in the hope that it will be useful, but WITHOUT ANY WA... | 652 | Python | .py | 7 | 91.857143 | 237 | 0.793157 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,614 | driver.py | nicvagn_NicLink/nicsoft/niclink/driver.py | # NicLink is free software: you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation, either version 3 of the license, or (at your option) any later version.
#
# NicLink is distributed in the hope that it will be useful, but without any wa... | 30,336 | Python | .py | 768 | 28 | 237 | 0.541946 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,615 | constants.py | nicvagn_NicLink/nicsoft/niclink/nl_bluetooth/constants.py | """ Constant used in the program"""
# When the board is first connected it is necessary to send it a three byte initialisation code:
INITIALIZASION_CODE = b"\x21\x01\x00"
# The board will then send back a three byte confirmation code:
CONFIRMATION_CHARACTERISTICS = b"\x21\x01\x00"
# The signals from the board consist ... | 1,000 | Python | .py | 32 | 28.53125 | 96 | 0.697409 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,616 | __init__.py | nicvagn_NicLink/nicsoft/niclink/nl_bluetooth/__init__.py | # NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# NicLink is distributed in the hope that it will be useful, but WITHOUT ANY WA... | 9,097 | Python | .py | 195 | 40.169231 | 237 | 0.660833 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,617 | discovery.py | nicvagn_NicLink/nicsoft/niclink/nl_bluetooth/discovery.py | """Discover chessnut Air devices.
See pdf file Chessnut_comunications.pdf
for more information."""
import asyncio
import logging
from bleak import BleakScanner, BleakClient
from bleak.backends.device import BLEDevice
from bleak.backends.scanner import AdvertisementData
# from constants import DEVICELIST
from .cons... | 1,576 | Python | .py | 42 | 31.190476 | 69 | 0.686802 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,618 | main.py | nicvagn_NicLink/nicsoft/niclink/nl_bluetooth/main.py | from discovery import GetChessnutAirDevices
import asyncio
from bleak import BleakClient
from constants import (
INITIALIZASION_CODE,
WRITECHARACTERISTICS,
READCONFIRMATION,
READDATA,
convertDict,
MASKLOW,
)
oldData = None
CLIENT = None
def printBoard(data):
"""Print the board in a human... | 5,265 | Python | .py | 113 | 39.60177 | 103 | 0.654333 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,619 | chess_clock.py | nicvagn_NicLink/nicsoft/lichess/chess_clock.py | # chess_clock is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ( at your option ) any later version.
#
# chess_clock is distributed in the hope that it will be useful, but WITH... | 19,697 | Python | .py | 502 | 29.426295 | 243 | 0.587712 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,620 | __main__.py | nicvagn_NicLink/nicsoft/lichess/__main__.py | # NicLink-lichess is a part of NicLink
#
# NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ( at your option ) any later version.
#
# NicLink is distributed in the hop... | 677 | Python | .py | 9 | 74 | 239 | 0.785285 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,621 | game.py | nicvagn_NicLink/nicsoft/lichess/game.py | # game is a part of NicLink-lichess
#
# NicLink-lichess is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ( at your option ) any later version.
#
# NicLink-lichess is distribut... | 3,708 | Python | .py | 87 | 34.804598 | 247 | 0.615576 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,622 | game_state.py | nicvagn_NicLink/nicsoft/lichess/game_state.py | # NicLink-lichess is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ( at your option ) any later version.
#
# NicLink-lichess is distributed in the hope that it will be useful, ... | 3,687 | Python | .py | 83 | 36.216867 | 247 | 0.621161 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,623 | game_start.py | nicvagn_NicLink/nicsoft/lichess/game_start.py | # NicLink-lichess is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ( at your option ) any later version.
#
# NicLink-lichess is distributed in the hope that it will be useful, ... | 1,467 | Python | .py | 32 | 41.59375 | 247 | 0.679272 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,624 | lila.py | nicvagn_NicLink/nicsoft/lichess/lila.py | # NicLink-lichess is a part of NicLink
#
# NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ( at your option ) any later version.
#
# NicLink is distributed in the hop... | 29,249 | Python | .py | 710 | 30.591549 | 239 | 0.583081 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,625 | sending_messages.py | nicvagn_NicLink/nicsoft/lichess/external_clock_firmware/sending_messages.py | import serial
import time
arduino = serial.Serial(port="/dev/ttyACM0", baudrate=115200, timeout=0.1)
def write_read(x):
arduino.write(bytes(x, "utf-8"))
time.sleep(0.05)
data = arduino.readline()
return data
def send(message: str):
"""send a message to the external chess clock"""
arduino.wr... | 444 | Python | .py | 15 | 25.733333 | 74 | 0.689573 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,626 | chess_clock.py | nicvagn_NicLink/nicsoft/lichess/external_clock_firmware/old/chess_clock.py | #! /bin/python
# lcd_display as a part of Niclink
#
# NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ( at your option ) any later version.
#
# NicLink is distributed... | 4,194 | Python | .py | 116 | 29.646552 | 239 | 0.62719 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,627 | talking_to_aurdino.py | nicvagn_NicLink/nicsoft/lichess/external_clock_firmware/old/talking_to_aurdino.py | import serial
import time
arduino = serial.Serial(port="/dev/ttyACM0", baudrate=115200, timeout=0.1)
def write_read(x):
arduino.write(bytes(x, "utf-8"))
time.sleep(0.05)
data = arduino.readline()
return data
def send(message: str):
"""send a message to the external chess clock"""
pass
whi... | 410 | Python | .py | 15 | 23.466667 | 74 | 0.685567 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,628 | __main__.py | nicvagn_NicLink/nicsoft/niclink_game/__main__.py | # NicLink is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ( at your option ) any later version.
#
# NicLink is distributed in the hope that it will be useful, but WITHOUT ANY ... | 6,863 | Python | .py | 167 | 34.682635 | 239 | 0.591073 | nicvagn/NicLink | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,629 | main.py | hkgdifyu_pFedPT/system/main.py | #!/usr/bin/env python
import sys
print(sys.path)
import copy
import torch
import argparse
import os
print (os.path.expandvars('$HOME'))
import time
import warnings
import numpy as np
from torch.nn.functional import dropout
import torchvision
from flcore.servers.serveravg import FedAvg
from flcore.servers.serverpfedpt ... | 7,895 | Python | .py | 155 | 42.03871 | 123 | 0.614605 | hkgdifyu/pFedPT | 8 | 3 | 0 | GPL-2.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,630 | fedoptimizer.py | hkgdifyu_pFedPT/system/flcore/optimizers/fedoptimizer.py | import torch
from torch.optim import Optimizer
class PerAvgOptimizer(Optimizer):
def __init__(self, params, lr):
defaults = dict(lr=lr)
super(PerAvgOptimizer, self).__init__(params, defaults)
def step(self, beta=0):
for group in self.param_groups:
for p in group['params']:... | 4,348 | Python | .py | 96 | 36.9375 | 131 | 0.556371 | hkgdifyu/pFedPT | 8 | 3 | 0 | GPL-2.0 | 9/5/2024, 10:48:09 PM (Europe/Amsterdam) |
2,286,631 | fedoptimizer.cpython-39.pyc | hkgdifyu_pFedPT/system/flcore/optimizers/__pycache__/fedoptimizer.cpython-39.pyc | a
fæ`c¸ „ @ sh d dl Z d dlmZ G ddÑ deÉZG ddÑ deÉZG ddÑ deÉZG d d
Ñ d
eÉZG ddÑ deÉZdS )
È N)⁄ Optimizerc s& |