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:43:02.947935+00:00 | 1,585,925,324,000 | d8bab637be37aa09043e8d04a21240453c0add23 | 2 | {
"blob_id": "d8bab637be37aa09043e8d04a21240453c0add23",
"branch_name": "refs/heads/master",
"committer_date": 1585925324000,
"content_id": "13d5f02133f1641fc741816173e0004c713e3443",
"detected_licenses": [
"MIT"
],
"directory_id": "fe230e6ea75a1bb4be0e351c7f3e189c14327821",
"extension": "py",
"fi... | 2.4375 | stackv2 | import pandas as pd
import numpy as np
import os
import sys
os.chdir("../../../dynamic-reproducibility")
sys.path.append('utils')
from terminal_outputs import printProgressBar
from confs import Config
QUERIES = Config.chicago_queries
CLUSTERS = Config.chicago_clusters
if not os.path.exists('input/Crimes_Workload'):
... | 85 | 40.88 | 157 | 15 | 1,025 | python | [] | 0 | true | |
2024-11-19T01:43:03.162685+00:00 | 1,568,097,772,000 | 18c2226f9be707528e39e21b920eaf22f08a20e9 | 2 | {
"blob_id": "18c2226f9be707528e39e21b920eaf22f08a20e9",
"branch_name": "refs/heads/master",
"committer_date": 1568097772000,
"content_id": "285d8e66eb74f34f99fdcbcbf9e739155f2184b3",
"detected_licenses": [
"MIT"
],
"directory_id": "83ad51c9f7ea71eefcf38882ac9b20d514332a0b",
"extension": "py",
"fi... | 2.328125 | stackv2 | from . import main
from flask import render_template,redirect,request,url_for
from app.requests import getNews,getSearchItem,getArticles
# Insert home page view
@main.route('/')
def home():
"""
homepage route
"""
title = "Welcome to Newsrecapp"
news = getNews()
return render_template('index.html',sources =... | 35 | 29.83 | 86 | 13 | 248 | python | [] | 0 | true | |
2024-11-19T01:43:03.275467+00:00 | 1,618,831,291,000 | 414ab79a4ade5f6580615cc63d0e6bfcd076b5b9 | 3 | {
"blob_id": "414ab79a4ade5f6580615cc63d0e6bfcd076b5b9",
"branch_name": "refs/heads/master",
"committer_date": 1618831291000,
"content_id": "c944f4115e3bd5ffc61d5c6c092aa702c7668c3e",
"detected_licenses": [
"MIT"
],
"directory_id": "4372b3f8aff592d3d447e76bef21fbc1d11b8d21",
"extension": "py",
"fi... | 2.578125 | stackv2 | from django.db import models
from . import BaseModel
class Schema(BaseModel):
COMMA = ','
SEMICOLON = ';'
COLON = ':'
COLUMN_SEPARATOR = [
(COMMA, 'Comma (,)'),
(SEMICOLON, 'Semicolon(;)'),
(COLON, 'Colon(:)'),
]
QUOTE = "'"
DOUBLE_QUOTE = '"'
STRING_CHARACTER =... | 39 | 22.64 | 74 | 10 | 227 | python | [] | 0 | true | |
2024-11-19T01:43:05.796585+00:00 | 1,521,557,028,000 | fccab3cd4221e2a0a8d8bcf21150f419adc13bb6 | 3 | {
"blob_id": "fccab3cd4221e2a0a8d8bcf21150f419adc13bb6",
"branch_name": "refs/heads/master",
"committer_date": 1521557028000,
"content_id": "d9c3cf6547e42e5bab12e1fb8504fb7d30ee4dc1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e18e5d6e4977280952ef3c920ede6aae71f897b1",
"extension": "py"... | 2.984375 | stackv2 | import discord
from discord.ext import commands
import aiohttp
import json
class Animals:
def __init__(self, client):
self.client = client
self.session = aiohttp.ClientSession()
@commands.command(name='rd', pass_context=True)
async def random_dog(self, ctx, *args):
"""
ge... | 59 | 27.39 | 79 | 20 | 368 | python | [] | 0 | true | |
2024-11-19T01:43:08.399074+00:00 | 1,630,733,693,000 | 685da1b346980640b79c50776c6e3acefc8741b1 | 2 | {
"blob_id": "685da1b346980640b79c50776c6e3acefc8741b1",
"branch_name": "refs/heads/main",
"committer_date": 1630733693000,
"content_id": "91286910848fc0e97634bab98921f00b13735c40",
"detected_licenses": [
"Unlicense"
],
"directory_id": "43cfb676f6703d0a6132f0f1f96b5927a6dfac53",
"extension": "py",
... | 2.421875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from _lark.card.modules import Module
from typing import List, Optional
class CardConfig:
def __init__(self,
wide_screen_mode: bool = True,
enable_forward: bool = True):
self.wide_screen_mode = wide_screen_mode
self.e... | 29 | 26.03 | 67 | 11 | 170 | python | [] | 0 | true | |
2024-11-19T01:43:08.633983+00:00 | 1,652,296,409,000 | 02ffc5f086fccff5593203df5eb5d8caceb48b95 | 3 | {
"blob_id": "02ffc5f086fccff5593203df5eb5d8caceb48b95",
"branch_name": "refs/heads/master",
"committer_date": 1652296409000,
"content_id": "d6e085ffcf2be8a6c46aa78af075a6cfbc006edc",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3c3af05dbce543e90abaf30866f02c8093bf63bd",
"extension": "p... | 3.015625 | stackv2 | from typing import Iterable, Tuple, List
from wagtail import VERSION
if VERSION < (2, 0):
from wagtail.wagtailcore.models import Page, Site
else:
from wagtail.core.models import Page, Site
def build_page_tree(
# Would that mypy supported recursive types
tree: Iterable[Tuple[Page, Iterable]],
roo... | 72 | 25.71 | 75 | 14 | 435 | python | [] | 0 | true | |
2024-11-19T01:43:08.693143+00:00 | 1,431,018,320,000 | d35479999d4286b7d7b69941287942e6b909a46c | 2 | {
"blob_id": "d35479999d4286b7d7b69941287942e6b909a46c",
"branch_name": "refs/heads/master",
"committer_date": 1431018320000,
"content_id": "c4d811f17244649985618c94d02bd0f12acb117c",
"detected_licenses": [
"MIT"
],
"directory_id": "aef93329edd6df903eb104d069451b1d02a51bb8",
"extension": "py",
"fi... | 2.484375 | stackv2 | import subprocess
import os
from datepoints import GithubDatePoints
from pixelsets import LettersPixelSet
class Github(object):
def __init__(self, string, cwd, dictionary):
self.__string = string
self.__dictionary = dictionary
self.__cwd = os.path.abspath(cwd)
self.commands = []
... | 45 | 33.82 | 100 | 15 | 370 | python | [] | 0 | true | |
2024-11-19T01:43:18.110227+00:00 | 1,528,230,873,000 | 873860326d879bf948cfa0852c05fcac26989243 | 3 | {
"blob_id": "873860326d879bf948cfa0852c05fcac26989243",
"branch_name": "refs/heads/master",
"committer_date": 1528230873000,
"content_id": "e7e0d7ac8a1325a77d7b5bc0dc4392bfd896de79",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "94bde0b0e1c42b3e604ca3c9249ede2a5a05d12a",
"extension": "py"... | 2.96875 | stackv2 | #!/usr/bin/python
# ---------------- READ ME ---------------------------------------------
# This Script is Created Only For Practise And Educational Purpose Only
# This Script Is Created For https://bitforestinfo.blogspot.in
# This Script is Written By
#
#
##################################################
######## Pl... | 50 | 28.32 | 94 | 12 | 306 | python | [] | 0 | true | |
2024-11-19T01:43:18.153600+00:00 | 1,627,908,985,000 | d98fc8a37f9074c4325a295c475c6745b0b79e45 | 4 | {
"blob_id": "d98fc8a37f9074c4325a295c475c6745b0b79e45",
"branch_name": "refs/heads/main",
"committer_date": 1627908985000,
"content_id": "7bffcd57105a122bfa0222afccf80458a13c2196",
"detected_licenses": [
"MIT"
],
"directory_id": "326f67ddb17d2126ada58285b105517db085a650",
"extension": "py",
"file... | 3.703125 | stackv2 | import yfinance as yf
import streamlit as st
import pandas as pd
st.write("""
# Simple Stock Price App
Shown are the stock closing price and volume of Google!
""")
# https://towardsdatascience.com/how-to-get-stock-data-using-python-c0de1df17e75
#define the ticker symbol
tickerSymbol = 'GOOGL'
#get data on this tick... | 22 | 26.09 | 80 | 8 | 176 | python | [] | 0 | true | |
2024-11-19T01:43:18.274032+00:00 | 1,621,602,436,000 | 9a9f3399d7f823e4f16abea7d511fa212e633efd | 3 | {
"blob_id": "9a9f3399d7f823e4f16abea7d511fa212e633efd",
"branch_name": "refs/heads/master",
"committer_date": 1621602436000,
"content_id": "4b72890d330848bab0b4bd610d1c265f0f76731c",
"detected_licenses": [
"MIT"
],
"directory_id": "605dbe3f437e011eacd6e9614514dc9eba5c35b1",
"extension": "py",
"fi... | 2.921875 | stackv2 | import uuid
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from smtplib import SMTP, SMTP_SSL
from typing import BinaryIO, List, Optional, Union
class Mailer:
"""Object for send mail"""
def __init__(
self,
... | 127 | 32.28 | 99 | 16 | 933 | python | [] | 0 | true | |
2024-11-19T01:54:46.600743+00:00 | 1,632,729,639,000 | 9e22bcdb6e264059006904444a04ce6a6300a411 | 2 | {
"blob_id": "9e22bcdb6e264059006904444a04ce6a6300a411",
"branch_name": "refs/heads/master",
"committer_date": 1632729639000,
"content_id": "1c304fd07c92b9666cc4f024f111acb314da5bd6",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "07148f74e6f9929356aa68e8889c7d71525b6978",
"extension": "p... | 2.375 | stackv2 | #!/usr/bin/env python
##########################################################################
# frontends/swig_python/python_rpyc_server.py
#
# Part of Project Thrill - http://project-thrill.org
#
# Copyright (C) 2015 Timo Bingmann <tb@panthema.net>
#
# All rights reserved. Published under the BSD-2 license in the L... | 83 | 29.47 | 77 | 13 | 553 | python | [] | 0 | true | |
2024-11-19T01:54:46.665061+00:00 | 1,578,379,747,000 | f3420aa110cc13fcb03d1c722cbfbd76ee0c27b9 | 2 | {
"blob_id": "f3420aa110cc13fcb03d1c722cbfbd76ee0c27b9",
"branch_name": "refs/heads/master",
"committer_date": 1578379747000,
"content_id": "edc11574bca5c115d8096bbbde5bb5cc93217729",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "640e0cd0549c0047b467cc19f6b538b61d51aee3",
"extension": "py"... | 2.390625 | stackv2 | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 51 | 32.12 | 74 | 12 | 421 | python | [] | 0 | true | |
2024-11-19T01:54:46.775280+00:00 | 1,631,544,871,000 | 6e19753f05da35fe6ceacc343c4b55de96b0220d | 4 | {
"blob_id": "6e19753f05da35fe6ceacc343c4b55de96b0220d",
"branch_name": "refs/heads/main",
"committer_date": 1631544871000,
"content_id": "57cff9baa90a6adcc10a427025e4ad8d10dfb777",
"detected_licenses": [
"MIT"
],
"directory_id": "6c7cba2f1e80b023238a2657b7fe1f10272ff7a0",
"extension": "py",
"file... | 3.75 | stackv2 | def flower_beds(beds: list):
right_bed = beds[0][1]
left_bed = beds[0][0]
for i in range(1, len(beds)):
if right_bed >= beds[i][0] and right_bed < beds[i][1]:
right_bed = beds[i][1]
elif beds[i][0] > right_bed:
print(f'{left_bed} {right_bed}')
left_bed = b... | 18 | 32.78 | 71 | 15 | 182 | python | [] | 0 | true | |
2024-11-19T01:54:46.944693+00:00 | 1,691,682,979,000 | 3cf4d35d8fcd8899cdfcdee1d2eae8d9e0055ae6 | 3 | {
"blob_id": "3cf4d35d8fcd8899cdfcdee1d2eae8d9e0055ae6",
"branch_name": "refs/heads/maint",
"committer_date": 1691682979000,
"content_id": "d54b91643c8e2d5004ffda7fd2a6dc1aabb62c59",
"detected_licenses": [
"BSD-3-Clause",
"MIT"
],
"directory_id": "76f23cc69dc10c44bc7cf00b78e37db04c7a9c45",
"exte... | 2.625 | stackv2 | ## NDA AWS Token Generator
## Author: NIMH Data Archives
## http://ndar.nih.gov
## License: MIT
## https://opensource.org/licenses/MIT
import binascii
import hashlib
import logging
import xml.etree.ElementTree as etree
import sys
if sys.version_info[0] == 2:
import urllib2 as urllib_request
else... | 121 | 30.55 | 89 | 12 | 838 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_631a910934060c31_a55e6d18", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse... | 1 | true | |
2024-11-19T01:54:47.286246+00:00 | 1,606,712,310,000 | b301a1d49fc643a0deeac75cc2b188a030b34b43 | 2 | {
"blob_id": "b301a1d49fc643a0deeac75cc2b188a030b34b43",
"branch_name": "refs/heads/master",
"committer_date": 1606712310000,
"content_id": "4742e7504cb9c77ecb3fadf2b31e1e51a9e3a8dc",
"detected_licenses": [
"MIT"
],
"directory_id": "c795ec7f77219892183a1222fb51b8be2e754944",
"extension": "py",
"fi... | 2.421875 | stackv2 | import ClientAPI
class PlayAnimation:
def __init__(self, oid):
self.OID = oid
def CancelEffect(self):
pass
def UpdateEffect(self):
pass
def ExecuteEffect(self, sourceOID, animName):
caster = ClientAPI.World.GetObjectByOID(sourceOID)
... | 38 | 24.5 | 91 | 14 | 197 | python | [] | 0 | true | |
2024-11-19T01:54:47.900457+00:00 | 1,464,164,760,000 | e8537f10204f46b318402b7cdec8228abd477c94 | 3 | {
"blob_id": "e8537f10204f46b318402b7cdec8228abd477c94",
"branch_name": "refs/heads/master",
"committer_date": 1464164760000,
"content_id": "1d28f85c2b53590bb27fb9f261095ec477d30e8b",
"detected_licenses": [
"MIT"
],
"directory_id": "87f0a79711e71f9ae71071514d9de603b29d2e14",
"extension": "py",
"fi... | 2.796875 | stackv2 | from config import redis_conn
def has_fileid(file_id):
return redis_conn.sismember("fileids", file_id)
def add_fileid(file_id):
redis_conn.sadd("fileids", file_id)
def get_filename_by_id(file_id):
return redis_conn.get("{0}:filename".format(file_id))
def set_filename_with_id(file_id, filename):
retu... | 22 | 28.32 | 71 | 10 | 159 | python | [] | 0 | true | |
2024-11-19T01:54:47.963141+00:00 | 1,689,412,509,000 | 650aaf2560f65614a91a7d5854f2d20d1b6c8760 | 2 | {
"blob_id": "650aaf2560f65614a91a7d5854f2d20d1b6c8760",
"branch_name": "refs/heads/master",
"committer_date": 1689412509000,
"content_id": "45fb1809780cf40d8867cf679f1e67ba2c23ec29",
"detected_licenses": [
"MIT"
],
"directory_id": "b836a2aa3301da2f74d978b40f68165765821830",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2019 Random.Zebra (https://github.com/random-zebra/)
# Distributed under the MIT software license, see the accompanying
# file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php.
from random import choice
import requests
from misc impo... | 76 | 30.12 | 87 | 15 | 607 | python | [] | 0 | true | |
2024-11-19T01:54:48.032181+00:00 | 1,608,835,665,000 | 19ad736c4c499492aeb075940f9ae83d749fe123 | 3 | {
"blob_id": "19ad736c4c499492aeb075940f9ae83d749fe123",
"branch_name": "refs/heads/main",
"committer_date": 1608835665000,
"content_id": "a5e7220b909e5a25de84aafade8a40b8ba46762a",
"detected_licenses": [
"MIT"
],
"directory_id": "92197d3da9ceb3a91d2ce98fb9a3bea91e1723dc",
"extension": "py",
"file... | 2.65625 | stackv2 | import tensorflow as tf
from tensorflow.keras.layers import Input, Lambda, Dense, Flatten
from tensorflow.keras.models import Model
from tensorflow.keras.applications.resnet50 import ResNet50
from tensorflow.keras.applications.resnet50 import preprocess_input
from tensorflow.keras.preprocessing import image
from tensor... | 59 | 27.19 | 89 | 10 | 410 | python | [] | 0 | true | |
2024-11-19T01:54:48.150153+00:00 | 1,621,271,197,000 | 527f2d3f75840be8caa1d686cd967a8c9d97ff38 | 3 | {
"blob_id": "527f2d3f75840be8caa1d686cd967a8c9d97ff38",
"branch_name": "refs/heads/master",
"committer_date": 1621271197000,
"content_id": "328689f5f8eaeda0dab46cb6d13bbf114ccb9f7d",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "15fbe75198cc2646f843de9a795c1b3cb1b9bf21",
"extension": "p... | 2.96875 | stackv2 | import functools
from enum import IntEnum
from typing import (
Callable,
Generator,
Iterable,
Iterator,
List,
Optional,
Tuple,
TypeVar,
Union,
)
from ..data_logging.data_recorder import DataRecorder
from .candidate_converter import CandidateConverter
class Type(IntEnum):
V... | 238 | 34.39 | 105 | 16 | 1,820 | python | [] | 0 | true | |
2024-11-19T01:54:48.208282+00:00 | 1,608,588,137,000 | 233663103a8c8491a9e4a2ad7cc962dc963bf48f | 3 | {
"blob_id": "233663103a8c8491a9e4a2ad7cc962dc963bf48f",
"branch_name": "refs/heads/master",
"committer_date": 1608588137000,
"content_id": "6ca74d0c8ddadd9814e8ed4b983e5dcf223f946a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "18f59fdb3f780416bd525f1b9df01f36ada30dbb",
"extension": "py"... | 2.71875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Randall Balestriero"
import symjax.tensor as T
import matplotlib.pyplot as plt
from symjax.viz import compute_graph
x = T.random.randn((10,), name="x")
y = T.random.randn((10,), name="y")
z = T.random.randn((10,), name="z")
w = T.Variable(T.ones(1), name="... | 28 | 19.96 | 36 | 10 | 174 | python | [] | 0 | true | |
2024-11-19T01:54:49.189246+00:00 | 1,624,802,116,000 | a19aabbe91a7fb4c57869518e563fcc9fa376ad3 | 3 | {
"blob_id": "a19aabbe91a7fb4c57869518e563fcc9fa376ad3",
"branch_name": "refs/heads/master",
"committer_date": 1624802116000,
"content_id": "9ba033c4eaa1d62322973ca162807777cc3bf8b7",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "75cbfb15ae671ac6564186cdbbf5aad74a317c66",
"exten... | 2.625 | stackv2 | from enum import Enum
from labelbox.orm.db_object import DbObject
from labelbox.orm.model import Field
class AssetAttachment(DbObject):
""" Asset attachment provides extra context about an asset while labeling.
Attributes:
attachment_type (str): IMAGE, VIDEO, TEXT, or IMAGE_OVERLAY
attachmen... | 25 | 28.32 | 78 | 11 | 158 | python | [] | 0 | true | |
2024-11-19T01:54:49.425883+00:00 | 1,573,896,666,000 | cecca567dc686ee3f24f95fab22d9d379bbaea55 | 3 | {
"blob_id": "cecca567dc686ee3f24f95fab22d9d379bbaea55",
"branch_name": "refs/heads/master",
"committer_date": 1573896666000,
"content_id": "53ac9fd6c1a33300b48501dbf7e3fe9e475c2bbf",
"detected_licenses": [
"MIT"
],
"directory_id": "174bb065ecb814cf4533cedfedeb16046b029de4",
"extension": "py",
"fi... | 3.1875 | stackv2 | import pickle
import pandas as pd
import numpy as np
from scipy.stats import poisson
class FootballModel:
"""
Model that predict a game result between
2 internationals football teams
"""
def __init__(self, path: str):
self.model = self.load_model(path)
@staticmethod
def load_mode... | 27 | 20.11 | 49 | 14 | 128 | python | [] | 0 | true | |
2024-11-19T01:54:49.719480+00:00 | 1,614,181,199,000 | f86ccf95bfc05ff737449c5761bcce2b56701220 | 4 | {
"blob_id": "f86ccf95bfc05ff737449c5761bcce2b56701220",
"branch_name": "refs/heads/master",
"committer_date": 1614181199000,
"content_id": "f8cee38fc5522b6c4b4299451792d03cd5cef9bc",
"detected_licenses": [
"MIT"
],
"directory_id": "50008b3b7fb7e14f793e92f5b27bf302112a3cb4",
"extension": "py",
"fi... | 4.09375 | stackv2 | # create blank class
print "creating empty class object"
print
class A(object):
pass
# create hypothetical constructor
print "defining class constructor"
print "will set instance attribute \"a\""
print
def init(cls, a):
print "initializing the instance"
print
cls.__setattr__("a",a)
# create new method
print "... | 87 | 16.1 | 64 | 8 | 382 | python | [] | 0 | true | |
2024-11-19T01:54:49.910657+00:00 | 1,583,978,741,000 | 02262ebb47b577f6de1c9845338653e100136fb9 | 2 | {
"blob_id": "02262ebb47b577f6de1c9845338653e100136fb9",
"branch_name": "refs/heads/master",
"committer_date": 1583978741000,
"content_id": "ea43cead01cd86d2d73ecced4e4fc6719c556254",
"detected_licenses": [
"MIT"
],
"directory_id": "750065657aeb6d4d1f6a2445a5fe460e1769edcb",
"extension": "py",
"fi... | 2.46875 | stackv2 | from .check import RemoteCheck
from .exceptions import MissingExpectedValueError
REPR = 'CheckFile'
class CheckFile(RemoteCheck):
MANDATORY = ['filename']
STAT_FLAGS = {'access_rights': r'%a',
'blocks_num': r'%b',
'byte_per_block': r'%B',
'dev_num':... | 64 | 39.34 | 120 | 25 | 551 | python | [] | 0 | true | |
2024-11-19T01:54:50.032500+00:00 | 1,540,848,435,000 | 8c2e5383f7676b97a33abd2f4db46db0cb9554c0 | 2 | {
"blob_id": "8c2e5383f7676b97a33abd2f4db46db0cb9554c0",
"branch_name": "refs/heads/master",
"committer_date": 1540848435000,
"content_id": "943ba91613bc6fd3fb6f6fdfea1e25266d584a55",
"detected_licenses": [
"MIT"
],
"directory_id": "ae5e669a085cda1fa6cd9378d754c88202975e3a",
"extension": "py",
"fi... | 2.4375 | stackv2 | import logging
import discord
from discorrecd.events import EventManager
log = logging.getLogger(__name__)
_EVENT_METHODS = [
('on_ready', 'ready'),
('on_resumed', 'resumed'),
('on_message', 'message'),
('on_message_delete', 'message_delete'),
('on_message_edit', 'message_edit'),
('on_typing... | 85 | 34.64 | 107 | 14 | 700 | python | [] | 0 | true | |
2024-11-19T01:54:50.102401+00:00 | 1,563,498,010,000 | 3721d7aab5e1c4609f4a59c0bdb3e2dc09b6ce85 | 3 | {
"blob_id": "3721d7aab5e1c4609f4a59c0bdb3e2dc09b6ce85",
"branch_name": "refs/heads/master",
"committer_date": 1563498010000,
"content_id": "d4aefc57becb47d5a1c14d64de48f503c7490b3c",
"detected_licenses": [
"MIT"
],
"directory_id": "b1caa1bcbf436372876894f09b0e180c9b7a6bd0",
"extension": "py",
"fi... | 2.78125 | stackv2 | # -*- coding: UTF-8 -*-
import re
import os
import hashlib
class Storage():
def __init__(self, video_url: str) -> None:
self.video_url = video_url
def get_file_path(self) -> str:
return 'subtitle_{0}.en.vtt'.format(re.sub(
r'[^\w-]', '', hashlib.md5(str(self.video_url).encode('u... | 18 | 22.22 | 89 | 20 | 109 | python | [] | 0 | true | |
2024-11-19T01:54:50.215430+00:00 | 1,628,267,542,000 | 86895078069d1a1ba256620df6b6a6e6e245ea16 | 2 | {
"blob_id": "86895078069d1a1ba256620df6b6a6e6e245ea16",
"branch_name": "refs/heads/main",
"committer_date": 1628267542000,
"content_id": "0043841796c262fba0e966b788ff4fa33977e474",
"detected_licenses": [
"MIT"
],
"directory_id": "77892a5ab82e2c5285b5562fb1dee1015132101d",
"extension": "py",
"file... | 2.328125 | stackv2 | from discord_slash.utils.manage_commands import create_option, create_choice
import discord
from discord.ext.commands import Bot
from discord.ext import commands
from discord_slash import cog_ext, SlashContext, SlashCommand
from discord import DMChannel
import re
import asyncio
import os
guild_ids = [int(os.environ['... | 106 | 39.97 | 77 | 18 | 939 | python | [] | 0 | true | |
2024-11-19T01:54:50.668504+00:00 | 1,691,336,559,000 | e70df4243dbed2d7da0947d1a01fa8b46aa02434 | 3 | {
"blob_id": "e70df4243dbed2d7da0947d1a01fa8b46aa02434",
"branch_name": "refs/heads/master",
"committer_date": 1691336559000,
"content_id": "47db7e2dadb9af9771b23021ab1ba3d21301e15e",
"detected_licenses": [
"MIT"
],
"directory_id": "ff6fd44d205ff9ee6e54b660f454d90f240ecf1b",
"extension": "py",
"fi... | 2.75 | stackv2 | """
-*- coding: utf-8 -*-
========================
AWS Lambda
========================
Contributor: Chirag Rathod (Srce Cde)
========================
"""
import os
import json
import boto3
import pandas as pd
def lambda_handler(event, context):
BUCKET_NAME = os.environ["BUCKET_NAME"]
PREFIX = os.environ["PR... | 72 | 24.4 | 81 | 18 | 439 | python | [] | 0 | true | |
2024-11-19T01:54:50.752644+00:00 | 1,321,892,102,000 | 44583d0404757d68c24727379cf73cafccfb75c8 | 3 | {
"blob_id": "44583d0404757d68c24727379cf73cafccfb75c8",
"branch_name": "refs/heads/master",
"committer_date": 1321892102000,
"content_id": "a609766528ef658efcac053a15f975fb1d152821",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ea004ba957ca1d44345a66aa13dd43aa99459e1e",
"extension": "p... | 2.53125 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals # unicode by default
from datetime import datetime
from sqlalchemy import Column, UnicodeText, Boolean, Integer, ForeignKey, \
DateTime, Unicode
from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.hybrid import hyb... | 127 | 37.43 | 77 | 15 | 1,100 | python | [] | 0 | true | |
2024-11-19T01:54:50.857276+00:00 | 1,530,754,184,000 | d6c5ee0527e04127a0f8fca3c349493295a3dddb | 3 | {
"blob_id": "d6c5ee0527e04127a0f8fca3c349493295a3dddb",
"branch_name": "refs/heads/master",
"committer_date": 1530754184000,
"content_id": "6f27e4ca52b27c15c6e1588f53a8264a2dea1256",
"detected_licenses": [
"MIT"
],
"directory_id": "939885781d727a0ec6a2839faeb7277ac925a42c",
"extension": "py",
"fi... | 2.671875 | stackv2 | import codecs
import json
import numpy as np
from gensim.models import Word2Vec
from keras.layers import Embedding
# tokenizing function
def tokenize(sentence):
result = sentence.replace('\n', '').split(' ')
return(result)
# create embeddings with gensim
def create_embeddings(file_name,
... | 54 | 31.43 | 100 | 14 | 413 | python | [] | 0 | true | |
2024-11-19T01:54:50.910383+00:00 | 1,544,324,372,000 | b6a64f02808665cd79e0e38cec4182ae31b1aeb6 | 4 | {
"blob_id": "b6a64f02808665cd79e0e38cec4182ae31b1aeb6",
"branch_name": "refs/heads/master",
"committer_date": 1544324372000,
"content_id": "526f622485245e4248f25290fa3545036c7c97bd",
"detected_licenses": [
"Unlicense"
],
"directory_id": "db46eece6bdc7c72eb648fd84d3e0c879883ecb6",
"extension": "py",... | 4 | stackv2 | """
# PROBLEM 9
A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,
a^2 + b^2 = c^2
For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2.
There exists exactly one Pythagorean triplet for which a + b + c = 1000.
Find the product abc.
"""
from math import ceil
# Okay, so obviously a, b, and c must b... | 37 | 36.22 | 95 | 14 | 437 | python | [] | 0 | true | |
2024-11-19T01:54:50.967513+00:00 | 1,430,214,365,000 | a95617a9165a5ac94f00b63b5dfc1a30b3eb0a70 | 3 | {
"blob_id": "a95617a9165a5ac94f00b63b5dfc1a30b3eb0a70",
"branch_name": "refs/heads/master",
"committer_date": 1430214365000,
"content_id": "9cb8ac12e6736046d0db84cb096952383d8d0a98",
"detected_licenses": [
"MIT"
],
"directory_id": "16fd1d27db50e1dcbcdd2ece09eb426aa7f38030",
"extension": "py",
"fi... | 2.59375 | stackv2 | # -*- coding: utf-8 -*-
import nltk
from ... import config
if "simple" in config.engines:
labels = config.engines["simple"]["labels"]
def convert_label(label):
if label in labels:
return labels[label]
else:
print "simple:",label
return label
# see http://timmcnamara.co.nz/post/2650550090/extracting-names... | 28 | 26.93 | 114 | 17 | 218 | python | [] | 0 | true | |
2024-11-19T01:54:51.083782+00:00 | 1,623,746,468,000 | b2ea62a67517d480d144f947682cbc45f91a54fd | 3 | {
"blob_id": "b2ea62a67517d480d144f947682cbc45f91a54fd",
"branch_name": "refs/heads/master",
"committer_date": 1623746468000,
"content_id": "9d5808ee3b2d77bdbd26d5d303a3e111fb50189a",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ee0b9cd2424e634a212a6d9734af1eaedd40dfe0",
"extension": "p... | 2.515625 | stackv2 |
################################################################################
#This software was developed by the University of Tennessee as part of the
#Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
#project funded by the US National Science Foundation.
#
#See the license text in license.txt
... | 188 | 39.05 | 86 | 16 | 1,916 | python | [] | 0 | true | |
2024-11-19T01:54:51.625559+00:00 | 1,508,937,942,000 | c201d744e3816e90aa560fd224356d49f8bf8023 | 2 | {
"blob_id": "c201d744e3816e90aa560fd224356d49f8bf8023",
"branch_name": "refs/heads/master",
"committer_date": 1508937942000,
"content_id": "312ce35825b2deb828293910b1de5cac4670a95e",
"detected_licenses": [
"MIT"
],
"directory_id": "6bc9b01dd7afc1c0f0bf6228910d206b7f0d8720",
"extension": "py",
"fi... | 2.390625 | stackv2 | # -*- coding: utf-8 -*-
import inspect
from functools import partial
import boto3
from django.conf import settings
__author__ = 'dreipol GmbH'
class Decorator(object):
def __init__(self, function, *args, **kwargs):
self.function = function
@property
def original_function(self):
function... | 81 | 28.26 | 104 | 14 | 491 | python | [] | 0 | true | |
2024-11-19T01:54:52.540790+00:00 | 1,620,772,291,000 | 8d6fd962bec5fe715518ec83e07c0ac80c4f890f | 3 | {
"blob_id": "8d6fd962bec5fe715518ec83e07c0ac80c4f890f",
"branch_name": "refs/heads/master",
"committer_date": 1620772291000,
"content_id": "4bde9100c8478180617b3ac586610b363a97cb5f",
"detected_licenses": [
"MIT"
],
"directory_id": "8c87bc3dca66de62c2e6aa8c9f5221d8ed4a1ece",
"extension": "py",
"fi... | 2.78125 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 28 15:13:31 2019
@author: peter
***
This program requires ffmpeg be installed in anaconda
To install, run the following command in your anaconda terminal
conda install -c conda-forge ffmpeg
***
"""
import h5py
import numpy as np
import matplotlib... | 85 | 23.24 | 77 | 14 | 603 | python | [] | 0 | true | |
2024-11-19T01:54:53.936835+00:00 | 1,527,014,119,000 | 16cc3c069856c264ed44ee11ea8fa6c01be2e152 | 3 | {
"blob_id": "16cc3c069856c264ed44ee11ea8fa6c01be2e152",
"branch_name": "refs/heads/master",
"committer_date": 1527014119000,
"content_id": "45616523f66873e9367de8bf90661f8a257a9785",
"detected_licenses": [
"MIT"
],
"directory_id": "9d5a833cc18cf290f018e74dc6c0c51895103401",
"extension": "py",
"fi... | 3.109375 | stackv2 | #!/usr/bin/python
# hat.py
#
# Script to grab one set of serial data and log it to a sql database
# Requires a database and table to be set up already for the data
#
# Sources:
# pyserial.readthedoc.io/en/latest/pyserial_api.html
# pyserial.readthedoc.io/en/latest/shortintro.html
# https://docs.python.org/3/lib... | 61 | 29.82 | 107 | 17 | 519 | python | [] | 0 | true | |
2024-11-19T01:54:54.003706+00:00 | 1,587,302,273,000 | 38bd5f417206f5c2cfa635acc84acde20c1f3543 | 3 | {
"blob_id": "38bd5f417206f5c2cfa635acc84acde20c1f3543",
"branch_name": "refs/heads/master",
"committer_date": 1587302273000,
"content_id": "c07fd7ddc108ee13af65bae4dea7c9c73b617856",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "28229c94427e42ecd6e504eeb92fcdbeae1091ba",
"extension": "py",
... | 2.859375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "Vinícius Madureira"
__copyright__ = "Copyright 2020, Vinícius Madureira"
__license__ = "Creative Commons Zero 1.0 Universal"
__version__ = "0.01a"
__maintainer__ = "Vinícius Madureira"
__email__ = "viniciusmadureira@outlook.com"
__status__ = "Testing"
from... | 60 | 31.28 | 141 | 17 | 403 | python | [] | 0 | true | |
2024-11-19T01:54:54.125749+00:00 | 1,552,719,922,000 | 1fe4a523e8be6fd6b34630afb3237a9889bd6654 | 3 | {
"blob_id": "1fe4a523e8be6fd6b34630afb3237a9889bd6654",
"branch_name": "refs/heads/master",
"committer_date": 1552719922000,
"content_id": "9001d917e1b8e347542b4f7dd3a13df05d87bdac",
"detected_licenses": [
"MIT"
],
"directory_id": "ffe57560bea0e45be6eb6a1422cbc20fd8468737",
"extension": "py",
"fi... | 3 | stackv2 | '''
K-means Clustering (from scratch) with elbow method selection
'''
import numpy as np
import matplotlib.pyplot as plt
from scipy.spatial.distance import euclidean
import common.utils as ut
# get data from:
# https://www.kaggle.com/c/otto-group-product-classification-challenge
TRN_DATA_PATH = 'datasets/otto-group... | 186 | 27.04 | 79 | 19 | 1,446 | python | [] | 0 | true | |
2024-11-19T01:54:54.232492+00:00 | 1,485,783,244,000 | 5adbe92b88cfa34c3d5d5bef206e82f6500e50b2 | 3 | {
"blob_id": "5adbe92b88cfa34c3d5d5bef206e82f6500e50b2",
"branch_name": "refs/heads/master",
"committer_date": 1485783244000,
"content_id": "7c9c792bcd298a501f1be25fd690b9ea0e989edc",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "60e006eb75b4d6786a4e679cde318f141c367b0b",
"extension": "p... | 2.9375 | stackv2 | import re
import datetime
import dateparser
from .exceptions import SearchSyntaxError
units = {
'd': datetime.timedelta(days=1),
'h': datetime.timedelta(hours=1),
}
def parse_date(value):
match = re.match(r"^([\-\+])(\d+)([{}])".format(''.join(units)), value)
if not match:
returned = datepar... | 32 | 21.59 | 80 | 14 | 169 | python | [] | 0 | true | |
2024-11-19T01:54:54.369335+00:00 | 1,611,366,906,000 | f7d49c73121475b443ca46a5c55c357751fe071b | 3 | {
"blob_id": "f7d49c73121475b443ca46a5c55c357751fe071b",
"branch_name": "refs/heads/main",
"committer_date": 1611366906000,
"content_id": "9ca5c9d0c714eff9d5cb0e4ca5986f802da331be",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a42fb6a9947211d7ebae45f2073c61e7d4c4ad9b",
"extension": "py",
... | 2.8125 | stackv2 | import matplotlib.pyplot as plt
import numpy as np
import csv
import scipy.special as sc
def binary_entropy(x):
return -(sc.xlogy(x, x) + sc.xlog1py(1 - x, -x))/np.log(2)
plt.rcParams.update({'font.size': 20})
with open('dcache', newline='\n') as csvfile:
ic = list(csv.reader(csvfile))
icx = [float(x[0]) ... | 34 | 30.09 | 91 | 12 | 340 | python | [] | 0 | true | |
2024-11-19T01:54:54.553094+00:00 | 1,558,459,977,000 | 9f1f3be57cbfdbe8ac22d1c6ce2b950af3089122 | 3 | {
"blob_id": "9f1f3be57cbfdbe8ac22d1c6ce2b950af3089122",
"branch_name": "refs/heads/master",
"committer_date": 1558459977000,
"content_id": "2a3d9007c94883c398c0883fd7f00e749cfa2106",
"detected_licenses": [
"MIT"
],
"directory_id": "11f75121b7861795876cad114566f0c1ef1e3ef1",
"extension": "py",
"fi... | 2.8125 | stackv2 | """Script that checks for changes uploaded to the database by Tom through
FileZilla and updates the master sheet to be the new sheet. Then, it alters the
changelog.html file to reflect the changes. Uses pandas for the table changes
and Beautiful Soup 4 for the html changes. Returns False if no changes are made
and True... | 111 | 39.91 | 107 | 17 | 1,024 | python | [] | 0 | true | |
2024-11-19T01:54:54.615993+00:00 | 1,576,174,750,000 | 954aaf68abfc9029b48bd2e2490bcdc5be4e48f7 | 2 | {
"blob_id": "954aaf68abfc9029b48bd2e2490bcdc5be4e48f7",
"branch_name": "refs/heads/master",
"committer_date": 1576201396000,
"content_id": "d56c2fa082bc5b77fab112801d27844b276322c9",
"detected_licenses": [
"MIT"
],
"directory_id": "3faf1ff6b32134964f0e577f052575083cb235d1",
"extension": "py",
"fi... | 2.4375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from matplotlib import pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
from config import Config
from data_loader import BehavioralDataset
from models import BehavioralModel
from tensorflow.keras.callbacks import ModelChe... | 85 | 33.55 | 110 | 15 | 775 | python | [] | 0 | true | |
2024-11-19T01:54:55.225221+00:00 | 1,691,580,764,000 | 92381d32a201fa564eeadff1a5b8ac9baa262728 | 3 | {
"blob_id": "92381d32a201fa564eeadff1a5b8ac9baa262728",
"branch_name": "refs/heads/main",
"committer_date": 1691580764000,
"content_id": "ecfdc60f15d0333853ffc1d3284d088797582953",
"detected_licenses": [
"MIT"
],
"directory_id": "6d9be7a09300d84c5394e927a31d0e4c82aa3943",
"extension": "py",
"file... | 2.53125 | stackv2 | from ..core._geopandas import from_geopandas
from ._ressources import read_remote_shapefile
REPR = """
AR6 reference regions - Iturbide et al., 2020
Attributes
----------
all : Regions
All regions (land + ocean).
land : Regions
Land regions only
ocean : Regions
Ocean regions only
"""
class ar6_cls:
... | 93 | 20.82 | 81 | 16 | 478 | python | [] | 0 | true | |
2024-11-19T01:54:55.969849+00:00 | 1,592,278,450,000 | 9616b410afd69602a47d94b73cbe3fe30943e12a | 3 | {
"blob_id": "9616b410afd69602a47d94b73cbe3fe30943e12a",
"branch_name": "refs/heads/master",
"committer_date": 1592278450000,
"content_id": "81be946de277cc03bcd1d9600756698a40645ee3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "239560e26d08bc398e3c1e6d53e7fb0b65f74d61",
"extension": "py"... | 2.71875 | stackv2 | # Copyright 2020 The Keras CV Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 114 | 48.06 | 120 | 17 | 1,246 | python | [] | 0 | true | |
2024-11-19T01:54:56.087798+00:00 | 1,512,605,069,000 | 707802397e3b21f51ded1bfdb9b98e93fbdae8d6 | 3 | {
"blob_id": "707802397e3b21f51ded1bfdb9b98e93fbdae8d6",
"branch_name": "refs/heads/master",
"committer_date": 1512605069000,
"content_id": "3b3a2d8fcdf797a16dbb509a86717002ab267668",
"detected_licenses": [
"MIT"
],
"directory_id": "b2ca3bc0eaaf3dd430a2f5c118c01632d0a01143",
"extension": "py",
"fi... | 2.609375 | stackv2 | import sqlite3
def connect(func):
def func_wrapper(*args, **kwargs):
conn = sqlite3.connect("myDB.db")
return func(*args, **kwargs)
conn.close()
return func_wrapper
#TODO check and edit function
@connect
def createUsers(conn):
try:
conn.execute('''CREATE TABLE USERS
... | 79 | 25.62 | 71 | 12 | 518 | python | [] | 0 | true | |
2024-11-19T01:54:56.152867+00:00 | 1,691,566,580,000 | da9f86b3f19f4b8db14bc92c69aff0bf65193052 | 3 | {
"blob_id": "da9f86b3f19f4b8db14bc92c69aff0bf65193052",
"branch_name": "refs/heads/master",
"committer_date": 1691566580000,
"content_id": "0b359a50b1ac0200430fe8605d30abb4d93450e9",
"detected_licenses": [
"MIT"
],
"directory_id": "691b82da7c38a6c109088d8426ffa26175f4ff31",
"extension": "py",
"fi... | 2.75 | stackv2 | # -*- coding: utf-8 -*-
"""
定义一些任务的执行操作,将具体的操作从tasks.py里面抽离出来
每个任务需要饮用的模块放到函数里面引用,方便单独调试函数
"""
import requests
def get_link_status(url):
"""
请求地址,返回请求状态和内容
@param url:
@return:
"""
try:
resp = requests.get(url, timeout=5, verify=False)
except Exception:
return 500, ... | 255 | 32.4 | 90 | 22 | 2,159 | python | [{"finding_id": "codeql_py/request-without-cert-validation_1fcc7e933dc682b3_f0267f36", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 27