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 |
|---|---|---|---|---|---|
src/datahub/common/date_range.py | project-origin/datahub-service | 1 | 66409 | <reponame>project-origin/datahub-service
from datetime import datetime
from dateutil.relativedelta import relativedelta
from .models import SummaryResolution
class LabelRange(object):
"""
Generates an ordered list of labels each corresponding to a period
of time (defined by its begin, end, and the "resol... | [
1,
529,
276,
1112,
420,
29958,
4836,
29899,
12574,
29914,
1272,
29882,
431,
29899,
5509,
13,
3166,
12865,
1053,
12865,
13,
3166,
2635,
4422,
29889,
2674,
1926,
287,
2554,
1053,
14215,
287,
2554,
13,
13,
3166,
869,
9794,
1053,
6991,
5219... |
quantity/history/api.py | wyjcpu/quantity | 0 | 1613524 | <filename>quantity/history/api.py
# -*- coding: utf-8 -*-
from quantity.history.day import Day
def init(dtype='D', export='csv', path='history'):
return Day(path=path, export=export).init()
def update_single_code(dtype='D', stock_code=None, path='history', export='csv'):
if stock_code is None:
raise... | [
1,
529,
9507,
29958,
22640,
29914,
18434,
29914,
2754,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
14728,
29889,
18434,
29889,
3250,
1053,
8373,
13,
13,
13,
1753,
2069,
29898,
... |
foo/pictureR/wordsTemplate.py | MangetsuC/arkHelper | 147 | 14724 | <filename>foo/pictureR/wordsTemplate.py<gh_stars>100-1000
from PIL import Image, ImageDraw, ImageFont
from numpy import asarray
from cv2 import cvtColor, COLOR_RGB2BGR, imshow, waitKey
from os import getcwd
def getFontSize_name(resolution):
x = resolution[0]
if x <= 1024:
return (16, (1024,576))
el... | [
1,
529,
9507,
29958,
5431,
29914,
12095,
29934,
29914,
9303,
6733,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
3166,
349,
6227,
1053,
7084,
29892,
7084,
8537,
29892,
7084,
... |
Packs/CaseManagement-Generic/Scripts/LinkIncidentsButton/LinkIncidentsButton.py | diCagri/content | 799 | 83208 | <filename>Packs/CaseManagement-Generic/Scripts/LinkIncidentsButton/LinkIncidentsButton.py<gh_stars>100-1000
import demistomock as demisto
action = demisto.getArg('action')
if action not in ['link', 'unlink']:
action = 'link'
demisto.results(demisto.executeCommand("linkIncidents", {"linkedIncidentIDs": demisto.get... | [
1,
529,
9507,
29958,
16638,
29879,
29914,
8259,
27107,
29899,
15809,
29914,
4081,
29879,
29914,
6595,
797,
29883,
16719,
3125,
29914,
6595,
797,
29883,
16719,
3125,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
2989... |
directory/block_producer/migrations/0008_increase_text_size.py | Remmeauth/bp-directory-back | 0 | 101882 | # Generated by Django 2.2.6 on 2019-10-10 08:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('block_producer', '0007_add_status_description_field'),
]
operations = [
migrations.AlterField(
model_name='blockproducer',
... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29906,
29889,
29953,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29896,
29900,
29899,
29896,
29900,
29871,
29900,
29947,
29901,
29941,
29945,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
... |
conftest.py | berpress/MT5WT | 0 | 13286 | import pytest
from common.common import NETTING_ACCOUNT
from fixture.application import Application
@pytest.fixture(scope="session")
def app(request):
base_url = request.config.getoption("--base_url")
fixture = Application(base_url)
fixture.wd.maximize_window()
fixture.wd.implicitly_wait(10)
yield... | [
1,
1053,
11451,
1688,
13,
3166,
3619,
29889,
9435,
1053,
405,
2544,
29911,
4214,
29918,
2477,
18736,
13,
3166,
5713,
15546,
29889,
6214,
1053,
8427,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
29898,
6078,
543,
7924,
1159,
13,
17... |
setup.py | Bonifatius94/sc2sim | 0 | 32738 | <gh_stars>0
from setuptools import setup
def load_pip_dependency_list():
with open('./requirements.txt', 'r', encoding='utf-8') as file:
return file.read().splitlines()
def load_readme_desc():
with open("README.md", "r", encoding="utf-8") as readme_file:
return readme_file.read()
setup(
n... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
731,
21245,
8789,
1053,
6230,
13,
13,
1753,
2254,
29918,
13096,
29918,
10836,
29918,
1761,
7295,
13,
1678,
411,
1722,
877,
6904,
12277,
1860,
29889,
3945,
742,
525,
29878,
742,
80... |
tests/test_tree_adapter.py | benkrikler/fast-carpenter-github-test | 12 | 88480 | import awkward as ak
import numpy as np
import pytest
from pytest_lazyfixture import lazy_fixture
from fast_carpenter.testing import FakeBEEvent
import fast_carpenter.tree_adapter as tree_adapter
from fast_carpenter.tree_adapter import ArrayMethods
####################################################################... | [
1,
1053,
13689,
1328,
408,
11208,
13,
5215,
12655,
408,
7442,
13,
5215,
11451,
1688,
13,
3166,
11451,
1688,
29918,
433,
1537,
7241,
15546,
1053,
17366,
29918,
7241,
15546,
13,
13,
3166,
5172,
29918,
4287,
29886,
5893,
29889,
13424,
1053,
... |
main/python-sphinx-removed-in/template.py | RoastVeg/cports | 0 | 37759 | <reponame>RoastVeg/cports
pkgname = "python-sphinx-removed-in"
pkgver = "0.2.1"
pkgrel = 0
build_style = "python_module"
hostmakedepends = ["python-setuptools"]
checkdepends = ["python-sphinx"]
depends = ["python-sphinx"]
pkgdesc = "Sphinx extension for versionremoved and removed-in directives"
maintainer = "q66 <<EMAI... | [
1,
529,
276,
1112,
420,
29958,
9588,
579,
29963,
387,
29914,
29883,
4011,
13,
15865,
978,
353,
376,
4691,
29899,
29879,
561,
14668,
29899,
1745,
8238,
29899,
262,
29908,
13,
15865,
369,
353,
376,
29900,
29889,
29906,
29889,
29896,
29908,
... |
src/Cogs/InfoCog.py | kodyVS/Discord-Bot-Development | 5 | 11746 | <filename>src/Cogs/InfoCog.py
from discord.ext import commands
import discord
import requests
from bs4 import BeautifulSoup
# work in progress! more languages welcome!
class InfoCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name = 'docs', brief = 'programming language d... | [
1,
529,
9507,
29958,
4351,
29914,
29907,
12099,
29914,
3401,
29907,
468,
29889,
2272,
13,
3166,
2313,
536,
29889,
1062,
1053,
8260,
13,
5215,
2313,
536,
13,
13,
5215,
7274,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
13,
13,
29937... |
app/__init__.py | ednilsonlomazi/AnonymousRepSys-API | 0 | 104424 | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from flask import Flask
app = Flask(__name__)
app.config['SECRET_KEY'] = 'uma-string-muito-segura'
app.config['DEBUG'] = True
engine = create_engine('mysql+pymysql://admdenuncia:adm-... | [
1,
515,
4576,
284,
305,
6764,
1053,
1653,
29918,
10599,
13,
3166,
4576,
284,
305,
6764,
29889,
1062,
29889,
311,
16544,
1230,
1053,
7669,
1230,
29918,
3188,
13,
3166,
4576,
284,
305,
6764,
29889,
555,
1053,
4867,
28107,
13,
3166,
29784,... |
pywren/pywren_ibm_cloud/invokers.py | thetolga/pywren-ibm-cloud | 0 | 5617 | #
# Copyright 2018 PyWren Team
#
# 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... | [
1,
396,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
10772,
29956,
1267,
8583,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
... |
utils.py | KiranRaghavendra1248/Yolo-v3 | 0 | 127551 | from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import cv2
# Note origin is top-left corner of the image
# Formula for bx,by,bh,w
# bx=sigmoid(tx)+cx , by=sigmoid(ty)+cy
# where tx,ty is prediction ... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8542,
30004,
13,
30004,
13,
5215,
4842,
305,
30004,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
30004,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
30004,
13,
3166,
4842,
... |
panel/depends.py | apatlpo/panel | 1 | 101442 | from __future__ import absolute_import, division, unicode_literals
import param
from .widgets import Widget
ipywidget_classes = {}
def param_value_if_widget(arg):
if isinstance(arg, Widget):
return arg.param.value
from .pane.ipywidget import IPyWidget
if IPyWidget.applies(arg) and hasattr(arg,... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
29104,
29918,
20889,
1338,
13,
13,
5215,
1828,
13,
13,
3166,
869,
8030,
29879,
1053,
27080,
13,
13,
666,
5693,
3690,
29918,
13203,
353,
6571,
13,
13,
13,
17... |
Asap-3.8.4/Python/asap3/Utilities/BrennerImport.py | auag92/n2dm | 1 | 180024 | <filename>Asap-3.8.4/Python/asap3/Utilities/BrennerImport.py
# Copyright (C) 2007 CAMP
# Please see the accompanying LICENSE file for further information.
"""Imports a brenner *.d coordinate file and/or a input.d file"""
"""This file is used with the BrennerPotential only"""
"""TODO: Add nice error messages"""
from ... | [
1,
529,
9507,
29958,
2887,
481,
29899,
29941,
29889,
29947,
29889,
29946,
29914,
11980,
29914,
294,
481,
29941,
29914,
7270,
1907,
29914,
29933,
1267,
1089,
17518,
29889,
2272,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
... |
src/sofie_pd_component/dns/model/__init__.py | SOFIE-project/Provisioning-and-Discovery | 1 | 155184 | """
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not... | [
1,
9995,
13,
29937,
10413,
21144,
304,
278,
13380,
18540,
10606,
313,
3289,
29943,
29897,
1090,
697,
470,
901,
13,
29937,
17737,
3406,
19405,
8571,
4110,
29889,
29871,
2823,
278,
6058,
12107,
934,
13235,
13,
29937,
411,
445,
664,
363,
5... |
tb/test_arp_64.py | sergachev/verilog-ethernet | 2 | 8548 | <reponame>sergachev/verilog-ethernet
#!/usr/bin/env python
"""
Copyright (c) 2014-2018 <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... | [
1,
529,
276,
1112,
420,
29958,
643,
29887,
1829,
29894,
29914,
369,
26140,
29899,
621,
824,
300,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
13,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,... |
leo/core/leoRst.py | thomasbuttler/leo-editor | 1,550 | 1610725 | # -*- coding: utf-8 -*-
#@+leo-ver=5-thin
#@+node:ekr.20090502071837.3: * @file leoRst.py
#@@first
#@+<< docstring >>
#@+node:ekr.20090502071837.4: ** << docstring >>
"""Support for restructured text (rST), adapted from rst3 plugin.
For full documentation, see: http://leoeditor.com/rstplugin3.html
To generate documen... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
29992,
29974,
280,
29877,
29899,
369,
29922,
29945,
29899,
386,
262,
13,
29937,
29992,
29974,
3177,
29901,
1416,
29878,
29889,
29906,
29900,
29900,
... |
functest/tests/unit/odl/test_odl.py | hashnfv/hashnfv-functest | 0 | 7320 | <gh_stars>0
#!/usr/bin/env python
# Copyright (c) 2016 Orange and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29953,
26048,
322,
4045,
29889,
13,
29937,
13,
29937,
2178,
... |
code_week11_76_712/unique_paths.py | dylanlee101/leetcode | 0 | 1837 | '''
一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为“Start” )。
机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为“Finish”)。
问总共有多少条不同的路径?
例如,上图是一个7 x 3 的网格。有多少可能的路径?
示例 1:
输入: m = 3, n = 2
输出: 3
解释:
从左上角开始,总共有 3 条路径可以到达右下角。
1. 向右 -> 向右 -> 向下
2. 向右 -> 向下 -> 向右
3. 向下 -> 向右 -> 向右
示例 2:
输入: m = 7, n = 3
输出: 28
来源:力扣(LeetCode)
链接:https:... | [
1,
14550,
13,
30287,
30502,
31429,
30943,
30313,
30956,
30909,
30287,
30502,
286,
921,
302,
29871,
31222,
31168,
30210,
31651,
30429,
31432,
29871,
30419,
31558,
31020,
30940,
30505,
30557,
30861,
30275,
31062,
31410,
30573,
30015,
4763,
30024,... |
example/example.py | jaewoolee82/translatetool | 2 | 172806 | <filename>example/example.py
import translatetool
import asyncio
async def runit():
add = translatetool.translate("Papago Client ID", "Papago Client Secret")
add1 = await add.translate("ko", "en", "안녕하세요, 테스트 입니다.") # 언어: ko, en, ja, zh-CN, zh-TW, vi, id, th, de, ru, es, it, fr
print(add1)
asyncio.set_e... | [
1,
529,
9507,
29958,
4773,
29914,
4773,
29889,
2272,
13,
5215,
1301,
5066,
300,
1507,
13,
5215,
408,
948,
3934,
13,
13,
13,
12674,
822,
1065,
277,
7295,
13,
1678,
788,
353,
1301,
5066,
300,
1507,
29889,
21652,
703,
29925,
481,
4425,
... |
spacy/lang/tt/__init__.py | algteam/spacy_zh_model | 5 | 1600179 | <reponame>algteam/spacy_zh_model<filename>spacy/lang/tt/__init__.py
# coding: utf8
from __future__ import unicode_literals
from .lex_attrs import LEX_ATTRS
from .punctuation import TOKENIZER_INFIXES
from .stop_words import STOP_WORDS
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from ..tokenizer_except... | [
1,
529,
276,
1112,
420,
29958,
9564,
14318,
29914,
1028,
4135,
29918,
17599,
29918,
4299,
29966,
9507,
29958,
1028,
4135,
29914,
3893,
29914,
698,
29914,
1649,
2344,
26914,
2272,
13,
29937,
14137,
29901,
23616,
29947,
30004,
13,
3166,
4770,... |
scripts/06_I.py | HalfInner/AoC2019 | 1 | 180439 | '''
--- Day 6: Universal Orbit Map ---
You've landed at the Universal Orbit Map facility on Mercury. Because navigation in space often involves transferring between orbits, the orbit maps here are useful for finding efficient routes between, for example, you and Santa. You download a map of the local orbits (your puzzl... | [
1,
14550,
13,
5634,
8373,
29871,
29953,
29901,
21536,
1394,
2966,
7315,
11474,
13,
3492,
29915,
345,
2982,
287,
472,
278,
21536,
1394,
2966,
7315,
24454,
373,
29389,
29891,
29889,
7311,
11322,
297,
2913,
4049,
20789,
6782,
5393,
1546,
470... |
ping-pong_main.py | AlgoritmikaPodolsk/ping_pong | 1 | 176739 | from pygame import *
from random import randint
# подгружаем отдельно функции для работы со шрифтом
font.init()
font1 = font.Font(None, 80)
back = (100, 100, 200)
lose = font1.render('YOU LOSE!', True, (180, 0, 0))
# класс-родитель для других спрайтов
class GameSprite(sprite.Sprite):
# конструктор класса
def _... | [
1,
515,
22028,
1053,
334,
13,
3166,
4036,
1053,
20088,
524,
13,
29937,
3693,
29969,
1086,
2711,
3098,
22362,
11372,
20153,
3540,
3807,
24534,
1778,
3354,
641,
30011,
4816,
13,
5657,
29889,
2344,
580,
13,
5657,
29896,
353,
4079,
29889,
9... |
pynetlib/tests/test_route.py | migibert/pynet | 2 | 156117 | <gh_stars>1-10
from __future__ import absolute_import
import mock
import unittest
from . import read_file
from nose_parameterized import parameterized
from pynetlib.route import Route
from pynetlib.exceptions import ObjectNotFoundException, ObjectAlreadyExistsException
class TestRoute(unittest.TestCase):
def set... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
5215,
11187,
13,
5215,
443,
27958,
13,
3166,
869,
1053,
1303,
29918,
1445,
13,
3166,
26414,
29918,
15501,
... |
vega/search_space/networks/tensorflow/losses/__init__.py | Lzc06/vega | 12 | 176951 | <reponame>Lzc06/vega<gh_stars>10-100
from .cross_entropy_weight_decay import CrossEntropyWeightDecay
from .mix_auxiliary_loss import MixAuxiliaryLoss
| [
1,
529,
276,
1112,
420,
29958,
29931,
29920,
29883,
29900,
29953,
29914,
345,
3249,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
869,
19128,
29918,
296,
14441,
29918,
7915,
29918,
7099,
388,
105... |
aboutus/views.py | maxalmina/kudo | 0 | 78595 | <reponame>maxalmina/kudo<filename>aboutus/views.py
from django.shortcuts import render
# Create your views here.
def labView(request):
return render(request, 'aboutus/aboutus.html') | [
1,
529,
276,
1112,
420,
29958,
3317,
284,
13257,
29914,
29895,
5333,
29966,
9507,
29958,
12717,
375,
29914,
7406,
29889,
2272,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
13,
13,
29937,
6204,
596,
8386,
1244,
29889,
13,
1753,
... |
test/wavelet_test.py | fulmen27/SpectroFit | 1 | 69075 | """import pywt
import numpy as np
import matplotlib.pyplot as plt
t = np.linspace(-1, 1, 200, endpoint=False)
sig = np.cos(2 * np.pi * 7 * t) + np.real(np.exp(-7*(t-0.4)**2)*np.exp(1j*2*np.pi*2*(t-0.4)))
plt.plot(t, sig)
plt.show()
widths = np.arange(1, 31)
cwtmatr, freqs = pywt.cwt(sig, widths, 'mexh')
print(cwtmatr)... | [
1,
9995,
5215,
282,
5693,
29873,
13,
5215,
12655,
408,
7442,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
29873,
353,
7442,
29889,
1915,
3493,
6278,
29896,
29892,
29871,
29896,
29892,
29871,
29906,
29900,
29900,
29892,
16248,
29922,
... |
templatebot/utils/logger.py | elfq/template-bot-v2 | 1 | 199653 | import asyncio
from aiohttp import ClientSession
from requests import post
from datetime import datetime
from termcolor import colored
from logging import debug, info, warn, error, critical
termc = {
"debug": "white",
"info": "green",
"warn": "yellow",
"error": "red",
"critical": "red",
}
class L... | [
1,
1053,
408,
948,
3934,
13,
3166,
263,
601,
1124,
1053,
12477,
7317,
13,
3166,
7274,
1053,
1400,
13,
3166,
12865,
1053,
12865,
13,
3166,
1840,
2780,
1053,
28684,
13,
3166,
12183,
1053,
4744,
29892,
5235,
29892,
29383,
29892,
1059,
2989... |
demo/views/utils.py | SalvatoreTosti/pyramid-demo | 1 | 128624 | import json
def failure(message, status=400):
return {
'status' : status,
'message' : message,
'payload' : ''
}
def success(message='success.', payload='', status=200):
return {
'status' : status,
'message': message,
'payload' : payload
}
def validateJS... | [
1,
1053,
4390,
13,
13,
1753,
10672,
29898,
4906,
29892,
4660,
29922,
29946,
29900,
29900,
1125,
13,
1678,
736,
426,
13,
4706,
525,
4882,
29915,
584,
4660,
29892,
13,
4706,
525,
4906,
29915,
584,
2643,
29892,
13,
4706,
525,
23813,
29915,... |
src/main/python/taf/foundation/plugins/web/selenium/browser.py | WesleyPeng/uiXautomation | 6 | 1602828 | # Copyright (c) 2017-2018 {Flair Inc.} <NAME>
#
# 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... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29955,
29899,
29906,
29900,
29896,
29947,
426,
29943,
433,
381,
9266,
5003,
529,
5813,
29958,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
298... |
local_branching_data_generation.py | deepmind/neural_lns | 2 | 81309 | # Copyright 2021 DeepMind Technologies Limited.
#
# 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 agre... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
21784,
29924,
513,
8364,
11763,
28873,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1... |
yocto/poky/bitbake/lib/bb/ui/crumbs/hobcolor.py | jxtxinbing/ops-build | 16 | 23934 | <filename>yocto/poky/bitbake/lib/bb/ui/crumbs/hobcolor.py
#
# BitBake Graphical GTK User Interface
#
# Copyright (C) 2012 Intel Corporation
#
# Authored by <NAME> <<EMAIL>>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as... | [
1,
529,
9507,
29958,
9029,
312,
29877,
29914,
29886,
554,
29891,
29914,
2966,
29890,
1296,
29914,
1982,
29914,
1327,
29914,
1481,
29914,
7283,
3774,
29879,
29914,
29882,
711,
2780,
29889,
2272,
13,
29937,
13,
29937,
18531,
29933,
1296,
1236... |
tests/system_tests/rest_api.py | Curtis241/taskmgr | 0 | 186759 | <gh_stars>0
import requests
class RequestBody:
def __init__(self, name: str, value1: str = None, value2: str = None):
self.__name = name
self.__value1 = value1
self.__value2 = value2
def __iter__(self):
yield "name", self.__name
if self.__value1 is not None:
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
7274,
13,
13,
13,
1990,
10729,
8434,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29901,
851,
29892,
995,
29896,
29901,
851,
353,
6213,
29892,
995,
29906,
29901... |
sentence-reading/common_words.py | michalovsky/knowlegde-based-ai-mini-projects | 0 | 155764 | names = ["Serena",
"Andrew",
"Bobbie",
"Cason",
"David",
"Farzana",
"Frank",
"Hannah",
"Ida",
"Irene",
"Jim",
"Jose",
"Keith",
"Laura",
"Lucy",
"Meredith",
"Nick",
"Ad... | [
1,
2983,
353,
6796,
1748,
2386,
613,
13,
308,
376,
2855,
3973,
613,
13,
308,
376,
29362,
10993,
613,
13,
308,
376,
29907,
1658,
613,
13,
308,
376,
19504,
613,
13,
308,
376,
29943,
11129,
1648,
613,
13,
308,
376,
7675,
29895,
613,
... |
infinite_scroll_pagination/serializers.py | nitely/django-infinite-scroll-pagination | 89 | 175351 | <gh_stars>10-100
#-*- coding: utf-8 -*-
import re
import time
from datetime import datetime
from django.core.paginator import InvalidPage
from django.utils import timezone
from django.conf import settings
__all__ = [
'page_key',
'to_page_key',
'InvalidPage']
PAGE_RE = re.compile(r'^(?P<value>[0-9]+\.[0-... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
29899,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
337,
13,
5215,
931,
13,
3166,
12865,
1053,
12865,
13,
13... |
sellalert.py | sjmiller609/cvs_scraper | 0 | 21960 | import requests
import json
from pprint import pprint
import re
import time
import sys
#getdata = requests.get(geturl)
#pprint (vars(getdata))
from bs4 import BeautifulSoup
from geopy.geocoders import Nominatim
if len(sys.argv) != 4:
print(sys.argv[0]+" <item> <location> <num items>")
exit()
#get list of prod... | [
1,
1053,
7274,
13,
5215,
4390,
13,
3166,
282,
2158,
1053,
282,
2158,
13,
5215,
337,
13,
5215,
931,
13,
5215,
10876,
13,
29937,
657,
1272,
353,
7274,
29889,
657,
29898,
657,
2271,
29897,
13,
29937,
407,
29878,
524,
313,
16908,
29898,
... |
Python/shortest-way-to-form-string.py | sm2774us/leetcode_interview_prep_2021 | 0 | 166110 | <filename>Python/shortest-way-to-form-string.py
# Time: O(m + n), m is the length of source
# , n is the length of target
# Space: O(m)
# greedy solution
class Solution(object):
def shortestWay(self, source, target):
"""
:type source: str
:type target: str
:rtype: in... | [
1,
529,
9507,
29958,
11980,
29914,
12759,
342,
29899,
1582,
29899,
517,
29899,
689,
29899,
1807,
29889,
2272,
13,
29937,
5974,
29901,
29871,
438,
29898,
29885,
718,
302,
511,
286,
338,
278,
3309,
310,
2752,
13,
29937,
18884,
1919,
302,
... |
amocrm_asterisk_ng/crm/amocrm/kernel/calls/call_records/file_converters/core/__init__.py | iqtek/amocrn_asterisk_ng | 0 | 5702 | from .IFileConverter import IFileConverter
| [
1,
515,
869,
29902,
2283,
18545,
1053,
306,
2283,
18545,
13,
2
] |
necromancer/cli/shell_command.py | SeedyROM/necromancer | 0 | 174527 | '''
Usage: necro shell|s USER_COMMAND
Options
USER_COMMAND a command in the .necro.toml
'''
from docopt import docopt
if __name__ == '__main__':
print(docopt(__doc__))
| [
1,
14550,
13,
27573,
29901,
452,
24077,
6473,
29989,
29879,
3148,
1001,
29918,
19795,
1529,
2797,
13,
13,
5856,
13,
1678,
3148,
1001,
29918,
19795,
1529,
2797,
4706,
263,
1899,
297,
278,
869,
484,
24077,
29889,
15135,
29880,
13,
12008,
... |
implementation/h2o-fakegame/h2o-py/h2o/model/multinomial.py | kordikp/AutoMLprediction | 1 | 87156 | <reponame>kordikp/AutoMLprediction
from builtins import zip
from ..frame import H2OFrame
from ..h2o import H2OConnection
from .model_base import ModelBase
class H2OMultinomialModel(ModelBase):
def _make_model(self):
return H2OMultinomialModel()
def confusion_matrix(self, data):
"""
Returns a confusio... | [
1,
529,
276,
1112,
420,
29958,
29619,
638,
29886,
29914,
12300,
1988,
11965,
2463,
13,
3166,
4240,
1144,
1053,
14319,
13,
3166,
6317,
2557,
1053,
379,
29906,
29949,
4308,
13,
3166,
6317,
29882,
29906,
29877,
1053,
379,
29906,
29949,
5350,... |
investing_algorithm_framework/views/utils.py | coding-kitties/investing-algorithm-framework | 9 | 156680 | from flask import jsonify
def normalize_query_param(value):
"""
Given a non-flattened query parameter value,
and if the value is a list only containing 1 item,
then the value is flattened.
:param value: a value from a query parameter
:return: a normalized query parameter value
"""
if... | [
1,
515,
29784,
1053,
4390,
1598,
13,
13,
13,
1753,
4226,
675,
29918,
1972,
29918,
3207,
29898,
1767,
1125,
13,
1678,
9995,
13,
1678,
11221,
263,
1661,
29899,
1579,
8606,
287,
2346,
3443,
995,
29892,
13,
1678,
322,
565,
278,
995,
338,
... |
publications/ECSO2017/poissonvspsra.py | clancia/air-traffic-data-driven-modelling | 0 | 61746 | import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(context='talk')
palette = sns.color_palette()
beta = 1
landa = 1./beta
reps = 25
pois = np.random.exponential(beta, reps)
pois = pois.cumsum()
psra = np.arange(reps)*beta + np.random.exponential(beta, reps) - landa
psra.sort()
f, ax =... | [
1,
1053,
12655,
408,
7442,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
409,
370,
1398,
408,
269,
1983,
13,
13,
29879,
1983,
29889,
842,
29898,
4703,
2433,
29873,
2235,
1495,
13,
29886,
26456,
353,
269,
1983,
29889,
2780,
... |
python/my_custard.py | ensan-hcl/CustardKit | 1 | 73049 | <filename>python/my_custard.py
from source.custard import *
custard = Custard(
identifier="my_custard",
language=Language.ja_JP,
input_style=InputStyle.direct,
metadata=Metadata(
custard_version="1.0",
display_name="私のカスタード",
),
interface=Interface(
key_style=KeyStyle.te... | [
1,
529,
9507,
29958,
4691,
29914,
1357,
29918,
29883,
504,
538,
29889,
2272,
13,
3166,
2752,
29889,
29883,
504,
538,
1053,
334,
13,
13,
29883,
504,
538,
353,
315,
504,
538,
29898,
13,
1678,
15882,
543,
1357,
29918,
29883,
504,
538,
61... |
PythonExercicios/ex062.py | VitorFRodrigues/Python-curso | 0 | 174163 | print('{:=^40}'.format(' Progressão Aritmética '))
primeiro = int(input('Digite o primeiro valor da PA: '))
razao = int(input('Digite a razão da PA: '))
print('Os 10 primeiros termos da progressão serão: ', end=' ')
cont = 0
termos = 10
while cont != termos:
proximo = primeiro+razao*cont
print(proximo, end=' -... | [
1,
1596,
877,
29912,
9361,
29985,
29946,
29900,
29913,
4286,
4830,
877,
20018,
1368,
319,
768,
29885,
24142,
525,
876,
13,
10080,
3350,
353,
938,
29898,
2080,
877,
14991,
568,
288,
19695,
16497,
1146,
17687,
29901,
525,
876,
13,
336,
13... |
xsearch/__init__.py | e2dubba/py-xsearch | 0 | 1607201 | <gh_stars>0
from .xsearch import *
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
869,
29916,
4478,
1053,
334,
13,
2
] |
tests/test_FileReader.py | llj0824/nycMap | 0 | 137565 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from nycmap.util import FileReader
TEST_CSV_FILE = 'data/rollingsales_queensSample.csv'
TEST_COLUMN = "NEIGHBORHOOD"
def testParseExcelFile_correctSize():
df = FileReader.parseCsvFile(TEST_CSV_FILE)
assert df[TEST_COLUMN].size == 60
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
11451,
1688,
13,
3166,
7098,
29883,
1958,
29889,
4422,
1053,
3497,
6982,
13,
13,
18267,
2991... |
tests/base/test_endpoints_authentication.py | rapydo/http-api | 8 | 18494 | from restapi.connectors import Connector
from restapi.env import Env
from restapi.services.authentication import BaseAuthentication, Role
from restapi.tests import API_URI, BaseTests, FlaskClient
from restapi.utilities.logs import log
class TestApp(BaseTests):
def test_no_auth(self, client: FlaskClient) -> None:
... | [
1,
515,
1791,
2754,
29889,
6915,
943,
1053,
1281,
484,
2801,
13,
3166,
1791,
2754,
29889,
6272,
1053,
1174,
29894,
13,
3166,
1791,
2754,
29889,
9916,
29889,
23055,
1053,
7399,
16746,
29892,
1528,
280,
13,
3166,
1791,
2754,
29889,
21150,
... |
tests/checks/integration/test_os_updates.py | borgified/datadog-checks | 100 | 189133 | <reponame>borgified/datadog-checks
# 3p
import mock
# project
from checks import AgentCheck
from tests.checks.common import AgentCheckTest, load_check
class TestFileUnit(AgentCheckTest):
CHECK_NAME = 'os_updates'
def __init__(self, *args, **kwargs):
AgentCheckTest.__init__(self, *args, **kwargs)
... | [
1,
529,
276,
1112,
420,
29958,
14203,
2164,
29914,
4130,
328,
468,
29899,
3198,
29879,
13,
29937,
29871,
29941,
29886,
13,
5215,
11187,
13,
13,
29937,
2060,
13,
3166,
12747,
1053,
28330,
5596,
13,
3166,
6987,
29889,
3198,
29879,
29889,
... |
deps/lib/python3.5/site-packages/openzwave/group.py | jfarmer08/hassio | 0 | 42348 | # -*- coding: utf-8 -*-
"""
.. module:: openzwave.group
This file is part of **python-openzwave** project https://github.com/OpenZWave/python-openzwave.
:platform: Unix, Windows, MacOS X
:sinopsis: openzwave API
.. moduleauthor: bibi21000 aka <NAME> <<EMAIL>>
License : GPL(v3)
**python-openzwave** is free s... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
636,
3883,
1057,
1722,
7659,
1351,
29889,
2972,
13,
13,
4013,
934,
338,
760,
310,
3579,
4691,
29899,
3150,
7659,
1351,
1068,
2060,
20... |
toontown/ai/HolidayBaseAI.py | LittleNed/toontown-stride | 3 | 104999 | <filename>toontown/ai/HolidayBaseAI.py
from direct.directnotify.DirectNotifyGlobal import *
class HolidayBaseAI:
def __init__(self, air, holidayId):
self.air = air
self.holidayId = holidayId
def start(self):
pass
def stop(self):
pass | [
1,
529,
9507,
29958,
517,
609,
776,
29914,
1794,
29914,
29950,
17211,
388,
5160,
23869,
29889,
2272,
13,
3166,
1513,
29889,
11851,
25140,
29889,
17392,
3664,
1598,
12756,
1053,
334,
13,
13,
1990,
4168,
22394,
5160,
23869,
29901,
13,
1678,... |
jp.atcoder/abc212/abc212_g/24795188.py | kagemeka/atcoder-submissions | 1 | 91823 | <filename>jp.atcoder/abc212/abc212_g/24795188.py<gh_stars>1-10
import typing
from collections import defaultdict
class FindDivisors():
def __call__(
self,
n: int,
) -> typing.List[int]:
a = []
i = 1
while i * i < n:
if n % i:
i += 1
continue
a.append(i)
a.appe... | [
1,
529,
9507,
29958,
16865,
29889,
271,
29883,
6119,
29914,
10736,
29906,
29896,
29906,
29914,
10736,
29906,
29896,
29906,
29918,
29887,
29914,
29906,
29946,
29955,
29929,
29945,
29896,
29947,
29947,
29889,
2272,
29966,
12443,
29918,
303,
1503,... |
tools/demo_single_img_test.py | neolixcn/BiSeNet | 0 | 161221 |
import sys
sys.path.insert(0, '.')
import os
import argparse
import torch
import torch.nn as nn
from PIL import Image
import numpy as np
import cv2
import time
import lib.transform_cv2 as T
from lib.models import model_factory
from configs import cfg_factory
from lib.cityscapes_labels import trainId2color
torch.set_... | [
1,
29871,
13,
5215,
10876,
13,
9675,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
15300,
1495,
13,
5215,
2897,
13,
5215,
1852,
5510,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
3166,
349,
6227,
1053,
... |
scripts/netket/mbl/check/3_ndm_proc.py | GillianGrayson/qs | 0 | 137382 | import netket as nk
import numpy as np
from numpy import linalg as la
import pandas as pd
import os
from netket.hilbert import Fock
from tqdm import tqdm
# Model params
model = 'mbl'
N = 8
seed = 3
W = 15.0
U = 1.0
J = 1.0
dt = 1
gamma = 0.1
# Ansatz params
beta = 2
alpha = 2
n_samples = 5000
n_iter = 1000
np.random... | [
1,
1053,
7787,
7873,
408,
302,
29895,
13,
5215,
12655,
408,
7442,
13,
3166,
12655,
1053,
301,
979,
29887,
408,
425,
13,
5215,
11701,
408,
10518,
13,
5215,
2897,
13,
3166,
7787,
7873,
29889,
29882,
309,
2151,
1053,
383,
1698,
13,
3166,... |
flask_login_without_orm/main.py | leynier/flask-login-without-orm | 5 | 144231 | from json import load
from os import getenv
from typing import Dict, Optional
from flask import Flask, redirect, url_for
from flask_login import (
LoginManager,
UserMixin,
current_user,
login_required,
login_user,
logout_user,
)
app = Flask(__name__)
app.config["SECRET_KEY"] = getenv("SECRET_K... | [
1,
515,
4390,
1053,
2254,
13,
3166,
2897,
1053,
679,
6272,
13,
3166,
19229,
1053,
360,
919,
29892,
28379,
13,
13,
3166,
29784,
1053,
2379,
1278,
29892,
6684,
29892,
3142,
29918,
1454,
13,
3166,
29784,
29918,
7507,
1053,
313,
13,
1678,
... |
test/warning_test.py | evanofslack/samila | 1 | 162122 | <gh_stars>1-10
# -*- coding: utf-8 -*-
"""
>>> import os
>>> import json
>>> from samila import *
>>> from pytest import warns
>>> g = GenerativeImage(lambda x,y: 0, lambda x,y: 0)
>>> g.generate(step=0.1)
>>> result = g.save_data()
>>> g_ = GenerativeImage(data=open('data.json', 'r'))
>>> g_.data1 == g.data1
True
>>> ... | [
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,
15945,
29908,
13,
6778,
29958,
1053,
2897,
13,
6778,
29958,
1053,
4390,
13,
6778,
... |
tests/reproducibility/fixtures.py | zblumen/stellargraph | 3 | 88576 | <gh_stars>1-10
# -*- coding: utf-8 -*-
#
# Copyright 2020 Data61, CSIRO
#
# 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 a... | [
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,
29937,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
3630,
29953,
29896,
... |
V2RaycSpider0825/MiddleKey/VMes_IO.py | TOMJERRY23333/V2RayCloudSpider | 1 | 2235 | from spiderNest.preIntro import *
path_ = os.path.dirname(os.path.dirname(__file__)) + '/dataBase/log_information.csv'
def save_login_info(VMess, class_):
"""
VMess入库
class_: ssr or v2ray
"""
now = str(datetime.now()).split('.')[0]
with open(path_, 'a', encoding='utf-8', newline='') as f:
... | [
1,
515,
805,
1241,
29940,
342,
29889,
1457,
2928,
307,
1053,
334,
13,
13,
2084,
29918,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
876,
718,
8207,
1272,
5160,
29914,
1188,
29918,
19678,
... |
understandability/understandability.py | zhangshyue/regex-library | 0 | 194282 | <filename>understandability/understandability.py
import root_pb2 as root
import re
import sys
import base64
from google.protobuf.json_format import MessageToDict
import json
escape_reserved = ['+', '*', '?', '^', '$', '\\', '.', '[', ']', '{', '}', '(', ')', '|', '/']
messages = []
def add_annotation(entity, note, o... | [
1,
529,
9507,
29958,
5062,
1689,
3097,
29914,
5062,
1689,
3097,
29889,
2272,
13,
5215,
3876,
29918,
24381,
29906,
408,
3876,
13,
5215,
337,
13,
5215,
10876,
13,
5215,
2967,
29953,
29946,
13,
3166,
5386,
29889,
17529,
9721,
29889,
3126,
... |
nemo/collections/nlp/utils/evaluation_utils.py | ParikhKadam/NeMo | 1 | 23242 | # =============================================================================
# Copyright 2020 NVIDIA. 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://ww... | [
1,
396,
1275,
9166,
9166,
9166,
9166,
4936,
25512,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
405,
13044,
10764,
29889,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
1007... |
enderecos/models.py | evaristofm/pontos_turisticos | 0 | 122284 | from django.db import models
class Endereco(models.Model):
linha_1 = models.CharField(max_length=150)
linha_2 = models.CharField(max_length=150, blank=True, null=True)
cidade = models.CharField(max_length=100)
estado = models.CharField(max_length=50)
pais = models.CharField(max_length=70)
latit... | [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
13,
1990,
2796,
406,
1111,
29898,
9794,
29889,
3195,
1125,
13,
1678,
6276,
2350,
29918,
29896,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29945,
29900,
29897,
13,
1678,
6276... |
vespid/features/interdisciplinarity.py | QS-2/VESPID | 0 | 62007 | import logging
from vespid import setup_logger
logger = setup_logger(__name__)
import pandas as pd
import numpy as np
from tqdm import tqdm
def calculate_interdisciplinarity_score(
membership_vectors
):
'''
Given a set of entities and
one vector for each representing the (ordered) strength
of memb... | [
1,
1053,
12183,
13,
3166,
28999,
5935,
1053,
6230,
29918,
21707,
13,
21707,
353,
6230,
29918,
21707,
22168,
978,
1649,
29897,
13,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18... |
nablapps/core/models.py | pettaroni/nablaweb | 0 | 105430 | <reponame>pettaroni/nablaweb<filename>nablapps/core/models.py
"""
Abstract models to be included in other apps
"""
# Ignore pylint problems with Meta-classes
# pylint: disable=missing-docstring,too-few-public-methods
from datetime import datetime
from django.db import models
from django.conf import settings
from django... | [
1,
529,
276,
1112,
420,
29958,
29886,
1803,
5022,
29875,
29914,
8511,
2676,
29966,
9507,
29958,
8511,
407,
29879,
29914,
3221,
29914,
9794,
29889,
2272,
13,
15945,
29908,
13,
9118,
4733,
304,
367,
5134,
297,
916,
11446,
13,
15945,
29908,
... |
machine_learning_examples/linear_regression_class/overfitting.py | austinburks/nlp-udemy | 0 | 161678 | # notes for this course can be found at:
# https://deeplearningcourses.com/c/data-science-linear-regression-in-python
# https://www.udemy.com/data-science-linear-regression-in-python
import numpy as np
import matplotlib.pyplot as plt
def make_poly(X, deg):
n = len(X)
data = [np.ones(n)]
for d in xrange(... | [
1,
396,
11486,
363,
445,
3236,
508,
367,
1476,
472,
29901,
13,
29937,
2045,
597,
311,
29872,
552,
5699,
29883,
29781,
29889,
510,
29914,
29883,
29914,
1272,
29899,
29879,
15277,
29899,
10660,
29899,
276,
11476,
29899,
262,
29899,
4691,
13... |
tests/test_rainbowplantlife.py | gloriousDan/recipe-scrapers | 0 | 95452 | from recipe_scrapers.rainbowplantlife import RainbowPlantLife
from tests import ScraperTest
class TestRainbowPlantLifeScraper(ScraperTest):
scraper_class = RainbowPlantLife
def test_host(self):
self.assertEqual("rainbowplantlife.com", self.harvester_class.host())
def test_author(self):
... | [
1,
515,
9522,
412,
29918,
1557,
2390,
414,
29889,
6038,
17729,
24389,
19264,
1053,
21431,
17729,
3247,
424,
26754,
13,
3166,
6987,
1053,
2522,
336,
546,
3057,
13,
13,
13,
1990,
4321,
29934,
475,
17729,
3247,
424,
26754,
4421,
336,
546,
... |
Utmp.py | HenryHu/pybbs | 14 | 61717 | <gh_stars>10-100
import Config
import os
import struct
import random
import time
import signal
import User
import UCache
from sysv_ipc import *
from UtmpHead import UtmpHead
from commondata import CommonData
from UserInfo import UserInfo
from Log import Log
from Util import Util
import Login
# from SemLock import SemLo... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
12782,
13,
5215,
2897,
13,
5215,
2281,
13,
5215,
4036,
13,
5215,
931,
13,
5215,
7182,
13,
5215,
4911,
13,
5215,
501,
10408,
13,
3166,
10876,
2... |
app/__init__.py | lwalter/flask-angular-starter | 13 | 32541 | <reponame>lwalter/flask-angular-starter
from app.factory import create_app
| [
1,
529,
276,
1112,
420,
29958,
29880,
29893,
13794,
29914,
1579,
1278,
29899,
6825,
29899,
303,
4254,
13,
3166,
623,
29889,
14399,
1053,
1653,
29918,
932,
13,
2
] |
sum/4-sum-II.py | windowssocket/py_leetcode | 3 | 32073 | # LTE using two pointers O(n**3)
class Solution(object):
def fourSumCount(self, A, B, C, D):
# corner case:
if len(A) == 0:
return 0
A.sort()
B.sort()
C.sort()
D.sort()
count = 0
for i in range(len(A)):
for j in range(len(B)... | [
1,
396,
365,
4330,
773,
1023,
12589,
438,
29898,
29876,
1068,
29941,
29897,
13,
1990,
24380,
29898,
3318,
1125,
13,
13,
1678,
822,
3023,
11139,
3981,
29898,
1311,
29892,
319,
29892,
350,
29892,
315,
29892,
360,
1125,
13,
4706,
396,
1115... |
app/app/migrations/0001_initial.py | poornachandrakashi/covid-cough-prediction | 3 | 34691 | # Generated by Django 2.1.1 on 2020-04-05 06:12
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Response',
fields=[
('id', models.AutoField... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29896,
29889,
29896,
373,
29871,
29906,
29900,
29906,
29900,
29899,
29900,
29946,
29899,
29900,
29945,
29871,
29900,
29953,
29901,
29896,
29906,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
... |
migrations/versions/4250dfa822a4_feed_countries.py | cuducos/findaconf | 9 | 147812 | """Feed: Countries
Revision ID: 4250dfa822a4
Revises: <PASSWORD>
Create Date: 2014-12-10 22:24:01.089932
"""
# revision identifiers, used by Alembic.
revision = '4250dfa822a4'
down_revision = '<PASSWORD>'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table, column
from csv import reader... | [
1,
9995,
29737,
29901,
3917,
2722,
13,
13,
1123,
4924,
3553,
29901,
29871,
29946,
29906,
29945,
29900,
2176,
29874,
29947,
29906,
29906,
29874,
29946,
13,
1123,
1730,
267,
29901,
529,
25711,
17013,
29958,
13,
4391,
4712,
29901,
29871,
29906... |
src/controllerarena/controllers/refVec.py | VerifiableRobotics/controller-arena | 0 | 29331 | # code for python reference dipole vector field controller
# these functions require stuff
#from mathFuns import *
from numpy import *
from math import *
class refVec:
# define the constructor
def __init__(self, q_0, controller_flag):
# Initialize controller state
self.phi_prev = None
sel... | [
1,
396,
775,
363,
3017,
3407,
652,
15831,
4608,
1746,
4701,
13,
13,
29937,
1438,
3168,
1996,
6433,
13,
29937,
3166,
5844,
29943,
6948,
1053,
334,
13,
3166,
12655,
1053,
334,
13,
3166,
5844,
1053,
334,
13,
13,
1990,
2143,
25987,
29901,... |
download-package/PythonExercises/ex015.py | MCLeitao/Python-Exercises | 0 | 172205 | # Write a program that asks the number of kilometers a car has driven and the number of days it has been hired.
# Calculate the price to pay, knowing that the car costs US$ 60 per day and US$ 0.15 per km driven.
k = float(input('Enter how many kilometers the car has traveled: '))
d = float(input('Enter how many days t... | [
1,
396,
14350,
263,
1824,
393,
19514,
278,
1353,
310,
20052,
2699,
263,
1559,
756,
18225,
322,
278,
1353,
310,
3841,
372,
756,
1063,
298,
2859,
29889,
13,
29937,
20535,
403,
278,
8666,
304,
5146,
29892,
13797,
393,
278,
1559,
21544,
3... |
vendor/packages/nose/unit_tests/test_importer.py | DESHRAJ/fjord | 2 | 1614605 | import os
import sys
import unittest
import nose.config
import nose.importer
class TestImporter(unittest.TestCase):
def setUp(self):
self.p = sys.path[:]
def tearDown(self):
sys.path = self.p[:]
def test_add_paths(self):
where = os.path.abspath(os.path.join(os.path.dirname(__... | [
1,
1053,
2897,
13,
5215,
10876,
13,
5215,
443,
27958,
13,
5215,
26414,
29889,
2917,
13,
5215,
26414,
29889,
326,
18505,
13,
13,
1990,
4321,
24192,
9555,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
731,
3373,
29898,
... |
pomade/assertions.py | saucelabs/pomade | 0 | 48968 | from pprint import pformat
import json
import time
import traceback
import sys
from config import SPIN_TIMEOUT
class FailTestException(Exception):
pass
def spinAssert(msg, test, timeout=None, args=[]):
timeout = timeout or SPIN_TIMEOUT
name = getattr(test, '__name__', 'unknown')
last_e = None
fo... | [
1,
515,
282,
2158,
1053,
282,
4830,
13,
5215,
4390,
13,
5215,
931,
13,
5215,
9637,
1627,
13,
5215,
10876,
13,
3166,
2295,
1053,
10937,
1177,
29918,
15307,
12015,
13,
13,
13,
1990,
29098,
3057,
2451,
29898,
2451,
1125,
13,
1678,
1209,
... |
exercise-05/programming_assignment/rbf.py | AleRiccardi/technical-neural-network-course | 0 | 115963 | import random
from abc import abstractmethod
import math
from sklearn.cluster import KMeans
import numpy as np
import matplotlib.pyplot as plt
def euclidian_distance(a, b):
"""
Calculating Euclidian distance between 2 vectors
:param a: 1st vector
:param b: 2nd vector
:return:
"""
assert l... | [
1,
1053,
4036,
13,
3166,
25638,
1053,
9846,
5696,
13,
5215,
5844,
13,
13,
3166,
2071,
19668,
29889,
19594,
1053,
476,
6816,
550,
13,
5215,
12655,
408,
7442,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
13,
1753,
11878,
695,... |
OverlayUFOs/Overlay UFOs.roboFontExt/lib/OverlayUFOs.py | connordavenport/fbOpenTools | 0 | 10383 | #coding=utf-8
from __future__ import division
"""
# OVERLAY UFOS
For anyone looking in here, sorry the code is so messy. This is a standalone version of a script with a lot of dependencies.
"""
import os
from AppKit import * #@PydevCodeAnalysisIgnore
from vanilla import * #@PydevCodeAnalysisIgnore
from mojo.drawingT... | [
1,
396,
29883,
3689,
29922,
9420,
29899,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
15945,
29908,
13,
29937,
438,
5348,
18799,
501,
29943,
3267,
13,
13,
2831,
5019,
3063,
297,
1244,
29892,
7423,
278,
775,
338,
577,
4473,
... |
myy/accounts/admin.py | ramadevim/Travel-website | 0 | 34318 | from django.contrib import admin
# Register your models here.
from .models import Register
admin.site.register(Register) | [
1,
515,
9557,
29889,
21570,
1053,
4113,
13,
13,
29937,
12577,
596,
4733,
1244,
29889,
13,
3166,
869,
9794,
1053,
12577,
13,
13,
6406,
29889,
2746,
29889,
9573,
29898,
15213,
29897,
2
] |
server/utils.py | caesuric/cardrpg-public | 1 | 119872 | import random
import struct
# from numba import jit
from constants import *
# @jit
def serialize_list(list):
return_list = []
for i in list:
if i!=None:
return_list.append(i.to_JSON())
else:
return_list.append(None)
return return_list
def serialize_char_list(list, m... | [
1,
1053,
4036,
13,
5215,
2281,
13,
29937,
515,
954,
2291,
1053,
432,
277,
13,
13,
3166,
17727,
1053,
334,
13,
13,
29937,
732,
29926,
277,
13,
1753,
28755,
29918,
1761,
29898,
1761,
1125,
13,
1678,
736,
29918,
1761,
353,
5159,
13,
16... |
kopf/reactor/callbacks.py | pawelkopka/kopf | 0 | 175815 | """
Callback signatures for typing.
Since these signatures contain a lot of copy-pasted kwargs and are
not so important for the codebase, they are moved to this separate module.
"""
import logging
from typing import NewType, Any, Union, Optional
from typing_extensions import Protocol
from kopf.structs import bodies
... | [
1,
9995,
13,
10717,
1804,
3698,
363,
19229,
29889,
13,
13,
23036,
1438,
1804,
3698,
1712,
263,
3287,
310,
3509,
29899,
29886,
28470,
9049,
5085,
322,
526,
13,
1333,
577,
4100,
363,
278,
775,
3188,
29892,
896,
526,
6153,
304,
445,
5004... |
shipane_sdk/transaction.py | awfssv/ShiPanE-Python-SDK | 1 | 2295 | # -*- coding: utf-8 -*-
class Transaction(object):
def __init__(self, **kwargs):
self._completed_at = kwargs.get('completed_at')
self._type = kwargs.get('type')
self._symbol = kwargs.get('symbol')
self._price = kwargs.get('price')
self._amount = kwargs.get('amount')
de... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
13,
1990,
4103,
2467,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
1583,
3032,
5729,
9446,
29918,
... |
bench/__init__.py | ThePhantomTiger/BenchmarkPC | 1 | 97995 | from flask import Flask, render_template
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
import os
app = Flask(__name__)
app.debug = True
#Database
POSTGRES = {
'user': 'postgres',
'pw': 'test',
'db': 'benchmarkpc',
'host': 'localhost',
'port': '5432',
}
# app.config['SQLAL... | [
1,
515,
29784,
1053,
2379,
1278,
29892,
4050,
29918,
6886,
13,
3166,
29784,
29918,
2850,
284,
305,
6764,
1053,
3758,
2499,
305,
6764,
13,
3166,
29784,
29918,
26983,
403,
1053,
341,
4481,
403,
13,
5215,
2897,
13,
932,
353,
2379,
1278,
... |
entity/cards/SWL_26H/LETL_236.py | x014/lushi_script | 102 | 199144 | <reponame>x014/lushi_script
# -*- coding: utf-8 -*-
from hearthstone.entities import Entity
from entity.spell_entity import SpellEntity
class LETL_236(SpellEntity):
"""
火焰践踏5
对所有敌人造成$6点伤害。每有一个尚未行动的敌人,重复一次。
"""
def __init__(self, entity: Entity):
super().__init__(entity)
s... | [
1,
529,
276,
1112,
420,
29958,
29916,
29900,
29896,
29946,
29914,
29880,
1878,
29875,
29918,
2154,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
8293,
386,
12734,
29889,
296,
1907,
1053,
14945... |
core/decorators/multiprocessing_decorator.py | daniele21/Stock_Analysis | 0 | 179841 | <reponame>daniele21/Stock_Analysis
from multiprocessing import Process
import logging
logger = logging.getLogger(__name__)
def multi_process_run(func):
def wrapper(*args, **kwargs):
"""
Args:
fn: function to be run into multiprocess way
args: tuple of args --> (arg1. arg2... | [
1,
529,
276,
1112,
420,
29958,
29881,
6067,
280,
29906,
29896,
29914,
20754,
384,
29918,
21067,
4848,
13,
3166,
6674,
307,
985,
292,
1053,
10554,
13,
5215,
12183,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13... |
EnvironmentVariables.py | Phillipdk/PlayGround | 0 | 197829 | <filename>EnvironmentVariables.py
"""
This test is to test the API call and see if it works. It is an
integration test.
"""
import os
TemperatureVector = [120, 110, 130, 150] # Temperture [celsius]
TimeVectorHr = [0, 1, 2, 3 ] # Time [Hr]
client_id = os.environ['CLIENT_ID']
client_secret = os.environ['C... | [
1,
529,
9507,
29958,
18649,
10444,
1849,
29889,
2272,
13,
15945,
29908,
29871,
13,
4013,
1243,
338,
304,
1243,
278,
3450,
1246,
322,
1074,
565,
372,
1736,
29889,
739,
338,
385,
29871,
13,
27925,
1243,
29889,
13,
15945,
29908,
13,
5215,
... |
src/randonet/pytorch/transformer.py | ahgamut/randonet | 0 | 27917 |
from randonet.generator.param import Param, IntParam, FloatParam, BinaryParam, ChoiceParam, TupleParam
from randonet.generator.unit import Unit, Factory as _Factory
from randonet.generator.conv import ConvFactory, ConvTransposeFactory
from collections import namedtuple
class TransformerEncoder(_Factory):
def __i... | [
1,
29871,
13,
3166,
364,
9214,
300,
29889,
27959,
29889,
3207,
1053,
12662,
29892,
3159,
4736,
29892,
27842,
4736,
29892,
29479,
4736,
29892,
14542,
625,
4736,
29892,
12603,
552,
4736,
13,
3166,
364,
9214,
300,
29889,
27959,
29889,
5441,
... |
Loan_Approval_Analysis/code.py | justsidd/greyatom-python-for-data-science | 0 | 141537 | <filename>Loan_Approval_Analysis/code.py
# --------------
import pandas as pd
import numpy as np
from scipy.stats import mode
bank=pd.read_csv(path)
categorical_var=bank.select_dtypes(include = 'object')
numerical_var=bank.select_dtypes(include = 'number')
bank.drop('Loan_ID',axis=1,inplace=True)
bank... | [
1,
529,
9507,
29958,
3410,
273,
29918,
2052,
307,
791,
29918,
21067,
4848,
29914,
401,
29889,
2272,
13,
29937,
448,
9072,
29899,
13,
5215,
11701,
408,
10518,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
3166,
4560,
2272,
29889,
16202,
... |
app/domain/rules.py | patromi/tracardi | 0 | 1602707 | import logging
from app.event_server.service.persistence_service import PersistenceService
from app.service.storage.elastic_storage import ElasticStorage
rules_logger = logging.getLogger('Rules')
class Rules(list):
@staticmethod
def storage() -> PersistenceService:
return PersistenceService(Elastic... | [
1,
1053,
12183,
13,
3166,
623,
29889,
3696,
29918,
2974,
29889,
5509,
29889,
28249,
29918,
5509,
1053,
9034,
11416,
3170,
13,
3166,
623,
29889,
5509,
29889,
12925,
29889,
295,
6288,
29918,
12925,
1053,
1260,
6288,
10486,
13,
13,
13,
19238... |
hackerrank/weekofcode23/commuting-strings.py | mikhail-dvorkin/competitions | 7 | 181367 | def kmp(s):
p = [-1]
k = -1
for c in s:
while k >= 0 and s[k] != c:
k = p[k]
k += 1
p.append(k)
return p
def period(s):
k = len(s) - kmp(s)[-1]
if len(s) % k == 0:
return k
return len(s)
s = input()
m = int(input())
p = period(s)
print(m // p % (10**9 + 7))
| [
1,
822,
413,
1526,
29898,
29879,
1125,
13,
12,
29886,
353,
21069,
29896,
29962,
13,
12,
29895,
353,
448,
29896,
13,
12,
1454,
274,
297,
269,
29901,
13,
12,
12,
8000,
413,
6736,
29871,
29900,
322,
269,
29961,
29895,
29962,
2804,
274,
... |
src/screenlogger.py | swbooking/RobotMaria | 0 | 22361 | <gh_stars>0
class ScreenLogger:
def __init__(self, loghandler=None, verbose = True):
self.LogMessage = None
self.LogHandler = loghandler
self.Verbose = verbose
return
def Log(self, message):
if self.LogMessage != message:
self.LogMessage = message
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
1990,
22666,
16363,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1480,
13789,
29922,
8516,
29892,
26952,
353,
5852,
1125,
13,
4706,
1583,
29889,
3403,
3728,
353,
6213,
13,
4706,
... |
boto3_type_annotations_with_docs/boto3_type_annotations/sns/paginator.py | cowboygneox/boto3_type_annotations | 119 | 193154 | from typing import Dict
from botocore.paginate import Paginator
class ListEndpointsByPlatformApplication(Paginator):
def paginate(self, PlatformApplicationArn: str, PaginationConfig: Dict = None) -> Dict:
"""
Creates an iterator that will paginate through responses from :py:meth:`SNS.Client.list_e... | [
1,
515,
19229,
1053,
360,
919,
13,
3166,
9225,
542,
487,
29889,
13573,
16976,
1053,
349,
26584,
1061,
13,
13,
13,
1990,
2391,
5044,
9748,
2059,
21889,
4873,
29898,
29925,
26584,
1061,
1125,
13,
1678,
822,
10203,
16976,
29898,
1311,
2989... |
jax3d/projects/nesf/nerfstatic/utils/jax_process_zero.py | google-research/jax3d | 33 | 187044 | <reponame>google-research/jax3d
# Copyright 2022 The jax3d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | [
1,
529,
276,
1112,
420,
29958,
3608,
29899,
690,
2842,
29914,
6487,
29941,
29881,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29906,
450,
432,
1165,
29941,
29881,
13189,
943,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
1... |
livestreaming-tools/blog.py | holdenk/livestreaming-tools | 7 | 160244 | <reponame>holdenk/livestreaming-tools
#!/home/hkarau/repos/livestreaming-tools/myvenv/bin/python
from __future__ import print_function
import logging
import os
import markdown2
from embed_helpers import *
from shortten import shortten
from utils import pacific_now, get_now_to_match
logging.basicConfig()
logger = lo... | [
1,
529,
276,
1112,
420,
29958,
8948,
5842,
29914,
17843,
342,
1633,
292,
29899,
8504,
13,
29937,
14708,
5184,
29914,
29882,
5689,
585,
29914,
276,
1066,
29914,
17843,
342,
1633,
292,
29899,
8504,
29914,
1357,
854,
29894,
29914,
2109,
2991... |
118-Pascals-Triangle/solution.py | alfmunny/leetcode | 0 | 95127 | class Solution:
def generate(self, numRows: int) -> List[List[int]]:
ans = []
for i in range(1, numRows+1):
level = [1] * i
if ans:
for j in range(1, i-1):
level[j] = ans[-1][j-1] + ans[-1][j]
... | [
1,
770,
24380,
29901,
13,
1678,
822,
5706,
29898,
1311,
29892,
954,
10661,
29901,
938,
29897,
1599,
2391,
29961,
1293,
29961,
524,
5262,
29901,
13,
4706,
6063,
353,
5159,
13,
308,
13,
4706,
363,
474,
297,
3464,
29898,
29896,
29892,
954,... |
unit_test/test_vx_base_target.py | owl129/vxhunter | 189 | 190709 | <filename>unit_test/test_vx_base_target.py
from common import BaseTestCase, mock
from serial_debuger.vx_base_target import VxSerialBaseTarget
class VxSerialCmdDebugerTests(BaseTestCase):
def setUp(self):
super(VxSerialCmdDebugerTests, self).setUp()
self.target = VxSerialBaseTarget()
self.t... | [
1,
529,
9507,
29958,
5441,
29918,
1688,
29914,
1688,
29918,
29894,
29916,
29918,
3188,
29918,
5182,
29889,
2272,
13,
3166,
3619,
1053,
7399,
3057,
8259,
29892,
11187,
13,
3166,
7797,
29918,
8382,
261,
29889,
29894,
29916,
29918,
3188,
29918... |
PythonExercicios/ex039.py | lordvinick/Python | 0 | 29724 | <filename>PythonExercicios/ex039.py
print('\033[36m='*12, '\033[32mAlistamento Militar', '\033[36m='*12)
from datetime import date
ano = int(input('Em que ano você nasceu? '))
atual = date.today().year
idade = atual - ano
print(f'Você tem \033[32m{idade} \033[36manos em \033[32m{atual}.')
if idade == 18:
print('\03... | [
1,
529,
9507,
29958,
11980,
1252,
6269,
19382,
29914,
735,
29900,
29941,
29929,
29889,
2272,
13,
2158,
28909,
29900,
29941,
29941,
29961,
29941,
29953,
29885,
2433,
29930,
29896,
29906,
29892,
11297,
29900,
29941,
29941,
29961,
29941,
29906,
... |
integration/bazel_workspace_tests/bazel_ngtsc_plugin/packages.bzl | John-Cassidy/angular | 95,154 | 24397 | <filename>integration/bazel_workspace_tests/bazel_ngtsc_plugin/packages.bzl
ANGULAR_PACKAGES_CONFIG = [
("@angular/animations", struct(entry_points = ["browser"])),
("@angular/common", struct(entry_points = ["http/testing", "http", "testing"])),
("@angular/compiler", struct(entry_points = ["testing"])),
... | [
1,
529,
9507,
29958,
27925,
29914,
27975,
295,
29918,
1287,
3493,
29918,
21150,
29914,
27975,
295,
29918,
865,
1372,
29883,
29918,
8582,
29914,
8318,
29889,
29890,
29920,
29880,
13,
19453,
13309,
1718,
29918,
29925,
11375,
10461,
29903,
29918... |
scripts/upload-readme.py | slashben/regolibrary | 0 | 179074 | import requests
import os
import json
import re
class ReadmeApi(object):
def __init__(self):
super().__init__()
self.doc_version = None
def authenticate(self, api_key):
r = requests.get('https://dash.readme.com/api/v1', auth=(api_key, ''))
if r.status_code != 200:
r... | [
1,
1053,
7274,
13,
5215,
2897,
13,
5215,
4390,
13,
5215,
337,
13,
13,
1990,
7523,
1004,
11713,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
1514,
... |
rnaseq/src/bam2coverage.py | cjops/gtex-pipeline | 3 | 137918 | <filename>rnaseq/src/bam2coverage.py
#!/usr/bin/env python3
# Author: <NAME>
import argparse
import subprocess
import os
from datetime import datetime
import gzip
import pyBigWig
parser = argparse.ArgumentParser(description='Computes coverage in bigWig and/or bedGraph format from input BAM.')
parser.add_argument('bam... | [
1,
529,
9507,
29958,
27539,
559,
29939,
29914,
4351,
29914,
29890,
314,
29906,
11911,
482,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
13361,
29901,
529,
5813,
29958,
13,
13,
5215,
1852,
5510,
13... |
examples/get_started_example.py | th2-net/th2-data-services | 3 | 108771 | from collections import Generator
from th2_data_services import DataSource, Data, Filter
from datetime import datetime
# [1] Create DataSource object to connect to rpt-data-provider.
DEMO_HOST = "10.64.66.66" # th2-kube-demo Host port where rpt-data-provider is located.
DEMO_PORT = "30999" # Node port of rpt-data-... | [
1,
515,
16250,
1053,
3251,
1061,
13,
3166,
266,
29906,
29918,
1272,
29918,
9916,
1053,
3630,
4435,
29892,
3630,
29892,
19916,
13,
3166,
12865,
1053,
12865,
13,
13,
13,
29937,
518,
29896,
29962,
6204,
3630,
4435,
1203,
304,
4511,
304,
36... |
build/lib/abp/openai/wrappers/reward_wrapper.py | LinearZoetrope/abp | 0 | 94323 | from gym import Wrapper
import inspect
import logging
from functools import partial
logger = logging.getLogger(__name__)
class RewardWrapper(Wrapper):
"""
Adds support for reward decomposition of the environment.
To support reward decompisition the environment has to return reward as a list of dictiona... | [
1,
515,
330,
962,
1053,
399,
6794,
13,
13,
5215,
16096,
13,
5215,
12183,
13,
3166,
2090,
312,
8789,
1053,
7687,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
1990,
390,
809,
538,
15646,
29898,
15646,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.