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-19T02:06:57.676310+00:00 | 1,591,972,015,000 | 6021ce92e3611570163de8b42386ea0018af57c2 | 3 | {
"blob_id": "6021ce92e3611570163de8b42386ea0018af57c2",
"branch_name": "refs/heads/master",
"committer_date": 1591972015000,
"content_id": "a8e42b225acc39082fa39f6f612f270b30a6f668",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8c8526de16d385cf16ff7234351f7ce495e50db7",
"extension": "py"... | 2.828125 | stackv2 | from networkx import Graph, DiGraph
from pyquil import Program
from pyquil.gates import Gate, SWAP
from sabre_tools.heuristic_function import heuristic_function
from typing import Union
import numpy as np
class SABRE():
def __init__(self, distance_matrix: np.matrix, coupling_graph: Graph) -> None:
"""Init... | 277 | 52.53 | 173 | 20 | 3,106 | python | [] | 0 | true | |
2024-11-19T02:06:57.746100+00:00 | 1,537,533,723,000 | bd0edc1cab9501878067c702453d84898183439c | 3 | {
"blob_id": "bd0edc1cab9501878067c702453d84898183439c",
"branch_name": "refs/heads/master",
"committer_date": 1537533723000,
"content_id": "815ff822ebc57aebaa6662c798affe0a0c7e8f23",
"detected_licenses": [
"MIT"
],
"directory_id": "d1bc7ebe74717b310adc44542a99fc437a62ab22",
"extension": "py",
"fi... | 3.03125 | stackv2 | from datetime import datetime, timedelta, date
import string
def remove_punctuation(text):
translator = str.maketrans('', '', string.punctuation)
return text.translate(translator)
def clean(row):
clean = []
for word in row.split(' '):
filtered = remove_punctuation(word)
if len(filter... | 25 | 21.24 | 58 | 13 | 124 | python | [] | 0 | true | |
2024-11-19T02:06:57.860223+00:00 | 1,477,054,098,000 | 251bb1a26db7af58f187c44640636cdd0c413b76 | 3 | {
"blob_id": "251bb1a26db7af58f187c44640636cdd0c413b76",
"branch_name": "refs/heads/master",
"committer_date": 1477054098000,
"content_id": "f1901da9faed29a71fb04bd93cc2d8797c289271",
"detected_licenses": [
"MIT"
],
"directory_id": "1bf49bc0e32ab6dcbc4a7c0d343029d448639712",
"extension": "py",
"fi... | 2.6875 | stackv2 | import tarfile, os
def make_tar(folder_to_backup, dest_folder, compression="bz2"):
if compression:
dest_ext = '.' + compression
else:
dest_ext = ''
arcname = os.path.basename(folder_to_backup)
dest_name = '%s.tar%s' %(arcname, dest_ext)
dest_path = os.path.join(dest_folder, dest_nam... | 21 | 29.05 | 63 | 10 | 165 | python | [] | 0 | true | |
2024-11-19T02:06:58.034463+00:00 | 1,588,584,113,000 | b722f4c88d041f8614bdc5c9c4c104f827d8c67d | 3 | {
"blob_id": "b722f4c88d041f8614bdc5c9c4c104f827d8c67d",
"branch_name": "refs/heads/master",
"committer_date": 1588584113000,
"content_id": "b58deac4959ea8d959411da4af71680fb2b7ca0e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "fd28e808920c33c624a30c60c737d61206299f6e",
"extension": "py"... | 2.625 | stackv2 | import cv2
import logging
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import mxnet as mx
from poi.ops.fuse.metric_ops import _c_distance
def vis_reid(image_url_a, feature_a, image_url_b, feature_b):
feature_a_nd = mx.nd.L2Normalization(mx.nd.array([feature_a]), mode="instance")
fea... | 40 | 32.42 | 90 | 13 | 423 | python | [] | 0 | true | |
2024-11-19T02:06:58.088766+00:00 | 1,541,463,596,000 | dd69dcf8b69aa4d8375c195a04cd72a049741376 | 3 | {
"blob_id": "dd69dcf8b69aa4d8375c195a04cd72a049741376",
"branch_name": "refs/heads/master",
"committer_date": 1541463596000,
"content_id": "bb6640f86eb034b8939eb666e142daee59c30cf7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "434f4fa664f24d55dfcb9c6702a378b70909daa0",
"extension": "py"... | 2.78125 | stackv2 | import argparse
import configparser
import logging
import ats_utilities.ats_file_system
import ats_utilities.ats_utilities
import constants
def parse_commandline_arguments(sys_argv):
# logger = logging.getLogger(__name__)
logger = logging.getLogger('default_logger')
logger.info("Parsing Command-Line Ar... | 113 | 29.72 | 95 | 12 | 665 | python | [] | 0 | true | |
2024-11-19T02:06:58.364810+00:00 | 1,579,786,733,000 | 2a185f41b4cb36c7632cc77151216de5be533bcd | 3 | {
"blob_id": "2a185f41b4cb36c7632cc77151216de5be533bcd",
"branch_name": "refs/heads/master",
"committer_date": 1579786733000,
"content_id": "6b7c9e077869132523e79d913a20405386e33395",
"detected_licenses": [
"MIT"
],
"directory_id": "2e2d96bcc3ecbdb71b5ac2382f430d09d97f8a32",
"extension": "py",
"fi... | 2.671875 | stackv2 | def dataframe_diff(df_x,df_y,key):
import pandas as pd
set_x=['df_x' for i in range(len(df_x))]
df_x['sets']=set_x
set_y=['df_y' for i in range(len(df_y))]
df_y['sets']=set_y
columns=list(df_x.columns)
columns.remove('sets')
df_concat=pd.concat([df_x,df_y]).drop_duplicates(subset=columns... | 23 | 47.57 | 104 | 21 | 320 | python | [] | 0 | true | |
2024-11-19T02:06:58.422222+00:00 | 1,671,644,430,000 | e643c65a0a30aefed3c8cc5c05f7ca94e892dd05 | 3 | {
"blob_id": "e643c65a0a30aefed3c8cc5c05f7ca94e892dd05",
"branch_name": "refs/heads/master",
"committer_date": 1671644430000,
"content_id": "060eec3d0dc41198e9ddf599c32c6e07e2c805f3",
"detected_licenses": [
"Unlicense"
],
"directory_id": "94b603a26fd0942181d4a3da2f9f830034c74ce0",
"extension": "py",... | 2.9375 | stackv2 | import fileinput
from collections import defaultdict
pairs = [l.strip().split('-') for l in fileinput.input()]
graph = defaultdict(set)
for a, b in pairs:
graph[a].add(b)
graph[b].add(a)
def printer(fn):
def wrapper(*args):
p = args[1].copy()
res = fn(*args)
if res == 1:
... | 45 | 20.47 | 74 | 13 | 261 | python | [] | 0 | true | |
2024-11-19T02:06:58.532617+00:00 | 1,634,245,009,000 | 5663bfb5888c006bdfdbcec76a585dde80807bf9 | 4 | {
"blob_id": "5663bfb5888c006bdfdbcec76a585dde80807bf9",
"branch_name": "refs/heads/master",
"committer_date": 1634245009000,
"content_id": "d247d167c85b199eb890e9864aeb4e0a7b3c422c",
"detected_licenses": [
"MIT"
],
"directory_id": "b1d718f1b364fc256062e6975a831bca56e99473",
"extension": "py",
"fi... | 4.15625 | stackv2 | #!/usr/bin/env python3
"""This is a basic class tutorial script taken almost verbatim from the
excellent video from Corey Schafer's youtube channel.
Property Decorators:
property() is a built-in function that creates and returns a property object.
property(fget=None, fset=None, fdel=None, fdoc=None) #default kw... | 146 | 30.08 | 78 | 13 | 1,129 | python | [] | 0 | true | |
2024-11-19T02:06:58.584445+00:00 | 1,446,823,931,000 | e4de6e6f490def3c25e4df882dfbfa14e2eabd4a | 3 | {
"blob_id": "e4de6e6f490def3c25e4df882dfbfa14e2eabd4a",
"branch_name": "refs/heads/master",
"committer_date": 1446823931000,
"content_id": "0f37841057b55a86bf7049048be799a469ae9be0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f1a77c569ba862490dd22f3fa911df9755f52d6b",
"extension": "py"... | 2.84375 | stackv2 | #! /usr/bin/env python
import sys
import time
import argparse
import os
import signal
from accelerometer import Accelerometer
from light_strip import LightStrip
class HueForce(object):
iteration = 0
def __init__(self, lights, limit, debug, delta=10):
self.accel = Accelerometer(limit)
self.st... | 95 | 24.68 | 78 | 16 | 601 | python | [] | 0 | true | |
2024-11-19T02:06:58.652266+00:00 | 1,633,096,075,000 | 16f82d5ca32710019ce4d0425d3d25dc96b5b622 | 3 | {
"blob_id": "16f82d5ca32710019ce4d0425d3d25dc96b5b622",
"branch_name": "refs/heads/master",
"committer_date": 1633096075000,
"content_id": "cf095beef2714cba37009201df7486fa1f105604",
"detected_licenses": [
"MIT"
],
"directory_id": "7404a5e7a4c6ae5d0c11d2caf4700550d0d4883a",
"extension": "py",
"fi... | 3.09375 | stackv2 | """
This product is released under the MIT License (MIT)
Copyright (c) 2019, LEGO System A/S, Aastvej 1, 7190 Billund, Denmark
See LICENSE.txt for the full MIT license notice.
"""
import hub
DISPLAY_WIDTH = 5
DISPLAY_HEIGHT = 5
def screenshot():
"""
Take a screenshot of the current screen and return the I... | 32 | 20.53 | 73 | 14 | 170 | python | [] | 0 | true | |
2024-11-19T02:06:59.117535+00:00 | 1,575,970,956,000 | 68d674c55f9caf9f8c55b723a5ed30e5a97bf8f4 | 2 | {
"blob_id": "68d674c55f9caf9f8c55b723a5ed30e5a97bf8f4",
"branch_name": "refs/heads/master",
"committer_date": 1575970956000,
"content_id": "a8af5016c1bf8c880e0352ce46754146867cf993",
"detected_licenses": [
"MIT"
],
"directory_id": "86f48c674d7ef84103e5229f1c751ede6704dd96",
"extension": "py",
"fi... | 2.421875 | stackv2 | import keras
from keras.layers import Input, Dense, MaxPooling2D, ZeroPadding2D, Dropout, Flatten, merge, Reshape, Activation, Permute
from keras.layers.core import Dropout, Dense, Flatten, Activation, Lambda, WeightedMerge
from keras.layers.convolutional import UpSampling2D
from keras.models import model_from_json, Mo... | 311 | 44.65 | 168 | 19 | 3,488 | python | [] | 0 | true | |
2024-11-19T02:06:59.412413+00:00 | 1,624,233,177,000 | 383ea88ac7466b2c0e7e0477f32fa6e2db3a2621 | 3 | {
"blob_id": "383ea88ac7466b2c0e7e0477f32fa6e2db3a2621",
"branch_name": "refs/heads/main",
"committer_date": 1624233177000,
"content_id": "e83b3b78faa0065d7e6b89870cbac4fb12055f3f",
"detected_licenses": [
"MIT"
],
"directory_id": "2f8cdd3cdcb64d45426c9d231a02cc368d652976",
"extension": "py",
"file... | 2.84375 | stackv2 | # coding: utf8
#construction of matrix B and special H with measure on the boarder
import numpy as np
import math
from scipy.linalg import sqrtm
from shallowwater import *
##def B_Balgovind(n,Sigma,L):
## Gamma = np.identity(n)
## for i in xrange(n):
## for j in xrange(n):
## Gamma[i,j] = ( 1. ... | 151 | 31.32 | 84 | 16 | 1,547 | python | [] | 0 | true | |
2024-11-19T02:06:59.669863+00:00 | 1,498,755,634,000 | a038a0427ec4bd6d8420efb520db509d84c0f2bb | 4 | {
"blob_id": "a038a0427ec4bd6d8420efb520db509d84c0f2bb",
"branch_name": "refs/heads/master",
"committer_date": 1498755634000,
"content_id": "a7a35fe11d86981d538ef51b462e9a137fb9ee55",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d8a15445e3b10ba32f420240661e98a01ab5332f",
"extension": "py"... | 3.546875 | stackv2 | # -*- coding: utf-8 -*-
"""
Seminario Python
Archivos 1:
Script de introducción al módulo os
@authors: D. G. Reina
"""
import os
print "directorio actual", os.getcwd()
dir_actual = os.getcwd()
print "lista de archivos", os.listdir(dir_actual)
lista_archivos = os.listdir(".")
print "IMPRIMIMOS SOLOS L... | 42 | 22.14 | 85 | 12 | 240 | python | [] | 0 | true | |
2024-11-19T02:07:00.020391+00:00 | 1,496,909,346,000 | eaa9f325638580221eb660a2ae7687ecca68b702 | 3 | {
"blob_id": "eaa9f325638580221eb660a2ae7687ecca68b702",
"branch_name": "refs/heads/master",
"committer_date": 1496909346000,
"content_id": "348f0200ed37bd9171a346498a215a3a8ee59cc8",
"detected_licenses": [
"MIT"
],
"directory_id": "2b64e655a99a2d66c2bae41750410b73ca169dd7",
"extension": "py",
"fi... | 2.84375 | stackv2 | from argparse import ArgumentParser
from pathlib import Path
import pandas as pd
from pyim.model import Insertion
from pyim.util import remove_prefix
def setup_parser():
parser = ArgumentParser(prog='pyim-split')
parser.add_argument('--insertions', type=Path, required=True)
parser.add_argument('--outpu... | 48 | 31.58 | 78 | 15 | 339 | python | [] | 0 | true | |
2024-11-19T02:07:00.369837+00:00 | 1,409,650,548,000 | b02a70ca12544ab94b1e8c20b81259b29174408c | 2 | {
"blob_id": "b02a70ca12544ab94b1e8c20b81259b29174408c",
"branch_name": "refs/heads/master",
"committer_date": 1409650548000,
"content_id": "a71b2af7408d491fd6340103c09693d2926d793e",
"detected_licenses": [
"Apache-2.0",
"AFL-2.1"
],
"directory_id": "cf749e82596e7e748243604a8bdf21b63dcca0fd",
"e... | 2.375 | stackv2 | '''
Created on Aug 29, 2014
@author: Heiko Strathmann
'''
from scipy.spatial.distance import squareform, pdist
from theano import function
import theano
from theano.configparser import TheanoConfigParser
import numpy as np
from pymc.model import modelcontext
from pymc.step_methods.arraystep import ArrayStep, metrop... | 267 | 32.48 | 92 | 18 | 2,264 | python | [] | 0 | true | |
2024-11-19T02:07:00.591348+00:00 | 1,611,873,994,000 | 55788c97455141a8e4cddcb0accad750543b3a10 | 3 | {
"blob_id": "55788c97455141a8e4cddcb0accad750543b3a10",
"branch_name": "refs/heads/main",
"committer_date": 1611873994000,
"content_id": "9a531ce676a3f9e20e5dee5060175ea13ca2948d",
"detected_licenses": [
"MIT"
],
"directory_id": "a4c62806f4ea7a4224fd4550b96b7ced8e8d1ef1",
"extension": "py",
"file... | 3.484375 | stackv2 | """Prediction of Users based on Tweet Embeddings"""
import numpy as np
from sklearn.linear_model import LogisticRegression
from .models import User
from .twitter import vectorize_tweet
def predict_user(user0_name, user1_name, hypo_tweet_text):
"""
Determine who is more likely to have made a hypothetical twee... | 35 | 35.74 | 79 | 14 | 331 | python | [] | 0 | true | |
2024-11-19T02:07:00.700050+00:00 | 1,647,426,330,000 | ba7b3491096c5bf5e80b3b25a02df6454003175b | 3 | {
"blob_id": "ba7b3491096c5bf5e80b3b25a02df6454003175b",
"branch_name": "refs/heads/master",
"committer_date": 1647426330000,
"content_id": "bef8bfd09b074cc04db47d7a491a45dc4fdb73ff",
"detected_licenses": [
"MIT"
],
"directory_id": "a381debad5dbcbfa83b549438ea6294c9e5a122e",
"extension": "py",
"fi... | 2.578125 | stackv2 | import atexit
import colorama
import sys
import time
try:
from msvcrt import getch
except ImportError:
import tty
import termios
def getch():
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
tty.setraw(sys.stdin.fileno())
ch = sys.stdin... | 114 | 19.47 | 90 | 19 | 530 | python | [] | 0 | true | |
2024-11-19T02:07:00.816004+00:00 | 1,591,599,035,000 | 102e90e8b54a3c648f21f8b7d90bed590f6aa309 | 3 | {
"blob_id": "102e90e8b54a3c648f21f8b7d90bed590f6aa309",
"branch_name": "refs/heads/master",
"committer_date": 1591599035000,
"content_id": "ca6743d9ca31d19d9f5fcae82c16ac758728a31e",
"detected_licenses": [
"MIT"
],
"directory_id": "d0201fcf385263db1adcb84c72a29cbfd6fc14c9",
"extension": "py",
"fi... | 3.375 | stackv2 | # python3
import sys
def BWT(text):
n = len(text)
text += text
# print(text)
cycles = ['gg'] * n
# print(len(cycles))
for i in range(n):
cycles[i] = text[i:i + n]
# print(cycles[i])
cycles.sort()
ans = ""
for i in range(n):
ans += cycles[i][n - 1]
return ... | 21 | 18.67 | 39 | 11 | 122 | python | [] | 0 | true | |
2024-11-19T02:07:00.931129+00:00 | 1,611,646,346,000 | 02ef259a8ddefab05900dd9f9d478aa59b37831a | 4 | {
"blob_id": "02ef259a8ddefab05900dd9f9d478aa59b37831a",
"branch_name": "refs/heads/master",
"committer_date": 1611646346000,
"content_id": "50086cf233e83d27944c5a346a972b76df1ef822",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5977adc1f60df46c88f3b33d3d11455577cd4b94",
"extension": "py"... | 3.515625 | stackv2 | # -*- coding: utf-8 -*-
"""
@date: 2020/10/19 下午4:37
@file: three_crop.py
@author: zj
@description:
"""
import numbers
from opencv_transforms import transforms
from opencv_transforms import functional as F
class ThreeCrop(object):
"""Crop the given PIL Image into left/center/right or up/center/down
.. Not... | 109 | 31.35 | 94 | 15 | 918 | python | [] | 0 | true | |
2024-11-19T02:07:01.118289+00:00 | 1,597,796,090,000 | 46d6f80a86a3589bf984b73b58e6d64e09e916f8 | 3 | {
"blob_id": "46d6f80a86a3589bf984b73b58e6d64e09e916f8",
"branch_name": "refs/heads/master",
"committer_date": 1597796090000,
"content_id": "e78d33d4c39f412050cd9bc3394012e5ea054e47",
"detected_licenses": [
"MIT"
],
"directory_id": "51cf5c24f754b944b3d8fd589f61d0c90db5c87d",
"extension": "py",
"fi... | 2.796875 | stackv2 | import random
import requests
import json
import sys
class settings:
bhvr = None
maximum = 0
default = 0
url = "https://steam.live.bhvrdbd.com/api/v1/extensions/rewards/grantCurrency/"
def value():
return (random.randint(0, 1000))
def send(bp_value):
response = requests.post(
settings... | 57 | 23.88 | 83 | 19 | 329 | python | [] | 0 | true | |
2024-11-19T02:07:01.245876+00:00 | 1,454,919,738,000 | e9852c9782b4d1f59ccc59bb9141fa4e0217a51e | 3 | {
"blob_id": "e9852c9782b4d1f59ccc59bb9141fa4e0217a51e",
"branch_name": "refs/heads/master",
"committer_date": 1454919738000,
"content_id": "bc962bc26c16527fe21db3f86f671994f45b5f1a",
"detected_licenses": [
"MIT"
],
"directory_id": "2c2129fb442343bd644c58103390e9941ebac243",
"extension": "py",
"fi... | 2.8125 | stackv2 | import sys
TMP_VARS = 4
MAX_MEM_SIZE = 256
# XXX PROGRAMS GETTING INPUT **MUST** HAVE NEWLINE AT END XXX
def convert(instr, converter):
out = ""
for ch in instr:
if ch in converter:
out += converter[ch]
return out
def simplify(prog):
while "<>" in prog or "><" in prog:
... | 396 | 18.23 | 62 | 16 | 2,056 | python | [] | 0 | true | |
2024-11-19T02:07:01.303826+00:00 | 1,633,627,984,000 | fdf7548f5698cb90e72eef4c3d7538e1741609dd | 2 | {
"blob_id": "fdf7548f5698cb90e72eef4c3d7538e1741609dd",
"branch_name": "refs/heads/main",
"committer_date": 1633627984000,
"content_id": "b2637e822c8c4339902ed7786ff702ad86bb5e2e",
"detected_licenses": [
"MIT"
],
"directory_id": "904a6c5c6bae0294dc573d8685f89574b5254cd4",
"extension": "py",
"file... | 2.40625 | stackv2 | import os
import discord
import feedparser
import json
from dotenv import load_dotenv
load_dotenv()
print('run pyBot')
with open('data.json', 'w') as f:
json.dump([], f, indent=4)
output = json.load(open('data.json'))
feed = feedparser.parse('http://127.0.0.1:3000/rss')
print('feed', feed)
obj = {}
item = 0
fo... | 32 | 17.03 | 52 | 10 | 180 | python | [] | 0 | true | |
2024-11-19T02:07:01.563091+00:00 | 1,627,547,034,000 | d39b662e623b4e073cf42e827a32fed5775de97f | 3 | {
"blob_id": "d39b662e623b4e073cf42e827a32fed5775de97f",
"branch_name": "refs/heads/master",
"committer_date": 1627547034000,
"content_id": "32a9e5d333a65cf92e21fdcb5136bb4365432537",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "206f2827859fa726335b55847eb34c1b649aa96f",
"extension": "py"... | 2.921875 | stackv2 | from pathlib import Path
from typing import List, NoReturn, Optional
from tensorflow import is_tensor
from tensorflow.keras.layers import Layer, Input
from tensorflow.keras.models import Model
import globalconfig as g_conf
from utilities.kerasutils import apply_block
from utilities.typingutils import is_typed_list
... | 95 | 39.43 | 111 | 17 | 918 | python | [] | 0 | true | |
2024-11-19T02:07:01.813948+00:00 | 1,578,349,247,000 | e47f004061255ca80bd049d8a358c7c7a2924bf7 | 3 | {
"blob_id": "e47f004061255ca80bd049d8a358c7c7a2924bf7",
"branch_name": "refs/heads/master",
"committer_date": 1578349247000,
"content_id": "1c533f5b8d919e960de5b81d43379021994d24b5",
"detected_licenses": [
"MIT"
],
"directory_id": "ec17944f73301483ee0141e547a1dc7653653112",
"extension": "py",
"fi... | 2.796875 | stackv2 | import matplotlib.pyplot as plt
import torch
from atari import Atari
import sys
N_EPISODES = 1
MEAN_K = 10
DISPLAY = False
DYNAMIC = False
SAVE_GIF = True
def run_episode(net, env):
env.reset()
episode_reward = 0
terminal = False
terminal_life_loss = False
while not terminal:
if DISPLAY:
... | 71 | 29.18 | 73 | 15 | 540 | python | [] | 0 | true | |
2024-11-19T02:07:01.918952+00:00 | 1,659,673,033,000 | 7fd9efce580a302ec3ce6eeb903f41d1c691bf3e | 3 | {
"blob_id": "7fd9efce580a302ec3ce6eeb903f41d1c691bf3e",
"branch_name": "refs/heads/master",
"committer_date": 1659673033000,
"content_id": "f2856d31fc499ae5d59606d1355d1153ab2bc37a",
"detected_licenses": [
"MIT"
],
"directory_id": "1cf08440223095a113e33382a28e3a17e28bbb6e",
"extension": "py",
"fi... | 2.984375 | stackv2 | from ast import AST, iter_fields, parse
from json import JSONEncoder
from sys import stdin
class ASTEncoder(JSONEncoder):
def default(self, obj):
if isinstance(obj, AST):
return ast_to_dict(obj)
return super().default(obj)
def ast_to_dict(tree):
if isinstance(tree, AST):
... | 24 | 24.67 | 77 | 12 | 142 | python | [] | 0 | true | |
2024-11-19T02:07:01.976647+00:00 | 1,581,500,565,000 | a25e7d5a0d337986eb2ac81a9327ffdd448f06b1 | 2 | {
"blob_id": "a25e7d5a0d337986eb2ac81a9327ffdd448f06b1",
"branch_name": "refs/heads/master",
"committer_date": 1581500565000,
"content_id": "4dcd2a5f7d9cd43065b9c92884653fe92286f96c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f4777c4e8d060a4112983655d01fb24171fbbd07",
"extension": "py"... | 2.34375 | stackv2 |
from requests import head, get, delete
from gluish.task import BaseTask
from gluish.utils import shellout
from es2json import put_dict
import luigi
import gzip
import os
from dateutil import parser
class GNTask(BaseTask):
"""
Just a Base class for geonames
inline-config
"""
TAG = 'gn'
confi... | 139 | 27.71 | 178 | 20 | 971 | python | [] | 0 | true | |
2024-11-19T02:07:02.074552+00:00 | 1,406,548,850,000 | d2e069a4437d7bdd9e06cacadec0006a485315a3 | 3 | {
"blob_id": "d2e069a4437d7bdd9e06cacadec0006a485315a3",
"branch_name": "refs/heads/master",
"committer_date": 1406548850000,
"content_id": "97907d1a0ac373c6e15e0803c9de192c6e098101",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e16decc4d9563fb55b63038ffc234caa15d4aba2",
"extension": "p... | 2.828125 | stackv2 | """Utilities for data preprocessing"""
from path import path
from scipy.io import loadmat
import numpy as np
from math import sqrt
from IPython import embed
TRIAL_NORM_REJECTION_THRESHOLD = sqrt(1e-21)
TRIAL_REJECTION_THRESHOLD_AFTER_NORMALIZING = 2.5
# subject_index, channel, channel_type, watch out subject_index o... | 291 | 29.17 | 77 | 16 | 2,337 | python | [] | 0 | true | |
2024-11-19T02:07:02.137022+00:00 | 1,556,793,031,000 | b64bd82e13f4716fef0d5f273c36a4d6c49e57ca | 3 | {
"blob_id": "b64bd82e13f4716fef0d5f273c36a4d6c49e57ca",
"branch_name": "refs/heads/master",
"committer_date": 1556793031000,
"content_id": "e13dacae0b3cb705d86dbfa433ad9d7bfbf090ae",
"detected_licenses": [
"MIT"
],
"directory_id": "4eadbd351b352f11c9002ac14ba42b7f4459dddb",
"extension": "py",
"fi... | 2.875 | stackv2 | """freetype_metrics.py but for HarfBuzz"""
import sys
import svgwrite
from collections import namedtuple
import pathlib
import barcode_wheel
def main():
file_name = pathlib.Path(sys.argv[0]).with_suffix(".svg")
drawing = svgwrite.Drawing(filename=str(file_name), size=("100%", "100%"))
Window = namedtupl... | 91 | 31.49 | 129 | 16 | 667 | python | [] | 0 | true | |
2024-11-19T02:07:02.470710+00:00 | 1,525,079,819,000 | b7c70c5738e51f0e44a96518bfa75b8109e70bb9 | 3 | {
"blob_id": "b7c70c5738e51f0e44a96518bfa75b8109e70bb9",
"branch_name": "refs/heads/master",
"committer_date": 1525079819000,
"content_id": "c2b1e6c16cb17e6c3f903bef686b417cd5dc8df6",
"detected_licenses": [
"MIT"
],
"directory_id": "78b1d3a2e7c93572d824652f6e5ca136a0b87878",
"extension": "py",
"fi... | 3 | stackv2 | class Solution:
def nextPermutation(self, nums):
size = len(nums)
maxPos = -1
for i in range(size - 1):
for j in range(i + 1, size):
if nums[i] < nums[j]:
maxPos = i
if maxPos != -1:
minValue = nums[maxPos]
minPo... | 27 | 31.11 | 93 | 16 | 223 | python | [] | 0 | true | |
2024-11-19T02:07:02.905426+00:00 | 1,674,327,667,000 | f99622c14e945057393719147fc0447617fda932 | 3 | {
"blob_id": "f99622c14e945057393719147fc0447617fda932",
"branch_name": "refs/heads/master",
"committer_date": 1674327667000,
"content_id": "7a303355be63e765c65acc31136ed62e75f6af13",
"detected_licenses": [
"MIT"
],
"directory_id": "45d03b1cadccce838a460fb20b572db1ea5d6b26",
"extension": "py",
"fi... | 2.640625 | stackv2 | #!/usr/bin/env
import time
from scipy.integrate import odeint
import numpy as np
from math import *
def MassSpringDamper(state,t,F, mode='critically_damped'):
x = state[0]
xd = state[1]
if mode=='oscillations':
m = 1.0; k = 2; b = 0 # oscillations
elif mode=='underdapmped':
m = 1.0; k = 2; b = 2*sqrt(m*k)-2... | 44 | 25.8 | 92 | 14 | 431 | python | [] | 0 | true | |
2024-11-19T02:07:02.950225+00:00 | 1,651,087,660,000 | 1b3e96c8b8e48ed7165ca503abcd0565ef2a421f | 2 | {
"blob_id": "1b3e96c8b8e48ed7165ca503abcd0565ef2a421f",
"branch_name": "refs/heads/master",
"committer_date": 1651087660000,
"content_id": "0e6f4ccd116587362cebed9f894b4e491773c0c6",
"detected_licenses": [
"MIT"
],
"directory_id": "8f344354a42d0f150eff315a44763038dad521de",
"extension": "py",
"fi... | 2.34375 | stackv2 | import time
import math
from six import string_types
from collections import defaultdict
import torch
import glob
import os
import six
def move_to_cuda(sample):
# copy-pasted from
# https://github.com/pytorch/fairseq/blob/master/fairseq/utils.py
if len(sample) == 0:
return {}
def _move_to_cu... | 168 | 34.76 | 108 | 19 | 1,398 | python | [] | 0 | true | |
2024-11-19T02:07:03.208545+00:00 | 1,412,888,413,000 | 76a183ac884b14f5a994ba927bf3fd7d8476d368 | 3 | {
"blob_id": "76a183ac884b14f5a994ba927bf3fd7d8476d368",
"branch_name": "refs/heads/master",
"committer_date": 1412888413000,
"content_id": "9d3da50367083a945b35d4ab2638f82b648c859d",
"detected_licenses": [
"MIT"
],
"directory_id": "b98c74a613683d39b5e71876b51d367f985f82e5",
"extension": "py",
"fi... | 2.953125 | stackv2 | #!/usr/bin/python
# coding=utf-8
import datetime
import math
import os
import xlrd
from iCalendar import iCalendar
# LINKS :
# - Save to .ics : http://icalendar.readthedocs.org/en/latest/
# http://icalendar.readthedocs.org/en/latest/examples.html
# http://icalendar.readthedocs.org/en/latest/examples.htm... | 277 | 30.04 | 155 | 21 | 2,414 | python | [] | 0 | true | |
2024-11-19T02:07:03.562019+00:00 | 1,675,891,951,000 | 4c2b5e135040a22331680ef7529c54ecdebce91c | 2 | {
"blob_id": "4c2b5e135040a22331680ef7529c54ecdebce91c",
"branch_name": "refs/heads/master",
"committer_date": 1675891951000,
"content_id": "b1db3ca5f528b12b7012fbf8e0393acb9a7e552c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7e5b7b5662186707379dece0c7ed7d39cbe1c346",
"extension": "py"... | 2.359375 | stackv2 | #!/usr/bin/env python3
import event
import gh
import http
import logging
import os
import policy
import storage
import sys
import time
from config import GetCtx
from http.server import HTTPServer, BaseHTTPRequestHandler
from io import BytesIO
class SimpleServer(HTTPServer):
def __init__(self, server_address, ha... | 93 | 25.29 | 79 | 15 | 564 | python | [] | 0 | true | |
2024-11-19T02:07:03.622372+00:00 | 1,595,564,379,000 | 6a92a0fa3b63eaaa5723935976a668e3c96780f2 | 4 | {
"blob_id": "6a92a0fa3b63eaaa5723935976a668e3c96780f2",
"branch_name": "refs/heads/master",
"committer_date": 1595564379000,
"content_id": "df4ffab1f34c0fa5da18a6895053ef9a6a2fe6d5",
"detected_licenses": [
"MIT"
],
"directory_id": "63da0c2b37595f1cda5900405fa9fb8b14169909",
"extension": "py",
"fi... | 3.984375 | stackv2 | #!/usr/bin/python3
Rectangle = __import__('2-rectangle').Rectangle
my_rectangle = Rectangle(2, 4)
print("Area: {} - Perimeter: {}".format(my_rectangle.area(), my_rectangle.perimeter()))
print("--")
my_rectangle.width = 10
my_rectangle.height = 3
print("Area: {} - Perimeter: {}".format(my_rectangle.area(), my_rectang... | 20 | 28.95 | 87 | 9 | 152 | python | [] | 0 | true | |
2024-11-19T02:07:04.223649+00:00 | 1,606,664,152,000 | 3de80a9fbb5f5583b3feddb3f237b76e8ddc59f2 | 3 | {
"blob_id": "3de80a9fbb5f5583b3feddb3f237b76e8ddc59f2",
"branch_name": "refs/heads/master",
"committer_date": 1606664152000,
"content_id": "535a2b6fc4f290ecebd1d1e936105f0a1fdadf33",
"detected_licenses": [
"MIT"
],
"directory_id": "599bca7f41694112b1367854a81e0bd9162a6f7a",
"extension": "py",
"fi... | 2.796875 | stackv2 | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
import numpy as np
import cv2
import gzip
import math
import random
import os
import matplotlib.pyplot as plt
IMAGE_SIZE = 28
NUM_CHANNELS = 1
PIXEL_DEPTH = 255
NUM_LABE... | 249 | 30.58 | 132 | 14 | 2,150 | python | [] | 0 | true | |
2024-11-19T02:07:04.285751+00:00 | 1,524,146,550,000 | 523893d74d80891779cab2c513388beb1461afe9 | 3 | {
"blob_id": "523893d74d80891779cab2c513388beb1461afe9",
"branch_name": "refs/heads/master",
"committer_date": 1524146550000,
"content_id": "b10a7933756977231e15b75090ac38c5ae86c75a",
"detected_licenses": [
"MIT"
],
"directory_id": "6a1dd3311630bb10992c6f9c8af913f0d4b8cd24",
"extension": "py",
"fi... | 2.734375 | stackv2 | from sklearn import svm
from GPyOpt.methods import BayesianOptimization
from utils import load_data
def main():
X_train, X_test, y_train, y_test = load_data()
def f(x):
res = []
for i in x:
clf = svm.SVC(gamma=i[0], C=i[1])
clf.fit(X_train, y_train)
res.ap... | 36 | 20.64 | 74 | 14 | 222 | python | [] | 0 | true | |
2024-11-19T02:07:04.460602+00:00 | 1,688,411,610,000 | 6e88cb7cd60cc1d4c4a7755d6c3e86a81b785e08 | 3 | {
"blob_id": "6e88cb7cd60cc1d4c4a7755d6c3e86a81b785e08",
"branch_name": "refs/heads/master",
"committer_date": 1688411610000,
"content_id": "91ac62398d974ddf35b547091277518ad99e91f6",
"detected_licenses": [
"MIT"
],
"directory_id": "ca98f0332b773f9b1982118daf94ba75ffeaa90d",
"extension": "py",
"fi... | 3.1875 | stackv2 | from numbers import Real
from typing import Optional
import numpy as np
from mygrad import Tensor
from mygrad.operation_base import Operation
from mygrad.typing import ArrayLike
__all__ = ["elu"]
class ELU(Operation):
"""Returns the exponential linear activation (ELU) elementwise along x.
The ELU is given... | 108 | 27.25 | 85 | 13 | 1,000 | python | [] | 0 | true | |
2024-11-19T02:07:06.637432+00:00 | 1,296,163,782,000 | 4f07cdb9af37f3aa887472edd25b01b714f95a0e | 2 | {
"blob_id": "4f07cdb9af37f3aa887472edd25b01b714f95a0e",
"branch_name": "refs/heads/master",
"committer_date": 1296163782000,
"content_id": "4c525618a9a7284d89cbef0cd3feb3ece46bb7d5",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "9125fb397790c18ce38fc13e99a69f81643ef62f",
"extension": "p... | 2.328125 | stackv2 | import time
import urllib
from django.conf import settings
from django.core.cache import cache
from django import forms
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.template.loader import render_to_string
# Forms
# -----
... | 116 | 26.23 | 87 | 12 | 684 | python | [] | 0 | true | |
2024-11-19T02:07:06.829615+00:00 | 1,514,189,573,000 | bce0394fd14abda8ba85c5b15d424fa5c3f7acc8 | 3 | {
"blob_id": "bce0394fd14abda8ba85c5b15d424fa5c3f7acc8",
"branch_name": "refs/heads/master",
"committer_date": 1514189573000,
"content_id": "c2edc69873a6095d0ffb29e265f5fe8cf5896d71",
"detected_licenses": [
"MIT"
],
"directory_id": "9ea53850ba6135ac6f5686c1a38a1029ebccb294",
"extension": "py",
"fi... | 2.515625 | stackv2 | from __future__ import print_function
from __future__ import division
from PIL import Image
import os.path
import numpy as np
import sys
import multiprocessing
from math import ceil
import ctypes
import torch.utils.data as data
from torchvision.datasets.utils import download_url, check_integrity
from multiprocessing im... | 273 | 35.96 | 147 | 19 | 2,539 | python | [{"finding_id": "codeql_py/tarslip_c1ac8a9f762487e5_905caa9b", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | |
2024-11-19T02:07:06.888755+00:00 | 1,534,168,482,000 | ebcc3a0c698fcdc4098a7847a5ae78bbaef1ad32 | 4 | {
"blob_id": "ebcc3a0c698fcdc4098a7847a5ae78bbaef1ad32",
"branch_name": "refs/heads/master",
"committer_date": 1534168482000,
"content_id": "e14f76c6a24088bd1291ef629f17e7ec6d651fc5",
"detected_licenses": [
"MIT"
],
"directory_id": "dffb9a8855adecc4bd4d21b9168a4e9bdc75e508",
"extension": "py",
"fi... | 4.21875 | stackv2 | """
问题描述:给定两个字符串str1和str2,如果str1和str2中出现的字符种类一样且每种字符出现
的次数也一样,那么str1和str2互为变形词。请实现函数判断两个字符串是否互为变形词。
举例:
str1='123', str2='231',返回true
str1='123', str2='2331',返回false
"""
class Words:
@classmethod
def is_similar_words(cls, str1, str2):
if len(str1) != len(str2):
return False
my_di... | 38 | 20.13 | 50 | 15 | 263 | python | [] | 0 | true | |
2024-11-19T02:07:06.939939+00:00 | 1,516,214,168,000 | e44aaf390b2962adf6f0d95d4a69c9fde7f7c534 | 3 | {
"blob_id": "e44aaf390b2962adf6f0d95d4a69c9fde7f7c534",
"branch_name": "refs/heads/master",
"committer_date": 1516214168000,
"content_id": "c3a884a426aa3544cece7c7b58cb45a60fce5e2e",
"detected_licenses": [
"MIT"
],
"directory_id": "9580c82325a6ddf57d3f06fa4914c9d66afbd73b",
"extension": "py",
"fi... | 3.375 | stackv2 | '''
Python 2
Writes to three files:
Login
Person
Clients
since they're all connected
Uses 2 instead of 3 because of faker library
'''
import string
import random
from datetime import datetime
from string import split
from faker import Faker
fake = Faker()
def GetFirstName():
nameList = split(fake.name())
... | 203 | 20.76 | 71 | 14 | 1,135 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_902357cd416100f4_5180ed74", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\... | 3 | true | |
2024-11-19T02:07:09.743173+00:00 | 1,611,209,099,000 | 047ce833a3f232bfbdea9e6f698d2a36bc73f26f | 2 | {
"blob_id": "047ce833a3f232bfbdea9e6f698d2a36bc73f26f",
"branch_name": "refs/heads/master",
"committer_date": 1611209099000,
"content_id": "c9cffaeeab6283bf8ab06c4a6c3ba8ba095e4667",
"detected_licenses": [
"MIT"
],
"directory_id": "04ab3ae12e737669ac1d3cb83219939ff4a92bcd",
"extension": "py",
"fi... | 2.46875 | stackv2 | import argparse
import pandas as pd
from sklearn import preprocessing
from sklearn import metrics
import joblib
from src import dispatcher, config
TRAINING_DATA = config.TRAINING_DATA
TEST_DATA = config.TEST_DATA
FOLDS = config.FOLDS
FOLD_MAPPING = {
0: [1, 2, 3, 4],
1: [0, 2, 3, 4],
2: [0, 1, 3, 4],
... | 72 | 30.22 | 84 | 17 | 603 | python | [] | 0 | true | |
2024-11-19T02:07:09.795025+00:00 | 1,670,712,108,000 | 174fd227482aa265517e1602139b5df4a7d2e2d8 | 3 | {
"blob_id": "174fd227482aa265517e1602139b5df4a7d2e2d8",
"branch_name": "refs/heads/master",
"committer_date": 1670712108000,
"content_id": "5ef596137357f31b003bd99ef20db1870c4a910a",
"detected_licenses": [
"MIT"
],
"directory_id": "e31e040298b4258fed68d391de3aeb5590717b9b",
"extension": "py",
"fi... | 3.296875 | stackv2 | import re
from typing import List, Pattern, Tuple, Any
from easyshare.utils.types import is_str
def keepchars(s: str, allowed: str) -> str:
"""
Returns the characters of 's' there are in 'allowed'
"""
ret = ""
for c in s:
if c in allowed:
ret += c
return ret
def discardc... | 133 | 23.23 | 79 | 14 | 873 | python | [] | 0 | true | |
2024-11-19T02:07:09.966669+00:00 | 1,493,044,944,000 | 9c09aca582a601044d0d309d9713fd762bdf425a | 3 | {
"blob_id": "9c09aca582a601044d0d309d9713fd762bdf425a",
"branch_name": "refs/heads/master",
"committer_date": 1493044944000,
"content_id": "482b43de9cb07929f46c8da73d7e592047322471",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8f3bb6514211e2ccfb38da4cc45e95c0e56cbcd6",
"extension": "py"... | 2.84375 | stackv2 | """
Copyright 2015 The MITRE Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softw... | 55 | 32.38 | 83 | 12 | 429 | python | [] | 0 | true | |
2024-11-19T02:07:10.193553+00:00 | 1,513,041,891,000 | 7c2a72a871fa95d5da4f10914a93ae37b0ee0978 | 3 | {
"blob_id": "7c2a72a871fa95d5da4f10914a93ae37b0ee0978",
"branch_name": "refs/heads/master",
"committer_date": 1513041891000,
"content_id": "859005e641982bacda4d80ddfe9e56f49fe0bf3f",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "0b2cf46f31b277d004ba354c2fdb053eca59a0ff",
"extension": "p... | 2.765625 | stackv2 | import xml.sax
class GetAlasLinks(xml.sax.ContentHandler):
def __init__(self):
xml.sax.ContentHandler.__init__(self)
self.match = False
self.counter = 0
self.link = ""
self.cve_id = ""
def startElement(self, name, attrs):
pass
def endElement(self, name):
... | 42 | 26.1 | 63 | 14 | 277 | python | [] | 0 | true | |
2024-11-19T02:07:11.668454+00:00 | 1,485,822,054,000 | 4fd3b68d3162a373e551dca14ce805a759fd59dd | 3 | {
"blob_id": "4fd3b68d3162a373e551dca14ce805a759fd59dd",
"branch_name": "refs/heads/master",
"committer_date": 1485822054000,
"content_id": "ee2c508059bfbde14724e1e7de120cbee8dc2340",
"detected_licenses": [
"MIT"
],
"directory_id": "efcdba6b7676256a530e2f1aefb41326a9093a2f",
"extension": "py",
"fi... | 2.53125 | stackv2 | import codecs
import os
import re
from doctest import DocTestParser
from django.core.management.base import BaseCommand, CommandError
from HadithHouseWebsite import settings
from hadiths.models import Hadith, Book, BookVolume, BookChapter
from hadiths import initial_data
from textprocessing.generic import reformat_te... | 115 | 37.68 | 98 | 20 | 1,220 | python | [] | 0 | true | |
2024-11-19T02:07:11.755802+00:00 | 1,564,257,364,000 | a4eac47719059652212dd5d9279563d78f7db582 | 3 | {
"blob_id": "a4eac47719059652212dd5d9279563d78f7db582",
"branch_name": "refs/heads/master",
"committer_date": 1564257364000,
"content_id": "9ea7ad35929435a0059fcc7bc1a29962224f2bc6",
"detected_licenses": [
"ISC"
],
"directory_id": "d9580886d358ffdf9f50856d2d2a3accaa708181",
"extension": "py",
"fi... | 2.765625 | stackv2 | import math
import operator
import sybil_rank
class GroupSybilRank(sybil_rank.SybilRank):
def __init__(self, graph, options=None):
groups = {}
for node in graph.nodes():
for group in node.groups:
if group in groups:
groups[group].append(node)
... | 85 | 39.33 | 88 | 20 | 712 | python | [] | 0 | true | |
2024-11-19T02:07:11.816017+00:00 | 1,686,221,069,000 | f5adfd3c1de856ea72c1404609fafdc4ad86c38c | 2 | {
"blob_id": "f5adfd3c1de856ea72c1404609fafdc4ad86c38c",
"branch_name": "refs/heads/master",
"committer_date": 1686221069000,
"content_id": "6eeb24a279713c1542cbc3105cc006dce6980a8a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8780003cb76d11e3009a5170a49d38a337f0f32f",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/python3
#
# Copyright (c) 2020 Saarland University.
#
# This file is part of AM Parser
# (see https://github.com/coli-saar/am-parser/).
#
# 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... | 323 | 41.33 | 102 | 20 | 3,550 | python | [] | 0 | true | |
2024-11-19T02:07:11.972339+00:00 | 1,495,515,197,000 | 24f723f917a7a8a9ff1a62f7990f5f5ca9d1b518 | 3 | {
"blob_id": "24f723f917a7a8a9ff1a62f7990f5f5ca9d1b518",
"branch_name": "refs/heads/master",
"committer_date": 1495515197000,
"content_id": "7b346972ddc3f597965725e9902848aa422c0016",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "74714626d1717f6a85ecfcd6ce220535c56d2bf8",
"extension": "py"... | 2.734375 | stackv2 | import urllib.request
from bs4 import BeautifulSoup
# link ="http://www.amazon.in/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=sita+amish"
def amazon_crawl(link):
print(link)
with urllib.request.urlopen(link) as url:
s = url.read()
# fo = open('Crawlers/extracts/foo.txt','r')
# so... | 37 | 39.7 | 145 | 12 | 391 | python | [] | 0 | true | |
2024-11-19T02:07:12.032247+00:00 | 1,563,952,828,000 | b44afda776eb2fab8b1ef1aab634f4e4329f0112 | 3 | {
"blob_id": "b44afda776eb2fab8b1ef1aab634f4e4329f0112",
"branch_name": "refs/heads/master",
"committer_date": 1563952828000,
"content_id": "877c3b854ee9e048f5adabd244bd2f24831758f0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "267b2f05e2886691486ec12c3597a09d047f315b",
"extension": "py"... | 2.578125 | stackv2 | import click
import time
from datetime import datetime
from datetime import timedelta
from tcfcli.cmds.native.common.invoke_context import InvokeContext
from tcfcli.cmds.local.common.options import invoke_common_options
from tcfcli.common.user_exceptions import InvalidEnvParameters
from tcfcli.common.scf_client.scf_log... | 102 | 36.32 | 126 | 15 | 945 | python | [] | 0 | true | |
2024-11-19T02:07:12.777947+00:00 | 1,614,201,759,000 | c96d512f2532d9e91be0534b1e30cb5e8f2268c4 | 3 | {
"blob_id": "c96d512f2532d9e91be0534b1e30cb5e8f2268c4",
"branch_name": "refs/heads/master",
"committer_date": 1614201759000,
"content_id": "ba9c9e8df314a98c2ad47c93ca4c8ea8b43d10f0",
"detected_licenses": [
"MIT"
],
"directory_id": "3244bed93e3bd5dbaba21a2ab99e3a0a5f9dc0e3",
"extension": "py",
"fi... | 2.640625 | stackv2 | import json
from searchLibraryComponents import get_library_by_id
with open("twda.json", "r") as twda_input, open("twdDecks.json", "w") as twdaDecks_file, open("twdDecksById.json", "w") as twdaDecksById_file:
twda = json.load(twda_input)
decks = []
decks_by_id = {}
total = len(twda)
for idx, i in ... | 131 | 32.09 | 146 | 20 | 1,026 | python | [] | 0 | true | |
2024-11-19T02:07:12.828526+00:00 | 1,665,266,596,000 | 0c3141e21f154ea70cc77c5e0fb3f9de9f5c52d9 | 3 | {
"blob_id": "0c3141e21f154ea70cc77c5e0fb3f9de9f5c52d9",
"branch_name": "refs/heads/main",
"committer_date": 1665266596000,
"content_id": "1e622749ce7ea5ddbd064fc634e17a3cb249338b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "aa1e94b135980848c045146c6a8cbfcaedb7cf8b",
"extension": "py"... | 3.125 | stackv2 | from queens import __author__
from queens import __version__
from queens import __year__
from queens.matrix import Matrix
from queens.solution import Solution
DEFAULT_SIZE = 8
def main():
import argparse
__version__author__year__ = "{} | {} {}".format(
__version__,
__author__,
__yea... | 47 | 20.94 | 64 | 12 | 227 | python | [] | 0 | true | |
2024-11-19T02:07:12.893021+00:00 | 1,571,146,806,000 | 0ecb524d43d744305812830679a95d8dd01a54ca | 3 | {
"blob_id": "0ecb524d43d744305812830679a95d8dd01a54ca",
"branch_name": "refs/heads/master",
"committer_date": 1571146806000,
"content_id": "580c961256ef6e760c883aba29553ed149773328",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "ad711807b8ac80ee9b9ca1a87a9f14ca53a6add0",
"extension": "p... | 2.96875 | stackv2 | from io import StringIO
from tokenize import generate_tokens
from pipeline.processing_step import ProcessingStep
class Tokenizer(ProcessingStep):
"""
Input for Pipeline - An array of strings, each string is a code snippet
Output for Pipeline - An array of arrays of tokens
"""
def operation(self, ... | 20 | 27.6 | 91 | 14 | 120 | python | [] | 0 | true | |
2024-11-19T02:07:12.969013+00:00 | 1,693,509,245,000 | 2f9677af32bb2c38b407e5204169812936a6d0f9 | 3 | {
"blob_id": "2f9677af32bb2c38b407e5204169812936a6d0f9",
"branch_name": "refs/heads/master",
"committer_date": 1693509245000,
"content_id": "5856abb72ef1a07da935cb91d916882d6e9b097d",
"detected_licenses": [
"MIT"
],
"directory_id": "8ca19f1a31070738b376c0370c4bebf6b7efcb43",
"extension": "py",
"fi... | 2.765625 | stackv2 | from office365.entity import Entity
from office365.runtime.types.collections import StringCollection
class SingleValueLegacyExtendedProperty(Entity):
"""An extended property that contains a single value."""
@property
def value(self):
"""
A property value.
:rtype: str
"""
... | 23 | 26.61 | 68 | 12 | 122 | python | [] | 0 | true | |
2024-11-19T02:07:13.272093+00:00 | 1,386,448,960,000 | ea529d4313c0684459a09156b8d3eee2ff47cf2c | 3 | {
"blob_id": "ea529d4313c0684459a09156b8d3eee2ff47cf2c",
"branch_name": "refs/heads/master",
"committer_date": 1386448960000,
"content_id": "4dd53c1a68e57d6351568b06acbbbbe3efe5cb2a",
"detected_licenses": [
"MIT"
],
"directory_id": "639b71e077b3d600f5d5376fae64145bf83a1186",
"extension": "py",
"fi... | 3.265625 | stackv2 | import pygame
from pygame.locals import *
import random
import math
class Enemy(pygame.sprite.Sprite):
"""All of the logic for the players ship is contained
within this class"""
def __init__(self):
pygame.sprite.Sprite.__init__(self)
self.image = pygame.image.load('Assets/ufodark.png'... | 48 | 26.04 | 76 | 13 | 346 | python | [] | 0 | true | |
2024-11-19T02:07:13.505811+00:00 | 1,505,156,876,000 | 0a6b54733b46690114e756f0661c13ae6a6ec7e5 | 3 | {
"blob_id": "0a6b54733b46690114e756f0661c13ae6a6ec7e5",
"branch_name": "refs/heads/master",
"committer_date": 1505156876000,
"content_id": "3234318f248f9f80d3eeccb570cd334ee677d4a0",
"detected_licenses": [
"MIT"
],
"directory_id": "61ddac0f84ea9e21f49999baf2a87a63518b35d3",
"extension": "py",
"fi... | 3.15625 | stackv2 | import numpy as np
from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
from ..base import DataCleaningPrimitiveBase
class RFFeatures(DataCleanin... | 120 | 44.4 | 111 | 18 | 967 | python | [] | 0 | true | |
2024-11-19T02:07:13.620455+00:00 | 1,684,850,668,000 | 608b73479024df62c89f3a7e2b075f2ebfbcaf43 | 3 | {
"blob_id": "608b73479024df62c89f3a7e2b075f2ebfbcaf43",
"branch_name": "refs/heads/master",
"committer_date": 1684850718000,
"content_id": "4f1bf30edbc39e6408b04d38b9dc013cf7667bd1",
"detected_licenses": [
"MIT"
],
"directory_id": "ed47a2ba75f74448f0131b4f84d335434635ed6a",
"extension": "py",
"fi... | 2.703125 | stackv2 | import re
import requests
import pandas as pd
import base64
import config
from getpass import getpass
from datetime import datetime, timedelta
toggl_headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic ' + base64.b64encode(f'{config.TOGGL_API_TOKEN}:api_token'.encode()).decode()
}
jira_head... | 109 | 33.92 | 124 | 16 | 957 | python | [] | 0 | true | |
2024-11-19T02:07:14.288853+00:00 | 1,645,370,795,000 | ee16144b4d5053b58f19c2b4a98aae81c3e4ccb3 | 3 | {
"blob_id": "ee16144b4d5053b58f19c2b4a98aae81c3e4ccb3",
"branch_name": "refs/heads/master",
"committer_date": 1645370795000,
"content_id": "dec567e04ebf0663d9f34c491e923dc61d45c7a6",
"detected_licenses": [
"MIT"
],
"directory_id": "4d44674625100e62be2bb5033339fb641bd454ac",
"extension": "py",
"fi... | 2.515625 | stackv2 | # -*- encoding: utf-8 -*-
import logging
LOG = logging.getLogger(__name__)
class GreenTaskPool(object):
from threading import Thread
def __init__(self, size=10000, use_eventlet=False, use_gevent=False,
auto_detection=False):
self._size = size
if use_eventlet:
e... | 54 | 31.33 | 85 | 19 | 393 | python | [] | 0 | true | |
2024-11-19T02:07:14.397637+00:00 | 1,589,152,193,000 | 2f599c2f82c77fc4c62e26c3a6c901720a503e90 | 3 | {
"blob_id": "2f599c2f82c77fc4c62e26c3a6c901720a503e90",
"branch_name": "refs/heads/master",
"committer_date": 1589152193000,
"content_id": "de5b001e69fec3086f96206a637f0c729ab361d1",
"detected_licenses": [
"MIT"
],
"directory_id": "8f2edcb9e64920bfc5fe9b86ffaf9d4fab3aa09f",
"extension": "py",
"fi... | 2.546875 | stackv2 | import configparser
from pathlib import Path
BASE_PATH = Path('~/.config/tofi').expanduser()
SECRETS_PATH = BASE_PATH / '.secrets'
CONFIG_PATH = BASE_PATH / 'tofi.ini'
def ensure_config_paths():
"""Ensures that all config paths needed for execution are created."""
BASE_PATH.mkdir(parents=True, exist_ok=True... | 32 | 23.22 | 90 | 11 | 176 | python | [] | 0 | true | |
2024-11-19T02:07:14.510998+00:00 | 1,555,702,187,000 | 179dc277610d38b7d8111eeb2c7059c62e694e3b | 4 | {
"blob_id": "179dc277610d38b7d8111eeb2c7059c62e694e3b",
"branch_name": "refs/heads/master",
"committer_date": 1555702187000,
"content_id": "181b1e992a8ea69002584205c2dac9bca04511c5",
"detected_licenses": [
"MIT"
],
"directory_id": "61545b52d297ef7d9eca37eb3a47a7002ddcd260",
"extension": "py",
"fi... | 3.8125 | stackv2 | """
Day 07 - Advent of Code:
This challenge requires building a dependency graph
TODO explain more
"""
import argparse
import logging
from sortedcontainers import SortedSet
import itertools
class Instruction:
"""
An instruction is a
"""
def __init__(self, name):
sel... | 108 | 23.42 | 104 | 13 | 573 | python | [] | 0 | true | |
2024-11-19T02:07:14.587605+00:00 | 1,536,041,519,000 | fcc6c47c31b1f89552f3d37d6edd0a28f1455c9c | 3 | {
"blob_id": "fcc6c47c31b1f89552f3d37d6edd0a28f1455c9c",
"branch_name": "refs/heads/master",
"committer_date": 1536041519000,
"content_id": "312e4f9ed0a94e6025c78478231910e425f55972",
"detected_licenses": [
"MIT"
],
"directory_id": "c74523edf76cbc5a97f950814247cc455048c64e",
"extension": "py",
"fi... | 3.140625 | stackv2 | #!/usr/bin/env python
#=============================================================================#
# #
# NAME: 1_classify_simple.py #
# ... | 207 | 38.33 | 79 | 13 | 1,840 | python | [] | 0 | true | |
2024-11-19T02:07:14.689271+00:00 | 1,552,620,175,000 | 5ffe4d9194ff521f0df87c1114b859bd10c950b8 | 3 | {
"blob_id": "5ffe4d9194ff521f0df87c1114b859bd10c950b8",
"branch_name": "refs/heads/master",
"committer_date": 1552620175000,
"content_id": "e3649749732f5c38d5ae802dc3c3b9e61b4c24a8",
"detected_licenses": [
"MIT"
],
"directory_id": "7d3aeb6dfb9600dbf3b8686d40630cade27111b7",
"extension": "py",
"fi... | 2.59375 | stackv2 | from django.db import models
class Author(models.Model):
name = models.CharField(max_length=200)
email = models.EmailField(null=True)
def __str__(self):
return self.name
class Theme(models.Model):
name = models.CharField(max_length=255)
key = models.CharField(max_length=255, primary_key... | 27 | 28.52 | 60 | 16 | 186 | python | [] | 0 | true | |
2024-11-19T02:07:14.766647+00:00 | 1,547,083,732,000 | 67f613b48f253fd3042a1ae5b53fd8f727e0db7b | 3 | {
"blob_id": "67f613b48f253fd3042a1ae5b53fd8f727e0db7b",
"branch_name": "refs/heads/master",
"committer_date": 1547083732000,
"content_id": "00256ebcfac8268cc43e1304be66dc0a595cdb34",
"detected_licenses": [
"MIT"
],
"directory_id": "63a9423ae09ed57bd155616b7b73d8d7c1784a8b",
"extension": "py",
"fi... | 2.84375 | stackv2 |
#pylint: disable=C0103,C0111,C0304
from flask import Flask, render_template, jsonify, request
import sqlite3
from get_lyrics import song_lyrics_and_art
from translate_words import get_translate_entry, translate
from fudge_lyrics import fudge
# from get_lyrics import song_id
app = Flask(__name__)
class Song:
de... | 96 | 24.89 | 89 | 15 | 600 | python | [{"finding_id": "codeql_py/sql-injection_b8785e41ef39986a_4332165b", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 1 | true | |
2024-11-19T02:07:14.872279+00:00 | 1,539,921,973,000 | bd9ec3e31a27b6f740536825a494ae71e9861aed | 4 | {
"blob_id": "bd9ec3e31a27b6f740536825a494ae71e9861aed",
"branch_name": "refs/heads/master",
"committer_date": 1539921973000,
"content_id": "9df3d21761c9912ec8526ccc116766d258628d19",
"detected_licenses": [
"MIT"
],
"directory_id": "bb86f65d86ee94d1e77bb85be7eb10ff0fbfc590",
"extension": "py",
"fi... | 3.828125 | stackv2 | import turtle
''' this moves turtle and makes a triangle'''
def turtle_triangle():
window = turtle.Screen()
window.bgcolor("red")
brad = turtle.Turtle()
brad.shape("turtle")
brad.color("yellow")
brad.speed(1)
for _ in range(3):
brad.right(60)
brad.forward(200)
... | 21 | 17.33 | 45 | 9 | 101 | python | [] | 0 | true | |
2024-11-19T02:07:14.997150+00:00 | 1,593,389,817,000 | 90829491d73e7a7c123f6790dcbea9717d2a56b2 | 3 | {
"blob_id": "90829491d73e7a7c123f6790dcbea9717d2a56b2",
"branch_name": "refs/heads/master",
"committer_date": 1593389817000,
"content_id": "ab3c9a0d9cdf62987c5e7adebd6b996f35907d0d",
"detected_licenses": [
"MIT"
],
"directory_id": "4fbdc08e6b5f640be39ade78011477170e9ecc87",
"extension": "py",
"fi... | 3.078125 | stackv2 | import math
import cv2
class SelfDriver(object):
def __init__(self, ser):
self.ser = ser
def steer(self, prediction):
if prediction == [1.0, 0.0, 0.0]:
self.ser.write(chr(6).encode())
elif prediction == [0.0, 1.0, 0.0]:
self.ser.write(chr(1).encode())
... | 41 | 28.59 | 77 | 18 | 364 | python | [] | 0 | true | |
2024-11-19T02:07:15.057936+00:00 | 1,508,097,369,000 | 2cf11dc42e56d5d498c89e072035eee504a6f838 | 2 | {
"blob_id": "2cf11dc42e56d5d498c89e072035eee504a6f838",
"branch_name": "refs/heads/master",
"committer_date": 1508097369000,
"content_id": "cf71f19b16dacd2e1c197827e715948c361ba813",
"detected_licenses": [
"MIT"
],
"directory_id": "b21aae08e211f297ce8237ad863bb334e2be5261",
"extension": "py",
"fi... | 2.5 | stackv2 | from Core.Database import Database
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, Float
Base = declarative_base()
class TestResult(Base):
__tablename__ = 'testresults'
id = Column(Integer, primary_key=True)
submission_id_program = Column(Integer)
sub... | 32 | 27.66 | 107 | 9 | 190 | python | [] | 0 | true | |
2024-11-19T02:07:15.177975+00:00 | 1,622,108,990,000 | d3d3b574f16077ffe4e05c97b2f87c86a9d01e6c | 3 | {
"blob_id": "d3d3b574f16077ffe4e05c97b2f87c86a9d01e6c",
"branch_name": "refs/heads/master",
"committer_date": 1622108990000,
"content_id": "e00cf4d2d30162e0e660f2afdd16b84efdda659f",
"detected_licenses": [
"MIT"
],
"directory_id": "f786ae1287c601fe8458d8705cf33c1f35e56720",
"extension": "py",
"fi... | 2.828125 | stackv2 | #!/usr/bin/env python
"""Provides scikit interface."""
import numpy as np
import networkx as nx
import random
import logging
logger = logging.getLogger(__name__)
class NeighborhoodNodeSmooth(object):
def __init__(self, n_nodes=1, n_neighbors=10, part_importance_estimator=None):
self.part_importance_esti... | 55 | 31.09 | 82 | 16 | 398 | python | [] | 0 | true | |
2024-11-19T02:07:15.336812+00:00 | 1,593,780,393,000 | 72c7f6dcc975b98b7ad8bca4ff6a57c6d84e1efb | 3 | {
"blob_id": "72c7f6dcc975b98b7ad8bca4ff6a57c6d84e1efb",
"branch_name": "refs/heads/master",
"committer_date": 1593780393000,
"content_id": "9d0a97abbc9141f42e958cff702c36ea00059e98",
"detected_licenses": [
"MIT"
],
"directory_id": "8ae482c954b81ba10ded6cf988e427d072e72c06",
"extension": "py",
"fi... | 3.40625 | stackv2 |
# Problem code
def exist(board, word):
for row in range(0, len(board)):
for col in range(0, len(board[0])):
visited = set()
if find(board, row, col, word, visited):
return True
return False
def find(board, row, col, word, visited):
if len(word) == 0:
... | 26 | 31.85 | 71 | 15 | 241 | python | [] | 0 | true | |
2024-11-19T02:07:15.684511+00:00 | 1,409,543,527,000 | baca3fe8c14a6ce66ac29e2fbbfc3d63ea304bc1 | 3 | {
"blob_id": "baca3fe8c14a6ce66ac29e2fbbfc3d63ea304bc1",
"branch_name": "refs/heads/master",
"committer_date": 1409543527000,
"content_id": "e1a3dd3aef0dcbc87a12f5060987266228c7c6f3",
"detected_licenses": [
"MIT"
],
"directory_id": "63d5de2bb9790b692609aef6af4c227bd816593e",
"extension": "py",
"fi... | 2.59375 | stackv2 | import networkx as nx
import csv
import itertools
import matplotlib.pyplot as plt
import numpy as np
import table
from collections import OrderedDict
def read_contributors_fc():
contributors = {}
projects = {}
fp = file('../data/fcProjectAuthors2013-Sep.txt')
csvreader = csv.DictReader(filter(lambda r... | 257 | 28.57 | 159 | 16 | 1,830 | python | [] | 0 | true | |
2024-11-19T02:07:15.992316+00:00 | 1,584,700,102,000 | ea35ea4e2c65cdf8ab6598d7f0399cef3db4e32c | 2 | {
"blob_id": "ea35ea4e2c65cdf8ab6598d7f0399cef3db4e32c",
"branch_name": "refs/heads/master",
"committer_date": 1584700102000,
"content_id": "b4458407b93a3a8a447444bcc17595605ac86a28",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "291f0aa9a40eeca26fb08106c952b9347db7dba7",
"extension": "py"... | 2.5 | stackv2 | from django.shortcuts import render
from django.http import HttpResponse
from .models import Article,Category,Tag
from front.models import FrontUser,UserExtension
# Create your views here.
def index(request):
# category = Category(name='伦理')
# category.save()
# article = Article(title='今天已经第15天数字连续下降',conte... | 104 | 30.1 | 107 | 12 | 890 | python | [] | 0 | true | |
2024-11-19T02:07:16.104161+00:00 | 1,558,224,763,000 | 25a34e42aa8db1e2521999dff0743ea28bd265dc | 2 | {
"blob_id": "25a34e42aa8db1e2521999dff0743ea28bd265dc",
"branch_name": "refs/heads/master",
"committer_date": 1558224763000,
"content_id": "e73788fa1634b53a8c8a13d9cbe20f1ffce1ff10",
"detected_licenses": [
"MIT",
"Unlicense"
],
"directory_id": "46ac0965941d06fde419a6f216db2a653a245dbd",
"extens... | 2.359375 | stackv2 | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class ItunesTeamsRes... | 138 | 26.96 | 82 | 23 | 939 | python | [] | 0 | true | |
2024-11-19T02:07:16.154644+00:00 | 1,649,332,990,000 | c6aaa899004379e02aeabbb4759b161028bbcf94 | 3 | {
"blob_id": "c6aaa899004379e02aeabbb4759b161028bbcf94",
"branch_name": "refs/heads/master",
"committer_date": 1649332990000,
"content_id": "bc5a801f797494491d283e787d94a14b836e1285",
"detected_licenses": [
"MIT"
],
"directory_id": "13da247aef4ceccf29c4b13991932a441fa4b3bb",
"extension": "py",
"fi... | 2.59375 | stackv2 | import numpy as np
import os
def concentration(temp, Paml22PT, f_22PT, PamlSIS=0., f_SIS=0., amltemp=300):
"""Calculate gas number density in the trap [cm^-3] from outside pressure in Pa
Args:
temp: trap temperature in K
Paml22PT: pressure on the outside gauge due to gas added into the tr... | 295 | 34.81 | 139 | 20 | 3,022 | python | [] | 0 | true | |
2024-11-19T02:07:16.889974+00:00 | 1,623,892,913,000 | e256acacad99b9744aec0abc3c014e0c5c3786f8 | 3 | {
"blob_id": "e256acacad99b9744aec0abc3c014e0c5c3786f8",
"branch_name": "refs/heads/master",
"committer_date": 1623892913000,
"content_id": "d4523d27585b5fb4ec12b012bd6b9290619921c4",
"detected_licenses": [
"MIT"
],
"directory_id": "b65a7cad11c96682628ff023a24a617118733881",
"extension": "py",
"fi... | 2.515625 | stackv2 | import os
import os.path as osp
import numpy as np
import random
import collections
import torch
import torchvision
from torch.utils import data
from PIL import Image
class synthiaDataSet(data.Dataset):
def __init__(self, root, list_path, crop_size=(321, 321), mean=(128, 128, 128), scale=True, mirror=True, ignore... | 65 | 29.85 | 127 | 14 | 567 | python | [] | 0 | true | |
2024-11-19T02:07:16.945151+00:00 | 1,685,167,371,000 | 9b512edf1c6564c45599210ef279757f6898cd7f | 2 | {
"blob_id": "9b512edf1c6564c45599210ef279757f6898cd7f",
"branch_name": "refs/heads/master",
"committer_date": 1685167371000,
"content_id": "bebdff53047be6f0f812a09ef6fb13b12ea5237f",
"detected_licenses": [
"MIT"
],
"directory_id": "1438372bd182bd012265a955690b36cd8dcfc883",
"extension": "py",
"fi... | 2.4375 | stackv2 | import ctypes
try:
dll = ctypes.WinDLL('ntdll.dll')
except AttributeError:
class MockObject:
def __getattr__(self, item):
return self
dll = MockObject()
NTSTATUS = ctypes.c_ulong
THREADINFOCLASS = ctypes.c_ulong
#: Retrieves information about the specified thread.
#:
#: https://msdn.... | 26 | 23.46 | 73 | 10 | 153 | python | [] | 0 | true | |
2024-11-19T02:07:17.067304+00:00 | 1,548,949,686,000 | b9ccddfe135139ea9e4e80f3a2f2a321a34b9ff9 | 2 | {
"blob_id": "b9ccddfe135139ea9e4e80f3a2f2a321a34b9ff9",
"branch_name": "refs/heads/master",
"committer_date": 1548949686000,
"content_id": "d321480706f26e8610e310eb72d3d98d5151e4b2",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "61457cdf589e083831a736096950204a892f8e13",
"extension": "p... | 2.390625 | stackv2 | # [h] Measure Handles Tool
import os
from AppKit import NSImage
from mojo.events import *
from MeasureHandles import MeasureHandles
# objects
class MeasureHandlesTool(EditingTool):
icon_file_name = 'measure-handles-tool-icon.pdf'
dirname = os.path.dirname(__file__)
toolbar_icon = NSImage.alloc().initByR... | 31 | 22.35 | 96 | 11 | 160 | python | [] | 0 | true | |
2024-11-19T02:07:17.196168+00:00 | 1,566,217,362,000 | bd6d274840ee7d16cdab607a1b0befde95e4a6db | 3 | {
"blob_id": "bd6d274840ee7d16cdab607a1b0befde95e4a6db",
"branch_name": "refs/heads/master",
"committer_date": 1566217362000,
"content_id": "2432826ebf0d9783a5c478eb3acf63ebb490d743",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "050744ea81f131f0bb3bdb1b9b8a25136aca63dd",
"extension": "p... | 2.625 | stackv2 | # FocusMixin and CommandBar(Input) based on https://github.com/csrgxtu/Drogo/
import urwid, re, collections
import logging
log = logging.getLogger(__name__)
class QuotePreview(urwid.WidgetWrap):
signals = ['close']
def __init__(self, quoteNumber, urwidViewManager):
currViewThreadWidgets = urwidViewMa... | 128 | 35.8 | 94 | 15 | 1,103 | python | [] | 0 | true | |
2024-11-19T02:07:17.518184+00:00 | 1,631,864,456,000 | 4198eb749e63878c242d8f44ad699482d4691aa8 | 3 | {
"blob_id": "4198eb749e63878c242d8f44ad699482d4691aa8",
"branch_name": "refs/heads/main",
"committer_date": 1631864456000,
"content_id": "cdb24af3872f314d7051d0070439812a26dfd596",
"detected_licenses": [
"BSD-3-Clause",
"MIT"
],
"directory_id": "81229598da06fdb5164cdff99ec8e0d7fc50a070",
"exten... | 2.671875 | stackv2 | # -*- coding: utf-8 -*-
#
# Author: Kazuto Nakashima
# URL: https://kazuto1011.github.io
# Date: 09 January 2019
import numpy as np
import pydensecrf.densecrf as dcrf
import pydensecrf.utils as utils
class DenseCRF(object):
def __init__(self, max_epochs=5, delta_aphla=80, delta_beta=3, w1=10, delta_gamma=3, ... | 75 | 30.28 | 113 | 12 | 673 | python | [] | 0 | true | |
2024-11-19T02:07:18.162525+00:00 | 1,518,163,674,000 | 47fab0e4396a93ca1889c7b1f879e9b485103c9f | 4 | {
"blob_id": "47fab0e4396a93ca1889c7b1f879e9b485103c9f",
"branch_name": "refs/heads/master",
"committer_date": 1518163674000,
"content_id": "2f434850215f05423d1fac52d64622c21eb93f57",
"detected_licenses": [
"MIT"
],
"directory_id": "644984edc7bd12c395f20b204e0201aca068c541",
"extension": "py",
"fi... | 4.21875 | stackv2 | # Problem: Max Consecutive Ones
# Difficulty: Easy
# Category: Array
# Leetcode 485: https://leetcode.com/problems/max-consecutive-ones/#/description
# Description:
"""
Given a binary array, find the maximum number of consecutive 1s in this array.
Example 1:
Input: [1,1,0,1,1,1]
Output: 3
Explanation: The first two di... | 42 | 24.71 | 80 | 15 | 344 | python | [] | 0 | true | |
2024-11-19T02:07:18.322581+00:00 | 1,551,361,211,000 | 7347aa5f91af9c692964be7ffe2b8d8203a98f8c | 3 | {
"blob_id": "7347aa5f91af9c692964be7ffe2b8d8203a98f8c",
"branch_name": "refs/heads/master",
"committer_date": 1551361211000,
"content_id": "587cc23fae8f36df3863e8dffeef0c7efbafaf84",
"detected_licenses": [
"MIT"
],
"directory_id": "05c7b370bbbb48178e634224f4a857183067b3b0",
"extension": "py",
"fi... | 2.90625 | stackv2 | # Scripts for topics detection
import json
from gensim import models, corpora
from src.utils import data_connector
from src.methods import preprocessing
from src.utils import mongodb
import dateutil
import datetime
class TopicDetector:
def __init__(self, model_name, representation, num_topics, time_range):
... | 74 | 48.27 | 127 | 19 | 707 | python | [] | 0 | true | |
2024-11-19T02:07:18.384265+00:00 | 1,576,770,645,000 | 70d5848a46741db23c8c2c3b2bef6982e91eb6b5 | 3 | {
"blob_id": "70d5848a46741db23c8c2c3b2bef6982e91eb6b5",
"branch_name": "refs/heads/master",
"committer_date": 1576770645000,
"content_id": "4a35614cf303ca39dbdfeabb22e11a24f0dc5f5f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f81dc23f3509197267b3e5cf30d23740531bddc7",
"extension": "py"... | 3.46875 | stackv2 | """
Adt for the String Sort.
"""
# Aurelien Coet, 2018.
from alpyne.adt import Sort, GenericSort
from alpyne.adts.boolean import boolean
chars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'0', '1', '2', '3', '... | 142 | 28.8 | 74 | 16 | 919 | python | [] | 0 | true | |
2024-11-19T02:07:19.502653+00:00 | 1,611,022,468,000 | b18689fb4887526bc9645e15a70593e60752c161 | 2 | {
"blob_id": "b18689fb4887526bc9645e15a70593e60752c161",
"branch_name": "refs/heads/master",
"committer_date": 1611022852000,
"content_id": "2346b19990fb45ed7f4b98945dc18459fe9e0a84",
"detected_licenses": [
"MIT"
],
"directory_id": "192a35d38d392b560cc5113db7965cbb7fde1f64",
"extension": "py",
"fi... | 2.421875 | stackv2 | """RLBotChoreography
Usage:
ChoreographyHive [--bot-folder=<folder>]
ChoreographyHive (-h | --help)
Options:
-h --help Shows this help message.
--bot-folder=<folder> Searches this folder for bot configs to use for names and appearances [default: .].
"""
import glob
import inspect
impor... | 247 | 34.29 | 118 | 20 | 1,840 | python | [] | 0 | true | |
2024-11-19T02:07:20.618476+00:00 | 1,543,559,900,000 | 076ffb263b41a8e254e34e1c4dec4f82204770c8 | 3 | {
"blob_id": "076ffb263b41a8e254e34e1c4dec4f82204770c8",
"branch_name": "refs/heads/master",
"committer_date": 1543559900000,
"content_id": "4ed8bf1d2be9c9f9991c8fdb665f5f64b7428a5f",
"detected_licenses": [
"MIT"
],
"directory_id": "57f3b7c0c4b95d503a960ff1b8368e714f59053f",
"extension": "py",
"fi... | 2.984375 | stackv2 | from multiprocessing.dummy import Pool
import queue
import urllib.request
from datetime import datetime, timedelta
import itertools
def get_url(q:queue.Queue, url:str):
t1 = datetime.now()
item = str(urllib.request.urlopen(url).read(100000))
t2 = datetime.now()
q.put([f"{url} loaded in {str(t2-t1)} ... | 51 | 22.47 | 80 | 14 | 328 | python | [] | 0 | true | |
2024-11-19T02:07:20.733461+00:00 | 1,521,673,173,000 | 6aa862526bab89ccea92fa6858368b1788e0c533 | 2 | {
"blob_id": "6aa862526bab89ccea92fa6858368b1788e0c533",
"branch_name": "refs/heads/master",
"committer_date": 1521673173000,
"content_id": "8aae4f48e5723405109af903726e0b475634a2a5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "18ea90d54f97b70fe09c146b90cf053076113d8a",
"extension": "py"... | 2.453125 | stackv2 | # -*- coding: utf-8 -*-
""" Custom Sizer for Cryptocurrencies, allowing for fractional orders.
"""
from common import *
import backtrader as bt
from decimal import Decimal, ROUND_DOWN
class CryptoSizer(bt.Sizer):
""" Custom Crypto Sizer.
"""
params = (
('stake', 0.1),
)
def _g... | 27 | 24.93 | 79 | 17 | 163 | python | [] | 0 | true | |
2024-11-19T02:07:20.882991+00:00 | 1,509,366,957,000 | a1491f767295dac5c56d565dd21d02f22f13f69f | 3 | {
"blob_id": "a1491f767295dac5c56d565dd21d02f22f13f69f",
"branch_name": "refs/heads/master",
"committer_date": 1509366957000,
"content_id": "0fa19aec8666d5ff627fcfe9982331e6658c2678",
"detected_licenses": [
"MIT"
],
"directory_id": "e5b4d9e3240b3302db47d770260dd1bcff93d5ef",
"extension": "py",
"fi... | 2.828125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 17-9-1 下午4:08
# @Author : xiongzhibiao
# @Email : 158349411@qq.com
# @File : orm查询.py
# @Software: PyC
import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, ... | 39 | 29.92 | 98 | 10 | 366 | python | [] | 0 | true | |
2024-11-19T02:07:20.946198+00:00 | 1,580,291,254,000 | 570975d53a99f420815e1ada9fdf151a3b7d65f1 | 3 | {
"blob_id": "570975d53a99f420815e1ada9fdf151a3b7d65f1",
"branch_name": "refs/heads/master",
"committer_date": 1580291254000,
"content_id": "dffb53486150171a05f586fe8179889018403426",
"detected_licenses": [
"MIT"
],
"directory_id": "c8ab34c75fcee33f981e3f84b3869efd3d5d4bd0",
"extension": "py",
"fi... | 2.9375 | stackv2 | import requests
from bs4 import BeautifulSoup
class InquiryNatureCauseWealth:
def __init__(self):
self.title = "An Inquiry into the Nature and Causes of the Wealth of Nations"
self.author = "Adam Smith"
self.year = 1776
def get_text(self, url = "https://www.gutenberg.org/files/3300/3300-... | 83 | 42 | 158 | 13 | 918 | python | [] | 0 | true | |
2024-11-19T02:07:21.010419+00:00 | 1,588,372,418,000 | 6745a8f764d04f0fc4b13de45671ce61906a61e3 | 2 | {
"blob_id": "6745a8f764d04f0fc4b13de45671ce61906a61e3",
"branch_name": "refs/heads/master",
"committer_date": 1588372418000,
"content_id": "a9df292bdf159d136aacc6667424688910664076",
"detected_licenses": [
"MIT"
],
"directory_id": "f12d2a24664967506f2cdc4cf5e676f612944de9",
"extension": "py",
"fi... | 2.484375 | stackv2 | # import yaml
# with open('./src/country-by-capital-city.json') as json_file:
# for line in yaml.safe_load(json_file):
# print line # {'country': 'Afghanistan', 'city': 'Kabul'}
import json
import glob
from os.path import isfile
from pprint import pprint
from jsonmerge import merge
from itertools import ... | 76 | 28.79 | 87 | 13 | 667 | python | [] | 0 | true | |
2024-11-19T02:07:21.132413+00:00 | 1,662,079,988,000 | cce24a170dd98e34de192e0e0bb240de99e70b93 | 3 | {
"blob_id": "cce24a170dd98e34de192e0e0bb240de99e70b93",
"branch_name": "refs/heads/master",
"committer_date": 1662079988000,
"content_id": "b760b83a1f0ab986a6313d528d900f25f885bd3d",
"detected_licenses": [
"MIT"
],
"directory_id": "e7ca5adb8a7a72f73ca482ab27be6b5ba770c183",
"extension": "py",
"fi... | 2.640625 | stackv2 | import speech_recognition as sr
recog = sr.Recognizer()
mic = sr.Microphone()
def sysListen():
with mic as source:
recog.adjust_for_ambient_noise(source)
audio = recog.listen(source)
# setup response
response = {
"success" : True,
"error" : None,
"transcription"... | 29 | 24.93 | 65 | 11 | 175 | python | [] | 0 | true | |
2024-11-19T02:07:21.201674+00:00 | 1,586,439,283,000 | 12d9ab2807f30c7cb14a4ef1fc407c6077b94566 | 2 | {
"blob_id": "12d9ab2807f30c7cb14a4ef1fc407c6077b94566",
"branch_name": "refs/heads/master",
"committer_date": 1586439283000,
"content_id": "4ab2ca45d779e89751c49e26f559150d7ca19a2b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c741679b2d1fcd3c2cf38d5a063885a0c9dffbbc",
"extension": "py"... | 2.453125 | stackv2 | # Lint as: python2, python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. 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
#
# htt... | 294 | 37.59 | 80 | 15 | 2,773 | python | [] | 0 | true | |
2024-11-19T02:07:21.281937+00:00 | 1,535,640,817,000 | 2b9ffdc8c40b020ce8372c64f5040e9ebb089df2 | 3 | {
"blob_id": "2b9ffdc8c40b020ce8372c64f5040e9ebb089df2",
"branch_name": "refs/heads/master",
"committer_date": 1535640817000,
"content_id": "6b34f6a25e3a6c6b6e1bc596f5da716bb24d9f05",
"detected_licenses": [
"MIT"
],
"directory_id": "65a79d0532dbef512e5d22b1aea5adb4b8715db2",
"extension": "py",
"fi... | 3.1875 | stackv2 | import itertools
class Problem(object):
''' STRIPS problem representation. '''
def __init__(self, name, domain, objects, init, goal):
self._name = name
self._domain = domain
self._objects = {}
for obj in objects:
self._objects[obj.type] = self._objects.get(obj.typ... | 77 | 34.1 | 126 | 19 | 573 | python | [] | 0 | true | |
2024-11-19T02:07:21.402117+00:00 | 1,610,315,604,000 | 5571f9b5d3f9d4d6278e7ae06b5efa64ecdb8868 | 4 | {
"blob_id": "5571f9b5d3f9d4d6278e7ae06b5efa64ecdb8868",
"branch_name": "refs/heads/main",
"committer_date": 1610315604000,
"content_id": "8ce1f2d7c351bee8494cb895c8aac636e7f99419",
"detected_licenses": [
"Unlicense"
],
"directory_id": "d348d8938dac7e1189d582c685a09bb5eb2970bc",
"extension": "py",
... | 3.546875 | stackv2 | import re
from dataclasses import dataclass
from typing import Tuple
@dataclass()
class PasswordEntry:
positions: Tuple[int]
letter: str
password: str
@staticmethod
def from_entry(e: str):
position_1, position_2, letter, password = [i for i in re.split(r'[ \-:\n]', e) if i]
return... | 25 | 28.68 | 95 | 15 | 194 | python | [] | 0 | true | |
2024-11-19T02:07:21.454877+00:00 | 1,614,249,519,000 | f6151e772b719a3665dbd26d104c0ef9c28b8646 | 3 | {
"blob_id": "f6151e772b719a3665dbd26d104c0ef9c28b8646",
"branch_name": "refs/heads/master",
"committer_date": 1614249519000,
"content_id": "40ec455a98f0c320a377bb4d5f1bee165a1d205d",
"detected_licenses": [
"MIT"
],
"directory_id": "2fdf1c5bf8dc5360140e080a40c7b8b38c86e611",
"extension": "py",
"fi... | 2.515625 | stackv2 | import rx, logging, asyncio
import rx.operators as ops
class Observer:
def __init__(self,
on_next=lambda i: None,
on_error=lambda i: None,
on_completed=lambda i: None):
self.on_next = on_next
self.on_error = on_error
self.on_completed = on_completed
class Task:
... | 47 | 29.32 | 91 | 26 | 281 | python | [] | 0 | true | |
2024-11-19T02:07:21.528790+00:00 | 1,393,361,512,000 | 6f2244110f0983e11adac141dbb4ad17f118a986 | 2 | {
"blob_id": "6f2244110f0983e11adac141dbb4ad17f118a986",
"branch_name": "refs/heads/master",
"committer_date": 1393361512000,
"content_id": "8e04c04eb7e6367919c8668761f08ac2d0f7da25",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "102c082395547af278da95d2334b1ff13f5cf5c0",
"extension": "py"... | 2.375 | stackv2 | ###############################################################################
# Copyright 2006 to the present, Orbitz Worldwide, LLC.
#
# 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... | 39 | 40.97 | 114 | 14 | 375 | python | [] | 0 | true | |
2024-11-19T02:07:21.607785+00:00 | 1,551,679,172,000 | 001157ad03cacec3f28aa2ac987465440ceb9af0 | 4 | {
"blob_id": "001157ad03cacec3f28aa2ac987465440ceb9af0",
"branch_name": "refs/heads/master",
"committer_date": 1551679172000,
"content_id": "b5fc06dd12e53af9c052c895c54ab13d60c8744a",
"detected_licenses": [
"MIT"
],
"directory_id": "ef70292809887c6e38a3b579d85a540f3886bc6b",
"extension": "py",
"fi... | 4.4375 | stackv2 |
fruits = ['apple', 'banana', 'mango']
for fruit in fruits:
print(fruit.capitalize()) # 첫글자 대문자로
#---------------
# 1. else
#---------------
container = [1,2,3,4,5]
for item in container:
if item == 6:
print("Found it!")
break
else:
# 아무것도 못찾았을 떄
print("Not found it")
# Ex: 2-10사이에 ... | 30 | 16.73 | 40 | 12 | 200 | python | [] | 0 | true | |
2024-11-19T02:07:21.854072+00:00 | 1,606,881,055,000 | 07beb7a47b2d1b4d9d54ac091d14d654a9f9ff30 | 3 | {
"blob_id": "07beb7a47b2d1b4d9d54ac091d14d654a9f9ff30",
"branch_name": "refs/heads/main",
"committer_date": 1606881055000,
"content_id": "376e7cbb2f4084bf1b0e63bbcadf1129efea96a2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "da37a651957a3bbdbb43b1b9f41a547f4d58449e",
"extension": "py",
... | 3.109375 | stackv2 | from abc import abstractmethod, ABC
from common_rules import *
import re
import random
import math
class Constant(object):
def __init__(self, name, **props):
self.name = name
self.__dict__.update(props)
globals()[name] = self
def __repr__(self):
return self.name
def __str__(self):
retu... | 137 | 29.23 | 155 | 19 | 1,040 | python | [] | 0 | true | |
2024-11-19T02:07:22.241175+00:00 | 1,496,477,769,000 | 42ee90d71939cc55e8cb11a76d2b6eb49cada22a | 3 | {
"blob_id": "42ee90d71939cc55e8cb11a76d2b6eb49cada22a",
"branch_name": "refs/heads/master",
"committer_date": 1496477769000,
"content_id": "959ccd46b66da12a1cf272bd2b7194a93cd6d522",
"detected_licenses": [
"MIT"
],
"directory_id": "bc0db07a0d77cc7ee20879449941a3ed56156ba4",
"extension": "py",
"fi... | 2.828125 | stackv2 | """
########################################################################################################################
Fabric 간단 사용법.
본 스크립트는 Python 3.5에서 작성되었어요. 본디 'fabric'은 Python2에서 동작하게 구현되었지만, 최근 Python3에서 돌아갈 수 있도록 포팅한
프로젝트가 있습니다. requirements.txt 파일을 참고하세요.
copy2local 사용하기
-----------------
copy2local 스... | 38 | 23.68 | 120 | 10 | 266 | python | [] | 0 | true | |
2024-11-19T02:07:22.689975+00:00 | 1,495,189,195,000 | 0e993b1add59841042695a73bbfd83ecb094cf59 | 2 | {
"blob_id": "0e993b1add59841042695a73bbfd83ecb094cf59",
"branch_name": "refs/heads/master",
"committer_date": 1495189195000,
"content_id": "9b8c8fe7675fbfedf51d999a675983bd0fc71e96",
"detected_licenses": [
"MIT"
],
"directory_id": "3fa4aceda7459ca8870f3d7afde74bb8a50e6af1",
"extension": "py",
"fi... | 2.328125 | stackv2 | ####################
# ES-DOC CIM Questionnaire
# Copyright (c) 2017 ES-DOC. All rights reserved.
#
# University of Colorado, Boulder
# http://cires.colorado.edu/
#
# This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT].
####################
"""
.. mo... | 44 | 33.55 | 115 | 15 | 319 | python | [] | 0 | true | |
2024-11-19T02:07:22.872150+00:00 | 1,627,918,242,000 | c2a8db9be7d375c0c9aa570365b97a31e344944a | 2 | {
"blob_id": "c2a8db9be7d375c0c9aa570365b97a31e344944a",
"branch_name": "refs/heads/master",
"committer_date": 1627918242000,
"content_id": "4c3f826644ed1d85daa5bc623db649729e2af868",
"detected_licenses": [
"MIT"
],
"directory_id": "03364518490748fa997a3d3b0647257e22ef1613",
"extension": "py",
"fi... | 2.359375 | stackv2 | import matplotlib
import random # ID generation
import string # ID generation
import prody
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
matplotlib.use('Agg')
chars = string.ascii_uppercase + string.digits
def create_pca_comparison(my_path, original, in_selection):
sel_data1 = prody.p... | 48 | 27.83 | 78 | 16 | 379 | python | [] | 0 | true | |
2024-11-19T02:07:22.940414+00:00 | 1,564,305,835,000 | 51f62069e8fdc05a0b9caafaa8a76af450faef6d | 3 | {
"blob_id": "51f62069e8fdc05a0b9caafaa8a76af450faef6d",
"branch_name": "refs/heads/master",
"committer_date": 1564305835000,
"content_id": "3dd8530d832a1ceb2561a3cb96538791498b28b9",
"detected_licenses": [
"MIT"
],
"directory_id": "2229ee65f67be9ab02cf96b5113950e3ff203af6",
"extension": "py",
"fi... | 2.6875 | stackv2 | # tutorial 4 (5th video)
import numpy as np
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph.opengl as gl
import sys
from opensimplex import OpenSimplex
class Terrain(object):
def __init__(self):
self.app = QtGui.QApplication(sys.argv)
self.w = gl.GLViewWidget()
self.w.setGeometry(0... | 127 | 29.13 | 99 | 18 | 1,092 | python | [] | 0 | true | |
2024-11-19T02:07:23.042809+00:00 | 1,432,215,829,000 | ca96543f822a99ee766b643b4ba2e497b5d88337 | 3 | {
"blob_id": "ca96543f822a99ee766b643b4ba2e497b5d88337",
"branch_name": "refs/heads/master",
"committer_date": 1432215829000,
"content_id": "8c38ac39544f17acb8c5ff63f0bd4906855b3960",
"detected_licenses": [
"MIT"
],
"directory_id": "90ea5f05b53831a0faaf243c2595b615dbc077b6",
"extension": "py",
"fi... | 3.171875 | stackv2 | #!/usr/bin/env python
# encoding: utf-8
"""
winning_prob.py
Created by Jakub Konka on 2011-05-13.
Copyright (c) 2011 University of Strathclyde. All rights reserved.
"""
from __future__ import division
import sys
import os
import numpy as np
import scipy.integrate as integral
import scipy.stats.mstats as mstats
import ... | 65 | 32.11 | 122 | 21 | 630 | python | [] | 0 | true | |
2024-11-19T02:07:23.212300+00:00 | 1,614,012,183,000 | 4f0b21436ce369124f46685b04e067f409fbb090 | 3 | {
"blob_id": "4f0b21436ce369124f46685b04e067f409fbb090",
"branch_name": "refs/heads/master",
"committer_date": 1614012183000,
"content_id": "4737ca3b58805e2ee8a0ef24f83bc3a51b42b692",
"detected_licenses": [
"MIT"
],
"directory_id": "e5512667fc0a5ef9a34ee4edeed7eea3118e4e51",
"extension": "py",
"fi... | 2.8125 | stackv2 | import argparse
from watermark_remover_cli.Watermarkremover import WatermarkRemover
# Create the parser
parser = argparse.ArgumentParser(
description='Remove Watermarks from PDFs and Images')
# Add the arguments
parser.add_argument("-f", "--file", type=str,
help='The path to the PDF or Image ... | 35 | 23.77 | 84 | 9 | 191 | python | [] | 0 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.