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-18T21:51:43.135686+00:00 | 1,548,970,450,000 | 897617a0742a240a1cab8b75b8a3bfd5e55966d5 | 2 | {
"blob_id": "897617a0742a240a1cab8b75b8a3bfd5e55966d5",
"branch_name": "refs/heads/master",
"committer_date": 1548970450000,
"content_id": "7f581bfa3139e419362be69922b66dd7f2813bae",
"detected_licenses": [
"MIT"
],
"directory_id": "94e539efc1363cd34a310eed2269cd02d553f565",
"extension": "py",
"fi... | 2.375 | stackv2 | #encoding:utf-8
import importlib
import logging
import random
import time
import yaml
import praw
import pymongo
import utils
from reporting_stuff import report_error
from utils import weighted_random_subreddit
def send_post(submission, r2t):
return r2t.send_simple(submission,
text='{title}\n\n{self_te... | 88 | 33.44 | 94 | 16 | 722 | python | [] | 0 | true | |
2024-11-18T21:51:44.117311+00:00 | 1,528,980,368,000 | 01d588fa1780e19713843d4e975c24f71861fdbf | 3 | {
"blob_id": "01d588fa1780e19713843d4e975c24f71861fdbf",
"branch_name": "refs/heads/master",
"committer_date": 1528980368000,
"content_id": "f92ef683d6a3e6bfd9b9e5fa2a03abe7274300f2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "58b89cc4fd837ffa4401b2576f75bd6d3c6eb5ee",
"extension": "py"... | 2.6875 | stackv2 | import re
from units import Units
from allies import Allies
from battalions import Battalions
from printoption import PrintOption
import itertools
class Army(object):
def __init__(self, units_config):
self.units_config = units_config
self.units = Units(units_config["units"])
self.allies = ... | 183 | 34.88 | 144 | 20 | 1,514 | python | [] | 0 | true | |
2024-11-18T21:51:44.970028+00:00 | 1,679,170,977,000 | d643c652f422f30460e650de5e66289c65ef0ba0 | 2 | {
"blob_id": "d643c652f422f30460e650de5e66289c65ef0ba0",
"branch_name": "refs/heads/master",
"committer_date": 1679170977000,
"content_id": "07707105b86ce15ae1a6b9fc4bc762cbbd7f0ce9",
"detected_licenses": [
"MIT"
],
"directory_id": "5ad7fee7e39bd99cf566eb9ca0828bc3b5a662f8",
"extension": "py",
"fi... | 2.484375 | stackv2 | import win32gui
from psutil import process_iter
class Windows:
def run_command(self, sim_name: str, host_game: bool) -> list[str]:
command = ["cmd", "/k", "Dominions5.exe", "--simpgui", "--nosteam"]
if host_game:
return command + ["-waxscog", "-T", sim_name]
return command + [... | 27 | 28.67 | 75 | 13 | 229 | python | [] | 0 | true | |
2024-11-18T21:51:45.198170+00:00 | 1,643,764,906,000 | 4363b2b930df048f9003dcacf723ddcb2a6b5d55 | 3 | {
"blob_id": "4363b2b930df048f9003dcacf723ddcb2a6b5d55",
"branch_name": "refs/heads/master",
"committer_date": 1643764906000,
"content_id": "0675a961daf595e72fadda178f129ecdd6668f3e",
"detected_licenses": [
"MIT"
],
"directory_id": "a16a883eb3a4c062a61e18e78fcc4dcdba6d13dd",
"extension": "py",
"fi... | 2.796875 | stackv2 | #!/usr/bin/env python
import requests
import urllib
import threading
import time
from BeautifulSoup import BeautifulSoup
target = "http://ropas.snu.ac.kr/~kwang/4190.310/mooc/"
response = requests.get(target)
page = str(BeautifulSoup(response.content))
def getURL(page):
start_link = page.find("a href")
if st... | 45 | 22.38 | 73 | 15 | 262 | python | [] | 0 | true | |
2024-11-18T21:51:45.512231+00:00 | 1,551,812,617,000 | 6ebc4baf76fa8e6ceed6d72127a4eed61b91e962 | 2 | {
"blob_id": "6ebc4baf76fa8e6ceed6d72127a4eed61b91e962",
"branch_name": "refs/heads/master",
"committer_date": 1551812617000,
"content_id": "14be06fdd2fe94746462492f532cce36734de3f7",
"detected_licenses": [
"MIT"
],
"directory_id": "7683231e52e68697e2dc385c047338d0f523a056",
"extension": "py",
"fi... | 2.390625 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from ...rule import Rule
class ClosedCaptionRule(Rule):
"""Closed caption rule."""
cc_re = re.compile(r'(\bcc\d\b)', re.IGNORECASE)
def execute(self, props, pv_props, context):
"""Execute closed caption rule."""
... | 18 | 24.72 | 73 | 13 | 105 | python | [] | 0 | true | |
2024-11-18T21:51:45.636201+00:00 | 1,634,194,301,000 | 9bd966c3c948e71ac53119d3fb12ee3aea9a7d15 | 3 | {
"blob_id": "9bd966c3c948e71ac53119d3fb12ee3aea9a7d15",
"branch_name": "refs/heads/master",
"committer_date": 1634194301000,
"content_id": "690b4091bbcb5d63816d73efe24c6d7526269093",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6a6c2284080d4eca58da0ccfda39c04f7aba15ce",
"extension": "py"... | 2.8125 | stackv2 | ########################################################################
## Arbitrary settings widget with string value interface
########################################################################
from PyQt5.QtWidgets import QWidget
from PyQt5.QtWidgets import QHBoxLayout
from PyQt5.QtCore import pyqtSignal
from ... | 80 | 39.25 | 103 | 17 | 650 | python | [] | 0 | true | |
2024-11-18T21:51:45.767348+00:00 | 1,525,354,282,000 | 6ad693044a1694dc527f85d75aa34366b9ad7ac1 | 3 | {
"blob_id": "6ad693044a1694dc527f85d75aa34366b9ad7ac1",
"branch_name": "refs/heads/master",
"committer_date": 1525354282000,
"content_id": "7e9ba45369cbb63a4b55839bb3c3672ae11b8b64",
"detected_licenses": [
"MIT"
],
"directory_id": "3bbaa9c9ef5506b11066043017a70202355f8766",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/usr/bin/env python
from __future__ import unicode_literals
import codecs
import glob
from pathlib import Path
from collections import Counter
import plac
from multiprocessing import Pool
from tqdm import tqdm
def count_words(fpath):
with codecs.open(fpath, encoding="utf8") as f:
words = f.read().spli... | 43 | 27.91 | 101 | 17 | 307 | python | [] | 0 | true | |
2024-11-18T21:51:46.665690+00:00 | 1,632,792,233,000 | dc75d6ec9235a172776508c5de79c8416b69db8d | 3 | {
"blob_id": "dc75d6ec9235a172776508c5de79c8416b69db8d",
"branch_name": "refs/heads/master",
"committer_date": 1632792233000,
"content_id": "64bf615289fa2f8a54df215294b88124d1da4d14",
"detected_licenses": [
"MIT"
],
"directory_id": "7def59c31ac77237b14741c068a78d1b31251bd4",
"extension": "py",
"fi... | 2.578125 | stackv2 | from typing import Optional, Union, List, Iterable
from discord import PartialEmoji, Emoji, InvalidArgument
from uuid import uuid1
from enum import IntEnum
__all__ = (
"Component",
"ButtonStyle",
"Button",
"Select",
"SelectOption",
"ActionRow",
"_get_component_type",
)
def _get_partial_... | 505 | 24.17 | 88 | 18 | 2,967 | python | [] | 0 | true | |
2024-11-18T21:51:46.923054+00:00 | 1,557,967,708,000 | 1291fdb217dbc3fb35daee604645adcef1845eb8 | 3 | {
"blob_id": "1291fdb217dbc3fb35daee604645adcef1845eb8",
"branch_name": "refs/heads/master",
"committer_date": 1557967708000,
"content_id": "60f4b66745b4704f3af89c124347e6730ee56b64",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c095cf5da567adce6ee83945444112873798e077",
"extension": "py"... | 2.546875 | stackv2 | import mxnet.gluon as gl
from mxnet import autograd, image
from mxnet.gluon import nn
from mxnet.gluon.data import DataLoader
from mxnet.gluon.data.vision import transforms, MNIST
from mxnet.gluon.nn import Sequential
from mxnet.ndarray import NDArray
transform: Sequential = transforms.Compose([
transforms.ToTens... | 64 | 24.23 | 86 | 15 | 414 | python | [] | 0 | true | |
2024-11-18T21:51:46.972159+00:00 | 1,689,777,597,000 | 47bfa4ab0a813cda1b9a959bf677ab216928af9e | 2 | {
"blob_id": "47bfa4ab0a813cda1b9a959bf677ab216928af9e",
"branch_name": "refs/heads/master",
"committer_date": 1689777597000,
"content_id": "e889d7cc52ae19a9bc3c5bd3affbd388fe5a600f",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "2fde997657c37a1adaece0b86fe546069c28b28f",
"extension": "p... | 2.34375 | stackv2 | import logging
import os
from qtpy.QtCore import Qt
from qtpy.QtGui import QDoubleValidator
from qtpy.QtWidgets import (
QCheckBox,
QDialog,
QDialogButtonBox,
QFileDialog,
QHBoxLayout,
QLabel,
QTextEdit,
QVBoxLayout,
)
from .useful_widgets import (
DoubleValidatorStrict,
LineEd... | 212 | 33.95 | 105 | 13 | 1,570 | python | [] | 0 | true | |
2024-11-18T21:51:47.034062+00:00 | 1,608,124,346,000 | 77ef9837f1ba8ea5d77e0d82e254abbb6ccb4f33 | 2 | {
"blob_id": "77ef9837f1ba8ea5d77e0d82e254abbb6ccb4f33",
"branch_name": "refs/heads/master",
"committer_date": 1608124346000,
"content_id": "18aae2fce559343774b420d3fbb231a8cfae4a79",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ad4b199f0e082e4b4fedb33f9d0932426d7e61d9",
"extension": "p... | 2.5 | stackv2 | #
# Copyright (c) 2012, 2013, 2017 NORDUnet A/S
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, t... | 97 | 38 | 103 | 16 | 953 | python | [] | 0 | true | |
2024-11-18T21:51:47.193363+00:00 | 1,686,846,777,000 | 7dab3148e318e530c7ee4c944bd14eea3e23acbc | 3 | {
"blob_id": "7dab3148e318e530c7ee4c944bd14eea3e23acbc",
"branch_name": "refs/heads/master",
"committer_date": 1686846777000,
"content_id": "e84a81ee778a063d20ed55e8397885379888be7c",
"detected_licenses": [
"MIT"
],
"directory_id": "cccb39f0c9916397dc9ee9a8326cefdb3027df6b",
"extension": "py",
"fi... | 2.984375 | stackv2 | import psutil
def get_running_applications():
running_apps = []
for proc in psutil.process_iter(['name']):
try:
app_name = proc.info['name']
running_apps.append(app_name)
except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
pass
retur... | 19 | 25.68 | 81 | 12 | 110 | python | [] | 0 | true | |
2024-11-18T21:51:47.350861+00:00 | 1,521,713,935,000 | bcd532ef42e82d89a0510d8b7baaf67750fa427e | 2 | {
"blob_id": "bcd532ef42e82d89a0510d8b7baaf67750fa427e",
"branch_name": "refs/heads/master",
"committer_date": 1521713935000,
"content_id": "ac83f58b5bbe96d6854176edecb6a9b920cee071",
"detected_licenses": [
"MIT"
],
"directory_id": "ccad801b58785246293d9e574dce0ca91079196d",
"extension": "py",
"fi... | 2.4375 | stackv2 | #!/usr/bin/env python
# coding: utf-8
import json
import socket
import time
import numpy as np
import sys
from cStringIO import StringIO
from PIL import ImageFile
# EDIT: replace with your caffe location.
caffe_root = "/home/jalayrac/src/caffe"
sys.path.insert(0, caffe_root+'/python')
import caffe
ImageFile.LOAD_TRUN... | 117 | 28.13 | 94 | 15 | 830 | python | [{"finding_id": "codeql_py/bind-socket-all-network-interfaces_1a945deba158e3f2_0866d73f", "tool_name": "codeql", "rule_id": "py/bind-socket-all-network-interfaces", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "'' binds a socket to all interfaces.", "remediation": "", "location": {"... | 1 | true | |
2024-11-18T21:51:47.501771+00:00 | 1,515,775,249,000 | 36bd4eab465b7f03f6891b6b5556d12149effd68 | 3 | {
"blob_id": "36bd4eab465b7f03f6891b6b5556d12149effd68",
"branch_name": "refs/heads/master",
"committer_date": 1515775249000,
"content_id": "7e653a360bc90ac111bf387924e834eb0fad0369",
"detected_licenses": [
"MIT"
],
"directory_id": "10e43b952ec2943214e3c93214d2fc8567299fd8",
"extension": "py",
"fi... | 3.078125 | stackv2 | from md5p import md5, padding
KEY = "secret"
#############
### Alice ###
#############
def createToken(message):
return md5(KEY + message).hexdigest()
###########
### bob ###
###########
def verifyToken(message, token):
return (token == md5(KEY + message).hexdigest())
###############
### Mallory ###
####... | 68 | 23.6 | 87 | 15 | 361 | python | [] | 0 | true | |
2024-11-18T21:51:47.874875+00:00 | 1,621,959,916,000 | 97490b75734179c87ecbfae574eab4782c8070db | 2 | {
"blob_id": "97490b75734179c87ecbfae574eab4782c8070db",
"branch_name": "refs/heads/master",
"committer_date": 1621959916000,
"content_id": "e5b953c4c3360fd4ba76fa38a7b40859e0d4f516",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "972541f0b0aadede0c47cc5b6af0cd4d1a1bef8b",
"extension": "py"... | 2.328125 | stackv2 | # -*- coding: utf-8 -*-
from flask import jsonify, make_response, request
import json
from app.api import GET, YES, bp, feats_tagger, ne_tagger, \
text_preprocessor, upos_tagger
from app.lib.phonetize import phonetize2
from app.lib.text_distance import compute_distance
@bp.route('/api/text-distan... | 66 | 31.08 | 78 | 16 | 521 | python | [] | 0 | true | |
2024-11-18T21:51:48.432242+00:00 | 1,543,594,712,000 | 843aaf1ae7be81e64786bdf25ed68325ac1d462f | 3 | {
"blob_id": "843aaf1ae7be81e64786bdf25ed68325ac1d462f",
"branch_name": "refs/heads/master",
"committer_date": 1543594712000,
"content_id": "df0a39c8ca3b90ae8ee7705c1f009b3eeb47660c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3bd070400eac4911c7a2d81618578600898f3aab",
"extension": "py"... | 2.515625 | stackv2 | from RappCloud.Objects import (
File,
Payload)
from Cloud import (
CloudMsg,
CloudRequest,
CloudResponse)
class EmailSend(CloudMsg):
""" Email Send Cloud Message object """
class Request(CloudRequest):
""" Email Send Cloud Request object.
EmailSend.Request
"""
... | 115 | 28.47 | 96 | 15 | 651 | python | [] | 0 | true | |
2024-11-18T21:51:48.681316+00:00 | 1,605,200,725,000 | 0c7d316291ad3365ec0850ab6d6f32e5ea0c8638 | 2 | {
"blob_id": "0c7d316291ad3365ec0850ab6d6f32e5ea0c8638",
"branch_name": "refs/heads/master",
"committer_date": 1605200725000,
"content_id": "483a8a4f3ca63585d813cfeaf4117ed7f84b925b",
"detected_licenses": [
"MIT"
],
"directory_id": "9249e5b0c8d521a3ee78d621e6f43162de3409c7",
"extension": "py",
"fi... | 2.421875 | stackv2 | from django import forms
class TodoForm(forms.Form):
title = forms.CharField(
max_length=30,
widget=forms.TextInput(
attrs={
'class': 'neshto-si',
}
)
)
description = forms.CharField()
bot_catcher = forms.CharField(
widget=forms... | 73 | 23.32 | 69 | 16 | 354 | python | [] | 0 | true | |
2024-11-18T21:51:48.764757+00:00 | 1,454,672,562,000 | af9a33e2722e789a7c8f220ca7886607168e5362 | 3 | {
"blob_id": "af9a33e2722e789a7c8f220ca7886607168e5362",
"branch_name": "refs/heads/master",
"committer_date": 1454672562000,
"content_id": "74bf83b33751997590e50aad7722df03d7749db7",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "e5dc2f423bcf59d4d0c9e9243db511d4977cc31c",
"extension": "p... | 2.625 | stackv2 | # -*- coding: utf8 -*-fr
# pylint: disable=too-many-instance-attributes, invalid-name
"""
HasEnclosure is a mixin representing the enclosure attached to some of the objects.
"""
from itopapi.model.prototype import ItopapiPrototype
__version__ = '1.0'
__authors__ = ['Julien Nauroy <julien.nauroy@u-psud.fr>']
class H... | 46 | 33 | 92 | 14 | 362 | python | [] | 0 | true | |
2024-11-18T21:52:04.905035+00:00 | 1,584,624,221,000 | ff870b9f282cdf33d51952cd2bd27a7b4399431b | 4 | {
"blob_id": "ff870b9f282cdf33d51952cd2bd27a7b4399431b",
"branch_name": "refs/heads/master",
"committer_date": 1584624221000,
"content_id": "86cae715028bb741d82f26c70a24204097922dd0",
"detected_licenses": [
"MIT"
],
"directory_id": "f3baf8b850c896231b4c254a22567fd5d7a5035c",
"extension": "py",
"fi... | 3.5 | stackv2 | class Local:
def __init__(self, lista: list):
self.__pessoas = lista
def entrada(self, pessoa: str):
if self.valida_entrada(pessoa):
if pessoa == '':
return True
self.__pessoas.append(pessoa)
return True
return False
def saida(s... | 69 | 41.14 | 151 | 16 | 745 | python | [] | 0 | true | |
2024-11-18T21:52:05.028153+00:00 | 1,576,626,927,000 | ef94d78c57120ca5169c0d56e3bcbec74ab19da2 | 3 | {
"blob_id": "ef94d78c57120ca5169c0d56e3bcbec74ab19da2",
"branch_name": "refs/heads/master",
"committer_date": 1576626927000,
"content_id": "046dd51c6b03f9318f4e2d9d34f9ef35ac3549d3",
"detected_licenses": [
"MIT"
],
"directory_id": "43a663d89c115452fdbfcb7e1c71252b573fac67",
"extension": "py",
"fi... | 2.90625 | stackv2 | import numpy as np
import pandas as pd
TITLE_NAME = "Team Averages NonZero"
SOURCE_NAME = "team_averages_nonzero"
LABELS = ["Team",
"Average Scale",
"Average Alliance Switch",
"Average Opponent Switch",
"Average Exchange"]
def get_team_data(manager):
teams_data = {}
fo... | 46 | 31.67 | 96 | 15 | 318 | python | [] | 0 | true | |
2024-11-18T21:52:05.202039+00:00 | 1,635,936,731,000 | 1f9dd0cd12a6750b5bf046045e0a48013fb564cc | 2 | {
"blob_id": "1f9dd0cd12a6750b5bf046045e0a48013fb564cc",
"branch_name": "refs/heads/main",
"committer_date": 1635936731000,
"content_id": "6bd330b65291ab9f6b7912002e22154dd6fcd5f0",
"detected_licenses": [
"MIT"
],
"directory_id": "736ce334ad738ce6b31c62cab1c54003c611c878",
"extension": "py",
"file... | 2.4375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This script turns the EIOPA and GLEIF register data into an RDF dataset
in turtle format. The resulting database can queried using the rdflib
package in python and is the basis for the translation machine.
Everything is happening in the main function.
Script is deriv... | 152 | 41.21 | 86 | 20 | 1,497 | python | [] | 0 | true | |
2024-11-18T21:52:05.252213+00:00 | 1,599,806,757,000 | b93671d2dc2db3487813f2455c6a069b31c7185c | 2 | {
"blob_id": "b93671d2dc2db3487813f2455c6a069b31c7185c",
"branch_name": "refs/heads/master",
"committer_date": 1599806757000,
"content_id": "5cd2162fb9e4a0e438032974903f10d22c51265c",
"detected_licenses": [
"MIT"
],
"directory_id": "1f1d706b7116b38b227887eb8dc23255713a8c8d",
"extension": "py",
"fi... | 2.34375 | stackv2 | import csv
from pyash import Move
mapping = {
'n°_de_transaction': 'id_transaction',
}
def clean(v):
v = v.lower().strip()
for s, d in (("'", ''), (' ', '_')):
v = v.replace(s, d)
return mapping.get(v, v)
def import_csv(filename):
lines = []
headers = []
with open(filename, 'r'... | 46 | 31.78 | 79 | 16 | 362 | python | [] | 0 | true | |
2024-11-18T21:52:05.358645+00:00 | 1,450,551,663,000 | 985a36144e7725d04d768ed70fe43e9a97e2139e | 2 | {
"blob_id": "985a36144e7725d04d768ed70fe43e9a97e2139e",
"branch_name": "refs/heads/master",
"committer_date": 1450551663000,
"content_id": "aafc25f92ece1cb87d5be8f035d526b86ad72931",
"detected_licenses": [
"Unlicense"
],
"directory_id": "17aff1646e41a8f1b0c1525f61aef4f0df34ccec",
"extension": "py",... | 2.421875 | stackv2 | # -*- coding: utf-8 -*-
from pyramid_torque_engine import orm
from pyramid_torque_engine import repo
from sqlalchemy import create_engine
from pyramid_basemodel import bind_engine, save, Session
import os
import datetime
import json
import requests
import transaction
AVAILABLE_CHANNELS = ['sms', 'email']
def disp... | 80 | 39.17 | 146 | 18 | 645 | python | [] | 0 | true | |
2024-11-18T21:52:05.424858+00:00 | 1,635,611,494,000 | f9d61ee3bf225fd2a30b6d6adc7f8035fa6b0494 | 3 | {
"blob_id": "f9d61ee3bf225fd2a30b6d6adc7f8035fa6b0494",
"branch_name": "refs/heads/master",
"committer_date": 1635611494000,
"content_id": "f1b7e9898a7023d334c68bd605aed9cc323f643c",
"detected_licenses": [
"MIT"
],
"directory_id": "6f2c93f5936f3f7dfd60881300d0442e1995184a",
"extension": "py",
"fi... | 2.53125 | stackv2 | #!/usr/bin/env python
""" Provides type declarations related to the PlayerAPI group """
from __future__ import annotations
from dataclasses import dataclass
from enum import Enum
from typing import Optional
class Lineout(Enum):
NoLineout = 0 # FIXME: Is this correct? Zero is not defined in the specification ... | 121 | 19.18 | 118 | 20 | 597 | python | [] | 0 | true | |
2024-11-18T21:52:05.476902+00:00 | 1,607,651,714,000 | 78092523302eab4a4b2c7298945733c29a80966d | 3 | {
"blob_id": "78092523302eab4a4b2c7298945733c29a80966d",
"branch_name": "refs/heads/main",
"committer_date": 1607651714000,
"content_id": "f158d2fa3c641cee2ba0fa8af616732d3921ee19",
"detected_licenses": [
"MIT"
],
"directory_id": "f36297ae835abe00bd8fbc073fbc91091de3b234",
"extension": "py",
"file... | 3.453125 | stackv2 | import utility
"""Day 03: Toboggan Trajectory """
grid = utility.inputs()
def check_slope(grid, x, y):
trees, pos = 0, 0
for idx, row in enumerate(grid):
if idx % y != 0:
continue
if row[pos % len(row)] == '#':
trees += 1
pos += x
return trees
... | 40 | 15.7 | 51 | 12 | 194 | python | [] | 0 | true | |
2024-11-18T21:52:05.781529+00:00 | 1,574,572,429,000 | 0d683b415431afb01d4b1c7f3d0bbe57751c65be | 2 | {
"blob_id": "0d683b415431afb01d4b1c7f3d0bbe57751c65be",
"branch_name": "refs/heads/master",
"committer_date": 1574572429000,
"content_id": "9c01918e1f28b707c8d2b7368a3f06e3268134e4",
"detected_licenses": [
"MIT"
],
"directory_id": "c7f1b4dbe684f627360646af81506dccdc2038b0",
"extension": "py",
"fi... | 2.421875 | stackv2 | import torch
from torch import nn
import torchvision
from torchvision import transforms
import numpy as np
import matplotlib.pyplot as plt
from svrg import SVRG_k, SVRG_0
device = 'cpu'
if torch.cuda.is_available():
device = 'cuda'
# Download MNIST dataset and set the valset as the test test
transform = transfor... | 116 | 36.05 | 149 | 18 | 1,066 | python | [] | 0 | true | |
2024-11-18T21:52:07.612808+00:00 | 1,464,253,992,000 | e6934793b369769a5e9c6eae7f907b8814d6cf24 | 3 | {
"blob_id": "e6934793b369769a5e9c6eae7f907b8814d6cf24",
"branch_name": "refs/heads/master",
"committer_date": 1464253992000,
"content_id": "29038315531914c51790745457c9b784cf16be84",
"detected_licenses": [
"MIT"
],
"directory_id": "69ec65a2fbc5cd36e046fba23ec750085d4abad6",
"extension": "py",
"fi... | 2.59375 | stackv2 | # -*- coding: UTF-8 -*-
#from sklearn.linear_model import LinearRegression
#from sklearn.cross_validation import train_test_split
#import numpy as np
import tempfile
import matplotlib
matplotlib.use('Agg') # this allows PNG plotting
import matplotlib.pyplot as plt
trans = {'price':u'Цена',
'room':u'Количество... | 113 | 30.12 | 107 | 13 | 1,048 | python | [] | 0 | true | |
2024-11-18T21:52:07.909513+00:00 | 1,623,624,767,000 | d9ef7a1e320d3656264d2050080a4ce92fd87b8c | 2 | {
"blob_id": "d9ef7a1e320d3656264d2050080a4ce92fd87b8c",
"branch_name": "refs/heads/main",
"committer_date": 1623624767000,
"content_id": "91b021d79e02ebf3dfe198ffc9eb200b6749845a",
"detected_licenses": [
"MIT"
],
"directory_id": "b65303347d9b5521ded3022f989a3bd99fb2d1a2",
"extension": "py",
"file... | 2.421875 | stackv2 | """
# REQUIREMENTS
pip3 install Flask
pip3 install Flask-SQLAlchemy
pip3 install psycopg2 # postgresql connector
pip3 install Flask-Migrate # used to migrate database
pip3 install Flask-Script # used to write commands & configs & scripts
superuser manages all items (units, boxes, users)
warehouse:
unit (org_id):
... | 407 | 29.4 | 160 | 22 | 3,004 | python | [] | 0 | true | |
2024-11-18T21:52:08.013699+00:00 | 1,493,662,079,000 | bff49f479c5f68bcdd1e5e8bbb9e004a8c72375a | 2 | {
"blob_id": "bff49f479c5f68bcdd1e5e8bbb9e004a8c72375a",
"branch_name": "refs/heads/master",
"committer_date": 1493662079000,
"content_id": "90ceafa5fb4d42def103fe097dedd0e239f61567",
"detected_licenses": [
"MIT"
],
"directory_id": "f8d51d553efb4bc6442f8f246fd3c827f3e624a2",
"extension": "py",
"fi... | 2.390625 | stackv2 | from model import Wavenet
import numpy as np
import librosa
import tensorflow as tf
audio_frequency = 3000
receptive_seconds = 0.65
filter_width = 2
residual_channels = 2
dilation_channels = 2
skip_channels = 2
quantization_channels = 256
audio_trim_secs = 9
data, _ = librosa.load("first.wav", audio_frequency)
if ... | 40 | 28.82 | 93 | 13 | 315 | python | [] | 0 | true | |
2024-11-18T21:52:08.071577+00:00 | 1,613,492,120,000 | c14a8d49e080460df5337c5f7dab8c6fd728107f | 2 | {
"blob_id": "c14a8d49e080460df5337c5f7dab8c6fd728107f",
"branch_name": "refs/heads/master",
"committer_date": 1613492120000,
"content_id": "832fa4bbccc27a190a1cc1b181e22470e05e185a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "14ec2c1c925acd607c3cb508a96cf83309aee577",
"extension": "py"... | 2.375 | stackv2 | from elasticsearch import Elasticsearch
import ujson as json
from tqdm import tqdm
import re
class Elastic:
def __init__(self, server):
self.es = Elasticsearch(hosts=[server])
def create_index(self, index_config, input_path, index_name='idx'):
batch_size = 100000
delete_index = True
... | 124 | 40.75 | 109 | 26 | 1,040 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_9712e1e07c8ad59d_f41fdffb", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [http://dbpedia.org/](1) may be at an arbitrary positio... | 1 | true | |
2024-11-18T21:52:08.126503+00:00 | 1,579,109,530,000 | afea9db5ed97ef1d4bb190c30a5826d9f898b452 | 3 | {
"blob_id": "afea9db5ed97ef1d4bb190c30a5826d9f898b452",
"branch_name": "refs/heads/master",
"committer_date": 1579109530000,
"content_id": "ae7a35357c71071e3e57198e482caf0cd856bf8d",
"detected_licenses": [
"MIT"
],
"directory_id": "aae1fb4e22d897a17591f7c84fdeacfe7ebe3f77",
"extension": "py",
"fi... | 2.546875 | stackv2 | import json
import sentry_sdk
import logging
from credentials import credentials
sentry_sdk.init(credentials.load("sentry"))
def write_json(outfile, data):
with open(outfile, 'w') as f:
f.write(json.dumps(data))
f.close()
return True
def read_json(outfile):
ret = None
with open(outf... | 53 | 20.04 | 75 | 11 | 264 | python | [] | 0 | true | |
2024-11-18T21:52:08.342309+00:00 | 1,417,714,770,000 | 4bbff5d4428e2b09e55726ed7947a1b25cfb7fb1 | 3 | {
"blob_id": "4bbff5d4428e2b09e55726ed7947a1b25cfb7fb1",
"branch_name": "refs/heads/master",
"committer_date": 1417714770000,
"content_id": "dd4d57c8f71e53f81ad028284363c0dc5f059d8b",
"detected_licenses": [
"Unlicense"
],
"directory_id": "80b3138677e298f1fb269a33439e1a6dab26b595",
"extension": "py",... | 2.515625 | stackv2 | from django.db import models
from shop.models.productmodel import Product
class Distributor(models.Model):
"""Master data: Information about distributors."""
name = models.CharField(max_length=256)
class Meta:
ordering = ['name']
def __unicode__(self):
return self.name
class LED(Pr... | 26 | 29.15 | 69 | 10 | 168 | python | [] | 0 | true | |
2024-11-18T21:52:08.469465+00:00 | 1,692,623,853,000 | 491274f7ec26714ad9866651fda23ec1a5a7898c | 3 | {
"blob_id": "491274f7ec26714ad9866651fda23ec1a5a7898c",
"branch_name": "refs/heads/main",
"committer_date": 1692623853000,
"content_id": "22e2bf1296c44e92d6b8591a910779240be11d46",
"detected_licenses": [
"MIT"
],
"directory_id": "50fa285d7071b73cf1cd00f13f4785d2e560bd86",
"extension": "py",
"file... | 2.515625 | stackv2 | #!/usr/bin/env python3
import argparse
import pandas as pd
def main():
args = parse_arguments()
df_pangolin = (
pd.read_csv(
args.pangolin,
usecols=["taxon", "lineage", "scorpio_call"],
dtype={"taxon": str, "lineage": str, "scorpio_call": str},
)
.... | 66 | 27.06 | 94 | 17 | 453 | python | [] | 0 | true | |
2024-11-18T21:52:08.573111+00:00 | 1,671,470,078,000 | 0328bcdfea375df2b6347aa30cdfb938f1627c4c | 2 | {
"blob_id": "0328bcdfea375df2b6347aa30cdfb938f1627c4c",
"branch_name": "refs/heads/master",
"committer_date": 1671470337000,
"content_id": "4107140ece4274101e74dd4879d3e899e285ecc4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9b59c5ce1b57b8bd066fcee4b55c821893bc50fb",
"extension": "py"... | 2.46875 | stackv2 | # coding=utf-8
# Copyright 2022 The Balloon Learning Environment 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 207 | 33.08 | 80 | 17 | 1,833 | python | [] | 0 | true | |
2024-11-18T21:52:08.685564+00:00 | 1,693,203,317,000 | fc64e472e77df5475d89b522ddf35f0d75470309 | 3 | {
"blob_id": "fc64e472e77df5475d89b522ddf35f0d75470309",
"branch_name": "refs/heads/master",
"committer_date": 1693203317000,
"content_id": "2d424ff48fd19c487a47f6b04eeb1b45c931d933",
"detected_licenses": [
"MIT"
],
"directory_id": "e3258f186ce3aa841891eb56213ade500c258fb4",
"extension": "py",
"fi... | 2.796875 | stackv2 | # -*- coding: utf-8 -*-
# Copyright : INSEE, 2021
from pynsee.localdata._get_insee_one_area import _get_insee_one_area
import pandas as pd
from tqdm import trange
from warnings import warn
def get_included_area(area_type, codeareas):
"""Get all areas included in the list of areas provided
Args:
area... | 42 | 28.02 | 116 | 12 | 312 | python | [] | 0 | true | |
2024-11-18T21:52:08.784951+00:00 | 1,586,330,072,000 | 17e8e974d915cbaa44cf517b34919a08832c1a48 | 3 | {
"blob_id": "17e8e974d915cbaa44cf517b34919a08832c1a48",
"branch_name": "refs/heads/master",
"committer_date": 1586330072000,
"content_id": "eccc9439e4e8eea37ed0be4ced70bcade724444e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "cac9947cec2aace94fb4a7c69fd32654bb53e853",
"extension": "p... | 2.765625 | stackv2 | from typing import List
class Place(object):
place_id: int
booked: int
used: int
user_booked: int
user_used: int
province_name: str
deal_title: str
place_name: str
business_name: str
def __init__(self,
place_id: int,
booked: int,
... | 44 | 24.02 | 58 | 11 | 254 | python | [] | 0 | true | |
2024-11-18T21:52:09.068768+00:00 | 1,611,433,269,000 | e1909e35d483b03ca7642111032d8a3643a9d1bb | 3 | {
"blob_id": "e1909e35d483b03ca7642111032d8a3643a9d1bb",
"branch_name": "refs/heads/master",
"committer_date": 1611433269000,
"content_id": "b1660418478528448a0980be5a1e7a44cba22203",
"detected_licenses": [
"MIT"
],
"directory_id": "70ee9e4d75133f271fd2388fccbf6cf10476e1c5",
"extension": "py",
"fi... | 3 | stackv2 | import pandas as pd
insurance = pd.read_csv("https://raw.githubusercontent.com/EvidenceN/Insurance_premium_prediction/master/data/auto_insurance_data.csv")
pd.options.display.max_columns = 999
insurance.head()
insurance.shape
from pandas_profiling import ProfileReport
#profile = ProfileReport(insurance)
#... | 375 | 26.03 | 135 | 12 | 2,184 | python | [] | 0 | true | |
2024-11-18T21:52:09.132256+00:00 | 1,666,360,997,000 | 53fdc37e79ef65594c42fceb56362c04b1c1ab1e | 2 | {
"blob_id": "53fdc37e79ef65594c42fceb56362c04b1c1ab1e",
"branch_name": "refs/heads/master",
"committer_date": 1666360997000,
"content_id": "110643ca55affb16c89c45190f0f8b71b4f20af4",
"detected_licenses": [
"MIT"
],
"directory_id": "a7cca49626a3d7100e9ac5c2f343c351ecb76ac7",
"extension": "py",
"fi... | 2.46875 | stackv2 | import hashlib
from binascii import hexlify
import os
import re
def _expand_dirs_recursive(dir):
if '*' not in dir:
return [dir]
if len(dir.split('/')) > 1:
dir_matchs = []
root_dir, b_dir = dir.rsplit('/', 1)
for _rdir in _expand_dirs_recursive(root_dir):
dir_match... | 159 | 35.7 | 85 | 29 | 1,294 | python | [] | 0 | true | |
2024-11-18T21:52:09.406029+00:00 | 1,605,627,207,000 | 406bdf37cd49bf72623e7b9884f8ae35e6ce1c21 | 3 | {
"blob_id": "406bdf37cd49bf72623e7b9884f8ae35e6ce1c21",
"branch_name": "refs/heads/master",
"committer_date": 1605627207000,
"content_id": "5498e09370683f6df01d3e4ab8baf6814b8f3951",
"detected_licenses": [
"MIT"
],
"directory_id": "4e61a2fc9ded3f5547c7741a68c8ba418aa0452e",
"extension": "py",
"fi... | 2.71875 | stackv2 | from .models import Borrower
from fintools.settings import get_logger
logger = get_logger(name="__main__")
DEFAULT_FILENAME = "./borrowers/candidates.json"
class Main:
@staticmethod
def show(file: str = DEFAULT_FILENAME) -> str:
logger.info("Calling the show method.")
# TODO: read file and ... | 25 | 28.92 | 82 | 12 | 172 | python | [] | 0 | true | |
2024-11-18T21:52:09.530872+00:00 | 1,577,374,603,000 | ee7604a2738d3526c0d0c926e3d20c17846e575d | 3 | {
"blob_id": "ee7604a2738d3526c0d0c926e3d20c17846e575d",
"branch_name": "refs/heads/master",
"committer_date": 1577374603000,
"content_id": "7f9023f51d6bdc5c9f8f37a61320315b67cdb184",
"detected_licenses": [
"MIT"
],
"directory_id": "d329db2f0e5220075f7035dd77a64c80bac053d7",
"extension": "py",
"fi... | 3.0625 | stackv2 | import sys
# import libraries
import nltk
nltk.download(['punkt', 'wordnet', 'averaged_perceptron_tagger'])
import re
import numpy as np
import pandas as pd
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from sqlalchemy import create_engine
from sklearn.model_selection import GridSearch... | 183 | 28.72 | 112 | 15 | 1,271 | python | [{"finding_id": "codeql_py/overly-large-range_82d8d115499b576c_b39427bb", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | |
2024-11-18T21:52:09.682434+00:00 | 1,540,870,454,000 | ee7540c3aca0d47d1aad5dfc1212eb056948bcb4 | 3 | {
"blob_id": "ee7540c3aca0d47d1aad5dfc1212eb056948bcb4",
"branch_name": "refs/heads/master",
"committer_date": 1540870454000,
"content_id": "e16543d7a1b4ce3313d7d947b7c04563e052b992",
"detected_licenses": [
"MIT"
],
"directory_id": "ddf6acfb77bd0cbc87e6e3f429c1d714ee02d363",
"extension": "py",
"fi... | 2.671875 | stackv2 | # ------------------------------------------------------------------ #
# RRLattice_singleSide.py
# ------------------------------------------------------------------ #
#
# A series of Ring Resonator's for 3D printing testing purposes.
# Coupling is performed on one side for simplicity
#
# ------------------------------... | 224 | 39.75 | 93 | 20 | 2,160 | python | [] | 0 | true | |
2024-11-18T21:52:09.871526+00:00 | 1,429,642,682,000 | ee2585cd0d62309fab7989bbaaabc2d2d8170b7b | 3 | {
"blob_id": "ee2585cd0d62309fab7989bbaaabc2d2d8170b7b",
"branch_name": "refs/heads/master",
"committer_date": 1429642682000,
"content_id": "d38fd78ddeefca993c4f1289bc37a129a0ce83d1",
"detected_licenses": [
"MIT"
],
"directory_id": "aa5eaef7322736e0d8ffe613ec5f8c20c5f34644",
"extension": "py",
"fi... | 2.84375 | stackv2 | import Queue
from threading import Thread
from diamond_game import Conf
class Event(object):
"""Generic event class, all Events should extend this class"""
def __init__(self, name):
self.name = name
class TickEvent(Event):
def __init__(self):
Event.__init__(self, "Tick Event")
class Qu... | 317 | 28.08 | 91 | 15 | 2,076 | python | [] | 0 | true | |
2024-11-18T21:52:10.251568+00:00 | 1,615,692,557,000 | e18d8635e3a749e5481db541dedd1a23fd2633cd | 3 | {
"blob_id": "e18d8635e3a749e5481db541dedd1a23fd2633cd",
"branch_name": "refs/heads/main",
"committer_date": 1615692557000,
"content_id": "474a6384a5712f63720248e84cfb3e26437baa69",
"detected_licenses": [
"Unlicense"
],
"directory_id": "1b7e2ab72569063e63728b909415f4b3789bafa0",
"extension": "py",
... | 2.671875 | stackv2 | import sys
import discord
from discord.ext import commands
from google.cloud import texttospeech
from gtts import gTTS
from pathlib import Path
import hashlib
import time
class VoiceCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def join(self, ctx, *, channel:... | 100 | 36.34 | 133 | 21 | 798 | python | [] | 0 | true | |
2024-11-18T21:52:11.631892+00:00 | 1,313,214,747,000 | ff9fa22319deef5e9bea4676689e53df5ce85c66 | 3 | {
"blob_id": "ff9fa22319deef5e9bea4676689e53df5ce85c66",
"branch_name": "refs/heads/master",
"committer_date": 1313214747000,
"content_id": "1e56747b08dd1f0471e094435d8bf88cdce0e8fe",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c7328c278da9615794fd3faa9a57214c6e86ecfd",
"extension": "py"... | 3.296875 | stackv2 | #!/usr/bin/env python
#
# Copyright 2011 Rodrigo Ancavil del Pino
#
# 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 applica... | 149 | 28.21 | 86 | 18 | 1,077 | python | [] | 0 | true | |
2024-11-18T21:52:11.709331+00:00 | 1,579,051,853,000 | e9a409c39f5515587e716645e1720ac9206bdb9e | 2 | {
"blob_id": "e9a409c39f5515587e716645e1720ac9206bdb9e",
"branch_name": "refs/heads/master",
"committer_date": 1579051853000,
"content_id": "7867dedb02a963441f3002905db8bc498de383e1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f87ec06db17a141442107fe72a6382817a0f80e2",
"extension": "py"... | 2.5 | stackv2 | # -*- coding: utf-8 -*-
import pymysql
from log.logger import log
db_item = pymysql.connect(host="localhost", user="root", password="jszxsyd0128",
db="jd_comment", port=3306, charset='utf8')
cur_item = db_item.cursor()
class Sql:
@classmethod
def insert_new_comment(x, comment_type, ... | 34 | 29.21 | 82 | 13 | 236 | python | [] | 0 | true | |
2024-11-18T21:52:11.865100+00:00 | 1,679,264,550,000 | 91133c0ed0e3587a579c73c7634aeb176a1c692c | 3 | {
"blob_id": "91133c0ed0e3587a579c73c7634aeb176a1c692c",
"branch_name": "refs/heads/main",
"committer_date": 1679264550000,
"content_id": "88bcd073d312c2f94dce52661fc21fd161839950",
"detected_licenses": [
"MIT"
],
"directory_id": "642c2a9361e19be9aa5d53efe82f4a0aa3160356",
"extension": "py",
"file... | 2.71875 | stackv2 | """Utilities for using WebLogo from Python."""
__author__ = 'DV Klopfenstein'
__copyright__ = "Copyright 2014-2015, DV Klopfenstein. All rights reserved."
__license__ = "GPL"
import os
import sys
import weblogolib as WL
import corebio as CB
from corebio.seq import Seq, SeqList, Alphabet
class BcSeqList(SeqList):
... | 44 | 34.02 | 86 | 17 | 419 | python | [] | 0 | true | |
2024-11-18T21:52:11.912854+00:00 | 1,595,550,747,000 | 55c8865c19f893a91aa5aa7ac0d32d0f04b11941 | 3 | {
"blob_id": "55c8865c19f893a91aa5aa7ac0d32d0f04b11941",
"branch_name": "refs/heads/master",
"committer_date": 1595550747000,
"content_id": "785d819994cec9ea1fcb0fb3c5c7d972fadaeba3",
"detected_licenses": [
"MIT"
],
"directory_id": "37cdc0d1cea57b0a65cc387f7e05c64e0a64fa16",
"extension": "py",
"fi... | 2.78125 | stackv2 | import os
import pandas as pd
def rentabilidade_dia(titulo):
files = os.listdir(path="data")
# from 15 to 15 is the date in the format YYYY-MM-DD
data_slice = slice(15, 25)
df = pd.DataFrame()
for filename in files:
df_aux = pd.read_json("data/" + filename)
df_aux["data_carga"]... | 33 | 25.64 | 74 | 15 | 238 | python | [] | 0 | true | |
2024-11-18T21:52:11.968265+00:00 | 1,592,481,644,000 | 3de982be3065b44441618f6c138a45322910c30d | 3 | {
"blob_id": "3de982be3065b44441618f6c138a45322910c30d",
"branch_name": "refs/heads/master",
"committer_date": 1592481644000,
"content_id": "b325af2515014c5862debe84b159c5df65f9e2ef",
"detected_licenses": [
"Zlib"
],
"directory_id": "9763f4fc253f7792cc47399266cbb4a02c0e4ce3",
"extension": "py",
"f... | 2.671875 | stackv2 | from typing import Union, Tuple
from sfml import sf
from ..data.game_obj import GameObject
from ..data.callbacks import HasCallbacks, callback
from ..core.sprites import AnimPlayer
from ..core.text import BitmapText
from ..core.utils import to_Vector2
from .styles import ButtonStyle
class Button(GameObject, HasCall... | 102 | 32.88 | 120 | 18 | 777 | python | [] | 0 | true | |
2024-11-18T21:52:12.764392+00:00 | 1,680,188,027,000 | 346d957dbd4b82d80cfec6210daa09ff30e1a050 | 3 | {
"blob_id": "346d957dbd4b82d80cfec6210daa09ff30e1a050",
"branch_name": "refs/heads/master",
"committer_date": 1680188027000,
"content_id": "d9afcd2ecb9dcb0269bebf89860554ffb2e65d22",
"detected_licenses": [
"MIT"
],
"directory_id": "add5aaa1d56a7c6224fa79165d3a45d9cfc25fff",
"extension": "py",
"fi... | 2.640625 | stackv2 | from . import Globals
import numpy as np
def _CompareUpdates(newdates,newfiles,idx):
'''
This routine will compare the FTP data with the local data to see
which need updating.
Inputs:
newdates: list of update dates as read in from the FTP site
newfiles: list of file names (original) from fTP site
idx: loc... | 33 | 22.91 | 67 | 16 | 219 | python | [] | 0 | true | |
2024-11-18T21:52:12.968319+00:00 | 1,511,304,797,000 | 24070afcbb76b4cf0adfbb11ef4ca5df5ad197b8 | 3 | {
"blob_id": "24070afcbb76b4cf0adfbb11ef4ca5df5ad197b8",
"branch_name": "refs/heads/master",
"committer_date": 1511304797000,
"content_id": "45c17d167f9a55fa6d680d4c1a9157c97f8e2a5f",
"detected_licenses": [
"MIT"
],
"directory_id": "1736c47e240a344eb04fd5e3b229c63169619596",
"extension": "py",
"fi... | 3.21875 | stackv2 | #!/usr/bin/env python
#from __future__ import division
import sys
import getopt
MATCH = "match"
OFF_BY_ONE = "off by one"
NO_MATCH = "no match"
NUM = "number of barcodes"
def get_whitelisted_barcodes(barcode_path):
'''
Retrieve the whitelisted barcodes from file
'''
whitelisted_barcodes = []
with... | 174 | 35.45 | 118 | 16 | 1,580 | python | [] | 0 | true | |
2024-11-18T21:52:13.120985+00:00 | 1,460,184,485,000 | 1df74ba913551ee3ebb5aeff137906c14c180048 | 3 | {
"blob_id": "1df74ba913551ee3ebb5aeff137906c14c180048",
"branch_name": "refs/heads/master",
"committer_date": 1460184485000,
"content_id": "f413273fa77227d77915b00c39ee183cc320a0fd",
"detected_licenses": [
"MIT"
],
"directory_id": "c55a672805a53e5cf8280c55f6cf1e500ce8fc2e",
"extension": "py",
"fi... | 2.671875 | stackv2 | from simulator import Simulator, Action
import logging
import time
logging.basicConfig()
class Agent():
def get_action(self, gamestate, who):
raise NotImplementedError()
class HumanAgent(Agent):
def get_action(self, gamestate, who):
valid = False
my_team = gamestate.get_team(who)
... | 140 | 40.91 | 117 | 20 | 1,308 | python | [] | 0 | true | |
2024-11-18T21:52:15.083091+00:00 | 1,559,625,891,000 | 27aa1c2ab17d2df7e7ffc6829545a1e90fda09ef | 3 | {
"blob_id": "27aa1c2ab17d2df7e7ffc6829545a1e90fda09ef",
"branch_name": "refs/heads/master",
"committer_date": 1559625891000,
"content_id": "1d7b18ca067f3672da08f31fec08665b4cffc1f2",
"detected_licenses": [
"MIT"
],
"directory_id": "6eccd9a439feae048bd9025951907c917e8d87f8",
"extension": "py",
"fi... | 2.859375 | stackv2 | import random
import string
from flask import Blueprint, redirect, request
from lil_url.helpers.redis_helper import get_redis
def shorten_url(url, url_slug=None, expiry=None):
"""Shortens the real URL to short URL.
Parameters
----------
`url`: <String>
Long URL which is to be shorten.
... | 111 | 22.49 | 89 | 12 | 606 | python | [] | 0 | true | |
2024-11-18T21:52:15.140595+00:00 | 1,548,758,328,000 | df4af46f46c4082f8d1faffd5ef6dd9ec45f5023 | 3 | {
"blob_id": "df4af46f46c4082f8d1faffd5ef6dd9ec45f5023",
"branch_name": "refs/heads/master",
"committer_date": 1548758328000,
"content_id": "6eaf62ea5b24f446b0b9126d3c1e4a01b8d33f3c",
"detected_licenses": [
"MIT"
],
"directory_id": "3d82121b5203b39afbd85999ca66db8ca44181f9",
"extension": "py",
"fi... | 2.71875 | stackv2 | import json
import os
import requests
from bs4 import BeautifulSoup
import Globals
class CustomJSONEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, ComicStripInfo):
return o.__dict__
super().default(self, o)
def decode_object(o):
data = ComicStripInfo()
da... | 295 | 25.3 | 108 | 16 | 1,764 | python | [] | 0 | true | |
2024-11-18T21:52:15.930461+00:00 | 1,626,538,675,000 | a38186e4a7a4df7a8fbfa74d817a1d0bb24d5275 | 4 | {
"blob_id": "a38186e4a7a4df7a8fbfa74d817a1d0bb24d5275",
"branch_name": "refs/heads/main",
"committer_date": 1626538675000,
"content_id": "140b3db44bb6ab17f9821e2f2000542ff991b375",
"detected_licenses": [
"MIT"
],
"directory_id": "093f60410ed3bc8368341683c6747054e0975da9",
"extension": "py",
"file... | 3.71875 | stackv2 | # Import package
import sys
import numpy as np
# Implementation of the class RLInteraction. It'll be based on the assumption that
# an agent is interacting with an environment to solve an episodic task
class RLInteraction(object):
# Constructor
def __init__(self):
"""
Constructor used for initi... | 228 | 36.79 | 110 | 15 | 1,871 | python | [] | 0 | true | |
2024-11-18T21:52:16.226178+00:00 | 1,497,972,824,000 | b5939fd3cd4054a4b32a791f66f111b453aa79d4 | 4 | {
"blob_id": "b5939fd3cd4054a4b32a791f66f111b453aa79d4",
"branch_name": "refs/heads/master",
"committer_date": 1497972824000,
"content_id": "6149f68969beae22fc7b17b3e8975491e3faa8b8",
"detected_licenses": [
"MIT"
],
"directory_id": "11596789ad46e74cc4d905b6ee0524642e3cd45b",
"extension": "py",
"fi... | 3.78125 | stackv2 | class Dque(object):
"""init the deque object"""
def __init__(self):
self.head = None
self.tail = None
self.next_node = None
self.pre_node = None
self.value = None
self.len = 0
def append(self, val):
""" append a new value to the tail of the dque"""
... | 71 | 25.75 | 58 | 13 | 457 | python | [] | 0 | true | |
2024-11-18T21:52:16.494866+00:00 | 1,598,414,535,000 | 6ef69b971819d8868cd2518fcf1303860ec3150f | 3 | {
"blob_id": "6ef69b971819d8868cd2518fcf1303860ec3150f",
"branch_name": "refs/heads/master",
"committer_date": 1598414535000,
"content_id": "1a48a7967ae667b3e868b83f04fd34b1dc8e2e4e",
"detected_licenses": [
"MIT"
],
"directory_id": "020489cba4beed34f126c4e6722d041e95def0b0",
"extension": "py",
"fi... | 3.171875 | stackv2 | from lib.interface.cores import c
from lib.interface.valida import leiaInt
def linha(s, x=60, cor=0):
print(f'{c(cor)}{s}'*x, f'{c(0)}')
def cabecalho(x, msg):
linha(x, cor=9)
print('{}{}{}'.format(c(11), msg.center(60), c(0)))
linha(x, cor=9)
def menu(lst):
cabecalho('-', 'MENU PRINCIPAL')
... | 24 | 19.88 | 55 | 13 | 184 | python | [] | 0 | true | |
2024-11-18T21:52:16.859075+00:00 | 1,618,207,808,000 | 9d9f18d77bb30e0241b7104177d41c6f6464a173 | 2 | {
"blob_id": "9d9f18d77bb30e0241b7104177d41c6f6464a173",
"branch_name": "refs/heads/master",
"committer_date": 1618207808000,
"content_id": "a07f8293c22a35bbc5f4c2dcc26073c350c22b01",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "da6116a3c24912183cddb6138bc8dd1604993af0",
"extension": "p... | 2.421875 | stackv2 | """
An example of the Coates Idea on the digits dataset.
"""
import os
import sys
import logging
import time
import scipy
import numpy as np
from sklearn.preprocessing import LabelBinarizer, StandardScaler
from sklearn.decomposition import PCA
from sklearn.model_selection import train_test_split
from sklearn.model_se... | 106 | 33.18 | 154 | 17 | 965 | python | [] | 0 | true | |
2024-11-18T21:52:16.969349+00:00 | 1,588,267,666,000 | 94b96c3a1b37099700cc5c49278e8c8bbf3a1566 | 3 | {
"blob_id": "94b96c3a1b37099700cc5c49278e8c8bbf3a1566",
"branch_name": "refs/heads/master",
"committer_date": 1588267666000,
"content_id": "085f84eb5b8dc74289d38608bb499a150c3d1a48",
"detected_licenses": [
"MIT"
],
"directory_id": "a94eed8e5391ba1f80b2e4a9b09d58e9cb23132c",
"extension": "py",
"fi... | 3.21875 | stackv2 | from nltk.corpus import wordnet
import re
LEMMAS = {"EN" : list(wordnet.all_lemma_names(lang="eng")),
"ES": list(wordnet.all_lemma_names(lang="spa")),
"CA": list(wordnet.all_lemma_names(lang="cat"))}
# association between language codes as defined in this project, and wordnet
LANGUAGES = {"EN"... | 129 | 37.94 | 136 | 19 | 1,224 | python | [] | 0 | true | |
2024-11-18T21:52:17.140405+00:00 | 1,608,072,823,000 | 02e9ef76b8fcb52d0850c5a15b61ae6c4171d879 | 3 | {
"blob_id": "02e9ef76b8fcb52d0850c5a15b61ae6c4171d879",
"branch_name": "refs/heads/master",
"committer_date": 1608072823000,
"content_id": "698c5d8a15733950bcab2ec32dc9ff9f81406e62",
"detected_licenses": [
"MIT"
],
"directory_id": "9704021efd90a5eb844050c6e0dda767b1dbd445",
"extension": "py",
"fi... | 3.25 | stackv2 | from datetime import datetime
from collections import defaultdict
import pandas as pd
class card:
manager_pwd = 7777
'''
Contains base card class attribute and methods
Attributes:
-----------
acct_title : str
the name of the account holder
acct_no : int
... | 152 | 31.09 | 103 | 17 | 1,001 | python | [] | 0 | true | |
2024-11-18T21:52:17.246880+00:00 | 1,542,802,510,000 | 947de0532d90afe08251ff3a7863cbe5afbaed3f | 2 | {
"blob_id": "947de0532d90afe08251ff3a7863cbe5afbaed3f",
"branch_name": "refs/heads/master",
"committer_date": 1542802510000,
"content_id": "0d4e6f66c37fe5c488622b6687bb429e8b697f4c",
"detected_licenses": [
"MIT"
],
"directory_id": "8b989bbd49e8096e258eff1b099c19e613f4d689",
"extension": "py",
"fi... | 2.375 | stackv2 | from pathlib import Path
import os
from kivy.app import App
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.uix.relativelayout import RelativeLayout
from kivy.properties import ObjectProperty
from kivy.core.text import LabelBase
from kivy.resources import resource_add_path
from kivy.config import Co... | 124 | 28.77 | 78 | 15 | 788 | python | [] | 0 | true | |
2024-11-18T21:52:17.429008+00:00 | 1,675,072,007,000 | 8da52f94a966c1b133c9c9eb2c3ccf844226f76a | 3 | {
"blob_id": "8da52f94a966c1b133c9c9eb2c3ccf844226f76a",
"branch_name": "refs/heads/master",
"committer_date": 1675072007000,
"content_id": "0591d0f0cb51bdfe8e26f5c5d392e543298b4334",
"detected_licenses": [
"MIT"
],
"directory_id": "9bd49e3373a88a95b82df6278cc4d4b0ef5fbc1d",
"extension": "py",
"fi... | 3.3125 | stackv2 | import tkinter as tk
class App(tk.Tk):
def __init__(self):
super().__init__()
self.title("Drag and drop")
self.dnd_item = None
self.canvas = tk.Canvas(self, bg="white")
self.canvas.pack()
self.canvas.create_rectangle(30, 30, 60, 60, fill="green",
... | 34 | 30.82 | 66 | 12 | 277 | python | [] | 0 | true | |
2024-11-18T21:52:17.556431+00:00 | 1,659,117,655,000 | 615791b0f0eebbd2c19ccd98f0cb8fb76060f4fc | 3 | {
"blob_id": "615791b0f0eebbd2c19ccd98f0cb8fb76060f4fc",
"branch_name": "refs/heads/master",
"committer_date": 1659117655000,
"content_id": "f4510cd0c9e48edfb845e689c771006f1a279b89",
"detected_licenses": [
"MIT"
],
"directory_id": "bc8dc81f0ebed37ef88f3b845fbcc1c29f72ab5f",
"extension": "py",
"fi... | 2.984375 | stackv2 | '''
teslawatch package
'''
import sys
from geopy import Nominatim
def fatalError(msg):
"""Print error message and exit
"""
sys.stderr.write(f"Error: {msg}\n")
sys.exit(1)
#def warning(msg):
# """Print warning message and return
# """
# sys.stderr.write(f"Warning: {msg}\n")
def dictDiff(... | 63 | 23.94 | 77 | 13 | 387 | python | [] | 0 | true | |
2024-11-18T21:52:17.776151+00:00 | 1,425,170,530,000 | ef50c1967b04294b9ddc1dca9397c0c83ba327e9 | 3 | {
"blob_id": "ef50c1967b04294b9ddc1dca9397c0c83ba327e9",
"branch_name": "refs/heads/master",
"committer_date": 1425170534000,
"content_id": "1dbb02f379ae71786659513965924211358f680c",
"detected_licenses": [
"MIT"
],
"directory_id": "0872d503ca08a115a654518c70f000e925a9b480",
"extension": "py",
"fi... | 2.671875 | stackv2 | import re
import requests
from collections import deque
from bs4 import BeautifulSoup
from . import db
from .models import Instructor, Department, Course, Term, Rating
def run():
"""A breadth-first search on the graph of Ninja Courses data.
We view each department, course, and instructor as a node,
to be p... | 173 | 42.28 | 85 | 21 | 1,654 | python | [] | 0 | true | |
2024-11-18T21:52:17.952690+00:00 | 1,547,391,211,000 | 6d1598e1d04b9bd424f6e424ff0b6c50a4327a5d | 2 | {
"blob_id": "6d1598e1d04b9bd424f6e424ff0b6c50a4327a5d",
"branch_name": "refs/heads/master",
"committer_date": 1547391211000,
"content_id": "8e1a0e68585c9f7e6674b0add8bdea795c4a4538",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "de00fc76a5ed53633273b73a59f8ea12d98b5323",
"extension": "py"... | 2.359375 | stackv2 | import scrapy
import json
import os
'''
从行情宝拉取当天的猪价行情(具体到各地级市)
每个省输出一个json文件。
'''
class PigpriceDetailSpider(scrapy.Spider):
name = "pigpriceDetail"
start_urls = [
# 上海
'http://hqb.nxin.com/hqb/areapriceinfo-1.shtml',
# 云南
'http://hqb.nxin.com/hqb/areapriceinfo-237.shtml',
... | 127 | 30.69 | 87 | 20 | 1,359 | python | [] | 0 | true | |
2024-11-18T21:52:18.001917+00:00 | 1,563,448,465,000 | dc53b728635efe8b88eb80ca190721b6feb97526 | 3 | {
"blob_id": "dc53b728635efe8b88eb80ca190721b6feb97526",
"branch_name": "refs/heads/master",
"committer_date": 1563448465000,
"content_id": "944a8ac36f9a4a0a77f4c0ea5f1c1aba7f601ed3",
"detected_licenses": [
"MIT"
],
"directory_id": "c266825ee0820297ef0e344deb4be5d455e29922",
"extension": "py",
"fi... | 3.1875 | stackv2 | from __future__ import absolute_import
from __future__ import print_function
import logging
from numpy import array
from networkx import astar_path, NetworkXException
from cspy.path import Path
from cspy.preprocessing import check_and_preprocess
class Tabu:
"""
Simple Tabu-esque algorithm for the (resource) ... | 197 | 33.18 | 80 | 22 | 1,610 | python | [] | 0 | true | |
2024-11-18T21:52:19.158288+00:00 | 1,450,018,450,000 | 7b13424be5981322e412a0f3ca17102f109b84ae | 3 | {
"blob_id": "7b13424be5981322e412a0f3ca17102f109b84ae",
"branch_name": "refs/heads/master",
"committer_date": 1450018450000,
"content_id": "dc4bf879c7284b399e4a0d08800d0ad4fff49a8a",
"detected_licenses": [
"MIT"
],
"directory_id": "5fcd506a4038f383843f80906235e132007fa27a",
"extension": "py",
"fi... | 3.34375 | stackv2 | #MatPlotLib Import
import matplotlib.pyplot as plt
def make_plot(dataset, plot_label, xlabel, ylabel, legend):
"""
Generates a MatPlotLib plot from the specified dataset and with the specified labeling features.
make_plot(dataset, plot_label, xlabel, ylabel, legend) -> plt
@type dataset: ... | 96 | 28.75 | 100 | 17 | 778 | python | [] | 0 | true | |
2024-11-18T21:52:19.274131+00:00 | 1,576,111,743,000 | a0c028208a20fe2135ba67b24279684f4da4675d | 2 | {
"blob_id": "a0c028208a20fe2135ba67b24279684f4da4675d",
"branch_name": "refs/heads/master",
"committer_date": 1576111743000,
"content_id": "c8d5d7de463340fd3b0b96592bcd282d70d6c51c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "81837afbc6fd6206775b1761ea87d844e4187d3c",
"extension": "py"... | 2.421875 | stackv2 | from flask import json, make_response
import logging
class ResponseProcessor:
def __init__(self, debug=False):
self.debug = debug
def makeResponse(self, data, error=False):
responseStr = json.dumps({
'data': data,
'error': error
})
if self.debug:
... | 21 | 23.38 | 62 | 13 | 103 | python | [] | 0 | true | |
2024-11-18T21:52:19.394986+00:00 | 1,598,474,980,000 | 3e3e234404673fe3173fd7118621053abe5314b0 | 3 | {
"blob_id": "3e3e234404673fe3173fd7118621053abe5314b0",
"branch_name": "refs/heads/master",
"committer_date": 1598474980000,
"content_id": "604bff6d157bbaa8b7237f8c8579a8e89c5eb183",
"detected_licenses": [
"MIT"
],
"directory_id": "27f0e1becfb29fb2b9d998b844a8da064765699e",
"extension": "py",
"fi... | 3.125 | stackv2 | # a4.py
# Author - Shresth Kapila
# CMPT310 Assignment 4
# ...
#-----------------------------------------------------------------------------------------------------------
# Global variables
validCommands = ["load","tell","infer_all"]
all_files = []
global currentKB
KB = []
infered = []
#--------------------------... | 205 | 31.38 | 108 | 30 | 1,329 | python | [] | 0 | true | |
2024-11-18T21:52:19.477015+00:00 | 1,567,484,108,000 | a53bb30e995ef627bc584d1eefa0ca8d60a138e4 | 2 | {
"blob_id": "a53bb30e995ef627bc584d1eefa0ca8d60a138e4",
"branch_name": "refs/heads/master",
"committer_date": 1567484108000,
"content_id": "ef30c992ccb5323728bf829ae7d60ed243de63d3",
"detected_licenses": [
"MIT"
],
"directory_id": "31322bcbd3eb8db61028b2a34854963438364068",
"extension": "py",
"fi... | 2.46875 | stackv2 | # -*- coding: utf-8 -*-
# @Author : Leo
import os
import rsa
import time
import base64
import requests
import binascii
from urllib.parse import quote
class LoginSinaWeibo:
"""
新浪微博登陆
- 用户名和密码均加密后提交,其中密码采用rsa加密
"""
# 创建session会话
session = requests.session()
def __init__(self, username, pa... | 176 | 37.71 | 119 | 17 | 1,819 | python | [] | 0 | true | |
2024-11-18T21:52:19.691664+00:00 | 1,684,509,407,000 | e891f72a6b812967f4578a2af5f36471ea6dc248 | 2 | {
"blob_id": "e891f72a6b812967f4578a2af5f36471ea6dc248",
"branch_name": "refs/heads/master",
"committer_date": 1684509487000,
"content_id": "1a6e175412cb396a87e8c2d19bc99b5c6241d4b2",
"detected_licenses": [
"MIT"
],
"directory_id": "f803bd001e133973fb575288d4889faee5326108",
"extension": "py",
"fi... | 2.453125 | stackv2 | import aiohttp
import bs4
import feedparser
import re
import tomd
import discord
from discord.ext import commands
from typing import Tuple
WIKI_API_URL = "https://wiki.factorio.com/api.php"
headerEx = re.compile(r"((^<br/>$)|(This (article|page)))")
referEx = re.compile(r".*? may refer to\:")
linkEx = re.compile(r"... | 337 | 43.29 | 125 | 26 | 3,302 | python | [] | 0 | true | |
2024-11-18T21:52:19.906774+00:00 | 1,593,391,746,000 | 45c238469e6e537fed65dab53c7de351f112705b | 3 | {
"blob_id": "45c238469e6e537fed65dab53c7de351f112705b",
"branch_name": "refs/heads/master",
"committer_date": 1593391746000,
"content_id": "c82a598ed436373d0b7f8be6fefb44baa371e0d5",
"detected_licenses": [
"MIT"
],
"directory_id": "22ae9356d3365eebefea5843375518d7f7168dc9",
"extension": "py",
"fi... | 2.75 | stackv2 | from utils_dynamics import *
import numpy as np
import matplotlib.pyplot as plt
from scipy.io import savemat
import torch
np.random.seed(1)
def plot_AR(n, var_noise, L, L2, z1, z2, z3, t_0, distance, d2, d3):
distance_names = ['JBLD', 'JKL']
dist = distance_names[distance]
fig, ax = plt.subplots()
k1 ... | 98 | 32.22 | 137 | 16 | 1,162 | python | [] | 0 | true | |
2024-11-18T21:52:19.951845+00:00 | 1,558,596,189,000 | 39e86a93939626d6d91ef184a6480f9ba8f4592f | 3 | {
"blob_id": "39e86a93939626d6d91ef184a6480f9ba8f4592f",
"branch_name": "refs/heads/master",
"committer_date": 1558596189000,
"content_id": "14d57c8f4990cf2e127678ad5461e7559887d8c6",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "6a240e3b9831e0ca65dd54e4539dea91c8cae83c",
"extension": "p... | 3.21875 | stackv2 | import math
import random
import numpy as np
import serial
MARGIN = 100
def circle_points(cx, cy, radius, arc=5):
"""Generates 360/arc points on the circumference of a circle"""
steps = int(360.0 / arc) + 1
for deg in np.linspace(0, 360, steps):
yield (int(cx + radius * math.cos(deg * 2 * math.p... | 62 | 26.02 | 77 | 18 | 477 | python | [] | 0 | true | |
2024-11-18T21:52:20.115298+00:00 | 1,611,516,541,000 | 45604503c3fc4fe8d0c7f204ae6ac7807e6c37af | 3 | {
"blob_id": "45604503c3fc4fe8d0c7f204ae6ac7807e6c37af",
"branch_name": "refs/heads/main",
"committer_date": 1611516541000,
"content_id": "38128826d35e726d8b268dfc817209655ea573e6",
"detected_licenses": [
"MIT"
],
"directory_id": "3d93a62b9136de9501b5947e89e01528dd63a9ba",
"extension": "py",
"file... | 2.8125 | stackv2 | import numpy as np
import pandas as pd
from bs4 import BeautifulSoup
import requests
from IPython.core.display import display, HTML
"""
Functions for gettig movie/director/actor info on IMDb.
1. get_movie_detail(soup)
2. get_movie_brief(soup)
"""
# get detailed data from individual movie webpage
def get_movie_detail... | 484 | 32.13 | 120 | 19 | 3,682 | python | [] | 0 | true | |
2024-11-18T21:52:20.396313+00:00 | 1,443,324,851,000 | e18b3c8fd3e2237c50493616900e9548dbb78982 | 3 | {
"blob_id": "e18b3c8fd3e2237c50493616900e9548dbb78982",
"branch_name": "refs/heads/master",
"committer_date": 1443324851000,
"content_id": "51215105f09f8cfb97b58f1f3130373995261d57",
"detected_licenses": [
"MIT"
],
"directory_id": "f157ee2cf8cbe1db04bd315c41c290754f0c464e",
"extension": "py",
"fi... | 3.28125 | stackv2 | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
"""
NLP analysis functions
noAuthor:
Nathan Danielsen
nathan.danielsen [at] gmail.com
"""
import string
import nltk
from nltk.stem.snowball import SnowballStemmer
from nltk.tag.stanford import NERTagger
class NLP(object):
"""
Using some basic NLP methods to anal... | 215 | 22.06 | 159 | 19 | 1,496 | python | [] | 0 | true | |
2024-11-18T21:52:20.947262+00:00 | 1,692,287,570,000 | 987ea5cb9b4d0e416cb938d72df76d9cb0070163 | 2 | {
"blob_id": "987ea5cb9b4d0e416cb938d72df76d9cb0070163",
"branch_name": "refs/heads/master",
"committer_date": 1692287570000,
"content_id": "370455ee3c3098fac0ef61940ac05bba44540cb7",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a5c84eb6509052744101e702b710b3b6f498d8f2",
"extension": "p... | 2.4375 | stackv2 | """Common functions and globals"""
from collections import UserDict
import json
import os
import time
from pathlib import Path
from typing import Union
from pavilion import config
from pavilion import dir_db
from pavilion import status_file
from pavilion.test_run import TestRun, TestAttributes
from pavilion.types imp... | 277 | 30.6 | 100 | 18 | 1,885 | python | [] | 0 | true | |
2024-11-18T21:52:21.117691+00:00 | 1,574,781,434,000 | f2fbfaa6ddfdad26f2fb789adff713ffabbff670 | 3 | {
"blob_id": "f2fbfaa6ddfdad26f2fb789adff713ffabbff670",
"branch_name": "refs/heads/master",
"committer_date": 1574781434000,
"content_id": "e855925aa7c8ff529df3802958a095095c84453f",
"detected_licenses": [
"MIT"
],
"directory_id": "17e4e2aadde0bf7a9b4b257b200dca31b3251cef",
"extension": "py",
"fi... | 2.765625 | stackv2 | from neomodel import StructuredNode, StringProperty, RelationshipTo, One
from app.models.relationships.base_rel import BaseRel
class Course(StructuredNode):
"""
Class to represent the Course node
"""
code = StringProperty(unique=True, unique_index=True)
# traverse outgoing TAUGHT_AT relationship, ... | 30 | 29.6 | 100 | 11 | 197 | python | [] | 0 | true | |
2024-11-18T21:52:21.185092+00:00 | 1,637,077,911,000 | 9a356e8660e686969abac5275019e609665dde88 | 3 | {
"blob_id": "9a356e8660e686969abac5275019e609665dde88",
"branch_name": "refs/heads/master",
"committer_date": 1637077911000,
"content_id": "8fc8f37d4087d1978f7d04e2ee31258e06d46bfb",
"detected_licenses": [
"MIT"
],
"directory_id": "5e189010be838b15bb5e1f4db18aece307f8a47b",
"extension": "py",
"fi... | 2.578125 | stackv2 | req_id = b"123"
verb = b"predict"
payload = b"{'this is user data': 'some data'}"
string: bytes = (
b'"%s":' % req_id
+ b"{"
+ b'"verb":"%s",' % verb
+ b'"usr_data":%s' % payload
+ b"}"
)
new_msg: bytes = b"{" + string + b"}"
print(new_msg)
req_id = req_id.decode("utf-8")
verb = verb.decode("ut... | 35 | 16.89 | 74 | 14 | 217 | python | [] | 0 | true | |
2024-11-18T21:52:21.910387+00:00 | 1,560,680,596,000 | 2f9e2dfd0b85e9a7017a78c102b99d15fb368cce | 3 | {
"blob_id": "2f9e2dfd0b85e9a7017a78c102b99d15fb368cce",
"branch_name": "refs/heads/master",
"committer_date": 1560680596000,
"content_id": "bb7f1f260b19edad14bafd07bf99099b4e6456b9",
"detected_licenses": [
"MIT"
],
"directory_id": "502f53d114ea99c2bbd3f44d9830ed3a78f3a9d7",
"extension": "py",
"fi... | 3.078125 | stackv2 | import attr
import numpy as np
from attr.validators import instance_of
import re
@attr.s
class Ship(object):
""" parent class to all game pieces
attributes: name, level, num_hits2kill, shape and num_hits."""
name = attr.ib(validator=instance_of(str))
level = np.random.choice(3)
num_hits2kill = 1
... | 233 | 36.86 | 123 | 23 | 2,095 | python | [] | 0 | true | |
2024-11-18T21:52:22.074581+00:00 | 1,584,912,780,000 | bc865c8153a37e8d6a4a0d145828341ddcabf87e | 3 | {
"blob_id": "bc865c8153a37e8d6a4a0d145828341ddcabf87e",
"branch_name": "refs/heads/master",
"committer_date": 1584912780000,
"content_id": "9f2db276e810ce4a472002878e841c7522faf499",
"detected_licenses": [
"MIT"
],
"directory_id": "27c190f40efac253702edc56c70c7016134af20f",
"extension": "py",
"fi... | 2.546875 | stackv2 | from flask import request, jsonify
from flask.views import MethodView
from models import Category
from db import db
class CategoryAPI(MethodView):
def get(self, id):
if id is None:
return jsonify([c.serialize for c in Category.query.all()])
else:
category = Category.query.fi... | 55 | 32.93 | 84 | 18 | 409 | python | [] | 0 | true | |
2024-11-18T21:52:22.792180+00:00 | 1,409,917,010,000 | 05211fcacc9665517bb943650cb42f653b47c7c2 | 2 | {
"blob_id": "05211fcacc9665517bb943650cb42f653b47c7c2",
"branch_name": "refs/heads/master",
"committer_date": 1409917010000,
"content_id": "960a2db4b52d2ca0325d15ce6a955862354879be",
"detected_licenses": [
"MIT-0"
],
"directory_id": "d29b9f769fc4bf8a3ddaa080c0c570f4d5860bdd",
"extension": "py",
"... | 2.390625 | stackv2 | # The MIT-Zero License
#
# Copyright (c) 2014 Carlos Ledesma, Jose Toro
#
# 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, including without limitation the rights
# to use... | 67 | 34.61 | 97 | 12 | 552 | python | [] | 0 | true | |
2024-11-18T21:52:22.849065+00:00 | 1,604,042,718,000 | a89aee3e865f7259379dea9b82697682f0fd47cf | 3 | {
"blob_id": "a89aee3e865f7259379dea9b82697682f0fd47cf",
"branch_name": "refs/heads/main",
"committer_date": 1604042718000,
"content_id": "c916a60c6174c735b01bc844f9b6754c95b7c2f9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "485d8a130731f6e03f5afbb589673f5058d3c8e6",
"extension": "py",
... | 2.53125 | stackv2 | import numpy as np
import os
import io
# import for server
from flask import Flask, render_template, request, Response, send_file, jsonify
from queue import Queue, Empty
import threading
import time
# import for model
from transformers import AutoTokenizer, AutoModelWithLMHead
import torch
import time
# flask server... | 149 | 27.1 | 104 | 18 | 886 | python | [] | 0 | true | |
2024-11-18T21:52:23.152630+00:00 | 1,606,335,232,000 | 532c05603e7b0305f5f347e5d71f7dec0b3a1d81 | 3 | {
"blob_id": "532c05603e7b0305f5f347e5d71f7dec0b3a1d81",
"branch_name": "refs/heads/main",
"committer_date": 1606335232000,
"content_id": "088794077a58e18a41f458412ee14e546c8a7e15",
"detected_licenses": [
"BSL-1.0"
],
"directory_id": "edb4695b1835bdb569b475626a2951d421b9c74d",
"extension": "py",
"... | 2.796875 | stackv2 | import os
import socket
import random
import time
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
os.system("clear")
print("""
████▒ ████▒ ▓██▓ ▓███▒ ██████ █████
█ ▒█░ █ ▒█░ ▒█ █▒ █▓ ░█ █ █ ▓█
█ ▒█ █ ▒█ █░ ░█ █ █ █ █
█ █ █ █ █ █ █▓░ █ █ ▒█
█ █ █ ... | 70 | 19.76 | 73 | 15 | 592 | python | [] | 0 | true | |
2024-11-18T21:52:23.382470+00:00 | 1,607,969,723,000 | 218c704e597fe7447e83681dba08556180dc9054 | 2 | {
"blob_id": "218c704e597fe7447e83681dba08556180dc9054",
"branch_name": "refs/heads/master",
"committer_date": 1607969723000,
"content_id": "df02d45c04ab489560c1587c47b932de9fa4aead",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "55c4e126801cd0287227e9bc4a977df09bb2c230",
"extension": "py"... | 2.375 | stackv2 | # -*- coding: utf-8 -*-
"""Template model."""
from datetime import datetime
from sqlalchemy import Column, DateTime, JSON, String, Text
from pipelines.database import Base
from pipelines.utils import to_camel_case
class Template(Base):
__tablename__ = "templates"
uuid = Column(String(255), primary_key=True)... | 26 | 32.08 | 90 | 13 | 199 | python | [] | 0 | true | |
2024-11-18T21:52:23.609367+00:00 | 1,619,999,920,000 | 880cc6a345e913f53b51f394e65435ffbcfbd566 | 2 | {
"blob_id": "880cc6a345e913f53b51f394e65435ffbcfbd566",
"branch_name": "refs/heads/master",
"committer_date": 1619999920000,
"content_id": "4059b51f0ea6c4abae31955d6864af6e228d15d8",
"detected_licenses": [
"MIT"
],
"directory_id": "43fd226a7ae45adbcb33c5ac3209d61c573684f8",
"extension": "py",
"fi... | 2.328125 | stackv2 | import base64
import json
from .BaseLive import BaseLive
class ZhanqiLive(BaseLive):
def __init__(self, room_id):
super().__init__()
self.room_id = room_id
self.site_name = 'Zhanqi'
self.site_domain = 'www.zhanqi.tv'
def get_room_info(self):
url = 'https://www.zhanqi.t... | 31 | 34.29 | 88 | 14 | 282 | python | [] | 0 | true | |
2024-11-18T21:52:23.653968+00:00 | 1,412,310,818,000 | 1c0ccb12c0a95253520ff6b95be420d4c50ecd37 | 2 | {
"blob_id": "1c0ccb12c0a95253520ff6b95be420d4c50ecd37",
"branch_name": "refs/heads/master",
"committer_date": 1412310818000,
"content_id": "9ede02d9d6d6fe57cd710e54b7be1c5b9e46aea7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6b6a3a7a3766b1244377aae94e229e7770d1b2d5",
"extension": "py"... | 2.3125 | stackv2 | #!/usr/bin/python
# coding:utf-8
import cPickle
import bisect
import logging
import logging.config
import sys
import os
import time
import traceback
from functools import total_ordering
from pymongo import MongoClient
DIR_PATH = os.path.dirname(os.path.abspath(__file__))
COMMON_PATH = DIR_PATH + "/../../common/"
sys.... | 311 | 32.7 | 79 | 18 | 2,759 | python | [] | 0 | true | |
2024-11-18T21:52:23.744694+00:00 | 1,570,715,130,000 | 16a249e712b05d865129cbb88dc049eedf50775f | 3 | {
"blob_id": "16a249e712b05d865129cbb88dc049eedf50775f",
"branch_name": "refs/heads/master",
"committer_date": 1570715130000,
"content_id": "64f5c2ee396b2b593be7c31fdd257c4803a66118",
"detected_licenses": [
"BSD-3-Clause",
"Apache-2.0"
],
"directory_id": "838d835a968ceee4dc7288549610a320399e0507",... | 2.875 | stackv2 | import os
import urllib
try:
from urlparse import urljoin
from urllib import urlopen
except ImportError:
from urllib.parse import urljoin
from urllib.request import urlopen
# Return content invoked with improper tag usage
def get_invalid_tag_usage(applier_list, include_tags, exclude_tags):
if len... | 141 | 32.91 | 99 | 20 | 1,064 | python | [] | 0 | true | |
2024-11-18T21:52:24.296993+00:00 | 1,599,934,199,000 | b3b5eecb5e9259bd8c6f1c312ea93cb4c6c2b9a8 | 3 | {
"blob_id": "b3b5eecb5e9259bd8c6f1c312ea93cb4c6c2b9a8",
"branch_name": "refs/heads/master",
"committer_date": 1599934199000,
"content_id": "71123a6cece0094ea47f4f29ea80945b63278946",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "e9790309b887bedfd7defaffe98e8ef875dd60d1",
"extension": "p... | 3.34375 | stackv2 | # Copyright (c) 2016 Nuxi (https://nuxi.nl/) and contributors.
#
# SPDX-License-Identifier: BSD-2-Clause
# 'Indented Tree Format': An extremely simple text format to describe a tree
# using indentation. Every non-empty line represents a node, with the
# indentation determining the tree structure.
#
# Every node is par... | 87 | 25.91 | 79 | 20 | 565 | python | [] | 0 | true | |
2024-11-18T21:52:24.534700+00:00 | 1,693,410,468,000 | a17c6bdd558ed8aa6f917c6373081ca04885977e | 3 | {
"blob_id": "a17c6bdd558ed8aa6f917c6373081ca04885977e",
"branch_name": "refs/heads/master",
"committer_date": 1693410468000,
"content_id": "1e5ddc90322c3397c629ada2c359cda1eb481cfc",
"detected_licenses": [
"MIT"
],
"directory_id": "6ea6b43b5013de75f12ef5cfedb31eba58da3822",
"extension": "py",
"fi... | 3.296875 | stackv2 | """
Utility file for computing autocorrelation statistics on trees.
"""
from typing import Callable, List, Optional, Union
import numpy as np
import pandas as pd
from cassiopeia.data import CassiopeiaTree
from cassiopeia.mixins import AutocorrelationError
from cassiopeia.data import utilities
def compute_morans_i(
... | 112 | 33.09 | 81 | 19 | 950 | python | [] | 0 | true | |
2024-11-18T21:52:24.585588+00:00 | 1,546,615,665,000 | 39ffa99a373e6c28a85fcec89e80a126d03012c9 | 3 | {
"blob_id": "39ffa99a373e6c28a85fcec89e80a126d03012c9",
"branch_name": "refs/heads/master",
"committer_date": 1546615665000,
"content_id": "633bad9e60e04b57f5bec5ecc109377416ba2908",
"detected_licenses": [
"MIT"
],
"directory_id": "e84ca6f2cc1c0d579422a85806a30e8875aeadbd",
"extension": "py",
"fi... | 3.296875 | stackv2 | from random import shuffle, randint
class Card:
def __init__(self, action, data=None):
self.action = action
self.data = data
def __str__(self):
return f"{self.action}:{self.data}"
class Property:
def __init__(self, name, price):
self.name = name
self.price = pric... | 223 | 28.06 | 93 | 16 | 1,785 | python | [] | 0 | true | |
2024-11-18T21:52:24.699316+00:00 | 1,522,771,635,000 | 3074a00e5bd41508f056f52e664a1cea339a9294 | 3 | {
"blob_id": "3074a00e5bd41508f056f52e664a1cea339a9294",
"branch_name": "refs/heads/master",
"committer_date": 1522771635000,
"content_id": "3013ef7b58bf4d9b02ce93e8859b6deb43789776",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "123c1bdc2fec6f88b0f477bbdba151edb00cdcdb",
"extension": "py"... | 2.59375 | stackv2 | __author__ = 'satish'
import csv
from collections import defaultdict
import pickle
from xml.dom import minidom
def save_obj(obj, name ):
with open( name + '.pkl', 'wb') as f:
pickle.dump(obj, f, protocol=2)
def load_obj(name ):
with open( name + '.pkl', 'rb') as f:
return pickle.load(f)
ft... | 81 | 23.01 | 97 | 16 | 538 | python | [] | 0 | true | |
2024-11-18T21:52:24.979795+00:00 | 1,567,371,825,000 | a184bb845c16cf1f756980ed58f9a1f7b60122cf | 3 | {
"blob_id": "a184bb845c16cf1f756980ed58f9a1f7b60122cf",
"branch_name": "refs/heads/master",
"committer_date": 1567371825000,
"content_id": "ddc447a989b0019ba7c1e68a20cd81d45700dc99",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bd701229be51f43d7ef137813a3cdf958f340b87",
"extension": "py"... | 2.640625 | stackv2 | """Tools for downloading and preprocessing the Cornell Movie DB.
"""
"""
Copyright 2017 Parag K. Mital. See also NOTICE.md.
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.or... | 460 | 26.43 | 80 | 17 | 2,882 | python | [] | 0 | true | |
2024-11-18T21:52:25.096383+00:00 | 1,543,874,824,000 | 755cb4389027cbbbd11f5ae4b3afbaa69b8f6dd0 | 2 | {
"blob_id": "755cb4389027cbbbd11f5ae4b3afbaa69b8f6dd0",
"branch_name": "refs/heads/master",
"committer_date": 1543874824000,
"content_id": "e609c87a4c4e463e092fef7339d80f148e64cee4",
"detected_licenses": [
"MIT"
],
"directory_id": "0357ac8aae64525031882b3b4217f0f1c260d741",
"extension": "py",
"fi... | 2.46875 | stackv2 | import os
import requests
import zipfile
import io
from config import settings
CVIOLET = '\33[35m'
CEND = '\33[0m'
CURL = '\33[4m'
def get_api_url(resource=None):
root_url = "%s/%s/" % (settings.API_URL, settings.API_VERSION)
if not resource:
return root_url
return root_url + resource + '/'
... | 93 | 27.51 | 97 | 15 | 648 | python | [] | 0 | true | |
2024-11-18T21:52:25.164916+00:00 | 1,692,969,252,000 | ac4aed43236c7b42dae47ccb318110e260c24ab1 | 3 | {
"blob_id": "ac4aed43236c7b42dae47ccb318110e260c24ab1",
"branch_name": "refs/heads/main",
"committer_date": 1692969252000,
"content_id": "ef12e771f23766831efc5767bd4e786bae326178",
"detected_licenses": [
"MIT"
],
"directory_id": "9132d77268f94e96f811aa87211b761a33f022be",
"extension": "py",
"file... | 2.546875 | stackv2 | # ruff: noqa
"""various functions to read/write CMFGEN input/output files:
rd_nuc_decay_data
rd_sn_hydro_data
"""
import sys
import numpy as np
# constants
DAY2SEC = 86400.0
MEV2ERG = 1.60217733e-6
def rd_nuc_decay_data(file, quiet=False):
"""read in NUC_DECAY_DATA file and return namespace
set quiet=True ... | 341 | 36.08 | 116 | 21 | 3,495 | python | [] | 0 | true | |
2024-11-18T21:52:25.226727+00:00 | 1,576,451,634,000 | 264eb794473d278f3e63364ed7fd3bef7a37f743 | 2 | {
"blob_id": "264eb794473d278f3e63364ed7fd3bef7a37f743",
"branch_name": "refs/heads/master",
"committer_date": 1576460475000,
"content_id": "6186e9e6ab2230325b99f1d207fbe776430a656d",
"detected_licenses": [
"MIT"
],
"directory_id": "a64470ea6bd288c5c17805434c673640e8959b49",
"extension": "py",
"fi... | 2.46875 | stackv2 | import numpy as np
import torch
import torch.optim as optim
import rlkit.torch.pytorch_util as ptu
from rlkit.dynamics.model import DynamicsModel
from rlkit.torch.networks import FlattenMlp
class MlpModel(DynamicsModel):
def __init__(
self,
env,
n_layers=3,
hidden... | 88 | 31.19 | 98 | 14 | 626 | python | [] | 0 | true | |
2024-11-18T21:52:25.281616+00:00 | 1,583,506,992,000 | 076d46a165ba91ac1d5fdf785e33315abfc6068b | 2 | {
"blob_id": "076d46a165ba91ac1d5fdf785e33315abfc6068b",
"branch_name": "refs/heads/master",
"committer_date": 1583506992000,
"content_id": "2f4a176f2cb933c51fb09a073dafd7c781f35320",
"detected_licenses": [
"MIT"
],
"directory_id": "ee0da1273c0ed01513d9c9918beee527b29613bf",
"extension": "py",
"fi... | 2.34375 | stackv2 | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
import os
import os.path
import argparse
import sys
import shutil
import colorlog
from statik.generator import generate
from statik.utils import generate_quickstart, get_project_config_file
from statik.watcher import watch
from statik.project import Sta... | 199 | 31.31 | 119 | 15 | 1,343 | python | [] | 0 | true | |
2024-11-18T21:52:25.415569+00:00 | 1,627,122,768,000 | e9ac4a7de213877bdb3bae75348d29f055c7b27a | 2 | {
"blob_id": "e9ac4a7de213877bdb3bae75348d29f055c7b27a",
"branch_name": "refs/heads/master",
"committer_date": 1627122768000,
"content_id": "b8d44f80a126587d796bef32bbd59be232ee437d",
"detected_licenses": [
"MIT"
],
"directory_id": "345dded26aa30a3ec8e52ec0873f7c1f9a8eab73",
"extension": "py",
"fi... | 2.390625 | stackv2 | """
AttemptListConverterService
"""
from typing import cast
from waves_gateway.common import Injectable
from waves_gateway.model import TransactionAttempt, TransactionAttemptReceiver, TransactionAttemptList
from waves_gateway.service.token import COIN_INTEGER_CONVERTER_SERVICE, ASSET_INTEGER_CONVERTER_SERVICE
from .... | 62 | 38.23 | 113 | 18 | 445 | python | [] | 0 | true | |
2024-11-18T21:52:25.463908+00:00 | 1,630,659,235,000 | 509c6326a4f78262f589e8ea876acdd4bdc4f359 | 3 | {
"blob_id": "509c6326a4f78262f589e8ea876acdd4bdc4f359",
"branch_name": "refs/heads/master",
"committer_date": 1630659235000,
"content_id": "fb1c64f56cd56379aa4dec34f5f6c23dfc9690b4",
"detected_licenses": [
"MIT"
],
"directory_id": "1e70b4da33d9b4c7ae34df86a97589c2ee15a2af",
"extension": "py",
"fi... | 2.6875 | stackv2 | from jwcrypto.jwt import JWT, JWTExpired, JWTMissingKey
from jwcrypto.jws import InvalidJWSObject, InvalidJWSSignature
class JWTException(Exception):
pass
class InvalidPayload(JWTException):
pass
class InvalidSignature(JWTException):
pass
class ExpiredToken(JWTException):
pass
class MissingKey... | 45 | 21.62 | 99 | 13 | 264 | python | [] | 0 | true | |
2024-11-18T21:52:25.636828+00:00 | 1,688,505,606,000 | 824fd5f0e2b7de2fabaf7eb65bc8b97bfd207d71 | 3 | {
"blob_id": "824fd5f0e2b7de2fabaf7eb65bc8b97bfd207d71",
"branch_name": "refs/heads/master",
"committer_date": 1688505606000,
"content_id": "83084acdae0967836be5364f34d7f9ae561b17c7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "eb04c1859ea2afed9a6d30e682161a17d56a5411",
"extension": "py"... | 2.96875 | stackv2 | """
PyTorch implementation of BRISQUE
Reference:
Anish Mittal et al. "No-Reference Image Quality Assessment in the Spatial Domain",
https://live.ece.utexas.edu/publications/2012/TIP%20BRISQUE.pdf
Credits:
https://live.ece.utexas.edu/research/Quality/index_algorithms.htm BRISQUE
"""
from typing import Union,... | 240 | 46.37 | 119 | 18 | 3,443 | python | [] | 0 | true | |
2024-11-18T21:52:26.027842+00:00 | 1,623,864,786,000 | a7a7ca86e82ff186272f04b5568062d0a86c67cb | 3 | {
"blob_id": "a7a7ca86e82ff186272f04b5568062d0a86c67cb",
"branch_name": "refs/heads/main",
"committer_date": 1623864786000,
"content_id": "67c81a831fad88ae8601a52956a5ccc7bab9d3d1",
"detected_licenses": [
"MIT"
],
"directory_id": "19c2fd9a3b87770e6fbf4a5f4bc809dcf62d60d6",
"extension": "py",
"file... | 3 | stackv2 | from pathlib import Path
import shutil
import re
import click
import difflib
#
# Create and manage simple backups, where files are numbered.
# Much like https://en.wikipedia.org/wiki/Versioning_file_system#Files-11_(RSX-11_and_OpenVMS)
#
_archive_dir: Path = None
def createBackupFolderName(path: Path):
# for ol... | 70 | 30.47 | 100 | 21 | 518 | python | [] | 0 | true | |
2024-11-18T21:52:26.090015+00:00 | 1,441,936,477,000 | 75f84b4f901ecf90c23aa919b11d0f04f732fa07 | 3 | {
"blob_id": "75f84b4f901ecf90c23aa919b11d0f04f732fa07",
"branch_name": "refs/heads/master",
"committer_date": 1441936477000,
"content_id": "fc126bdbc20cac653c4dc6367201b61c0c61a681",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "0ddf32a64fe0591f3df2d7879b708369c7e361bf",
"extension": "p... | 2.96875 | stackv2 | from __future__ import print_function
from bst import bst_min, bst_max
def bst_successor(node):
"""Inorder successor of a BST node"""
if node is None:
return None
if node.right is not None:
return bst_min(node.right)
parent = node.parent
while parent is not None and node != parent.... | 40 | 18.62 | 54 | 10 | 186 | python | [] | 0 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.