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 |
|---|---|---|---|---|---|
c3/qiskit/__init__.py | picbeats/c3 | 45 | 1600080 | from .c3_provider import C3Provider # noqa
__version__ = "0.1"
| [
1,
515,
869,
29883,
29941,
29918,
18121,
1053,
315,
29941,
6980,
29871,
396,
694,
25621,
13,
13,
1649,
3259,
1649,
353,
376,
29900,
29889,
29896,
29908,
13,
2
] |
tmac/models.py | Nondairy-Creamer/tmac | 0 | 15798 | <reponame>Nondairy-Creamer/tmac
import numpy as np
import torch
import time
from scipy import optimize
from scipy.stats import norm
import tmac.probability_distributions as tpd
import tmac.fourier as tfo
def tmac_ac(red_np, green_np, optimizer='BFGS', verbose=False, truncate_freq=False):
""" Implementation of the... | [
1,
529,
276,
1112,
420,
29958,
29940,
898,
1466,
29891,
29899,
29907,
1633,
261,
29914,
29873,
8628,
13,
5215,
12655,
408,
7442,
13,
5215,
4842,
305,
13,
5215,
931,
13,
3166,
4560,
2272,
1053,
24656,
13,
3166,
4560,
2272,
29889,
16202,
... |
tests/test_providers/test_cryptographic.py | Shanmugapriya03/mimesis | 1 | 66086 | <gh_stars>1-10
import re
import pytest
from mimesis import Cryptographic
from mimesis.enums import Algorithm
from mimesis.exceptions import NonEnumerableError
from . import patterns
class TestCryptographic(object):
@pytest.fixture
def crypto(self):
return Cryptographic()
def test_str(self, cr... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
337,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
286,
1355,
275,
1053,
315,
4641,
12122,
13,
3166,
286,
1355,
275,
29889,
264,
6762,
1053,
29068,
13,
3166,
286... |
bmsapp/views_api_v2.py | alanmitchell/bmon | 11 | 1603917 | """Version 2.x of the API. Relies on functions in API v1.
"""
import logging
from collections import Counter
import pytz
from django.http import JsonResponse
from dateutil.parser import parse
from django.views.decorators.csrf import csrf_exempt
from bmsapp import models
from bmsapp.data_util import weighted_resample... | [
1,
9995,
6594,
29871,
29906,
29889,
29916,
310,
278,
3450,
29889,
29871,
6376,
583,
373,
3168,
297,
3450,
325,
29896,
29889,
13,
15945,
29908,
13,
5215,
12183,
13,
3166,
16250,
1053,
315,
5336,
13,
13,
5215,
282,
3637,
29920,
13,
3166,
... |
services/dao/AutoScaleSettingDao.py | liujiage/DevOpsK8s | 1 | 80216 | from abc import ABC
from common.StrUtils import isEmpty, isAnyEmpty
from common.TimeUtils import getTimeStr
from services.dao.SqliteDao import SqliteDao
from vo.AutoScaleSettingVO import AutoScaleSettingVO
from vo.LogVO import LogVO
'''
@Author Jiage
@Date 2022-02-09
@Function query auto scale and update scale
'''
... | [
1,
515,
25638,
1053,
16417,
13,
13,
3166,
3619,
29889,
5015,
12177,
1053,
338,
8915,
29892,
338,
10773,
8915,
13,
3166,
3619,
29889,
2481,
12177,
1053,
679,
2481,
5015,
13,
3166,
5786,
29889,
1388,
29877,
29889,
10520,
568,
29928,
6241,
... |
podcast/migrations/0029_auto_20171211_0424.py | richardcornish/django-applepodcast | 7 | 68984 | # Generated by Django 2.0 on 2017-12-11 04:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('podcast', '0028_auto_20171211_0424'),
]
operations = [
migrations.AlterField(
model_name='show',
name='managing_editor... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29900,
373,
29871,
29906,
29900,
29896,
29955,
29899,
29896,
29906,
29899,
29896,
29896,
29871,
29900,
29946,
29901,
29906,
29946,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
29892,
... |
src/fparser/common/tests/test_base_classes.py | sturmianseq/fparser | 33 | 12881 | # -*- coding: utf-8 -*-
##############################################################################
# Copyright (c) 2017 Science and Technology Facilities Council
#
# All rights reserved.
#
# Modifications made as part of the fparser project are distributed
# under the following license:
#
# Redistribution and use i... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29955,
9327,
322,
17968,
14184,
9770,
... |
T14-01/program.py | maa76/SSof-Project1920 | 2 | 1600300 | b = "mars";
a = "vasco";
a = ("hello %s world %s" % a, b)
| [
1,
289,
353,
376,
29885,
1503,
1769,
13,
29874,
353,
376,
4428,
1111,
1769,
13,
29874,
353,
4852,
12199,
1273,
29879,
3186,
1273,
29879,
29908,
1273,
263,
29892,
289,
29897,
13,
2
] |
simple_exercises/profiti/sum_of_two_matrices.py | ilante/programming_immanuela_englander | 0 | 184110 | A=[[1,2, 8], [3, 7,4]]
B=[[5,6, 9], [7,6 ,0]]
c=[]
for i in range(len(A)): #range of len gives me indecesc.
c.append([])
for j in range(len(A[i])):
sum = A[i][j]+B[i][j]
c[i].append(sum)
print(c)
# for i in range(len(A)): #range of len gives me indeces
# for j in range(len(A[i])): #again ind... | [
1,
319,
29922,
8999,
29896,
29892,
29906,
29892,
29871,
29947,
1402,
518,
29941,
29892,
29871,
29955,
29892,
29946,
5262,
13,
29933,
29922,
8999,
29945,
29892,
29953,
29892,
29871,
29929,
1402,
518,
29955,
29892,
29953,
1919,
29900,
5262,
13,... |
BasicSpeechToText/app.py | AzureAdvocateBit/SpeechToTextSamples-1 | 22 | 123910 | <filename>BasicSpeechToText/app.py<gh_stars>10-100
import os
import time
from dotenv import load_dotenv
import azure.cognitiveservices.speech as speechsdk
# Load the speech key and region from the .env file
load_dotenv()
key = os.getenv("KEY")
region = os.getenv("REGION")
stop = False
# When a sentence is recognized... | [
1,
529,
9507,
29958,
16616,
10649,
5309,
1762,
1626,
29914,
932,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
2897,
13,
5215,
931,
13,
3166,
8329,
6272,
1053,
2254,
29918,
6333,
6... |
xldlib/exception/codes.py | Alexhuszagh/XLDiscoverer | 0 | 178336 | '''
Exceptions/codes
________________
Organized error codes for reporting errors and exceptions.
:copyright: (c) 2015 The Regents of the University of California.
:license: GNU GPL, see licenses/GNU GPLv3.txt for more details.
'''
CODES = {
"000": ("Cannot find file%(-s)s in row%(-s)s {0}."
... | [
1,
14550,
13,
1678,
8960,
29879,
29914,
18137,
13,
1678,
903,
14365,
7652,
22359,
13,
13,
1678,
9205,
1891,
1059,
11561,
363,
23415,
4436,
322,
15283,
29889,
13,
13,
1678,
584,
8552,
1266,
29901,
313,
29883,
29897,
29871,
29906,
29900,
... |
sky/migrations/0008_remove_news_label.py | eethan1/IMnight2018_Backend | 0 | 26423 | # Generated by Django 2.0 on 2018-02-24 11:21
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('sky', '0007_auto_20180224_1120'),
]
operations = [
migrations.RemoveField(
model_name='news',
name='label',
),
]
| [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29900,
373,
29871,
29906,
29900,
29896,
29947,
29899,
29900,
29906,
29899,
29906,
29946,
29871,
29896,
29896,
29901,
29906,
29896,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
13,
13,... |
aoc/event2019/day19/solve.py | rjbatista/AoC | 0 | 21501 | <filename>aoc/event2019/day19/solve.py
from event2019.day13.computer_v4 import Computer_v4
########
# PART 1
computer = Computer_v4([])
computer.load_code("event2019/day19/input.txt")
def get_value(x, y):
out = []
computer.reload_code()
computer.run([x, y], out)
return out[0]
def get_area(side = ... | [
1,
529,
9507,
29958,
29874,
542,
29914,
3696,
29906,
29900,
29896,
29929,
29914,
3250,
29896,
29929,
29914,
2929,
345,
29889,
2272,
13,
3166,
1741,
29906,
29900,
29896,
29929,
29889,
3250,
29896,
29941,
29889,
12097,
261,
29918,
29894,
29946,... |
test-crates/pyo3-mixed/test_pyo3_mixed.py | thedrow/maturin | 854 | 108932 | #!/usr/bin/env python3
import pyo3_mixed
def test_get_42():
assert pyo3_mixed.get_42() == 42
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
282,
9029,
29941,
29918,
29885,
11925,
13,
13,
13,
1753,
1243,
29918,
657,
29918,
29946,
29906,
7295,
13,
1678,
4974,
282,
9029,
29941,
29918,
29885,
11925,
29889,
657,
... |
pynamodb/tests/integration/config.py | augustincouette/PynamoDB | 3 | 51877 | <reponame>augustincouette/PynamoDB<filename>pynamodb/tests/integration/config.py
"""
Integration test settings
"""
DYNAMODB_HOST = 'http://localhost:8000' | [
1,
529,
276,
1112,
420,
29958,
2987,
504,
3742,
283,
2353,
29914,
29925,
2926,
29877,
4051,
29966,
9507,
29958,
29886,
2926,
10396,
29914,
21150,
29914,
27925,
29914,
2917,
29889,
2272,
13,
15945,
29908,
13,
23573,
362,
1243,
6055,
13,
15... |
launch_error_1.py | TheBigCharles/Saviour | 3 | 132484 | <filename>launch_error_1.py
import smtplib
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
fromaddr = '<EMAIL>'
password = '<PASSWORD>'
toaddrs = ['<EMAIL>']
content = 'Sorry, there is an ... | [
1,
529,
9507,
29958,
15343,
29918,
2704,
29918,
29896,
29889,
2272,
13,
5215,
1560,
9392,
1982,
13,
3166,
4876,
29889,
29885,
603,
29889,
726,
1053,
341,
8890,
1626,
13,
3166,
4876,
29889,
29885,
603,
29889,
3027,
1053,
341,
8890,
2940,
... |
sina_spider/items.py | yanwen0614/Weibo | 0 | 7158 | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
from scrapy import Item, Field
class TweetsItem(Item):
# define the fields for your item here like:
Author = Field()
Title = Field()
Create_time = Fie... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
22402,
1244,
278,
4733,
363,
596,
885,
2390,
287,
4452,
13,
29937,
13,
29937,
2823,
5106,
297,
29901,
13,
29937,
1732,
597,
1514,
29889,
155... |
brightness.py | darevish/scripts | 0 | 181981 | #!/usr/bin/python
# use this instead:
# http://ubuntuforums.org/showthread.php?t=2243162&p=13127246#post13127246
import sys
minBrightness = 100;
maxBrightnessFile = open("/sys/class/backlight/intel_backlight/max_brightness", "r");
maxBrightness = int(maxBrightnessFile.read());
maxBrightnessFile.close();
brightness... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
13,
29937,
671,
445,
2012,
29901,
13,
29937,
1732,
597,
431,
1657,
1137,
272,
6762,
29889,
990,
29914,
4294,
7097,
29889,
1961,
29973,
29873,
29922,
29906,
29906,
29946,
29941,
29896,
29953,
2... |
python/demo_queries/volumes/treatments_by_volume.py | jocelynpender/fna-query | 0 | 193880 | <filename>python/demo_queries/volumes/treatments_by_volume.py
from src.query import *
if __name__ == '__main__':
ask_query("[[Volume::Volume 17]]", "taxa_volume_17.csv")
| [
1,
529,
9507,
29958,
4691,
29914,
17482,
29918,
339,
6358,
29914,
1555,
9351,
29914,
2484,
271,
1860,
29918,
1609,
29918,
24623,
29889,
2272,
13,
3166,
4765,
29889,
1972,
1053,
334,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1... |
src/scraping/newslists_scrapers/ukrnet.py | mstrechen/news-scraper | 0 | 38971 | from queue import Queue
from datetime import datetime, timedelta
from .INewslistScraper import INewslistScraper
from .. import article
from .. import driver
class Scraper(INewslistScraper):
def __init__(self, limit: int = 100):
INewslistScraper.__init__(self, limit)
self._tag_to_url = {
... | [
1,
515,
9521,
1053,
5462,
434,
13,
3166,
12865,
1053,
12865,
29892,
5335,
287,
2554,
13,
13,
13,
3166,
869,
1177,
809,
29879,
1761,
4421,
336,
546,
1053,
2672,
809,
29879,
1761,
4421,
336,
546,
13,
13,
13,
3166,
6317,
1053,
4274,
13... |
example_problems/tutorial/piastrelle/services/eval_num_sol_server.py | romeorizzi/TALight | 4 | 122844 | <reponame>romeorizzi/TALight
#!/usr/bin/env python3
from sys import stderr, exit
from time import monotonic
from TALinputs import TALinput
from multilanguage import Env, Lang, TALcolors
from piastrelle_lib import Par
# METADATA OF THIS TAL_SERVICE:
args_list = [
('answ_modulus',int),
('goal',str),
('code... | [
1,
529,
276,
1112,
420,
29958,
4871,
272,
466,
2526,
29914,
29911,
1964,
523,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
3166,
10876,
1053,
380,
20405,
29892,
6876,
13,
3166,
931,
1053,
21196,
8927,
13,
13,
3166,... |
examples/constraints.py | jbarberia/PFNET.py | 3 | 31955 | #***************************************************#
# This file is part of PFNET. #
# #
# Copyright (c) 2015, <NAME>. #
# #
# PFNET is released under the BSD 2-clause license. #
#***********... | [
1,
396,
7775,
7775,
7775,
17435,
29937,
13,
29937,
910,
934,
338,
760,
310,
349,
29943,
6006,
29889,
462,
539,
396,
13,
29937,
462,
462,
462,
259,
396,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29945,
29892,... |
acurl/tests/test_to_curl.py | markgreene74/mite | 17 | 48313 | import pytest
from helpers import create_request
import acurl
def test_to_curl():
r = create_request("GET", "http://foo.com")
assert r.to_curl() == "curl -X GET http://foo.com"
def test_to_curl_headers():
r = create_request(
"GET", "http://foo.com", headers=("Foo: bar", "My-Header: is-aweso... | [
1,
1053,
11451,
1688,
13,
3166,
1371,
414,
1053,
1653,
29918,
3827,
13,
13,
5215,
1274,
2271,
13,
13,
13,
1753,
1243,
29918,
517,
29918,
18963,
7295,
13,
1678,
364,
353,
1653,
29918,
3827,
703,
7194,
613,
376,
1124,
597,
5431,
29889,
... |
tests/silhouette_test.py | JesusFreke/fscad | 35 | 51505 | <gh_stars>10-100
# Copyright 2019 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://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
5087,
365,
12182,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
... |
ML-gane.py | HackerLion123/Machine-Learning | 1 | 176311 | from sklearn import tree;
Test_data = [[]]
| [
1,
515,
2071,
19668,
1053,
5447,
29936,
13,
3057,
29918,
1272,
353,
518,
2636,
29962,
13,
2
] |
scripts/matcher/utils/utils.py | jakubarendac/fingerflow | 0 | 95782 | import os
import numpy as np
def preprocess_item(filename, folder):
return np.genfromtxt(
f"{folder}/{filename}", delimiter=",")
def load_folder_data(folder):
data = []
labels = []
for _, _, files in os.walk(folder):
raw_data = [preprocess_item(filename, folder) for filename in file... | [
1,
1053,
2897,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
758,
5014,
29918,
667,
29898,
9507,
29892,
4138,
1125,
13,
1678,
736,
7442,
29889,
1885,
3166,
3945,
29898,
13,
4706,
285,
29908,
29912,
12083,
6822,
29912,
9507,
17671,
28552... |
reversi.py | holishing/Othello | 0 | 75484 | #!/usr/bin/env python3
import argparse
from game.game import Game
def main():
""" Reversi game with human player vs AI player.
"""
parser = argparse.ArgumentParser()
parser.add_argument('--timeout', help="Number of seconds the brain is allowed to think before making its move",
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
1852,
5510,
13,
3166,
3748,
29889,
11802,
1053,
8448,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
9995,
830,
874,
29875,
3748,
411,
5199,
4847,
7186,
319,
29902,
4847,
2... |
list_albums.py | gvellut/flickr_api_utils | 0 | 85466 | <filename>list_albums.py<gh_stars>0
from datetime import datetime, timezone
from addict import Dict as Addict
from api_auth import auth_flickr
flickr = auth_flickr()
def get_albums():
return _get_album_page(1, [])
def _get_album_page(page, acc):
search_result = Addict(flickr.photosets.getList(page=page))... | [
1,
529,
9507,
29958,
1761,
29918,
10336,
29879,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
12865,
1053,
12865,
29892,
29431,
13,
13,
3166,
788,
919,
1053,
360,
919,
408,
3462,
919,
13,
13,
3166,
7882,
29918,
51... |
howdoyoulike/howdoyoulike/urls.py | benjamin0/how-do-you-like-them-apples | 0 | 73116 | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
# Examples:
url(r'^admin/', include(admin.site.urls)),
url(r'^grappelli/', include('grappelli.urls')), # grappelli URLS
url(r'^calls/$', 'calls.views.call'),
)
| [
1,
515,
9557,
29889,
5527,
29889,
26045,
1053,
15038,
29892,
3160,
29892,
3142,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
13,
2271,
11037,
29879,
353,
15038,
877,
742,
13,
1678,
396,
1222,
9422,
29901,
13,
1678,
3142,
29898,
29878,
... |
pyaction/__init__.py | a-maliarov/pyaction | 9 | 155831 | <gh_stars>1-10
# -*- coding: utf-8 -*-
"""
pyaction
~~~~~~~~
PyAction is a module dedicated to eliminate rewriting the same code from
project to project by providing a set of tools according to specific python
fields.
Library hierarchy (this must be set and be followed in any case):
pyaction/
field_name/
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
13,
2272,
2467,
13,
26594,
13,
13,
19737,
4276,
338,
263,
3883,
... |
src/16/16204.py | youngdaLee/Baekjoon | 11 | 86138 | """
16204. 카드 뽑기
작성자: xCrypt0r
언어: Python 3
사용 메모리: 29,380 KB
소요 시간: 76 ms
해결 날짜: 2020년 9월 13일
"""
def main():
N, M, K = map(int, input().split())
print(min(M, K) - max(M, K) + N)
if __name__ == '__main__':
main()
| [
1,
9995,
13,
29896,
29953,
29906,
29900,
29946,
29889,
29871,
239,
188,
183,
31493,
29871,
238,
192,
148,
30827,
13,
13,
239,
161,
148,
31126,
31013,
29901,
921,
29907,
4641,
29900,
29878,
13,
239,
153,
187,
31129,
29901,
5132,
29871,
2... |
src/pythonScripts/DrivePart/download.py | sahilbest999/FVS-GIT-CLONE | 0 | 25705 | <reponame>sahilbest999/FVS-GIT-CLONE
import pickle
import os
import re
import io
import response
import upload
import authenticate
from googleapiclient.errors import HttpError
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import R... | [
1,
529,
276,
1112,
420,
29958,
29879,
801,
309,
13318,
29929,
29929,
29929,
29914,
29943,
21819,
29899,
29954,
1806,
29899,
6154,
12413,
13,
5215,
5839,
280,
13,
5215,
2897,
13,
5215,
337,
13,
5215,
12013,
13,
5215,
2933,
13,
5215,
6441... |
AHCraft/crafter.py | Saad888/AutoHotCraft | 3 | 125423 | import time
from AHKManager import AHKManager
class Crafter:
def __init__(self, AHKObj):
""" This loop will run the expected sequence of actions required
to craft based on requested parameters"""
# Parameters for system
self.user_inturrupt = False
self.script = AHKObj
... | [
1,
1053,
931,
13,
3166,
319,
29950,
29968,
3260,
1053,
319,
29950,
29968,
3260,
13,
13,
13,
1990,
14279,
906,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
319,
29950,
29968,
9930,
1125,
13,
4706,
9995,
910,
2425,
674,
1065,
2... |
sources/trmm/arcpy_trmm_custom_raster.py | SERVIR/ReferenceNode_ETL | 0 | 118334 | # Developer: SpatialDev
# Company: Spatial Development International
# standard library
import os
import sys
from datetime import datetime, timedelta
# third-party
from arcpy.sa import *
import arcpy
class TRMMCustomRasterRequest:
""" encapsulates a request to the TRMMCustomRasterCreator to create a cust... | [
1,
396,
10682,
261,
29901,
1706,
15238,
16618,
13,
29937,
6938,
29901,
259,
1706,
15238,
14650,
4623,
13,
13,
29937,
3918,
3489,
13,
5215,
2897,
13,
5215,
10876,
13,
3166,
12865,
1053,
12865,
29892,
5335,
287,
2554,
13,
13,
29937,
4654,... |
reader_model.py | ranjeethmahankali/BIMToVec | 0 | 128808 | from ops import *
import math
import random
ATOM_NUM = 5
ATOM_SIZE = 32
WORD_SIZE = 64
WORD_SAMPLE_SIZE = 20
ALPHABET = list("abcdefghijklmnopqrstuvwxyz")
EMBEDDINGS = loadFromFile("savedEmbeddings/embeddings.pkl")
EMBEDDING_TENSOR = tf.constant(value=EMBEDDINGS, dtype=tf.float32)
def get_char_list_vec(word):
ch... | [
1,
515,
288,
567,
1053,
334,
13,
5215,
5844,
13,
5215,
4036,
13,
13,
1299,
6488,
29918,
13967,
353,
29871,
29945,
13,
1299,
6488,
29918,
14226,
353,
29871,
29941,
29906,
13,
17013,
29918,
14226,
353,
29871,
29953,
29946,
13,
17013,
2991... |
searx/searx/engines/bing_videos.py | wgranados/quadbot | 3 | 106689 | """
Bing (Videos)
@website https://www.bing.com/videos
@provide-api yes (http://datamarket.azure.com/dataset/bing/search)
@using-api no
@results HTML
@stable no
@parse url, title, content, thumbnail
"""
from json import loads
from lxml import html
from searx.engines.bing_images import _fe... | [
1,
9995,
13,
350,
292,
313,
29963,
7958,
29897,
13,
13,
732,
22942,
268,
2045,
597,
1636,
29889,
10549,
29889,
510,
29914,
29894,
7958,
13,
732,
16123,
680,
29899,
2754,
4874,
313,
1124,
597,
4130,
314,
935,
300,
29889,
17688,
29889,
... |
src/core/widgets/komorebi/active_layout.py | younger-1/yasb | 53 | 151252 | import logging
from collections import deque
from PyQt6.QtWidgets import QWidget, QLabel
from PyQt6.QtCore import pyqtSignal
from core.utils.win32.utilities import get_monitor_hwnd
from core.event_service import EventService
from core.event_enums import KomorebiEvent
from core.widgets.base import BaseWidget
from core.u... | [
1,
1053,
12183,
13,
3166,
16250,
1053,
316,
802,
13,
3166,
10772,
17303,
29953,
29889,
17303,
8801,
29879,
1053,
660,
8801,
29892,
660,
4775,
13,
3166,
10772,
17303,
29953,
29889,
17303,
9203,
1053,
11451,
17915,
10140,
284,
13,
3166,
713... |
level_18/level_18random.py | hermes-jr/adventofcode-in-python | 0 | 86381 | <filename>level_18/level_18random.py
#!/usr/bin/python
import copy
import random
WIDTH = 70
HEIGHT = 46
STEPS = 1000000
lights = [[0 for x in range(WIDTH)] for x in range(HEIGHT)]
dark = '\x1b[32;40m#\x1b[0m'
bright = '\x1b[32;1m#\x1b[0m'
nocolor = '#'
random.seed()
for i in range(HEIGHT):
for j in range(WIDTH):
... | [
1,
529,
9507,
29958,
5563,
29918,
29896,
29947,
29914,
5563,
29918,
29896,
29947,
8172,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
5215,
3509,
13,
5215,
4036,
13,
13,
22574,
353,
29871,
29955,
29900,
13,
9606,
2253... |
model-archiver/model_archiver/arg_parser.py | zmhassan/mxnet-model-server | 1 | 178623 | <reponame>zmhassan/mxnet-model-server
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
# http://www.apache.org/licenses/... | [
1,
529,
276,
1112,
420,
29958,
14018,
29882,
465,
273,
29914,
16838,
1212,
29899,
4299,
29899,
2974,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
16631,
29889,
510,
29892,
9266,
29889,
470,
967,
23736,
1078,
29889,
2178,
26863... |
Menu.py | OaksTree1/PyPrac | 0 | 1603765 | from Database.database import dataBase
from Models.Blog import blog
class Menu(object):
def __init__(self):
self.user = raw_input("Enter your username: ")
self.user_have_blog = None
if self._user_account():
print("Welcome Back {user}".format(user = self.user))
else:
... | [
1,
515,
5470,
29889,
9803,
1053,
848,
5160,
13,
3166,
3382,
1379,
29889,
29933,
1188,
1053,
12618,
13,
13,
1990,
20019,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
1792,
353,
10650,
29918,
208... |
tests/test_tokenizer.py | cd109/scrappybara | 0 | 49489 | <reponame>cd109/scrappybara
import unittest
from scrappybara.preprocessing.tokenizer import Tokenizer
_TOKENIZE = Tokenizer()
class TestTokenizer(unittest.TestCase):
# BLOCKS
# -------------------------------------------------------------------------->
def test_indirect_speech_blocks(self):
se... | [
1,
529,
276,
1112,
420,
29958,
2252,
29896,
29900,
29929,
29914,
1557,
336,
23717,
13839,
13,
5215,
443,
27958,
13,
13,
3166,
24559,
23717,
13839,
29889,
1457,
19170,
29889,
6979,
3950,
1053,
25159,
3950,
13,
13,
29918,
4986,
29968,
1430,... |
p240_search_a_2d_matrix_ii.py | feigaochn/leetcode | 0 | 115380 | <reponame>feigaochn/leetcode
# coding: utf-8
# author: <NAME>
#
# Search A 2d Matrix Ii
# Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
# Integers in each row are sorted in ascending from left to right.
# Integers in each column are sorted in asce... | [
1,
529,
276,
1112,
420,
29958,
1725,
4324,
2878,
29876,
29914,
280,
300,
401,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
29937,
4148,
29901,
529,
5813,
29958,
13,
29937,
13,
29937,
11856,
319,
29871,
29906,
29881,
22513,
306,
... |
tests/models/test_prodotti.py | 20tab/python-fattureincloud | 2 | 133717 | <gh_stars>1-10
from unittest import TestCase
from requests_mock import Mocker
from fattureincloud.client import FattureInCloudAPI
from tests.mocking import mocker_register_uri
class TestProdotti(TestCase):
"""Define simple test case for base client request."""
maxDiff = None
def setUp(self):
"... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
443,
27958,
1053,
4321,
8259,
13,
13,
3166,
7274,
29918,
17640,
1053,
341,
8658,
13,
13,
3166,
285,
1131,
545,
262,
9274,
29889,
4645,
1053,
383,
1131,
545,
... |
contact/views.py | rsHalford/xhalford-django | 2 | 21914 | from django.shortcuts import render
from django.views.generic import ListView
from contact.models import Profile
class Contact(ListView):
model = Profile
template_name = "contact.html"
| [
1,
515,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
13,
3166,
9557,
29889,
7406,
29889,
19206,
1053,
22184,
13,
3166,
6958,
29889,
9794,
1053,
20802,
13,
13,
1990,
22387,
29898,
15660,
1125,
13,
1678,
1904,
353,
20802,
13,
1678,
4472,
... |
010-binarysearch.py | dasalgadoc/PythonNotes | 0 | 43666 | import random
def binary_search(data, target, low_index, high_index):
""" Binary Search recursiva """
if (low_index > high_index):
return False
mid_index = (low_index + high_index) // 2
if target == data[mid_index]:
return True
elif target < data[mid_index]:
return binary_... | [
1,
1053,
4036,
13,
13,
1753,
7581,
29918,
4478,
29898,
1272,
29892,
3646,
29892,
4482,
29918,
2248,
29892,
1880,
29918,
2248,
1125,
13,
1678,
9995,
29479,
11856,
8304,
4244,
9995,
13,
1678,
565,
313,
677,
29918,
2248,
1405,
1880,
29918,
... |
tests/test_template_helpers.py | ramiro/flourish | 12 | 136294 | # encoding: utf-8
import pytest
from flourish import Flourish
from flourish.helpers import publication_range
class TestFlourish:
@classmethod
def setup_class(cls):
with pytest.warns(None) as warnings:
cls.flourish = Flourish('tests/source')
def test_publication_range(self):
... | [
1,
396,
8025,
29901,
23616,
29899,
29947,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
1652,
473,
728,
1053,
2379,
473,
728,
13,
3166,
1652,
473,
728,
29889,
3952,
6774,
1053,
17745,
29918,
3881,
13,
13,
13,
1990,
4321,
8754,
473,
728,
... |
xplainer/backend/tools/lime.py | liborvaneksw/xplainer | 4 | 44359 | import tensorflow as tf
from lime import lime_image
from skimage.segmentation import mark_boundaries
from xplainer.backend.tools.abstract_tool import AbstractTool, GeneralSettings
from xplainer.backend.utils.image import prepare_for_prediction, get_base64png
class Lime(AbstractTool):
def name(self):
retu... | [
1,
1053,
26110,
408,
15886,
13,
3166,
301,
603,
1053,
301,
603,
29918,
3027,
13,
3166,
2071,
3027,
29889,
28192,
362,
1053,
2791,
29918,
9917,
4314,
13,
13,
3166,
921,
13974,
4983,
29889,
27852,
29889,
8504,
29889,
16595,
29918,
10154,
... |
src/main/python/spec_checker/modules/cpu.py | houdinii/specCheckWithGui | 1 | 116511 | <filename>src/main/python/spec_checker/modules/cpu.py
import psutil
import pythoncom
pythoncom.CoInitialize()
class CpuRecord:
"""Holds and records the number of cores, usage, and frequency of the primary cpu
Keyword Arguments:
physical_cores -- Number of physical cores present (Default: None)
... | [
1,
529,
9507,
29958,
4351,
29914,
3396,
29914,
4691,
29914,
6550,
29918,
3198,
261,
29914,
7576,
29914,
21970,
29889,
2272,
13,
5215,
6529,
4422,
13,
5215,
3017,
510,
13,
4691,
510,
29889,
7967,
6644,
6646,
580,
13,
13,
13,
1990,
315,
... |
PhyTestOnline/PhyTestOnline.py | JerryLife/PhyTestOnline | 1 | 24662 | <gh_stars>1-10
# -*- coding: utf-8 -*-
# Copyright (C) 2016 <NAME>
import urllib
import urllib2
import re
import xlwt
START_PAGE = 0 # start page
ALL_PAGE = 82 # number of all pages
class PhyTestOnline(object):
"""
This class is specially for a HUST Physics Test Online providing a crawler... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29953,
529,
... |
tests/test_search.py | chdean/usajobs | 2 | 83589 | <reponame>chdean/usajobs
import usajobs
import pytest
import requests
def test_search():
test_url = 'https://api.usa.gov/jobs/search.json?query=park+ranger&size=100'
test_data = requests.get(test_url).json()
results = usajobs.search('park ranger', step=5, as_dict=True)
assert len(results) == len(test_... | [
1,
529,
276,
1112,
420,
29958,
305,
311,
273,
29914,
375,
1175,
26290,
13,
5215,
502,
1175,
26290,
13,
5215,
11451,
1688,
13,
5215,
7274,
13,
13,
13,
1753,
1243,
29918,
4478,
7295,
13,
1678,
1243,
29918,
2271,
353,
525,
991,
597,
27... |
metis/metis/__init__.py | joshblum/chronology | 0 | 139019 | <gh_stars>0
from gevent import monkey; monkey.patch_all()
import os
VERSION = (0, 1, 'alpha')
def get_version(version=None):
version = version or VERSION
assert(len(version) == 3)
return '%s.%s %s' % version
# The file path will have `metis.zip` in it if its being run on Spark workers.
# In that case we don... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
1737,
794,
1053,
1601,
1989,
29936,
1601,
1989,
29889,
5041,
29918,
497,
580,
13,
13,
5215,
2897,
13,
13,
16358,
353,
313,
29900,
29892,
29871,
29896,
29892,
525,
2312,
1495,
13,
... |
mysite/urls.py | mnithya/cs3240-s15-team06-test | 0 | 26786 | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns = [
# Examples:
# url(r'^$', 'mysite.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^$', '... | [
1,
515,
9557,
29889,
5527,
29889,
26045,
1053,
3160,
29892,
3142,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
3166,
9557,
29889,
21570,
29889,
7959,
5325,
29889,
26045,
1053,
2294,
5325,
29918,
2271,
11037,
29879,
13,
13,
2271,
11037,
2... |
tests/test_user_model.py | Lifeistrange/flaskweb | 0 | 60613 | #!/usr/bin/env python
# coding=utf-8
import unittest
from app.domain.model import User, AnonymousUser, Permission, Role
class UserModelTestCase(unittest.TestCase):
def test_password_setter(self):
u = User(password = '<PASSWORD>')
self.assertTrue(u.password_hash is not None)
def test_no_passwo... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
13,
5215,
443,
27958,
13,
3166,
623,
29889,
7247,
29889,
4299,
1053,
4911,
29892,
530,
11428,
2659,
29892,
20894,
2333,
29892,
1528,
280,
13,... |
Minimum Index Sum of Two Lists.py | sugia/leetcode | 0 | 193714 | '''
Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings.
You need to help them find out their common interest with the least list index sum. If there is a choice tie between answers, output all of them with no order requirement. You co... | [
1,
14550,
13,
20182,
852,
21828,
322,
9579,
275,
864,
304,
6755,
263,
27144,
363,
17803,
29892,
322,
896,
1716,
505,
263,
1051,
310,
25448,
12374,
1934,
9875,
491,
6031,
29889,
13,
13,
3492,
817,
304,
1371,
963,
1284,
714,
1009,
3619,... |
upsampling/utils/__init__.py | Giamm9998/face_detection_on_sim_events | 5 | 1614347 | <filename>upsampling/utils/__init__.py
from .dataset import Sequence
from .upsampler import Upsampler
from .utils import get_sequence_or_none
| [
1,
529,
9507,
29958,
14340,
314,
10335,
29914,
13239,
29914,
1649,
2344,
26914,
2272,
13,
3166,
869,
24713,
1053,
922,
3910,
13,
3166,
869,
14340,
314,
20069,
1053,
501,
567,
314,
20069,
13,
3166,
869,
13239,
1053,
679,
29918,
16506,
29... |
efficiency_mark.py | DaCentDD/asvspoof2019 | 0 | 60950 | import os
import statistics
import librosa
import sox
from concurrent.futures import ThreadPoolExecutor
directory = "flac"
lengths = []
for file in os.listdir(directory):
print(file)
length = librosa.get_duration(filename=f"flac\\{file}")
lengths.append(length)
transform = sox.Transformer();
tran... | [
1,
1053,
2897,
13,
5215,
13964,
13,
5215,
4303,
1883,
29874,
13,
5215,
577,
29916,
13,
3166,
21984,
29889,
29888,
329,
1973,
1053,
10480,
11426,
13366,
13,
13,
12322,
353,
376,
29888,
4620,
29908,
13,
2848,
29879,
353,
5159,
13,
13,
1... |
rlil/presets/continuous/models.py | syuntoku14/pytorch-rl-il | 43 | 1601135 | <filename>rlil/presets/continuous/models.py
'''
Pytorch models for continuous control.
'''
import numpy as np
import torch
from rlil import nn
def fc_q(env, hidden1=400, hidden2=300):
return nn.Sequential(
nn.Linear(env.state_space.shape[0] +
env.action_space.shape[0], hidden1),
... | [
1,
529,
9507,
29958,
2096,
309,
29914,
4569,
1691,
29914,
20621,
681,
29914,
9794,
29889,
2272,
13,
12008,
13,
29925,
3637,
25350,
4733,
363,
9126,
2761,
29889,
13,
12008,
13,
5215,
12655,
408,
7442,
13,
5215,
4842,
305,
13,
3166,
364,
... |
app.py | chezhia/robinhood-portfolio | 87 | 76680 | <gh_stars>10-100
import os
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
from flask import Flask, render_template, request
from backend.backend import BackendClass
from io import BytesIO
# Initialize
MY_DPI = 96
DATAFILE = ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
5215,
409,
370,
1398,
408,
269,
1983,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
22889,
298... |
cli/tests/awsbatch/conftest.py | jason-mccloskey/aws-parallelcluster | 1 | 1607560 | <gh_stars>1-10
"""
This module loads pytest fixtures and plugins needed by all tests.
It's very useful for fixtures that need to be shared among all tests.
"""
from __future__ import print_function
import boto3
import pytest
from botocore.stub import Stubber
from common import DEFAULT_AWSBATCHCLICONFIG_MOCK_CONFIG
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
4013,
3883,
15376,
11451,
1688,
5713,
486,
1973,
322,
18224,
4312,
491,
599,
6987,
29889,
13,
13,
3112,
29915,
29879,
1407,
5407,
363,
5713,
486,
... |
examples/interconnector_constant_loss_percentage.py | dec-heim/nempy | 24 | 77545 | <reponame>dec-heim/nempy
import pandas as pd
from nempy import markets
# The only generator is located in NSW.
unit_info = pd.DataFrame({
'unit': ['A'],
'region': ['NSW'] # MW
})
# Create a market instance.
market = markets.SpotMarket(unit_info=unit_info, market_regions=['NSW', 'VIC'])
# Volume of each bids... | [
1,
529,
276,
1112,
420,
29958,
7099,
29899,
6391,
29914,
15344,
2272,
13,
5215,
11701,
408,
10518,
13,
3166,
6583,
2272,
1053,
2791,
1691,
13,
13,
29937,
450,
871,
15299,
338,
5982,
297,
3865,
29956,
29889,
13,
5441,
29918,
3888,
353,
... |
src/coolbeans/utils.py | runarp/coolbeans | 5 | 150850 | <reponame>runarp/coolbeans
import typing
import pathlib
import logging
import importlib
import pprint
import yaml
logger = logging.getLogger(__name__)
def get_project_root() -> pathlib.Path:
"""Returns project root folder."""
return pathlib.Path(__file__).parent
def logging_config(config_file=None, level=... | [
1,
529,
276,
1112,
420,
29958,
3389,
6834,
29914,
1111,
324,
11700,
13,
5215,
19229,
13,
5215,
2224,
1982,
13,
5215,
12183,
13,
5215,
1053,
1982,
13,
5215,
282,
2158,
13,
5215,
343,
8807,
13,
13,
13,
21707,
353,
12183,
29889,
657,
1... |
benchmarkt/AlgoConvolv20.py | zwakrim/mastethesis | 0 | 70806 | <filename>benchmarkt/AlgoConvolv20.py
import cv2
import sys
import time
import numpy as np
import jsonlines
import datetime
import platform
def convolvimg(width , heigh, fpsArray):
video_capture = cv2.VideoCapture(camera)
video_capture.set(3,width)
video_capture.set(4,heigh)
font = cv2.FONT_HERSHEY_SI... | [
1,
529,
9507,
29958,
1785,
305,
16325,
29914,
2499,
1484,
1168,
1555,
29894,
29906,
29900,
29889,
2272,
13,
5215,
13850,
29906,
13,
5215,
10876,
13,
5215,
931,
13,
5215,
12655,
408,
7442,
13,
5215,
4390,
9012,
13,
5215,
12865,
13,
5215,... |
py/liberliber_download.py | DavidGigli/gender-literature-ita | 1 | 173075 | import time
from selenium import webdriver
in_autori=open("/home/masterbd/progetto/autori+wiki_finito.txt","r").readlines()
in_url=open("/home/masterbd/progetto/autori_a_z.txt","r").readlines()
lista_url=[]
autori=[x.split("|") for x in in_autori]
url=[x.split("|") for x in in_url]
#join=[x+y for x in in_autori for ... | [
1,
1053,
931,
13,
3166,
18866,
1053,
1856,
9465,
13,
13,
13,
262,
29918,
1300,
4170,
29922,
3150,
11974,
5184,
29914,
6207,
6448,
29914,
771,
657,
517,
29914,
1300,
4170,
29974,
4594,
29918,
4951,
2049,
29889,
3945,
3284,
29878,
2564,
9... |
scarypi.py | 0x24elk/ScaryPi | 0 | 1604700 | <gh_stars>0
#!/usr/bin/python
"""Shows animated 'eyes' on two 8x8 LED matrices.
Matrices are driven by a MAX7219 or similar. We interface
with them through the luma.led_matrix library.
For local development without hardware try something like:
./scarypi.py -d pygame --transform=led_matx --width 16 --height 8
For ac... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
13,
15945,
29908,
2713,
1242,
17524,
525,
1032,
267,
29915,
373,
1023,
29871,
29947,
29916,
29947,
25023,
13516,
29889,
13,
13,
29924,
81... |
data_structures/disjoint_set/disjoint_set.py | egagraha/python-algorithm | 0 | 2233 | <gh_stars>0
"""
Disjoint set.
Reference: https://en.wikipedia.org/wiki/Disjoint-set_data_structure
"""
class Node:
def __init__(self, data: int) -> None:
self.data = data
self.rank: int
self.parent: Node
def make_set(x: Node) -> None:
"""
Make x as a set.
"""
# ra... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
1678,
3295,
12090,
731,
29889,
13,
1678,
12105,
29901,
2045,
597,
264,
29889,
6011,
29889,
990,
29914,
4594,
29914,
4205,
12090,
29899,
842,
29918,
1272,
29918,
23905,
1... |
uap/post/forms.py | Tyromancer/UAP-Application-Platform-Django | 0 | 42387 | from django import forms
from django.forms import ModelForm, CharField
from ckeditor.widgets import CKEditorWidget
from .models import URP, Application
class URPCreateForm(ModelForm):
"""Form for URP creation"""
description = CharField(widget=CKEditorWidget())
class Meta:
model = URP
fiel... | [
1,
515,
9557,
1053,
7190,
13,
3166,
9557,
29889,
9514,
1053,
8125,
2500,
29892,
2896,
3073,
13,
3166,
274,
29895,
15204,
29889,
8030,
29879,
1053,
315,
29968,
15280,
8801,
13,
3166,
869,
9794,
1053,
501,
29934,
29925,
29892,
8427,
13,
1... |
build/env/lib/python2.7/site-packages/ipython-0.10-py2.7.egg/IPython/platutils_dummy.py | lumanjiao/XLS_BigData | 11 | 87918 | # -*- coding: utf-8 -*-
""" Platform specific utility functions, dummy version
This has empty implementation of the platutils functions, used for
unsupported operating systems.
Authors
-------
- <NAME> <<EMAIL>>
"""
#*****************************************************************************
# Copyright (C... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
28096,
2702,
19725,
3168,
29892,
20254,
1873,
29871,
13,
13,
4013,
756,
4069,
5314,
310,
278,
18870,
13239,
3168,
29892,
1304,
363,
29871,
... |
gcn/etc/dbconfig.py | kalon33/divine | 11 | 103502 | #
# COPYRIGHT (C) 2002-2011 <NAME>
#
"""
.. module:: dbconfig
:platform: Unix, Windows, MacOSX
:synopsis: Configuration for Database connections
.. moduleauthor:: <NAME> (<EMAIL>); modified by <EMAIL>
The module defines a dictionary *DBCONFIG* that provides the parameters needed
to connect to various database... | [
1,
396,
13,
29937,
315,
4590,
29979,
22789,
3912,
313,
29907,
29897,
29871,
29906,
29900,
29900,
29906,
29899,
29906,
29900,
29896,
29896,
529,
5813,
29958,
13,
29937,
13,
15945,
29908,
13,
636,
3883,
1057,
4833,
2917,
13,
1678,
584,
1212... |
covid19/segmentation/crop_bbox.py | salvacarrion/mltests | 0 | 166493 | <filename>covid19/segmentation/crop_bbox.py
import glob
import json
import os
from pathlib import Path
import cv2
import numpy as np
import pandas as pd
import tqdm
from matplotlib import pyplot as plt
def read_img(filename):
img = cv2.imread(filename, 0)
img = img.astype(np.uint8)
return img
def show_... | [
1,
529,
9507,
29958,
24542,
333,
29896,
29929,
29914,
28192,
362,
29914,
29883,
1336,
29918,
29890,
1884,
29889,
2272,
13,
5215,
13149,
13,
5215,
4390,
13,
5215,
2897,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
5215,
13850,
29906,
13,
5... |
migrations/versions/1d7903bb7029_.py | fitoskalante/wetribe-backend | 0 | 189272 | """empty message
Revision ID: 1d7903bb<PASSWORD>9
Revises:
Create Date: 2019-12-16 11:35:50.692153
"""
from alembic import op
import sqlalchemy as sa, sqlalchemy_utils
# revision identifiers, used by Alembic.
revision = '<PASSWORD>'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
#... | [
1,
9995,
6310,
2643,
13,
13,
1123,
4924,
3553,
29901,
29871,
29896,
29881,
29955,
29929,
29900,
29941,
1327,
29966,
25711,
17013,
29958,
29929,
13,
1123,
1730,
267,
29901,
29871,
13,
4391,
4712,
29901,
29871,
29906,
29900,
29896,
29929,
298... |
python全栈/day05/乘法表.py | Ringo-li/python_exercise_100 | 0 | 77801 | i = 1
while i <= 9:
j = 1
while j <= i:
print("{}x{}={}\t".format(j, i, i * j), end='')
j += 1
print()
i += 1 | [
1,
474,
353,
29871,
29896,
13,
8000,
474,
5277,
29871,
29929,
29901,
29871,
13,
1678,
432,
353,
29871,
29896,
13,
1678,
1550,
432,
5277,
474,
29901,
308,
13,
4706,
1596,
703,
8875,
29916,
8875,
3790,
1012,
29873,
1642,
4830,
29898,
2992... |
source/Bornholdt.py | StxGuy/Econophysics | 13 | 171921 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
__author__ = """Prof. <NAME>, Ph.D. <<EMAIL>>"""
import os
os.system('clear')
print('.-------------------------------.')
print('| |#')
print('| By.: Prof. <NAME> |#')
print('| |#')
print('| ... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
1649,
8921,
1649,
353,
9995,
1184,
29888,
29889,
529,
5813,
10202,
1963,
29889,
29928,
29889,
... |
venv/Lib/site-packages/psychopy/demos/coder/stimuli/colorPalette.py | mintzer/pupillometry-rf-back | 0 | 107570 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division
from psychopy import locale_setup, visual, core
import numpy as np
from psychopy.hardware import keyboard
from psychopy import misc
def createPalette(size):
"""
Creates the color palette array in HSV and returns as... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
13,
3166,
11643,
2270,
1053,
... |
train_ids.py | Huanzhuo/IA-Net | 2 | 57912 | import os
import torch
import argparse
import datetime
import numpy as np
import torch.optim as optim
from models.resnet import resnet50, Model, resnet50_1d
from losses.loss import ContrastiveLoss_
from torch.optim import lr_scheduler
from torch.utils.data import DataLoader
from dataset.industry_dataset_identify import... | [
1,
1053,
2897,
13,
5215,
4842,
305,
13,
5215,
1852,
5510,
13,
5215,
12865,
13,
5215,
12655,
408,
7442,
13,
5215,
4842,
305,
29889,
20640,
408,
5994,
13,
3166,
4733,
29889,
690,
1212,
1053,
620,
1212,
29945,
29900,
29892,
8125,
29892,
... |
vkontakte_photos/parser.py | Andertaker/django-vkontakte-photos | 0 | 148200 | # -*- coding: utf-8 -*-
from datetime import datetime
from vkontakte_api.parser import VkontakteParser, VkontakteParseError
import re
class VkontaktePhotosParser(VkontakteParser):
pass
# def parse_container_date(self, container):
#
# text = container.find('span', {'class': re.compile('^rel_date')})
# ... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
12865,
1053,
12865,
13,
3166,
325,
29895,
609,
17230,
29918,
2754,
29889,
16680,
1053,
478,
29895,
609,
17230,
11726,
29892,
478,
29895,
609,
17230,
... |
Python2/Modulo_3_exe_pratico.py | Belaschich/SoulON | 0 | 54623 | <filename>Python2/Modulo_3_exe_pratico.py
"""
1. Crie uma base de dados chamada sistema_escolar_soul_on
2. Crie uma tabela alunos com os campos id, nome, matricula, turma.
3. Alimente a tabela com os seguintes dados:
"""
import mysql.connector
db = mysql.connector.connect(
host = "localhost",
user = "root",
... | [
1,
529,
9507,
29958,
11980,
29906,
29914,
2111,
7207,
29918,
29941,
29918,
8097,
29918,
558,
271,
1417,
29889,
2272,
13,
15945,
29908,
13,
29896,
29889,
12,
29907,
2546,
3672,
2967,
316,
270,
2255,
11179,
1114,
10502,
29918,
267,
1054,
27... |
jupyterlab2pymolpysnips/Selection/duplicateObject.py | MooersLab/pymolpysnips | 0 | 162429 | """
cmd.do('create ${1:t4l}, ${2:1lw9};')
"""
cmd.do('create t4l, 1lw9;')
# Description: Duplicate object.
# Source: placeHolder
| [
1,
9995,
13,
9006,
29889,
1867,
877,
3258,
6435,
29896,
29901,
29873,
29946,
29880,
1118,
6435,
29906,
29901,
29896,
29880,
29893,
29929,
3400,
1495,
13,
15945,
29908,
13,
9006,
29889,
1867,
877,
3258,
260,
29946,
29880,
29892,
29871,
29896... |
molecool/io/__init__.py | aatishpr/molecool | 0 | 166691 | """
IO sub-package
"""
from .pdb import open_pdb
from .xyz import open_xyz, write_xyz
| [
1,
9995,
13,
5971,
1014,
29899,
5113,
13,
15945,
29908,
13,
13,
3166,
869,
29886,
2585,
1053,
1722,
29918,
29886,
2585,
13,
3166,
869,
20230,
1053,
1722,
29918,
20230,
29892,
2436,
29918,
20230,
13,
2
] |
ppq/IR/quantize.py | openppl-public/ppq | 100 | 90660 | <reponame>openppl-public/ppq
from typing import Any, List, Tuple
from ppq.core import (OperationQuantizationConfig, QuantizationStates,
TargetPlatform, TensorQuantizationConfig,
convert_any_to_torch_tensor)
from ppq.quantization.qfunction import BaseQuantFunction
from .base... | [
1,
529,
276,
1112,
420,
29958,
3150,
407,
29880,
29899,
3597,
29914,
407,
29939,
13,
3166,
19229,
1053,
3139,
29892,
2391,
29892,
12603,
552,
13,
13,
3166,
6499,
29939,
29889,
3221,
1053,
313,
10925,
22930,
2133,
3991,
29892,
22746,
2133,... |
src/access.py | zimingd/packer-rstudio | 0 | 37398 | #!/usr/bin/env python3
import jwt
import requests
import base64
import json
import boto3
import time
import functools
import os
from mod_python import apache
region = json.loads(requests.get('http://169.254.169.254/latest/dynamic/instance-identity/document').text)['region']
ssm_parameter_name_env_var = 'SYNAPSE_TOKE... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
432,
14554,
13,
5215,
7274,
13,
5215,
2967,
29953,
29946,
13,
5215,
4390,
13,
5215,
289,
3747,
29941,
13,
5215,
931,
13,
5215,
2090,
312,
8789,
13,
5215,
2897,
13,
... |
src/eos/transaction.py | Remmeauth/gimmeremmetokensbot | 3 | 71172 | """
Provide implementation of transaction.
"""
import os
from eosiopy.eosioparams import EosioParams
from eosiopy.nodenetwork import NodeNetwork
from eosiopy.rawinputparams import RawinputParams
from eosiopy import eosio_config
MASTER_WALLET_PRIVATE_KEY = os.environ.get('MASTER_WALLET_PRIVATE_KEY')
NODEOS_HOST = os.e... | [
1,
9995,
13,
1184,
29894,
680,
5314,
310,
10804,
29889,
13,
15945,
29908,
13,
5215,
2897,
13,
13,
3166,
321,
8156,
2270,
29889,
29872,
8156,
459,
279,
2232,
1053,
382,
359,
601,
9629,
13,
3166,
321,
8156,
2270,
29889,
29876,
13183,
26... |
tests/test_adapters.py | ScreenPyHQ/screenpy | 8 | 52230 | <filename>tests/test_adapters.py
import logging
from screenpy.narration.adapters.stdout_adapter import StdOutAdapter, StdOutManager
def prop():
"""The revolver in the foyer!"""
pass
class TestStdOutManager:
def test__outdent(self):
manager = StdOutManager()
manager.depth = []
m... | [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
328,
481,
2153,
29889,
2272,
13,
5215,
12183,
13,
13,
3166,
4315,
2272,
29889,
29876,
2749,
362,
29889,
328,
481,
2153,
29889,
25393,
29918,
21412,
1053,
624,
29881,
3744,
6168,
29892,
624,
... |
src/main/python/tokenizeExtended.py | DFKI-MLT/TransIns | 3 | 132918 | import re
from six import text_type
from sacremoses import MosesTokenizer, MosesDetokenizer
class MosesTokenizerExtended(MosesTokenizer):
"""
Extended Moses tokenizer with Catalan support
"""
CA_MIDDLE_DOT = r"([^{}\s\.'\`\,\-·])".format(MosesTokenizer.IsAlnum), r" \1 "
CA_MIDDLE_DOT_NO_LOWER_F... | [
1,
1053,
337,
13,
13,
3166,
4832,
1053,
1426,
29918,
1853,
13,
13,
3166,
7067,
1745,
15806,
1053,
6630,
267,
6066,
3950,
29892,
6630,
267,
6362,
4476,
3950,
13,
13,
13,
1990,
6630,
267,
6066,
3950,
5647,
2760,
29898,
29924,
15806,
606... |
app/components/OpenLogger/open_logger.py | Eksno/DevOps_Flask_Login | 1 | 147015 | import os
import errno
import logging
from datetime import datetime
from logging.handlers import TimedRotatingFileHandler
def make_sure_path_exists(path):
try:
os.makedirs(path)
except OSError as exception:
if exception.errno != errno.EEXIST:
raise
def create_handlers(log_fname=... | [
1,
1053,
2897,
13,
5215,
4589,
1217,
13,
5215,
12183,
13,
13,
3166,
12865,
1053,
12865,
13,
3166,
12183,
29889,
3179,
9306,
1053,
7870,
287,
21281,
1218,
2283,
4598,
13,
13,
13,
1753,
1207,
29918,
29879,
545,
29918,
2084,
29918,
9933,
... |
SelfPractice&Tutorial/12_Histogram.py | Omer-sync/ComputerVision_Studies | 0 | 1617079 | <filename>SelfPractice&Tutorial/12_Histogram.py
import cv2 as cv
import numpy as np
import matplotlib.pyplot as plt
img = cv.imread("D:/Programming/Python_Projects/Computer_Vision/ROV/FishSize/Source/" + "samplefromvideo_1.png")
cv.imshow('Park',img)
# Grayscale Histogram
gray = cv.cvtColor(img,cv.COLOR_BGR... | [
1,
529,
9507,
29958,
24313,
29925,
1461,
625,
29987,
29911,
6072,
29914,
29896,
29906,
29918,
29950,
391,
13342,
29889,
2272,
13,
5215,
13850,
29906,
408,
13850,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
5215,
22889,
29889,
2272,
5317,
... |
connect4/Connect4Tree.py | dl4184/alpha-zero-general | 0 | 169703 | import numpy as np
from numba import njit, b1, i1, int64, float64
@njit(b1(i1[:, :], i1, i1))
def was_winning_move(board, row, col):
if col == -1:
return False
player = board[row, col]
player_pieces = board == player
win_len = 4
row_win = player_pieces[row, :]
for i in range(row_win.s... | [
1,
1053,
12655,
408,
7442,
13,
3166,
954,
2291,
1053,
20199,
277,
29892,
289,
29896,
29892,
474,
29896,
29892,
938,
29953,
29946,
29892,
5785,
29953,
29946,
13,
13,
13,
29992,
29876,
29926,
277,
29898,
29890,
29896,
29898,
29875,
29896,
7... |
src/restfuls/apps/v1/apis/auth.py | Qinnnnnn/Watero_DataCenter | 0 | 115300 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
File : certify.py
Author : <NAME>
CreateDate : 2018-12-16 10:00:00
LastModifiedDate : 2018-12-16 10:00:00
Note : Agent认证接口,GET
"""
from flask_restful import Resource
from flask_restful import fields
from flask_restful import marshal_with
from flask_restful import reqparse... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
13,
2283,
584,
2284,
1598,
29889,
2272,
13,
13720,
584,
529,
5813,
29958,
13,
4391,
2539,
... |
test/functional/omni_graceperiod.py | fiscalobject/uniasset | 39 | 38814 | <filename>test/functional/omni_graceperiod.py
#!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test grace period."""
from test_framework.test_framework... | [
1,
529,
9507,
29958,
1688,
29914,
2220,
284,
29914,
290,
1240,
29918,
3874,
346,
19145,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29955... |
repl/repl.py | JesterOrNot/MathLang | 2 | 91447 | import sys
import tty
import re
import os
def syntax_highlight(input, keywords: dict):
i = 0
splitted = input.split(" ")
for f in splitted:
for keyword in keywords.keys():
if re.match(keyword, f):
splitted[i] = keywords.get(
keyword) + re.findall(key... | [
1,
1053,
10876,
13,
5215,
260,
1017,
13,
5215,
337,
13,
5215,
2897,
13,
13,
13,
1753,
5877,
29918,
28970,
29898,
2080,
29892,
29361,
29901,
9657,
1125,
13,
1678,
474,
353,
29871,
29900,
13,
1678,
8536,
4430,
353,
1881,
29889,
5451,
70... |
projects/projects/__init__.py | fgoettel/knx | 0 | 155995 | <gh_stars>0
"""Import, export, compare different project exports."""
__author__ = """<NAME>"""
__email__ = "<EMAIL>"
__version__ = "0.3.0"
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
17518,
29892,
5609,
29892,
7252,
1422,
2060,
29586,
1213,
15945,
13,
13,
1649,
8921,
1649,
353,
9995,
29966,
5813,
11903,
15945,
13,
1649,
5269,
1649,
353,
9872,
26862,
6227... |
digitalocean/Tags.py | SuleAlOthman/digitalocean | 2 | 1604992 | from .reqmethods import Req, Arrange
class Tags(Req, Arrange):
slug = 'tags'
def __init__(self, token):
self.setToken(token)
def storeTags(self, tag):
body = {"name":f'{tag}'}
data = self.post(self.slug, body)
return data
def getTag(self, tag):
data = self.get(f'{self.slug}/{tag}')
return self.arran... | [
1,
515,
869,
7971,
23515,
1053,
830,
29939,
29892,
826,
3881,
13,
13,
13,
1990,
917,
29898,
1123,
29939,
29892,
826,
3881,
1125,
13,
12,
29517,
353,
525,
11338,
29915,
13,
12,
1753,
4770,
2344,
12035,
1311,
29892,
5993,
1125,
13,
12,
... |
CPAC/AWS/aws_utils.py | danlurie/C-PAC | 0 | 105674 | # CPAC/AWS/aws_utils.py
#
# Contributing authors:
# <NAME>
'''
This module contains functions which assist in interacting with AWS
services, including uploading/downloading data and file checking.
'''
# Build and download a subject list
def build_download_sublist(bucket, bucket_prefix, local_prefix, sub_list):
''... | [
1,
396,
28505,
2477,
29914,
29909,
7811,
29914,
10467,
29918,
13239,
29889,
2272,
13,
29937,
13,
29937,
2866,
1091,
17068,
15717,
29901,
13,
29937,
529,
5813,
29958,
13,
13,
12008,
13,
4013,
3883,
3743,
3168,
607,
6985,
297,
16254,
292,
... |
src/coniql/plugin.py | thomascobb/coniql | 3 | 151771 | <reponame>thomascobb/coniql
import os
from pathlib import Path
from typing import AsyncIterator, Dict, List, Tuple, Union
import numpy as np
from coniql.device_config import ChannelConfig, DeviceConfig, DeviceInstance, walk
from coniql.types import Channel
PutValue = Union[bool, int, float, str, List[str], np.ndarra... | [
1,
529,
276,
1112,
420,
29958,
386,
290,
6151,
20838,
29914,
535,
29875,
1519,
13,
5215,
2897,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
19229,
1053,
20688,
20277,
29892,
360,
919,
29892,
2391,
29892,
12603,
552,
29892,
7761,
13,
13,... |
vows/transformer_test_data.py | wking/thumbor | 0 | 1612999 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com <EMAIL>
from thumbor.point import FocalPoint as fp
from thumbor.context import Context, Reque... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
28968,
272,
6382,
292,
2669,
13,
29937,
2045,
597,
3292,
29889,
510,
29914,
386,
3774,
272,
29914... |
tests/test_library.py | movermeyer/mopidy-oe1 | 9 | 46572 | from __future__ import unicode_literals
import unittest
from mock import Mock
from mopidy.models import Ref
from mopidy_oe1.library import OE1LibraryProvider, OE1LibraryUri, OE1UriType
class OE1LibraryUriTest(unittest.TestCase):
def test_parse_root_uri(self):
uri = 'oe1:directory'
result = OE1... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
5215,
443,
27958,
13,
13,
3166,
11187,
1053,
26297,
13,
13,
3166,
286,
459,
333,
29891,
29889,
9794,
1053,
9897,
13,
13,
3166,
286,
459,
333,
29891,
29918,
7297... |
Cursoemvideo/desafios/desafio008.py | gentildf/Python | 1 | 9161 | #Escreva um programa que leia um valor em metros e o exiba convertido em centimetros e milimetros.
n = float(input('\033[32mDigite o numero:\033[m'))
print('O número digitado é \033[33m{0:.0f}m\033[m.\n'
'Ele apresentado em centimetros fica \033[33m{0:.2f}cm\033[m.\n'
'Apresentado em milímetros fica \033[33... | [
1,
396,
14190,
1037,
1564,
1922,
16914,
712,
454,
423,
1922,
16497,
953,
24086,
321,
288,
429,
16912,
3588,
1941,
953,
1644,
17528,
1883,
321,
2316,
17528,
1883,
29889,
13,
29876,
353,
5785,
29898,
2080,
28909,
29900,
29941,
29941,
29961,... |
versions/3.0/karma/python/uri_manipulation.py | Lituta/dig-alignment | 5 | 161364 | from urllib import quote
import re
import uuid
class UM(object):
def __init__(self):
self.name = "Uri Manipulation"
@staticmethod
def uuid_uri(prefix):
"""Construct a URI using a UUID"""
return prefix + str(uuid.uuid1())
@staticmethod
def uuid_uri_or_empty(prefix, value)... | [
1,
515,
3142,
1982,
1053,
14978,
13,
5215,
337,
13,
5215,
318,
5416,
13,
13,
1990,
501,
29924,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
978,
353,
376,
14702,
2315,
666,
2785,
29908,
... |
syncgateway/__init__.py | ecordell/syncgateway-admin-client | 0 | 16952 | __author__ = '<NAME>'
__copyright__ = 'Copyright 2012-2015 Localmed, Inc.'
__version__ = "0.1.6"
__version_info__ = tuple(__version__.split('.'))
__short_version__ = __version__
| [
1,
4770,
8921,
1649,
353,
12801,
5813,
16299,
13,
1649,
8552,
1266,
1649,
353,
525,
11882,
1266,
29871,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29896,
29945,
9959,
2168,
29892,
9266,
6169,
13,
13,
13,
1649,
3259,
1649,
353,
376,
... |
setup.py | cedwards036/JHUHandshakeDataTools | 0 | 59524 | <reponame>cedwards036/JHUHandshakeDataTools
import pathlib
from setuptools import setup, find_packages
from jhu_handshake_data_tools import __version__, __author__, __email__
HERE = pathlib.Path(__file__).parent
README = (HERE / "README.md").read_text()
setup(
name="jhu_handshake_data_tools",
version=__ver... | [
1,
529,
276,
1112,
420,
29958,
1133,
2935,
29900,
29941,
29953,
29914,
29967,
29950,
29965,
3481,
845,
1296,
1469,
24183,
13,
5215,
2224,
1982,
13,
13,
3166,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
13,
3166,
432,
690... |
abstract_models/bisim/pick_puck.py | ondrejba/discrete_abstractions | 6 | 58894 | <filename>abstract_models/bisim/pick_puck.py
import numpy as np
class BisimPickPuckModel:
@classmethod
def get_state_block(cls, hand, layers, action_grid):
num_positions = action_grid.shape[0] * action_grid.shape[1]
action_grid = np.reshape(action_grid, (-1, 2))
if hand is not None:... | [
1,
529,
9507,
29958,
16595,
29918,
9794,
29914,
18809,
326,
29914,
23945,
29918,
29886,
2707,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1990,
16818,
326,
29925,
860,
29925,
2707,
3195,
29901,
13,
13,
1678,
732,
1990,
5696,
13... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.