max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 117 | max_stars_count int64 0 95.2k | id stringlengths 1 7 | content stringlengths 12 593k | input_ids listlengths 7 549k |
|---|---|---|---|---|---|
python/dataproc_templates/util/argument_parsing.py | samkenxstream/dataproc-templates | 15 | 136805 | <reponame>samkenxstream/dataproc-templates<filename>python/dataproc_templates/util/argument_parsing.py
# Copyright 2022 Google 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
#
# https://... | [
1,
529,
276,
1112,
420,
29958,
13445,
1717,
29916,
5461,
29914,
4130,
481,
10198,
29899,
20943,
29966,
9507,
29958,
4691,
29914,
4130,
481,
10198,
29918,
20943,
29914,
4422,
29914,
23516,
29918,
862,
2976,
29889,
2272,
13,
29937,
14187,
126... |
solutions/77.py | pacokwon/leetcode | 2 | 74412 | # Combinations
class Solution:
def combine(self, n, k):
ans = []
def helper(choices, start, count, ans):
if count == k:
# cloning the list here
ans.append(list(choices))
return
for i in range(start, n + 1):
ch... | [
1,
396,
422,
2109,
800,
13,
13,
1990,
24380,
29901,
13,
1678,
822,
14405,
29898,
1311,
29892,
302,
29892,
413,
1125,
13,
4706,
6063,
353,
5159,
13,
13,
4706,
822,
16876,
29898,
1859,
1575,
29892,
1369,
29892,
2302,
29892,
6063,
1125,
... |
demo.py | jjegg01/abp.spherical2d.pairdistribution | 0 | 24504 | <filename>demo.py<gh_stars>0
#!/usb/bin/env python3
"""Demo script for abp.spherical2d.pairdistribution module."""
__author__ = "<NAME>, <NAME>"
__copyright__ = "Copyright (C) 2019 <NAME>, <NAME>"
__license__ = "MIT"
__version__ = "1.0"
import argparse
import numpy as np
import matplotlib.pyplot as plt
from matplot... | [
1,
529,
9507,
29958,
17482,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
28685,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
15945,
29908,
23444,
2471,
363,
633,
29886,
29889,
29879,
8096,
936,
29906,
29881... |
contact/urls.py | BobsProgrammingAcademy/Portfolio-Website-Deployment | 0 | 28447 | from django.urls import path
from .views import ContactListView
urlpatterns = [
path('', ContactListView.as_view()),
] | [
1,
515,
9557,
29889,
26045,
1053,
2224,
13,
3166,
869,
7406,
1053,
22387,
15660,
13,
13,
2271,
11037,
29879,
353,
518,
13,
1678,
2224,
877,
742,
22387,
15660,
29889,
294,
29918,
1493,
25739,
13,
29962,
2
] |
difPy/dif.py | ppizarror/Duplicate-Image-Finder | 0 | 20390 | import skimage.color
import matplotlib.pyplot as plt
import numpy as np
import cv2
import os
import imghdr
import time
"""
Duplicate Image Finder (DIF): function that searches a given directory for images and finds duplicate/similar images among them.
Outputs the number of found duplicate/similar image pairs with a l... | [
1,
1053,
2071,
3027,
29889,
2780,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
5215,
13850,
29906,
13,
5215,
2897,
13,
5215,
10153,
29882,
7707,
13,
5215,
931,
13,
13,
15945,
29908,
29871,
13,
29928,
... |
thermof/cli/__init__.py | pzarabadip/thermof | 0 | 1617679 | <reponame>pzarabadip/thermof
"""
Thermof command line interface.
"""
| [
1,
529,
276,
1112,
420,
29958,
29886,
26687,
20143,
666,
29914,
721,
29885,
974,
13,
15945,
29908,
13,
1349,
837,
974,
1899,
1196,
5067,
29889,
13,
15945,
29908,
13,
2
] |
clientlib/utils.py | mesakh123/carla-client | 1 | 90872 | import os
import shutil
from pathlib import Path
def make_dirs(path, clean=True):
if clean and os.path.exists(path):
shutil.rmtree(path)
try:
os.makedirs(path, exist_ok=True)
except FileNotFoundError:
return None
return Path(path) | [
1,
1053,
2897,
13,
5215,
528,
4422,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
1753,
1207,
29918,
3972,
29879,
29898,
2084,
29892,
5941,
29922,
5574,
1125,
13,
1678,
565,
5941,
322,
2897,
29889,
2084,
29889,
9933,
29898,
2084,
1125,
13,... |
config/urls.py | Gabospa/MelodyRest | 0 | 107395 | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path
urlpatterns = [
# Django Admin
path(settings.ADMIN_URL, admin.site.urls),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
| [
1,
515,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
5527,
29889,
26045,
29889,
7959,
1053,
2294,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
3166,
9557,
29889,
26045,
1053,
2224,
13,
13,
2271,
11037,
29879,
353,
518,
13,
167... |
mastiff/plugins/analysis/EXE/EXE-singlestring.py | tt1379/mastiff | 164 | 29245 | #!/usr/bin/env python
"""
Copyright 2012-2013 The MASTIFF Project, All Rights Reserved.
This software, having been partly or wholly developed and/or
sponsored by KoreLogic, Inc., is hereby released under the terms
and conditions set forth in the project's "README.LICENSE" file.
For a list of all contributors... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
13,
29871,
14187,
1266,
29871,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29896,
29941,
450,
14861,
1254,
29902,
4198,
8010,
29892,
2178,
26863,
2538,
9841,
29889,
13,
... |
homework/spiny.py | badateverything/python-projects-for-school | 0 | 170415 | <gh_stars>0
import turtle as trtl
trtl.bgcolor("Black")
trtl.pensize(2)
trtl.speed(0)
for i in range(6):
for colors in ["Red", "Green", "Blue", "Purple", ]:
trtl.color(colors)
trtl.circle(100000)
trtl.left(10)
wn = trtl.Screen()
wn.mainloop()
trtl.hideturtle() | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
260,
4227,
280,
408,
534,
15206,
13,
13,
509,
15206,
29889,
16264,
2780,
703,
18700,
1159,
13,
509,
15206,
29889,
29886,
575,
675,
29898,
29906,
29897,
13,
509,
15206,
29889,
1932... |
test/lexer_test.py | ThomasBollmeier/hackeme-native | 0 | 56190 | <reponame>ThomasBollmeier/hackeme-native
import sys
import unittest
sys.path.insert(0, "../src")
from hackeme.frontend.hackeme_parser import HackemeParser
from komparse.scanner import Scanner
from komparse.char_stream import StringStream
class LexerTest(unittest.TestCase):
def setUp(self):
... | [
1,
529,
276,
1112,
420,
29958,
1349,
18902,
29933,
3028,
1004,
631,
29914,
29882,
547,
2004,
29899,
11487,
13,
5215,
10876,
13,
5215,
443,
27958,
13,
13,
9675,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
376,
6995,
4351,
1159,
13,
13... |
rl/envs.py | wing3s/pysc2-rl-mini | 25 | 79938 | import yaml
import numpy as np
from os import path
from absl import flags
from pysc2.env import sc2_env
from pysc2.lib import features
from pysc2.lib import actions
sc2_f_path = path.abspath(path.join(path.dirname(__file__), "..", "configs", "sc2_config.yml"))
with open(sc2_f_path, 'r') as ymlfile:
sc2_cfg = yam... | [
1,
1053,
343,
8807,
13,
5215,
12655,
408,
7442,
13,
3166,
2897,
1053,
2224,
13,
3166,
633,
2536,
1053,
13449,
13,
13,
3166,
282,
952,
29883,
29906,
29889,
6272,
1053,
885,
29906,
29918,
6272,
13,
3166,
282,
952,
29883,
29906,
29889,
1... |
users/views.py | alcibiadesBustillo/twitter_clone | 0 | 198513 | <gh_stars>0
from django.shortcuts import render, redirect
# Create your views here.
from .forms import UserRegisterForm, UserUpdateForm, ProfileUpadteForm
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
def register(request):
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
29892,
6684,
13,
13,
29937,
6204,
596,
8386,
1244,
29889,
13,
3166,
869,
9514,
1053,
4911,
15213,
2500,
29892,
4911,
6422,
2500,
29892,
... |
arklibpy/database/ArkDBSQLite.py | fangzhouwang/ArkLibPy | 0 | 124060 | #!/usr/bin/env python3
# Extended from bwDB - CRUD library for sqlite 3 by <NAME> [http://bw.org/]
import sqlite3
import os
__version__ = '1.0.1'
class ArkDBSQLite:
kQUERY_PARAM_PLACE_HOLDER = '?'
def __init__(self, **kwargs):
"""
db = ArkDBSQLite ( [ table = ''] [, filename = ''] )
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
29937,
7338,
2760,
515,
289,
29893,
4051,
448,
15600,
15789,
3489,
363,
21120,
29871,
29941,
491,
529,
5813,
29958,
518,
1124,
597,
29890,
29893,
29889,
990,
29914,
29962,
13,... |
python/src/nnabla/utils/converter/supported_info.py | daniel-falk/nnabla | 2,792 | 151467 | # Copyright 2018,2019,2020,2021 Sony 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 a... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
29892,
29906,
29900,
29896,
29929,
29892,
29906,
29900,
29906,
29900,
29892,
29906,
29900,
29906,
29896,
28465,
15025,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
... |
todo/models.py | arthtyagi/gettit | 6 | 162536 | <reponame>arthtyagi/gettit
from django.db import models
from django.urls import reverse
from django.contrib.auth.models import User
class Todo(models.Model):
title = models.CharField(max_length=30)
user = models.ForeignKey(User, on_delete=models.CASCADE)
content= models.CharField(max_length=450,blank=True)
created... | [
1,
529,
276,
1112,
420,
29958,
28696,
1017,
17698,
29914,
657,
23545,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
26045,
1053,
11837,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
4911,
13,
13,
1990,
... |
src/Selenium2Library/__init__.py | tanggai/robotframework_selenium2library | 2 | 71177 | <filename>src/Selenium2Library/__init__.py
import os
from keywords import *
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
execfile(os.path.join(THIS_DIR, 'version.py'))
__version__ = VERSION
class Selenium2Library(
_LoggingKeywords,
_RunOnFailureKeywords,
_BrowserManagementKeywords, ... | [
1,
529,
9507,
29958,
4351,
29914,
29903,
13462,
29906,
12284,
29914,
1649,
2344,
26914,
2272,
13,
5215,
2897,
30004,
13,
3166,
29361,
1053,
334,
30004,
13,
30004,
13,
4690,
3235,
29918,
9464,
353,
2897,
29889,
2084,
29889,
25721,
29898,
3... |
tb_houston_service/application_deployment.py | tranquilitybase-io/tb-houston-service | 1 | 175169 | import json
import logging
import os
import time
from pprint import pformat
import requests
from flask import abort, make_response
from config import db, executor
from config.db_lib import db_session
from models import (
Activator,
ActivatorMetadata,
ActivatorMetadataVariable,
Applicati... | [
1,
1053,
4390,
30004,
13,
5215,
12183,
30004,
13,
5215,
2897,
30004,
13,
5215,
931,
30004,
13,
3166,
282,
2158,
1053,
282,
4830,
30004,
13,
30004,
13,
5215,
7274,
30004,
13,
3166,
29784,
1053,
27450,
29892,
1207,
29918,
5327,
30004,
13,... |
crypt/utils/number_theory_algs.py | 5x/cryptography-gui-app | 1 | 1612072 | # Extended Greatest Common Divisor
def extended_gcd(a, b):
a, b = abs(a), abs(b)
A, B, C, D = 1, 0, 0, 1
while b != 0:
q, r = divmod(a, b)
x = A - (q * C)
y = B - (q * D)
a, b, A, C, B, D = b, r, C, x, D, y
return a, A, B
if __name__ == "__main__":
print(extended_... | [
1,
396,
7338,
2760,
7027,
342,
13103,
4910,
275,
272,
13,
1753,
10410,
29918,
29887,
2252,
29898,
29874,
29892,
289,
1125,
13,
1678,
263,
29892,
289,
353,
6425,
29898,
29874,
511,
6425,
29898,
29890,
29897,
13,
1678,
319,
29892,
350,
29... |
main.py | Guest0x0/ipudp | 0 | 113460 |
import sys
import signal
import os
import subprocess
import selectors
import importlib
logger = importlib.import_module("logger")
tun = importlib.import_module("tun")
crypto = importlib.import_module("crypto")
udp = importlib.import_module("udp")
tun_name = ""
mode = None
addr = None
key = None
auth_msg = b"Infini... | [
1,
29871,
13,
5215,
10876,
13,
5215,
7182,
13,
5215,
2897,
13,
5215,
1014,
5014,
13,
5215,
1831,
943,
13,
13,
5215,
1053,
1982,
13,
21707,
353,
1053,
1982,
29889,
5215,
29918,
5453,
703,
21707,
1159,
13,
29873,
348,
353,
1053,
1982,
... |
PythonLearning/v0024.py | JoaoG10110/Python | 0 | 187459 | a = int(input('Digite o primeiro número: '))
b = int(input('Digite o segundo número: '))
c = int(input('Digite o terceiro número: '))
menor = a
if b<a and b<c:
menor = b
if c<a and c<b:
menor = c
maior = a
if b>a and b>c:
maior = b
if c>a and c>b:
maior = c
print(f'O maior valor é {maior}.')
print(f'O menor valor é... | [
1,
263,
353,
938,
29898,
2080,
877,
14991,
568,
288,
19695,
13831,
29901,
525,
876,
13,
29890,
353,
938,
29898,
2080,
877,
14991,
568,
288,
14729,
13831,
29901,
525,
876,
13,
29883,
353,
938,
29898,
2080,
877,
14991,
568,
288,
1935,
3... |
test.py | CiscoBoschetti/PyGame-Learning-Environment | 0 | 140162 | from ple import PLE
from ple.games.pong import Pong
import pygame
import time
import sys
game = Pong(width=300, height=200)
p = PLE(game, fps=30, display_screen=True, force_fps=True)
p.init()
print(p.getActionSet())
nb_frames = 1000
action = None
for f in range(nb_frames):
if p.game_over():
p.reset_gam... | [
1,
515,
5644,
1053,
349,
1307,
13,
3166,
5644,
29889,
29887,
1280,
29889,
29886,
549,
1053,
349,
549,
13,
5215,
22028,
13,
5215,
931,
13,
5215,
10876,
13,
13,
11802,
353,
349,
549,
29898,
2103,
29922,
29941,
29900,
29900,
29892,
3171,
... |
string/komand_string/actions/upper/schema.py | xhennessy-r7/insightconnect-plugins | 0 | 80217 | <gh_stars>0
# GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Input:
STRING = "string"
class Output:
UPPER = "upper"
class UpperInput(komand.Input):
schema = json.loads("""
{
"type": "object",
"title": "Variables",
"properties": {
"string": {
"type": "s... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
402,
1430,
1001,
3040,
29928,
6770,
476,
29949,
1529,
2797,
12967,
448,
11662,
6058,
11488,
13,
5215,
4677,
392,
13,
5215,
4390,
13,
13,
13,
1990,
10567,
29901,
13,
1678,
29486,
... |
mitorch/datasets/image_dataset.py | shonohs/mitorch | 0 | 149362 | <gh_stars>0
import os
import pathlib
import zipfile
import PIL.Image
class ImageDataset:
def __init__(self, filename, transform):
filepath = pathlib.Path(filename)
self.transform = transform
self.images = []
self.base_dir = filepath.parent
self.reader = FileReader(self.base... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2897,
13,
5215,
2224,
1982,
13,
5215,
14319,
1445,
13,
5215,
349,
6227,
29889,
2940,
13,
13,
13,
1990,
7084,
16390,
24541,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
... |
modules/courses/courses.py | ehiller/mobilecsp-v18 | 0 | 3621 | <reponame>ehiller/mobilecsp-v18<filename>modules/courses/courses.py
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apach... | [
1,
529,
276,
1112,
420,
29958,
14797,
5495,
29914,
16769,
29883,
1028,
29899,
29894,
29896,
29947,
29966,
9507,
29958,
7576,
29914,
29883,
29781,
29914,
29883,
29781,
29889,
2272,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29906,
508... |
scripts/study_case/ID_13/torch_geometric/transforms/face_to_edge.py | kzbnb/numerical_bugs | 8 | 132269 | import torch
from scripts.study_case.ID_13.torch_geometric.utils import to_undirected
class FaceToEdge(object):
def __call__(self, data):
face = data.face
edge_index = torch.cat([face[:2], face[1:], face[::2]], dim=1)
edge_index = to_undirected(edge_index, num_nodes=data.num_nodes)
... | [
1,
1053,
4842,
305,
13,
3166,
12078,
29889,
18082,
29891,
29918,
4878,
29889,
1367,
29918,
29896,
29941,
29889,
7345,
305,
29918,
479,
14066,
29889,
13239,
1053,
304,
29918,
870,
1088,
287,
13,
13,
13,
1990,
10635,
1762,
23894,
29898,
331... |
lib/position.py | ArcosJuan/Get-out-of-my-fucking-maze | 2 | 190626 | <reponame>ArcosJuan/Get-out-of-my-fucking-maze<filename>lib/position.py
class Position:
""" Coordanates system that uses an 'y' and 'x' notation
to represent unequivocally a specific location that goes
universally for every object.
"""
__slots__ = ('y', 'x')
@staticmethod
def c... | [
1,
529,
276,
1112,
420,
29958,
1433,
3944,
29967,
12323,
29914,
2577,
29899,
449,
29899,
974,
29899,
1357,
29899,
29888,
2707,
292,
29899,
655,
911,
29966,
9507,
29958,
1982,
29914,
3283,
29889,
2272,
13,
13,
13,
1990,
20627,
29901,
13,
... |
cfy/server.py | buhanec/cloudify-flexiant-plugin | 0 | 10827 | # coding=UTF-8
"""Server stuff."""
from __future__ import print_function
from cfy import (create_server,
create_ssh_key,
attach_ssh_key,
wait_for_state,
wait_for_cond,
create_nic,
attach_nic,
get_res... | [
1,
396,
14137,
29922,
10496,
29899,
29947,
13,
13,
15945,
29908,
6004,
6433,
1213,
15945,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
3166,
274,
29888,
29891,
1053,
313,
3258,
29918,
2974,
29892,
13,
462,
1653,
2... |
dialogos/templatetags/dialogos_tags.py | geosolutions-it/geonode-dialogos | 0 | 133645 | from django import template
from django.core.urlresolvers import reverse
from django.contrib.contenttypes.models import ContentType
from dialogos.authorization import load_can_delete, load_can_edit
from dialogos.forms import CommentForm
from dialogos.models import Comment
can_delete = load_can_delete()
can_edit = l... | [
1,
515,
9557,
1053,
4472,
13,
3166,
9557,
29889,
3221,
29889,
2271,
9778,
874,
1053,
11837,
13,
13,
3166,
9557,
29889,
21570,
29889,
3051,
8768,
29889,
9794,
1053,
10576,
1542,
13,
13,
3166,
7928,
359,
29889,
8921,
2133,
1053,
2254,
299... |
python/tests/test_client.py | liaoyustudent/antchain-openapi-util-sdk | 0 | 49553 | <reponame>liaoyustudent/antchain-openapi-util-sdk
import unittest
from antchain_alipay_util.client import Client
class TestClient(unittest.TestCase):
def test_get_timestamp(self):
timestamp = Client.get_timestamp()
self.assertEqual(20, len(timestamp))
def test_has_error(self):
... | [
1,
529,
276,
1112,
420,
29958,
4456,
12602,
504,
10385,
29914,
424,
14153,
29899,
3150,
2754,
29899,
4422,
29899,
15348,
13,
5215,
443,
27958,
30004,
13,
3166,
3677,
14153,
29918,
284,
666,
388,
29918,
4422,
29889,
4645,
1053,
12477,
3000... |
net_ip_config.py | musaibnazir/IPnDNS | 0 | 62051 | <reponame>musaibnazir/IPnDNS
#!/usr/bin/env python
import ipaddress as ip
CLASS_C_ADDR = '192.168.0.0'
if __name__ == '__main__':
not_configed = True
while not_configed:
prefix = input("Enter the prefixlen (24-30): ")
prefix = int(prefix)
if prefix not in range(23, 31):
raise... | [
1,
529,
276,
1112,
420,
29958,
8366,
29874,
747,
29876,
834,
381,
29914,
5690,
29876,
29928,
3059,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
10377,
7328,
408,
10377,
13,
13875,
1799,
29918,
29907,
29918,
3035,
8353... |
terminal.py | JetStarBlues/Intel-8080-Emulator | 4 | 44888 | <gh_stars>1-10
# ========================================================================================
#
# Description:
#
# Simple Terminal Emulator
#
# Interface:
# Input -> keyboard
# Output -> screen
#
# Attribution:
#
# Code by www.jk-quantized.com
#
# Redistribution and use of t... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
1275,
9166,
9166,
9166,
9166,
9166,
2751,
1360,
13,
29937,
29871,
13,
29937,
29871,
12953,
29901,
13,
29937,
29871,
13,
29937,
268,
12545,
29175,
2812,
9183,
1... |
hackerrank/queues-and-stacks/min_max_riddle.py | peoplenarthax/code-challenges | 0 | 70113 | <reponame>peoplenarthax/code-challenges<gh_stars>0
#!/bin/python3
import math
import os
import random
import re
import sys
from collections import defaultdict
def riddle(arr):
stack = []
arr.append(0) # Add 0 at the end of the numbers
map_of_minimums=defaultdict(int)
# Identify the largest window a nu... | [
1,
529,
276,
1112,
420,
29958,
412,
459,
2435,
28696,
1165,
29914,
401,
29899,
305,
16047,
267,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
2109,
29914,
4691,
29941,
13,
13,
5215,
5844,
13,
5215,
2897,
13,
5215,
4036... |
server/app/models/Course.py | MozammilKhan/tdsb-project | 12 | 127487 | <filename>server/app/models/Course.py
#!/usr/bin/env python
# coding=utf-8
import datetime
from app.database import DB
class Course(object):
def __init__(self, name, instructor, _id):
self._id = _id
self.name= name
self.instructor = instructor
self.students = []
#add attr... | [
1,
529,
9507,
29958,
2974,
29914,
932,
29914,
9794,
29914,
29907,
10242,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
5215,
12865,
13,
13,
3166,
623,
29889,
9803,
10... |
run.py | MRWWRN/buke | 0 | 184463 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import time, random, hashlib
from flask import Flask, session, request, abort
from apps.admin import admin
app = Flask(__name__)
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16M
app.register_blueprint(admin, url_prefix='/admin')
app.secret_key... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
30004,
13,
29937,
448,
29930,
29899,
14137,
29901,
18351,
29899,
29947,
448,
29930,
29899,
30004,
13,
30004,
13,
5215,
931,
29892,
4036,
29892,
6608,
1982,
30004,
13,
30004,
13,
3166,
... |
NodeGraphQt/widgets/node_graph.py | jchanvfx/bpNodeGraph | 8 | 137589 | <reponame>jchanvfx/bpNodeGraph
from Qt import QtWidgets, QtGui
from NodeGraphQt.constants import (
NodeEnum, ViewerEnum, ViewerNavEnum
)
from NodeGraphQt.widgets.viewer_nav import NodeNavigationWidget
class NodeGraphWidget(QtWidgets.QTabWidget):
def __init__(self, parent=None):
super(NodeGraphWidge... | [
1,
529,
276,
1112,
420,
29958,
29926,
5083,
29894,
11093,
29914,
25288,
4247,
9527,
13,
3166,
14705,
1053,
14705,
8801,
29879,
29892,
14705,
28707,
13,
13,
3166,
9071,
9527,
17303,
29889,
3075,
1934,
1053,
313,
13,
1678,
9071,
16854,
2989... |
gs1/compress/extract_from_element_strings.py | TrustCodes/gs1-compression | 3 | 117321 | import re
import logging
import traceback
from gs1.utils import AI_BY_LENGTH
from gs1.constants import REGEX_ROUND_BRACKETS, REGEX_BRACKETED
from gs1.constants import AI_REGEX
from gs1.constants import FIXED_LENGTH_TABLE
logger = logging.getLogger('__name__')
def extract_from_element_strings(element_strings: str):
... | [
1,
1053,
337,
13,
5215,
12183,
13,
5215,
9637,
1627,
13,
13,
3166,
330,
29879,
29896,
29889,
13239,
1053,
319,
29902,
29918,
22716,
29918,
19433,
13,
3166,
330,
29879,
29896,
29889,
3075,
1934,
1053,
5195,
1692,
29990,
29918,
1672,
18783,... |
Cartwheel/lib/Python26/Lib/site-packages/wx-2.8-msw-unicode/wx/lib/filebrowsebutton.py | MontyThibault/centre-of-mass-awareness | 27 | 8902 | #----------------------------------------------------------------------
# Name: wxPython.lib.filebrowsebutton
# Purpose: Composite controls that provide a Browse button next to
# either a wxTextCtrl or a wxComboBox. The Browse button
# launches a wxFileDialog and loads the result i... | [
1,
396,
2683,
2683,
2683,
2683,
22158,
13,
29937,
4408,
29901,
4706,
26437,
11980,
29889,
1982,
29889,
1445,
23721,
344,
3092,
13,
29937,
15247,
4220,
29901,
268,
24497,
568,
11761,
393,
3867,
263,
22415,
344,
2826,
2446,
304,
13,
29937,
... |
python/tests/test_random.py | mbp28/ecole | 234 | 149997 | <gh_stars>100-1000
import copy
import pickle
import ecole
def test_RandomEngine():
"""Test bindings of the RandomEngine."""
assert ecole.RandomEngine.min_seed < ecole.RandomEngine.max_seed
random_engine = ecole.RandomEngine(42)
rand_val_1 = random_engine()
assert isinstance(rand_val_1, int)
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
5215,
3509,
13,
5215,
5839,
280,
13,
13,
5215,
321,
10936,
13,
13,
13,
1753,
1243,
29918,
17875,
12412,
7295,
13,
1678,
9995,
3057,
7868... |
locale/pot/api/utilities/_autosummary/pyvista-Disc-1.py | tkoyama010/pyvista-doc-translations | 4 | 32534 | <reponame>tkoyama010/pyvista-doc-translations
# Create a disc with 50 points in the circumferential direction.
#
import pyvista
mesh = pyvista.Disc(c_res=50)
mesh.plot(show_edges=True, line_width=5)
| [
1,
529,
276,
1112,
420,
29958,
29873,
2901,
29891,
3304,
29900,
29896,
29900,
29914,
2272,
29894,
2079,
29899,
1514,
29899,
3286,
29880,
800,
13,
29937,
6204,
263,
2313,
411,
29871,
29945,
29900,
3291,
297,
278,
9942,
571,
2556,
5305,
298... |
praetorian_api_client/resources/service.py | Praetorian-Defence/praetorian-api-client | 0 | 150989 | from dataclasses import dataclass
from typing import List
from uuid import UUID
from praetorian_api_client.resources.base import BaseResource
class ServiceResource(BaseResource):
@dataclass
class Service(object):
id: UUID
name: str
type: str
variables: dict
def list(self,... | [
1,
515,
848,
13203,
1053,
848,
1990,
13,
3166,
19229,
1053,
2391,
13,
3166,
318,
5416,
1053,
501,
11150,
13,
13,
3166,
7213,
300,
272,
713,
29918,
2754,
29918,
4645,
29889,
13237,
29889,
3188,
1053,
7399,
6848,
13,
13,
13,
1990,
6692,... |
ferminet/utils/system.py | shishaochen/ferminet | 469 | 24304 | <reponame>shishaochen/ferminet
# Lint as: python3
# Copyright 2020 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
#
# https://www.apac... | [
1,
529,
276,
1112,
420,
29958,
845,
728,
6241,
2724,
29914,
571,
1195,
300,
13,
29937,
365,
524,
408,
29901,
3017,
29941,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
21784,
29924,
513,
8364,
11763,
28873,
29889,
2178,
26863... |
weekly/lambdas/copy-file-to-public-bucket/copy_file_to_public_bucket.py | visual-ds/cities-reports | 0 | 132456 | import json
import boto3
from urllib import parse
s3 = boto3.client('s3')
def get_target_key(source_key):
### defining file key (prefix + filename)
city, year, month, day, query = ['']*5
for s in source_key.split('/'):
city = s if 'city' in s else city
year = s if 'year' in s else ye... | [
1,
1053,
4390,
13,
5215,
29871,
289,
3747,
29941,
13,
3166,
3142,
1982,
1053,
6088,
13,
13,
29879,
29941,
353,
289,
3747,
29941,
29889,
4645,
877,
29879,
29941,
1495,
13,
13,
1753,
679,
29918,
5182,
29918,
1989,
29898,
4993,
29918,
1989... |
dex-net/src/dexnet/database/keys.py | peter0749/PointNetGPD | 193 | 86996 | <gh_stars>100-1000
# -*- coding: utf-8 -*-
"""
Copyright ©2017. The Regents of the University of California (Regents). All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its documentation for educational,
research, and not-for-profit purposes, without fee and without a signed licensi... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
11882,
1266,
29871,
30211,
29906,
29900,... |
bke/bke_client/forms.py | Ntermast/BKE | 0 | 53058 | <reponame>Ntermast/BKE<filename>bke/bke_client/forms.py
from django import forms
from django.core.validators import FileExtensionValidator
from .models import Channel, Podcast
class ChannelForm(forms.ModelForm):
image = forms.ImageField(required=True)
class Meta:
model = Channel
fields = ('im... | [
1,
529,
276,
1112,
420,
29958,
29940,
8489,
579,
29914,
29933,
6059,
29966,
9507,
29958,
29890,
446,
29914,
29890,
446,
29918,
4645,
29914,
9514,
29889,
2272,
13,
3166,
9557,
1053,
7190,
13,
3166,
9557,
29889,
3221,
29889,
3084,
4097,
105... |
cen/models/__init__.py | slabbaki/discriminative-subtyping | 1 | 125651 | <gh_stars>1-10
from . import baseline
from . import cen
from . import moe
def get(name, **kwargs):
if name == "baseline":
build_model = baseline.build_model
elif name == "cen":
build_model = cen.build_model
elif name == "moe":
build_model = moe.build_model
else:
raise V... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
869,
1053,
2362,
5570,
13,
3166,
869,
1053,
274,
264,
13,
3166,
869,
1053,
2730,
29872,
13,
13,
13,
1753,
679,
29898,
978,
29892,
3579,
19290,
1125,
13,
167... |
email_image.py | syncom/emailimg-rpi | 1 | 1613023 | <reponame>syncom/emailimg-rpi
#!/usr/bin/env python
"""Email an image to a prescribed address
This module emails an image file to a pre-configured address
"""
import os
import time
import argparse
import smtplib
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.multipart impo... | [
1,
529,
276,
1112,
420,
29958,
19274,
510,
29914,
5269,
2492,
29899,
29878,
1631,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
15945,
29908,
9823,
385,
1967,
304,
263,
2225,
23059,
3211,
13,
4013,
3883,
24609,
385,
19... |
gui_login_dialog.py | CharellKing/gobang | 0 | 121640 | #!/usr/bin/python
#-*-coding:utf-8-*-
import wx
import gettext
#nickname对话框
class NicknameDlg(wx.Dialog):
nickname = None
def __init__(self, *args, **kwds):
# begin wxGlade: LoginDlg.__init__
kwds["style"] = wx.RESIZE_BORDER | wx.CLOSE_BOX | wx.THICK_FRAME
wx.Dialog.__init__(self, *a... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
29937,
29899,
29930,
29899,
29883,
3689,
29901,
9420,
29899,
29947,
29899,
29930,
29899,
13,
13,
13,
5215,
26437,
13,
13,
5215,
679,
726,
13,
13,
29937,
19254,
978,
30783,
31852,
233,
164,
1... |
member/views.py | xyhlinx/Manta | 0 | 75385 | <filename>member/views.py<gh_stars>0
import random
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework.response import Response
from rest_framework.generics import ListAPIView, CreateAPIView, RetrieveAPIView, DestroyAPIView
from member.models import Tag
from member.serializer import TagDe... | [
1,
529,
9507,
29958,
14242,
29914,
7406,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4036,
13,
13,
3166,
9557,
29918,
26705,
29889,
5060,
29918,
4468,
1053,
15337,
5072,
5841,
355,
13,
3166,
1791,
29918,
4468,
298... |
docs/p3/setup.py | khchine5/atelier | 1 | 30130 | from setuptools import setup
if __name__ == '__main__':
setup(name='foo', version='1.0.0')
| [
1,
515,
731,
21245,
8789,
1053,
6230,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
6230,
29898,
978,
2433,
5431,
742,
1873,
2433,
29896,
29889,
29900,
29889,
29900,
1495,
13,
13,
2
] |
example/test/L11_danmu_dong_ide.py | Michael8968/skulpt | 2 | 69759 | import pygame
from pygame.locals import *
import random
import time
pygame.init()
bac = pygame.image.load('lesson11/bac1.png')
screen = pygame.display.set_mode((800, 600))
dd=0
bac = []
font = pygame.font.Font('simhei.ttf', 40)
str1 = '666社会社会大吉大利今晚吃鸡嘤嘤嘤'
str2=font.render(str1, True, (200,200,0))
print(type(str2))
... | [
1,
1053,
22028,
13,
3166,
22028,
29889,
2997,
29879,
1053,
334,
13,
5215,
4036,
13,
5215,
931,
13,
13,
13,
2272,
11802,
29889,
2344,
580,
13,
29890,
562,
353,
22028,
29889,
3027,
29889,
1359,
877,
2222,
265,
29896,
29896,
29914,
29890,
... |
helita/sim/preft.py | jumasy/helita | 0 | 160799 | <filename>helita/sim/preft.py
import os
import numpy as np
import scipy.constants as ct
from scipy.io import readsav
#import radynpy as rd
from .load_quantities import *
from .load_arithmetic_quantities import *
from .tools import *
from .load_noeos_quantities import *
from math import ceil, floor
from scipy.sparse im... | [
1,
529,
9507,
29958,
3952,
2028,
29914,
3601,
29914,
1457,
615,
29889,
2272,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
5215,
4560,
2272,
29889,
3075,
1934,
408,
274,
29873,
13,
3166,
4560,
2272,
29889,
601,
1053,
13623,
485,
13,
... |
src/backend/common/models/notifications/tests/notification_test.py | bovlb/the-blue-alliance | 0 | 130477 | import pytest
from firebase_admin import messaging
from backend.common.consts.fcm.platform_priority import PlatformPriority
from backend.common.models.fcm.platform_config import PlatformConfig
from backend.common.models.notifications.notification import Notification
from backend.common.models.notifications.tests.mocks... | [
1,
1053,
11451,
1688,
13,
3166,
16119,
29918,
6406,
1053,
4473,
6751,
13,
13,
3166,
14998,
29889,
9435,
29889,
3075,
29879,
29889,
29888,
4912,
29889,
12120,
29918,
29886,
21766,
1053,
28096,
29925,
21766,
13,
3166,
14998,
29889,
9435,
2988... |
pylink/report.py | stanford-ssi/pylink | 31 | 137208 | <reponame>stanford-ssi/pylink<gh_stars>10-100
#!/usr/bin/python
import collections
import distutils.sysconfig
import jinja2
import matplotlib.pyplot as plt
import numpy as np
import os
import site
import pylink.utils as utils
class Figure(object):
def __init__(self, title=None):
self.title = title
... | [
1,
529,
276,
1112,
420,
29958,
14411,
4006,
29899,
893,
29875,
29914,
2272,
2324,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
13,
5215,
16250,
13,
... |
pykg2vec/config/hyperparams.py | kyzhouhzau/pykg2vec | 1 | 147480 | """
hyperparams.py
====================================
It provides configuration for the tunable hyper-parameter ranges for all the algorithms.
"""
from argparse import ArgumentParser
from hyperopt import hp
from hyperopt.pyll.base import scope
import numpy as np
class HyperparamterLoader:
def __init__(self):
... | [
1,
9995,
13,
24947,
7529,
29889,
2272,
13,
9166,
9166,
2751,
13,
3112,
8128,
5285,
363,
278,
18515,
519,
11266,
29899,
15501,
20238,
363,
599,
278,
14009,
29889,
13,
15945,
29908,
13,
13,
3166,
1852,
5510,
1053,
23125,
11726,
13,
3166,
... |
test/test_segmentation.py | platybrowser/mobie-python | 1 | 85645 | import json
import os
import subprocess
import unittest
from shutil import rmtree
from sys import platform
import numpy as np
import pandas as pd
from elf.io import open_file
from pybdv.util import get_key
from mobie import add_image
from mobie.validation import validate_source_metadata
from mobie.metadata import rea... | [
1,
1053,
4390,
13,
5215,
2897,
13,
5215,
1014,
5014,
13,
5215,
443,
27958,
13,
3166,
528,
4422,
1053,
364,
4378,
929,
13,
3166,
10876,
1053,
7481,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
13,
3166,
560,
29888... |
pyano2/apps.py | mental689/pyano | 1 | 8019 | from django.apps import AppConfig
class Pyano2Config(AppConfig):
name = 'pyano2'
| [
1,
515,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
13,
1990,
10772,
1562,
29906,
3991,
29898,
2052,
3991,
1125,
13,
1678,
1024,
353,
525,
2272,
1562,
29906,
29915,
13,
2
] |
utils/tools.py | alipay/Pyraformer | 7 | 16626 | <filename>utils/tools.py
from torch.nn.modules import loss
import torch
import numpy as np
def MAE(pred, true):
return np.mean(np.abs(pred-true))
def MSE(pred, true):
return np.mean((pred-true)**2)
def RMSE(pred, true):
return np.sqrt(MSE(pred, true))
def MAPE(pred, true):
return np.mean(np.abs((pr... | [
1,
529,
9507,
29958,
13239,
29914,
8504,
29889,
2272,
13,
3166,
4842,
305,
29889,
15755,
29889,
7576,
1053,
6410,
13,
5215,
4842,
305,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
14861,
29923,
29898,
11965,
29892,
1565,
1125,
13,
1678... |
cowait/tasks/definition.py | ProgHaj/cowait | 0 | 143170 | <filename>cowait/tasks/definition.py<gh_stars>0
from __future__ import annotations
from datetime import datetime, timezone
from marshmallow import Schema, fields, post_load
from ..utils import uuid
def generate_task_id(name: str) -> str:
if '.' in name:
dot = name.rfind('.')
name = name[dot+1:]
... | [
1,
529,
9507,
29958,
20587,
1249,
29914,
20673,
29914,
16553,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
25495,
13,
3166,
12865,
1053,
12865,
29892,
29431,
13,
3166,
1766,
845,
29885,... |
ialgebra/interpreters/interpreter.py | huashen218/pytorch-ialgebra | 2 | 146071 | import torch
import numpy as np
from ialgebra.utils.utils_data import preprocess_fn
from ialgebra.utils.utils_interpreter import resize_postfn, generate_map
device = 'cuda' if torch.cuda.is_available() else 'cpu'
class Interpreter(object):
def __init__(self, pretrained_model=None, dataset=None, target_layer=None... | [
1,
1053,
4842,
305,
13,
5215,
12655,
408,
7442,
13,
3166,
474,
15742,
29889,
13239,
29889,
13239,
29918,
1272,
1053,
758,
5014,
29918,
9144,
13,
3166,
474,
15742,
29889,
13239,
29889,
13239,
29918,
1639,
1457,
357,
1053,
19490,
29918,
249... |
tests/test_ints.py | albatrossen/binarydataclass | 0 | 86411 | from binarydataclass import (
from_bytes,
Uint8,
Uint16,
Uint32,
Uint64,
Int8,
Int16,
Int32,
Int64,
binaryfield,
int_decoder,
)
from dataclasses import dataclass
@dataclass
class PointWithTypes:
a: Uint8
b: Uint16
c: Uint32
d: Uint64
e: Int8
f: Int16... | [
1,
515,
7581,
1272,
1990,
1053,
313,
13,
1678,
515,
29918,
13193,
29892,
13,
1678,
501,
524,
29947,
29892,
13,
1678,
501,
524,
29896,
29953,
29892,
13,
1678,
501,
524,
29941,
29906,
29892,
13,
1678,
501,
524,
29953,
29946,
29892,
13,
... |
mult/multdiv.py | artemkin/sandbox | 0 | 98084 | <reponame>artemkin/sandbox<filename>mult/multdiv.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import random
def input_int(title, f=(lambda x: x)):
while True:
try:
return f(int(raw_input(title + ': ')))
except ValueError:
print('Оши... | [
1,
529,
276,
1112,
420,
29958,
442,
331,
9089,
29914,
29879,
26738,
29966,
9507,
29958,
4713,
29914,
4713,
4563,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
... |
lib/gui/widgets/queue_items/__init__.py | B1d1zyaKa/mff_auto | 1 | 151740 | <filename>lib/gui/widgets/queue_items/__init__.py
import inspect
import sys
import lib.logger as logging
from lib.gui.widgets.queue_items import actions
from lib.gui.widgets.queue_items import events
from lib.gui.widgets.queue_items import missions
from .general import GameMode, Action, Event
logger = logging.get_lo... | [
1,
529,
9507,
29958,
1982,
29914,
23569,
29914,
8030,
29879,
29914,
9990,
29918,
7076,
29914,
1649,
2344,
26914,
2272,
13,
30143,
5215,
16096,
13,
5215,
10876,
13,
13,
5215,
4303,
29889,
21707,
408,
12183,
13,
3166,
4303,
29889,
23569,
29... |
examples/openmdao.examples.enginedesign/openmdao/examples/enginedesign/engine_optimization_smarter.py | JustinSGray/OpenMDAO-Framework | 3 | 1616659 | <filename>examples/openmdao.examples.enginedesign/openmdao/examples/enginedesign/engine_optimization_smarter.py
"""
engine_optimization.py - Top level assembly for the example problem.
"""
# Optimize a Vehicle design with CONMIN
# pylint: disable-msg=E0611,F0401
from openmdao.main.api import Assembly
from openmda... | [
1,
529,
9507,
29958,
19057,
29914,
3150,
29885,
1388,
29877,
29889,
19057,
29889,
996,
1312,
267,
647,
29914,
3150,
29885,
1388,
29877,
29914,
19057,
29914,
996,
1312,
267,
647,
29914,
10599,
29918,
20640,
2133,
29918,
29879,
3034,
357,
298... |
tests/test_asyncio.py | SouvikGhosh05/aioquic | 0 | 129743 | <reponame>SouvikGhosh05/aioquic
import asyncio
import binascii
import contextlib
import random
import socket
from unittest import TestCase, skipIf
from unittest.mock import patch
from cryptography.hazmat.primitives import serialization
from aioquic.asyncio.client import connect
from aioquic.asyncio.protocol import Qu... | [
1,
529,
276,
1112,
420,
29958,
29903,
5128,
638,
29954,
29882,
10578,
29900,
29945,
29914,
29874,
601,
339,
293,
13,
5215,
408,
948,
3934,
13,
5215,
9016,
294,
18869,
13,
5215,
3030,
1982,
13,
5215,
4036,
13,
5215,
9909,
13,
3166,
443... |
python-algorithm/leetcode/problem_228.py | isudox/nerd-algorithm | 5 | 155403 | <reponame>isudox/nerd-algorithm
"""228. Summary Ranges
https://leetcode.com/problems/summary-ranges/
"""
from typing import List
class Solution:
def summaryRanges(self, nums: List[int]) -> List[str]:
if not nums:
return []
ans = []
nums.append(nums[-1] + 2)
n = len(nums... | [
1,
529,
276,
1112,
420,
29958,
275,
566,
2251,
29914,
1089,
29881,
29899,
20567,
13,
15945,
29908,
29906,
29906,
29947,
29889,
6991,
5219,
390,
6916,
13,
991,
597,
280,
300,
401,
29889,
510,
29914,
17199,
29879,
29914,
7727,
29899,
29878,... |
elliot/recommender/neural/NeuMF/tf_custom_sampler_2.py | gategill/elliot | 175 | 44446 | """
Module description:
"""
__version__ = '0.3.1'
__author__ = '<NAME>, <NAME>'
__email__ = '<EMAIL>, <EMAIL>'
import tensorflow as tf
import numpy as np
import random
class Sampler():
def __init__(self, indexed_ratings=None, m=None, num_users=None, num_items=None, transactions=None, batch_size=512, random_seed=... | [
1,
9995,
13,
7355,
6139,
29901,
13,
15945,
29908,
13,
1649,
3259,
1649,
353,
525,
29900,
29889,
29941,
29889,
29896,
29915,
13,
1649,
8921,
1649,
353,
12801,
5813,
10202,
529,
5813,
16299,
13,
1649,
5269,
1649,
353,
12801,
26862,
6227,
... |
setup.py | kageurufu/cfddns-py | 0 | 146113 | from setuptools import setup, find_packages
setup(
name="cfddns",
version="0.1",
packages=['cfddns'],
entry_points={
'console_scripts': ["cfddns = cfddns:main"],
},
install_requires=["cloudflare", "pyyaml"],
)
| [
1,
515,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
13,
14669,
29898,
13,
1678,
1024,
543,
6854,
1289,
1983,
613,
13,
1678,
1873,
543,
29900,
29889,
29896,
613,
13,
1678,
9741,
29922,
1839,
6854,
1289,
1983,
7464,
13,
... |
reservation/urls.py | aryamanak10/diner-restaurant-website | 1 | 1519 | from django.urls import path
from . import views
app_name = 'reservation'
urlpatterns = [
path('', views.reserve_table, name = 'reserve_table'),
] | [
1,
515,
9557,
29889,
26045,
1053,
2224,
13,
3166,
869,
1053,
8386,
13,
13,
932,
29918,
978,
353,
525,
690,
20525,
29915,
13,
13,
2271,
11037,
29879,
353,
518,
13,
1678,
2224,
877,
742,
8386,
29889,
690,
7143,
29918,
2371,
29892,
1024,... |
voithos/lib/migrate/ubuntu.py | breqwatr/voidith | 3 | 1602984 | """ Library for Ubuntu migration operations """
import os
from pathlib import Path
from ipaddress import IPv4Interface
from voithos.lib.system import error, is_mounted, debug, get_file_contents, grep
from voithos.lib.migrate.linux_worker import LinuxWorker
class UbuntuWorker(LinuxWorker):
""" Operate on mounted ... | [
1,
9995,
9538,
363,
8294,
20332,
6931,
9995,
13,
5215,
2897,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
10377,
7328,
1053,
5641,
29894,
29946,
10448,
13,
13,
3166,
992,
389,
359,
29889,
1982,
29889,
5205,
1053,
1059,
29892,
338,
29918... |
p74/solve.py | josephok/ProjectEuler | 0 | 175732 | <filename>p74/solve.py<gh_stars>0
import math
def digit_factorial_chains(n=1000000):
number_of_chains = 0
for i in range(1, n):
if chains_length(i) == 60:
number_of_chains += 1
return number_of_chains
def sum_of_factorial(number):
return sum(math.factorial(int... | [
1,
529,
9507,
29958,
29886,
29955,
29946,
29914,
2929,
345,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
5844,
30004,
13,
30004,
13,
1753,
13615,
29918,
19790,
616,
29918,
305,
2708,
29898,
29876,
29922,
29896,
29900... |
Financial_Eng/binmodels.py | AlexKH22/Finance | 0 | 150836 | import numpy as np
class BinomialModel(object):
def __init__(self, *args):
# black == False. args: S0, u, d, R
# or
# black == True. args: S0, u, d, R, q
self.S0 = args[0]
self.u = args[1]
self.d = args[2]
self.R = args[3]
self.euro = args[5]
... | [
1,
1053,
12655,
408,
7442,
13,
13,
13,
1990,
27662,
7615,
3195,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
334,
5085,
1125,
13,
4706,
396,
4628,
1275,
7700,
29889,
6389,
29901,
317,
29900,
29892,
318,
29892,
270,
... |
tests/backends/test_pyevm.py | vaporyproject/eth-tester | 1 | 73512 | <reponame>vaporyproject/eth-tester<gh_stars>1-10
from __future__ import unicode_literals
import pytest
from eth_utils import to_wei
from eth_tester import EthereumTester, PyEVMBackend
from eth_tester.backends.pyevm.main import (
generate_genesis_state_for_keys,
get_default_account_keys,
get_default_genesi... | [
1,
529,
276,
1112,
420,
29958,
29894,
481,
706,
4836,
29914,
621,
29899,
1688,
261,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
5215,
11451... |
prev_ob_models/KaplanLansner2014/plotting_and_analysis/plot_activity_as_colormap.py | fameshpatel/olfactorybulb | 5 | 1604782 | import os, sys, inspect
# use this if you want to include modules from a subforder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"../")))
if cmd_subfolder not in sys.path:
sys.path.insert(0, cmd_subfolder)
import pylab
import numpy as np
i... | [
1,
1053,
2897,
29892,
10876,
29892,
16096,
13,
29937,
671,
445,
565,
366,
864,
304,
3160,
10585,
515,
263,
1014,
29888,
2098,
13,
9006,
29918,
1491,
12083,
353,
2897,
29889,
2084,
29889,
6370,
2084,
29898,
359,
29889,
2084,
29889,
370,
... |
test/test_modify_user.py | chernenko-art/test_python | 0 | 57687 | <gh_stars>0
# -*- coding: utf-8 -*-
import random
from model.user import User
def test_modify_user_name(app, db, json_users, check_ui):
# check what groups is not empty
if len(db.get_user_list()) == 0:
user = json_users
app.user.create(user)
user = User(firstname="Piter", lastnam... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
5215,
4036,
30004,
13,
3166,
1904,
29889,
1792,
1053,
4911,
30004,
13,
30004,
13,
30004,
13,
175... |
test/common/test_null.py | thatch/BitSwanPump | 17 | 183971 | import bspump.unittest
import bspump.common
class TestNullSink(bspump.unittest.ProcessorTestCase):
def test_null(self):
events = [
(None, "Don't let this out!"),
]
self.set_up_processor(bspump.common.NullSink)
output = self.execute(
events
)
self.assertEqual(
[event for context, event in out... | [
1,
1053,
289,
1028,
3427,
29889,
348,
27958,
13,
5215,
289,
1028,
3427,
29889,
9435,
13,
13,
13,
1990,
4321,
7327,
29903,
682,
29898,
29890,
1028,
3427,
29889,
348,
27958,
29889,
18689,
3057,
8259,
1125,
13,
13,
12,
1753,
1243,
29918,
... |
pyec/distribution/nn/net.py | hypernicon/pyec | 2 | 126706 | """
Copyright (C) 2012 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublice... | [
1,
9995,
13,
11882,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29906,
529,
5813,
29958,
13,
13,
27293,
338,
1244,
1609,
16896,
29892,
3889,
310,
8323,
29892,
304,
738,
2022,
4017,
292,
263,
3509,
310,
445,
7047,
322,
6942,
510... |
dachar/utils/__init__.py | roocs/dachar | 2 | 20445 | <filename>dachar/utils/__init__.py
from .common import *
from .json_store import *
| [
1,
529,
9507,
29958,
29881,
496,
279,
29914,
13239,
29914,
1649,
2344,
26914,
2272,
13,
3166,
869,
9435,
1053,
334,
13,
3166,
869,
3126,
29918,
8899,
1053,
334,
13,
2
] |
monitor/traffic_monitor/views/video_views.py | mcdomx/TrafficMonitor | 0 | 140512 | import logging
import time
import pafy
import cv2
import cvlib as cv
from cvlib.object_detection import draw_bbox, populate_class_labels
import numpy as np
from django.http import StreamingHttpResponse
from traffic_monitor.detectors.detector_cvlib import DetectorCVlib
logger = logging.getLogger('video_models')
logg... | [
1,
1053,
12183,
13,
5215,
931,
13,
13,
5215,
282,
2142,
29891,
13,
5215,
13850,
29906,
13,
5215,
13850,
1982,
408,
13850,
13,
3166,
13850,
1982,
29889,
3318,
29918,
29881,
2650,
428,
1053,
4216,
29918,
29890,
1884,
29892,
19450,
29918,
... |
src/kemokrw/transfer_basic.py | Kemok-Repos/kemokrw | 0 | 53545 | from kemokrw.transfer import Transfer
class BasicTransfer(Transfer):
"""Clase BasicTransfer implementación de la clase Transfer.
Cumple la función de verficar la compatibilidad de los objetos a transferir,
verifica si ambos extremos son "iguales" y transfiere un los atos de una fuente a la otra.
... | [
1,
515,
413,
331,
554,
13975,
29889,
3286,
571,
1053,
17934,
13,
13,
13,
1990,
19219,
4300,
571,
29898,
4300,
571,
1125,
13,
1678,
9995,
6821,
559,
19219,
4300,
571,
2334,
2709,
316,
425,
1067,
559,
17934,
29889,
13,
268,
13,
1678,
... |
patent_part.py | patent-python/patent-generator | 109 | 176457 | import re
def get_pars(text):
pars = re.findall(r'\[[0-9]+\]\n*(.*)', text)
pars = [p.strip() for p in pars]
return pars
def get_claims(text):
claims = re.findall(r'.*claim.*', text, re.IGNORECASE)
return claims
def get_claim_body(text):
match = re.search(r'^claim[s*]$', text, re.IGNORECASE |... | [
1,
1053,
337,
13,
13,
1753,
679,
29918,
862,
29879,
29898,
726,
1125,
13,
1678,
610,
29879,
353,
337,
29889,
2886,
497,
29898,
29878,
12764,
8999,
29900,
29899,
29929,
29962,
3124,
10725,
29876,
16395,
5575,
29897,
742,
1426,
29897,
13,
... |
flytekit/common/tasks/sagemaker/custom_training_job_task.py | tnsetting/flytekit | 0 | 1615269 | <filename>flytekit/common/tasks/sagemaker/custom_training_job_task.py<gh_stars>0
from google.protobuf.json_format import MessageToDict
from flytekit.common.constants import SdkTaskType
from flytekit.common.tasks import sdk_runnable as _sdk_runnable
from flytekit.models.sagemaker import training_job as _training_job_mo... | [
1,
529,
9507,
29958,
17652,
371,
7354,
29914,
9435,
29914,
20673,
29914,
29879,
13904,
5790,
29914,
6341,
29918,
26495,
29918,
9057,
29918,
7662,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
5386,
29889,
17529,
9721,
... |
utils/logger.py | vrindaprabhu/solofy | 0 | 185544 | import logging
from config.solofy import LOGFILENAME
class Logger:
__instance = None
@staticmethod
def get_instance(log_level=logging.info):
if Logger.__instance == None:
Logger(log_level)
return Logger.__instance
def __init__(self, log_level):
self.log_level = lo... | [
1,
1053,
12183,
13,
3166,
2295,
29889,
2929,
974,
29891,
1053,
25401,
7724,
5813,
13,
13,
13,
1990,
28468,
29901,
13,
1678,
4770,
8758,
353,
6213,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
679,
29918,
8758,
29898,
1188,
29918,
556... |
LeetCodeSolutions/LeetCode_0332.py | lih627/python-algorithm-templates | 24 | 1600915 | class Solution:
def findItinerary(self, tickets: List[List[str]]) -> List[str]:
adjacency = collections.defaultdict(list)
for a, b in tickets:
adjacency[a].append(b)
for i in adjacency:
adjacency[i].sort(reverse=True)
res = []
def dfs(cur):
... | [
1,
770,
24380,
29901,
13,
1678,
822,
1284,
3112,
4983,
653,
29898,
1311,
29892,
16892,
1691,
29901,
2391,
29961,
1293,
29961,
710,
24960,
1599,
2391,
29961,
710,
5387,
13,
4706,
12109,
562,
3819,
353,
16250,
29889,
4381,
8977,
29898,
1761... |
guardian/states/ending.py | alisonbnt/watchtower | 1 | 189253 | from .base import *
from colorama import Fore
class EndingState(State):
def run(self, arguments={}):
print()
print_data("This is the end of the journey. You are welcome "
"back at any time in here")
print()
print_data("There will be always creatures in the shado... | [
1,
515,
869,
3188,
1053,
334,
13,
3166,
2927,
3304,
1053,
28297,
13,
13,
13,
1990,
2796,
292,
2792,
29898,
2792,
1125,
13,
13,
1678,
822,
1065,
29898,
1311,
29892,
6273,
3790,
29913,
1125,
13,
4706,
1596,
580,
13,
4706,
1596,
29918,
... |
tests/test_graphql_ws.py | SmileyChris/graphql-ws | 7 | 112130 | from collections import OrderedDict
try:
from unittest import mock
except ImportError:
import mock
import pytest
from graphql.execution.executors.sync import SyncExecutor
from graphql_ws import base, base_sync, constants
@pytest.fixture
def cc():
cc = base.BaseConnectionContext(ws=None)
cc.operatio... | [
1,
515,
16250,
1053,
8170,
287,
21533,
13,
13,
2202,
29901,
13,
1678,
515,
443,
27958,
1053,
11187,
13,
19499,
16032,
2392,
29901,
13,
1678,
1053,
11187,
13,
13,
5215,
11451,
1688,
13,
3166,
3983,
1519,
29889,
22256,
29889,
4258,
29560,... |
core/src/zeit/imp/browser/scale.py | rickdg/vivi | 5 | 159884 | from io import BytesIO
import PIL.Image
import PIL.ImageColor
import PIL.ImageDraw
import zeit.cms.browser.view
import zeit.content.image.interfaces
import zeit.imp.mask
def parse_filter_args(request, crop):
for key, value in request.form.items():
if key.startswith('filter.'):
filter_type = ke... | [
1,
515,
12013,
1053,
2648,
2167,
5971,
13,
5215,
349,
6227,
29889,
2940,
13,
5215,
349,
6227,
29889,
2940,
3306,
13,
5215,
349,
6227,
29889,
2940,
8537,
13,
5215,
29402,
29889,
29883,
1516,
29889,
15965,
29889,
1493,
13,
5215,
29402,
29... |
apps/abstract_models.py | kevingduck/transmission | 19 | 183402 | """
Copyright 2020 ShipChain, Inc.
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, softwar... | [
1,
9995,
13,
11882,
1266,
29871,
29906,
29900,
29906,
29900,
1383,
666,
14688,
29892,
9266,
29889,
13,
13,
29931,
293,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
6... |
UVa 573 - The Snail/sample/main.py | tadvi/uva | 1 | 904 | '''
Created on Jun 18, 2013
@author: <NAME>
All rights reserved.
'''
import time
from multiprocessing.pool import Pool
parallelSolve = False
infinity = 1 << 30
def solve(par):
H, U, D, F = par
day = 0
amountRise = U
currH = 0
while True:
amountRise = U * (1 - 0.01 * F * day)
cur... | [
1,
14550,
13,
20399,
373,
8378,
29871,
29896,
29947,
29892,
29871,
29906,
29900,
29896,
29941,
13,
13,
29992,
8921,
29901,
529,
5813,
29958,
13,
13,
3596,
10462,
21676,
29889,
13,
12008,
13,
13,
5215,
931,
13,
3166,
6674,
307,
985,
292,... |
src/scheduled_task/__init__.py | Sciocatti/python_scheduler_and_clean_forced_exit | 0 | 7471 | from .scheduled_task import ScheduledTask | [
1,
515,
869,
816,
14989,
29918,
7662,
1053,
1102,
14989,
5398,
2
] |
core/config.py | Mustard030/pixiv_download | 1 | 87906 | <gh_stars>1-10
import configparser
import tkinter as tk
import tkinter.filedialog
SETTING_FILE = 'setting.ini'
# 读取配置文件
def read_config(setting_file=SETTING_FILE):
config = configparser.ConfigParser()
config.read(setting_file, encoding='UTF-8')
config_dict = dict()
try:
config_dict = dict(confi... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
2295,
16680,
13,
5215,
18883,
1639,
408,
18883,
13,
5215,
18883,
1639,
29889,
1445,
15901,
13,
13,
10490,
29911,
4214,
29918,
7724,
353,
525,
26740,
29889,
2172... |
news/migrations/0001_squashed_0002_news_send_announce.py | VanirLab/VOS | 0 | 182736 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-11-17 20:55
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29896,
29896,
29889,
29896,
29945,
373,
29871,
29906,
29900,
29896,
29947,
29899,
29896,
29896,
298... |
mne/_hdf5.py | jaeilepp/eggie | 0 | 78839 | # -*- coding: utf-8 -*-
# Authors: <NAME> <<EMAIL>>
#
# License: BSD (3-clause)
import numpy as np
from os import path as op
from .utils import _check_pytables
from .externals.six import string_types, text_type
##############################################################################
# WRITE
def write_hdf5(fn... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
13189,
943,
29901,
529,
5813,
29958,
3532,
26862,
6227,
6778,
13,
29937,
13,
29937,
19245,
29901,
350,
7230,
313,
29941,
29899,
16398,
1509,
29897,
... |
utils/config.py | a1401358759/my_site | 50 | 118511 | import os
# 数据库配置
MYSQL_HOST = os.getenv('MYSQL_HOST', 'localhost')
MYSQL_PORT = os.getenv('MYSQL_PORT', '3306')
MYSQL_DATABASE = os.getenv('MYSQL_DATABASE', 'my-site')
MYSQL_USER = os.getenv('MYSQL_USER', 'admin')
MYSQL_PASSWORD = os.getenv('MYSQL_PASSWORD', '<PASSWORD>')
# redis配置
REDIS_HOST = os.getenv('REDIS_HOS... | [
1,
1053,
2897,
13,
13,
13,
29937,
29871,
30354,
30763,
31700,
31361,
30669,
13,
17870,
4176,
29918,
20832,
353,
2897,
29889,
657,
6272,
877,
17870,
4176,
29918,
20832,
742,
525,
7640,
1495,
13,
17870,
4176,
29918,
15082,
353,
2897,
29889,... |
manager/director/apps/sites/migrations/0009_auto_20191220_0901.py | darius-kia/director4 | 7 | 111135 | # Generated by Django 2.2.8 on 2019-12-20 14:01
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sites', '0008_auto_20191213_0733'),
]
operations = [
migrations.AlterField(
model_name='site',
... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29906,
29889,
29947,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29896,
29906,
29899,
29906,
29900,
29871,
29896,
29946,
29901,
29900,
29896,
13,
13,
5215,
9557,
29889,
3221,
29889,
3084,... |
test/unit_test/controller/test_callback.py | ArnovanHilten/NVFlare | 155 | 140412 | # Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29896,
29899,
29906,
29900,
29906,
29906,
29892,
405,
13044,
10764,
315,
1955,
29925,
1955,
8098,
29889,
29871,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
10413,
21144,... |
photobox/main.py | MarkusAmshove/Photobox | 1 | 168647 | import pygame
import time
import datetime
import os
import Colors
import SwitchState
import random
from photoslideshow import Photoslideshow
class Photobox():
def __init__(self, windowsize, photofolder, camera, switch, cheesepicfolder):
pygame.init()
self.windowsize = windowsize
self.phot... | [
1,
1053,
22028,
13,
5215,
931,
13,
5215,
12865,
13,
5215,
2897,
13,
5215,
29183,
13,
5215,
28176,
2792,
13,
5215,
4036,
13,
3166,
20612,
29880,
2247,
3525,
1053,
1963,
15788,
29880,
2247,
3525,
13,
13,
13,
1990,
19040,
23518,
7295,
13... |
Dj_Learn_start/models.py | Daneev/Django_test | 0 | 135608 | <reponame>Daneev/Django_test<gh_stars>0
# -*- coding: utf-8 -*-
from django.db import models
# Create your models here.
from Apteki.models import Lekarstv
class Post(models.Model):
title = models.CharField(u"Заголовок", max_length=150)
text = models.TextField(u"Текст")
date_create = models.DateTimeField... | [
1,
529,
276,
1112,
420,
29958,
29928,
1662,
5750,
29914,
29928,
5364,
29918,
1688,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
9557,
29889,
2585... |
syllabus/classes/class3/class3-task.py | signekb/NLP-E21 | 0 | 1608252 | <gh_stars>0
#### QUESTIONS ####
#- Best way to use the md file? bc this is not it...
#- Why does "def corpus_loader(folder: str) -> List[str]:" not work for me? - it says "List not defined"
#pip install spacy
# install smaller model
#python -m spacy download en_core_web_sm
#cd NLP-E21/syllabus/classes/class3/
#doc:
# ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
4136,
660,
4462,
1254,
27946,
3191,
13,
29937,
29899,
6407,
982,
304,
671,
278,
22821,
934,
29973,
289,
29883,
445,
338,
451,
372,
856,
13,
29937,
29899,
3750,
947,
376,
1753,
1034,
1... |
Bunnies.py | fatih-iver/Intro-to-Computer-Science-with-Python | 0 | 17213 | <filename>Bunnies.py
# Define a procedure, fibonacci, that takes a natural number as its input, and
# returns the value of that fibonacci number.
# Two Base Cases:
# fibonacci(0) => 0
# fibonacci(1) => 1
# Recursive Case:
# n > 1 : fibonacci(n) => fibonacci(n-1) + fibonacci(n-2)
def fibonacci(n):
... | [
1,
529,
9507,
29958,
29933,
5963,
583,
29889,
2272,
13,
29937,
22402,
263,
8792,
29892,
18755,
265,
21566,
29892,
393,
4893,
263,
5613,
1353,
408,
967,
1881,
29892,
322,
30004,
13,
29937,
3639,
278,
995,
310,
393,
18755,
265,
21566,
135... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.