added stringdate 2024-11-18 17:59:49 2024-11-19 03:44:43 | created int64 0 2,086B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.5 | source stringclasses 1
value | text stringlengths 258 23.4k | num_lines int64 16 649 | avg_line_length float64 15 61 | max_line_length int64 31 179 | ast_depth int64 8 40 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 2 265k | sast_codeql_findings_count int64 0 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-19T01:55:29.579069+00:00 | 1,436,510,482,000 | a8f48f5023ce00c461ee1078a263d9b4fcb0bdde | 2 | {
"blob_id": "a8f48f5023ce00c461ee1078a263d9b4fcb0bdde",
"branch_name": "refs/heads/master",
"committer_date": 1436510482000,
"content_id": "e699ba14d55cee3b6866a5ed1b47d4ab776a352d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "dcb39849dc0325d9c97e30b8eae2163f18143ac5",
"extension": "py"... | 2.359375 | stackv2 | #! /usr/bin/python
""" Copyright 2015 Akamai Technologies, Inc. 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 re... | 263 | 30.67 | 110 | 16 | 1,975 | python | [] | 0 | true | |
2024-11-19T01:55:29.630444+00:00 | 1,692,606,856,000 | f7919b34223559c721fbc3ee9dbaba0bc4c9931b | 2 | {
"blob_id": "f7919b34223559c721fbc3ee9dbaba0bc4c9931b",
"branch_name": "refs/heads/main",
"committer_date": 1692606856000,
"content_id": "c8807e5c61676c2e19948ce481865af8a4187d87",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ddddaa700e4642f46a2c1e1e0271a7c8ea62ba0f",
"extension": "py",
... | 2.390625 | stackv2 | import dataclasses
import logging
from typing import Any, Dict, List, Optional, Tuple, Union, cast
import attrdict
import datasets as hf_datasets
import torch
import transformers
import transformers.optimization as hf_opt
import determined.pytorch as det_torch
import model_hub.utils
from model_hub.huggingface import ... | 302 | 39.29 | 99 | 16 | 2,508 | python | [] | 0 | true | |
2024-11-19T01:55:29.857211+00:00 | 1,614,181,199,000 | 7dda6b8314df74cc02b9a79092931423cc22ec74 | 3 | {
"blob_id": "7dda6b8314df74cc02b9a79092931423cc22ec74",
"branch_name": "refs/heads/master",
"committer_date": 1614181199000,
"content_id": "c49654a1b72f361a99709956929bdfcfe9636569",
"detected_licenses": [
"Python-2.0",
"MIT"
],
"directory_id": "50008b3b7fb7e14f793e92f5b27bf302112a3cb4",
"exten... | 3.15625 | stackv2 | import os
import fnmatch
def Walk(root='.', recurse=True, pattern='*'):
"""
Generator for walking a directory tree.
Starts at specified root folder, returning files
that match our pattern. Optionally will also
recurse through sub-folders.
"""
for path, subdirs, files in os.w... | 43 | 29.91 | 67 | 15 | 274 | python | [] | 0 | true | |
2024-11-19T01:55:29.907700+00:00 | 1,691,854,716,000 | 73ec3b46514f27fd4a297df0c9a5c667f5375ac8 | 3 | {
"blob_id": "73ec3b46514f27fd4a297df0c9a5c667f5375ac8",
"branch_name": "refs/heads/master",
"committer_date": 1691854716000,
"content_id": "f64dc0c1c4057aab09832bf69c9230bbac97032c",
"detected_licenses": [
"MIT"
],
"directory_id": "046b3d840d870cd86bd6cb52a8a345648f9d130f",
"extension": "py",
"fi... | 2.6875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# All rights reserved.
#
# This code is licensed under the MIT License.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in the Software without restriction, i... | 214 | 30.53 | 79 | 22 | 1,542 | python | [] | 0 | true | |
2024-11-19T01:55:30.204324+00:00 | 1,684,464,488,000 | c269b88471cfa97150855092b0bae90a09f97a9a | 4 | {
"blob_id": "c269b88471cfa97150855092b0bae90a09f97a9a",
"branch_name": "refs/heads/master",
"committer_date": 1684464488000,
"content_id": "cd4fb211e9191d230b4a9b6104a3ce67bdab0cb1",
"detected_licenses": [
"MIT"
],
"directory_id": "03e4e75a00044df181adbebf5f44b5076d97a15f",
"extension": "py",
"fi... | 3.609375 | stackv2 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : 5_future.py
@Time : 2020-11-09
@Author : EvilRecluse
@Contact : https://github.com/RecluseXU
@Desc : Future 是一种特殊的 低层级 可等待对象,表示一个异步操作的 最终结果。
当一个 Future 对象 被等待,这意味着协程将保持等待直到该 Future 对象在其他地方操作完毕。
在 asyncio 中需要 Future 对象以便允许通过 async/aw... | 45 | 27.71 | 79 | 8 | 481 | python | [] | 0 | true | |
2024-11-19T01:55:30.259370+00:00 | 1,611,918,649,000 | fd8f0aa11b915cc32152d7132b04cd3f196808f0 | 3 | {
"blob_id": "fd8f0aa11b915cc32152d7132b04cd3f196808f0",
"branch_name": "refs/heads/master",
"committer_date": 1611918649000,
"content_id": "50c0b0496650136ed7d46b1a2cbf69355726addc",
"detected_licenses": [
"MIT"
],
"directory_id": "c61ba1c3fc4e6801e1dc4ca622e731caa94bd41d",
"extension": "py",
"fi... | 3.3125 | stackv2 | '''
Find | Detect | Classification Hands | On Video
About "Input variables":
[cap] - Path to you video file
[LEFT_HAND_COLOR] - Color in RGB format, which will display the left hand
[RIGHT_HAND_COLOR] - Color in RGB format, which will display the right hand
[BORDER_SIZE] - Border size
[SCALE_IMAGE] - Zoom in on the im... | 82 | 34.66 | 92 | 14 | 794 | python | [] | 0 | true | |
2024-11-19T01:55:30.313580+00:00 | 1,626,206,538,000 | 4dbbe67d403a4b57b142855017a83cd6c5d2c17a | 3 | {
"blob_id": "4dbbe67d403a4b57b142855017a83cd6c5d2c17a",
"branch_name": "refs/heads/main",
"committer_date": 1626206538000,
"content_id": "49136f5d7d74a6b51702217d102c17791d01cdfc",
"detected_licenses": [
"Unlicense"
],
"directory_id": "914652d22593457f965a6c4b7ef23e00eb9aeb52",
"extension": "py",
... | 2.53125 | stackv2 | import sys
from PyQt5 import uic, QtWidgets
from app.CurlingLeagueManager import TeamMember
UI_MainWindow, QtBaseWindow = uic.loadUiType('TeamEditor.ui')
class TeamEditor(QtBaseWindow, UI_MainWindow):
def __init__(self, db_obj, l_row, t_row, parent=None):
super().__init__(parent)
self._last_oid = ... | 47 | 37.49 | 118 | 16 | 404 | python | [] | 0 | true | |
2024-11-19T01:55:30.398253+00:00 | 1,504,423,063,000 | 25afdbdfdee41949042969f7e81fc6b3f8421deb | 3 | {
"blob_id": "25afdbdfdee41949042969f7e81fc6b3f8421deb",
"branch_name": "refs/heads/master",
"committer_date": 1504423063000,
"content_id": "a292ea51767f1b4b6ad80115068ce109df22e94d",
"detected_licenses": [
"MIT"
],
"directory_id": "4101b4495fb02589724bb10b909305a45f1398ab",
"extension": "py",
"fi... | 3.421875 | stackv2 | class Solution(object):
def generateParenthesis(self, n):
"""
:type n: int
:rtype: List[str]
"""
if n <= 0:
return []
res = []
self.dfs(res, [], 0, 0, n)
return res
def dfs(self, res, cur, l, r, n):
if l == n and l == r:
... | 28 | 22.11 | 43 | 14 | 176 | python | [] | 0 | true | |
2024-11-19T01:55:30.641235+00:00 | 1,629,449,891,000 | 9c2aa523a5e654e11fb80085ce2a35d9cf389b6f | 3 | {
"blob_id": "9c2aa523a5e654e11fb80085ce2a35d9cf389b6f",
"branch_name": "refs/heads/master",
"committer_date": 1629449891000,
"content_id": "f31129664a9ec4b41fcfc2a46948111cab3efae7",
"detected_licenses": [
"MIT"
],
"directory_id": "049c04caf7a6cda778ddc6f642add73d813c8bba",
"extension": "py",
"fi... | 2.890625 | stackv2 | from dataclasses import dataclass
from typing import Any
from anyio import create_memory_object_stream
from anyio.abc import ObjectReceiveStream, ObjectSendStream
class ValveClosedError(Exception):
pass
class ValveState:
"""A closeable MemoryObjectStream"""
def __init__(self, **kwargs):
self._... | 129 | 23.11 | 86 | 13 | 743 | python | [] | 0 | true | |
2024-11-19T01:55:30.805599+00:00 | 1,645,778,706,000 | 10e0312e45f8b4143ae4a358cd271ff9bc3663c6 | 3 | {
"blob_id": "10e0312e45f8b4143ae4a358cd271ff9bc3663c6",
"branch_name": "refs/heads/master",
"committer_date": 1645778706000,
"content_id": "1a684270b10e9a2c809552eb04278e27708f175f",
"detected_licenses": [
"MIT"
],
"directory_id": "562bdb7b0ce55eaf41a0ba24c1d4a833e6c3fb5c",
"extension": "py",
"fi... | 3.34375 | stackv2 | """This module implements a serial bus class which talks to bioloid
devices through a serial port.
"""
import serial
from bioloid.bus import Bus
class SerialPort(serial.Serial):
"""Encapsulates serial port communicatons."""
def __init__(self, *args, **kwargs):
# Ensure that a reasonable timeout is ... | 58 | 29.02 | 72 | 12 | 416 | python | [] | 0 | true | |
2024-11-19T01:55:30.928329+00:00 | 1,522,099,737,000 | 854256d86bb5c1fb3538c52cedfdb85eafde4601 | 3 | {
"blob_id": "854256d86bb5c1fb3538c52cedfdb85eafde4601",
"branch_name": "refs/heads/master",
"committer_date": 1522099737000,
"content_id": "6173c56540382f3de8bf9cc0350a28935714ca8f",
"detected_licenses": [
"MIT"
],
"directory_id": "d09e0555523b4413e701c680dc77453bf249974d",
"extension": "py",
"fi... | 2.640625 | stackv2 | #!/usr/bin/env python
class Offer:
def __init__(self):
self.swaggerTypes = {
'available': 'bool',
'barcode': 'str',
'images': 'list[str]',
'categories': 'list[str]',
'isbn': 'str',
'link': 'str',
'prices': 'list[OfferPric... | 69 | 21.72 | 47 | 11 | 350 | python | [] | 0 | true | |
2024-11-19T01:55:30.977480+00:00 | 1,679,403,918,000 | 91f06eafd4c3f259ae21395ca7429e8aba0b7522 | 2 | {
"blob_id": "91f06eafd4c3f259ae21395ca7429e8aba0b7522",
"branch_name": "refs/heads/main",
"committer_date": 1679403918000,
"content_id": "f43cba04d15b53dfe33dad847b6bc765d411f2ba",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "24e6c105fb91da3454e0cc8833d3a9ba30f45896",
"extension": "py",
... | 2.40625 | stackv2 | import logging
import numpy as np
from load_data import DATA
from EduKTM import LPKT
def generate_q_matrix(path, n_skill, n_problem, gamma=0.0):
with open(path, 'r', encoding='utf-8') as f:
for line in f:
problem2skill = eval(line)
q_matrix = np.zeros((n_problem + 1, n_skill + 1)) + gamma
... | 58 | 37.31 | 123 | 12 | 692 | python | [] | 0 | true | |
2024-11-19T01:55:31.092395+00:00 | 1,628,533,778,000 | 5f38c11a5c077fb2ff18ae9fef63e9fea36d59da | 4 | {
"blob_id": "5f38c11a5c077fb2ff18ae9fef63e9fea36d59da",
"branch_name": "refs/heads/master",
"committer_date": 1628533778000,
"content_id": "905189ca9fffb16503d1bf090b67cdfad33c9e3b",
"detected_licenses": [
"MIT"
],
"directory_id": "d27252a09e8835a2db3b7c999bec36d9794f6939",
"extension": "py",
"fi... | 3.890625 | stackv2 | # Описать класс «домашняя библиотека».
# Предусмотреть возможность работы с произвольным числом книг,
# поиска книги по какому-либо признаку (например, по автору или по году издания),
# добавления книг в библиотеку,
# удаления книг из нее,
# сортировки книг по разным полям.
from lesson06.lib_util import GetDataFromCons... | 47 | 36.13 | 89 | 14 | 458 | python | [] | 0 | true | |
2024-11-19T01:55:31.342192+00:00 | 1,611,009,282,000 | 2d07319ca12d44bfab9eaafc718a623edb5510af | 3 | {
"blob_id": "2d07319ca12d44bfab9eaafc718a623edb5510af",
"branch_name": "refs/heads/master",
"committer_date": 1611009282000,
"content_id": "f8e91b547261583d29b97f6994c0cc6ea6d67bf4",
"detected_licenses": [
"MIT"
],
"directory_id": "578ea984a936e1f89236a5f8e68b0d1688020b6b",
"extension": "py",
"fi... | 2.65625 | stackv2 | from prompt_toolkit import prompt
from yfs.lookup import fuzzy_search
from time import time
from pprint import pprint
from pydantic import BaseModel as Base
from yfs.exchanges import ExchangeTypes
ExchangeTypes.show()
while True:
print("Use 'exit' to end.")
print("Type a symbol or company name.")
symbol... | 24 | 22.58 | 80 | 14 | 127 | python | [] | 0 | true | |
2024-11-19T01:55:31.546079+00:00 | 1,379,027,641,000 | 1ae28b8f460dab5ae141a8b1957d083c0c6fe8c8 | 2 | {
"blob_id": "1ae28b8f460dab5ae141a8b1957d083c0c6fe8c8",
"branch_name": "refs/heads/master",
"committer_date": 1379027641000,
"content_id": "cce1bdf28e9b8528180f59bf0472bf6df1d4c47a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "de9e116588a5063249ceaec649eaecf5a9fdd9be",
"extension": "py"... | 2.34375 | stackv2 | # Copyright 2012 Google Inc. 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 law or a... | 267 | 36.51 | 92 | 19 | 2,360 | python | [] | 0 | true | |
2024-11-19T01:55:31.669947+00:00 | 1,389,439,522,000 | 6046fbf2a16b61aff1eb0a30434d8beeb4484b6b | 3 | {
"blob_id": "6046fbf2a16b61aff1eb0a30434d8beeb4484b6b",
"branch_name": "refs/heads/master",
"committer_date": 1389439522000,
"content_id": "2fc6e36b69233f276ec0edf11ebfb9aabb0217b8",
"detected_licenses": [
"ISC"
],
"directory_id": "8543a1331f7fa3d433dd3a67471866fc1b84bb41",
"extension": "py",
"fi... | 3 | stackv2 | #!/usr/bin/env python
#
# Copyright 2013-2014 Sergio Arroutbi Braojos <sarroutbi@yahoo.es>
#
# Permission to use, copy, modify, and/or distribute this software
# for any purpose with or without fee is hereby granted, provided that
# the above copyright notice and this permission notice appear in all copies.
#
# THE... | 52 | 33.5 | 83 | 12 | 413 | python | [] | 0 | true | |
2024-11-19T01:55:31.721625+00:00 | 1,685,068,684,000 | 7b89768aab9329aaa16e44550d4b81c0ba73c956 | 2 | {
"blob_id": "7b89768aab9329aaa16e44550d4b81c0ba73c956",
"branch_name": "refs/heads/main",
"committer_date": 1685068684000,
"content_id": "c54eb41df046cdd601a36f9055d0baa119f3d8c6",
"detected_licenses": [
"MIT"
],
"directory_id": "a9fbc42548515edbb6775a8afb3edf2efca161a2",
"extension": "py",
"file... | 2.4375 | stackv2 | from setuptools import setup, find_packages
with open("requirements.txt") as f:
requirements = f.readlines()
long_description = "Flipbook is a basic implementation of real-world like book. We can generate various cool gifs and pdfs using this package!"
setup(
name="Flipbook",
version="1.0.0",
author=... | 28 | 34.29 | 143 | 10 | 222 | python | [] | 0 | true | |
2024-11-19T01:55:31.781742+00:00 | 1,629,818,411,000 | b535d2c237a4ddd016456e81b8a6e9e03abdf59c | 4 | {
"blob_id": "b535d2c237a4ddd016456e81b8a6e9e03abdf59c",
"branch_name": "refs/heads/master",
"committer_date": 1629818411000,
"content_id": "9cccfef9ce9eab03bc029085f21d5bac0b1c0f0b",
"detected_licenses": [
"MIT"
],
"directory_id": "41aea9ecd09bf332882c115db502dd67bdc2314f",
"extension": "py",
"fi... | 3.515625 | stackv2 | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from scipy.stats import fisher_exact
def binary_contingency(a, b, ax=None, heatmap_kwargs={}):
"""
Plot agreement between two binary variables, along with
the odds ratio and Fisher's exact test p-value.
Param... | 84 | 21.95 | 61 | 11 | 504 | python | [] | 0 | true | |
2024-11-19T01:55:32.025459+00:00 | 1,597,768,273,000 | 10c50cd8d5124b2ac4b397ceb1fbdc0aa4c22996 | 3 | {
"blob_id": "10c50cd8d5124b2ac4b397ceb1fbdc0aa4c22996",
"branch_name": "refs/heads/master",
"committer_date": 1597768273000,
"content_id": "4e240c545227f0d0841659056a61735cf0e0b780",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c80f48c34cc99dcb587fd452ac27639c379b19f6",
"extension": "py"... | 2.6875 | stackv2 | """
Created by Epic at 7/2/20
"""
import logging
import typing
import discord
from discord.ext import commands
class Info(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.logger = logging.getLogger("salbot.cogs.info")
@commands.command(name="userinfo", aliases=["ui", "user"])
... | 36 | 36.39 | 117 | 16 | 325 | python | [] | 0 | true | |
2024-11-19T01:55:32.267378+00:00 | 1,571,856,605,000 | 3475992f9e56a157b85ad072b3e2a39a24bb9afd | 2 | {
"blob_id": "3475992f9e56a157b85ad072b3e2a39a24bb9afd",
"branch_name": "refs/heads/master",
"committer_date": 1571856605000,
"content_id": "86cf147297ebd5d0508f74cb15d3587bd0987bd9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0e385f1c0ba2989350b1a88a2adfce3df95a68ea",
"extension": "py"... | 2.34375 | stackv2 | import time
import aiohttp
async def aio_api_request(url, api_key=None, params=None, signature=None):
# Make request
async with aiohttp.ClientSession() as session:
if api_key: # POST, for private API
response = await session.post(url, headers={
"Key": api_key,
... | 20 | 31.95 | 74 | 17 | 141 | python | [] | 0 | true | |
2024-11-19T01:55:32.448376+00:00 | 1,405,699,390,000 | 6bf986451810661e28924b88f4ae49a0714a9f4a | 2 | {
"blob_id": "6bf986451810661e28924b88f4ae49a0714a9f4a",
"branch_name": "refs/heads/master",
"committer_date": 1405699390000,
"content_id": "ea3c4cb84f4463cf49183b43538956ecbfa3df26",
"detected_licenses": [
"MIT"
],
"directory_id": "24c0f97a499b6ed2823ee2d9b5805c7589f65bcc",
"extension": "py",
"fi... | 2.484375 | stackv2 | import libs.modular_core.libfundamental as lfu
import libs.modular_core.libfiler as lf
import libs.developer.libcodegenerator as lcg
import os, importlib
import pdb
class program_manager(lfu.modular_object_qt):
# create programs
# add/remove program modules (from anywhere)
def __init__(self, *args, **kwargs):
se... | 192 | 34.01 | 65 | 19 | 1,871 | python | [] | 0 | true | |
2024-11-19T01:55:32.622157+00:00 | 1,625,995,078,000 | 64701386eea95fc070a4e0a8bb6cccd14c5a995f | 2 | {
"blob_id": "64701386eea95fc070a4e0a8bb6cccd14c5a995f",
"branch_name": "refs/heads/master",
"committer_date": 1625995078000,
"content_id": "ce581d40b1007c6a495da34c895bbb381677a2f9",
"detected_licenses": [
"MIT"
],
"directory_id": "a9553b3fa8dd523a4ff2d529bd6a43167ed1145e",
"extension": "py",
"fi... | 2.453125 | stackv2 | import argparse
import os
import time
import numpy as np
import torch
from datasets import TestDataset, denorm
from models import FUnIEGeneratorV1, FUnIEGeneratorV2, FUnIEUpGenerator
from torchvision import transforms
from utils import AverageMeter, ProgressMeter
class Predictor(object):
def __init__(self, mode... | 116 | 37.3 | 86 | 20 | 981 | python | [] | 0 | true | |
2024-11-19T01:55:32.690126+00:00 | 1,487,682,161,000 | 205110747613f7e1219706c922e86cd5383c8b7a | 2 | {
"blob_id": "205110747613f7e1219706c922e86cd5383c8b7a",
"branch_name": "refs/heads/master",
"committer_date": 1487682161000,
"content_id": "93d8200ef97f071901160c8c4a59fab53b99b19c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "641dd61424a4dd9cd80d197cdd83720987128733",
"extension": "p... | 2.5 | stackv2 | from django.db import models
from .config import DELETED_INVISIBLE, DELETED_VISIBLE_BY_FIELD
class SafeDeleteQueryset(models.query.QuerySet):
def delete(self):
assert self.query.can_filter(), "Cannot use 'limit' or 'offset' with delete."
# TODO: Replace this by bulk update if we can
for ... | 103 | 39.25 | 115 | 14 | 912 | python | [] | 0 | true | |
2024-11-19T01:55:33.003704+00:00 | 1,610,906,098,000 | 6eee249bc94f889db20c1969a2a51a94745ee60d | 3 | {
"blob_id": "6eee249bc94f889db20c1969a2a51a94745ee60d",
"branch_name": "refs/heads/master",
"committer_date": 1610906098000,
"content_id": "0f0348eaa956d7f15b7fd6a72353ea03f70c83dd",
"detected_licenses": [
"MIT"
],
"directory_id": "87b6217dc5cf1aff55370542dd13d1ad35020f02",
"extension": "py",
"fi... | 2.609375 | stackv2 | import aubio
import numpy as np
def data_load_aubio(**kwargs):
if 'filename' in kwargs:
filename = kwargs['filename']
else:
filename = '/home/src/QK/data/sound-arglaaa-2018-10-25/24.wav'
samplerate = 0
src = aubio.source(filename, samplerate, channels=1)
src.seek(0)
return src... | 147 | 28.71 | 112 | 16 | 1,232 | python | [] | 0 | true | |
2024-11-19T01:55:33.058528+00:00 | 1,684,379,289,000 | 747e376341584a6a3a3fb465494aa01032b875a9 | 3 | {
"blob_id": "747e376341584a6a3a3fb465494aa01032b875a9",
"branch_name": "refs/heads/main",
"committer_date": 1684379289000,
"content_id": "42ffb7e940c5e69c70c65d2540604ae3d605ce7c",
"detected_licenses": [
"MIT"
],
"directory_id": "fbc7501679e36bb65f4923098bd3b91cf2d2bc51",
"extension": "py",
"file... | 2.90625 | stackv2 | #!/usr/bin/env python
import pandas as pd
import itertools
fpath = '../data/games_1.csv'
out_path = './'
chunksize = 10**5
for i,df in enumerate(pd.read_csv(fpath,usecols=[0,1],dtype={'steamid':object,'appid':int},chunksize=chunksize)):
df = df.drop_duplicates()
# Create the edges between games / nodes (appi... | 29 | 39.31 | 113 | 17 | 311 | python | [] | 0 | true | |
2024-11-19T01:55:33.161535+00:00 | 1,604,926,742,000 | d38a14e8fe6f45af945a3e6cfb4ce39903c15476 | 3 | {
"blob_id": "d38a14e8fe6f45af945a3e6cfb4ce39903c15476",
"branch_name": "refs/heads/master",
"committer_date": 1604926742000,
"content_id": "9f994d76821da5996c3da0a0adc8275ae0e63235",
"detected_licenses": [
"MIT"
],
"directory_id": "491c2792631738ea48ee83f025c9e630e8b3b4b5",
"extension": "py",
"fi... | 2.65625 | stackv2 | import json
def main():
with open('source_file_2.json') as f:
data = json.load(f)
managers = {}
watcher = {}
for d in data:
project_name = d['name']
priority = d['priority']
for m in d['managers']:
if m not in managers.keys():
managers[m] = [... | 38 | 27.79 | 61 | 13 | 282 | python | [] | 0 | true | |
2024-11-19T01:55:33.438631+00:00 | 1,608,174,984,000 | 0cee99af5e6fb41f6ba4a1397736be6da7d1693e | 2 | {
"blob_id": "0cee99af5e6fb41f6ba4a1397736be6da7d1693e",
"branch_name": "refs/heads/master",
"committer_date": 1608174984000,
"content_id": "30d29dd1d33e5a0230c793e66e441d169a3285b9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "43e28c0cdb1ec319892d1da9fd31fad3c2d5c403",
"extension": "py"... | 2.5 | stackv2 | from multiplexifsimulator.models import SlideModelGeneric
phenotypes_to_channels = {
'TUMOR':'CYTOK (Opal 520)',
'T-CELL':'CD3 (Opal 540)',
'MACROPHAGE':'CD68 (Opal 650)'
}
binary_names_to_channels = {
'PDL1':'PDL1 (Opal 570)',
'PD1':'PD1 (Opal 620)',
'FOXP3':'FOXP3 (Opal 690)'
}
class SlideMo... | 211 | 37.02 | 107 | 15 | 1,893 | python | [] | 0 | true | |
2024-11-19T01:55:33.542426+00:00 | 1,469,643,197,000 | 95ccc2df520ebaa550e0b9f13243352236acca24 | 3 | {
"blob_id": "95ccc2df520ebaa550e0b9f13243352236acca24",
"branch_name": "refs/heads/master",
"committer_date": 1469643197000,
"content_id": "e5782ecfccc27e85662b5566603156a9cc9c4c69",
"detected_licenses": [
"MIT"
],
"directory_id": "c32e73cec3f469b1eefc0272781f3c5336c1e448",
"extension": "py",
"fi... | 3.03125 | stackv2 | import pygame
class Cell(object):
def __init__(self, col, row):
assert isinstance(col, int)
assert isinstance(row, int)
self.col, self.row = col, row
def __getitem__(self, key):
if 0 == key: return self.col
if 1 == key: return self.row
raise KeyError
def __setitem__(self, key, value):
if 0 == k... | 380 | 23.3 | 93 | 17 | 2,806 | python | [] | 0 | true | |
2024-11-19T01:55:33.604219+00:00 | 1,624,915,476,000 | 2460a9a97e133c6899acace985df06373a42f10f | 4 | {
"blob_id": "2460a9a97e133c6899acace985df06373a42f10f",
"branch_name": "refs/heads/main",
"committer_date": 1624915476000,
"content_id": "d7c125256a477a1f9482ca47e154822c69f29b84",
"detected_licenses": [
"MIT"
],
"directory_id": "a57def2cdde6249e658afc3022902dc83ab9761d",
"extension": "py",
"file... | 3.9375 | stackv2 | # Leia as informações de idades e alturas de 30 pessoas. Determine quantas pessoas com mais de 13 anos possuem altura inferior à média das alturas.
def leitorLista():
lista = list(map(int, input().split()))
return lista
def media(lista):
media = sum(lista) / len(lista)
return media
listaCompleta = ... | 30 | 24.23 | 147 | 14 | 221 | python | [] | 0 | true | |
2024-11-19T01:55:33.675316+00:00 | 1,616,457,198,000 | 4bdb0e70c28e726f7248105116cdc0e704091f28 | 5 | {
"blob_id": "4bdb0e70c28e726f7248105116cdc0e704091f28",
"branch_name": "refs/heads/master",
"committer_date": 1616457198000,
"content_id": "be33cdeabf511b9fe1248090337881b981c28864",
"detected_licenses": [
"MIT"
],
"directory_id": "7418e2fa816ad17e25e88e3cd4ce8aa8655c8230",
"extension": "py",
"fi... | 4.5625 | stackv2 | from typing import List
"""
Given an array where two neighboring elements are adjacent (in absolute
difference 1), can you write an algorithm to search an element in the array and
return its position? If the element appears multiple times, please return the
first occurrence.
For example, if given the array {4, 5, 6,... | 31 | 27.13 | 79 | 15 | 232 | python | [] | 0 | true | |
2024-11-19T02:06:40.316360+00:00 | 1,547,176,221,000 | 609bc2c84e4e6516223524d7223d496e893a6a0b | 4 | {
"blob_id": "609bc2c84e4e6516223524d7223d496e893a6a0b",
"branch_name": "refs/heads/master",
"committer_date": 1547176221000,
"content_id": "1f9d047663df9bafb0d7bac0ac0700df4d6a9a4a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9bb6cb21cb30236a97782f5ed9ec07eb8b67af41",
"extension": "py"... | 3.625 | stackv2 | import csv
import numpy as np
import emoji
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix
emoji_dictionary = {"0": "\u2764\uFE0F", # :heart: prints a black instead of red heart depending on the font
"1": ":baseball:",
"2": ":... | 210 | 33.5 | 131 | 19 | 1,780 | python | [] | 0 | true | |
2024-11-19T02:06:40.366593+00:00 | 1,692,763,715,000 | 82f8de338b393e5b20c9756548c8d2d0a6c78fa0 | 2 | {
"blob_id": "82f8de338b393e5b20c9756548c8d2d0a6c78fa0",
"branch_name": "refs/heads/master",
"committer_date": 1692763715000,
"content_id": "27a84f8f8c156119d3ed12b29bd25ce65737ea2d",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "1b78bd306b76d07362ada30b91ddd3a76dbe963e",
"extension": "p... | 2.3125 | stackv2 | import sys
import json
import time
import pprint
import logging
import requests
import ipaddress
import pandas as pd
import http.client as http_client
from IPython.display import display
from requests_oauthlib import OAuth2Session
from oauthlib.oauth2 import BackendApplicationClient, TokenExpiredError
pd.options.dis... | 205 | 42.5 | 107 | 20 | 1,819 | python | [] | 0 | true | |
2024-11-19T02:06:40.799448+00:00 | 1,522,483,693,000 | db807ee0d743ed2ed6be9b876e5edabede53ec22 | 3 | {
"blob_id": "db807ee0d743ed2ed6be9b876e5edabede53ec22",
"branch_name": "refs/heads/master",
"committer_date": 1522483693000,
"content_id": "8408a288c39d386c442a42d484ca861d61b2ed25",
"detected_licenses": [
"MIT"
],
"directory_id": "eea8f5ca7fbccc1683d0e8445bd0639af9b2e00c",
"extension": "py",
"fi... | 2.765625 | stackv2 | #!/usr/bin/env python
import sys
from cv2 import cv
def do_pyrdown(in_img, filter=cv.CV_GAUSSIAN_5x5):
# verify image is halvable
assert(in_img.width % 2 == 0 and in_img.height % 2 == 0)
out_img = cv.CreateImage((in_img.width/2, in_img.height/2), in_img.depth, in_img.nChannels)
cv.PyrDown(in_img, out_img, fi... | 45 | 20.4 | 93 | 12 | 295 | python | [] | 0 | true | |
2024-11-19T02:06:40.958713+00:00 | 1,689,350,260,000 | 4aba3dd8d5205e1e272ecd22703659878a1dd078 | 2 | {
"blob_id": "4aba3dd8d5205e1e272ecd22703659878a1dd078",
"branch_name": "refs/heads/master",
"committer_date": 1689350260000,
"content_id": "3e132a1176f4cbfbdb8e191700d30497dca6d392",
"detected_licenses": [
"MIT"
],
"directory_id": "f38b4c636a4a652460f220bf830a4ff29708c5cb",
"extension": "py",
"fi... | 2.5 | stackv2 | import numpy as np
import pandas as pd
import bioframe as bf
import cooler
from ..lib.checks import is_compatible_viewframe
def generate_adjusted_chunks(clr, view, chunksize=1_000_000, orientation_col="strand"):
"""Generates chunks of pixels from the cooler and adjusts their bin IDs to follow the view"""
vie... | 206 | 34.91 | 98 | 17 | 1,909 | python | [] | 0 | true | |
2024-11-19T02:06:41.018990+00:00 | 1,601,101,431,000 | 9ace3abacf31d9f7c36230d65c0dc21ad8f83d2c | 3 | {
"blob_id": "9ace3abacf31d9f7c36230d65c0dc21ad8f83d2c",
"branch_name": "refs/heads/master",
"committer_date": 1601101431000,
"content_id": "c5a872ee15f7ad5dd07762eecb5d1dedc257cce3",
"detected_licenses": [
"MIT"
],
"directory_id": "f2ced009d7ff91dae8af8d0243d218773bcd99c1",
"extension": "py",
"fi... | 2.6875 | stackv2 | from fastapi import FastAPI, File
from starlette.responses import Response
import io
from PIL import Image
import caption as cp
tokenizer = cp.get_tokenizer()
cp_model = cp.get_model()
app = FastAPI(title="Image Captioning Project",
description='''Obtain a brief caption from a image using "Show and tell... | 29 | 30.24 | 103 | 15 | 208 | python | [] | 0 | true | |
2024-11-19T02:06:41.083926+00:00 | 1,581,881,321,000 | 9f62b279e7fa46c460c8db5a31cd3f639088af00 | 3 | {
"blob_id": "9f62b279e7fa46c460c8db5a31cd3f639088af00",
"branch_name": "refs/heads/master",
"committer_date": 1581881321000,
"content_id": "a0dca0e95e1463b1d94540c4c6531de527b88e82",
"detected_licenses": [
"MIT"
],
"directory_id": "be0dc98761ccd534b77f9cd030b2b92886f8cd19",
"extension": "py",
"fi... | 2.9375 | stackv2 | from tkinter import Tk, Button, Entry, Label, IntVar, Checkbutton, Spinbox, Radiobutton, messagebox
def prikaziObavijest(vrijednost):
messagebox.showinfo("HELLO", "Pritisnuli ste tipku 'HELLO'"+str(vrijednost))
glavni = Tk()
oznaka = Label(glavni, text="Ime osobe:", relief="raised")
oznaka.pack()
unos = Entry(g... | 39 | 24.46 | 105 | 10 | 362 | python | [] | 0 | true | |
2024-11-19T02:06:41.287456+00:00 | 1,683,801,623,000 | c65ed4609f2bb0270610089a6618c1163237f552 | 3 | {
"blob_id": "c65ed4609f2bb0270610089a6618c1163237f552",
"branch_name": "refs/heads/master",
"committer_date": 1683801623000,
"content_id": "10ae3791a4e9077f45429996d3efcbc334e02c53",
"detected_licenses": [
"MIT"
],
"directory_id": "80c2703d6312634002ca516e27d0133b346ccffa",
"extension": "py",
"fi... | 2.671875 | stackv2 | """Support for the Dynalite channels as covers."""
import asyncio
from typing import TYPE_CHECKING
from .const import ATTR_POSITION, ATTR_TILT_POSITION, CONF_TEMPLATE, CONF_TIME_COVER
from .dynalitebase import DynaliteBaseDevice, DynaliteMultiDevice
from .light import DynaliteChannelLightDevice
from .switch import Dyn... | 264 | 39.15 | 104 | 17 | 2,347 | python | [] | 0 | true | |
2024-11-19T02:06:41.342782+00:00 | 1,635,952,195,000 | d1f16e6e6fe2c36612a474b5fb0b5f234f8a98dc | 3 | {
"blob_id": "d1f16e6e6fe2c36612a474b5fb0b5f234f8a98dc",
"branch_name": "refs/heads/main",
"committer_date": 1635952195000,
"content_id": "0bb15aca056843618453316d77bf367bdc06f1d0",
"detected_licenses": [
"MIT"
],
"directory_id": "86a3d291e0ac1e0a06a3c85dfb5b9051569dd70c",
"extension": "py",
"file... | 2.65625 | stackv2 | #add modules
from colorama import Fore, Back, Style
import pyfiglet
import requests
from bs4 import BeautifulSoup
import time
#print banner
banner = """
... | 160 | 31.26 | 93 | 13 | 1,193 | python | [] | 0 | true | |
2024-11-19T02:06:41.405827+00:00 | 1,628,719,419,000 | 9c18082e06712e15fb01c99d62ed6971cf2fd14f | 3 | {
"blob_id": "9c18082e06712e15fb01c99d62ed6971cf2fd14f",
"branch_name": "refs/heads/master",
"committer_date": 1628719419000,
"content_id": "34ca0a8c45bc7d4eb7cd4f7f6d57ec4dab0ce586",
"detected_licenses": [
"MIT"
],
"directory_id": "2109718910d81bd988902b675cedd77e21dffacf",
"extension": "py",
"fi... | 2.640625 | stackv2 | import private
# Extra functions which are used in more than one section of Charlie Cello
# Converts given string by removing unicode and leading/trailing whitespace and making all letters UPPERCASE
# REQUIRES A STRING INPUT
def roleFormat(s):
s = s.encode("ascii", "ignore").decode() # Remove unicode from K... | 45 | 45.09 | 108 | 17 | 465 | python | [] | 0 | true | |
2024-11-19T02:06:41.848327+00:00 | 1,561,234,794,000 | 2c32d30e54f37805cbce6cf07a0b243c2437b838 | 3 | {
"blob_id": "2c32d30e54f37805cbce6cf07a0b243c2437b838",
"branch_name": "refs/heads/master",
"committer_date": 1561234794000,
"content_id": "b9ae5e7807651280a0b2eeb5708a1a1f789e620d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9875c16196614c76e9ea17fa95ab8f460db90587",
"extension": "py"... | 2.546875 | stackv2 | # coding: utf-8
from getpass import getpass
from operator import itemgetter
import os
import urllib
import webbrowser
try:
# Python 3
import configparser
except ImportError:
# Python 2
import ConfigParser as configparser
import click
from tabulate import tabulate
from .lib.github3.api import authorize... | 494 | 35.68 | 79 | 21 | 3,704 | python | [] | 0 | true | |
2024-11-19T02:06:41.954352+00:00 | 1,603,986,869,000 | 82149b29bac0c322932b44c52207282f84a6bd0c | 3 | {
"blob_id": "82149b29bac0c322932b44c52207282f84a6bd0c",
"branch_name": "refs/heads/master",
"committer_date": 1603986869000,
"content_id": "2b1ab7604e646e643937f26ab20a5520a413fe41",
"detected_licenses": [
"MIT"
],
"directory_id": "a7371014698f3f29f9ad9f02dbaa01c253de341e",
"extension": "py",
"fi... | 2.59375 | stackv2 | import json
from statistics import mean
from itertools import chain
import numpy as np
from sklearn.metrics import precision_score
from sklearn.metrics import recall_score
from sklearn.metrics import f1_score
from sklearn.metrics import average_precision_score
from sklearn.metrics import label_ranking_average_precision... | 88 | 25.18 | 66 | 14 | 575 | python | [] | 0 | true | |
2024-11-19T02:06:42.170087+00:00 | 1,550,868,522,000 | 34d091e34cfa6ba2390fd22f1c9e26a872d384df | 3 | {
"blob_id": "34d091e34cfa6ba2390fd22f1c9e26a872d384df",
"branch_name": "refs/heads/master",
"committer_date": 1550868522000,
"content_id": "fc648a4af806f6c26110de959cd990f62ff697d5",
"detected_licenses": [
"BSD-2-Clause",
"BSD-3-Clause"
],
"directory_id": "6e2939b841c85a1371f779fe5fcd8936497cc328... | 2.953125 | stackv2 | #!/usr/bin/env python
## Program: PyNS
## Module: DofMap.py
## Language: Python
## Date: $Date: 2012/09/04 10:21:12 $
## Version: $Revision: 0.4.2 $
## Copyright (c) Simone Manini, Luca Antiga. All rights reserved.
## See LICENCE file for details.
## This software is distributed WITHOUT ANY WARRAN... | 88 | 36.75 | 122 | 21 | 778 | python | [] | 0 | true | |
2024-11-19T02:06:42.246402+00:00 | 1,613,094,511,000 | 33201fafad44198a808760bc1f16df20882d5bae | 3 | {
"blob_id": "33201fafad44198a808760bc1f16df20882d5bae",
"branch_name": "refs/heads/main",
"committer_date": 1613094511000,
"content_id": "5096bd8ef3df17c76e3af800bee35efa60b04f4d",
"detected_licenses": [
"MIT"
],
"directory_id": "d59772991c6235c1d8af4d76daa7d94b39918f18",
"extension": "py",
"file... | 2.515625 | stackv2 | import zipfile
import os
import subprocess
from pynput.keyboard import Key, Controller
import time
import ctypes
import struct
import random
import wave
import pyaudio
si = subprocess.STARTUPINFO()
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW
def play_sound(music_name):
chunk = 1024
f = wave.open(r"{}".for... | 109 | 27.5 | 138 | 16 | 786 | python | [] | 0 | true | |
2024-11-19T02:06:42.306209+00:00 | 1,535,174,562,000 | 9aa0cb6c58524236b9584c48375f685c4253dc65 | 3 | {
"blob_id": "9aa0cb6c58524236b9584c48375f685c4253dc65",
"branch_name": "refs/heads/master",
"committer_date": 1535174562000,
"content_id": "83fba1063a2823deea38a422fcee809ade82cc78",
"detected_licenses": [
"MIT"
],
"directory_id": "0a0c07b556f25e614f227c78a8ed1ea0de3e4f05",
"extension": "py",
"fi... | 2.71875 | stackv2 | import pprint
from itertools import count
from typing import Callable
import numpy as np
from .tensorboard_env_logger import TensorboardEnvLogger
class GymWrapper:
def __init__(self,
rl_alg_factory: Callable,
env_factory: Callable,
log_time_interval=5,
... | 75 | 35.09 | 124 | 15 | 568 | python | [] | 0 | true | |
2024-11-19T02:06:42.640441+00:00 | 1,527,915,296,000 | 4d76d20ccabac3441134ec1b9ffe7845813917b8 | 3 | {
"blob_id": "4d76d20ccabac3441134ec1b9ffe7845813917b8",
"branch_name": "refs/heads/master",
"committer_date": 1527915296000,
"content_id": "a221daa40eb5f6258dfd856b1326aa5fd3d130ef",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2085ed042e115bf64584ee7c6385bcbc700dc8a1",
"extension": "py"... | 2.90625 | stackv2 | from numpy import *
from numpy.random import *
import matplotlib.pyplot as plt
import pandas as pd
from .factor import *
set_printoptions(linewidth=1e99)
seed(0)
class Book:
def __init__(self, nb_contract=10):
# making
nb_contract = int(nb_contract)
age_start = uniform(20, 60, nb_contract)
gender = choice([... | 79 | 21.8 | 77 | 16 | 520 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9c84eb61d7be7a4f_b59823e7", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | |
2024-11-19T02:06:42.887455+00:00 | 1,586,177,832,000 | 0421e2fa587633edfc92df86fa9bdae298cc442a | 3 | {
"blob_id": "0421e2fa587633edfc92df86fa9bdae298cc442a",
"branch_name": "refs/heads/master",
"committer_date": 1586177832000,
"content_id": "1d2b9ebbda9aac290cbab373331c164100b895c3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5c42dacb395a9c55ae37f710b328b1d5d0b3555b",
"extension": "py"... | 2.5625 | stackv2 |
import asyncio
from asyncio.subprocess import PIPE
import re
import shlex
class ProcessError(Exception):
def __init__(self, args, proc):
self.args = args
self.proc = proc
def __str__(self):
try:
return self.proc.err
except UnicodeDecodeError:
return se... | 103 | 22.97 | 96 | 13 | 573 | python | [] | 0 | true | |
2024-11-19T02:06:43.046459+00:00 | 1,633,913,334,000 | b2212e47a0dea257d45aa8db59109992448791fd | 3 | {
"blob_id": "b2212e47a0dea257d45aa8db59109992448791fd",
"branch_name": "refs/heads/main",
"committer_date": 1633913334000,
"content_id": "b1e5ca54b5e4b40172519176b185160022ce5d8e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "23957050649a82a1be24f33b1a5fdd3ae03e45d8",
"extension": "py",
... | 2.65625 | stackv2 | """
a simple knowledge search web api server
knowledge converted from https://github.com/nikitavoloboev/knowledge/
each section of text is mapped to 512-D vector with 1G bytes U-S-E model
from tensorflow-hub
searched by nearest neighbor index
run> pyyhon knowledge_search.py
test> curl http://localhost:5000/api/q/what... | 82 | 27.38 | 90 | 17 | 546 | python | [] | 0 | true | |
2024-11-19T02:06:43.155613+00:00 | 1,453,098,672,000 | 063e6ca4d9243bf891e6d662eb1eaf68479e26c5 | 3 | {
"blob_id": "063e6ca4d9243bf891e6d662eb1eaf68479e26c5",
"branch_name": "refs/heads/master",
"committer_date": 1453098672000,
"content_id": "2325c2eee61528fa62d0b844ca26426daa120191",
"detected_licenses": [
"MIT"
],
"directory_id": "919c8137df9b8e80a3f28ce0d3552438938e280d",
"extension": "py",
"fi... | 2.59375 | stackv2 | # coding: utf-8
import os
import subprocess
def get_git_changeset(repo_dir):
'''
Copy from django
'''
"""Returns a numeric identifier of the latest git changeset.
The result is the UTC timestamp of the changeset in YYYYMMDDHHMMSS format.
This value isn't guaranteed to be unique, but colli... | 22 | 31.05 | 79 | 12 | 152 | python | [] | 0 | true | |
2024-11-19T02:06:43.305061+00:00 | 1,688,449,912,000 | 9d28d3ba43ff33fb65d237c978027159adf7dc47 | 3 | {
"blob_id": "9d28d3ba43ff33fb65d237c978027159adf7dc47",
"branch_name": "refs/heads/master",
"committer_date": 1688453376000,
"content_id": "2cf3c82574ed25fbf10fd6f56681e8994224bceb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3d7dece5254e42059e8a2cb1e72b295460284983",
"extension": "py"... | 2.828125 | stackv2 |
# -*- encoding: utf-8 -*-
'''
@File : main.py
@Description: 声音上云
@Author : victor.wang
@version : 1.0
'''
from ulinksdk.aliyunIoT import Device # iot组件是连接阿里云物联网平台的组件
import network # Wi-Fi功能所在库
import utime # 延时API所在组件
from driver import ADC ... | 218 | 24.41 | 113 | 13 | 1,717 | python | [] | 0 | true | |
2024-11-19T02:06:43.358441+00:00 | 1,624,366,384,000 | 199af2f49a5478dd4c8f2f4f751d0c0a3128c765 | 5 | {
"blob_id": "199af2f49a5478dd4c8f2f4f751d0c0a3128c765",
"branch_name": "refs/heads/master",
"committer_date": 1624366384000,
"content_id": "1384ccfe0b8ac0ad80a3daf3ee09365dede55f0e",
"detected_licenses": [
"MIT"
],
"directory_id": "6d065faa00868b47f597206b6e97c52cd4e0f262",
"extension": "py",
"fi... | 4.5625 | stackv2 | '''Exercício Python 72: Crie um programa que tenha uma tupla totalmente preenchida com uma contagem por extenso, de zero até vinte.
Seu programa deverá ler um número pelo teclado (entre 0 e 20) e mostrá-lo por extenso.'''
print('-='*10)
print('{:=^20}'.format('Desafio 72'))
print('-='*10)
tupla=('zero','um','dois','t... | 19 | 49.37 | 177 | 17 | 311 | python | [] | 0 | true | |
2024-11-19T02:06:43.545311+00:00 | 1,583,531,475,000 | 4d31100741adfe768bc60659dcbd243f66587889 | 2 | {
"blob_id": "4d31100741adfe768bc60659dcbd243f66587889",
"branch_name": "refs/heads/master",
"committer_date": 1583531475000,
"content_id": "d619d36d9ba965ef8e1cd928d6f55aeee6793413",
"detected_licenses": [
"MIT"
],
"directory_id": "c67b810927f2a6b66eebf94ca67967f2f8ba9141",
"extension": "py",
"fi... | 2.359375 | stackv2 | import argparse
def getArgs(argv=None):
parser = argparse.ArgumentParser(description="AE Model",)
parser.add_argument('--batch-size', type=int, default=150, metavar="N",
help="batch size for training")
parser.add_argument("--number-epochs", type=int, default=5, metavar="N",
... | 60 | 46.13 | 138 | 10 | 612 | python | [] | 0 | true | |
2024-11-19T02:06:44.117555+00:00 | 1,674,251,495,000 | 0a7f4c13499c56d9febad1592c855550d88c93d8 | 2 | {
"blob_id": "0a7f4c13499c56d9febad1592c855550d88c93d8",
"branch_name": "refs/heads/master",
"committer_date": 1674251495000,
"content_id": "dc407c0a65740ac1c369b57a6d233c82e26a5490",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6188f8ef474da80c9e407e8040de877273f6ce20",
"extension": "py"... | 2.375 | stackv2 | from dagster import Array, Bool, Field, In, Nothing, Out, Output, op
from .types import DbtOutput
from .utils import generate_events, generate_materializations
_DEFAULT_OP_PROPS = dict(
required_resource_keys={"dbt"},
ins={"start_after": In(Nothing)},
out=Out(DbtOutput, description="Parsed output from run... | 144 | 29.54 | 101 | 18 | 1,049 | python | [] | 0 | true | |
2024-11-19T02:06:44.170644+00:00 | 1,635,824,404,000 | 098928bcc9bf5d3d9ff141f8f84a96d995c7da83 | 4 | {
"blob_id": "098928bcc9bf5d3d9ff141f8f84a96d995c7da83",
"branch_name": "refs/heads/main",
"committer_date": 1635824404000,
"content_id": "8bdc746621a86845f81e66f7585298c7a0db5b08",
"detected_licenses": [
"MIT"
],
"directory_id": "9960c74a91d9f526fc4cb9f22463ad7610332bb7",
"extension": "py",
"file... | 4.3125 | stackv2 | # Refaça o desafio 035 dos triângulos, acrescentando o recurso
# de mostrar que tipo de triângulo será formado:
# - Equilátero
# - Isósceles
# - Escaleno
a = int(input('Lado A: '))
b = int(input('Lado B: '))
c = int(input('Lado C: '))
if a + b >= c and a + c >= b and b + c >= a:
if a == b == c:
print('\nT... | 19 | 26.58 | 62 | 12 | 189 | python | [] | 0 | true | |
2024-11-19T02:06:44.346440+00:00 | 1,545,452,004,000 | d38725462b04e064e12d859ca6b4d9e5d4fc0937 | 3 | {
"blob_id": "d38725462b04e064e12d859ca6b4d9e5d4fc0937",
"branch_name": "refs/heads/master",
"committer_date": 1545452004000,
"content_id": "475e494d9f9176b4b7c207b7554dd9e5f03954e6",
"detected_licenses": [
"MIT"
],
"directory_id": "2d56f12feeeef4c07d3acc4eab9dbf59919438f5",
"extension": "py",
"fi... | 2.875 | stackv2 | from utils import (
get_guard_periods,
lines_to_records,
read_input
)
def get_most_asleep_guard_on_same_minute(guard_periods):
return sorted(
[guard_id for guard_id in guard_periods.keys()],
key=lambda guard_id: max(guard_periods[guard_id])
)[-1]
if __name__ == '__main__':
re... | 27 | 25 | 76 | 13 | 162 | python | [] | 0 | true | |
2024-11-19T02:06:44.511377+00:00 | 1,624,692,730,000 | e13785abdf173c791bc14472cc7a0cb6178300fb | 3 | {
"blob_id": "e13785abdf173c791bc14472cc7a0cb6178300fb",
"branch_name": "refs/heads/master",
"committer_date": 1624692730000,
"content_id": "70a595794cd17f4a58b2b09be02ae7c02a1aa93c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7002554180a78d44ee87976722f67d69a867ba88",
"extension": "p... | 2.5625 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
import rospy
from sensor_msgs.msg import Image
from std_msgs.msg import Int32
from flock_msgs.msg import FlightData
import time
class telloLowBattery(object):
def __init__(self):
# Initialize ROS
rospy.init_node('raw_image_fps_calc', ... | 73 | 32.4 | 104 | 17 | 619 | python | [] | 0 | true | |
2024-11-19T02:06:44.552933+00:00 | 1,693,213,571,000 | 589e6dc70da6476f692fbef4e415eae1eb4e39aa | 3 | {
"blob_id": "589e6dc70da6476f692fbef4e415eae1eb4e39aa",
"branch_name": "refs/heads/master",
"committer_date": 1693213571000,
"content_id": "34e7ce8495333a80b832067d510d4ed40ce7cf9a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0b006ad8a6da2bd95defdd69dd26660c1ce12fd3",
"extension": "py"... | 2.640625 | stackv2 | import logging
import trp.trp2 as t2
from typing import List
from enum import Enum, auto
from trp.trp2 import TDocument, TDocumentSchema
import trp
class MergeOptions(Enum):
MERGE = auto()
LINK = auto()
class HeaderFooterType(Enum):
NONE = 0
NARROW = 0.5
NORMAL = 1
logger = logging.getLogger(_... | 126 | 37.76 | 118 | 23 | 1,127 | python | [] | 0 | true | |
2024-11-19T02:06:44.609591+00:00 | 1,616,979,993,000 | febdd865f19678bfef87fcc6e8239fd85c58ef96 | 5 | {
"blob_id": "febdd865f19678bfef87fcc6e8239fd85c58ef96",
"branch_name": "refs/heads/main",
"committer_date": 1616979993000,
"content_id": "c0736f3c652a6595123bdff2256a2c06cc9cb5de",
"detected_licenses": [
"MIT"
],
"directory_id": "e083b07c9204873e14061a3c58f8e6898314ece6",
"extension": "py",
"file... | 4.59375 | stackv2 | # Tabuada genérica com break
print('*' * 50)
print()
print('{:^50}'.format('Jogo da Tabuada'))
print()
print('*' * 50)
print()
while True:
num = int(input('Escolha um número inteiro: '))
if num < 0:
break
print()
op = input('Escolha a tabuada que você quer ( + * / ): ')
print()
print('*'... | 28 | 33.46 | 92 | 19 | 311 | python | [] | 0 | true | |
2024-11-19T02:06:44.670517+00:00 | 1,692,943,115,000 | 7028a5d53970da5ecf5021a20146dca16f4ebd9f | 3 | {
"blob_id": "7028a5d53970da5ecf5021a20146dca16f4ebd9f",
"branch_name": "refs/heads/master",
"committer_date": 1692943115000,
"content_id": "b07e94ea8b9d8e46b2db71d5f017ed806442b373",
"detected_licenses": [
"MIT"
],
"directory_id": "95565f3fee911c3c778cf86073351590c9fffe34",
"extension": "py",
"fi... | 3.03125 | stackv2 | import numpy as np
from .per import TorchPER
class TorchPSER(TorchPER):
"""
An implementation of Prioritized Sequence Experience Replay using torch.
https://arxiv.org/pdf/1905.12726.pdf
"""
def __init__(self, capacity: int, alpha: float, beta: float,
beta_increment: float, epsilon... | 60 | 36.77 | 79 | 16 | 490 | python | [] | 0 | true | |
2024-11-19T02:06:44.723086+00:00 | 1,628,518,605,000 | 612ca5b1a51ac131aa907f4a0f107bb6c4b38432 | 2 | {
"blob_id": "612ca5b1a51ac131aa907f4a0f107bb6c4b38432",
"branch_name": "refs/heads/main",
"committer_date": 1628518605000,
"content_id": "2bfbcb2e5cdb93f70121f03025e42ccbced7969f",
"detected_licenses": [
"MIT"
],
"directory_id": "dd37c6ea535b8795915987db0f6a49eac71ef8a0",
"extension": "py",
"file... | 2.421875 | stackv2 | from pyexplain.solvers.params import COusParams
from pyexplain.explain.ocus_explain import OCUSExplain
from pyexplain.utils.utils import cost_puzzle
from pysat.formula import CNF
from cppy import cnf_to_pysat
from cppy import *
from cppy.model_tools.to_cnf import *
#%% Problem building!
# Initialisation of the prob... | 117 | 31.82 | 136 | 11 | 1,192 | python | [] | 0 | true | |
2024-11-19T02:06:44.772704+00:00 | 1,558,586,602,000 | 86c75df924f8c827985aa10a8314b795877c0f81 | 3 | {
"blob_id": "86c75df924f8c827985aa10a8314b795877c0f81",
"branch_name": "refs/heads/master",
"committer_date": 1558586602000,
"content_id": "1277953a20b8d003c3b5f9cda8b7a5cedc13dac9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1b673b18d7a0746247ea0be10119998c9c50c28f",
"extension": "py"... | 3.265625 | stackv2 | def avg_damage(ac, n_d6, prof, mod, base_damage):
'''ac: Armor Class
n_d6: number of d6 dice for rogue's sneak attack
prof: proficiency bonus, starts with +2 and gets larger as levels go up
mod: dexerity modifier (+3 in my case)
base_damage: base damage of the weapon (my rapier and longbow both do 1d8 base damage s... | 33 | 48.15 | 98 | 12 | 506 | python | [] | 0 | true | |
2024-11-19T02:06:44.947760+00:00 | 1,584,193,876,000 | db077d064240fd406495fc56dd4eee40e4db416e | 2 | {
"blob_id": "db077d064240fd406495fc56dd4eee40e4db416e",
"branch_name": "refs/heads/master",
"committer_date": 1584193876000,
"content_id": "05fa453d1a77d14cfba6ed18d1444917809d5048",
"detected_licenses": [
"MIT"
],
"directory_id": "3c5835812c8232296954f701937e902f92a62b7b",
"extension": "py",
"fi... | 2.390625 | stackv2 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
qgridder_utils_plot.py
Qgridder - A QGIS plugin
This file gathers functions which facilitate pre- and post-processing of
spatially distributed numerical models based on Qgridder ... | 98 | 27.52 | 103 | 10 | 624 | python | [] | 0 | true | |
2024-11-19T02:06:45.000073+00:00 | 1,693,107,261,000 | 116ef7a032b763da43a105fb1ad8d19b1a6ca9be | 3 | {
"blob_id": "116ef7a032b763da43a105fb1ad8d19b1a6ca9be",
"branch_name": "refs/heads/master",
"committer_date": 1693107261000,
"content_id": "62ea69470d691143a54b140673253043079e13f7",
"detected_licenses": [
"MIT"
],
"directory_id": "d20ddfa39d6cd7537ca8c2d6f9b52ffe6eb7db90",
"extension": "py",
"fi... | 2.625 | stackv2 | import re
import time
from copy import copy
from os import environ
from rich import print
import openai
from .base_translator import Base
PROMPT_ENV_MAP = {
"user": "BBM_CHATGPTAPI_USER_MSG_TEMPLATE",
"system": "BBM_CHATGPTAPI_SYS_MSG",
}
class ChatGPTAPI(Base):
DEFAULT_PROMPT = "Please help me to tran... | 301 | 30.85 | 140 | 19 | 2,100 | python | [] | 0 | true | |
2024-11-19T02:06:45.170696+00:00 | 1,583,324,041,000 | 301aff0dcd09747a3bca41625e22a59d4ff61548 | 3 | {
"blob_id": "301aff0dcd09747a3bca41625e22a59d4ff61548",
"branch_name": "refs/heads/master",
"committer_date": 1583324041000,
"content_id": "212a2a5506dadffa9f8dcc733137d1effe4ebf3c",
"detected_licenses": [
"MIT"
],
"directory_id": "078bffe3605b2818dece7d396d18e34029c30cac",
"extension": "py",
"fi... | 2.53125 | stackv2 | import sys
import test_framework as tf
error = False
if len(sys.argv) > 1:
mod = sys.argv[1]
if mod == "test":
alg_list = tf.test_kernel_knn_algs()
datasets = tf.test_datasets()
elif mod == "small":
alg_list = tf.kernel_knn_algs()
datasets = tf.small_datasets()
elif m... | 54 | 29.2 | 82 | 11 | 401 | python | [] | 0 | true | |
2024-11-19T02:06:45.254346+00:00 | 1,686,024,574,000 | 92781f80504cc14f6cabfc83b402ddd85b387b33 | 3 | {
"blob_id": "92781f80504cc14f6cabfc83b402ddd85b387b33",
"branch_name": "refs/heads/main",
"committer_date": 1686024574000,
"content_id": "bf0612c6940cd52994342cadf3a28e3873973f18",
"detected_licenses": [
"MIT"
],
"directory_id": "6ffff754ac29a23f59a119bf26bc8e794b0c2388",
"extension": "py",
"file... | 2.53125 | stackv2 | import subprocess
from io import StringIO
import re
import textwrap
import util
import argparse
# Parse arguments
parser = argparse.ArgumentParser(description='Analyze .a file or the executable file in .framework to generate macro '
'definitions for the symbols that need to... | 106 | 46.89 | 123 | 17 | 1,247 | python | [] | 0 | true | |
2024-11-19T02:06:45.707983+00:00 | 1,573,035,542,000 | 731fcd19f1b5de3dfa80e92cf21823f9acd98104 | 3 | {
"blob_id": "731fcd19f1b5de3dfa80e92cf21823f9acd98104",
"branch_name": "refs/heads/master",
"committer_date": 1573035542000,
"content_id": "e59d6690163c40d07418009683fc7ff47e15a659",
"detected_licenses": [
"MIT"
],
"directory_id": "fe90e123997b5a7ec3bf85927b84723239dbf379",
"extension": "py",
"fi... | 3.046875 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Sat Aug 18 19:15:48 2018
@author: Rony Sulca
"""
#### Importing Libraries ####
import pandas as pd
import numpy as np
import seaborn as sn
import matplotlib.pyplot as plt
import time
dataset = pd.read_csv('new_appdata10.csv')
#### Data Pre-Processing ####
# Splitting Indepe... | 139 | 30.94 | 101 | 13 | 1,209 | python | [] | 0 | true | |
2024-11-19T02:06:45.818312+00:00 | 1,543,241,341,000 | 7ac275ac1e636c3014b03cc95d4baf47215d9c5e | 2 | {
"blob_id": "7ac275ac1e636c3014b03cc95d4baf47215d9c5e",
"branch_name": "refs/heads/master",
"committer_date": 1543241341000,
"content_id": "b6b4615fea470cffcc2c1ad25b6d384ccce2e269",
"detected_licenses": [
"MIT"
],
"directory_id": "a49e31fb56e989c9ffa118bd38bd51426169990e",
"extension": "py",
"fi... | 2.40625 | stackv2 | #!/usr/bin/python3
from feature_swarm import FeatureSwarm
from util import *
np.random.seed(1337)
# PARAMETERS
##########################
# KERNELS FOR DIFFERENT OPERATIONS
# not all of them are currently being used
kernel_opening = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (2, 2))
kernel_closing = cv2.getStructu... | 238 | 38.58 | 120 | 18 | 2,712 | python | [] | 0 | true | |
2024-11-19T02:06:46.069908+00:00 | 1,637,448,315,000 | f5022ddda9cb079272ad383202f0cba667fd921d | 2 | {
"blob_id": "f5022ddda9cb079272ad383202f0cba667fd921d",
"branch_name": "refs/heads/main",
"committer_date": 1637448315000,
"content_id": "e24e5b689ffdee06d9f2f0d37062024f6d6e572d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3daf750fbdd0331fffb7f29f7db9afc38ff88e77",
"extension": "py",
... | 2.390625 | stackv2 | import torch
from detectron2.layers import (
ShapeSpec,
)
from detectron2.modeling import Backbone, BACKBONE_REGISTRY, FPN
from detectron2.modeling.backbone.fpn import LastLevelMaxPool
from .models.coat import coat_tiny, coat_mini, coat_lite_tiny, coat_lite_mini, coat_lite_small
__all__ = [
"build_coat_fpn_... | 120 | 35.31 | 128 | 15 | 1,215 | python | [] | 0 | true | |
2024-11-19T02:06:46.269307+00:00 | 1,389,640,853,000 | 2314ade426ddbefccf153154c6b5ac2fa17d9615 | 2 | {
"blob_id": "2314ade426ddbefccf153154c6b5ac2fa17d9615",
"branch_name": "refs/heads/master",
"committer_date": 1389640853000,
"content_id": "a72f6e3895601162815ab839cdc896be9e96afa5",
"detected_licenses": [
"MIT"
],
"directory_id": "98495626772524157fadf4721d6799bcdeafb551",
"extension": "py",
"fi... | 2.46875 | stackv2 | import imaplib
from email.parser import HeaderParser
from django.conf import settings
def get_emails():
conn = imaplib.IMAP4('imap.mailgun.org')
conn.login('the-machine@mechanicalmooc.org', settings.MAILBOX_PASSWORD)
conn.select()
conn.search(None, 'ALL') # returns a nice list of messages...
data ... | 24 | 29.88 | 75 | 12 | 191 | python | [] | 0 | true | |
2024-11-19T02:06:46.465677+00:00 | 1,567,753,650,000 | 6b66882e8ad8fd6331e478e096a32420dce824ce | 2 | {
"blob_id": "6b66882e8ad8fd6331e478e096a32420dce824ce",
"branch_name": "refs/heads/master",
"committer_date": 1567753650000,
"content_id": "50281798af3f14a44e0a067af34d99cb3a626d86",
"detected_licenses": [
"MIT"
],
"directory_id": "87f93e889809dee0b599986ccbafc4958f595d20",
"extension": "py",
"fi... | 2.421875 | stackv2 | import os
import click
from ..cli import cli, pass_runtime
@cli.command()
@click.argument('name')
@click.option('--path', help='Project path')
@click.option('--framework', type=click.Choice(['laravel', 'rails']), default='laravel', help='Project framework')
@pass_runtime
def new(runtime, name, path, framework):
"... | 22 | 28.68 | 114 | 13 | 151 | python | [] | 0 | true | |
2024-11-19T02:06:46.525179+00:00 | 1,631,074,908,000 | 2492765dd84a3de79a5a287e25502f4cc8e42ae3 | 3 | {
"blob_id": "2492765dd84a3de79a5a287e25502f4cc8e42ae3",
"branch_name": "refs/heads/main",
"committer_date": 1631074908000,
"content_id": "c6e20dba810f2ad622a883c3bb103a52c07d5743",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "ff90106e397d1f445356a023c9b3f40fb31b0867",
"extension": "py",
"... | 2.625 | stackv2 | # bibliotecas
import pandas as pd
import psycopg2 as pg
# módulos externos
from decouple import config
from sqlalchemy import create_engine
from datetime import datetime
class Database:
""" Classe para operação do banco de dados. """
_host = config('DB_HOST')
_name = config('DB_NAME')
_user = config(... | 107 | 31.2 | 105 | 15 | 805 | python | [] | 0 | true | |
2024-11-19T02:06:46.640428+00:00 | 1,578,139,534,000 | 23f3e9c3a294997b495d48ebc3f28dc1ef7d897d | 3 | {
"blob_id": "23f3e9c3a294997b495d48ebc3f28dc1ef7d897d",
"branch_name": "refs/heads/master",
"committer_date": 1578139534000,
"content_id": "9c6c99bc20eed8cf98f7e428ccadc1a6f9431442",
"detected_licenses": [
"MIT"
],
"directory_id": "bbaf630b62dfe9a0d27e3ff3ccddc80b9df08f50",
"extension": "py",
"fi... | 3.15625 | stackv2 | import copy
from collections import deque
import random
import datetime
print("Enter the number of your Choice:\n1-Solve Matrix From File\n2-Random Matrix\n3-Full Random")
num=int(input(">>>"))
if num==1:
f = open("E:\\Uni\Maze\Maze","r")
n=int(f.readline())
print(n)
matrix=[[0]*n for i in range(n)]
... | 257 | 33.78 | 153 | 18 | 2,772 | python | [] | 0 | true | |
2024-11-19T02:06:46.700416+00:00 | 1,464,725,479,000 | 6314562e8b007bd9268854a6fdb137df8c37885c | 2 | {
"blob_id": "6314562e8b007bd9268854a6fdb137df8c37885c",
"branch_name": "refs/heads/master",
"committer_date": 1464725479000,
"content_id": "fd3d5857661917fa06fac7d92823b70c5af8d233",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "e39b8a958c474f0b48ce263a930a7b3f49b05619",
"extension": "p... | 2.453125 | stackv2 | from __future__ import print_function
import requests
import socket
import time
KEY = socket.gethostname() + "/time"
URL = "http://10.232.106.230:8500/v1/kv/" + KEY
tlocal = time.localtime()
while True:
put_data = '{}'.format(time.asctime(tlocal))
# Put data on consul server
put = requests.put(URL, put_... | 20 | 18.55 | 48 | 10 | 118 | python | [] | 0 | true | |
2024-11-19T02:06:46.935082+00:00 | 1,522,974,156,000 | dfd89f495172351125e52b28fe39e5915f32775c | 3 | {
"blob_id": "dfd89f495172351125e52b28fe39e5915f32775c",
"branch_name": "refs/heads/master",
"committer_date": 1522974156000,
"content_id": "605d22d88b076a267352cb6873a7f0e4244bd263",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c1ecc4856455831570805577f25222c8278b59f5",
"extension": "py"... | 2.96875 | stackv2 | # coding:utf-8
"""
TokenStream represents a stream of tokens that a parser will consume.
TokenStream can be used to consume tokens, peek ahead, and synchonize to a
delimiter token. The tokens that the token stream operates on are either
compiled regular expressions or strings.
"""
import re
LBRACKET = '<'
AT_SYMBO... | 160 | 33.34 | 82 | 16 | 1,184 | python | [] | 0 | true | |
2024-11-19T02:06:47.347768+00:00 | 1,626,377,531,000 | d4eb9476101a75cbc93e1ce09da0b554a740c2b4 | 2 | {
"blob_id": "d4eb9476101a75cbc93e1ce09da0b554a740c2b4",
"branch_name": "refs/heads/master",
"committer_date": 1626377531000,
"content_id": "91ec5547549ec09b598420cb936a690232d4a997",
"detected_licenses": [
"MIT"
],
"directory_id": "1517853a6443a47b9cb73e8b8093ff71ff7980de",
"extension": "py",
"fi... | 2.4375 | stackv2 | import pickle
import haiku as hk
import jax
import jax.numpy as jnp
from .utils import make_conv, maybe_hk_dropout, PmeanBatchNormWithoutState, torch_conv_kernel_to_hk
def load_lpips(config, vgg_func, vgg_params, weights_location='weights/lpips.pkl'):
with open(weights_location, 'rb') as f:
pretrained_we... | 119 | 32.69 | 109 | 15 | 1,029 | python | [] | 0 | true | |
2024-11-19T02:06:48.192953+00:00 | 1,681,632,237,000 | 8c5752f777a054899c35ffbbc3afd88ab54f7381 | 3 | {
"blob_id": "8c5752f777a054899c35ffbbc3afd88ab54f7381",
"branch_name": "refs/heads/master",
"committer_date": 1681632237000,
"content_id": "f14c71fa16fb50cb4a18a5a8265a66ce6dea6a7c",
"detected_licenses": [
"Unlicense"
],
"directory_id": "1bb8bea68052cb7a29b09494d0697f907bb7e6f3",
"extension": "py",... | 2.609375 | stackv2 | """Version utils."""
from __future__ import annotations
from functools import lru_cache
from typing import TYPE_CHECKING
from awesomeversion import (
AwesomeVersion,
AwesomeVersionException,
AwesomeVersionStrategy,
)
if TYPE_CHECKING:
from ..repositories.base import HacsRepository
@lru_cache(maxsiz... | 58 | 33.1 | 87 | 14 | 380 | python | [] | 0 | true | |
2024-11-19T02:06:48.418436+00:00 | 1,598,896,814,000 | 4fca23ff2e13c1db4d71574d482c1933f5307bd1 | 3 | {
"blob_id": "4fca23ff2e13c1db4d71574d482c1933f5307bd1",
"branch_name": "refs/heads/master",
"committer_date": 1600024701000,
"content_id": "03871ad9a8fed90f27851e3584f147c0e45ecd1c",
"detected_licenses": [
"MIT"
],
"directory_id": "00155c22e8c083188294e1c681cd8b7d7b5565ba",
"extension": "py",
"fi... | 2.6875 | stackv2 | #!/usr/bin/env python3
__version__ = '0.1.0'
__author__ = 'https://md.land/md'
import datetime
import math
import os
import re
import sys
import typing
import json
# Entity
class Day:
def __init__(self, date: datetime.date, entry_list: typing.List['Entry']):
self.date: datetime.date = date
self... | 309 | 32.83 | 119 | 25 | 2,479 | python | [] | 0 | true | |
2024-11-19T02:06:48.465573+00:00 | 1,551,347,953,000 | 5856d85cfbc4373ee130cf0477cf1a48aa12733a | 2 | {
"blob_id": "5856d85cfbc4373ee130cf0477cf1a48aa12733a",
"branch_name": "refs/heads/master",
"committer_date": 1551347953000,
"content_id": "2400b20597601917f9de7a631e86abccd71f0402",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "094a82883b0f4490dbca6c042e129faf0593d7bc",
"extension": "py"... | 2.34375 | stackv2 | import datetime
from influxdb import InfluxDBClient, SeriesHelper
from thingflow.base import OutputThing, InputThing, FatalError
# class BulkUploader(SeriesHelper):
# def __new__(self, client, msg_format, bulk_size=10):
# self.client = client
# self.msg_format = msg_format
# self.bulk_size... | 156 | 40.42 | 127 | 16 | 1,361 | python | [] | 0 | true | |
2024-11-19T02:06:48.699416+00:00 | 1,573,208,116,000 | 524f6d2538b98c4269b904ccadfb3dd55e491838 | 3 | {
"blob_id": "524f6d2538b98c4269b904ccadfb3dd55e491838",
"branch_name": "refs/heads/master",
"committer_date": 1573208116000,
"content_id": "40c832a78729b632dede7a81859f82a5e3198b0a",
"detected_licenses": [
"MIT"
],
"directory_id": "657755b9ce45eb1e1d13368bb1441e804eff8389",
"extension": "py",
"fi... | 2.578125 | stackv2 | # Author: Aditya Arora, adityaarora@ekstepplus.org
import gensim as gs
import os
import numpy as np
import codecs
import re
import numpy as np
import argparse #Accept commandline arguments
import logging #Log the data given
from nltk.corpus import stopwords
#Using utility functions
root=os.path.dirname(os.path.abspat... | 87 | 33.97 | 127 | 19 | 780 | python | [] | 0 | true | |
2024-11-19T02:06:52.859906+00:00 | 1,522,313,801,000 | 809c1cd3b851de9c3a711743e56690518019c916 | 4 | {
"blob_id": "809c1cd3b851de9c3a711743e56690518019c916",
"branch_name": "refs/heads/master",
"committer_date": 1522313801000,
"content_id": "9de5d681df2124610e4df83483ad5e4ad78ee72d",
"detected_licenses": [
"MIT"
],
"directory_id": "1c96fbe22e76e5bb180c4316c10136dff349ac19",
"extension": "py",
"fi... | 4.15625 | stackv2 | # -*- coding:utf-8 -*-
# 生成器,要数据的时候返回数据,不要数据的时候不返回是生成器的特征
# python 3 中可以用return 返回一个值,
# python 2 中只能return 不能返回值
"""
for...in...循环的本质
for item in Iterable 循环的本质就是先通过iter()函数获取可迭代对象Iterable的迭代器,
然后对获取到的迭代器不断调用next()方法来获取下一个值并将其赋值给item,当遇到StopIteration的异常后循环结束。
"""
# list = [x for x in range(100)] # 列表推导式
# a = (x fo... | 71 | 23.49 | 140 | 13 | 687 | python | [] | 0 | true | |
2024-11-19T02:06:52.908348+00:00 | 1,628,605,408,000 | 0e221cc23e5a6cc17231f6fa9ffa2d29f478fbb0 | 3 | {
"blob_id": "0e221cc23e5a6cc17231f6fa9ffa2d29f478fbb0",
"branch_name": "refs/heads/main",
"committer_date": 1628605408000,
"content_id": "b8a0715cf6b676eb9bfe115a8828dc0e096c5677",
"detected_licenses": [
"MIT"
],
"directory_id": "f9b60792fcfff7caada3dfe657d265876fa7caf2",
"extension": "py",
"file... | 2.53125 | stackv2 | import os
import glob
import numpy as np
from nibabel import load, save, Nifti1Image
minc_list = glob.glob("./*.mnc")
minc_list.sort()
for minc_path in minc_list:
print(minc_path)
minc_file = load(minc_path)
minc_name = os.path.basename(minc_path)[7:9]
affine = np.array([[0, 0, 1, 0],
... | 33 | 26.88 | 52 | 10 | 341 | python | [] | 0 | true | |
2024-11-19T02:06:53.027686+00:00 | 1,554,640,247,000 | 52a73e6c050a13a6cff8023dafc781451cb44a7d | 3 | {
"blob_id": "52a73e6c050a13a6cff8023dafc781451cb44a7d",
"branch_name": "refs/heads/master",
"committer_date": 1554640247000,
"content_id": "9f1ac212728cba33eacd86424b1ebce6d63b63e6",
"detected_licenses": [
"MIT"
],
"directory_id": "0f6f4e61699bfb356b58b0b0578af697f422ff89",
"extension": "py",
"fi... | 2.953125 | stackv2 | """
Script to get GitHub profile data of all Stargazers of a given GitHub repository
by Max Woolf (@minimaxir)
"""
import json
import csv
import time
import requests
def call_github_get_api(url, headers=None):
response = requests.get(url=url, headers=headers)
data = json.loads(response.text)
return data... | 122 | 30.42 | 114 | 16 | 861 | python | [] | 0 | true | |
2024-11-19T02:06:53.131827+00:00 | 1,546,034,850,000 | 4166eb266aa57d2472a4bdb5d8208773a0cca571 | 3 | {
"blob_id": "4166eb266aa57d2472a4bdb5d8208773a0cca571",
"branch_name": "refs/heads/master",
"committer_date": 1546034850000,
"content_id": "b92ac15421b431f33dd5d0348e6b27bbde0ec60e",
"detected_licenses": [
"MIT"
],
"directory_id": "cba5c119d881d29344a52ee0fdd1913757a942d0",
"extension": "py",
"fi... | 2.53125 | stackv2 | from tensorflow.keras.models import load_model
import cv2
import numpy as np
from PIL import ImageGrab
import keyboard
cv2.namedWindow('image', cv2.WINDOW_NORMAL)
cv2.resizeWindow('image', 600, 600)
model = load_model('final.h5')
tick = 0
while 1:
scr = np.array(ImageGrab.grab(bbox=(175, 315, 775, 450)))
cv2... | 34 | 26.88 | 68 | 12 | 329 | python | [] | 0 | true | |
2024-11-19T02:06:53.193579+00:00 | 1,687,183,030,000 | 7d84602f2936c6cba8b242142d1b6ea6add0c1b2 | 2 | {
"blob_id": "7d84602f2936c6cba8b242142d1b6ea6add0c1b2",
"branch_name": "refs/heads/master",
"committer_date": 1687183030000,
"content_id": "9482b0775c9374a21b18236b6f1f12f1095bd7e8",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "aa5f04664423449f7f8fabbb1c400cd76b0fb4f8",
"extension": "p... | 2.375 | stackv2 | # -*- coding: utf-8 -*-
from django import forms
from ..models import Parameter
from physical.configurations import configuration_exists
class ParameterForm(forms.ModelForm):
class Meta:
model = Parameter
def clean(self):
cleaned_data = super(ParameterForm, self).clean()
name = clean... | 21 | 31.05 | 102 | 15 | 128 | python | [] | 0 | true | |
2024-11-19T02:06:53.245678+00:00 | 1,666,460,444,000 | 459d7822f3cde8e0b985018203cdafa8ff116799 | 2 | {
"blob_id": "459d7822f3cde8e0b985018203cdafa8ff116799",
"branch_name": "refs/heads/master",
"committer_date": 1666460444000,
"content_id": "a8524b132b31850e8dedfc2e443664fee419ebf4",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "98bef7fe17f1813082e086e1cfade1ab6c67fec5",
"extension": "p... | 2.453125 | stackv2 | import os
import re
from datetime import datetime, timedelta
from typing import List, Set, Union
from bs4 import BeautifulSoup
from selenium import webdriver
from time import sleep
from selenium.webdriver.firefox.webdriver import WebDriver as Firefox
from selenium.webdriver.chrome.webdriver import WebDriver as Chrome
f... | 181 | 34.09 | 118 | 21 | 1,461 | python | [] | 0 | true | |
2024-11-19T02:06:53.717778+00:00 | 1,664,707,944,000 | f8477385444d4abb604b59ccf68cd00ef53dbe66 | 3 | {
"blob_id": "f8477385444d4abb604b59ccf68cd00ef53dbe66",
"branch_name": "refs/heads/master",
"committer_date": 1664707944000,
"content_id": "35071e5ee2ae3beadaa74b6aa75d118bfc26de9a",
"detected_licenses": [
"MIT"
],
"directory_id": "eaf03031d85bb61af3fa102d9dc8d3f12fa42585",
"extension": "py",
"fi... | 2.625 | stackv2 | import os
import pandas as pd
module_path = os.path.abspath(os.path.dirname(__file__))
data_dir = os.path.join(module_path, "..", "..", "..", "data")
gapminder_path = os.path.join(data_dir, "Gapminder_All_Time.csv")
class PathMixin:
def __init__(self):
self.data_dir = data_dir
self.gapminder_path... | 19 | 33.11 | 86 | 14 | 170 | python | [] | 0 | true | |
2024-11-19T02:06:53.778298+00:00 | 1,513,892,006,000 | 99939ecaf87d0d5fa95e0d1304305fba4875f64b | 2 | {
"blob_id": "99939ecaf87d0d5fa95e0d1304305fba4875f64b",
"branch_name": "refs/heads/master",
"committer_date": 1513892006000,
"content_id": "2ab17df5be7ea299688f51fa429e43ee8fe13e17",
"detected_licenses": [
"MIT"
],
"directory_id": "7924d58f5340f197e4bf17a26d9b8ebb4b378e75",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/python
import sys
import wx
import update_comms_settings
import subprocess
import auto_detect_rpi
x=25
def send_bash_command(bashCommand):
process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) #, stderr=subprocess.PIPE)
output = process.communicate()[0]
return output
class line_sensor_... | 137 | 38.99 | 170 | 17 | 1,319 | python | [] | 0 | true | |
2024-11-19T02:06:53.846458+00:00 | 1,431,013,851,000 | ed306ec44e63a2cd402f099a1ca49afe8bb652e7 | 2 | {
"blob_id": "ed306ec44e63a2cd402f099a1ca49afe8bb652e7",
"branch_name": "refs/heads/master",
"committer_date": 1431013851000,
"content_id": "40ddf6d5e8fe7d369c3d2241d3997bd76342e6bf",
"detected_licenses": [
"MIT"
],
"directory_id": "e03142c76913adf8439248270a007271025bc591",
"extension": "py",
"fi... | 2.328125 | stackv2 | from monte.runtime.base import MonteObject, toString, toQuote, throw
from monte.runtime.data import String
from monte.runtime.guards.base import deepFrozenGuard
from monte.runtime.guards.data import twineGuard
from monte.runtime.guards.tables import listGuard
class M(MonteObject):
_m_fqn = "M"
_m_auditorStamps... | 35 | 29.74 | 68 | 13 | 273 | python | [] | 0 | true | |
2024-11-19T02:06:53.954306+00:00 | 1,666,015,927,000 | 0a6bf2652548620332d3e10a5a09004d1759d810 | 3 | {
"blob_id": "0a6bf2652548620332d3e10a5a09004d1759d810",
"branch_name": "refs/heads/master",
"committer_date": 1666015927000,
"content_id": "2100347dd8f9e793925985de7c93508bb2d0eaf7",
"detected_licenses": [
"MIT"
],
"directory_id": "e08d1ad5683c08b226378dfa926a1c6b22882bd5",
"extension": "py",
"fi... | 2.671875 | stackv2 | import pandas as pd
from utils import write_data
def build_dataframe(url, return_dates=False):
df = pd.read_csv(url)
df.drop(df.columns[:4], axis=1, inplace=True)
series = df.sum().astype(str)
if return_dates:
dates = [date[:-3] for date in series.index]
return series.values.astype(flo... | 42 | 37.79 | 176 | 12 | 395 | python | [] | 0 | true | |
2024-11-19T02:06:54.010420+00:00 | 1,613,028,844,000 | 825a8849bb7c99a1b5311f3d0fdf4894fea542d1 | 3 | {
"blob_id": "825a8849bb7c99a1b5311f3d0fdf4894fea542d1",
"branch_name": "refs/heads/main",
"committer_date": 1613028844000,
"content_id": "8d8a1704f0a8cfea95f3726f7f5423f07042497d",
"detected_licenses": [
"MIT"
],
"directory_id": "47b5f83b36ee411e09a2c776c148aa9c35938b3b",
"extension": "py",
"file... | 3.21875 | stackv2 | import re
def get_data():
data = []
data_file = open("test.txt")
rules = {}
messages = []
type = 0
for val in data_file:
if (val.strip() == ''):
type = 1
continue
if type == 0:
# process rules
rule_data = val.strip().split(': '... | 167 | 22.92 | 83 | 19 | 1,033 | python | [] | 0 | true | |
2024-11-19T02:06:54.359108+00:00 | 1,556,949,528,000 | fed6358ad887a854bb0459fd4fbace624dc38513 | 3 | {
"blob_id": "fed6358ad887a854bb0459fd4fbace624dc38513",
"branch_name": "refs/heads/master",
"committer_date": 1556949528000,
"content_id": "3333c980a59c24e23d93772ca6a9aa2b10f89505",
"detected_licenses": [
"MIT"
],
"directory_id": "1f4505ed66f4fd68c6d1edf18ecff58362742fad",
"extension": "py",
"fi... | 3.28125 | stackv2 | # subset
class Solution:
def canPartition(self, nums: List[int]) -> bool:
self.target = int(sum(nums) / 2)
self.subsets = []
def combo(nums, subset, i):
"""Check all possible combination of numbers recursively"""
self.subsets.append(subset)
... | 73 | 32.62 | 79 | 19 | 726 | python | [] | 0 | true | |
2024-11-19T02:06:55.281139+00:00 | 1,512,317,772,000 | f0211aa0436e98299cc8dfbeacfb2e5bce868620 | 2 | {
"blob_id": "f0211aa0436e98299cc8dfbeacfb2e5bce868620",
"branch_name": "refs/heads/master",
"committer_date": 1512317772000,
"content_id": "f58f5b76d6f580f8af035d831373753f2327bc29",
"detected_licenses": [
"MIT"
],
"directory_id": "f948597ca5ae696d316687ba212cffd02e41cb71",
"extension": "py",
"fi... | 2.5 | stackv2 | #!/usr/bin/python3
from pymongo import MongoClient
import pandas as pd
mongo = MongoClient(host=['10.168.0.217:27017'])
db = mongo.steemdb
cursor = db.comment.find({
"depth" : 0.0
}, {
"body" : 1.0,
"title" : 1.0
})
comment_df = pd.DataFrame(columns=['title', '_id', 'body'])
for comment in cursor:
c... | 20 | 20.95 | 82 | 14 | 135 | python | [] | 0 | true | |
2024-11-19T02:06:55.339210+00:00 | 1,616,618,406,000 | a339b17e9570eb0c22f01f0930f9bf14653dc3b7 | 3 | {
"blob_id": "a339b17e9570eb0c22f01f0930f9bf14653dc3b7",
"branch_name": "refs/heads/master",
"committer_date": 1616618406000,
"content_id": "177b36068e4120cce8e64f4185ce8304fc1cc2c7",
"detected_licenses": [
"MIT"
],
"directory_id": "4358daffd172c5365e0482908ba8285bfceb0fc5",
"extension": "py",
"fi... | 2.5625 | stackv2 | #!/usr/bin/env python
import wx
from embroidepy.assets import EmbroidePyLogo, texture
PHOENIX = 'phoenix' in wx.version()
class AboutWindow(wx.Window):
def __init__(self, parent, text=''):
## super(AboutWindow, self).__init__(parent, style=wx.BORDER_SIMPLE)
wx.Window.__init__(self, parent, styl... | 146 | 29.43 | 115 | 16 | 1,210 | python | [] | 0 | true | |
2024-11-19T02:06:55.393942+00:00 | 1,687,206,855,000 | 1ab93c0dd5f6ed9e79e5ad0637a7a7e8fe62867b | 3 | {
"blob_id": "1ab93c0dd5f6ed9e79e5ad0637a7a7e8fe62867b",
"branch_name": "refs/heads/main",
"committer_date": 1687206855000,
"content_id": "ff9821cc635a1a8e493ac38e1e453877f4016808",
"detected_licenses": [
"MIT"
],
"directory_id": "8355bc4e1ad1a863124c1d80d4a00b28ef587b48",
"extension": "py",
"file... | 2.875 | stackv2 | """Utility functions for random variables."""
from typing import Any
import numpy as np
import scipy.sparse
import probnum.linops
from . import _constant, _random_variable, _scipy_stats
def asrandvar(obj: Any) -> _random_variable.RandomVariable:
"""Convert ``obj`` to a :class:`RandomVariable`.
Converts an... | 70 | 25.56 | 88 | 13 | 448 | python | [] | 0 | true | |
2024-11-19T02:06:55.468344+00:00 | 1,645,082,032,000 | 0ec727d6771ee63f7e22b6d8f988bbf881339cb1 | 4 | {
"blob_id": "0ec727d6771ee63f7e22b6d8f988bbf881339cb1",
"branch_name": "refs/heads/master",
"committer_date": 1645082032000,
"content_id": "1ff38d1cd358987096d0c51ddfc3f8291ba4a9f0",
"detected_licenses": [
"MIT"
],
"directory_id": "65eaecb3b626957c2d15ad288f6f04dc0b26aa35",
"extension": "py",
"fi... | 4.28125 | stackv2 | from koans_plugs import *
def test_create_list_with_literal():
"""
Список в Python можно создать с помощью литерала списка
Литерал списка это квадратные скобки: []
Список может содержать коллекции произвольных типов
"""
my_list = ['Hello', 'world']
assert my_list == ___... | 112 | 29.77 | 124 | 9 | 948 | python | [] | 0 | true | |
2024-11-19T02:06:55.936729+00:00 | 1,533,134,003,000 | 1bed13e4ae4ee179efc9345c80f37774b9a25d53 | 3 | {
"blob_id": "1bed13e4ae4ee179efc9345c80f37774b9a25d53",
"branch_name": "refs/heads/master",
"committer_date": 1533134003000,
"content_id": "faa0d10f09eead11ce627578cbef40d3d18218f1",
"detected_licenses": [
"MIT"
],
"directory_id": "0142525cffe962cdbe654c90bcf38b70a7efb9c0",
"extension": "py",
"fi... | 3.046875 | stackv2 | '''
Basis for all site pages
'''
from views.file_ops import get_static_path
class Page:
'''
Page class is parent of all views and holds functions common to all of them
'''
def __init__(self):
self.title = ""
self.css = {}
self.js = {}
self.txt = {}
self.meta = {... | 56 | 29.52 | 110 | 16 | 395 | python | [] | 0 | true | |
2024-11-19T02:06:56.057636+00:00 | 1,566,962,839,000 | a5c43d9f34e259432b2b76c452c5777a8a3357c3 | 3 | {
"blob_id": "a5c43d9f34e259432b2b76c452c5777a8a3357c3",
"branch_name": "refs/heads/master",
"committer_date": 1566962839000,
"content_id": "f4fa3744edc716698de280fe6323425d2292345f",
"detected_licenses": [
"MIT"
],
"directory_id": "05f60b5fd34aa8d7306bc34cadebcc09ea6a4e36",
"extension": "py",
"fi... | 2.703125 | stackv2 | import os
import re
from urllib.parse import urlparse
from tqdm import tqdm
import zipfile
import tarfile
import gzip
import requests
class Storage():
def __init__(self, root="", force=False):
self.root = root
if not root:
self.root = os.path.join(os.path.dirname(__file__), "../data")... | 96 | 32.89 | 79 | 18 | 692 | python | [{"finding_id": "codeql_py/tarslip_f97782c6b0e1c0d2_9ef00e1c", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | |
2024-11-19T02:06:56.264175+00:00 | 1,533,922,380,000 | 05ab33a986c9ef76af731f074772ecbdc363f09b | 3 | {
"blob_id": "05ab33a986c9ef76af731f074772ecbdc363f09b",
"branch_name": "refs/heads/master",
"committer_date": 1533922380000,
"content_id": "7357338337636e92a0bf3522e43104bd109f172a",
"detected_licenses": [],
"directory_id": "df4e5d98d081ef897ce8b36a432be8f857d870f6",
"extension": "py",
"filename": "cli... | 2.859375 | stackv2 | # -*- coding: utf-8 -*-
import logging
import pprint
import sys
import mmap
from slacker import Slacker
from __init__ import __version__
from utils import Colors, Counter
from args import Args
# Get and parse command line arguments
args = Args()
# Nice slack API wrapper
slack = Slacker(args.token)
# So we can pr... | 115 | 24.52 | 110 | 20 | 675 | python | [] | 0 | true | |
2024-11-19T02:06:56.377675+00:00 | 1,692,362,880,000 | b3dd38b283d72867123ad213ddd3ab512a065ded | 2 | {
"blob_id": "b3dd38b283d72867123ad213ddd3ab512a065ded",
"branch_name": "refs/heads/main",
"committer_date": 1692362880000,
"content_id": "0262fc9e6e99af4f7fe75fecc6641cb120e67024",
"detected_licenses": [
"MIT"
],
"directory_id": "675fc2ab3d67d9fc2e3ae151816fbda8d97fb672",
"extension": "py",
"file... | 2.40625 | stackv2 | from abc import ABC, abstractmethod
from collections import Counter
from typing import Set, List, Dict, Optional
from typing import Tuple
from autofit.graphical.declarative.factor.prior import PriorFactor
from autofit.graphical.declarative.graph import DeclarativeFactorGraph
from autofit.graphical.expectation_propagat... | 299 | 27.92 | 85 | 16 | 1,712 | python | [] | 0 | true | |
2024-11-19T02:06:56.652393+00:00 | 1,575,026,549,000 | 92d0138ce072323b8d2b65eb614109ae1902bcc3 | 2 | {
"blob_id": "92d0138ce072323b8d2b65eb614109ae1902bcc3",
"branch_name": "refs/heads/master",
"committer_date": 1575026549000,
"content_id": "dbbee3e0425ca71a0381b54b667d7c021669fcc2",
"detected_licenses": [
"Unlicense"
],
"directory_id": "e846153ff22bae1c44ecd4008c13dec27d06dbcf",
"extension": "py",... | 2.390625 | stackv2 | from unityCamera import UnityCamera
from imageRegistration import *
MAP_SIZE = (300, 300)
if __name__=="__main__":
currentMap = np.zeros((MAP_SIZE[0], MAP_SIZE[1], 3))
firstImage = True
oldTheta = 0
oldX = 0
oldY = 0
cam = UnityCamera()
oldImage = None
oldAngle = None
angle = None
image = None
currentMat... | 109 | 21.61 | 100 | 21 | 850 | python | [] | 0 | true | |
2024-11-19T02:06:56.780580+00:00 | 1,454,483,638,000 | 5d13477efe78084e7c73f33f923958ae50b590f5 | 3 | {
"blob_id": "5d13477efe78084e7c73f33f923958ae50b590f5",
"branch_name": "refs/heads/master",
"committer_date": 1454483638000,
"content_id": "1651e582692b215492776049e49345aca65b85e7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d8fe35a1530cc6771636be7264e73f6e6b33a5b9",
"extension": "py"... | 2.75 | stackv2 | # -*- coding: utf-8 -*-
import sys
import smtplib
import argparse
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
class EmailSender:
def send(self, target, subject, data, attachment):
msg = MIMEMultipart()
msg['Subject'] = subject
msg['From'] = self.user... | 55 | 30.67 | 100 | 17 | 407 | python | [] | 0 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.