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
sec_utils/SecNET.py
squigglepuff/firebytes
0
109547
#!/usr/bin/env python # *-* coding: utf-8 *-* import sys import re import socket if sys.version_info[0] < 3: import pyping from logger import PrintLog else: from sec_utils.logger import PrintLog ''' \brief This is a basic network testing class. This class's sole purpose is to test for REALLY basic netwo...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 334, 29899, 29930, 14137, 29901, 23616, 29899, 29947, 334, 29899, 29930, 13, 13, 5215, 10876, 13, 5215, 337, 13, 5215, 9909, 13, 13, 361, 10876, 29889, 3259, 29918, 3888, 29961, ...
Binary Tree Maximum Path Sum.py
frank0215/Leetcode_python
0
116868
class TreeNode: def __init__(self, val): self.val = val self.left =None self.right = None # 只能從root開始的最大路徑和 (可以不選 都不選為0) def maxPathSumRoot(root): if not root: return 0 # 有選root 往左或往右 left = maxPathSumRoot(root.left) + root.val right = maxPathSumRoot(root.right) + root.val ...
[ 1, 29871, 13, 1990, 15472, 4247, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 659, 1125, 13, 4706, 1583, 29889, 791, 353, 659, 13, 4706, 1583, 29889, 1563, 353, 8516, 13, 4706, 1583, 29889, 1266, 353, 6213, 13, 13, 29937, 298...
CNN/dpp_regression.py
phillnguyen/schnablelab
0
143861
""" train neural network to detect whether plant flowers or not """ import warnings warnings.filterwarnings('ignore',category=FutureWarning) from glob import glob import numpy as np import pickle import deepplantphenomics as dpp from pathlib import Path import os import sys def train(train_dir, label_fn, model_dir, ep...
[ 1, 9995, 13, 14968, 19677, 3564, 304, 6459, 3692, 8024, 18281, 470, 451, 13, 15945, 29908, 13, 5215, 18116, 13, 25442, 886, 29889, 4572, 25442, 886, 877, 17281, 742, 7320, 29922, 20154, 22709, 29897, 13, 3166, 13149, 1053, 13149, 13, 52...
py/yaptu.py
karim7262/pytudes
1
73737
"""Yet Another Python Templating Utility, Version 1.2, by <NAME>. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52305 (Specialized to HTML and modified by <NAME>.) Copies input to output, with some substitutions. There are three types of substitutions: lexical, expression, and statement. LEXICAL SUBS...
[ 1, 9995, 29979, 300, 7280, 5132, 6789, 572, 1218, 22310, 537, 29892, 10079, 29871, 29896, 29889, 29906, 29892, 491, 529, 5813, 15513, 13, 259, 1732, 597, 4692, 29876, 29889, 11236, 342, 403, 29889, 510, 29914, 3289, 15695, 29914, 19159, 2...
sleep_utils.py
skjerns/NT1-HRV
1
30866
<filename>sleep_utils.py # -*- coding: utf-8 -*- """ Created on Thu Nov 21 20:19:26 2019 @author: skjerns """ from pyedflib.highlevel import * import os import gc import warnings import ospath #pip install https://github.com/skjerns/skjerns-utils import numpy as np import pyedflib #pip install https://github.com/skjer...
[ 1, 529, 9507, 29958, 17059, 29918, 13239, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 373, 498, 29884, 2864, 29871, 29906, 29896, 29871, 29906, 29900, 29901, ...
beam_steering.py
Substancia/FDTD-Huygens-metasurface
0
146482
# import only necessary functions from modules to reduce load from fdtd_venv import fdtd_mod as fdtd from numpy import arange, array, where from matplotlib.pyplot import subplot, plot, xlabel, ylabel, legend, title, suptitle, show, ylim, figure from scipy.optimize import curve_fit from os import path from sys import ar...
[ 1, 396, 1053, 871, 5181, 3168, 515, 10585, 304, 10032, 2254, 13, 3166, 285, 29881, 1594, 29918, 854, 29894, 1053, 285, 29881, 1594, 29918, 1545, 408, 285, 29881, 1594, 13, 3166, 12655, 1053, 564, 927, 29892, 1409, 29892, 988, 13, 3166, ...
Email.py
maste150hhu/Python-Email-Client
1
148272
<gh_stars>1-10 import os from Account import Account import datetime #class Email: # An email consists of sender (send) # recipient (rec), title, text #def __init__(self, send, rec, title, text): # self.send = send # self.rec = rec # self.title = title # self.text = text #...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 2897, 13, 3166, 16535, 1053, 16535, 13, 5215, 12865, 13, 13, 29937, 1990, 22608, 29901, 13, 13, 1678, 396, 530, 4876, 11624, 310, 10004, 313, 6717, 29897, 13,...
tally_ho/apps/tally/tests/views/data/test_tally_list_view.py
onaio/tally-ho
12
197702
import json from django.test import RequestFactory from tally_ho.apps.tally.views.data import tally_list_view as views from tally_ho.libs.permissions import groups from tally_ho.libs.tests.test_base import create_tally, TestBase class TestTallyListView(TestBase): """ Test tally list class base views. """...
[ 1, 1053, 4390, 13, 3166, 9557, 29889, 1688, 1053, 10729, 5126, 13, 13, 3166, 260, 635, 29918, 1251, 29889, 13371, 29889, 29873, 635, 29889, 7406, 29889, 1272, 1053, 260, 635, 29918, 1761, 29918, 1493, 408, 8386, 13, 3166, 260, 635, 2991...
code/Python/vtk_development/VTK_Example/Widgets/ContourWidget.py
nhyilin/devNotes
0
128844
#!/usr/bin/python import vtk import sys import math # Create the RenderWindow, Renderer and both Actors renderer = vtk.vtkRenderer() renderWindow = vtk.vtkRenderWindow() renderWindow.AddRenderer(renderer) interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(renderWindow) renderer.SetBackground(0...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 13, 5215, 325, 11178, 13, 5215, 10876, 13, 5215, 5844, 13, 13, 29937, 6204, 278, 26000, 5907, 29892, 26000, 261, 322, 1716, 3185, 943, 13, 13, 9482, 261, 353, 325, 11178, 29889, 29894, 111...
playground/pets_dubins.py
pecey/mbrl-lib
0
16788
<gh_stars>0 import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import torch import omegaconf import mbrl.env.continuous_dubins as dubins_env import mbrl.env.reward_fns as reward_fns import mbrl.env.termination_fns as termination_fns import mbrl.models as models import mbrl.planning as planning...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 22889, 408, 286, 572, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 12655, 408, 7442, 13, 5215, 4842, 305, 13, 5215, 2703, 2442, 5527, 13, 13, 5215, 286, 1182, 29880...
app/migrations/0001_initial.py
Jamesnduge/Hood-Watch
0
138362
<filename>app/migrations/0001_initial.py # -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2019-03-25 12:12 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import pyuploadcare.dj.models import tinymce.models cla...
[ 1, 529, 9507, 29958, 932, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29896, 29918, 11228, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3251, 630, 491, 15337, 29871, 29896, 2...
tmapi/models/name.py
ajenhl/django-tmapi
2
44385
# Copyright 2011 <NAME> (<EMAIL>) # # 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 writ...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29896, 529, 5813, 29958, 313, 29966, 26862, 6227, 12948, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 194...
migrations/versions/2286baefdbc2_.py
FlyingBird95/covid-19
0
154466
"""empty message Revision ID: 2286baefdbc2 Revises: ca9ba145768e Create Date: 2020-03-26 21:47:03.150005 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = 'ca9ba145768e' branch_labels = None depends_on = None def upgrade(): # ### com...
[ 1, 9995, 6310, 2643, 13, 13, 1123, 4924, 3553, 29901, 29871, 29906, 29906, 29947, 29953, 2291, 1389, 11140, 29906, 13, 1123, 1730, 267, 29901, 5777, 29929, 2291, 29896, 29946, 29945, 29955, 29953, 29947, 29872, 13, 4391, 4712, 29901, 29871,...
tutorial/43.py
mssung94/daishin-trading-system
2
5001
# 대신증권 API # 데이터 요청 방법 2가지 BlockRequest 와 Request 방식 비교 예제 # 플러스 API 에서 데이터를 요청하는 방법은 크게 2가지가 있습니다 # # BlockRequest 방식 - 가장 간단하게 데이터 요청해서 수신 가능 # Request 호출 후 Received 이벤트로 수신 받기 # # 아래는 위 2가지를 비교할 수 있도록 만든 예제 코드입니다 # 일반적인 데이터 요청에는 BlockRequest 방식이 가장 간단합니다 # 다만, BlockRequest 함수 내에서도 동일 하게 메시지펌핑을 하고 있어 해당 ...
[ 1, 396, 29871, 30890, 31262, 239, 169, 160, 237, 185, 143, 3450, 30004, 13, 29937, 29871, 238, 144, 179, 30393, 31856, 29871, 31527, 239, 181, 176, 29871, 31945, 238, 181, 152, 29871, 29906, 30903, 30811, 15658, 3089, 29871, 239, 156, 1...
tests/__init__.py
cmsteffen-code/steffentools
0
191245
<reponame>cmsteffen-code/steffentools<gh_stars>0 """SteffenTools Tests Module."""
[ 1, 529, 276, 1112, 420, 29958, 4912, 1655, 15794, 29899, 401, 29914, 1655, 600, 296, 8789, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 7789, 15794, 24183, 4321, 29879, 15591, 1213, 15945, 13, 2 ]
dsa/patterns/topological_sort.py/reconstructing_a_sequence.py
bksahu/dsa
0
196566
""" Given a sequence originalSeq and an array of sequences, write a method to find if originalSeq can be uniquely reconstructed from the array of sequences. Unique reconstruction means that we need to find if originalSeq is the only sequence such that all sequences in the array are subsequences of it. Example 1: In...
[ 1, 9995, 13, 29954, 5428, 263, 5665, 2441, 23718, 322, 385, 1409, 310, 15602, 29892, 2436, 263, 1158, 304, 1284, 565, 2441, 23718, 508, 367, 20498, 873, 29871, 13, 276, 11433, 287, 515, 278, 1409, 310, 15602, 29889, 13, 13, 8110, 802,...
geotraf.py
hokru/geotrafo
0
175585
#!/usr/bin/python import sys import numpy as np from math import sqrt,cos,sin,acos,radians import argparse """ rotation around arbitrary torsional angles ToDo: - PDB files: - read - recognize backbone angles by name from PDB files - translation """ nat=0 elem = [] xyz = [] SYM=[] # matrix to do symmetry ope...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 5215, 10876, 13, 5215, 12655, 408, 7442, 13, 3166, 5844, 1053, 18074, 2273, 29892, 3944, 29892, 5223, 29892, 562, 359, 29892, 3665, 5834, 13, 5215, 1852, 5510, 13, 13, 15945, 29908, 13, 13, ...
python/test.py
dailymotion/chash
9
74802
<gh_stars>1-10 #!/usr/bin/python import unittest import chash import os from hashlib import md5 class TestCHash(unittest.TestCase): def test_add_target(self): c = chash.CHash() self.failUnlessEqual(c.add_target("192.168.0.1"), None) self.failUnlessEqual(c.count_targets(), 1) def te...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 13, 5215, 443, 27958, 13, 5215, 521, 1161, 13, 5215, 2897, 13, 13, 3166, 6608, 1982, 1053, 22821, 29945, 13, 13, ...
research/packages_setup.py
datadonK23/Engine
2
190349
import numpy as np import pandas as pd # Install packages and libraries # This only needs to be done once per notebook. # installing nltk and its packages import nltk nltk.download('punkt') nltk.download('averaged_perceptron_tagger') nltk.download('brown') # Installing textract !apt-get install python-dev libxml2-...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 13, 29937, 16052, 9741, 322, 9562, 13, 29937, 910, 871, 4225, 304, 367, 2309, 2748, 639, 451, 19273, 29889, 13, 13, 13, 29937, 15476, 302, 1896, 29895, 322, 967, 9741, 13, ...
app.py
choochootrain/choochoodash
0
93861
import os import requests from flask import Flask, render_template app = Flask(__name__) app.config['DEBUG'] = True @app.route('/') def index(): return render_template('index.html') #API @app.route('/api/ping', methods=['GET']) def api_ping(): return "pong" @app.route('/api/weather/<int:city_id>', methods=...
[ 1, 1053, 2897, 13, 5215, 7274, 13, 13, 3166, 29784, 1053, 2379, 1278, 29892, 4050, 29918, 6886, 13, 13, 932, 353, 2379, 1278, 22168, 978, 1649, 29897, 13, 932, 29889, 2917, 1839, 18525, 2033, 353, 5852, 13, 13, 29992, 932, 29889, 1313...
source/fsx-dns-name.py
alcousins/aws-edit-in-the-cloud
36
176625
<reponame>alcousins/aws-edit-in-the-cloud """ http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License ...
[ 1, 529, 276, 1112, 420, 29958, 284, 29883, 681, 1144, 29914, 10467, 29899, 5628, 29899, 262, 29899, 1552, 29899, 9274, 13, 15945, 19451, 13, 1124, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 299...
train.py
thinkreed/ECBSR
162
50941
import torch import torch.nn as nn import torch.nn.functional as F from datas.benchmark import Benchmark from datas.div2k import DIV2K from models.ecbsr import ECBSR from torch.utils.data import DataLoader import math import argparse, yaml import utils import os from tqdm import tqdm import logging import sys import ti...
[ 1, 1053, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 3166, 6155, 29889, 1785, 16580, 1053, 4111, 16580, 13, 3166, 6155, 29889, 4563, 29906, 29895, 105...
barbante/recommendation/RecommenderHRRandom.py
hypermindr/barbante
10
160946
""" Hybrid Recommender HRRandom. """ import random from barbante.recommendation.HybridRecommender import HybridRecommender import barbante.utils.logging as barbante_logging log = barbante_logging.get_logger(__name__) class RecommenderHRRandom(HybridRecommender): """ Hybrid Recommender HRRandom. It mer...
[ 1, 9995, 9665, 19515, 830, 2055, 1581, 379, 29934, 17875, 29889, 13, 15945, 29908, 13, 13, 5215, 4036, 13, 13, 3166, 2594, 29890, 1647, 29889, 276, 2055, 355, 362, 29889, 26322, 19515, 1123, 2055, 1581, 1053, 9665, 19515, 1123, 2055, 15...
irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py
ahcorde/create3_sim
0
78918
#!/usr/bin/env python3 # Copyright 2021 iRobot Corporation. All Rights Reserved. # @author <NAME> (<EMAIL>) # # Launch Create(R) 3 nodes from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription fr...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29896, 474, 21860, 327, 15025, 29889, 2178, 26863, 2538, 9841, 29889, 13, 29937, 732, 8921, 529, 5813, 29958, 313, 29966, 26862, 6227...
utils.py
neilsmurphy/backtrader_template
75
190573
############################################################################### # # Software program written by <NAME> in year 2021. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE....
[ 1, 835, 13383, 13383, 13383, 13383, 7346, 4136, 13, 29937, 13, 29937, 18540, 1824, 3971, 491, 529, 5813, 29958, 297, 1629, 29871, 29906, 29900, 29906, 29896, 29889, 13, 29937, 13, 29937, 910, 1824, 338, 13235, 297, 278, 4966, 393, 372, ...
sensorgridapi/core/settings/common.py
Verdinjoshua26/SensorGridAPI
8
170161
""" Django settings for sensorgridapi project. Generated by 'django-admin startproject' using Django 1.11.9. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ imp...
[ 1, 9995, 13, 29928, 5364, 6055, 363, 23530, 7720, 2754, 2060, 29889, 13, 13, 24565, 491, 525, 14095, 29899, 6406, 1369, 4836, 29915, 773, 15337, 29871, 29896, 29889, 29896, 29896, 29889, 29929, 29889, 13, 13, 2831, 901, 2472, 373, 445, ...
merlin/models/data/movielens.py
rhdong/models
0
54567
import logging import os import shutil from os import path import numpy as np import nvtabular as nvt import pandas as pd from nvtabular import ops import merlin.io # Get dataframe library - cudf or pandas from merlin.core.dispatch import get_lib from merlin.core.utils import download_file df_lib = get_lib() loggi...
[ 1, 1053, 12183, 13, 5215, 2897, 13, 5215, 528, 4422, 13, 3166, 2897, 1053, 2224, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 302, 29894, 9456, 408, 302, 21908, 13, 5215, 11701, 408, 10518, 13, 3166, 302, 29894, 9456, 1053, 288, 567, 1...
CondCore/ESSources/test/python/write_beamspot_cfg.py
PKUfudawei/cmssw
1
173974
<filename>CondCore/ESSources/test/python/write_beamspot_cfg.py from __future__ import print_function import time import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing from Configuration.AlCa.autoCond import autoCond options = VarParsing.VarParsing() options.register('connection...
[ 1, 529, 9507, 29958, 10983, 9203, 29914, 29923, 1799, 2863, 29914, 1688, 29914, 4691, 29914, 3539, 29918, 915, 314, 17500, 29918, 16859, 29889, 2272, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 5215, 931, 13, 13, ...
main.py
leehsong/FabricNewGUI
1
71900
################################################################################ ## ## BY: <NAME> ## PROJECT MADE WITH: Qt Designer and PySide2 ## V: 1.0.0 ## ## This project can be used freely for all uses, as long as they maintain the ## respective credits only in the Python scripts, any information in the visual ## ...
[ 1, 835, 13383, 13383, 13383, 13383, 7346, 4136, 29937, 13, 2277, 13, 2277, 6770, 29901, 529, 5813, 29958, 13, 2277, 13756, 17637, 14861, 2287, 22659, 29901, 14705, 12037, 261, 322, 10772, 23908, 29906, 13, 2277, 478, 29901, 29871, 29896, ...
lib/__init__.py
federico123579/BigBrother
29
108708
<reponame>federico123579/BigBrother __all__ = ['base', 'bbro', 'clint', 'sentry']
[ 1, 529, 276, 1112, 420, 29958, 29888, 2447, 1417, 29896, 29906, 29941, 29945, 29955, 29929, 29914, 6970, 29857, 721, 13, 1649, 497, 1649, 353, 6024, 3188, 742, 525, 1327, 307, 742, 525, 695, 524, 742, 525, 29879, 8269, 2033, 13, 2 ]
server.py
health-line/health-line-backend
0
42789
from flask import Flask from flask import jsonify from flask_sqlalchemy import SQLAlchemy from sqlalchemy import text from flask_cors import CORS, cross_origin import os app = Flask(__name__) CORS(app) app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['SQLALCHEMY_DATABASE_URI'] db = SQLAlchemy(app) db.engine.execute...
[ 1, 515, 29784, 1053, 2379, 1278, 13, 3166, 29784, 1053, 4390, 1598, 13, 3166, 29784, 29918, 2850, 284, 305, 6764, 1053, 3758, 2499, 305, 6764, 13, 3166, 4576, 284, 305, 6764, 1053, 1426, 13, 3166, 29784, 29918, 29883, 943, 1053, 315, ...
space_manager/branches/migrations/0011_branch_minimap_img.py
yoojat/Space-Manager
0
44242
# -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-05-03 14:34 from __future__ import unicode_literals from django.db import migrations, models import space_manager.branches.models class Migration(migrations.Migration): dependencies = [ ('branches', '0010_branch_lounge_img_cabinet'), ] ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3251, 630, 491, 15337, 29871, 29896, 29889, 29896, 29896, 29889, 29929, 373, 29871, 29906, 29900, 29896, 29947, 29899, 29900, 29945, 29899, 29900, 299...
app/__init__.py
meedan/alegre
11
88120
<reponame>meedan/alegre # app/__init__.py from flask_restplus import Api from flask import Blueprint from .main.controller.about_controller import api as about_ns from .main.controller.healthcheck_controller import api as healthcheck_ns from .main.controller.langid_controller import api as langid_ns from .main.contro...
[ 1, 529, 276, 1112, 420, 29958, 1004, 287, 273, 29914, 744, 7979, 13, 29937, 623, 29914, 1649, 2344, 26914, 2272, 13, 13, 3166, 29784, 29918, 5060, 11242, 1053, 29749, 13, 3166, 29784, 1053, 10924, 2158, 13, 13, 3166, 869, 3396, 29889, ...
tests/__init__.py
coleb/sendoff
2
6662
"""Tests for the `sendoff` library.""" """ The `sendoff` library tests validate the expected function of the library. """
[ 1, 9995, 24376, 363, 278, 421, 6717, 2696, 29952, 3489, 1213, 15945, 13, 15945, 29908, 13, 1576, 421, 6717, 2696, 29952, 3489, 6987, 12725, 278, 3806, 740, 310, 278, 3489, 29889, 13, 15945, 29908, 13, 2 ]
tests/test_service_env.py
awesome-archive/BentoML
0
149705
<gh_stars>0 import os import bentoml def test_requirement_txt_env(tmpdir): req_txt_file = tmpdir.join("requirements.txt") with open(str(req_txt_file), 'wb') as f: f.write(b"numpy\npandas\ntorch") @bentoml.env(requirements_txt=str(req_txt_file)) class ServiceWithFile(bentoml.BentoService): ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2897, 13, 13, 5215, 26148, 290, 29880, 13, 13, 13, 1753, 1243, 29918, 12277, 358, 29918, 3945, 29918, 6272, 29898, 7050, 3972, 1125, 13, 1678, 12428, 29918, 3945, 29918, 1445, 353...
2475.py
FelisCatusKR/Baekjoon_Python3
0
70709
# 2475.py print(sum([x*x for x in map(int,input().split())])%10)
[ 1, 29871, 30143, 29937, 29871, 29906, 29946, 29955, 29945, 29889, 2272, 13, 2158, 29898, 2083, 4197, 29916, 29930, 29916, 363, 921, 297, 2910, 29898, 524, 29892, 2080, 2141, 5451, 3101, 2314, 29995, 29896, 29900, 29897, 2 ]
django_saml/views.py
zendesk/python3-saml-django
20
133607
import logging from django.conf import settings from django.contrib import auth from django.core.exceptions import PermissionDenied from django.http import HttpResponse, HttpResponseRedirect, HttpResponseServerError from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_exe...
[ 1, 1053, 12183, 13, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 21570, 1053, 4817, 13, 3166, 9557, 29889, 3221, 29889, 11739, 29879, 1053, 20894, 2333, 29315, 1000, 13, 3166, 9557, 29889, 1124, 1053, 9056, 5103, 29892,...
Job-Interviews/Python/BinaryTrees/Problem2.py
JuanPabloMontoya271/ITC
1
15262
class Tree: def __init__(self, val,left = None, right = None): self.val = val self.left = left self.right = right root = Tree(4, left = Tree(3), right=Tree(5, left= Tree(4))) #InOrderTraversal def InOrderTraversal(root, res = []): if root is None: return res ...
[ 1, 770, 15472, 29901, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 659, 29892, 1563, 353, 6213, 29892, 1492, 353, 6213, 1125, 30004, 13, 4706, 1583, 29889, 791, 353, 659, 30004, 13, 4706, 1583, 29889, 1563, 353, 2175, 30004, 13...
SRC/orientationmap/orientmapdisplay.py
usnistgov/OOF3D
31
192032
# -*- python -*- # This software was produced by NIST, an agency of the U.S. government, # and by statute is not subject to copyright in the United States. # Recipients of this software assume all responsibilities associated # with its operation, modification and maintenance. However, to # facilitate maintenance we as...
[ 1, 396, 448, 29930, 29899, 3017, 448, 29930, 29899, 13, 13, 29937, 910, 7047, 471, 7371, 491, 405, 9047, 29892, 385, 946, 3819, 310, 278, 501, 29889, 29903, 29889, 5874, 29892, 13, 29937, 322, 491, 1002, 1082, 338, 451, 4967, 304, 350...
tests/spark/models/test_spark_configuration.py
Geims83/aztk
161
1608207
<filename>tests/spark/models/test_spark_configuration.py from aztk.spark.models import SparkConfiguration from aztk.error import InvalidModelError def test_spark_configuration_defaults(): spark_configuration = SparkConfiguration() spark_configuration.validate() assert spark_configuration.spark_defaults_c...
[ 1, 529, 9507, 29958, 21150, 29914, 12597, 29914, 9794, 29914, 1688, 29918, 12597, 29918, 13305, 29889, 2272, 13, 3166, 263, 2065, 29895, 29889, 12597, 29889, 9794, 1053, 20814, 8614, 13, 3166, 263, 2065, 29895, 29889, 2704, 1053, 21403, 319...
image_process.py
SatoshiRobatoFujimoto/miaomiaoji-tool
1
77793
<reponame>SatoshiRobatoFujimoto/miaomiaoji-tool<gh_stars>1-10 #!/usr/bin/python # -*-coding:utf-8-*- __author__ = "ihciah" import cv2 class ImageConverter: @staticmethod def pre_process(im, interpolation=cv2.INTER_AREA): fixed_width = 384 gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) if len(im.s...
[ 1, 529, 276, 1112, 420, 29958, 29903, 4507, 2918, 21860, 1219, 29943, 8016, 326, 3747, 29914, 29885, 423, 290, 29653, 2397, 29899, 10154, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109...
sid/src/train.py
theScrabi/kaldi_voxceleb_pytorch
3
191144
<reponame>theScrabi/kaldi_voxceleb_pytorch #/usr/bin/python3 from sys import argv print("loading") import torch import kaldi_io as kio import numpy as np from model import XVectorModel from torch import nn from torch import optim from sys import exit import os from math import isnan from math import floor from queue ...
[ 1, 529, 276, 1112, 420, 29958, 1552, 4421, 4201, 29875, 29914, 29895, 2741, 29875, 29918, 1365, 29916, 346, 19982, 29918, 2272, 7345, 305, 13, 29937, 29914, 4855, 29914, 2109, 29914, 4691, 29941, 13, 13, 3166, 10876, 1053, 1852, 29894, 13...
lib/dataset/__init__.py
Amberrferr/Faster_RCNN_for_DOTA
0
138027
from dataset.imdb import IMDB from dataset.pascal_voc import PascalVOC from dataset.cityscape import CityScape from dataset.coco import coco from dataset.DOTA import DOTA_oriented,DOTA from dataset.UCAS import UCAS
[ 1, 515, 8783, 29889, 326, 2585, 1053, 22313, 4051, 13, 3166, 8783, 29889, 18182, 1052, 29918, 29894, 542, 1053, 29671, 29963, 20166, 13, 3166, 8783, 29889, 12690, 29879, 5738, 1053, 4412, 29903, 5738, 13, 3166, 8783, 29889, 29883, 6235, 1...
light_gas.py
mmaasrani/Tripoli-from-a-dream-to-reality
0
126579
<gh_stars>0 #Raspberry Pi Potentiometer Circuit Code import RPi.GPIO as GPIO import botbook_mcp3002 as mcp import time LED = 40 lightvalue = 0 GPIO.setmode(GPIO.BOARD) GPIO.setup(LED, GPIO.OUT) while True: lightvalue = mcp.readAnalog(0,0) gasValue = mcp.readAnalog(0,1) print "LightVal...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 29934, 4692, 16344, 7362, 10173, 7268, 8328, 12594, 3121, 5920, 30004, 13, 5215, 390, 12197, 29889, 29954, 2227, 29949, 408, 402, 2227, 29949, 30004, 13, 5215, 9225, 2909, 29918, 2...
SUAVE/SUAVE-2.5.0/regression/scripts/Vehicles/BWB.py
Vinicius-Tanigawa/Undergraduate-Research-Project
0
67973
<filename>SUAVE/SUAVE-2.5.0/regression/scripts/Vehicles/BWB.py # BWB.py # # Created: Aug 2014, <NAME> # Modified: Jan 2019, <NAME> # ---------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------- import SUAVE from SUAVE.Core...
[ 1, 529, 9507, 29958, 14605, 7520, 29923, 29914, 14605, 7520, 29923, 29899, 29906, 29889, 29945, 29889, 29900, 29914, 276, 11476, 29914, 16713, 29914, 29963, 14797, 4027, 29914, 29933, 29956, 29933, 29889, 2272, 13, 29937, 350, 29956, 29933, 2...
andres@programo.ual.es/figureMoG.py
andresmasegosa/PRML-CoreSets
0
173214
<reponame>andresmasegosa/PRML-CoreSets import matplotlib.pyplot as plt import numpy as np from sklearn.cluster import KMeans import inferpy as inf from sklearn import metrics from datareduction.variational_gaussian_mixture_DR import VariationalGaussianMixture_DR from prml.rv import VariationalGaussianMixture from prml...
[ 1, 529, 276, 1112, 420, 29958, 392, 690, 8247, 387, 3628, 29914, 10593, 1988, 29899, 9203, 29903, 1691, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 12655, 408, 7442, 13, 3166, 2071, 19668, 29889, 19594, 1053, 476, 6816, 55...
tests/test_is_valid_php_version_file_version.py
gerardroche/sublime-phpunit
85
9061
from PHPUnitKit.tests import unittest from PHPUnitKit.plugin import is_valid_php_version_file_version class TestIsValidPhpVersionFileVersion(unittest.TestCase): def test_invalid_values(self): self.assertFalse(is_valid_php_version_file_version('')) self.assertFalse(is_valid_php_version_file_versi...
[ 1, 515, 5048, 8325, 13117, 29889, 21150, 1053, 443, 27958, 13, 13, 3166, 5048, 8325, 13117, 29889, 8582, 1053, 338, 29918, 3084, 29918, 1961, 29918, 3259, 29918, 1445, 29918, 3259, 13, 13, 13, 1990, 4321, 3624, 7211, 4819, 29886, 6594, ...
tests/fixtures/annotations/model.py
akretion/xsdata
0
188092
<filename>tests/fixtures/annotations/model.py from __future__ import annotations from dataclasses import dataclass, field from typing import Optional from tests.fixtures.annotations.units import unit __NAMESPACE__ = "http://domain.org/schema/model" @dataclass class Measurement: value: Optional[float] = field( ...
[ 1, 529, 9507, 29958, 21150, 29914, 7241, 486, 1973, 29914, 6735, 800, 29914, 4299, 29889, 2272, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 3166, 848, 13203, 1053, 848, 1990, 29892, 1746, 13, 3166, 19229, 1053, 28379, 13, 3166, ...
scripts-config/ta3/remote-runner-scripts/bbn_config.py
nathanawmk/SPARTA
37
179346
# ***************************************************************** # Copyright 2013 MIT Lincoln Laboratory # Project: SPAR # Authors: ni24039 # Description: Config file to be used with remote_runner.py # # Modifications: # Date Name Modification # ---- ...
[ 1, 396, 334, 7775, 7775, 7775, 7775, 13, 29937, 29871, 14187, 1266, 29871, 29906, 29900, 29896, 29941, 341, 1806, 17274, 16715, 7606, 259, 13, 29937, 29871, 8010, 29901, 9651, 10937, 1718, 13, 29937, 29871, 13189, 943, 29901, 9651, 6836, ...
catalyst_gan/nn/criterion/__init__.py
WilliamAshbee/gan
6
150220
<filename>catalyst_gan/nn/criterion/__init__.py from .bce_gan import ( BCELossDiscriminator, BCELossGenerator, BCELossDiscriminatorFake, BCELossDiscriminatorReal ) from .hinge import ( HingeLossDiscriminator, HingeLossGenerator, HingeLossDiscriminatorFake, HingeLossDiscriminatorReal ) from .wasserstein ...
[ 1, 529, 9507, 29958, 16431, 858, 29918, 6249, 29914, 15755, 29914, 29883, 5385, 291, 29914, 1649, 2344, 26914, 2272, 13, 3166, 869, 29890, 346, 29918, 6249, 1053, 313, 13, 1678, 350, 4741, 29931, 2209, 4205, 29883, 20386, 1061, 29892, 350...
testbed_frontend/api/emulation/task_manager.py
Ncu-software-research-center/IIOT-testbed
1
55548
''' Vortex OpenSplice This software and documentation are Copyright 2006 to TO_YEAR ADLINK Technology Limited, its affiliated companies and licensors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Lice...
[ 1, 14550, 13, 462, 418, 6266, 4776, 4673, 5592, 5897, 13, 13, 4013, 7047, 322, 5106, 526, 14187, 1266, 29871, 29906, 29900, 29900, 29953, 304, 7495, 29918, 29979, 26441, 11033, 23714, 29968, 13, 7141, 3049, 3002, 28873, 29892, 967, 23736,...
breidablik/interpolate/test_spectra.py
ellawang44/Breidablik
2
96315
from breidablik.interpolate.spectra import Spectra import numpy as np import pytest import warnings try: Spectra() flag = False except: flag = True # skip these tests if the trained models are not present pytestmark = pytest.mark.skipif(flag, reason = 'No trained Spectra model') class Test_find_abund: ...
[ 1, 515, 2078, 333, 370, 5081, 29889, 1639, 3733, 403, 29889, 21494, 336, 1053, 27738, 336, 13, 5215, 12655, 408, 7442, 13, 5215, 11451, 1688, 13, 5215, 18116, 13, 13, 2202, 29901, 13, 1678, 27738, 336, 580, 13, 1678, 7353, 353, 7700, ...
core_get/configuration/environment_settings.py
core-get/core-get
0
51668
from dataclasses import dataclass from pathlib import PurePath from typing import Optional @dataclass(frozen=True) class EnvironmentSettings: working_dir: PurePath project_dir: Optional[PurePath] app_dir: PurePath cache_dir: PurePath catalog_url: str
[ 1, 515, 848, 13203, 1053, 848, 1990, 13, 3166, 2224, 1982, 1053, 349, 545, 2605, 13, 3166, 19229, 1053, 28379, 13, 13, 13, 29992, 1272, 1990, 29898, 29888, 307, 2256, 29922, 5574, 29897, 13, 1990, 16738, 9585, 29901, 13, 1678, 1985, 2...
XmanLang/XqlListener.py
Vladislav-Zolotaryov/XmlMaster
0
169527
# Generated from Xql.g4 by ANTLR 4.7.1 from antlr4 import * if __name__ is not None and "." in __name__: from .XqlParser import XqlParser else: from XqlParser import XqlParser # This class defines a complete listener for a parse tree produced by XqlParser. class XqlListener(ParseTreeListener): # Enter a p...
[ 1, 396, 3251, 630, 515, 1060, 1519, 29889, 29887, 29946, 491, 13764, 14632, 29934, 29871, 29946, 29889, 29955, 29889, 29896, 13, 3166, 3677, 29212, 29946, 1053, 334, 13, 361, 4770, 978, 1649, 338, 451, 6213, 322, 376, 1213, 297, 4770, 9...
test/test_step.py
codesaurus97/fruit
0
113269
from fruit.modules.step import Step import unittest
[ 1, 515, 15774, 29889, 7576, 29889, 10568, 1053, 16696, 13, 5215, 443, 27958, 13, 13, 2 ]
imagerecognition/LineFollow/test_video.py
uwrov/2017-2019
2
121973
import cv2 import time # Remove Later import numpy as np video = cv2.VideoCapture("./img/vert2.mp4") target_low = (0, 0, 0) target_high = (50, 50, 50) while True: ret, frame = video.read() if not ret: video = cv2.VideoCapture("./img/vert2.mp4") continue image = frame image = cv2.resiz...
[ 1, 1053, 13850, 29906, 13, 5215, 931, 396, 15154, 12699, 13, 5215, 12655, 408, 7442, 13, 13, 9641, 353, 13850, 29906, 29889, 15167, 21133, 545, 703, 6904, 2492, 29914, 1765, 29906, 29889, 1526, 29946, 1159, 13, 5182, 29918, 677, 353, 31...
Challenges/Space/bof_libc_leak.py
limitedeternity/HackTheBox
0
54574
<reponame>limitedeternity/HackTheBox<filename>Challenges/Space/bof_libc_leak.py # coding: utf-8 from pwn import * HOST, PORT = "172.16.17.32", 30203 elf = context.binary = ELF("./space") r = elf.process() r.recvuntil(">") r.sendline(cyclic(1024)) r.wait() r.close() core = Coredump("./core") buffer_size = cyclic_find...
[ 1, 529, 276, 1112, 420, 29958, 29044, 300, 824, 537, 29914, 29950, 547, 1576, 3313, 29966, 9507, 29958, 1451, 16047, 267, 29914, 14936, 29914, 833, 29888, 29918, 1982, 29883, 29918, 280, 557, 29889, 2272, 13, 29937, 14137, 29901, 23616, 2...
src/form_builder/views.py
danny8000/collab-form-builder
4
53284
import csv import datetime import re import json import unicodedata from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.contrib.auth.decorators i...
[ 1, 1053, 11799, 13, 5215, 12865, 13, 5215, 337, 13, 5215, 4390, 13, 5215, 443, 293, 6797, 532, 13, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 29918, 517, 29918, 5327, 29892, 679, 29918, 3318, 29918, 272, 29918, 29946, 29900,...
banding_removal/fastmri/spawn_dist.py
sbhadra2020/fastMRI
3
153663
<reponame>sbhadra2020/fastMRI #from __future__ import print_function import argparse import pickle import os import pdb import signal import warnings import time from time import sleep import sys sys.path.append(sys.path[0] + "/..") __package__ = "fastmri" import multiprocessing import subprocess from .args import Ar...
[ 1, 529, 276, 1112, 420, 29958, 20778, 21312, 336, 29906, 29900, 29906, 29900, 29914, 11255, 29924, 3960, 13, 29937, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 5215, 1852, 5510, 13, 5215, 5839, 280, 13, 5215, 2897, 13, 5...
uniswap/config.py
amis-erc20/uniswap-analytics
0
169846
<gh_stars>0 import json import os from multiprocessing.pool import ThreadPool from web3 import Web3, IPCProvider from custom_http_provider import CustomHTTPProvider INFURA_ADDRESS = 'https://mainnet.infura.io/v3/4facf9a657054a2287e6a4bec21046a3' DEFAULT_REQUEST_TIMEOUT = 30 web3_infura = Web3(CustomHTTPProvider(endp...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 4390, 13, 5215, 2897, 13, 3166, 6674, 307, 985, 292, 29889, 10109, 1053, 10480, 11426, 13, 3166, 1856, 29941, 1053, 2563, 29941, 29892, 5641, 29907, 6980, 13, 13, 3166, 2888, 2991...
restapi/src/DB/DBConnection.py
RaymanRJ/rrjamal.ca
0
125769
from typing import Dict import psycopg2 from DBConfig import db_config class DBConnection: __config: Dict[str, str] __conn: psycopg2 def __init__(self): self.__config = db_config print(self.__config) self.__conn = psycopg2.connect( host=self.__config['host'], ...
[ 1, 515, 19229, 1053, 360, 919, 13, 13, 5215, 6529, 29891, 9708, 29887, 29906, 13, 3166, 6535, 3991, 1053, 4833, 29918, 2917, 13, 13, 13, 1990, 6535, 5350, 29901, 13, 1678, 4770, 2917, 29901, 360, 919, 29961, 710, 29892, 851, 29962, 13...
tests/simple_gan_test.py
alanpeixinho/NiftyNet
0
7251
from __future__ import absolute_import, print_function import unittest import os import tensorflow as tf from tensorflow.keras import regularizers from niftynet.network.simple_gan import SimpleGAN from tests.niftynet_testcase import NiftyNetTestCase class SimpleGANTest(NiftyNetTestCase): def test_3d_reg_shape(s...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 29892, 1596, 29918, 2220, 13, 13, 5215, 443, 27958, 13, 13, 5215, 2897, 13, 5215, 26110, 408, 15886, 13, 3166, 26110, 29889, 3946, 294, 1053, 4943, 19427, 13, 13, 3166, 302, 20...
wlanpi_core/services/diagnostics_service.py
WLAN-Pi/wlanpi-core
1
51208
from shutil import which from typing import Optional from wlanpi_core.models.validation_error import ValidationError from .helpers import get_phy80211_interfaces, run_cli_async async def executable_exists(name: str) -> bool: """ Check whether `name` is on PATH and marked as executable. """ return wh...
[ 1, 515, 528, 4422, 1053, 607, 13, 3166, 19229, 1053, 28379, 13, 13, 3166, 281, 6468, 1631, 29918, 3221, 29889, 9794, 29889, 18157, 29918, 2704, 1053, 15758, 362, 2392, 13, 13, 3166, 869, 3952, 6774, 1053, 679, 29918, 11461, 29947, 29900...
fastapi_crudrouter/core/utils.py
agallant/fastapi-crudrouter
0
147876
<filename>fastapi_crudrouter/core/utils.py def get_pk_type(schema, pk_field) -> type: try: return schema.__fields__[pk_field].type_ except KeyError: return int
[ 1, 529, 9507, 29958, 11255, 2754, 29918, 7283, 566, 15140, 29914, 3221, 29914, 13239, 29889, 2272, 13, 1753, 679, 29918, 20571, 29918, 1853, 29898, 11010, 29892, 282, 29895, 29918, 2671, 29897, 1599, 1134, 29901, 13, 1678, 1018, 29901, 13, ...
Task2/03_personal-info.py
telecomprofi/Cisco-DevOps-MDP-02
0
88415
#03_personal-info.py space= " " firstName = input("What is your first name?") lastName = input("What is your last name?") location = input("What is your location?") age = input("What is your age?") print("Hi "+ firstName + space + lastName +"! Your location is "+ location + " and you are "+age + " years old!")
[ 1, 396, 29900, 29941, 29918, 10532, 284, 29899, 3888, 29889, 2272, 13, 3493, 29922, 376, 376, 13, 4102, 1170, 353, 1881, 703, 5618, 338, 596, 937, 1024, 29973, 1159, 13, 4230, 1170, 353, 1881, 703, 5618, 338, 596, 1833, 1024, 29973, 1...
deeplio/models/nets/pointseg_modules.py
rginjapan/DeepLIO
43
155138
<gh_stars>10-100 import torch import torch.nn as nn import torch.nn.functional as F class ASPPConv(nn.Sequential): def __init__(self, in_channels, out_channels, dilation): modules = [ nn.Conv2d(in_channels, out_channels, 3, padding=dilation, dilation=dilation, bias=False), nn.Batch...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 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, 13, 13, 1990, ...
x7/view/icons.py
gribbg/x7-view
0
1603817
<reponame>gribbg/x7-view<gh_stars>0 """ Access routines to icons """ import tkinter as tk from tkinter import ttk from importlib import resources from typing import Dict ICONS_RESOURCE = 'x7.view.resources.icons' icons_loaded: Dict[str, tk.PhotoImage] = dict() def icon(tag: str, size=24) -> tk.PhotoImage: "...
[ 1, 529, 276, 1112, 420, 29958, 29887, 1091, 16264, 29914, 29916, 29955, 29899, 1493, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 1678, 11028, 6745, 1475, 304, 27673, 13, 15945, 29908, 13, 13, 5215, 18883, 1639, 408...
libs/models/__init__.py
awesome-archive/deeplab-pytorch
0
84464
<reponame>awesome-archive/deeplab-pytorch<filename>libs/models/__init__.py<gh_stars>0 from __future__ import absolute_import from .resnet import * from .deeplabv2 import * from .deeplabv3 import * from .deeplabv3plus import * from .msc import * def init_weights(model): for m in model.modules(): if isinsta...
[ 1, 529, 276, 1112, 420, 29958, 1450, 14151, 29899, 10867, 29914, 311, 29872, 572, 370, 29899, 2272, 7345, 305, 29966, 9507, 29958, 10254, 29914, 9794, 29914, 1649, 2344, 26914, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, ...
Ago-Dic-2018/Ernesto Vela/Practica 2/ThreeRestaurants.py
Arbupa/DAS_Sistemas
41
1615956
<reponame>Arbupa/DAS_Sistemas class Restaurant: def __init__(self, restaurant_name='', cuisine_type=''): self.restaurant_name = restaurant_name self.cuisine_type = cuisine_type def describe_restaurant(self): print('El nombre del restaurante es: ', self.restaurant_name) print('E...
[ 1, 529, 276, 1112, 420, 29958, 1433, 29890, 786, 29874, 29914, 29928, 3289, 29918, 29903, 391, 8609, 13, 1990, 390, 22837, 424, 29901, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 27144, 29918, 978, 2433, 742, 2723, 275, 457, 2991...
cosmic_ray/operators/unary_operator_replacement.py
rob-smallshire/cosmic-ray
0
12670
<gh_stars>0 """Implementation of the unary-operator-replacement operator. """ import ast from .operator import Operator from ..util import build_mutations # None indicates we want to delete the operator OPERATORS = (ast.UAdd, ast.USub, ast.Invert, ast.Not, None) def _to_ops(from_op): """ The sequence o...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 1888, 14607, 310, 278, 443, 653, 29899, 6891, 29899, 3445, 9552, 5455, 29889, 13, 15945, 29908, 13, 13, 5215, 8717, 13, 13, 3166, 869, 6891, 1053, 6607, 1061, 13, 3166, ...
coderedcms/wagtail_flexible_forms/edit_handlers.py
mikiec84/coderedcms
9
11026
from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from wagtail.admin.edit_handlers import EditHandler class FormSubmissionsPanel(EditHandler): template = "wagtailforms/edit_handlers/form_responses_panel.html" ...
[ 1, 515, 9557, 29889, 6886, 29889, 12657, 1053, 4050, 29918, 517, 29918, 1807, 13, 3166, 9557, 29889, 13239, 29889, 29879, 2142, 342, 5393, 1053, 2791, 29918, 11177, 13, 3166, 9557, 29889, 13239, 29889, 3286, 18411, 1053, 318, 657, 726, 40...
setup.py
aino/aino-convert
1
158928
from os.path import abspath, dirname, join as pjoin try: from setuptools import setup except ImportError: from distutils.core import setup fn = abspath(pjoin(dirname(__file__), 'README.rst')) fp = open(fn, 'r') long_description = fp.read() fp.close() setup( name='aino-convert', version='0.1.0.14', ...
[ 1, 515, 2897, 29889, 2084, 1053, 633, 1028, 493, 29892, 4516, 978, 29892, 5988, 408, 282, 7122, 13, 2202, 29901, 13, 1678, 515, 731, 21245, 8789, 1053, 6230, 13, 19499, 16032, 2392, 29901, 13, 1678, 515, 1320, 13239, 29889, 3221, 1053, ...
src/app/node/local_stabilizing_node.py
acatalfano/chord-dht
0
101601
<filename>src/app/node/local_stabilizing_node.py from typing import Callable from threading import Thread, main_thread from time import sleep from .stabilizing_node import StabilizingNode from ..node_data.local_node_data import LocalNodeData from .node import Node from ..utility.logger import Logger class LocalStab...
[ 1, 529, 9507, 29958, 4351, 29914, 932, 29914, 3177, 29914, 2997, 29918, 303, 4427, 5281, 29918, 3177, 29889, 2272, 13, 13, 3166, 19229, 1053, 8251, 519, 13, 3166, 3244, 292, 1053, 10480, 29892, 1667, 29918, 7097, 13, 3166, 931, 1053, 87...
machine-learning/ml-projects/stereo-cam-v1/utils/train_utils.py
olaals/masteroppgave2
0
161006
import torch import numpy as np import matplotlib.pyplot as plt def convert_tensor_to_RGB(network_output): x = torch.FloatTensor([[.0, .0, .0], [1.0, .0, .0], [.0, .0, 1.0], [.0, 1.0, .0]]) converted_tensor = torch.nn.functional.embedding(network_output, x).permute(2,0,1) return converted_tensor def dic...
[ 1, 1053, 4842, 305, 13, 5215, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 13, 1753, 3588, 29918, 20158, 29918, 517, 29918, 28212, 29898, 11618, 29918, 4905, 1125, 13, 1678, 921, 353, 4842, 305, 29889, 11031...
calendar_aoc.py
Panurus/aoc_2021
0
148163
import day1, day2, day3, day4, day5, day6 if __name__ == "__main__": day1.main() day2.main() day3.main() day4.main() day5.main() day6.main()
[ 1, 1053, 2462, 29896, 29892, 2462, 29906, 29892, 2462, 29941, 29892, 2462, 29946, 29892, 2462, 29945, 29892, 2462, 29953, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 2462, 29896, 29889, 3396, 580, 13, 1678, ...
mods/mcpython/player.py
uuk0/mcpython-a-minecraft-clone-in-python
2
154230
from moduls import * from oredictnames import * from Inventorys import * import Item import crafting as cb import config from Inventorys import * from Inventorys.Inventory import Slot, handler as invhandler, InventoryHandler import EventHandler import entity class player: def __init__(self, window): ...
[ 1, 515, 878, 7273, 1053, 334, 13, 13, 3166, 470, 287, 919, 7039, 1053, 334, 13, 13, 3166, 512, 23886, 29879, 1053, 334, 13, 13, 5215, 10976, 13, 13, 5215, 25554, 292, 408, 26324, 13, 5215, 2295, 13, 13, 3166, 512, 23886, 29879, 10...
converters/brat2iob.py
Banguiskode/nerds
15
8295
import argparse import operator import os import re import shutil import spacy import tempfile from nerds.utils import spans_to_tokens, get_logger def segment_text_to_sentences(text_file, sentence_splitter): """ Segment text into sentences. Text is provided by BRAT in .txt file. Args: ...
[ 1, 1053, 1852, 5510, 13, 5215, 5455, 13, 5215, 2897, 13, 5215, 337, 13, 5215, 528, 4422, 13, 5215, 805, 4135, 13, 5215, 5694, 1445, 13, 13, 3166, 302, 2018, 29879, 29889, 13239, 1053, 805, 550, 29918, 517, 29918, 517, 12360, 29892, ...
config/urls.py
bineetgh/examday
0
172341
from django.conf import settings from django.contrib import admin from django.urls import path, include from django.views.generic.base import TemplateView from django.conf.urls import include, url urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('allauth.urls')), path('accounts/pr...
[ 1, 515, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 3166, 9557, 29889, 26045, 1053, 2224, 29892, 3160, 13, 3166, 9557, 29889, 7406, 29889, 19206, 29889, 3188, 1053, 25663, 1043, 13, 3166, 9557, 29889, 5527...
website/userData.py
marvkey/onlineDatabsase
0
108334
from sqlalchemy.sql.expression import false from . import db from flask_login import UserMixin from sqlalchemy.sql import func class User(db.Model,UserMixin): id = db.Column(db.Integer, primary_key=True) email =db.Column(db.String(150),unique=True) firstname = db.Column(db.String(150)) lastname = db.C...
[ 1, 515, 4576, 284, 305, 6764, 29889, 2850, 29889, 17471, 1053, 2089, 13, 3166, 869, 1053, 4833, 13, 3166, 29784, 29918, 7507, 1053, 4911, 29924, 861, 262, 13, 3166, 4576, 284, 305, 6764, 29889, 2850, 1053, 3653, 13, 13, 1990, 4911, 29...
cpo_pipeline/typing/__init__.py
DiDigsDNA/cpo-pipeline
0
31889
""" typing module """ from . import pipeline from . import parsers
[ 1, 9995, 13, 1017, 15702, 3883, 13, 15945, 29908, 13, 13, 3166, 869, 1053, 16439, 13, 3166, 869, 1053, 610, 4253, 13, 2 ]
utils/vis.py
tanyinghui/Minimal-Hand-pytorch
158
196716
<filename>utils/vis.py import matplotlib.pyplot as plt def plot3d(joints_,ax, title=None): joints = joints_.copy() ax.plot(joints[:, 0], joints[:, 1], joints[:, 2], 'yo', label='keypoint') ax.plot(joints[:5, 0], joints[:5, 1], joints[:5, 2], 'r', label='thumb') ...
[ 1, 529, 9507, 29958, 13239, 29914, 1730, 29889, 2272, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 13, 1753, 6492, 29941, 29881, 29898, 2212, 9466, 3383, 1165, 29892, 3611, 29922, 8516, 1125, 13, 1678, 14002, 29879, 353, 14002,...
src/datamodel/ecb_plus/document.py
vedmathai/timeline
0
171289
<filename>src/datamodel/ecb_plus/document.py import xml.etree.ElementTree as ET import typing from typing import Dict, List from timeline.src.datamodel.ecb_plus.text import Token from timeline.src.datamodel.ecb_plus.text import Sentence from timeline.src.datamodel.ecb_plus.markable import Markable if typing.TYPE_CHE...
[ 1, 529, 9507, 29958, 4351, 29914, 4130, 314, 27224, 29914, 687, 29890, 29918, 11242, 29914, 3225, 29889, 2272, 13, 5215, 4903, 29889, 300, 929, 29889, 2642, 9643, 408, 382, 29911, 29871, 13, 5215, 19229, 13, 3166, 19229, 1053, 360, 919, ...
ymidi/containers.py
Owen-Cochell/yapmidi
0
47180
<filename>ymidi/containers.py """ Components that house MIDI events and other misc. data, """ from dataclasses import dataclass class TrackInfo(dataclass): """ An object that contains info about a specific track. The data in this object is used for keeping track of track statistics. We allow fo...
[ 1, 529, 9507, 29958, 962, 8819, 29914, 1285, 475, 414, 29889, 2272, 13, 15945, 29908, 13, 25503, 393, 3699, 341, 1367, 29902, 4959, 322, 916, 3984, 29883, 29889, 848, 29892, 29871, 13, 15945, 29908, 13, 13, 3166, 848, 13203, 1053, 848, ...
netket/custom/ab_initio_ham.py
yannra/netket
0
45568
<filename>netket/custom/ab_initio_ham.py import netket as nk from netket.custom.fermionic_hilbert import Fermions from netket.custom.fermion_operator import SparseHermitianFermionOperator, FermionSumOperators, FermionTotalSpinNumberOperator import numpy as np class AbInitio(FermionSumOperators): def __init__(self...
[ 1, 529, 9507, 29958, 1212, 7873, 29914, 6341, 29914, 370, 29918, 2344, 601, 29918, 3391, 29889, 2272, 13, 5215, 7787, 7873, 408, 302, 29895, 13, 3166, 7787, 7873, 29889, 6341, 29889, 571, 29885, 26629, 29918, 29882, 309, 2151, 1053, 383, ...
clx/xms/exceptions.py
linhuiwzqu/clxcommunications
3
184326
<filename>clx/xms/exceptions.py # -*- coding: utf-8 -*- """Collection of exceptions raised by the XMS SDK. The exceptions raised by the API all inherit from the base class :class:`ApiException`. """ from __future__ import absolute_import, division, print_function class ApiException(Exception): """Base class fo...
[ 1, 529, 9507, 29958, 695, 29916, 29914, 29916, 1516, 29914, 11739, 29879, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 7196, 310, 15283, 10425, 491, 278, 1060, 4345, ...
results/scripts/netem_rrtcp.py
andres-erbsen/rrtcp
1
185211
#!/usr/bin/python import time import subprocess from config import delayIntervals, lossIntervals, tcpTestLocation, udpTestLocation, rrtcpTestLocation def runTests(): for delay in delayIntervals: for loss in lossIntervals: runTest(tcpTestLocation, delay, loss, 'tcp') #runTest(udpTes...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 13, 5215, 931, 13, 5215, 1014, 5014, 13, 3166, 2295, 1053, 9055, 12506, 29879, 29892, 6410, 12506, 29879, 29892, 22729, 3057, 6508, 29892, 318, 6099, 3057, 6508, 29892, 364, 2273, 6814, 3057, ...
usaspending_api/search/tests/test_spending_over_time.py
COEJKnight/five
0
165900
<gh_stars>0 import json import pytest from rest_framework import status from usaspending_api.search.tests.test_mock_data_search import all_filters @pytest.mark.skip @pytest.mark.django_db def test_spending_over_time_success(client): # test for needed filters resp = client.post( '/api/v2/search/spen...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 4390, 13, 13, 5215, 11451, 1688, 13, 3166, 1791, 29918, 4468, 1053, 4660, 13, 13, 3166, 502, 4692, 2548, 29918, 2754, 29889, 4478, 29889, 21150, 29889, 1688, 29918, 17640, 29918, ...
webquills/sites/models.py
webquills/webquills
0
68700
<filename>webquills/sites/models.py from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models from django.db.models import Case, IntegerField, Q, When from django.http.request import split_domain_port from django.utils.translation import gettext_lazy as _ fro...
[ 1, 529, 9507, 29958, 2676, 339, 6090, 29914, 16315, 29914, 9794, 29889, 2272, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 3221, 29889, 11739, 29879, 1053, 1954, 771, 546, 368, 3991, 2955, 13, 3166, 9557, 29889, 2585, ...
reflexy/base/tests/test_reflex.py
eso/reflexy
0
38477
import unittest from reflexy.base import reflex class TestReflexModule(unittest.TestCase): sof = 'datasetname|file1.fits;PRO_CATG1;PURPOSE1:PURPOSE2,file2;' \ 'PRO_CAT2;PURPOSE1' sopexp = [('long_param1', '3'), ('param2', '3'), ('param3', 'ser'), ('param_not_shown', 'none')] sop = ...
[ 1, 1053, 443, 27958, 13, 3166, 2143, 2506, 29891, 29889, 3188, 1053, 2143, 2506, 13, 13, 13, 1990, 4321, 5620, 2506, 7355, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 577, 29888, 353, 525, 24713, 978, 29989, 1445, 29896, 29889...
CS20si/examples/03_linreg_placeholder.py
kozistr/ML-Study
5
69176
""" Solution for simple linear regression example using placeholders Created by <NAME> (<EMAIL>) CS20: "TensorFlow for Deep Learning Research" cs20.stanford.edu Lecture 03 """ import os import time import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import utils DATA_FILE = 'data/birth_life_...
[ 1, 9995, 24380, 363, 2560, 5608, 17855, 1342, 773, 2058, 8948, 414, 13, 20399, 491, 529, 5813, 29958, 313, 29966, 26862, 6227, 12948, 13, 9295, 29906, 29900, 29901, 376, 29911, 6073, 17907, 363, 21784, 29257, 10550, 29908, 13, 2395, 29906...
bigstream/features.py
wangyuhan01/bigstream
14
21026
<reponame>wangyuhan01/bigstream<gh_stars>10-100 import numpy as np from fishspot.filter import white_tophat from fishspot.detect import detect_spots_log def blob_detection( image, min_blob_radius, max_blob_radius, **kwargs, ): """ """ wth = white_tophat(image, max_blob_radius) spots =...
[ 1, 529, 276, 1112, 420, 29958, 29893, 574, 29891, 29884, 5403, 29900, 29896, 29914, 3752, 5461, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 12655, 408, 7442, 13, 3166, 9427, 17500, 29889, 4572,...
Chapter04/html_table_parser.py
PacktPublishing/Python-Penetration-Testing-Cookbook
48
138666
<reponame>PacktPublishing/Python-Penetration-Testing-Cookbook<gh_stars>10-100 import urllib2 import pandas as pd from bs4 import BeautifulSoup url = "https://www.w3schools.com/html/html_tables.asp" try: page = urllib2.urlopen(url) except Exception as e: print e pass soup = BeautifulSoup(page, "html.parser"...
[ 1, 529, 276, 1112, 420, 29958, 16638, 29873, 21076, 1674, 292, 29914, 11980, 29899, 29925, 264, 18184, 362, 29899, 3057, 292, 29899, 19159, 2909, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 314...
llist_gameboard/urls.py
Plongesam/data-structures-game
2
15514
<filename>llist_gameboard/urls.py """ URL's for the LList Game Board app. """ from django.urls import path from llist_gameboard.api import llist_api from . import views urlpatterns = [ # Views path('', views.llist_game_board, name='llist-game-board'), #Game Play API Calls For Linked List path('l...
[ 1, 529, 9507, 29958, 645, 391, 29918, 11802, 3377, 29914, 26045, 29889, 2272, 13, 15945, 29908, 13, 1678, 3988, 29915, 29879, 363, 278, 365, 1293, 8448, 12590, 623, 29889, 13, 15945, 29908, 13, 3166, 9557, 29889, 26045, 1053, 2224, 13, ...
domain/types.py
Fenthick/sla_dashboard_webapp
0
97946
AgentID = str """ Assigned by Kentik """ TestID = str """ Assigned by Kentik """ Threshold = float """ latency and jitter in milliseconds, packet_loss in percent (0-100) """ MetricValue = float """ latency and jitter in milliseconds, packet_loss in percent (0-100) """
[ 1, 28330, 1367, 353, 851, 13, 15945, 29908, 4007, 12961, 491, 13272, 638, 9995, 13, 13, 3057, 1367, 353, 851, 13, 15945, 29908, 4007, 12961, 491, 13272, 638, 9995, 13, 13, 1349, 12268, 353, 5785, 13, 15945, 29908, 23316, 1270, 322, 43...
update_supply_chain_information/supply_chains/test/test_extract_csv.py
uktrade/update-supply-chain-information
0
35883
from io import StringIO from typing import List import os import csv import re import pytest from django.core.management import call_command from django.core.management.base import CommandError from django.core.files.temp import NamedTemporaryFile import accounts.models from supply_chains.management.commands.ingest_c...
[ 1, 515, 12013, 1053, 1714, 5971, 13, 3166, 19229, 1053, 2391, 13, 5215, 2897, 13, 5215, 11799, 13, 5215, 337, 13, 13, 5215, 11451, 1688, 13, 3166, 9557, 29889, 3221, 29889, 21895, 1053, 1246, 29918, 6519, 13, 3166, 9557, 29889, 3221, ...
run_pic.py
sven-mayer/VNect
1
84404
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import cv2 import numpy as np import tensorflow as tf from src import utils box_size = 368 hm_factor = 8 joints_num = 21 scales = [1.0, 0.7] limb_parents = [1, 15, 1, 2, 3, 1, 5, 6, 14, 8, 9, 14, 11, 12, 14, 14, 1, 4, 7, 10, 13] with tf.Session() as sess: saver = ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 18351, 29899, 29947, 448, 29930, 29899, 13, 13, 13, 5215, 13850, 29906, 13, 5215, 12655, 408, 7442, 13, 5215, 26110, 408, 15886, 13, 3166, ...
contohRekursif.py
muhiqsimui/PyTraining
6
182278
#rekursif adalah fungsi yg memanggil dirinya sendiri ok sip def cetak(x): print(x) if x>1: cetak(x-1) elif x<1: cetak(x+1) cetak(5)
[ 1, 396, 22218, 1295, 361, 594, 284, 801, 26933, 1039, 343, 29887, 2626, 574, 29887, 309, 4516, 262, 3761, 3638, 12737, 3431, 269, 666, 13, 1753, 15093, 557, 29898, 29916, 1125, 13, 29871, 1596, 29898, 29916, 29897, 13, 29871, 565, 921, ...
gen/welcome.py
seen-idc/image-gen
0
173736
<reponame>seen-idc/image-gen<gh_stars>0 from io import BytesIO from PIL import Image, ImageDraw, ImageFont from utils import get_image from utils.masks import circle_mask circlemask = circle_mask((256, 256)) font = ImageFont.truetype('./NunitoSans-Regular.ttf', 56) outline_color = "#2af54f" avatar_pos_x = 352 avatar...
[ 1, 529, 276, 1112, 420, 29958, 28026, 29899, 333, 29883, 29914, 3027, 29899, 1885, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 12013, 1053, 2648, 2167, 5971, 13, 3166, 349, 6227, 1053, 7084, 29892, 7084, 8537, 29892, 7084, 982...
rosimport/_rosdef_loader.py
asmodehn/rosimport
5
1361
<filename>rosimport/_rosdef_loader.py from __future__ import absolute_import, division, print_function import contextlib import importlib import site import tempfile import shutil from rosimport import genrosmsg_py, genrossrv_py """ A module to setup custom importer for .msg and .srv files Upon import, it will fir...
[ 1, 529, 9507, 29958, 1883, 5215, 19891, 1883, 1753, 29918, 12657, 29889, 2272, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 29892, 8542, 29892, 1596, 29918, 2220, 13, 13, 5215, 3030, 1982, 13, 5215, 1053, 1982, 13, 5215, ...
examples/verlet_chain/relax.py
Peque/pyqtgraph
0
53516
import ctypes import os so = os.path.join(os.path.dirname(__file__), 'maths.so') lib = ctypes.CDLL(so) lib.relax.argtypes = [ ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int, ctypes.c_int, ] de...
[ 1, 1053, 274, 8768, 13, 5215, 2897, 13, 13, 578, 353, 2897, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 511, 525, 755, 29879, 29889, 578, 1495, 13, 1982, 353, 274, 8768, 29889, 6530, 2208, 29898, ...