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-18T20:10:49.272778+00:00 | 1,578,593,418,000 | 063129ae010a92460eaaf74efc8ad09c5aa2dd48 | 3 | {
"blob_id": "063129ae010a92460eaaf74efc8ad09c5aa2dd48",
"branch_name": "refs/heads/master",
"committer_date": 1578593418000,
"content_id": "f21a0cb40cfb7a9c0e6824a2350e1bf17a3353ce",
"detected_licenses": [
"MIT"
],
"directory_id": "89db2b9fd508726aeff1a2a984189e75e4306500",
"extension": "py",
"fi... | 3.40625 | stackv2 | class Lineup:
def __init__(self, team, param):
self.formations = {
'532': [1, 5, 3, 2],
'523': [1, 5, 2, 3],
'541': [1, 5, 4, 1],
'451': [1, 4, 5, 1],
'442': [1, 4, 4, 2],
'433': [1, 4, 3, 3],
'352': [1, 3, 5, 2],
... | 94 | 34.28 | 112 | 18 | 840 | python | [] | 0 | true | |
2024-11-18T20:10:49.332022+00:00 | 1,468,023,672,000 | cfa7e0cb5fbc5059a229ed4336f274a0e8419822 | 3 | {
"blob_id": "cfa7e0cb5fbc5059a229ed4336f274a0e8419822",
"branch_name": "refs/heads/master",
"committer_date": 1468023672000,
"content_id": "2e484c7f65c73390c9d497eb859a3d1e43f3b016",
"detected_licenses": [
"MIT"
],
"directory_id": "ebccf10f9d7e1aabc7391679e73cf315d1be7561",
"extension": "py",
"fi... | 2.578125 | stackv2 | #!/usr/bin/env python
# coding: utf-8
import networkx as nx
from networkx.readwrite import json_graph
import matplotlib.pyplot as plt
import time
import json
with open('nodes.txt') as nodesfile:
nodes = [(map(int, l.split(';'))) for l in nodesfile]
nodesdict = {node[0] : (node[1], node[2]) for node in nodes}
... | 23 | 28.3 | 85 | 13 | 182 | python | [] | 0 | true | |
2024-11-18T20:10:49.384218+00:00 | 1,432,425,004,000 | e8c08ca159dd2e5e70f4d724e017fe97117ca880 | 3 | {
"blob_id": "e8c08ca159dd2e5e70f4d724e017fe97117ca880",
"branch_name": "refs/heads/master",
"committer_date": 1432425004000,
"content_id": "5e2b05e6fc4bbcc739b844d8e6ad456cb6b59826",
"detected_licenses": [
"MIT"
],
"directory_id": "9e43208d4fc871f148ff4b08e06d85a5338e0565",
"extension": "py",
"fi... | 2.734375 | stackv2 | """ Clustering/parcellation functionality. """
import numpy as np
import logging
from time import time
from neurosynth.analysis import meta
from neurosynth.base.mask import Masker
from neurosynth.base import imageutils
from sklearn import cluster
from sklearn.metrics.pairwise import pairwise_distances
from sklearn.deco... | 376 | 45.94 | 123 | 21 | 3,587 | python | [] | 0 | true | |
2024-11-18T20:10:49.441451+00:00 | 1,505,831,411,000 | a60ddadf0026ac9407b315d898fe1b864d91804a | 4 | {
"blob_id": "a60ddadf0026ac9407b315d898fe1b864d91804a",
"branch_name": "refs/heads/master",
"committer_date": 1505831411000,
"content_id": "d5ef77b10756f930cbe20b522a0c3af6c7dec258",
"detected_licenses": [
"MIT"
],
"directory_id": "bd28200973c8a9a34dc565c7a0f553c0b032bd68",
"extension": "py",
"fi... | 3.625 | stackv2 | from .exceptions import *
from random import randint
# Complete with your own, just for fun :)
LIST_OF_WORDS = ['testing','project', 'functionaliy','oops', 'borked']
#This is Complete and Passing all tests\|/\|/
def _get_random_word(list_of_words):
try:
random_word = list_of_words[randint(0,len(list_of_wo... | 95 | 37.6 | 112 | 15 | 839 | python | [] | 0 | true | |
2024-11-18T20:10:49.919777+00:00 | 1,672,392,457,000 | f2dfd2bf0d34213c7e3f8cd0a0b3191bd57c29ce | 2 | {
"blob_id": "f2dfd2bf0d34213c7e3f8cd0a0b3191bd57c29ce",
"branch_name": "refs/heads/master",
"committer_date": 1672392457000,
"content_id": "84a4373ef7647692391d6fc726edeb71f3a4cbc7",
"detected_licenses": [
"MIT"
],
"directory_id": "dbd678a51e8b9db4320bda1a2124767cdaa40fdc",
"extension": "py",
"fi... | 2.5 | stackv2 | from __future__ import division
from math import sqrt as sqrt
from itertools import product as product
import torch
import numpy as np
class PriorBox_kmeans(object):
"""Compute priorbox coordinates in center-offset form for each source
feature map.
"""
def __init__(self, cfg):
super(PriorBox_k... | 62 | 34.61 | 74 | 19 | 698 | python | [] | 0 | true | |
2024-11-18T20:10:50.032529+00:00 | 1,607,467,636,000 | 01ee0ffd83634d16278e1dcfddc25fa98bf398a3 | 3 | {
"blob_id": "01ee0ffd83634d16278e1dcfddc25fa98bf398a3",
"branch_name": "refs/heads/master",
"committer_date": 1607467636000,
"content_id": "1a46a6cab818e7df2e213db7c70362b0847381a3",
"detected_licenses": [
"MIT"
],
"directory_id": "2790e3ee0faa00aca0283a6042a6918377bfbbe8",
"extension": "py",
"fi... | 3.0625 | stackv2 | import IPython
import numpy as np
import pandas as pd
def display(*dfs, head: bool = True):
"""Display the dataframes in _dfs_"""
for df in dfs:
IPython.display.display(df.head() if head else df)
def reduce_mem_usage(df: pd.DataFrame, verbose: bool = False) -> pd.DataFrame:
"""Efficiently manage... | 76 | 40.28 | 88 | 20 | 823 | python | [] | 0 | true | |
2024-11-18T20:10:50.145947+00:00 | 1,612,055,999,000 | 0a2b5bf25e3f4aaac055635cd1686c9ce9168b09 | 3 | {
"blob_id": "0a2b5bf25e3f4aaac055635cd1686c9ce9168b09",
"branch_name": "refs/heads/master",
"committer_date": 1612055999000,
"content_id": "f824a435de480594f1e5a9c417bc58e0cd9442d7",
"detected_licenses": [
"MIT"
],
"directory_id": "d08e0ffc6d687174ab6a6414b086a607d636419a",
"extension": "py",
"fi... | 2.75 | stackv2 | import pandas as pd
import string
import spacy
import random
import seaborn as sns
import numpy as np
import re
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix, accuracy_score
base_treinamento = pd.read_csv('Train50.csv', delimiter = ';')
sns.countplot(base_treinamento['sentiment'], label ... | 142 | 31.54 | 151 | 13 | 1,293 | python | [{"finding_id": "codeql_py/overly-large-range_38533ff6f78b0dd1_2b9aa6c3", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with 0-9 in the same character class, and overlaps with A-Z in ... | 1 | true | |
2024-11-18T20:10:50.207727+00:00 | 1,613,414,367,000 | 0b7502b7be09eaf8901d2dcf068b14c6c50bb2e4 | 2 | {
"blob_id": "0b7502b7be09eaf8901d2dcf068b14c6c50bb2e4",
"branch_name": "refs/heads/master",
"committer_date": 1613414367000,
"content_id": "6683e414558559544246077e0bf7a06bc69dbc50",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "49a242de94ed5c74336d0fecd5133fdb772fb511",
"extension": "p... | 2.5 | stackv2 | import sys
import numpy as np
import math
import random
import matplotlib.pyplot as plt
from gym_scarecrow.params import *
# gym
import gym
import gym_scarecrow
# TODO: clean up this whole file
def simulate():
learning_rate = get_learning_rate(0)
explore_rate = get_explore_rate(0)
total_reward = 0
to... | 143 | 29.73 | 126 | 16 | 1,094 | python | [] | 0 | true | |
2024-11-18T20:10:50.459452+00:00 | 1,429,272,857,000 | 393158d7f00602eab6a874a13aaee6f3f65c75d9 | 3 | {
"blob_id": "393158d7f00602eab6a874a13aaee6f3f65c75d9",
"branch_name": "refs/heads/master",
"committer_date": 1429272857000,
"content_id": "bc77a56e6e4d1f1ec92e9f279702af1f53bfd596",
"detected_licenses": [
"MIT"
],
"directory_id": "ef1f9eca2c539f6a84da4aebf810088a5548674f",
"extension": "py",
"fi... | 3.078125 | stackv2 | #!/usr/bin/env python
# coding: utf
'''
Simple input box for pygame
Usage:
.. code-block:: python
box=Input(…) # declare an input box
while <main loop>:
…
if box.is_active() and <event goes to box>: # currently in input state
box.edit(event) ... | 389 | 36.65 | 139 | 21 | 3,498 | python | [] | 0 | true | |
2024-11-18T20:10:50.699096+00:00 | 1,611,617,237,000 | da1e0f8ce3adbda23529e0b9215f4ae091a6fd65 | 4 | {
"blob_id": "da1e0f8ce3adbda23529e0b9215f4ae091a6fd65",
"branch_name": "refs/heads/master",
"committer_date": 1611617237000,
"content_id": "42468f45454bacc243788e8d1360eca63c561909",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5b3d8b5c612c802fd846de63f86b57652d33f672",
"extension": "py"... | 3.828125 | stackv2 | # Python solution for 'Counting Array Elements' codewars question.
# Level: 7 kyu
# Tags: FUNDAMENTALS and ARRAYS.
# Author: Jack Brokenshire
# Date: 04/07/2020
import unittest
from collections import Counter
def count(array):
"""
Write a function that takes an array and counts the number of each unique elem... | 28 | 24.46 | 94 | 13 | 187 | python | [] | 0 | true | |
2024-11-18T20:10:50.755143+00:00 | 1,597,944,318,000 | 4b5d03816c8b0168cd6a262e57414a53643ed250 | 3 | {
"blob_id": "4b5d03816c8b0168cd6a262e57414a53643ed250",
"branch_name": "refs/heads/master",
"committer_date": 1597944318000,
"content_id": "eb53ee9b8249ca94d915c501d3fed7194f245039",
"detected_licenses": [
"MIT"
],
"directory_id": "4fcf5f85707ecd9b19324770f0114b8b4853bdfd",
"extension": "py",
"fi... | 2.671875 | stackv2 | from tensorflow import layers
from keras import backend as K
import tensorflow as tf
# gets best category and probability from the output of a vocabulary layer
class Vocabluary_Postprocess(layers.Layer):
def __init__(self, table, batchsize, column, **kwargs):
super(Vocabluary_Postprocess, self).__init__(... | 36 | 37.5 | 79 | 15 | 312 | python | [] | 0 | true | |
2024-11-18T20:10:51.141367+00:00 | 1,551,357,018,000 | 556334f60c7aef6aaa549d010448da1b8a30251e | 3 | {
"blob_id": "556334f60c7aef6aaa549d010448da1b8a30251e",
"branch_name": "refs/heads/master",
"committer_date": 1551357018000,
"content_id": "686e78e3f02d78596e1fad886b90098700bd2baa",
"detected_licenses": [
"MIT"
],
"directory_id": "1bb7f9560db3896fe0a2e49fdbed0ab1ecfca362",
"extension": "py",
"fi... | 2.640625 | stackv2 | import os;
import numpy as np;
from sklearn import metrics;
import matplotlib.pyplot as plt;
from mpl_toolkits.mplot3d import Axes3D;
from sklearn.decomposition import PCA;
def PlotDataset(x, y, title=""):
X = x[:, :2];
fig = plt.figure(1, figsize=(8, 6));
ax = Axes3D(fig, elev=-150, azim=110);
X_reduced = PCA(n_c... | 72 | 27.82 | 67 | 14 | 640 | python | [] | 0 | true | |
2024-11-18T20:10:51.197580+00:00 | 1,492,624,554,000 | 82682b14e353cb7cc2df7169faa4fb1454a260d3 | 2 | {
"blob_id": "82682b14e353cb7cc2df7169faa4fb1454a260d3",
"branch_name": "refs/heads/master",
"committer_date": 1492624554000,
"content_id": "f75fac31c917bc7dafd9bbd70858c59a74ef5fb5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c85bd16faec3c3955c00bf31c13e97504468ae6e",
"extension": "py"... | 2.4375 | stackv2 | import argparse
from python2debian.builder import build
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--build-dir', help='Build folder', default='/build')
parser.add_argument('--packages-dir', help='Packages folder', default='/packages')
parser.add_argument('--install-dir', help... | 48 | 44.25 | 99 | 10 | 450 | python | [] | 0 | true | |
2024-11-18T20:10:51.521190+00:00 | 1,630,336,830,000 | 70d39301d88790dd0391167d465c3f876b6b3345 | 3 | {
"blob_id": "70d39301d88790dd0391167d465c3f876b6b3345",
"branch_name": "refs/heads/master",
"committer_date": 1630336830000,
"content_id": "a7840c48a337744504f4aa3acb93dd20cfb67daa",
"detected_licenses": [
"MIT"
],
"directory_id": "beab1136ec4e0b17ed39ec6ae9794d314f7e59a4",
"extension": "py",
"fi... | 2.53125 | stackv2 | from o3m_lidar import O3MLidar
import socket
ip = "169.254.160.76"
port = 42000
buffer_size = 1460
def main():
lidar = O3MLidar(ip, port, buffer_size, output_mode="point_cloud")
i = 0
while True:
point_cloud = lidar.next()
if len(point_cloud) > 0:
print(i, lidar.next()[0])
... | 21 | 15.52 | 70 | 14 | 121 | python | [] | 0 | true | |
2024-11-18T20:10:51.576655+00:00 | 1,456,150,609,000 | 18f48ff9e3f3d7f1acf2d8c9d892ecfa57c0eb5b | 3 | {
"blob_id": "18f48ff9e3f3d7f1acf2d8c9d892ecfa57c0eb5b",
"branch_name": "refs/heads/master",
"committer_date": 1456150609000,
"content_id": "033e929ba365f9191f1644f2bc2471981a4e89d2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "acb082b215e6d214a5065f76c0454dcf1fb2a533",
"extension": "py"... | 3.390625 | stackv2 | #!/usr/bin/python
#coding=gbk
# 用法:python diff_excel.py [file1] [file2]
import xlrd
from xlrd import open_workbook
import sys
#输出整个Excel文件的内容
def print_workbook(wb):
for s in wb.sheets():
print "Sheet:", s.name
for r in range(s.nrows):
strRow = ""
for c in s.row(r):
strRow += ("\t" + c.v... | 135 | 22.87 | 71 | 20 | 1,123 | python | [] | 0 | true | |
2024-11-18T20:10:51.756646+00:00 | 1,500,280,303,000 | c4adb915acf5b806c07ba93530719732ca8e52d3 | 3 | {
"blob_id": "c4adb915acf5b806c07ba93530719732ca8e52d3",
"branch_name": "refs/heads/master",
"committer_date": 1500280303000,
"content_id": "d18c91426ca54c7e646038590bdb52c6c78cb2f9",
"detected_licenses": [
"MIT"
],
"directory_id": "cddecee82cf124ed4531b34f4ee639952fb2c575",
"extension": "py",
"fi... | 2.625 | stackv2 | from django.shortcuts import get_object_or_404, render
from .models import Mineral
import random
# the details view for each mineral, pk is the primary key
def mineral_detail(request, pk):
"""Mineral 'detail' view to diplay mineral details"""
mineral = get_object_or_404(Mineral, pk=pk)
minerals = Mineral.... | 16 | 33.81 | 114 | 10 | 132 | python | [] | 0 | true | |
2024-11-18T20:10:51.864650+00:00 | 1,622,001,617,000 | 7599e3b4bda56d32e699cd3c66fc0b1d86fe7e76 | 3 | {
"blob_id": "7599e3b4bda56d32e699cd3c66fc0b1d86fe7e76",
"branch_name": "refs/heads/main",
"committer_date": 1622001617000,
"content_id": "43cd00fc3a8e8f3ede9d1fabb71551bfc5bb4937",
"detected_licenses": [
"MIT"
],
"directory_id": "9f04c2977434c5854e889b424e34593fa9f938d1",
"extension": "py",
"file... | 2.59375 | stackv2 | import os
import requests
import numpy as np
import plotly.graph_objects as go
class Stock(object):
def __init__(self, req):
self.type = req.get("queryResult").get("parameters").get("serviceterm")
self.chat_id = req.get("user").get("chat").get("id")
#個股日成交資訊
#https://www.twse.com.tw/... | 47 | 30.36 | 115 | 17 | 396 | python | [] | 0 | true | |
2024-11-18T20:10:51.907230+00:00 | 1,576,303,266,000 | d04f087c6b1d063d77ffbbda4b239bd4ba92e277 | 2 | {
"blob_id": "d04f087c6b1d063d77ffbbda4b239bd4ba92e277",
"branch_name": "refs/heads/master",
"committer_date": 1576303266000,
"content_id": "640e31691aa572738acc3d8d6798c42129efd5f5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "93816be7f0a66208e282d4ef2e5e0a9bb1049a87",
"extension": "py"... | 2.359375 | stackv2 | import numpy as np
import torch
from AlexNet import create_model
import os
def load_model() :
opt = {'num_classes':4}
net = create_model(opt)
class Network(object) :
def __init__(self, net, exp_dir) :
self.networks = {"model":net}
self.exp_dir = exp_dir
def load_checkpoint(self, epoch, train=True, s... | 55 | 27.47 | 77 | 15 | 414 | python | [] | 0 | true | |
2024-11-18T20:10:52.016326+00:00 | 1,580,552,408,000 | 4cdc36ebcc3608ff8724e4d47627cc27db609185 | 2 | {
"blob_id": "4cdc36ebcc3608ff8724e4d47627cc27db609185",
"branch_name": "refs/heads/master",
"committer_date": 1580552408000,
"content_id": "c4d387a9e8a89edafdc4900967662af93c87749e",
"detected_licenses": [
"MIT"
],
"directory_id": "91ebc5c3dad4085a6fad79d989e20227e5f720ed",
"extension": "py",
"fi... | 2.375 | stackv2 | import sys
import zipfile
import xml.etree.ElementTree as ET
from base64 import b64encode
from resources import *
#from DebugPrint import *
def print_requirements():
pass
def stack_XML_to_dict(xml):
image = ET.fromstring(xml)
root = image.find('.//stack[@name="root"]')
outlines = []
colors = []
... | 120 | 27.95 | 114 | 18 | 857 | python | [] | 0 | true | |
2024-11-18T20:10:52.247458+00:00 | 1,600,599,160,000 | acb5f4f49252ead20c5a143828bb87bfefb1bf6a | 4 | {
"blob_id": "acb5f4f49252ead20c5a143828bb87bfefb1bf6a",
"branch_name": "refs/heads/master",
"committer_date": 1600599160000,
"content_id": "f8c7378a55e699b2ee94bd5bd4c509f5ab2ee411",
"detected_licenses": [
"MIT"
],
"directory_id": "67487a6df520e3ddbd918fdf4b9c8dcd4c783147",
"extension": "py",
"fi... | 3.609375 | stackv2 | termo = int(input('Primeiro Termo: '))
razao = int(input('Razão: '))
contador = 0
acumulador = termo
continuar = 1
while contador != 10:
print(acumulador, '→ ', end='')
acumulador += razao
contador += 1
print('PAUSA')
while continuar != 0:
continuar = int(input('Quer mostrar mais quantos termos?: '))
... | 19 | 29.05 | 82 | 11 | 172 | python | [] | 0 | true | |
2024-11-18T20:10:52.292471+00:00 | 1,622,780,448,000 | 5a54035e37fd13ff738ac4f3423a59da387b8a36 | 4 | {
"blob_id": "5a54035e37fd13ff738ac4f3423a59da387b8a36",
"branch_name": "refs/heads/master",
"committer_date": 1622780571000,
"content_id": "258d8597b113f75a3463f9dda7a7afdc9e16d983",
"detected_licenses": [
"MIT"
],
"directory_id": "ccf6027ebf9c660bc0da1f55a57adaa0497cf5f7",
"extension": "py",
"fi... | 3.53125 | stackv2 | """
Only one instance of a class is allowed and it is public so that
other classes can share it
Use cases -
1. DB Connection
2. Configuration files
3. Loggers
Fun fact -
Python's import statment returns modules that are singleton
"""
class Singleton:
__shared_instance = 'PP'
@staticmethod
def get_in... | 38 | 19.24 | 65 | 12 | 168 | python | [] | 0 | true | |
2024-11-18T20:10:52.686594+00:00 | 1,675,085,076,000 | 9b637ec5cfcd27f0cc73e28593a55033e0686a9c | 4 | {
"blob_id": "9b637ec5cfcd27f0cc73e28593a55033e0686a9c",
"branch_name": "refs/heads/master",
"committer_date": 1675085076000,
"content_id": "ce543e4147b02d37b14ec48256f047a88f3a7431",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "fad702beb35d587278010e570a923bc84a4dda4a",
"extension": "py"... | 3.546875 | stackv2 | """
Functions related to attribute get/set python built-ins.
# Author: Vladan Lucic, Max Planck Institute for Biochemistry
# $Id$
"""
from __future__ import unicode_literals
from past.builtins import basestring
__version__ = "$Revision$"
def getattr_deep(object, name):
"""
Like built-in getattr, but name ... | 73 | 25.16 | 79 | 12 | 436 | python | [] | 0 | true | |
2024-11-18T20:10:52.818646+00:00 | 1,495,650,066,000 | 1d00d9307b34abf1dffe7f8ce7597cdb5e6b83c5 | 3 | {
"blob_id": "1d00d9307b34abf1dffe7f8ce7597cdb5e6b83c5",
"branch_name": "refs/heads/master",
"committer_date": 1495650066000,
"content_id": "97f290998201236a4e67ad9a18aa514bdaf7080c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "90e90e8708317c3cd3011bb9235395d00121529b",
"extension": "py"... | 2.5625 | stackv2 | from girder_worker.plugins.vtk import dict_to_vtkarrays, dict_to_vtkrow
import six
import vtk
"""
NetworkX to vtkGraph
This creates a vtkMutableDirectedGraph or vtkMutableUndirectedGraph.
It creates nodes which lose their actual value since nodes in vtkGraph
are referenced strictly by their index. These nodes do ret... | 91 | 31.19 | 79 | 13 | 672 | python | [] | 0 | true | |
2024-11-18T20:10:52.865255+00:00 | 1,467,680,218,000 | 782004b409757a5aec502e4ba9399a5adbbbc82c | 3 | {
"blob_id": "782004b409757a5aec502e4ba9399a5adbbbc82c",
"branch_name": "refs/heads/master",
"committer_date": 1467680218000,
"content_id": "d687a227024559de8592d7afe2f09147521776f0",
"detected_licenses": [
"MIT"
],
"directory_id": "dfa075a0971ff8e4a4375a3d31ff26791d7692ad",
"extension": "py",
"fi... | 3.046875 | stackv2 | import requests
import json
import SECRETS
import requests_cache
class Weather(object):
api_key = SECRETS.FORECASTIO_API_KEY
def __init__(self):
self.lat = 40.758932
self.lng = -73.985131
self.endpoint = 'https://api.forecast.io/forecast/{api_key}/{lat},{lng}'.format(
api_k... | 92 | 34.84 | 114 | 15 | 797 | python | [] | 0 | true | |
2024-11-18T20:10:53.101924+00:00 | 1,374,381,381,000 | 0cedf25b94c281fab126648779cc3cef12027731 | 2 | {
"blob_id": "0cedf25b94c281fab126648779cc3cef12027731",
"branch_name": "refs/heads/master",
"committer_date": 1374381381000,
"content_id": "690d499e549d98791658273c93cfb33bb951b8a4",
"detected_licenses": [
"MIT"
],
"directory_id": "b1e19c039130a47623aff840545b82b5d6b7fb45",
"extension": "py",
"fi... | 2.34375 | stackv2 | from model.db import db
from lib.bottle import route, response, request, static_file
import json
@route('/')
def index():
return static_file('index.html', root='web')
@route('/web/<filepath:path>')
def static(filepath):
return static_file(filepath, root='web')
@route('/sammy/<filepath:path>')
def web_clie... | 86 | 27.62 | 100 | 18 | 590 | python | [] | 0 | true | |
2024-11-18T20:10:53.481148+00:00 | 1,480,641,319,000 | 9f5094ab653fb382ec97927308390659f518a478 | 3 | {
"blob_id": "9f5094ab653fb382ec97927308390659f518a478",
"branch_name": "refs/heads/master",
"committer_date": 1480641319000,
"content_id": "b7853931c2e42213527998ad439f9508558d9802",
"detected_licenses": [
"MIT"
],
"directory_id": "d8abb3ade807c831d24eac6328b2cd63cb46ca6e",
"extension": "py",
"fi... | 3.140625 | stackv2 | #encoding:utf8
from __future__ import division
from collections import Counter
import random
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
def shuffle_in_unison(a, b):
""" Shuffles two lists of equal length and keeps corresponding elements in the same index. """
rng_state = np.ra... | 48 | 27.27 | 106 | 12 | 335 | python | [] | 0 | true | |
2024-11-18T20:10:53.989433+00:00 | 1,617,914,313,000 | 7816bb90cea5698c93be051878a197e1f8927e2d | 3 | {
"blob_id": "7816bb90cea5698c93be051878a197e1f8927e2d",
"branch_name": "refs/heads/main",
"committer_date": 1617914313000,
"content_id": "ccb9ce73bd9a06e57b0a78ba016071df3ada4106",
"detected_licenses": [
"MIT"
],
"directory_id": "198c8ab54321f9df30be0e7d532e8cabf458d506",
"extension": "py",
"file... | 2.75 | stackv2 | from typing import *
from .env import *
from ._data_variable import DataVariable
import types
__all__ = (
"match",
"Case",
"Action",
"Pattern",
"CoverageError",
"InferenceError",
"MatchError",
)
class CoverageError(Exception):
pass
class InferenceError(Exception):
pass
class... | 488 | 30.39 | 111 | 22 | 3,506 | python | [] | 0 | true | |
2024-11-18T20:10:54.481748+00:00 | 1,588,242,818,000 | e379086f5cc4467f402cb549ddd1cc1b9802b016 | 3 | {
"blob_id": "e379086f5cc4467f402cb549ddd1cc1b9802b016",
"branch_name": "refs/heads/master",
"committer_date": 1588242818000,
"content_id": "a3bd851c968290bc48c67033d20b93841e21e423",
"detected_licenses": [
"MIT"
],
"directory_id": "d8f038ac4981e04e630296cb6bf861c176b64829",
"extension": "py",
"fi... | 2.734375 | stackv2 | """
This script is used to create task-library items,
that can be pushed to pc if ip and creds are passed to the script.
This script takes script .sh, .es as input
files only (.sh for shell scripts & .es for escripts).
Please pass file name as first argument.
"""
import os
import sys
import json
import ntpath
script... | 85 | 24.61 | 76 | 16 | 562 | python | [{"finding_id": "codeql_py/request-without-cert-validation_ed8bc92eb29ea6bb_71fb4267", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | |
2024-11-18T20:10:54.540964+00:00 | 1,564,794,560,000 | 98577187a7faf87126e8d034801df2d2ccffd0b5 | 3 | {
"blob_id": "98577187a7faf87126e8d034801df2d2ccffd0b5",
"branch_name": "refs/heads/master",
"committer_date": 1564794749000,
"content_id": "3c9799d7733dfc5ebe2157a9179c1ab78d4b87f9",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e217f190b316071ca83892c9e25385d69f5bb22f",
"extension": "p... | 2.578125 | stackv2 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import math
import torch
import torch.nn as nn
from pytext.config.module_config import Activation
class GeLU(nn.Module):
"""
Implements Gaussian Error Linear Units (GELUs). Note: x * x * x is used
instead of to... | 42 | 26.45 | 85 | 20 | 318 | python | [] | 0 | true | |
2024-11-18T20:10:54.600328+00:00 | 1,487,352,250,000 | e08e5b85429cffe500c26678ae28f1a0cb7e446e | 3 | {
"blob_id": "e08e5b85429cffe500c26678ae28f1a0cb7e446e",
"branch_name": "refs/heads/master",
"committer_date": 1487352250000,
"content_id": "25f92a8520ee6d2b8fd0dfb981003acce156cc91",
"detected_licenses": [
"MIT"
],
"directory_id": "671d9bae6f9177c9e91dab744178d8c7ca831dbe",
"extension": "py",
"fi... | 2.96875 | stackv2 | # Import dependencies
import numpy as np
import sys, os, pickle
from sklearn.utils import shuffle, resample
# Import nodes
from base_node import Node
from input_node import Input
from linear_node import Linear
# Import loss nodes
from mse_node import MSE
from cross_entropy_node import CrossEntropy
# Import activatio... | 355 | 30.97 | 122 | 19 | 2,513 | python | [] | 0 | true | |
2024-11-18T20:10:54.719194+00:00 | 1,595,456,207,000 | 572436a730c8b7b4d1a733f51b13818308b403c2 | 3 | {
"blob_id": "572436a730c8b7b4d1a733f51b13818308b403c2",
"branch_name": "refs/heads/master",
"committer_date": 1595847448000,
"content_id": "a492c26643be6d7b167a209e2858a723b1deb7fb",
"detected_licenses": [
"MIT"
],
"directory_id": "f1d2073c23d247ea16ca4c696639a73f4eaa788c",
"extension": "py",
"fi... | 2.75 | stackv2 | from abc import ABC, abstractmethod
from typing import Optional, Type
from eth.abc import AtomicDatabaseAPI
from eth2.beacon.types.blocks import BaseBeaconBlock, BaseSignedBeaconBlock
from eth2.beacon.types.states import BeaconState
from eth2.beacon.typing import BLSSignature, Root, Slot
class BaseBeaconChainDB(ABC... | 91 | 28.44 | 94 | 12 | 630 | python | [] | 0 | true | |
2024-11-18T20:10:55.073121+00:00 | 1,460,663,990,000 | ba0c75ede1d9a5ae32f0d415631c5fefd6b90c8c | 4 | {
"blob_id": "ba0c75ede1d9a5ae32f0d415631c5fefd6b90c8c",
"branch_name": "refs/heads/master",
"committer_date": 1460663990000,
"content_id": "cbce9a7c9b4017ba21e42321cbc60d11f744a9f3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "75453d2b5e12098504b73e230c48ee7a00529344",
"extension": "py"... | 3.59375 | stackv2 |
class BaseNode(object):
""" Base Node. This represents a node in the rst output. """
def __init__(self, parent, name, attributes):
self.parent = parent
self.name = name
self.attributes = attributes
self.children = []
def add_child(self, child):
self.children.appen... | 108 | 26.61 | 99 | 14 | 602 | python | [] | 0 | true | |
2024-11-18T20:10:55.295263+00:00 | 1,663,226,693,000 | 2ed1b0d9917eece8a58c7a8e9b359d541e3db9f2 | 2 | {
"blob_id": "2ed1b0d9917eece8a58c7a8e9b359d541e3db9f2",
"branch_name": "refs/heads/master",
"committer_date": 1663226693000,
"content_id": "81511b52f87c6c8a0bd3ee2bee669b0d01bb8a7a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f38ac7dfc887f71d201eca3a8adf8bb593982d30",
"extension": "py"... | 2.3125 | stackv2 | from __future__ import annotations
from FlexioFlow.Options import Options
from FlexioFlow.StateHandler import StateHandler
from Schemes.Scheme import Scheme
from Schemes.SchemeBuilder import SchemeBuilder
from Schemes.Schemes import Schemes
from typing import Optional, Type, Dict
class Version:
def __init__(sel... | 38 | 31.16 | 74 | 15 | 238 | python | [] | 0 | true | |
2024-11-18T20:10:55.354802+00:00 | 1,632,100,393,000 | e8d49dd8c981ec4cfb1780478d5627f9e63e7a6d | 2 | {
"blob_id": "e8d49dd8c981ec4cfb1780478d5627f9e63e7a6d",
"branch_name": "refs/heads/master",
"committer_date": 1632100393000,
"content_id": "eda8eb9d5e5e8af6d1c7c05682bbaa62506a01df",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "2b3d1a64a098b0ce4ab103eed440de1851851c55",
"extension": "p... | 2.40625 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import subprocess
import math
import time
import os
import carla
sys.path.append('./LibScenarioExecutor/build')
import LibScenarioExecutor
collision_impulse = 0.0
def get_ego_vehicle(world, role_name):
actor_list = world.get_actors()
for actor in actor_li... | 215 | 35.14 | 133 | 18 | 1,696 | python | [] | 0 | true | |
2024-11-18T20:10:55.407725+00:00 | 1,600,976,283,000 | f01b767aa5c0a26c00c593d8e09456a7287e3152 | 3 | {
"blob_id": "f01b767aa5c0a26c00c593d8e09456a7287e3152",
"branch_name": "refs/heads/master",
"committer_date": 1600976283000,
"content_id": "748c8a6bed7720d1382a9abe1b75e363e6cd307a",
"detected_licenses": [
"MIT"
],
"directory_id": "126aaa2c747ef00c060310fbbc3bf8ae3f82aa46",
"extension": "py",
"fi... | 2.765625 | stackv2 | import logging
from abc import abstractmethod
data_conf = {
'chaos': '../../data/Chaos/MR',
}
class Loader(object):
"""
Abstract class defining the behaviour of loaders for different datasets.
"""
def __init__(self, volumes=None):
self.num_masks = 0
self.num_volumes = 0
... | 89 | 38.01 | 114 | 18 | 832 | python | [] | 0 | true | |
2024-11-18T20:10:55.462832+00:00 | 1,523,213,093,000 | eb1de54a62d036b4c7dad90bfc422c1b541e07ad | 3 | {
"blob_id": "eb1de54a62d036b4c7dad90bfc422c1b541e07ad",
"branch_name": "refs/heads/master",
"committer_date": 1523213093000,
"content_id": "32cf2bc2cb177e2589dcae9a1e7d002b7b596188",
"detected_licenses": [
"MIT"
],
"directory_id": "1ceeb1cfab7dcad429d3834303f970136c75a15e",
"extension": "py",
"fi... | 3 | stackv2 | import exifread
#Adapted from/credit to: https://gist.github.com/snakeye/fdc372dbf11370fe29eb
def _to_degrees(value):
"""
Helper function to convert GPS coords to degrees (float)
value is of type: exifread.utils.Ratio
returns float
"""
d = float(value.values[0].num) / float(value.values[0].den)
m = float(value.... | 45 | 26.62 | 77 | 12 | 387 | python | [] | 0 | true | |
2024-11-18T20:10:55.520358+00:00 | 1,617,612,621,000 | bb28eeb4f3661338929cb63fdd90311853c4c910 | 3 | {
"blob_id": "bb28eeb4f3661338929cb63fdd90311853c4c910",
"branch_name": "refs/heads/master",
"committer_date": 1617612621000,
"content_id": "05ad7743449506a0fa2871fd19cb7c30e867f299",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "d76e798bd6c09b86bf9830cb3726aae8bd573f18",
"extension": "p... | 3 | stackv2 | # coding=utf-8
import torch
import time
from d2lzh_pytorch import train
# 声明电脑不止一个可CUDA的GPU
assert torch.cuda.device_count() >= 2
"""
这一节介绍了pytorch中的自动并行计算,至少需要两个GPU,由于电脑只有一个独显所以无法测试
"""
# 首先为了下面好判断并行的效果,保存一个计时类Benchamrk,用with来使用这个计时类
# 然后定义一个用于模拟运算的20000次矩阵乘法函数run
def run(x):
for _ in range(20000):
y... | 40 | 19.75 | 63 | 10 | 322 | python | [] | 0 | true | |
2024-11-18T20:10:55.579857+00:00 | 1,501,767,089,000 | 20d3b52a95e69f4b78afcc991fd2b7c6379a8127 | 4 | {
"blob_id": "20d3b52a95e69f4b78afcc991fd2b7c6379a8127",
"branch_name": "refs/heads/master",
"committer_date": 1501767089000,
"content_id": "4b0351d8af772389412dbd14dbcfd51d3edf7c44",
"detected_licenses": [
"MIT"
],
"directory_id": "a7aae07a85628243d514af328b54718e427f3323",
"extension": "py",
"fi... | 3.5 | stackv2 | a = [int(x) for x in input().strip().split(' ')]
def partition(a, first, last):
pivot = a[last]
wall = first-1
for j in range(first, last):
if a[j] < pivot:
wall += 1
if j!=wall: a[j],a[wall] = a[wall], a[j] #saves time. in case lik [3,2,4,1] do its partition and see
a[w... | 20 | 27.2 | 112 | 14 | 191 | python | [] | 0 | true | |
2024-11-18T20:10:55.695757+00:00 | 1,393,457,057,000 | f737e2be7b3b5ec31be48777a8258b83d20a106c | 3 | {
"blob_id": "f737e2be7b3b5ec31be48777a8258b83d20a106c",
"branch_name": "refs/heads/master",
"committer_date": 1393457057000,
"content_id": "e3df5bb73b741ec1a2f6b3f3040b0595a8dbff92",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "47d0aa43aeec11eb9f5287b8f0c7d9086eb49cc0",
"extension": "py"... | 2.953125 | stackv2 | #!/usr/bin/env python
import asyncore
import asyncwsgiserver
def hello_app(environ, start_response):
""" Simple WSGI application """
status = '200 OK'
response_headers = [('Content-type', 'text/plain')]
start_response(status, response_headers)
return [b'Hello world!\n']
if __name__ == "__main__... | 24 | 23.75 | 55 | 10 | 155 | python | [] | 0 | true | |
2024-11-18T20:10:55.858228+00:00 | 1,525,730,166,000 | 0a88eed12e5c79d0ed9a277dabb2e1dbdac23091 | 3 | {
"blob_id": "0a88eed12e5c79d0ed9a277dabb2e1dbdac23091",
"branch_name": "refs/heads/master",
"committer_date": 1525730166000,
"content_id": "619ea308bb2bd096f64ca50d14099730f6a04916",
"detected_licenses": [
"MIT"
],
"directory_id": "c493b09c986cacc384ec58fa749eae2cf2f494a3",
"extension": "py",
"fi... | 2.515625 | stackv2 | import numpy
class TrainSettings(object):
def __init__(self, learning_rate=0.01, momentum=0.0, l2=0.0, l1=0.0, dropout=0.0,
epoch=200, batch_size=64, auto_stop=False, auto_plot=False, auto_visualize=False,
plot_callback=None, loss_callback=None, filename='f', prefix='p', infix='i'... | 145 | 35.69 | 106 | 14 | 1,242 | python | [] | 0 | true | |
2024-11-18T20:10:58.854724+00:00 | 1,555,297,934,000 | 259e1f3efb165a42188fb105e0979abcec677f99 | 2 | {
"blob_id": "259e1f3efb165a42188fb105e0979abcec677f99",
"branch_name": "refs/heads/master",
"committer_date": 1555297934000,
"content_id": "ff1b88c15ce4b4c3400694c06f245205fd7bf0c4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "57dc098b417321804ff17ca3a1792153c9cc0fae",
"extension": "py"... | 2.46875 | stackv2 | # user_agent
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/')
def index():
print(request.headers) # headers信息
print('=====================')
print(request.url) #http://127.0.0.1:5000/
user_agent = request.headers.get('User_Agent')
return 'user_agent is %s' ... | 16 | 22.31 | 50 | 10 | 104 | python | [{"finding_id": "codeql_py/reflective-xss_4d1fecae5f228856_d3dc6bef", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | |
2024-11-18T20:10:59.413858+00:00 | 1,529,013,871,000 | 23a4696222cc0b7a7c1153a9d2dc81de3a61fde1 | 3 | {
"blob_id": "23a4696222cc0b7a7c1153a9d2dc81de3a61fde1",
"branch_name": "refs/heads/master",
"committer_date": 1529013871000,
"content_id": "3e0853356393e18a365176009e85f711a6611da6",
"detected_licenses": [
"MIT"
],
"directory_id": "3b6411ebd470db14b69a8f2215ae4183b97e07db",
"extension": "py",
"fi... | 2.703125 | stackv2 | import re
import xml.etree.ElementTree as ET
def readTillNextText(f):
c=True
text = ""
while c:
line = f.readline()
if "</text>" in line:
c=False
else:
text = text + " "+line
return text
def removeTagFromText(text):
return re.sub(r'<(.*?)>', "", text... | 37 | 23.08 | 52 | 15 | 214 | python | [] | 0 | true | |
2024-11-18T20:10:59.470241+00:00 | 1,618,221,808,000 | 382a8fab4cd799716be49766c44291e231ce24e3 | 2 | {
"blob_id": "382a8fab4cd799716be49766c44291e231ce24e3",
"branch_name": "refs/heads/master",
"committer_date": 1618221808000,
"content_id": "30ea8137b1514e5979cba852341fbb2ac08509ac",
"detected_licenses": [
"MIT"
],
"directory_id": "760f5bdb715e00d1f6246166e6d38c76a71170a7",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/env python3
from configparser import RawConfigParser
from argparse import ArgumentParser
from requests import get
import sys
import os.path
import urllib.request, urllib.parse, urllib.error
import logging
__version__ = '0.2'
def set_log_level(args_level):
if args_level is None:
args_level = ... | 282 | 38.48 | 132 | 23 | 2,417 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_20e0705d8ed2dcd0_c379b835", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 9 | true | |
2024-11-18T20:10:59.515902+00:00 | 1,603,830,453,000 | e7bda5dd0802ab10ef39a42cc8798c0465992d53 | 2 | {
"blob_id": "e7bda5dd0802ab10ef39a42cc8798c0465992d53",
"branch_name": "refs/heads/master",
"committer_date": 1603830453000,
"content_id": "5b4d37bf575804ad75910883bf7a05df4ba98192",
"detected_licenses": [
"MIT"
],
"directory_id": "1de6106df7d681fd5b9f335de8715bc48cdfbc2b",
"extension": "py",
"fi... | 2.46875 | stackv2 | """
CelebA Dataloader implementation, used in DCGAN
"""
import numpy as np
import imageio
import torch
import torchvision.transforms as v_transforms
import torchvision.utils as v_utils
import torchvision.datasets as v_datasets
from torch.utils.data import DataLoader, TensorDataset, Dataset
from utils.preprocess impo... | 142 | 45.63 | 134 | 16 | 1,201 | python | [] | 0 | true | |
2024-11-18T20:10:59.706504+00:00 | 1,616,672,789,000 | a0a1efca2e05fe111888b9ddaba46db3208bb323 | 2 | {
"blob_id": "a0a1efca2e05fe111888b9ddaba46db3208bb323",
"branch_name": "refs/heads/master",
"committer_date": 1616672789000,
"content_id": "eee1e3ca99e4a41278b9db6f22e9d8559935c6a7",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "80759f699acf38bf4889892aa41e775accc3494e",
"extension": "p... | 2.40625 | stackv2 | #!/usr/bin/env python
import vtk
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Create the RenderWindow, Renderer and both Actors
#
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.SetMultiSamples(0)
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRend... | 66 | 23.95 | 61 | 8 | 474 | python | [] | 0 | true | |
2024-11-18T20:10:59.924415+00:00 | 1,667,121,216,000 | 94741afbef3e54e184592b615ac196749653ef96 | 3 | {
"blob_id": "94741afbef3e54e184592b615ac196749653ef96",
"branch_name": "refs/heads/master",
"committer_date": 1667121216000,
"content_id": "d89247ecb8443b9f00ea3144b2baf3e862667a83",
"detected_licenses": [
"MIT"
],
"directory_id": "e833819cdd5c8c8b862c2a0151bc7e012b0c7a82",
"extension": "py",
"fi... | 3.28125 | stackv2 | # Python画字_qq_37473463的博客-CSDN博客: https://blog.csdn.net/qq_37473463/article/details/80804457
import turtle as t
pensize = 50 #画笔宽度
t.screensize(400, 300, "#66ccff")
a = t.window_width()
b = t.window_height()
#初始化画笔
t.pensize(pensize)
t.pencolor("#FF0000")
t.penup()
t.speed(10)
#画笔宽度初始化
t.write("你好,世界!"... | 19 | 18.74 | 92 | 8 | 172 | python | [] | 0 | true | |
2024-11-18T20:11:00.160998+00:00 | 1,459,257,641,000 | 24558dd620fb35ce834247ddeaba5410812a7002 | 3 | {
"blob_id": "24558dd620fb35ce834247ddeaba5410812a7002",
"branch_name": "refs/heads/master",
"committer_date": 1459257641000,
"content_id": "c18d348caf47e29b99886c9f63bc1567c245aabc",
"detected_licenses": [
"MIT"
],
"directory_id": "3d7905a510c2d92a7f85b054699a380087806434",
"extension": "py",
"fi... | 2.734375 | stackv2 | import argparse
from mvn_api import *
parser = argparse.ArgumentParser(description="Search artifacts in the Central Repository from terminal.")
parser.add_argument("-s", "--search", type=str, help="Basic search. Returns artifacts with search term in ArtifactId or GroupId")
parser.add_argument("-g", "--group", type=s... | 53 | 35.17 | 177 | 9 | 437 | python | [] | 0 | true | |
2024-11-18T20:11:00.400168+00:00 | 1,563,978,537,000 | b9348f0d9b3ec8a637e7cb695500d1a9e8c461a8 | 3 | {
"blob_id": "b9348f0d9b3ec8a637e7cb695500d1a9e8c461a8",
"branch_name": "refs/heads/master",
"committer_date": 1563978537000,
"content_id": "fc67415cb482ada82dda88dd47e3af221431814e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "96b479955e646dcb0721c6cbeacd07a46e1074a9",
"extension": "p... | 2.578125 | stackv2 | import csv
from django.core.management import BaseCommand
from cvinterface.controlled_vocabularies import vocabularies
class Command(BaseCommand):
help = 'Sets the download links for raw and controlled data.'
def add_arguments(self, parser):
parser.add_argument('vocabulary', type=str, help='The dest... | 39 | 38.31 | 116 | 18 | 286 | python | [] | 0 | true | |
2024-11-18T20:11:00.457559+00:00 | 1,550,489,733,000 | 9240b8e03e72f884d98d7de71a0ac62270af0d5b | 3 | {
"blob_id": "9240b8e03e72f884d98d7de71a0ac62270af0d5b",
"branch_name": "refs/heads/master",
"committer_date": 1550489733000,
"content_id": "f8208e469eb36aa683698c9522d85275527c2950",
"detected_licenses": [
"MIT"
],
"directory_id": "874e1cd2137bae350c4d79417c8dc01ffe56f3d5",
"extension": "py",
"fi... | 2.6875 | stackv2 | import logging
from lumapps.helpers.exceptions import (
NotAuthorizedException,
BadRequestException,
NotFoundException,
)
from googleapiclient.errors import HttpError
def authorization_decorator(func):
def func_wrapper(api, group, **kwargs):
# type: (ApiClient, Group, dict) -> Union[boolean, ... | 487 | 27.14 | 128 | 18 | 3,060 | python | [] | 0 | true | |
2024-11-18T20:11:00.570083+00:00 | 1,645,356,039,000 | df1485c87915c181649a97e42be4bfe785028d6a | 3 | {
"blob_id": "df1485c87915c181649a97e42be4bfe785028d6a",
"branch_name": "refs/heads/master",
"committer_date": 1645356039000,
"content_id": "5e1d8fcec23a5fa8b052241d6307a89f68413250",
"detected_licenses": [
"MIT"
],
"directory_id": "dfc08448e074a11e36df203ddcbe29ef7c72089d",
"extension": "py",
"fi... | 2.9375 | stackv2 | from Qt import QtCore, QtGui, QtWidgets
class MessageOverlay(QtWidgets.QWidget):
"""Message overlay setup to be used by most of the GUI python tools."""
def __init__(self, parent=None):
"""Class constuctor."""
super(MessageOverlay, self).__init__(parent)
self.setup_ui()
self.setVisible(False)
self.setSt... | 163 | 24.07 | 95 | 14 | 1,018 | python | [] | 0 | true | |
2024-11-18T20:11:00.698112+00:00 | 1,612,920,851,000 | 36233695d3c9009998d5dae76a56e40cd45d5683 | 4 | {
"blob_id": "36233695d3c9009998d5dae76a56e40cd45d5683",
"branch_name": "refs/heads/main",
"committer_date": 1612920851000,
"content_id": "30a0cb67b99169ad9a143c5e6f98b14adce293fa",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ad5dd856e1592a00cec2c924b3a8536154d33291",
"extension": "py",
... | 3.921875 | stackv2 | '''
* @File: a9_回文数.py
* @Author: CSY
* @Date: 2019/7/27 - 10:03
'''
"""
判断一个整数是否是回文数。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。
"""
class Solution:
def isPalindrome(self, x: int) -> bool:
str_x = str(x)
if str_x == str_x[::-1]:
return True
else:
return False
if __name__ == ... | 25 | 15.8 | 44 | 11 | 173 | python | [] | 0 | true | |
2024-11-18T20:11:00.763569+00:00 | 1,690,184,778,000 | f7d5f94b8aa2de11870e1f7796652982942b933d | 3 | {
"blob_id": "f7d5f94b8aa2de11870e1f7796652982942b933d",
"branch_name": "refs/heads/master",
"committer_date": 1690184778000,
"content_id": "1e4743e45fcc154d94c2c47499dd803d9d2a7678",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2a7ba24406346e2ef997333c392e793dab4b6afd",
"extension": "py"... | 2.5625 | stackv2 | ##
import pysam
def vcf_check_with_fasta(vcf_file, fasta_file, n_lines=1000):
faFile = pysam.FastaFile(fasta_file)
if vcf_file[-3:] == ".gz":
is_gzip = True
fid_in = gzip.open(vcf_file, "r")
else:
is_gzip = False
fid_in = open(vcf_file, "r")
ii = -1
fasta_base, vcf... | 33 | 25.21 | 62 | 15 | 247 | python | [] | 0 | true | |
2024-11-18T20:11:00.827605+00:00 | 1,604,085,860,000 | a2f122eb6682de3c3cec3cb260b5ac6a2be45555 | 3 | {
"blob_id": "a2f122eb6682de3c3cec3cb260b5ac6a2be45555",
"branch_name": "refs/heads/master",
"committer_date": 1604085860000,
"content_id": "7880470dbbe9b0c5ba40a872bf66f120656dc957",
"detected_licenses": [
"MIT"
],
"directory_id": "8bd75a71a011cee5b0200d9b060085b3f7361785",
"extension": "py",
"fi... | 3.0625 | stackv2 | #!/usr/bin/env python
import struct
dummy=False
try:
import smbus
except ImportError:
dummy=True
class UPS(object):
def __init__(self, port=1):
if dummy:
return
self.bus = smbus.SMBus(port) # 0 = /dev/i2c-0 (port I2C0), 1 = /dev/i2c-1 (port I2C1)
def get_voltage(self):
... | 54 | 28.44 | 101 | 14 | 443 | python | [] | 0 | true | |
2024-11-18T20:11:00.872800+00:00 | 1,666,925,962,000 | 9ded0abffe904295f50bfb7dd9042007008c9e0a | 4 | {
"blob_id": "9ded0abffe904295f50bfb7dd9042007008c9e0a",
"branch_name": "refs/heads/master",
"committer_date": 1666925962000,
"content_id": "b3d18544f75d4c7a461ddd410703fbb34c3e64a2",
"detected_licenses": [
"MIT"
],
"directory_id": "a8b2ab984cf02660efce5a7696cd3218d7023883",
"extension": "py",
"fi... | 4.0625 | stackv2 | """
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
For example, given the following triangle
[
[2],
[3,4],
[6,5,7],
[4,1,8,3]
]
The minimum path sum from top to bottom is 11 (i.e., 2 + 3 + 5 + 1 = 11).
Note:
Bonus point if you... | 56 | 34.62 | 126 | 19 | 499 | python | [] | 0 | true | |
2024-11-18T20:11:01.103657+00:00 | 1,591,217,241,000 | 70d4053df83b15c281fca230d12c524ecf552045 | 3 | {
"blob_id": "70d4053df83b15c281fca230d12c524ecf552045",
"branch_name": "refs/heads/master",
"committer_date": 1591217241000,
"content_id": "8a78bf8eb645a0988b757aa5c658ec36485c88e0",
"detected_licenses": [
"MIT"
],
"directory_id": "2a4bfcee8f067085b84ed4f57730d090845a1374",
"extension": "py",
"fi... | 3.421875 | stackv2 | def main():
# Write code here
while True:
N=int(input())
if 1<=N and N<=100:
break
List_elements=[]
List_elements=[int(x) for x in input().split()]
#List_elements.append(element)
List_elements.sort()
print(List_elements)
Absent_students=[]
... | 22 | 21.32 | 52 | 12 | 121 | python | [] | 0 | true | |
2024-11-18T20:11:01.148061+00:00 | 1,603,780,002,000 | 3ebc08ce7c15129cb00d186866002b3fc9308c3b | 3 | {
"blob_id": "3ebc08ce7c15129cb00d186866002b3fc9308c3b",
"branch_name": "refs/heads/main",
"committer_date": 1603780002000,
"content_id": "c2b9f20553fc867f5a3265ab191b820797b0dccb",
"detected_licenses": [
"MIT"
],
"directory_id": "025c3f9ccc6cc9f85eb9176e0b4db257b4afdaad",
"extension": "py",
"file... | 3.484375 | stackv2 | student_list=['emir','aijan', 'baizak', 'zarina', 'sultan']
current_list=[]
current_list_not=[]
i=0
come_in=1
while come_in !='0':
come_in = input("Ведите имя студента")
if come_in not in current_list:# проверяем пришел ли студент на занятия
if come_in in student_list:# проверяем пришел ли студент на за... | 25 | 31.4 | 75 | 13 | 222 | python | [] | 0 | true | |
2024-11-18T20:11:01.395003+00:00 | 1,613,163,698,000 | 9b64324991b645b6ac89ed3f3cbe77f9a4d4b3a0 | 3 | {
"blob_id": "9b64324991b645b6ac89ed3f3cbe77f9a4d4b3a0",
"branch_name": "refs/heads/main",
"committer_date": 1613163698000,
"content_id": "e41ae2236f65c48a95a57670fdc7eb06b8027066",
"detected_licenses": [
"MIT"
],
"directory_id": "045357b7044349db82dc80c592fc0f92889a124e",
"extension": "py",
"file... | 3.234375 | stackv2 | """
Custom validator that validates the format needed for PBRG to
get the record date from a folder name.
"""
import re
import string
import wx
DAY_NUMBER = 0
MONTH_NAME = 1
YEAR_NUMBER = 2
class DateValidator (wx.Validator):
"""
Validates input date has the next format:
DD MONTH_NAME YYYY
"""
def... | 89 | 25.53 | 94 | 14 | 524 | python | [] | 0 | true | |
2024-11-18T20:48:04.903570+00:00 | 1,632,177,766,000 | 74053d340bf42b54d733b2d55a7023e2e5189c5d | 3 | {
"blob_id": "74053d340bf42b54d733b2d55a7023e2e5189c5d",
"branch_name": "refs/heads/master",
"committer_date": 1632177766000,
"content_id": "015881fd7fecb5a2fa299d0fc48de7e55117c1a2",
"detected_licenses": [
"MIT"
],
"directory_id": "ff4d64f0a349ecef865c75ba4fc955eec2d407db",
"extension": "py",
"fi... | 3.125 | stackv2 | # -*- coding: utf-8 -*-
import re
from pysbd.languages import Language
from pysbd.processor import Processor
from pysbd.cleaner import Cleaner
from pysbd.utils import TextSpan
class Segmenter(object):
def __init__(self, language="en", clean=False, doc_type=None, char_span=False):
"""Segments a text into ... | 96 | 41.46 | 91 | 17 | 805 | python | [] | 0 | true | |
2024-11-18T20:48:05.083280+00:00 | 1,687,231,634,000 | edb2150247b0ffb24d7f630c0ef6cc8beb817e47 | 3 | {
"blob_id": "edb2150247b0ffb24d7f630c0ef6cc8beb817e47",
"branch_name": "refs/heads/master",
"committer_date": 1687231634000,
"content_id": "85a093e894f0be57bd9e1df91a62013933c60c5c",
"detected_licenses": [
"MIT"
],
"directory_id": "93cb56fcd98bd7ecc3898e67f0aecb66beaff24e",
"extension": "py",
"fi... | 3.078125 | stackv2 |
from itertools import product
import numpy as np
import torch
from ...utils.transformers import WrappedBERTEncoder
class BERTScorer:
""" This is the class that compute the BERTScores between sentences. BERTScores
include recall BERTScores, precision BERTScores, and F1 BERTSscores.
For more information, ... | 112 | 40.88 | 119 | 15 | 1,037 | python | [] | 0 | true | |
2024-11-18T20:48:05.807627+00:00 | 1,547,191,086,000 | 750294d7dea724de2d5bc8d2e2338d6fdf25848b | 2 | {
"blob_id": "750294d7dea724de2d5bc8d2e2338d6fdf25848b",
"branch_name": "refs/heads/master",
"committer_date": 1547191086000,
"content_id": "9e442e1c063467d0e7d3b7a49c534dd860446742",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bbd51c74d1bc20188c9a326c813c81da3706a7d5",
"extension": "py"... | 2.46875 | stackv2 | #!/usr/bin/env python
import os
import io
import base64
import re
import sys
import argparse
import requests
import numpy as np
from database import Database
from PIL import Image
from stat import *
from flask import Flask, jsonify, request
from flask_restful import Resource, Api, reqparse
from flask_cors import CORS
... | 251 | 30.39 | 145 | 15 | 1,817 | python | [] | 0 | true | |
2024-11-18T20:48:05.859248+00:00 | 1,508,981,432,000 | e61d0f61d373dfa2ee8540d2dde201bc8cceff38 | 3 | {
"blob_id": "e61d0f61d373dfa2ee8540d2dde201bc8cceff38",
"branch_name": "refs/heads/master",
"committer_date": 1508981432000,
"content_id": "7068b9a0a0efbc925e97e9639cebc87463a04d41",
"detected_licenses": [
"MIT"
],
"directory_id": "21c4ae2482bfe8ff87408d4f3e4ebec5d1225a66",
"extension": "py",
"fi... | 3.28125 | stackv2 | """
Access to the page of the url and get its title or entire sentences
to generate tags, and another program generates the url's features from them.
"""
from urllib import urlopen
import BeautifulSoup
def __get_sample_url():
sample_url = "https://ja.wikipedia.org/wiki/クレープ"
return sample_url
def __test_samp... | 44 | 23.93 | 77 | 11 | 259 | python | [] | 0 | true | |
2024-11-18T20:48:06.337929+00:00 | 1,683,463,686,000 | e5760819be4770859fb7134da8037bb7f18bd1c6 | 3 | {
"blob_id": "e5760819be4770859fb7134da8037bb7f18bd1c6",
"branch_name": "refs/heads/master",
"committer_date": 1683463686000,
"content_id": "2a370912d4223e1577291b5339388085a53d04b8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "96424b64dd7fd01a21f8e3cbeb86111f1587cd64",
"extension": "py"... | 2.53125 | stackv2 | from django.apps import apps
from django.core.management.commands.startapp import Command as StartAppCommand
from django_mako_plus.management.mixins import DMPCommandMixIn
import os, os.path, platform
NOT_SET = object()
class Command(DMPCommandMixIn, StartAppCommand):
help = (
"Creates a DMP app direct... | 53 | 34.34 | 106 | 16 | 434 | python | [] | 0 | true | |
2024-11-18T20:48:06.399708+00:00 | 1,534,980,986,000 | 87ece8b04496f01d6ec1ff66cfa81777169d7ed4 | 3 | {
"blob_id": "87ece8b04496f01d6ec1ff66cfa81777169d7ed4",
"branch_name": "refs/heads/master",
"committer_date": 1534980986000,
"content_id": "2bdab43f3f8ebe647de414d828d420275729a9b2",
"detected_licenses": [
"MIT"
],
"directory_id": "3429d59b3963c2db605984f52ebd15c8db364a49",
"extension": "py",
"fi... | 2.609375 | stackv2 | '''
This file is for data extraction.
It receive sensor data from vrep and write in excel.
Save file 'data.xlsx'
'''
import vrep
import sys
import xlsxwriter
from time import sleep
vrep.simxFinish(-1)
clientID=vrep.simxStart('127.0.0.1',19999,True,True,5000,5) # Connect to V-REP
#clientID=vrep.simxStart('192.168.1.2'... | 106 | 41.22 | 173 | 13 | 1,379 | python | [] | 0 | true | |
2024-11-18T20:48:06.514319+00:00 | 1,544,431,950,000 | 30e8e9bcd4ca35dedd97b43a46cd8201c6f99b88 | 2 | {
"blob_id": "30e8e9bcd4ca35dedd97b43a46cd8201c6f99b88",
"branch_name": "refs/heads/master",
"committer_date": 1544431950000,
"content_id": "4bb35fc82ab5a2d2bc09de6a0496b0c17ea21b52",
"detected_licenses": [
"MIT"
],
"directory_id": "f616e457a6a82fe55749b8954e07dad01ce186f2",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/env python
#
# This is the library for Grove Base Hat.
#
# Button Base Class
#
'''
## License
The MIT License (MIT)
Grove Base Hat for the Raspberry Pi, used to connect grove sensors.
Copyright (C) 2018 Seeed Technology Co.,Ltd.
Permission is hereby granted, free of charge, to any person obtaining a co... | 78 | 29.65 | 77 | 11 | 569 | python | [] | 0 | true | |
2024-11-18T20:48:07.115276+00:00 | 1,595,939,979,000 | a248258c98f4a0e5e7e0860e26dd7e108ef9aeb5 | 2 | {
"blob_id": "a248258c98f4a0e5e7e0860e26dd7e108ef9aeb5",
"branch_name": "refs/heads/master",
"committer_date": 1595939979000,
"content_id": "090588daf357410456d980ce9ea0524f0ec1629e",
"detected_licenses": [
"MIT"
],
"directory_id": "900331177e9dc8dc6422112b4ca40da72d6bbf69",
"extension": "py",
"fi... | 2.5 | stackv2 | import kivy
kivy.require('1.0.1')
import time
from math import *
from kivy.config import Config
Config.set('graphics','resizable',0)
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.graphics import Color, Ellipse
from kivy.uix.button import Button
from collections import namedtuple
from dynamicSal... | 276 | 23.92 | 174 | 19 | 2,270 | python | [] | 0 | true | |
2024-11-18T20:48:07.182818+00:00 | 1,686,665,787,000 | afa46da4177dca0eb4829753598a3e1596f5e61b | 3 | {
"blob_id": "afa46da4177dca0eb4829753598a3e1596f5e61b",
"branch_name": "refs/heads/master",
"committer_date": 1686665787000,
"content_id": "0d46af59c170e7247510fae2b74572ba13f72896",
"detected_licenses": [
"MIT"
],
"directory_id": "cb2889cbd47afb93a2bbf9b83f2c09e554710001",
"extension": "py",
"fi... | 2.78125 | stackv2 | #! /usr/bin/env python3
#
# In this script we solve the linear plane strain elasticity problem for an
# infinite plate with a circular hole under tension. We do this by placing the
# circle in the origin of a unit square, imposing symmetry conditions on the
# left and bottom, and Dirichlet conditions constraining the d... | 130 | 45.48 | 129 | 16 | 2,102 | python | [] | 0 | true | |
2024-11-18T20:48:07.573656+00:00 | 1,476,979,865,000 | 1ba95adbed562795c79521ac91714535973c90ee | 3 | {
"blob_id": "1ba95adbed562795c79521ac91714535973c90ee",
"branch_name": "refs/heads/master",
"committer_date": 1476979865000,
"content_id": "09eefcf9e341a55b100f056f4d1b59e58e73661e",
"detected_licenses": [
"MIT"
],
"directory_id": "a0a4c40d4d022e337d8d23114dd54f9fa5ec746a",
"extension": "py",
"fi... | 2.578125 | stackv2 | """
This pipeline is used to compute the model which will be used for the
standard time normalization.
"""
import os
import numpy as np
from protoclass.data_management import DCEModality
from protoclass.data_management import GTModality
from protoclass.preprocessing import StandardTimeNormalization
# Define the pa... | 58 | 33.52 | 74 | 11 | 474 | python | [] | 0 | true | |
2024-11-18T20:48:07.627503+00:00 | 1,627,093,524,000 | 3100871ff84aa38714a2bec26e876934732e5013 | 2 | {
"blob_id": "3100871ff84aa38714a2bec26e876934732e5013",
"branch_name": "refs/heads/main",
"committer_date": 1627093524000,
"content_id": "f0d830b65eb196532abceadd34e6fdaec06b3779",
"detected_licenses": [
"MIT"
],
"directory_id": "f34f48f3137fcacdb554d931e1c6e3816a5e9469",
"extension": "py",
"file... | 2.375 | stackv2 | import itertools
import logging
from typing import MutableMapping, Sequence
import aioredis
from job_scheduler.db.base import JobRepository, ScheduleRepository
from job_scheduler.db.types import JobRepoItem, ScheduleRepoItem
class RedisScheduleRepository(ScheduleRepository):
redis: aioredis.Redis
def __ini... | 141 | 32.89 | 88 | 16 | 1,085 | python | [] | 0 | true | |
2024-11-18T20:48:07.687724+00:00 | 1,507,069,270,000 | 6dc9adccbce0e549d4fcc4b2774080c81396637a | 3 | {
"blob_id": "6dc9adccbce0e549d4fcc4b2774080c81396637a",
"branch_name": "refs/heads/master",
"committer_date": 1507069270000,
"content_id": "26a81bbd3a8b24b1045a94b94f66e5d1f6a81691",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "729c562cba54a0d7305064c6598957f62879fd0f",
"extension": "p... | 2.734375 | stackv2 | def threshold_symbolic(g, input, threshold=0, value=0, inplace=False):
# TODO: [Export inplace]
if threshold != 0:
raise RuntimeError("Non-zero threshold in Threshold not supported")
if value != 0:
raise RuntimeError("Non-zero value in Threshold not supported")
return g.op("Relu", input)... | 25 | 31.2 | 75 | 12 | 218 | python | [] | 0 | true | |
2024-11-18T20:48:07.867330+00:00 | 1,544,514,084,000 | cb819f52ed34632a5f498d17ab3125166bfea2bb | 4 | {
"blob_id": "cb819f52ed34632a5f498d17ab3125166bfea2bb",
"branch_name": "refs/heads/master",
"committer_date": 1544514084000,
"content_id": "62a330f36052a972c30954781396b1bad9990b99",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8a659a42a51c301a56c1c7dfd6488f65022f2429",
"extension": "py"... | 3.515625 | stackv2 | import wx
class ModelInterface(object):
""""Defines an interface for a simple value generator model"""
def __init__(self):
super(ModelInterface, self).__init__()
self.value = 0
self.observers = list()
def Generate(self):
"""Interface method to be implemented by subclasses... | 145 | 25.23 | 75 | 13 | 817 | python | [] | 0 | true | |
2024-11-18T20:48:09.040464+00:00 | 1,666,352,047,000 | 3bbad4ab6b4815f9a191e150fdc968aaabb1c601 | 3 | {
"blob_id": "3bbad4ab6b4815f9a191e150fdc968aaabb1c601",
"branch_name": "refs/heads/master",
"committer_date": 1666352200000,
"content_id": "c2263d7d71eb536c0c29eaf5435d6edd32568b53",
"detected_licenses": [
"Python-2.0",
"MIT"
],
"directory_id": "f4eeaa2770e5189d098554d3ab74312427c5b348",
"exten... | 2.59375 | stackv2 | # -*- coding: utf8 -*-
"""
.. module:: lesscpy.plib.identifier
:synopsis: Identifier node.
Copyright (c)
See LICENSE for details.
.. moduleauthor:: Johann T. Mariusson <jtm@robot.is>
"""
import re
from .node import Node
from lesscpy.lessc import utility
from lesscpy.lib import reserved
class Identifier(N... | 175 | 35.9 | 109 | 28 | 1,207 | python | [] | 0 | true | |
2024-11-18T20:48:09.166027+00:00 | 1,457,388,391,000 | 80fb0d4b44bbe39dba6d15679eeff336eaee4ff1 | 3 | {
"blob_id": "80fb0d4b44bbe39dba6d15679eeff336eaee4ff1",
"branch_name": "refs/heads/master",
"committer_date": 1457388391000,
"content_id": "d9af487c0490a930f19f1c521547b67f644cd286",
"detected_licenses": [
"MIT"
],
"directory_id": "883338784165b675acccee6c99d0c300f5ddbe62",
"extension": "py",
"fi... | 3.140625 | stackv2 | import random
from GeneticAlgorithm.Constants import Constants
class Chromosome(object):
"""
@chrome encoded String for chromosome
@target expected solution for algorithm (must be numeric)
@total calculated current value on chromosome
"""
__validationFunc = None
__scoreFunc = No... | 90 | 31.28 | 130 | 18 | 627 | python | [] | 0 | true | |
2024-11-18T20:48:09.272141+00:00 | 1,607,110,705,000 | b424073a7074bb7407a61878610511723d199a71 | 3 | {
"blob_id": "b424073a7074bb7407a61878610511723d199a71",
"branch_name": "refs/heads/master",
"committer_date": 1607110705000,
"content_id": "9a085df3c41615c914753fc7a822b40bba91adee",
"detected_licenses": [
"MIT"
],
"directory_id": "20cdfbabe11b1b05343050923e71e86b3bb58f0e",
"extension": "py",
"fi... | 2.609375 | stackv2 | # author: Min Latt
# website: http://minlaxz.me
# import necessary packages
from __future__ import print_function
import logxs
import re
def find_method(name, pretty_print=True, module=None):
if not module:
module = logxs
p = ".*{}.*".format(name)
filtered = filter(lambda x: re.search(p, x, re.IG... | 20 | 23.95 | 76 | 12 | 129 | python | [] | 0 | true | |
2024-11-18T20:48:09.393598+00:00 | 1,396,912,852,000 | 89b974f1bac706586e6dd1512c1ecc28e2331e3e | 3 | {
"blob_id": "89b974f1bac706586e6dd1512c1ecc28e2331e3e",
"branch_name": "refs/heads/master",
"committer_date": 1396912852000,
"content_id": "48a2b4667ba5a2afdf27a182a04d59301c584184",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "14edb1aa3f48bb78f9411e1076f2b08c7b8ad2dc",
"extension": "p... | 2.78125 | stackv2 | # encoding: utf-8
# ---------------------------------------------------------------------------
# Copyright (C) 2008-2014, Enthought, Inc.
# Distributed under the terms of the BSD License. See COPYING.rst.
# ---------------------------------------------------------------------------
"""
Utility functions described ... | 64 | 34 | 78 | 13 | 514 | python | [] | 0 | true | |
2024-11-18T20:48:09.612339+00:00 | 1,616,879,386,000 | 6cc159b9ae015bbcbdee1b26a0fa6153b7d1be5e | 3 | {
"blob_id": "6cc159b9ae015bbcbdee1b26a0fa6153b7d1be5e",
"branch_name": "refs/heads/master",
"committer_date": 1616879386000,
"content_id": "006de7b88e20f4f0706d655923e777738aacf628",
"detected_licenses": [
"MIT"
],
"directory_id": "14de6d507e471d582a7e7f5cba898f72f6ba186d",
"extension": "py",
"fi... | 3.40625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Copyright 2020, Yutong Xie, UIUC.
Using set to find repeated DNA Sequences.
'''
class Solution(object):
def findRepeatedDnaSequences(self, s):
"""
:type s: str
:rtype: List[str]
"""
if len(s) < 10:
return... | 27 | 19.07 | 45 | 17 | 150 | python | [] | 0 | true | |
2024-11-18T20:48:09.673060+00:00 | 1,630,488,585,000 | 4d570e8d3730e7d806f28ea1867b26307bbbaa57 | 3 | {
"blob_id": "4d570e8d3730e7d806f28ea1867b26307bbbaa57",
"branch_name": "refs/heads/main",
"committer_date": 1630488585000,
"content_id": "5e96710b3fcfb5304a18a0b59a25ef5e0a87bce0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2c88f5d940f9473aff5fc469a47d71febd2b751f",
"extension": "py",
... | 2.53125 | stackv2 | import numpy as np
import cv2
from tkinter import filedialog
from tkinter import Tk, Button, Label, Frame, Menu, TOP, HORIZONTAL, LEFT, X, messagebox, Scale
from PIL import Image
from PIL import ImageTk
class ipGUI:
def __init__(self, master):
self.master = master
self.master.minsize(width=1250, h... | 288 | 51.69 | 166 | 19 | 3,600 | python | [] | 0 | true | |
2024-11-18T20:48:09.725454+00:00 | 1,600,125,275,000 | 296589db04e3bfa3e5d00acc58417f21985ce8ba | 3 | {
"blob_id": "296589db04e3bfa3e5d00acc58417f21985ce8ba",
"branch_name": "refs/heads/master",
"committer_date": 1600125275000,
"content_id": "30a4c764bcf98f0782f8f83981f9b85305883f54",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d2523ed1712f4435d48473ef04873ca73fcf2760",
"extension": "py"... | 2.75 | stackv2 | from sys import maxsize
class Group:
def __init__(self, name_group=None, logo_group=None, footer_group=None, id=None):
self.name_group = name_group
self.logo_group = logo_group
self.footer_group = footer_group
self.id = id
def __repr__(self):
return "%s:%s;%s;%s" % (se... | 21 | 29.71 | 115 | 13 | 159 | python | [] | 0 | true | |
2024-11-18T20:48:09.775890+00:00 | 1,616,098,867,000 | 19dc33c9c0d9e87560aaf1cd0d244901b68635ad | 3 | {
"blob_id": "19dc33c9c0d9e87560aaf1cd0d244901b68635ad",
"branch_name": "refs/heads/master",
"committer_date": 1616098867000,
"content_id": "2970a5be109948c418aa2e654f9489ceaced698f",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "5133bdf7d0ecdc6f2182ad71b61abd2da7afe2da",
"extension": "p... | 3.046875 | stackv2 | """
Sequence Visualization Based on ISOMAP
-------------------------------------------------------------------------
This example allows to visualize high-dimensional wind time-series, employing dimensionality reduction. A wind speed sequence is mapped into a
3-dimensional latent space to monitor its intrinsic structu... | 76 | 30.62 | 142 | 14 | 713 | python | [] | 0 | true | |
2024-11-18T20:48:09.829495+00:00 | 1,606,949,951,000 | 1801ae0ad3c2da0c1720ae4c51290c8c6a60049f | 3 | {
"blob_id": "1801ae0ad3c2da0c1720ae4c51290c8c6a60049f",
"branch_name": "refs/heads/main",
"committer_date": 1606950720000,
"content_id": "5f3ae43e21729db5371c14f5b0ea5acc2d99a3c3",
"detected_licenses": [
"MIT"
],
"directory_id": "b3a2054a94c33501097e4939de0f8be49764aec4",
"extension": "py",
"file... | 2.53125 | stackv2 | from gpiozero import LED
import pylights3
import json
class HeatingAndCoolingControl:
def __init__(self, config_file: str):
self.configs = json.load(open(config_file))
self.relay = LED(self.configs["relay_gpio_pin"])
pylights3.device_cfg_filename = self.configs["device_configs"]
se... | 31 | 28.26 | 70 | 12 | 225 | python | [] | 0 | true | |
2024-11-18T20:48:09.939821+00:00 | 1,621,757,970,000 | b66dfb716b3566ff47fa66378f83bf8e2f441b6b | 3 | {
"blob_id": "b66dfb716b3566ff47fa66378f83bf8e2f441b6b",
"branch_name": "refs/heads/master",
"committer_date": 1621757970000,
"content_id": "cb351c852a6fec55f9fb0d505b52b7bd18164df8",
"detected_licenses": [
"MIT"
],
"directory_id": "762427813d17a57a6ee6abaf837bc32e47d10d8c",
"extension": "py",
"fi... | 2.921875 | stackv2 | from .king_curve import KingCurve
from ..alg.basic_alg import linspace
class KingParametricEquation(KingCurve):
def __init__(self, depends=(), essential_data=None, create_type=1):
"""
{'x': x, 'y': y, 't_min': min, 't_max': max, 'count': c}
"""
super(KingParametricEquation, self)._... | 26 | 34.08 | 100 | 11 | 219 | python | [] | 0 | true | |
2024-11-18T20:48:09.996140+00:00 | 1,629,568,111,000 | b9668eebfdf2db5026bebaa9a097c36ef638e62e | 3 | {
"blob_id": "b9668eebfdf2db5026bebaa9a097c36ef638e62e",
"branch_name": "refs/heads/main",
"committer_date": 1629568111000,
"content_id": "74ca5ee5f0cc1c81376975f4309afa177e437c88",
"detected_licenses": [
"MIT"
],
"directory_id": "188a2d9dffd055277d08cba4151eece1a7ff6a4e",
"extension": "py",
"file... | 2.984375 | stackv2 | import torch
import torchvision
from torch.utils.data import DataLoader, random_split
from torchvision.datasets import CIFAR10
import pytorch_lightning as pl
from typing import Optional
CIFAR10_MEAN = torch.tensor([0.49156195, 0.48253155, 0.44702223], dtype=float) #mean of each RGB channel
CIFAR10_STD = torch.tenso... | 114 | 33.2 | 145 | 15 | 932 | python | [] | 0 | true | |
2024-11-18T20:48:10.144663+00:00 | 1,474,314,753,000 | b1af3911ac9a444b4d969efda3b9fc4585ffd89c | 3 | {
"blob_id": "b1af3911ac9a444b4d969efda3b9fc4585ffd89c",
"branch_name": "refs/heads/master",
"committer_date": 1474314753000,
"content_id": "b9a6fbd0d072827a43c79b9a1caced99088f9f95",
"detected_licenses": [
"MIT"
],
"directory_id": "db54f85375850b791dda9037825f3b01327a5358",
"extension": "py",
"fi... | 2.578125 | stackv2 | # -*- coding: utf-8 -*-
import os
import yaml
from metrika.suite import Suite
from metrika.meter import Timer
__author__ = 'Javier Pimás'
def assure_dir(directory):
if not os.path.exists(directory):
os.makedirs(directory)
root_dir = os.getcwd()
benchs_dir = root_dir + "/benchs"
temp_dir = root_dir + "/... | 49 | 22.31 | 92 | 14 | 269 | python | [] | 0 | true | |
2024-11-18T20:48:10.323221+00:00 | 1,525,448,086,000 | 68747384826287ea269809c4fb78d4d0a813b8cf | 3 | {
"blob_id": "68747384826287ea269809c4fb78d4d0a813b8cf",
"branch_name": "refs/heads/master",
"committer_date": 1525448086000,
"content_id": "4a646ce2071de083763b439f69b8e6c5da05ee7c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "152fe40f498e9a9af980155bd3f57e8d5cb13352",
"extension": "py"... | 2.53125 | stackv2 | #! /usr/bin/env python
# -*- coding: UTF-8 -*-
from base.serverpath_if import ServerPath
from commons.os_util import PrinterDecorator
from commons.graph.graph_util import PartitionGraph
from infrastructure.graph_layout.graphviz.graphviz import GraphvizFormatter
import logging
import pprint
import sys
config_pathtools... | 220 | 38.2 | 134 | 22 | 1,894 | python | [] | 0 | true | |
2024-11-18T20:48:10.643482+00:00 | 1,655,756,144,000 | 4ea5ab72e32c700d5d7e36f57ada451c06e48b1b | 2 | {
"blob_id": "4ea5ab72e32c700d5d7e36f57ada451c06e48b1b",
"branch_name": "refs/heads/master",
"committer_date": 1655756144000,
"content_id": "874823ac8633d225a99547b5b72abc82b367f4f3",
"detected_licenses": [
"MIT"
],
"directory_id": "bca068600537d2f684539d8a28d162411cf05511",
"extension": "py",
"fi... | 2.3125 | stackv2 | from accessoryFunctions.accessoryFunctions import make_path
from nastools.nastools import retrieve_nas_files
from biotools import mash
import pickle
import shutil
import click
import glob
import os
import sentry_sdk
from amrsummary import before_send
from automator_settings import SENTRY_DSN
@click.command()
@click.o... | 239 | 44.94 | 124 | 20 | 2,290 | python | [] | 0 | true | |
2024-11-18T20:48:10.702725+00:00 | 1,573,980,303,000 | 05c83d01a54945611e84cf2d0d74838539dab7a0 | 3 | {
"blob_id": "05c83d01a54945611e84cf2d0d74838539dab7a0",
"branch_name": "refs/heads/master",
"committer_date": 1573980303000,
"content_id": "242886fcfba152e07a0f224addbfecbf67245cbe",
"detected_licenses": [
"MIT"
],
"directory_id": "beed8abea2d681cb29a6f31c7f87e0f476cddcd1",
"extension": "py",
"fi... | 3.15625 | stackv2 | import numpy as np
import sklearn.datasets
import sklearn.model_selection
from scipy.sparse import linalg,hstack,csr_matrix
import matplotlib.pyplot as plt
# load dataset in libsvm format into sparse CSR matrix
data = sklearn.datasets.load_svmlight_file('dataset/housing_scale', n_features=13)
# split the dataset into... | 55 | 28.98 | 124 | 13 | 430 | python | [] | 0 | true | |
2024-11-18T20:48:10.845047+00:00 | 1,527,060,155,000 | 8ae0ee26168a90f3e299ed386099e00ce7c3080a | 3 | {
"blob_id": "8ae0ee26168a90f3e299ed386099e00ce7c3080a",
"branch_name": "refs/heads/master",
"committer_date": 1527060155000,
"content_id": "3040219b6af9ef7abe901275fa5dd823037e9dd1",
"detected_licenses": [
"MIT"
],
"directory_id": "f1e24cc954c0abdb46e136327db0ca8ee1c6a14c",
"extension": "py",
"fi... | 3.25 | stackv2 | # -*- coding=utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
# base implement of facade pattern
# 为子系统中的一组接口提供一个统一的入口。外观模式定义了一个高层接口,这个接口使得这一子系统更加容易使用。
# 外观模式优点:
# 减少客户端所需处理的对象数目,使得子系统使用起来更加容易。
# 实现了子系统与客户端之间的松耦合关系。
# 一个子系统的修改对其他子系统没有任何影响,而且子系统内部变化也不会影响到外观对象。
# 外观模式缺点:
# 不能很好地限制客户端直接... | 55 | 21.07 | 72 | 10 | 373 | python | [] | 0 | true | |
2024-11-18T20:48:10.945475+00:00 | 1,657,813,204,000 | 969e964ae7b0ebee7f89b5b6ce0c2006e4a17e93 | 3 | {
"blob_id": "969e964ae7b0ebee7f89b5b6ce0c2006e4a17e93",
"branch_name": "refs/heads/main",
"committer_date": 1657813204000,
"content_id": "80f675c2ec350c95f9ad014dd0546d28156bd46b",
"detected_licenses": [
"MIT"
],
"directory_id": "788c39d4c8464054a4cf9d0964a23663789107be",
"extension": "py",
"file... | 2.625 | stackv2 | import numpy as np
import copy
secs_per_day = 60.0 * 60.0 * 24.0
default_params = {
# Standard constants (normally will use default)
"rho_i": 910.0, # kg/m^3, ice density
"rho_w": 1000.0, # kg/m^3, water density
"L_f": 3.32e5, # J/kg, Latent heat of fusion for ice #(CT) 3.35e5 in schoof(2010)
"... | 147 | 34.02 | 100 | 18 | 1,649 | python | [] | 0 | true | |
2024-11-18T20:48:10.999131+00:00 | 1,628,169,327,000 | 4cb14363913006fb7e5f2f4c76380b0976778ca6 | 3 | {
"blob_id": "4cb14363913006fb7e5f2f4c76380b0976778ca6",
"branch_name": "refs/heads/master",
"committer_date": 1628169327000,
"content_id": "a6e2bf6accdf588316a79dff292b82a97ebc1271",
"detected_licenses": [
"MIT"
],
"directory_id": "c76f942a5dec171a79a1c7d4f3876ef0a75e1bdd",
"extension": "py",
"fi... | 2.609375 | stackv2 | """
This file contains the code for the task that gets details of an IPO.
"""
import json
from core.constants import GREET_MESSAGE, REDIS_HASHES, DATA_STR, V1_DATA_STR, PAYMENTS_LINK, INFO_MESSAGE, CREATORS_LINK_1, CREATORS_LINK_2
from redis_conf import RedisConf
from scrapers.mybot import MyBot
def fetch_ipo_de... | 232 | 44.24 | 140 | 19 | 2,275 | python | [] | 0 | true | |
2024-11-18T20:48:11.234414+00:00 | 1,598,286,182,000 | 9aa7bb5da161bd7b31c3c35b5a6732e964a77141 | 3 | {
"blob_id": "9aa7bb5da161bd7b31c3c35b5a6732e964a77141",
"branch_name": "refs/heads/main",
"committer_date": 1598286182000,
"content_id": "c670abda3a1424a73ddae475d2a8037d7b3fe956",
"detected_licenses": [
"MIT"
],
"directory_id": "914cbb09a26df70dd9eee0b22b89a6a81c8e72ec",
"extension": "py",
"file... | 2.59375 | stackv2 | # anhost indexing module
#
# This file is separate from the pre-processing module because that one is
# meant ONLY to remove sensitive and duplicate data.
import os #used for file path joining
import pandas as pd
import numpy as np
# Configuration file template is available at config_template.py
import config
proc_c... | 29 | 29.72 | 74 | 10 | 205 | python | [] | 0 | true | |
2024-11-18T20:48:11.320050+00:00 | 1,395,690,230,000 | 53f340fac14c5500256f62c571fbe06a060b86dd | 2 | {
"blob_id": "53f340fac14c5500256f62c571fbe06a060b86dd",
"branch_name": "refs/heads/master",
"committer_date": 1395690230000,
"content_id": "f03abc1cd7a77f409bdf60424a04ce8dbd319662",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "30ecbda5e452d34598a29a3893fd0831152e8eca",
"extension": "p... | 2.375 | stackv2 | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
#classifiers: https://pypi.python.org/pypi?%3Aaction=list_classifiers
setup(
name = "grocerytrends",
version = "0.1",
author = "Jacob Hooey",
author_email = "jacob@pompouspanda.com",
description = ("A Pyt... | 23 | 31.96 | 77 | 9 | 182 | python | [] | 0 | true | |
2024-11-18T20:48:11.469529+00:00 | 1,622,536,399,000 | b30c21f2eeba74ad221218c66df0a2b8456aaa9d | 2 | {
"blob_id": "b30c21f2eeba74ad221218c66df0a2b8456aaa9d",
"branch_name": "refs/heads/main",
"committer_date": 1622536399000,
"content_id": "6142508c4eb9f4c5c5c5bfcc36737cc1a091e642",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "5a471b8f01c90e2307b4c21060bb2b6a0c556f46",
"extension": "py"... | 2.5 | stackv2 | """
This module draws diagrams of the state machines.
Usage:
~/ska-src/ska-tango-base$ docker run --rm -ti -v $PWD:/app continuumio/miniconda3 bash
(base) root@293f3b699c9b:#
$ conda install --yes pygraphviz
$ pip install transitions
$ apt-get update && apt-get install gsfonts
$ cd /app/docs/s... | 68 | 28.91 | 90 | 12 | 492 | python | [] | 0 | true | |
2024-11-18T20:48:11.595994+00:00 | 1,579,154,135,000 | 7124d60c90c9a03aaed0822012355381b1bbb6da | 2 | {
"blob_id": "7124d60c90c9a03aaed0822012355381b1bbb6da",
"branch_name": "refs/heads/master",
"committer_date": 1579154135000,
"content_id": "c3e8d6c96f233f7ad575fa941b25fee6b6a02b65",
"detected_licenses": [
"MIT"
],
"directory_id": "3a2b1be54f6b79e93d62f9dae7416de275bcef3d",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/env python
"""
This tutorial includes advanced specifications
for analysing binary neutron star event data.
Here GW170817 is used as an example.
"""
from __future__ import division, print_function
import bilby
outdir = 'outdir'
label = 'GW170817'
time_of_event = bilby.gw.utils.get_event_time(label)
bilby.co... | 104 | 34.08 | 79 | 10 | 986 | python | [] | 0 | true | |
2024-11-18T20:48:11.654479+00:00 | 1,617,119,090,000 | 6e059c5826ff14986d39c9026afdfba93778d57d | 3 | {
"blob_id": "6e059c5826ff14986d39c9026afdfba93778d57d",
"branch_name": "refs/heads/master",
"committer_date": 1617119090000,
"content_id": "962be33724b927d1c8ca27b5368b28af03eb3f92",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "32e46a64520ff1e425ceb15c56b1922f094f3133",
"extension": "py"... | 3.140625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##############
# GPathFinder: Identification of ligand pathways by a multi-objective
# genetic algorithm
#
# https://github.com/insilichem/gpathfinder
#
# Copyright 2019 José-Emilio Sánchez Aparicio, Giuseppe Sciortino,
# Daniel Villadrich Herrmannsdoerfer, Pablo Orenes C... | 343 | 33.02 | 93 | 20 | 3,004 | python | [] | 0 | true | |
2024-11-18T20:48:12.015193+00:00 | 1,559,363,791,000 | f14b0230b58764c9b96e93cc71f6427ba49cdb90 | 4 | {
"blob_id": "f14b0230b58764c9b96e93cc71f6427ba49cdb90",
"branch_name": "refs/heads/master",
"committer_date": 1559363791000,
"content_id": "23deef40542b2fce7ab1549a23e20d53729d2a7c",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "88a3d5d922b3094eb08fe2da4596e079046a6668",
"extension": "p... | 4.0625 | stackv2 | from getpass import getpass
def prompt_for_password(prompt: str = 'Enter a password: ',
verify_prompt: str = 'Re-enter the password: ',
validate: bool = True) -> str:
""" Utility for password prompts
Allows for password validation. If the passwords don't match,... | 33 | 31.36 | 89 | 13 | 242 | python | [] | 0 | true | |
2024-11-18T20:48:12.140597+00:00 | 1,559,869,664,000 | e369f15e95b68d32e15c1d66ae29fdb65da014d6 | 3 | {
"blob_id": "e369f15e95b68d32e15c1d66ae29fdb65da014d6",
"branch_name": "refs/heads/master",
"committer_date": 1559869664000,
"content_id": "36786e4df78eb1ed8b051d3dcb60947088b21013",
"detected_licenses": [
"MIT"
],
"directory_id": "9e90550f27b440ad41959c90c5791516ef420d4d",
"extension": "py",
"fi... | 2.828125 | stackv2 | import rasterio
import argparse
import numpy as np
parser = argparse.ArgumentParser(description='Utility to bump all negative values in a snow depth map up to the value of 0. This is useful for plotting.')
parser.add_argument("-r", "--raster", help="input snow depth raster to fix")
args = parser.parse_args()
# read i... | 21 | 33.05 | 154 | 11 | 195 | python | [] | 0 | true | |
2024-11-18T20:48:12.491486+00:00 | 1,418,934,740,000 | 0304deda035295e52a374412c9efbfd4d15fcab9 | 2 | {
"blob_id": "0304deda035295e52a374412c9efbfd4d15fcab9",
"branch_name": "refs/heads/master",
"committer_date": 1418937253000,
"content_id": "28a9db6a6241d8346114ee8609fbff8254461969",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2449c03b68aef33c1652fd36155a4b88073ffce5",
"extension": "py"... | 2.5 | stackv2 | #!/usr/bin/env python
import argparse
import os
import os.path
import re
import subprocess
import yaml
STORM_HOME = os.environ["STORM_HOME"]
# Opens the `storm-setup.yaml` file added to this Docker container. The file was
# copied from the `config/storm-setup.yaml` file in the storm-docker repository
# during a `mak... | 126 | 39.84 | 80 | 18 | 1,297 | python | [] | 0 | true | |
2024-11-18T20:48:12.612054+00:00 | 1,611,385,896,000 | f2eb0833248b933b037fa8eb180fabf2351dd738 | 4 | {
"blob_id": "f2eb0833248b933b037fa8eb180fabf2351dd738",
"branch_name": "refs/heads/main",
"committer_date": 1611385896000,
"content_id": "088026ef85d2e4c6e2b71388fc10508341010bc9",
"detected_licenses": [
"MIT"
],
"directory_id": "027d24d705d8bdc0b865c9d34fd2873b529ed21e",
"extension": "py",
"file... | 3.671875 | stackv2 | # Before performing any analysis we need to check the data
# and prepare it excluding null values and giving proper
# format to values so our data can be clean and ready
import pandas as pd
import numpy as np
# covert the data file into a dataframe so it's easy to manupilate
covid = pd.read_csv("data/covid_19_data.cs... | 89 | 36.91 | 103 | 11 | 902 | python | [] | 0 | true | |
2024-11-18T20:48:13.221477+00:00 | 1,525,717,074,000 | 2ceddd284e381c052c4a824ca583404f1c2b044b | 3 | {
"blob_id": "2ceddd284e381c052c4a824ca583404f1c2b044b",
"branch_name": "refs/heads/master",
"committer_date": 1525717074000,
"content_id": "1cd57c1f975bff192d29007cc6841ccc1098f946",
"detected_licenses": [
"MIT"
],
"directory_id": "bd6b96abd9a62f670b122a44de1b41fda14c5a7a",
"extension": "py",
"fi... | 3.140625 | stackv2 | #!/usr/bin/env python
"""
map.py
State Estimation and Analysis for PYthon
Utilities for dealing with basemap plotting. These routnes are simply
abstractions over the existing basemap to make it quicker for generating
basemap plots and figures.
Examples
-------
Assume you have longitude, latitu... | 289 | 33 | 82 | 15 | 2,558 | python | [] | 0 | true | |
2024-11-18T20:48:13.542011+00:00 | 1,674,601,407,000 | f01a69c1d2be58f346efb58855b7e6088d49da87 | 3 | {
"blob_id": "f01a69c1d2be58f346efb58855b7e6088d49da87",
"branch_name": "refs/heads/master",
"committer_date": 1674601407000,
"content_id": "cb44a0184fc301a44348dbc7285f6979f9b4fa39",
"detected_licenses": [
"MIT"
],
"directory_id": "f764986d7c750aee2f657c439f62f66ddd05c5b7",
"extension": "py",
"fi... | 3.03125 | stackv2 | """
Define constant mappings between bit-mask values and understandable quality
flags
"""
from functools import wraps
import pandas as pd
import numpy as np
# The quality_flag field in MySQL is currently limited to 1 << 15;
# fields beyond 1 << 15 will require a change in the MySQL datatype
# for the quality_flag c... | 348 | 33.26 | 79 | 18 | 2,682 | python | [] | 0 | true | |
2024-11-18T20:48:13.596084+00:00 | 1,424,647,626,000 | 62d70e62b64c8bb10293f882a708821a41bae031 | 3 | {
"blob_id": "62d70e62b64c8bb10293f882a708821a41bae031",
"branch_name": "refs/heads/master",
"committer_date": 1424647626000,
"content_id": "af45f5449efa65f345dfa62ba02a5fa7e103fa53",
"detected_licenses": [
"MIT"
],
"directory_id": "0678e7175225b00a6e71eb352f869284e63af85c",
"extension": "py",
"fi... | 2.59375 | stackv2 | '''
Created on 04.02.2012
@author: arturh
'''
import timeit
import os
from time import time
os.chdir("src")
problems = [
"Multiples of 3 and 5",
"Even Fibonacci numbers",
"Largest prime factor",
"Largest palindrome product",
"Smallest multiple",
"Sum square difference",
"10001st prime",
... | 172 | 24.8 | 108 | 19 | 1,239 | python | [] | 0 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.