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
lapse_rate_regression.py
ehultee/stoch-SMB
3
177891
<reponame>ehultee/stoch-SMB #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Load process-model SMB in a given catchment and regress a mass balance gradient Created on Thu Aug 5 14:14:05 2021 Edit Sept 2: compute 30-year mean of anomaly @author: lizz """ from shapely.geometry import MultiPoint from shapely.ops im...
[ 1, 529, 276, 1112, 420, 29958, 14797, 352, 371, 29872, 29914, 303, 2878, 29899, 29903, 9486, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, ...
cea/optimization/master/evaluation.py
architecture-building-systems/cea-toolbox
0
160510
<filename>cea/optimization/master/evaluation.py """ Evaluation function of an individual """ import cea.inputlocator from cea.optimization.master import cost_model from cea.optimization.master import master_to_slave as master from cea.optimization.master.generation import individual_to_barcode from cea.optimization.m...
[ 1, 529, 9507, 29958, 346, 29874, 29914, 20640, 2133, 29914, 6207, 29914, 24219, 362, 29889, 2272, 13, 15945, 29908, 13, 29923, 4387, 362, 740, 310, 385, 5375, 13, 13, 15945, 29908, 13, 13, 5215, 2257, 29874, 29889, 2080, 2029, 1061, 13,...
daybed/tests/support.py
spiral-project/daybed
19
1602250
import collections try: import unittest2 as unittest except ImportError: import unittest # NOQA import base64 import six import webtest from daybed import __version__ from daybed.tokens import get_hawk_credentials class PrefixedRequestClass(webtest.app.TestRequest): @classmethod def blank(cls, pat...
[ 1, 1053, 16250, 13, 2202, 29901, 13, 1678, 1053, 443, 27958, 29906, 408, 443, 27958, 13, 19499, 16032, 2392, 29901, 13, 1678, 1053, 443, 27958, 29871, 396, 11698, 29984, 29909, 13, 5215, 2967, 29953, 29946, 13, 13, 5215, 4832, 13, 5215,...
agate/aggregations/deciles.py
andriyor/agate
663
82884
#!/usr/bin/env python from agate.aggregations.base import Aggregation from agate.aggregations.has_nulls import HasNulls from agate.aggregations.percentiles import Percentiles from agate.data_types import Number from agate.exceptions import DataTypeError from agate.utils import Quantiles from agate.warns import warn_nu...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 3166, 946, 403, 29889, 26193, 800, 29889, 3188, 1053, 319, 26127, 362, 13, 3166, 946, 403, 29889, 26193, 800, 29889, 5349, 29918, 4304, 29879, 1053, 11699, 7327, 29879, 13, 3166, 9...
modules/dad.py
AudioVisuaali/audiobot
3
180646
from audiovisuaali import send from requests import get as rget from json import loads # Joke async def dad_joke(message, client, arguments): # Starting to fetch a joke response = loads(rget("https://icanhazdadjoke.com/slack").text) # Creating letter letter = "<@{}> **| {}**".format(message....
[ 1, 515, 16147, 25190, 3357, 2606, 1053, 3638, 30004, 13, 3166, 7274, 1053, 679, 408, 364, 657, 30004, 13, 3166, 4390, 1053, 15376, 30004, 13, 30004, 13, 29937, 3650, 446, 30004, 13, 12674, 822, 270, 328, 29918, 2212, 446, 29898, 4906, ...
tests/test_dashboards.py
pbelskiy/quickbuild
7
69877
import re import pytest import responses from quickbuild import QBError DASHBOARDS_XML = r"""<?xml version="1.0" encoding="UTF-8"?> <list> <com.pmease.quickbuild.model.Dashboard> <id>1</id> <user>1</user> <name>Default</name> <description>System default dashboard</description> <primary>false</...
[ 1, 1053, 337, 13, 13, 5215, 11451, 1688, 13, 5215, 20890, 13, 13, 3166, 4996, 4282, 1053, 660, 29933, 2392, 13, 13, 29928, 24943, 8456, 1718, 8452, 29918, 9165, 353, 364, 15945, 29908, 8169, 3134, 1873, 543, 29896, 29889, 29900, 29908, ...
ofagent/indigo/submodules/infra/sourcegen/cxmacrogen.py
lanpinguo/apple-sauce
1
108496
<reponame>lanpinguo/apple-sauce<gh_stars>1-10 #!/usr/bin/python ## SourceObject ## ################################################################# # # Copyright 2013, Big Switch Networks, Inc. # # Licensed under the Eclipse Public License, Version 1.0 (the # "License"); you may not use this file except in comp...
[ 1, 529, 276, 1112, 420, 29958, 6468, 29886, 6202, 29877, 29914, 11548, 29899, 29879, 585, 346, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 2277, 7562, 2061, 444, ...
wolk/interface/firmware_update.py
Wolkabout/WolkConnect-Python-
6
121155
"""Enables firmware update for device.""" # Copyright 2020 WolkAbout Technology s.r.o. # # 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...
[ 1, 9995, 2369, 1849, 9226, 2519, 2767, 363, 4742, 1213, 15945, 13, 29937, 259, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 11902, 29895, 28173, 17968, 269, 29889, 29878, 29889, 29877, 29889, 13, 29937, 13, 29937, 259, 10413, 21144, 1090...
dbsetup.py
Esha-Muthu-1997/vpoll
0
67276
import sqlite3, json from sqlite3 import Error def create_connection(database): try: conn = sqlite3.connect(database, isolation_level=None, check_same_thread = False) conn.row_factory = lambda c, r: dict(zip([col[0] for col in c.description], r)) return conn except Error as e: ...
[ 1, 1053, 21120, 29941, 29892, 4390, 13, 3166, 21120, 29941, 1053, 4829, 13, 13, 1753, 1653, 29918, 9965, 29898, 9803, 1125, 13, 1678, 1018, 29901, 13, 4706, 11009, 353, 21120, 29941, 29889, 6915, 29898, 9803, 29892, 11695, 362, 29918, 556...
bot.py
suntorvic/tobman
0
52777
<reponame>suntorvic/tobman #!/usr/bin/python3 # coding: utf-8 from __future__ import annotations import discord from discord.ext import commands from enum import Enum import yaml import re import sys import json import os.path import urllib, urllib.parse import datetime import ics import io import asyncio class Transl...
[ 1, 529, 276, 1112, 420, 29958, 29879, 1657, 272, 26311, 29914, 517, 29890, 1171, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 29941, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 52...
cupy/logic/type_test.py
umitanuki/chainer
0
61490
<filename>cupy/logic/type_test.py def iscomplex(a): # TODO(beam2d): Implement it raise NotImplementedError def iscomplexobj(x): # TODO(beam2d): Implement it raise NotImplementedError def isfortran(a): # TODO(beam2d): Implement it raise NotImplementedError def isreal(x): # TODO(beam2d):...
[ 1, 529, 9507, 29958, 5231, 29891, 29914, 19227, 29914, 1853, 29918, 1688, 29889, 2272, 13, 1753, 338, 19676, 29898, 29874, 1125, 13, 1678, 396, 14402, 29898, 915, 314, 29906, 29881, 1125, 1954, 2037, 372, 13, 1678, 12020, 2216, 1888, 2037...
apps/api/views/user.py
Praetorian-Defence/praetorian-api
2
116078
import base64 from datetime import datetime from io import BytesIO from http import HTTPStatus import pyotp import qrcode import six from django.conf import settings from django.db import transaction from django.http import HttpResponse from django.utils import timezone from django.utils.crypto import salted_hmac fro...
[ 1, 1053, 2967, 29953, 29946, 13, 3166, 12865, 1053, 12865, 13, 13, 3166, 12013, 1053, 2648, 2167, 5971, 13, 3166, 1732, 1053, 7331, 5709, 13, 13, 5215, 11451, 327, 29886, 13, 5215, 3855, 29878, 401, 13, 5215, 4832, 13, 3166, 9557, 298...
setup.py
bbrzycki/bl-scint-analysis
0
1609360
<reponame>bbrzycki/bl-scint-analysis import setuptools with open('README.md', 'r') as fh: long_description = fh.read() setuptools.setup( name='blscint', version='0.0.1', author='<NAME>', author_email='<EMAIL>', description='SETI scintillation utilities', long_description=long_description, ...
[ 1, 529, 276, 1112, 420, 29958, 29890, 1182, 1537, 22736, 29914, 2204, 29899, 1557, 524, 29899, 15916, 13, 5215, 731, 21245, 8789, 13, 13, 2541, 1722, 877, 16310, 2303, 29889, 3487, 742, 525, 29878, 1495, 408, 285, 29882, 29901, 13, 1678...
exerc010.py
RafaelGomesXavier/ExerciciosPython
0
189965
# Crie um programa que leia quanto dinheiro uma pessoa tem na carteira e mostre quantos dólares ela pode comprar. #considerando dólar a 3,27 dinheiro = float(input('Digite o valor em Reais para conversão em Dólares: ')) dolar = 3.27 soma = dinheiro/dolar print('Com o valor de R$ {:.2f}, você pode comprar ${:.2f}...
[ 1, 396, 315, 2546, 1922, 16914, 712, 454, 423, 18600, 4538, 354, 3350, 3672, 23109, 29874, 1350, 1055, 20206, 3055, 321, 1556, 276, 4323, 359, 270, 29980, 4675, 267, 25192, 13279, 7199, 279, 22993, 13, 29937, 3200, 1241, 1743, 270, 2998...
testing/utils.py
grantsrb/planet
0
43243
class RigPacket: def __init__(self, velocity=0, direction=0): self.velocity = velocity self.direction = direction
[ 1, 29871, 13, 1990, 390, 335, 16638, 300, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 12885, 29922, 29900, 29892, 5305, 29922, 29900, 1125, 13, 4706, 1583, 29889, 955, 25245, 353, 12885, 13, 4706, 1583, 29889, 20845, 353, 5305, ...
lib/davis/python/lib/davis/measures/t_stability.py
varunjampani/video_prop_networks
99
137997
import cv2 import sys import numpy as np import scipy.spatial.distance as ssd from tstab import * def get_bijective_pairs(pairs,costmat): bij_pairs = bij_pairs_one_dim(pairs, costmat,0) bij_pairs = bij_pairs_one_dim(bij_pairs, costmat.T,1) return bij_pairs def bij_pairs_one_dim(pairs, costmat, left_or_right): b...
[ 1, 29871, 13, 5215, 13850, 29906, 13, 5215, 10876, 13, 5215, 12655, 408, 7442, 13, 5215, 4560, 2272, 29889, 1028, 15238, 29889, 19244, 408, 269, 4928, 13, 3166, 260, 29256, 1053, 334, 13, 13, 1753, 679, 29918, 5365, 25674, 29918, 29886,...
0290.word_pattern/solution.py
WZMJ/Algorithms
5
128440
<filename>0290.word_pattern/solution.py class Solution: def word_pattern(self, pattern: str, str: str) -> bool: words = str.split(" ") return len(pattern) == len(words) and len(set(pattern)) == len(set(words)) == len(set(zip(pattern, words)))
[ 1, 529, 9507, 29958, 29900, 29906, 29929, 29900, 29889, 1742, 29918, 11037, 29914, 2929, 918, 29889, 2272, 13, 1990, 24380, 29901, 13, 1678, 822, 1734, 29918, 11037, 29898, 1311, 29892, 4766, 29901, 851, 29892, 851, 29901, 851, 29897, 1599,...
classic_NN/nn.py
disooqi/learning-machine-learning
1
16095
<filename>classic_NN/nn.py<gh_stars>1-10 import numpy as np from scipy.special import expit, logit import time import logging np.random.seed(4) # 4 logger = logging.getLogger(__name__) fr = logging.Formatter('%(asctime)s:%(levelname)s:%(message)s') sh = logging.StreamHandler() # sh.setFormatter(fr) logger.addHandler(...
[ 1, 529, 9507, 29958, 1990, 293, 29918, 10262, 29914, 15755, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 12655, 408, 7442, 13, 3166, 4560, 2272, 29889, 18732, 1053, 1518, 277, 29892, 1480, 277, ...
src/capha_module.py
Innsmouth-trip/aiogram-telegram-bot
0
125939
<reponame>Innsmouth-trip/aiogram-telegram-bot # Модуль капчи # Подключение необходимых модулей from src import users_module from src import supergroup_module from src import bot_module from src import welcome_module # Загрузка необходимых параметров bot = bot_module.bot chat_id = bot_module.chat_id # Создание капчи a...
[ 1, 529, 276, 1112, 420, 29958, 797, 1983, 21026, 29899, 3626, 29886, 29914, 1794, 13342, 29899, 15494, 1393, 29899, 7451, 13, 29937, 8936, 1520, 693, 1787, 29964, 1499, 13, 29937, 20266, 8776, 12854, 23842, 4647, 5588, 29988, 2569, 1520, ...
ms2ldaviz/ms1analysis/models.py
RP0001/ms2ldaviz
0
114989
from __future__ import unicode_literals from django.db import models from basicviz.models import Document, Experiment, Mass2Motif from basicviz.constants import EXPERIMENT_STATUS_CODE from decomposition.models import Decomposition, GlobalMotif ## tables for LDA experiment class Sample(models.Model): name = models...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 3166, 6996, 29894, 466, 29889, 9794, 1053, 10854, 29892, 1222, 15362, 29892, 7360, 29906, 29924, 327, 361, 13, 3166, 6996, ...
utils/alertcheck.py
sethusaim/Shredder-Machine-System
0
113994
<filename>utils/alertcheck.py import os import cv2 from playsound import playsound def drawboxtosafeline(image_np, p1, p2, Line_Position2, Orientation): if Orientation == "bt": bounding_mid = (int((p1[0] + p2[0]) / 2), int(p1[1])) if bounding_mid: cv2.line( img=image_...
[ 1, 529, 9507, 29958, 13239, 29914, 12888, 3198, 29889, 2272, 13, 5215, 2897, 13, 13, 5215, 13850, 29906, 13, 3166, 13582, 618, 1053, 13582, 618, 13, 13, 13, 1753, 4216, 833, 486, 359, 2142, 5570, 29898, 3027, 29918, 9302, 29892, 282, ...
read_iceye_h5.py
eciraci/iceye_gamma_proc
0
23344
<gh_stars>0 #!/usr/bin/env python u""" read_iceye_h5.py Written by <NAME>' (03/2022) Read ICEYE Single Look Complex and Parameter file using GAMMA's Python integration with the py_gamma module. usage: read_iceye_h5.py [-h] [--directory DIRECTORY] TEST: Read ICEye Single Look Complex and Parameter. optional argument...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29884, 15945, 29908, 13, 949, 29918, 625, 4099, 29918, 29882, 29945, 29889, 2272, 13, 29956, 20833, 491, 529, 5813, 16299, 313, 299...
genEM3/training/classifier.py
generem/generem
0
1608123
import os import datetime from typing import List, Union, Dict import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap import torch from torch import nn from torch.utils.tensorboard import SummaryWriter from torch import device as torchDevice from genEM3.util import gpu from gen...
[ 1, 1053, 2897, 13, 5215, 12865, 13, 3166, 19229, 1053, 2391, 29892, 7761, 29892, 360, 919, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 3166, 22889, 29889, 27703, 1053, 2391, 287, 1625, 555, 481, ...
scripts/libopen3d.py
mepix/GPUaccelOpen3D
0
43275
<reponame>mepix/GPUaccelOpen3D<gh_stars>0 #!/usr/bin/env python3 import numpy as np import open3d as o3d import copy import matplotlib.pyplot as plt class WrapperOpen3d(object): """This lightweight wrapper on Open3D converts a .ply point cloud into a NumPy Array""" def __init__(self, path_to_ply): se...
[ 1, 529, 276, 1112, 420, 29958, 1004, 29886, 861, 29914, 29954, 7056, 562, 2242, 6585, 29941, 29928, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 12655, 408, 744...
tests/rules/test_result.py
victor-torres/arche
0
137501
from arche.rules.result import Level, Message, Result from conftest import create_named_df, create_result import pandas as pd import pytest @pytest.mark.parametrize( "source, target", [(("summary", "details", {"err": ["1"]}), ("summary", "details", {"err": ["1"]}))], ) def test_message_eq(source, target): ...
[ 1, 515, 564, 1173, 29889, 19238, 29889, 2914, 1053, 21597, 29892, 7777, 29892, 7867, 13, 3166, 378, 615, 342, 1053, 1653, 29918, 17514, 29918, 2176, 29892, 1653, 29918, 2914, 13, 5215, 11701, 408, 10518, 13, 5215, 11451, 1688, 13, 13, 1...
homeassistant/components/sensor/hddtemp.py
mdonoughe/home-assistant
2
4115
""" Support for getting the disk temperature of a host. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.hddtemp/ """ import logging from datetime import timedelta from telnetlib import Telnet import voluptuous as vol import homeassistant.helpers....
[ 1, 9995, 13, 14039, 363, 2805, 278, 8086, 10430, 310, 263, 3495, 29889, 13, 13, 2831, 901, 4902, 1048, 445, 7481, 29892, 3113, 2737, 304, 278, 5106, 472, 13, 991, 597, 5184, 29899, 465, 22137, 29889, 601, 29914, 14036, 29914, 29879, 6...
code/routines/test_all.py
oliverruoff/PiBot_v4
5
1609263
<gh_stars>1-10 from time import sleep def test_top_stepper_and_bottom_steppers(top_stepper, left_stepper, right_stepper): print('Turning left stepper 360°.') left_stepper.turn_stepper(360) print('Turning right stepper 360°.') right_stepper.turn_stepper(360) print('Switching stepper directions and ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 931, 1053, 8709, 13, 13, 13, 1753, 1243, 29918, 3332, 29918, 1655, 2496, 29918, 392, 29918, 8968, 29918, 1655, 22437, 29898, 3332, 29918, 1655, 2496, 29892, 217...
wordCount.py
I3ck/wordCount
0
160063
<filename>wordCount.py import sys import getopt import operator inputfile = "" outputfile = "" wordcounts = dict() if __name__ == "__main__": argv = sys.argv[1:] try: opts, args = getopt.getopt(argv,"hi:o:",["inputfile=","outputfile="]) except getopt.GetoptError: print 'wordCount.py -i <inputfile> -o <output...
[ 1, 529, 9507, 29958, 1742, 3981, 29889, 2272, 13, 5215, 10876, 13, 5215, 679, 3670, 13, 5215, 5455, 13, 13, 2080, 1445, 353, 5124, 13, 4905, 1445, 353, 5124, 13, 1742, 2798, 29879, 353, 9657, 580, 13, 13, 13, 361, 4770, 978, 1649, ...
awx/main/tests/old/ad_hoc.py
doziya/ansible
1
187933
<reponame>doziya/ansible # Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import glob import os import subprocess import tempfile import mock import unittest2 as unittest # Django from django.conf import settings from django.core.urlresolvers import reverse # Django-CRUM from crum import impersona...
[ 1, 529, 276, 1112, 420, 29958, 1867, 2526, 3761, 29914, 550, 1821, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29945, 530, 1687, 29892, 9266, 29889, 13, 29937, 2178, 26863, 2538, 9841, 29889, 13, 13, 29937, 5132...
services/prefect/flows/update_api_view.py
MattSidor/can-scrapers
7
71216
<filename>services/prefect/flows/update_api_view.py from contextlib import closing from datetime import timedelta import os import pathlib from prefect import triggers import pandas as pd import prefect import sqlalchemy as sa from prefect import Flow, task from prefect.schedules import CronSchedule from prefect.tasks....
[ 1, 529, 9507, 29958, 9916, 29914, 29886, 999, 522, 29914, 1731, 29879, 29914, 5504, 29918, 2754, 29918, 1493, 29889, 2272, 13, 3166, 3030, 1982, 1053, 14382, 13, 3166, 12865, 1053, 5335, 287, 2554, 13, 5215, 2897, 13, 5215, 2224, 1982, ...
day_1/7_sum.py
waskitaTREK/python_bim_engineer
1
181273
<gh_stars>1-10 numbers = [1,2,3,4,5,6,7,11] res = 0 for num in numbers: res = res + num print("with sum: ",sum(numbers)) print("without sum: ",res)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 20326, 353, 518, 29896, 29892, 29906, 29892, 29941, 29892, 29946, 29892, 29945, 29892, 29953, 29892, 29955, 29892, 29896, 29896, 29962, 13, 13, 690, 353, 29871, 29900, ...
ocs_ci/deployment/multicluster_deployment.py
sagareavdhoot82gmailcom/ocs-ci
0
185170
import os import logging from ocs_ci.deployment.deployment import Deployment from ocs_ci.framework import config from ocs_ci.ocs.exceptions import ACMClusterDeployException, ACMClusterDestroyException from ocs_ci.ocs.ui import acm_ui from ocs_ci.ocs.utils import get_non_acm_cluster_config from ocs_ci.ocs.acm import a...
[ 1, 1053, 2897, 13, 13, 5215, 12183, 13, 13, 3166, 288, 2395, 29918, 455, 29889, 16519, 358, 29889, 16519, 358, 1053, 10034, 22812, 13, 3166, 288, 2395, 29918, 455, 29889, 4468, 1053, 2295, 13, 3166, 288, 2395, 29918, 455, 29889, 12332, ...
tests/01_human_readable_errors.py
Hakujou/osc-sdk-python
0
63098
import sys sys.path.append("..") from osc_sdk_python import Gateway gw = Gateway() res = gw.CreateNet(IpRange='192.168.127.12/32') error = [error for error in res['Errors'] if error.get('Code') == '4014' and error.get('Details') == 'invalid-block-size'] assert len(error) == 1
[ 1, 1053, 10876, 13, 9675, 29889, 2084, 29889, 4397, 703, 636, 1159, 13, 3166, 15199, 29918, 15348, 29918, 4691, 1053, 22510, 1582, 13, 29887, 29893, 353, 22510, 1582, 580, 13, 690, 353, 330, 29893, 29889, 4391, 6779, 29898, 29902, 29886, ...
libai/data/samplers/samplers.py
Oneflow-Inc/libai
55
29082
# coding=utf-8 # Copyright 2021 The OneFlow Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29896, 450, 3118, 17907, 13189, 943, 29889, 2178, 10462, 21676, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, ...
Solutions/262.py
ruppysuppy/Daily-Coding-Problem-Solutions
70
63860
""" Problem: A bridge in a connected (undirected) graph is an edge that, if removed, causes the graph to become disconnected. Find all the bridges in a graph. """ from sys import maxsize from typing import Dict, List, Optional, Set, Tuple from DataStructures.Graph import GraphUndirectedUnweighted def get_bridges_h...
[ 1, 9995, 13, 26604, 29901, 13, 13, 29909, 12945, 297, 263, 6631, 313, 870, 1088, 287, 29897, 3983, 338, 385, 7636, 393, 29892, 565, 6206, 29892, 9946, 278, 13, 4262, 304, 4953, 766, 18045, 29889, 10987, 599, 278, 28635, 2710, 297, 263...
ryu/app/curly.py
doup123/diplomas
0
181578
<reponame>doup123/diplomas import pycurl from StringIO import StringIO class Curl: def __init__(self,host): self.url=str(host) def get_page(self,file=None): try: buffer = StringIO() c = pycurl.Curl() c.setopt(c.URL, self.url) c.setopt(c.WRITEDATA...
[ 1, 529, 276, 1112, 420, 29958, 29881, 1132, 29896, 29906, 29941, 29914, 6051, 8840, 294, 13, 5215, 282, 11078, 2271, 13, 3166, 1714, 5971, 1053, 1714, 5971, 13, 13, 1990, 315, 2271, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, ...
philander/__init__.py
pfirsich/philander
1
91108
<reponame>pfirsich/philander from .philander import *
[ 1, 529, 276, 1112, 420, 29958, 7810, 12935, 436, 29914, 561, 309, 3825, 13, 3166, 869, 561, 309, 3825, 1053, 334, 13, 2 ]
src/poliastro/plotting/porkchop.py
niharsalunke/poliastro
2
193036
<reponame>niharsalunke/poliastro """ This is the implementation of porkchop plot """ import numpy as np from astropy import coordinates as coord, units as u from matplotlib import pyplot as plt from poliastro.bodies import ( Earth, Jupiter, Mars, Mercury, Moon, Neptune, Pluto, Saturn, ...
[ 1, 529, 276, 1112, 420, 29958, 13428, 1503, 284, 348, 446, 29914, 3733, 15736, 307, 13, 15945, 29908, 13, 4013, 338, 278, 5314, 310, 282, 548, 305, 459, 6492, 13, 15945, 29908, 13, 5215, 12655, 408, 7442, 13, 3166, 8717, 14441, 1053, ...
utils.py
zrongcheng/srcnn
0
39508
<reponame>zrongcheng/srcnn """ Scipy version > 0.18 is needed, due to 'mode' option from scipy.misc.imread function """ import os import glob import h5py import random import matplotlib.pyplot as plt from PIL import Image # for loading images as YCbCr format import Scipy.misc import Scipy.ndimage import numpy as np ...
[ 1, 529, 276, 1112, 420, 29958, 29920, 29373, 305, 996, 29914, 4351, 15755, 13, 15945, 29908, 13, 29903, 455, 2272, 1873, 1405, 29871, 29900, 29889, 29896, 29947, 338, 4312, 29892, 2861, 304, 525, 8513, 29915, 2984, 515, 4560, 2272, 29889,...
tests/base.py
RussellLuo/goodjob
1
89827
#!/usr/bin/env python # -*- coding: utf-8 -*- import shlex from multiprocessing import Process from goodjob.jobs.models import Job, Operation class TestCase(object): def create_job(self, name='test', command='echo test'): args = shlex.split(command) provider = Operation(type='shell', command=arg...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 528, 2506, 13, 3166, 6674, 307, 985, 292, 1053, 10554, 13, 13, 3166, 1781, 9057, 29889, 90...
mysql-creat table&load csv.py
feilongwang92/mining-app-data
0
56266
# currScenRecQuery = """ # SELECT * from 'pla_scenario_values_new2' where rid='{rId}' and qno='{qNo}' # """.format(rId=1, qNo=2) # currScenRec = db.fetch_results(currScenRecQuery, single_row=True) # # updateBetaAttrQuery = """ # UPDATE 'pla_scenario...
[ 1, 6756, 13, 29937, 16256, 4421, 264, 4789, 3010, 353, 9995, 30004, 13, 29937, 462, 4706, 5097, 334, 515, 525, 13974, 29918, 1557, 24893, 29918, 5975, 29918, 1482, 29906, 29915, 988, 8177, 2433, 29912, 29878, 1204, 10162, 322, 3855, 1217,...
holmscan/webscan.py
dynamist/holmscan
7
1608593
<gh_stars>1-10 # -*- coding: utf-8 -*- # python std lib import logging # holmscan imports from holmscan.interface import HolmscanModule log = logging.getLogger(__name__) class Webscan(HolmscanModule): def __init__(self, controller): super(Webscan, self).__init__(controller) def get_web_scan(self, ...
[ 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, 29937, 3017, 3659, 4303, 13, 5215, 12183, 13, 13, 29937, 8753, 1516, 3068, 248...
SerialConnection.py
scottrfrancis/Pentair-Thing
1
151384
# See https://web.archive.org/web/20171130091506/https:/www.sdyoung.com/home/decoding-the-pentair-easytouch-rs-485-protocol/ # For details on pentair protocol # import serial from Connection import Connection, IOConnection class SerialConnection(IOConnection): def __init__(self, device): super().__init__(...
[ 1, 396, 2823, 2045, 597, 2676, 29889, 10867, 29889, 990, 29914, 2676, 29914, 29906, 29900, 29896, 29955, 29896, 29896, 29941, 29900, 29900, 29929, 29896, 29945, 29900, 29953, 29914, 991, 8419, 1636, 29889, 29879, 4518, 283, 865, 29889, 510, ...
src/graphwerk.py
LivingInABubble/inpredo
1
41370
<reponame>LivingInABubble/inpredo<filename>src/graphwerk.py import os import matplotlib.pyplot as plt import numpy as np from mplfinance.original_flavor import candlestick2_ochl from tqdm import tqdm def convolve_sma(array, period): return np.convolve(array, np.ones((period,)) / period, mode='valid') def graph...
[ 1, 529, 276, 1112, 420, 29958, 29931, 4357, 797, 2882, 23232, 29914, 262, 11965, 29877, 29966, 9507, 29958, 4351, 29914, 4262, 9888, 29889, 2272, 13, 5215, 2897, 13, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 12655, 408, ...
tools/moduletests/unit/test_arpignore.py
ketanbhut/aws-ec2rescue-linux
0
102437
# Copyright 2016-2018 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://aws.amazon.com/apache2.0/ # # # or in the "license" f...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29953, 29899, 29906, 29900, 29896, 29947, 16631, 29889, 510, 29892, 9266, 29889, 470, 967, 23736, 1078, 29889, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 1...
moyu_engine/config/system/save_system.py
MoYuStudio/MYSG01
0
79883
<reponame>MoYuStudio/MYSG01<gh_stars>0 import pickle import moyu_engine.config.data.constants as C class SavaSystem: def save_tilemap(): f=open('moyu_engine/config/data/game_save','wb') save_data = {'window':C.window} pickle.dump(save_data, f) f.close() def read_tilemap...
[ 1, 529, 276, 1112, 420, 29958, 22638, 29979, 29884, 28867, 29914, 17870, 26016, 29900, 29896, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 5215, 5839, 280, 13, 13, 5215, 19966, 29884, 29918, 10599, 29889, 2917, 29889, 1272, 29889, ...
bzt/modules/shellexec.py
dreading/taurus
0
132045
<reponame>dreading/taurus """ Copyright 2015 BlazeMeter Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
[ 1, 529, 276, 1112, 420, 29958, 29881, 19715, 29914, 941, 17142, 13, 15945, 29908, 13, 11882, 1266, 29871, 29906, 29900, 29896, 29945, 10465, 911, 29924, 1308, 9266, 29889, 13, 13, 29931, 293, 21144, 1090, 278, 13380, 19245, 29892, 10079, ...
milefrienddb/models/clients.py
jcrjaci/mil_test
0
1602130
<filename>milefrienddb/models/clients.py """Clients's app models.""" import uuid from django.db import models class Client(models.Model): """Model representing a client.""" DRIVER_LICENSE_PATH = 'clients/driver_license' PHOTO_PATH = 'clients/photos' CERT_INCORPORATION_PATH = 'clients/certificate_in...
[ 1, 529, 9507, 29958, 26763, 18326, 2585, 29914, 9794, 29914, 11303, 1237, 29889, 2272, 13, 15945, 29908, 29907, 492, 1237, 29915, 29879, 623, 4733, 1213, 15945, 13, 13, 5215, 318, 5416, 13, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 1...
exercises/028.py
rpoliselit/python-for-dummies
0
71184
<gh_stars>0 """ Make a program that the user has to guess a number between 1 and 5, then returns winner or loser. """ from random import randint w, l = 0, 0 play = 'y' while play == 'y': guess = int(input('Make your guess: ')) number = randint(1,5) if guess == number: print('You wins!') ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 9984, 263, 1824, 393, 278, 1404, 756, 304, 4140, 263, 1353, 13, 14811, 29871, 29896, 322, 29871, 29945, 29892, 769, 3639, 19576, 470, 1232, 261, 29889, 13, 15945, 2990...
landlab/components/soil_moisture/__init__.py
awickert/landlab
1
133833
<filename>landlab/components/soil_moisture/__init__.py from .soil_moisture_dynamics import SoilMoisture from .infiltrate_soil_green_ampt import SoilInfiltrationGreenAmpt __all__ = ['SoilMoisture', 'SoilInfiltrationGreenAmpt', ]
[ 1, 529, 9507, 29958, 1049, 8205, 29914, 14036, 29914, 578, 309, 29918, 4346, 391, 545, 29914, 1649, 2344, 26914, 2272, 13, 3166, 869, 578, 309, 29918, 4346, 391, 545, 29918, 29881, 2926, 1199, 1053, 1105, 309, 22638, 391, 545, 13, 3166,...
plugins/python/tasks.py
BBVA/deeptracy
85
3826
import json from washer.worker.actions import AppendStdout, AppendStderr from washer.worker.actions import CreateNamedLog, AppendToLog from washer.worker.actions import SetProperty from washer.worker.commands import washertask def pipenv_graph2deps(rawgraph): graph = json.loads(rawgraph) def build_entry(dat...
[ 1, 1053, 4390, 13, 13, 3166, 471, 2276, 29889, 24602, 29889, 7387, 1053, 22871, 855, 29881, 449, 29892, 22871, 855, 20405, 13, 3166, 471, 2276, 29889, 24602, 29889, 7387, 1053, 6204, 22175, 3403, 29892, 22871, 1762, 3403, 13, 3166, 471, ...
cms/templatetags/html.py
cresset-group/cms
13
1603438
<gh_stars>10-100 '''Template tags used for processing HTML.''' from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from django_jinja import library from cms.html import process as process_html @library.filter @stringfilter def html(text): ''' Processes HTML ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 12008, 6733, 8282, 1304, 363, 9068, 4544, 29889, 12008, 13, 13, 3166, 9557, 29889, 6886, 29889, 4381, 26705, 1053, 1347, 4572, 13, 3166, 9557, 29889, 13...
tests/bugs/core_6088_test.py
reevespaul/firebird-qa
0
146689
#coding:utf-8 # # id: bugs.core_6088 # title: "SIMILAR TO" hangs when processing parenthesis # decription: # Confirmed normal work (evaluation for less than 5 ms) on WI-T4.0.0.1598 # 31.12.2020: increased max duration threshold from 100 to 150 ms. # ...
[ 1, 396, 29883, 3689, 29901, 9420, 29899, 29947, 13, 29937, 13, 29937, 1178, 29901, 965, 24557, 29889, 3221, 29918, 29953, 29900, 29947, 29947, 13, 29937, 3611, 29901, 4706, 376, 5425, 29924, 6227, 1718, 7495, 29908, 13958, 29879, 746, 9068,...
data-scraper/main.py
tmthyln/MarylandMaps
0
129165
import requests import csv from bs4 import BeautifulSoup import time import wget import ssl import random ssl._create_default_https_context = ssl._create_unverified_context domain = "https://digital.lib.umd.edu" attributes = {'Title'} downloaded_map_cnt = 0 def download_image(record): time.sleep(random.random() *...
[ 1, 1053, 7274, 13, 5215, 11799, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 5215, 931, 13, 5215, 281, 657, 13, 5215, 24250, 13, 5215, 4036, 13, 13, 16265, 3032, 3258, 29918, 4381, 29918, 991, 29918, 4703, 353, 24250, 3032, 3...
examples/basic/wire_feedthrough.py
souviksaha97/spydrnet-physical
0
4224
""" ========================================== Genrating feedthrough from single instance ========================================== This example demostrates how to generate a feedthrough wire connection for a given scalar or vector wires. **Initial Design** .. hdl-diagram:: ../../../examples/basic/_initial_design.v...
[ 1, 9995, 13, 9166, 9166, 4936, 1360, 13, 15462, 29741, 8343, 20678, 515, 2323, 2777, 13, 9166, 9166, 4936, 1360, 13, 13, 4013, 1342, 1261, 520, 29878, 1078, 920, 304, 5706, 263, 8343, 20678, 8014, 3957, 363, 13, 29874, 2183, 17336, 47...
mmdnn/conversion/examples/tensorflow/extractor.py
ferriswym/MMdnn
0
17863
<filename>mmdnn/conversion/examples/tensorflow/extractor.py #---------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. #------...
[ 1, 529, 9507, 29958, 29885, 3487, 15755, 29914, 535, 3259, 29914, 19057, 29914, 29056, 29914, 21111, 272, 29889, 2272, 13, 29937, 2683, 2683, 2683, 2683, 2683, 9072, 489, 13, 29937, 29871, 14187, 1266, 313, 29883, 29897, 7783, 15025, 29889,...
tests/unit/configuration/twindb_backup_config/test_gcs.py
denssk/backup
69
119926
from twindb_backup.configuration import TwinDBBackupConfig def test_gcs(config_file): tbc = TwinDBBackupConfig(config_file=str(config_file)) assert tbc.gcs.gc_credentials_file == 'XXXXX' assert tbc.gcs.gc_encryption_key == '' assert tbc.gcs.bucket == 'twindb-backups' def test_no_gcs_section(tmpdir):...
[ 1, 515, 3252, 513, 29890, 29918, 1627, 786, 29889, 13305, 1053, 323, 5080, 4051, 5841, 786, 3991, 13, 13, 13, 1753, 1243, 29918, 29887, 2395, 29898, 2917, 29918, 1445, 1125, 13, 1678, 260, 12328, 353, 323, 5080, 4051, 5841, 786, 3991, ...
agent/sniffer_no_db.py
irtlab/thingscope
0
1602028
<reponame>irtlab/thingscope from scapy.all import * from new_dns_callback import DNSCallback import sys import argparse from colorprint import ColorPrint as color if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--devname", help="Enter the name of the device", default="exampl...
[ 1, 529, 276, 1112, 420, 29958, 2728, 8205, 29914, 386, 886, 4338, 13, 3166, 885, 27580, 29889, 497, 1053, 334, 13, 3166, 716, 29918, 29881, 1983, 29918, 14035, 1053, 16332, 10717, 13, 5215, 10876, 13, 5215, 1852, 5510, 13, 3166, 2927, ...
examples/semanticClustering/experimentUtil.py
mikiec84/SemanticModels.jl
0
164140
import pandas as pd import numpy as np import umap import sklearn.cluster as cluster from sklearn.cluster import KMeans from sklearn.cluster import DBSCAN import spacy import unicodedata import matplotlib.pyplot as plt import logging logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO) logging.getL...
[ 1, 1053, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 5215, 1922, 481, 13, 5215, 2071, 19668, 29889, 19594, 408, 9867, 13, 3166, 2071, 19668, 29889, 19594, 1053, 476, 6816, 550, 13, 3166, 2071, 19668, 29889, 19594, 1053, 6535, 718...
anymesh/tests/reactortester.py
AnyMesh/anyMesh-Python
39
32523
<reponame>AnyMesh/anyMesh-Python<filename>anymesh/tests/reactortester.py import unittest from twisted.internet import reactor, task class ReactorTestCase(unittest.TestCase): def __init__(self, *args, **kwargs): super(ReactorTestCase, self).__init__(*args, **kwargs) self.done = False def timeOu...
[ 1, 529, 276, 1112, 420, 29958, 10773, 29924, 12094, 29914, 1384, 29924, 12094, 29899, 11980, 29966, 9507, 29958, 273, 962, 12094, 29914, 21150, 29914, 8423, 441, 4156, 29889, 2272, 13, 5215, 443, 27958, 13, 3166, 3252, 12652, 29889, 14168, ...
dgcnn/__init__.py
Temigo/dynamic-gcnn
49
163661
from iotool import io_factory from model import build from trainval import trainval import ops from flags import DGCNN_FLAGS
[ 1, 515, 474, 327, 1507, 1053, 12013, 29918, 14399, 13, 3166, 1904, 1053, 2048, 13, 3166, 7945, 791, 1053, 7945, 791, 13, 5215, 288, 567, 13, 3166, 13449, 1053, 360, 8766, 10262, 29918, 18823, 10749, 13, 2 ]
app/app.py
kyoungd/material-stock-finder
0
175049
<gh_stars>0 import sys import logging import pandas as pd from datetime import datetime from alpaca import * from util import PushToServer, SetInterval from study import * from dbase import * from correlate import * def isTagInOptions(tag:str, cmds:list): return True if tag in cmds else False def AppDaily(): ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 10876, 13, 5215, 12183, 13, 5215, 11701, 408, 10518, 13, 3166, 12865, 1053, 12865, 13, 3166, 394, 29886, 11989, 1053, 334, 13, 3166, 3667, 1053, 349, 1878, 1762, 6004, 29892, 3789...
src/main.py
DantasB/smart-speaker
1
125794
import os import re import requests from datetime import datetime as dt import dotenv from shared_library.shared_library import generate_workfolder, delete_workfolder from listener.listener import Listener from speaker.speaker import Speaker dotenv.load_dotenv() ACTIVATION_WORD = os.environ.get("ACTIVATION_WORD") pr...
[ 1, 1053, 2897, 13, 5215, 337, 13, 5215, 7274, 13, 3166, 12865, 1053, 12865, 408, 11636, 13, 5215, 8329, 6272, 13, 3166, 7258, 29918, 5258, 29889, 12366, 29918, 5258, 1053, 5706, 29918, 1287, 12083, 29892, 5217, 29918, 1287, 12083, 13, 3...
datatableview/tests/test_helpers.py
gregneagle/sal
2
1648
<filename>datatableview/tests/test_helpers.py # -*- encoding: utf-8 -*- from datetime import datetime from functools import partial from django import get_version from datatableview import helpers import six from .testcase import DatatableViewTestCase from .test_app.models import ExampleModel, RelatedM2MModel if ...
[ 1, 529, 9507, 29958, 4130, 17219, 1493, 29914, 21150, 29914, 1688, 29918, 3952, 6774, 29889, 2272, 13, 29937, 448, 29930, 29899, 8025, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 3166, 12865, 1053, 12865, 13, 3166, 2090, 312, 8...
benchcamera.py
healeycodes/Raspberry-Pi-Live-Cam
6
103959
import io import time import picamera framerate = 90 quality = 100 resolutions = [(1920, 1080), (1280, 720), (800, 600), (640, 480), (320, 240)] samples = 50 with picamera.PiCamera(framerate=framerate) as camera: time.sleep(2) # camera warm-up time for res in resolutions: camera.resolution = res ...
[ 1, 1053, 12013, 13, 5215, 931, 13, 5215, 11942, 314, 1572, 13, 13, 1341, 4183, 403, 353, 29871, 29929, 29900, 13, 29567, 353, 29871, 29896, 29900, 29900, 13, 9778, 17925, 353, 17288, 29896, 29929, 29906, 29900, 29892, 29871, 29896, 29900,...
tests/test_pyglobal.py
justengel/pyglobal
0
57641
def test_simple(): import pyglobal import settings assert pyglobal.get('abc') == 123 assert pyglobal.get('qwerty') == '' assert pyglobal.get('Hello') == 'World!' assert pyglobal.get('SECRET_KEY') == '!!!CHANGE!!!' def test_hack(): import pyglobal pyglobal.set('SECRET_KEY', '*******...
[ 1, 29871, 13, 1753, 1243, 29918, 12857, 7295, 13, 1678, 1053, 19484, 3157, 13, 1678, 1053, 6055, 13, 13, 1678, 4974, 19484, 3157, 29889, 657, 877, 10736, 1495, 1275, 29871, 29896, 29906, 29941, 13, 1678, 4974, 19484, 3157, 29889, 657, 8...
Sem-5/PIP/Minor Assignment 8/A8Q3.py
rituraj-iter/ASSIGNMENTS
10
87135
<reponame>rituraj-iter/ASSIGNMENTS<filename>Sem-5/PIP/Minor Assignment 8/A8Q3.py<gh_stars>1-10 def power(n, m): if m == 0: return 1 elif m == 1: return n return (n*power(n, m-1)) print(power(2,3))
[ 1, 529, 276, 1112, 420, 29958, 768, 332, 1175, 29899, 1524, 29914, 22933, 17298, 13780, 29903, 29966, 9507, 29958, 28516, 29899, 29945, 29914, 2227, 29925, 29914, 8140, 272, 4007, 10194, 29871, 29947, 29914, 29909, 29947, 29984, 29941, 29889,...
kafka_streamer/topic/datatype/base.py
sam-mosleh/kafka-streamer
1
37609
<reponame>sam-mosleh/kafka-streamer<filename>kafka_streamer/topic/datatype/base.py from abc import ABC, abstractmethod from typing import Type, Union from kafka_streamer.models import SchematicRecord, Serializable class KafkaDataType(ABC): _MAGIC_BYTE = 0 @abstractmethod def deserialize(self, data: byte...
[ 1, 529, 276, 1112, 420, 29958, 13445, 29899, 7681, 280, 29882, 29914, 28510, 29899, 5461, 261, 29966, 9507, 29958, 28510, 29918, 5461, 261, 29914, 13010, 29914, 4130, 23179, 29914, 3188, 29889, 2272, 13, 3166, 25638, 1053, 16417, 29892, 984...
tests/test_rectangle.py
trejsu/shaper
0
46671
<filename>tests/test_rectangle.py<gh_stars>0 import numpy as np import pytest from shapes.shape import Quadrangle def test_from_normalized_params(): normalized = [1, 0.2866666666666667, 0.85, 0.32666666666666666, 0.65, 0.013333333333333334, 0.8, -0.02, 1, 2, 3, 0.5] w = 100 h = 150 ...
[ 1, 529, 9507, 29958, 21150, 29914, 1688, 29918, 1621, 2521, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 12655, 408, 7442, 13, 5215, 11451, 1688, 13, 13, 3166, 25834, 29889, 12181, 1053, 751, 328, 5854, 13, 13, 1...
PythonVSCode/DP_GFG/LongestCommonSubstring.py
porcelainruler/InterviewPrep
0
69132
''' The longest common suffix has following optimal substructure property. If last characters match, then we reduce both lengths by 1 LCSuff(X, Y, m, n) = LCSuff(X, Y, m-1, n-1) + 1 if X[m-1] = Y[n-1] If last characters do not match, then result is 0, i.e., LCSuff(X, Y, m, n) = 0 if (X[m-1] != Y[n-1]) Now we conside...
[ 1, 14550, 13, 13, 1576, 27217, 3619, 25557, 756, 1494, 14413, 1014, 23905, 2875, 29889, 13, 13, 3644, 1833, 4890, 1993, 29892, 769, 591, 10032, 1716, 27497, 491, 29871, 29896, 13, 29931, 9295, 3096, 29898, 29990, 29892, 612, 29892, 286, ...
src/tools/training.py
gpatsiaouras/multimodal-har-thesis
4
164917
<filename>src/tools/training.py import os import time import torch import torch.nn.functional as functional from sklearn.metrics import confusion_matrix from sklearn.neighbors import KNeighborsClassifier from visualizers import plot_confusion_matrix, print_epoch_info from .model_tools import save_model def train(mo...
[ 1, 529, 9507, 29958, 4351, 29914, 8504, 29914, 26495, 29889, 2272, 13, 5215, 2897, 13, 5215, 931, 13, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 13303, 13, 3166, 2071, 19668, 29889, 2527, 10817, 1053,...
files/autoupdate-you-resume-for-hh.ru/16_for_input_end=''.py
SKDCO/SKDCO
2
180411
<reponame>SKDCO/SKDCO Когда Павел учился в школе, он запоминал таблицу умножения прямоугольными блоками. Для тренировок ему бы очень пригодилась программа, которая показывала бы блок таблицы умножения. Напишите программу, на вход которой даются четыре числа a, b, c и d, каждое в своей строке. Программа должна вывест...
[ 1, 529, 276, 1112, 420, 29958, 16033, 29928, 3217, 29914, 16033, 29928, 3217, 13, 26022, 9077, 5390, 1521, 29944, 15517, 4633, 490, 12351, 753, 29892, 6524, 1077, 1268, 12189, 29944, 1710, 5116, 9062, 863, 29959, 570, 11268, 23380, 1630, ...
lib/socket/exceptions.py
mrcrgl/gge-storage
0
86902
class DeadConnectionException(Exception): pass
[ 1, 29871, 13, 13, 1990, 16992, 5350, 2451, 29898, 2451, 1125, 13, 1678, 1209, 2 ]
seisflow/scripts/shared/change_simulation_type.py
ziyixi/seisflow
2
120771
<filename>seisflow/scripts/shared/change_simulation_type.py """ change_simulation_type.py: change the simulation type in specfem massively. """ from glob import glob from os.path import join import sh if __name__ == "__main__": import click @click.command() @click.option('--base_directory', required=Tru...
[ 1, 529, 9507, 29958, 344, 275, 1731, 29914, 16713, 29914, 12366, 29914, 3167, 29918, 3601, 2785, 29918, 1853, 29889, 2272, 13, 15945, 29908, 13, 3167, 29918, 3601, 2785, 29918, 1853, 29889, 2272, 29901, 1735, 278, 17402, 1134, 297, 1580, ...
tests/test_wikipedia.py
cauliyang/test-poetry
0
52304
from test_poetry import wikipedia def test_random_page_use_given_language(mock_requests_get): wikipedia.random_page(language="de")
[ 1, 515, 1243, 29918, 1129, 27184, 1053, 281, 638, 4652, 13, 13, 13, 1753, 1243, 29918, 8172, 29918, 3488, 29918, 1509, 29918, 29887, 5428, 29918, 11675, 29898, 17640, 29918, 24830, 29918, 657, 1125, 13, 1678, 281, 638, 4652, 29889, 8172, ...
example/testapp/__init__.py
Ecotrust/rpc4django
28
90202
# -*- coding: utf-8 -*- from rpc4django import rpcmethod from .othermodule import intro, getrequest from .secretmodule import * # imports protected method @rpcmethod(name='rpc4django.mytestmethod',signature=['int', 'int', 'int', 'int']) def mytestmethod(a, b, c): ''' Adds the three parameters together and ret...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 3166, 364, 6739, 29946, 14095, 1053, 364, 29886, 4912, 959, 13, 3166, 869, 720, 837, 397, 1297, 1053, 22909, 29892, 679, 3827, 13, 3166, 869, 19024...
evaluation/filters.py
tmolitor-stud-tu/AnonPubSub
0
154548
# *** these filters do NOT see ping messages, nor do routers see them *** # *** global imports are NOT accessible, do imports in __init__ and bind them to an attribute *** class Filters(Base): def __init__(self, logger): # init parent class super().__init__(logger) # some...
[ 1, 29871, 13, 29937, 18610, 1438, 18094, 437, 6058, 1074, 24543, 7191, 29892, 3643, 437, 16053, 2153, 1074, 963, 18610, 13, 29937, 18610, 5534, 24802, 526, 6058, 15579, 29892, 437, 24802, 297, 4770, 2344, 1649, 322, 7868, 963, 304, 385, ...
bika/lims/browser/worksheet/views/analyses_transposed.py
hocinebendou/bika.gsoc
0
15166
# coding=utf-8 from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from bika.lims.browser.bika_listing import BikaListingTable from bika.lims.browser.worksheet.views.analyses import AnalysesView class AnalysesTransposedView(AnalysesView): """ The view for displaying the table of manage_results...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 3166, 10969, 29879, 29889, 29943, 573, 29889, 15965, 29889, 13573, 300, 331, 2341, 1445, 1053, 4533, 5074, 6733, 2283, 13, 3166, 289, 4106, 29889, 2576, 29879, 29889, 15965, 29889, 29890, 4106, ...
ExperimentBasics/migrations/0013_retryexperimentparticipation_retryuseranswer.py
tifat58/lsv-c4-django-webexperiment
1
144220
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2019-01-31 02:10 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('Users', '0010_auto_20180606_00...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3251, 630, 491, 15337, 29871, 29896, 29889, 29929, 29889, 29929, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29900, 29896, 29899, 29941, 29896, 298...
dianhua/worker/crawler/china_telecom/guangxi/main.py
Svolcano/python_exercise
6
185060
# -*- coding: utf-8 -*- from lxml import etree from datetime import date import traceback import time import sys import re from des_js import des_encode # 这段代码是用于解决中文报错的问题 reload(sys) sys.setdefaultencoding("utf8") from dateutil.relativedelta import relativedelta if __name__ == '__main__': sys.path...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 30004, 13, 30004, 13, 3166, 301, 3134, 1053, 634, 929, 30004, 13, 3166, 12865, 1053, 2635, 30004, 13, 5215, 9637, 1627, 30004, 13, 5215, 931, 30004, 13, 52...
web_fetch/sudoku_extract.py
widyaageng/Sudoku_auto
0
196197
<gh_stars>0 from util import svg_dict from web_fetch import fetch import numpy as np def get_field(): # Create board matrix sudoku_field = [] # Retrieve plain HTML source soup = fetch.get_html_txt_headless('https://sudoku.com/medium/') fetch.close_html_txt_headless() # Getting row list t...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 3667, 1053, 25773, 29918, 8977, 13, 3166, 1856, 29918, 9155, 1053, 6699, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 679, 29918, 2671, 7295, 13, 1678, 396, 6204, 7613, 4636, 1...
digits/keras_lenet_kernel.py
muggle14/kaggle_projects
33
67720
<filename>digits/keras_lenet_kernel.py import pandas as pd import numpy as np from keras.models import Sequential from keras.utils import np_utils from keras.layers.convolutional import Convolution2D from keras.layers.convolutional import MaxPooling2D from keras.layers.core import Activation from keras.layers.core im...
[ 1, 529, 9507, 29958, 7501, 1169, 29914, 3946, 294, 29918, 2435, 300, 29918, 17460, 29889, 2272, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 13, 3166, 13023, 294, 29889, 9794, 1053, 922, 339, 2556, 13, 3166, 13023, 294, ...
research/cv/resnet50_bam/src/config.py
leelige/mindspore
1
1609463
<filename>research/cv/resnet50_bam/src/config.py # Copyright 2021 Huawei Technologies Co., Ltd # # 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 #...
[ 1, 529, 9507, 29958, 690, 2842, 29914, 11023, 29914, 690, 1212, 29945, 29900, 29918, 29890, 314, 29914, 4351, 29914, 2917, 29889, 2272, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29896, 379, 3357, 26599, 8364, 11763, 3189, 1696, 19...
actor_critic/pretrain.py
tttslab/armos
0
1614027
<reponame>tttslab/armos import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import models import utils import configparser import time import logging import librosa import random import copy logging.basicConfig(filename='log/pretrain.log', level=logging.INFO) ### Hyperparameters conf...
[ 1, 529, 276, 1112, 420, 29958, 698, 1372, 8205, 29914, 2817, 359, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 5215, 12655, 408, 7442, 13, ...
aioqiwi/wallet/urls.py
Derad6709/aioqiwi
33
107065
from ..core.tooling.htstrings import HeadTailString class WalletURL(HeadTailString): __head__ = "https://edge.qiwi.com/" class urls: me = WalletURL("person-profile/v1/profile/current") identification = WalletURL("identification/v1/persons/{}/identification") history = WalletURL("payment-history/v2/p...
[ 1, 515, 6317, 3221, 29889, 10154, 292, 29889, 400, 19651, 1053, 12252, 29911, 737, 1231, 13, 13, 13, 1990, 5260, 1026, 4219, 29898, 5494, 29911, 737, 1231, 1125, 13, 1678, 4770, 2813, 1649, 353, 376, 991, 597, 12864, 29889, 26461, 4353,...
carla_utils/agents/__init__.py
zhangdongkun98/carla-utils
6
136470
<reponame>zhangdongkun98/carla-utils from .agents_route_planner import AgentsRoutePlanner from .agents_master import AgentListMaster from .controller import Controller from .vehicle_model import RealModel, BicycleModel2D, BicycleModel2DParallel from .agent_abc import AgentABC from .agent_base import BaseAgent from ....
[ 1, 529, 276, 1112, 420, 29958, 29920, 11895, 29881, 549, 29895, 348, 29929, 29947, 29914, 4287, 433, 29899, 13239, 13, 13, 3166, 869, 351, 1237, 29918, 13134, 29918, 572, 7310, 1053, 4059, 1237, 12085, 3247, 7310, 13, 3166, 869, 351, 12...
itglue/resources.py
lisath92/itglue-py
6
1612592
from . import connection from . import process_path import re __all__ = [ "Organization", "Configuration", "ConfigurationType", "ConfigurationStatus", "ConfigurationInterface", "Location", "FlexibleAsset", "FlexibleAssetField", "FlexibleAssetType" ] class ResourceBase(object): ...
[ 1, 515, 869, 1053, 3957, 13, 3166, 869, 1053, 1889, 29918, 2084, 13, 5215, 337, 13, 13, 1649, 497, 1649, 353, 518, 13, 1678, 376, 27356, 2133, 613, 13, 1678, 376, 8614, 613, 13, 1678, 376, 8614, 1542, 613, 13, 1678, 376, 8614, 570...
mozumder/models/i18n/scripts.py
mozumder/django-mozumder
1
118130
from django.db import models from datetime import date # Create your models here. class Script(models.Model): """ For the script designator, use the ISO 15924 standard, four letters with the first letter uppercase and the last three lowercase. """ iso_15294 = models.CharField(max_length=4,unique=T...
[ 1, 515, 9557, 29889, 2585, 1053, 4733, 13, 3166, 12865, 1053, 2635, 13, 13, 29937, 6204, 596, 4733, 1244, 29889, 13, 13, 1990, 14415, 29898, 9794, 29889, 3195, 1125, 13, 1678, 9995, 13, 1678, 1152, 278, 2471, 2874, 1061, 29892, 671, 2...
custom/icds_reports/data_pull/exceptions.py
scottwedge/commcare-hq
0
170202
<reponame>scottwedge/commcare-hq class UnboundDataPullException(Exception): pass class DataPullInProgressError(Exception): pass
[ 1, 529, 276, 1112, 420, 29958, 1557, 1501, 17864, 29914, 2055, 18020, 29899, 29882, 29939, 13, 1990, 853, 9917, 1469, 29925, 913, 2451, 29898, 2451, 1125, 13, 1678, 1209, 13, 13, 13, 1990, 3630, 29925, 913, 797, 14470, 2392, 29898, 2451...
lib/zkv/zkv.py
csernazs/zkv
0
112202
<reponame>csernazs/zkv from .exc import Error class ZKVError(Error): pass class ZKV: def __init__(self, backend, key_transforms=None, value_transforms=None): self.backend = backend if key_transforms is None: key_transforms = [] if value_transforms is None: v...
[ 1, 529, 276, 1112, 420, 29958, 29883, 643, 29876, 834, 29879, 29914, 7730, 29894, 13, 13, 3166, 869, 735, 29883, 1053, 4829, 13, 13, 13, 1990, 796, 29968, 29963, 2392, 29898, 2392, 1125, 13, 1678, 1209, 13, 13, 13, 1990, 796, 29968, ...
tests/dummies.py
arvindmuralie77/gradsflow
253
797
# Copyright (c) 2021 GradsFlow. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ 1, 396, 29871, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29896, 1632, 7925, 17907, 29889, 2178, 10462, 21676, 29889, 13, 29937, 13, 29937, 29871, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 2990...
networks/network.py
valeoai/POCO
13
154973
<gh_stars>10-100 import torch from torch_geometric.data import Data import logging from .backbone import * from .decoder import * from lightconvpoint.spatial import knn, sampling_quantized as sampling from lightconvpoint.utils.functional import batch_gather from lightconvpoint.nn import max_pool, interpolate def count...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 29918, 479, 14066, 29889, 1272, 1053, 3630, 13, 5215, 12183, 13, 3166, 869, 1627, 15933, 1053, 334, 13, 3166, 86...
mergecli-runner.py
srp33/ShapeShifter-CLI
1
110394
#!/usr/bin/env python from mergecli.mergecli import main if __name__ == '__main__': main()
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 3166, 10366, 11303, 29889, 14634, 11303, 1053, 1667, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1667, 580, 2 ]
tools/visualize_results_v2.py
kruda/DetectAndTrack
1,007
67458
<reponame>kruda/DetectAndTrack ############################################################## # Copyright (c) 2018-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. ####################################...
[ 1, 529, 276, 1112, 420, 29958, 12748, 6191, 29914, 6362, 522, 2855, 17936, 13, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 29899, 6338, 29892, 13327, 29892, 9266, 2988...
irods/constants.py
trel/python-irodsclient
54
120797
<reponame>trel/python-irodsclient SYS_SVR_TO_CLI_COLL_STAT = 99999996 SYS_CLI_TO_SVR_COLL_STAT_REPLY = 99999997
[ 1, 529, 276, 1112, 420, 29958, 2484, 29880, 29914, 4691, 29899, 3350, 29881, 1557, 1593, 13, 13, 14816, 29903, 29918, 7597, 29934, 29918, 4986, 29918, 27205, 29918, 3217, 2208, 29918, 17816, 353, 29871, 29929, 29929, 29929, 29929, 29929, 29...
modules/blog.py
rdelfin/personal-site
0
30098
<gh_stars>0 from flask import Blueprint, Response, abort, render_template from utils import blog as blog_utils from utils import tags as tag_utils bp = Blueprint("blog", __name__) @bp.route("/", methods=["GET"]) def blog(): return blog_utils.respond_blog_list() @bp.route("/post_<post_name>", methods=["GET"]) ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 29784, 1053, 10924, 2158, 29892, 13291, 29892, 27450, 29892, 4050, 29918, 6886, 13, 13, 3166, 3667, 29879, 1053, 12618, 408, 12618, 29918, 13239, 13, 3166, 3667, 29879, 1053, 8282, ...
webnmap/__init__.py
jtdub/webnmap
0
84771
<gh_stars>0 from webnmap.celery import app as celery_app __all__ = ('celery_app',)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 1856, 29876, 1958, 29889, 2242, 708, 1053, 623, 408, 6432, 708, 29918, 932, 13, 13, 13, 1649, 497, 1649, 353, 6702, 2242, 708, 29918, 932, 742, 29897, 13, 2 ]
scripts/python/routines/plot/violin.py
GillianGrayson/dnamvae
1
82808
<reponame>GillianGrayson/dnamvae import plotly.graph_objects as go def add_violin_trace(fig, y, name): showlegend = False if name == "" else True fig.add_trace( go.Violin( y=y, name=name, box_visible=True, showlegend=showlegend, ) )
[ 1, 529, 276, 1112, 420, 29958, 29954, 453, 713, 29954, 764, 1100, 29914, 5200, 314, 1564, 29872, 13, 5215, 6492, 368, 29889, 4262, 29918, 12650, 408, 748, 13, 13, 13, 1753, 788, 29918, 1403, 22878, 29918, 15003, 29898, 1003, 29892, 343,...
notebook_xterm/terminalserver.py
marcotessarotto/notebook_xterm
15
98522
from __future__ import (absolute_import, division, print_function, unicode_literals) import pty, os, tty, termios, time, sys, base64, struct, signal from fcntl import fcntl, F_GETFL, F_SETFL, ioctl class TerminalServer: def __init__(self): self.closed = False self.pid, self...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 313, 23552, 29918, 5215, 29892, 8542, 29892, 13, 462, 4706, 1596, 29918, 2220, 29892, 29104, 29918, 20889, 1338, 29897, 13, 13, 5215, 282, 1017, 29892, 2897, 29892, 260, 1017, 29892, 1840, 2363, 2989...
mut/viz.py
RPGroup-PBoC/mwc_mutants
3
29167
import bokeh.io import bokeh.plotting import bokeh.layouts import bokeh.palettes import seaborn as sns import numpy as np import os import matplotlib.pyplot as plt import matplotlib def plotting_style(grid=True): """ Sets the style to the publication style """ rc = {'axes.facecolor': '#E3DCD0', ...
[ 1, 1053, 1045, 446, 29882, 29889, 601, 13, 5215, 1045, 446, 29882, 29889, 5317, 1259, 13, 5215, 1045, 446, 29882, 29889, 2680, 29879, 13, 5215, 1045, 446, 29882, 29889, 29886, 744, 698, 267, 13, 5215, 409, 370, 1398, 408, 269, 1983, 1...