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
functions/is_the_cat.py
mirumirumi/your-cat-sam
3
87325
<reponame>mirumirumi/your-cat-sam import os import img import json import boto3 import proxy_response from boto3 import Session from aws_lambda_powertools import Logger # PowerTools logger = Logger() # Rekognition session = Session(region_name="ap-northeast-1") rekognition_client = session.client("rekognition") CONFI...
[ 1, 529, 276, 1112, 420, 29958, 11038, 398, 381, 15547, 29914, 8066, 29899, 4117, 29899, 13445, 13, 5215, 2897, 13, 5215, 10153, 13, 5215, 4390, 13, 5215, 289, 3747, 29941, 13, 5215, 10166, 29918, 5327, 13, 3166, 289, 3747, 29941, 1053, ...
c2_python-operating-system/6_bash-scripting/_scripts/random_exit.py
DrShams/google-it-automation
0
56761
#!/usr/bin/python3 import sys import random value=random.randint(0, 3) print("Returning: " + str(value)) sys.exit(value)
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 13, 13, 5215, 10876, 13, 5215, 4036, 13, 13, 1767, 29922, 8172, 29889, 9502, 524, 29898, 29900, 29892, 29871, 29941, 29897, 13, 2158, 703, 11609, 292, 29901, 376, 718, 851, 29898, 1767, 8...
Apps/phciscowebex/ciscowebex_connector.py
emanuel2rw/phantom-apps
74
134456
<filename>Apps/phciscowebex/ciscowebex_connector.py # File: ciscowebex_connector.py # # Copyright (c) 2021 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # -- # Phantom App imports import os import time import phantom.app as phantom from phantom.base_connector import BaseC...
[ 1, 529, 9507, 29958, 2052, 29879, 29914, 561, 3476, 20587, 774, 735, 29914, 3476, 20587, 774, 735, 29918, 11958, 2801, 29889, 2272, 13, 29937, 3497, 29901, 274, 10669, 340, 774, 735, 29918, 11958, 2801, 29889, 2272, 13, 29937, 13, 29937, ...
3.拓展模块/3.摄像头模块/1.拍摄照片/photo.py
01studio-lab/RaspberryPi_Examples
7
74799
''' 实验名称:摄像头模块 版本:v1.0 日期:2020.3 作者:01Studio 说明:使用摄像头模块拍照并保存 社区:www.01studio.org ''' #导入相关库 from picamera import PiCamera from time import sleep #构建摄像头 camera = PiCamera() #打开摄像头 camera.start_preview() sleep(3) #等待摄像头稳定 #拍摄照片5张并保存到桌面 for i in range(5): camera.capture('/home/pi/Desktop/'+str(i)+'.jpg') #关闭摄像头 ...
[ 1, 14550, 13, 31195, 236, 173, 143, 30548, 31685, 30383, 233, 148, 135, 31551, 31584, 31382, 232, 160, 154, 13, 30845, 30346, 30383, 29894, 29896, 29889, 29900, 13, 30325, 31117, 30383, 29906, 29900, 29906, 29900, 29889, 29941, 13, 30732, ...
match.py
pammirato/image_vatic
571
92050
<reponame>pammirato/image_vatic<filename>match.py import munkres def match(first, second, method): """ Attempts to match every path in 'first' with a path in 'second'. Returns the association along with its score. Note: if two paths have nothing to do with each other, but there is no other suita...
[ 1, 529, 276, 1112, 420, 29958, 29886, 4850, 381, 1219, 29914, 3027, 29918, 29894, 2454, 29966, 9507, 29958, 4352, 29889, 2272, 13, 5215, 286, 2960, 690, 13, 13, 1753, 1993, 29898, 4102, 29892, 1473, 29892, 1158, 1125, 13, 1678, 9995, 13...
SC101/SC101_week2/zonegraphics.py
ariel98po/SC101-projects
0
25749
from campy.graphics.gwindow import GWindow from campy.graphics.gobjects import GOval, GRect from campy.gui.events.mouse import onmouseclicked import random WINDOW_WIDTH = 600 WINDOW_HEIGHT = 400 ZONE_WIDTH = 100 ZONE_HEIGHT = 100 BALL_RADIUS = 15 MAX_SPEED = 6 MIN_Y_SPEED = 2 class ZoneGraphics: def __init__(se...
[ 1, 515, 4242, 29891, 29889, 6420, 29889, 29887, 7165, 1053, 402, 5907, 13, 3166, 4242, 29891, 29889, 6420, 29889, 29887, 12650, 1053, 21947, 791, 29892, 402, 7364, 13, 3166, 4242, 29891, 29889, 23569, 29889, 13604, 29889, 15769, 1053, 373, ...
scripts/generate_spec_tfrecords.py
dave6892/single_word_speech
0
102425
import sys sys.path.append('..') import glob from typing import NoReturn from multiprocessing import cpu_count from sklearn.model_selection import train_test_split from src.utilities.tfrecords_save import multi_create_tfrecords_in_shards def main( num_files_to_create: int = 96, num_workeers: int = cpu_count(...
[ 1, 1053, 10876, 13, 9675, 29889, 2084, 29889, 4397, 877, 636, 1495, 13, 13, 5215, 13149, 13, 3166, 19229, 1053, 1939, 11609, 13, 3166, 6674, 307, 985, 292, 1053, 26403, 29918, 2798, 13, 3166, 2071, 19668, 29889, 4299, 29918, 21731, 1053...
tests/kernel/test_task_api_state.py
tmontes/ppytty
1
144712
# ---------------------------------------------------------------------------- # ppytty # ---------------------------------------------------------------------------- # Copyright (c) <NAME>. # See LICENSE for details. # ---------------------------------------------------------------------------- from ppytty.kernel imp...
[ 1, 396, 448, 2683, 2683, 2683, 2683, 1378, 5634, 13, 29937, 282, 2272, 4349, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 5634, 13, 29937, 14187, 1266, 313, 29883, 29897, 529, 5813, 15513, 13, 29937, 2823, 365, 2965, 1430, 1660, 363, ...
Practic/task_8/swapcase1.py
zevgenia/Python_shultais
0
125921
<filename>Practic/task_8/swapcase1.py<gh_stars>0 import sys str1 = sys.argv[1] str2 = sys.argv[2] print(str1, str2) print(str1.swapcase(), str2.swapcase())
[ 1, 529, 9507, 29958, 29925, 1461, 293, 29914, 7662, 29918, 29947, 29914, 26276, 4878, 29896, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 5215, 10876, 13, 710, 29896, 353, 10876, 29889, 19218, 29961, 29896, 29962, 13, ...
sccsClientLocalNetworkPythonGear-ReceivingOnlyWIP/sccsClient/sccsClient.py
ninekorn/Python-2-way-local-network-communication-WIP
0
175771
<reponame>ninekorn/Python-2-way-local-network-communication-WIP #https://realpython.com/python-sockets/ #!/usr/bin/env python3 import socket import sys #import time UDP_IP = "127.0.0.1" # set it to destination IP.. RPi in this case #127.0.0.1 #192.168.127.12 UDP_PORT = 5000 #print("UDP target IP:", UDP_IP) #print("UDP...
[ 1, 529, 276, 1112, 420, 29958, 29876, 27868, 1398, 29914, 11980, 29899, 29906, 29899, 1582, 29899, 2997, 29899, 11618, 29899, 27820, 362, 29899, 29956, 5690, 13, 29937, 991, 597, 6370, 4691, 29889, 510, 29914, 4691, 29899, 578, 9737, 29914,...
backend/config.py
mrkrause/penn-events-calendar
0
56007
<reponame>mrkrause/penn-events-calendar<gh_stars>0 import os # Module containing scrapers for extracting data from webpages # Every public function (i.e., those not beginning with _) should return a list # of event dictionaries when called with no arguments. import local.upenn.scrapers scrapers = local.upenn.scrapers ...
[ 1, 529, 276, 1112, 420, 29958, 29885, 29878, 29895, 336, 1509, 29914, 29886, 2108, 29899, 13604, 29899, 23392, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2897, 13, 13, 29937, 15591, 6943, 885, 2390, 414, 363, 6597, 292, 848, ...
homeassistant/components/plugwise/sensor.py
prwood80/core
5
130602
"""Plugwise Sensor component for Home Assistant.""" import logging from homeassistant.components.sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_ENERGY, DEVICE_CLASS_GAS, DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_POWER, DEVICE_CLASS_PRESSURE, DEVICE_CLASS_TEMPERATURE, STATE_CLASS_MEASU...
[ 1, 9995, 3247, 688, 3538, 317, 6073, 4163, 363, 8778, 4007, 22137, 1213, 15945, 13, 13, 5215, 12183, 13, 13, 3166, 3271, 465, 22137, 29889, 14036, 29889, 29879, 6073, 1053, 313, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 29933, 1...
DigiroadPreDataAnalysis/digiroad/util/__init__.py
DigitalGeographyLab/Car-Routing
2
119206
<filename>DigiroadPreDataAnalysis/digiroad/util/__init__.py import configparser import csv import datetime import json import logging import logging.config import numpy import os import shutil import time import zipfile from digiroad import carRoutingExceptions as exc from digiroad.entities import Point from pandas.i...
[ 1, 529, 9507, 29958, 14991, 3350, 328, 6572, 1469, 21067, 4848, 29914, 7501, 3350, 328, 29914, 4422, 29914, 1649, 2344, 26914, 2272, 13, 5215, 2295, 16680, 13, 5215, 11799, 13, 5215, 12865, 13, 5215, 4390, 13, 5215, 12183, 13, 5215, 121...
diana/toolbox/parse_mesh.py
quimaguirre/diana
3
70315
import networkx def main(): base_dir = "/home/emre/data/ontology/mesh/" rel_file = base_dir + "mtrees2013.bin" m = MESH(rel_file) g = m.get_ontology() #print len(g.nodes()), len(g.edges()) #concept = "Mycoses" concept = "Diabetes Mellitus, Type 2" concept_ids = m.get_concept_ids(concept...
[ 1, 1053, 3564, 29916, 13, 13, 1753, 1667, 7295, 13, 1678, 2967, 29918, 3972, 353, 5591, 5184, 29914, 331, 276, 29914, 1272, 29914, 609, 3002, 29914, 4467, 29882, 12975, 13, 1678, 1104, 29918, 1445, 353, 2967, 29918, 3972, 718, 376, 2988...
day_24/day_24.py
GuillaumeGandon/advent-of-code-2015
0
136872
from math import prod from itertools import combinations weights = tuple(map(int, open('input').read().splitlines())) def solve(nb_group): targeted_weight = sum(weights) // nb_group i = 0 valid_combinations = None while not valid_combinations: i += 1 valid_combinations = tuple( ...
[ 1, 515, 5844, 1053, 11859, 13, 3166, 4256, 8504, 1053, 18240, 13, 13, 705, 5861, 353, 18761, 29898, 1958, 29898, 524, 29892, 1722, 877, 2080, 2824, 949, 2141, 5451, 9012, 22130, 13, 13, 13, 1753, 4505, 29898, 9877, 29918, 2972, 1125, ...
tests/test_overlap.py
opendatacube/odc-geo
5
127666
# This file is part of the Open Data Cube, see https://opendatacube.org for more information # # Copyright (c) 2015-2020 ODC Contributors # SPDX-License-Identifier: Apache-2.0 import math from random import uniform import numpy as np import pytest from affine import Affine from odc.geo import CRS, geom, resyx_, wh_, ...
[ 1, 396, 910, 934, 338, 760, 310, 278, 4673, 3630, 315, 4003, 29892, 1074, 2045, 597, 459, 355, 532, 29883, 4003, 29889, 990, 363, 901, 2472, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29945, 29899,...
weekly_challenge/week3/solution.py
WooJin1993/coding_test
0
179563
<reponame>WooJin1993/coding_test def get_rotated(matrix): return [list(reversed(m)) for m in zip(*matrix)] def get_expanded(game_board): N = len(game_board) expanded = [[1] * (N+2) for _ in range(N + 2)] for x in range(N): for y in range(N): expanded[1 + x][1 + y] = game_board...
[ 1, 529, 276, 1112, 420, 29958, 29956, 3634, 29967, 262, 29896, 29929, 29929, 29941, 29914, 29883, 3689, 29918, 1688, 13, 1753, 679, 29918, 5450, 630, 29898, 5344, 1125, 13, 13, 1678, 736, 518, 1761, 29898, 276, 874, 287, 29898, 29885, 8...
scripts/utils.py
carbonplan/cdr-database
13
1611579
<filename>scripts/utils.py import pathlib import gspread from oauth2client.service_account import ServiceAccountCredentials from pandas import DataFrame, MultiIndex SECRET_FILE = pathlib.Path(__file__).parents[1] / 'secrets/google-sheets-key.json' def ffill(data): """ helper function to forward fill column ...
[ 1, 529, 9507, 29958, 16713, 29914, 13239, 29889, 2272, 13, 5215, 2224, 1982, 13, 13, 5215, 330, 1028, 949, 13, 3166, 288, 5150, 29906, 4645, 29889, 5509, 29918, 10149, 1053, 6692, 10601, 28037, 13, 3166, 11701, 1053, 3630, 4308, 29892, ...
src/chia_log/log_handler.py
Connor-Knabe/chiadog
503
69749
<gh_stars>100-1000 # std from typing import Optional # project from src.chia_log.handlers.daily_stats.stats_manager import StatsManager from src.chia_log.handlers.harvester_activity_handler import HarvesterActivityHandler from src.chia_log.handlers.partial_handler import PartialHandler from src.chia_log.handlers.block...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29899, 29896, 29900, 29900, 29900, 13, 29937, 3659, 13, 3166, 19229, 1053, 28379, 13, 13, 29937, 2060, 13, 3166, 4765, 29889, 20508, 29918, 1188, 29889, 3179, 9306, 29889, 29881, ...
utils/perm_utils.py
IBM/NeuronAlignment
3
36449
<filename>utils/perm_utils.py import torch import numpy as np def train_perm_orth(train_loader, model, optimizer, scheduler, criterion, regularizer=None, rho=1E-4, delta=0.5, nu=1E-2, eps=1E-3, tau=1E-2, lagrange_pen=1E-2, perm_flag=True, t_step=40): if perm_flag: tau_min = 1E-24 ...
[ 1, 529, 9507, 29958, 13239, 29914, 17858, 29918, 13239, 29889, 2272, 13, 5215, 4842, 305, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 7945, 29918, 17858, 29918, 2072, 29898, 14968, 29918, 12657, 29892, 1904, 29892, 5994, 3950, 29892, 13...
jiant/utils/python/checks.py
yzpang/jiant
1,108
1614389
from typing import Dict def dict_equal(dict1: Dict, dict2: Dict) -> bool: if not len(dict1) == len(dict2): return False for (k1, v1), (k2, v2) in zip(dict1.items(), dict2.items()): if k1 != k2: return False if v1 != v2: return False return True
[ 1, 515, 19229, 1053, 360, 919, 13, 13, 13, 1753, 9657, 29918, 11745, 29898, 8977, 29896, 29901, 360, 919, 29892, 9657, 29906, 29901, 360, 919, 29897, 1599, 6120, 29901, 13, 1678, 565, 451, 7431, 29898, 8977, 29896, 29897, 1275, 7431, 29...
server/favorite_things/apps/favorite/migrations/0001_initial.py
el-Joft/favorite-things
1
1616323
<reponame>el-Joft/favorite-things # Generated by Django 2.1.4 on 2019-08-05 22:38 import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ ] operations = ...
[ 1, 529, 276, 1112, 420, 29958, 295, 29899, 10844, 615, 29914, 29888, 17118, 568, 29899, 386, 886, 13, 29937, 3251, 630, 491, 15337, 29871, 29906, 29889, 29896, 29889, 29946, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29900, 29947, 29899...
Python/easy/0136_single_number.py
CalmScout/LeetCode
0
1609720
<filename>Python/easy/0136_single_number.py """ Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? Example 1: Input: [2,2,1] Output: 1 Example 2: Input: ...
[ 1, 529, 9507, 29958, 11980, 29914, 29872, 8995, 29914, 29900, 29896, 29941, 29953, 29918, 14369, 29918, 4537, 29889, 2272, 13, 15945, 29908, 13, 29954, 5428, 263, 1661, 29899, 6310, 1409, 310, 11920, 29892, 1432, 1543, 5692, 8951, 5174, 363...
chapter15/exercises/exercise06/average.py
YordanIH/Intro_to_CS_w_Python
0
1617119
<filename>chapter15/exercises/exercise06/average.py from typing import List def average(values: List[float]) -> float: """Return the average of the numbers in values. Some items in values are None, and they are not counted toward the average. >>> average([20, 30]) 25.0 >>> average([None, 20, 30])...
[ 1, 529, 9507, 29958, 27349, 29896, 29945, 29914, 735, 261, 3476, 267, 29914, 735, 6269, 895, 29900, 29953, 29914, 12483, 482, 29889, 2272, 13, 3166, 19229, 1053, 2391, 13, 13, 1753, 6588, 29898, 5975, 29901, 2391, 29961, 7411, 2314, 1599,...
src/sensor/electricity/__init__.py
Jochen-TPO/internet-of-washingmachines
0
114701
import time import json from math import sqrt from typing import List from multiprocessing import Process, Event, Queue, Lock from src.base import EdgiseBase from grove.adc import ADC from config import cfg import json class ACSensor(Process, EdgiseBase): def __init__(self, stop_event: Event, logging_q: Queue, i...
[ 1, 1053, 931, 13, 5215, 4390, 13, 13, 3166, 5844, 1053, 18074, 2273, 13, 3166, 19229, 1053, 2391, 13, 3166, 6674, 307, 985, 292, 1053, 10554, 29892, 6864, 29892, 5462, 434, 29892, 18199, 13, 3166, 4765, 29889, 3188, 1053, 2155, 29887, ...
PySide2Wrapper/widget.py
toodef/PySide2Wrapper
0
190896
import math import os from PySide2.QtOpenGL import QGLWidget from PySide2.QtWidgets import QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QPushButton, QCheckBox, QRadioButton, \ QComboBox, QProgressBar, QTableWidget, QHeaderView, QTableWidgetItem, QFileDialog, QToolButton, QTabWidget, \ QWidget, QListWidget, QLi...
[ 1, 1053, 5844, 13, 5215, 2897, 13, 13, 3166, 10772, 23908, 29906, 29889, 17303, 6585, 7239, 1053, 660, 7239, 8801, 13, 3166, 10772, 23908, 29906, 29889, 17303, 8801, 29879, 1053, 660, 29963, 3313, 3453, 29892, 660, 29950, 3313, 3453, 2989...
bot/logic/spending/build_order/standard_zvp_hl.py
Scottdecat/HiveMind
0
137943
from typing import List, Dict from sc2 import UnitTypeId, Race from sc2.ids.upgrade_id import UpgradeId from bot.logic.spending.build_order.build_order import BOStep, BOAction from bot.services.state_service import StateService def get_build(state : StateService): return [ BOStep( 13,...
[ 1, 515, 19229, 1053, 2391, 29892, 360, 919, 13, 13, 3166, 885, 29906, 1053, 13223, 1542, 1204, 29892, 23613, 13, 3166, 885, 29906, 29889, 4841, 29889, 786, 8228, 29918, 333, 1053, 5020, 8228, 1204, 13, 13, 3166, 9225, 29889, 19227, 2988...
autogluon/utils/tabular/utils/decorators.py
zhanghang1989/autogluon
6
160871
import time, logging logger = logging.getLogger(__name__) # decorator to calculate duration taken by any function. Logs times at debug level (logging level 10). def calculate_time(func): # added arguments inside the inner1, # if function takes any arguments, # can be added like this. def inner1(*args,...
[ 1, 1053, 931, 29892, 12183, 13, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 29937, 10200, 1061, 304, 8147, 14385, 4586, 491, 738, 740, 29889, 4522, 29879, 3064, 472, 4744, 3233, 313, 21027, 3233, 29871, 29...
IMPACTA/Unid02_Sem4.py/exe02A.py
FR7/Meus-Projetos
0
136048
#Faça um programa que leia três números inteiros e colocá-los em ordem crescente. #Sugestão: Sejam 3 números A, B e C. A ideia principal é: # – armazenar em A o menor valor # – armazenar em B o valor intermediário # – armazenar em C o maior valor a = int(input("Digite um número para a: ")) b = int(input("Digite um núm...
[ 1, 396, 14206, 4277, 1922, 16914, 712, 454, 423, 26299, 12158, 359, 2293, 17177, 321, 28853, 29976, 29899, 5409, 953, 470, 2310, 24185, 21450, 29889, 13, 29937, 29903, 688, 342, 1368, 29901, 922, 29926, 314, 29871, 29941, 12158, 359, 319,...
model.py
linsamtw/finmind-analysis
0
111124
<filename>model.py import datetime from collections import Counter from random import seed from tqdm import tqdm import numpy as np import pandas as pd import xgboost as xgb from loguru import logger from sklearn.metrics import confusion_matrix from sklearn.model_selection import train_test_split def load_taiwan_sto...
[ 1, 529, 9507, 29958, 4299, 29889, 2272, 13, 5215, 12865, 13, 3166, 16250, 1053, 315, 5336, 13, 3166, 4036, 1053, 16717, 13, 13, 3166, 260, 29939, 18933, 1053, 260, 29939, 18933, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, ...
pipeline/fast_gbdt.py
LasTAD/FATE_FL_IoT_Intrusions
0
95252
<gh_stars>0 import argparse from pipeline.backend.pipeline import PipeLine from pipeline.component import DataTransform from pipeline.component.hetero_fast_secureboost import HeteroFastSecureBoost from pipeline.component.intersection import Intersection from pipeline.component.reader import Reader from pipeline.interf...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 1852, 5510, 13, 13, 3166, 16439, 29889, 27852, 29889, 13096, 5570, 1053, 7362, 412, 3542, 13, 3166, 16439, 29889, 9700, 1053, 3630, 13372, 13, 3166, 16439, 29889, 9700, 29889, 29882...
runserver.py
chintal/tendril-monitor-vendor
0
23006
<filename>runserver.py #!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2015 <NAME> # Released under the MIT license. """ Simple Deployment Example ------------------------- """ from vendor_monitor import worker from twisted.internet import reactor import logging logging.basicConfig(level=logging.INFO) if...
[ 1, 529, 9507, 29958, 3389, 2974, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 8025, 29901, 23616, 29899, 29947, 13, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29945, 529, 5813, ...
test/api/test_histories.py
mmiladi/galaxy
1
2740
<filename>test/api/test_histories.py # -*- coding: utf-8 -*- from requests import ( get, post, put ) from base import api # noqa: I100 from base.populators import ( # noqa: I100 DatasetCollectionPopulator, DatasetPopulator, wait_on ) class HistoriesApiTestCase(api.ApiTestCase): def set...
[ 1, 529, 9507, 29958, 1688, 29914, 2754, 29914, 1688, 29918, 16211, 583, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 7274, 1053, 313, 13, 1678, 679, 29892, 13, 1678, 1400, 2989...
tests/integration/mci/test_happy_path.py
qateam123/eq
0
2393
from tests.integration.create_token import create_token from tests.integration.integration_test_case import IntegrationTestCase class TestHappyPath(IntegrationTestCase): def test_happy_path_203(self): self.happy_path('0203', '1') def test_happy_path_205(self): self.happy_path('0205', '1') ...
[ 1, 515, 6987, 29889, 27925, 29889, 3258, 29918, 6979, 1053, 1653, 29918, 6979, 13, 3166, 6987, 29889, 27925, 29889, 27925, 29918, 1688, 29918, 4878, 1053, 17100, 362, 3057, 8259, 13, 13, 13, 1990, 4321, 29950, 14862, 2605, 29898, 23573, 3...
genkey/migrations/0007_auto_20190328_1149.py
MoreNiceJay/CAmanager_web
0
41217
<filename>genkey/migrations/0007_auto_20190328_1149.py # Generated by Django 2.0.4 on 2019-03-28 02:49 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('genkey', '0006_auto_20190327_1004'), ] operations = [ migrations.RenameModel( old...
[ 1, 529, 9507, 29958, 1885, 1989, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29955, 29918, 6921, 29918, 29906, 29900, 29896, 29929, 29900, 29941, 29906, 29947, 29918, 29896, 29896, 29946, 29929, 29889, 2272, 13, 29937, 3251, 630, 491, 1533...
jmetex/main.py
innovocloud/jmetex
2
21811
<reponame>innovocloud/jmetex import sys import time import argparse from prometheus_client import start_http_server, Metric, REGISTRY, Summary from .interfacecollector import InterfaceCollector from .opticalcollector import OpticalCollector def main(): parser = argparse.ArgumentParser(description='JunOS API to Pr...
[ 1, 529, 276, 1112, 420, 29958, 2559, 586, 542, 29880, 2736, 29914, 29926, 2527, 735, 13, 5215, 10876, 13, 5215, 931, 13, 5215, 1852, 5510, 13, 3166, 2504, 23043, 375, 29918, 4645, 1053, 1369, 29918, 1124, 29918, 2974, 29892, 4737, 2200,...
test_thermal/test_CompanyAdmin/test_RoleManagement/RoleManageBase.py
pyamour/Selenium_Python
0
115878
from seleniumbase import BaseCase from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from parameterized import parameterized import pytest from utilities import utilities from utilities import gmail from utilities.Authority import Authority from utilities.Role import Role from c...
[ 1, 515, 18866, 3188, 1053, 7399, 8259, 13, 3166, 18866, 29889, 29813, 29889, 9435, 29889, 1609, 1053, 2648, 13, 3166, 18866, 29889, 29813, 29889, 9435, 29889, 8149, 1053, 4813, 952, 13, 3166, 3443, 1891, 1053, 3443, 1891, 13, 5215, 11451,...
handedness/c2_ukb_analysisPheno.py
Conxz/brainskew
0
68534
# import pandas as pd import numpy as np import os import statsmodels.api as sm from scipy.stats import pearsonr, bartlett, levene data_file = './ukb_pheno_T1pos.csv' dat = pd.read_csv(data_file) print 'Handedness: 1=right, 2=left' print dat[dat['Handedness']==1]['Handedness'].count() print dat[dat['Handedness']==2]['...
[ 1, 396, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 5215, 2897, 13, 5215, 22663, 9794, 29889, 2754, 408, 1560, 13, 3166, 4560, 2272, 29889, 16202, 1053, 282, 799, 1100, 29878, 29892, 289, 442, 13650, 29892, 454, 854, ...
src/craft_ml/data/split.py
OptimizationGuys/CraftML
15
100535
import numpy as np from sklearn import model_selection import typing as t from copy import copy from ..mltypes import RandomState from ..data.dataset import Dataset class DataSplit: def get_splits(self, dataset: Dataset) -> t.Generator[t.Tuple[Dataset, Dataset], None, None]: raise NotImplementedError c...
[ 1, 1053, 12655, 408, 7442, 13, 3166, 2071, 19668, 1053, 1904, 29918, 21731, 13, 5215, 19229, 408, 260, 13, 3166, 3509, 1053, 3509, 13, 3166, 6317, 828, 8768, 1053, 16968, 2792, 13, 3166, 6317, 1272, 29889, 24713, 1053, 13373, 24541, 13,...
nlt_gol2_3-autorun.py
kooi/nlt-robotica-snippets
0
1615901
<reponame>kooi/nlt-robotica-snippets import pygame import random # grid = [ # [0, 1, 0, 1, 0, 1], # [1, 1, 1, 1, 1, 1], # ] # cell = grid[y vanaf boven][x vanaf links] # cell = grid[0][1] # print(grid[0][1]) PALETTE = [ (255, 255, 255), # dood ( 0, 0, ...
[ 1, 529, 276, 1112, 420, 29958, 2901, 7768, 29914, 29876, 1896, 29899, 307, 7451, 983, 29899, 29879, 1240, 27421, 13, 5215, 22028, 30004, 13, 5215, 4036, 30004, 13, 30004, 13, 29937, 6856, 353, 518, 30004, 13, 29937, 3986, 518, 29900, 29...
BioKlustering-Website/mlmodel/KMtests/websiteScripts.py
solislemuslab/mycovirus-website
1
170425
import pandas as pd from Bio import SeqIO from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.cluster import KMeans from sklearn.decomposition import PCA from sklearn.manifold import TSNE from sklearn.cluster import MeanShift from sklearn import preprocessing import matplotlib.pyplot as plt import...
[ 1, 1053, 11701, 408, 10518, 13, 3166, 21184, 1053, 25981, 5971, 13, 3166, 2071, 19668, 29889, 14394, 29918, 1062, 13857, 29889, 726, 1053, 323, 29888, 333, 29888, 12877, 3950, 13, 3166, 2071, 19668, 29889, 19594, 1053, 476, 6816, 550, 13,...
data/geometry.py
hash451722/FlowPredictionWithDeepNeuralNetwork
0
70839
<gh_stars>0 import pathlib import numpy as np import matplotlib.pyplot as plt class AirfoilStl(): def __init__(self, case_path) -> None: self.case_path = case_path self.database_path = None self.airfoil_list = None self.init_path_list() def init_path_list(self) -...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2224, 1982, 30004, 13, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 30004, 13, 30004, 13, 30004, 13, 1990, 5593, 1181, 309, 855, 29880...
management/commands/imageload.py
NikDark/ManagementCommands
0
50047
import os import re import shutil from django.core.management.base import BaseCommand, CommandError from wagtail.images.models import Image class Command(BaseCommand): help = 'Add Image from folder that you indicate' IMAGE_FORMAT = ( 'jpg', 'jpeg', 'webp', 'png', 'gif...
[ 1, 1053, 2897, 13, 5215, 337, 13, 5215, 528, 4422, 13, 13, 3166, 9557, 29889, 3221, 29889, 21895, 29889, 3188, 1053, 7399, 6255, 29892, 10516, 2392, 13, 3166, 281, 351, 18237, 29889, 8346, 29889, 9794, 1053, 7084, 13, 13, 13, 1990, 10...
webapp/app/__init__.py
siddharthsudheer/Alysida
0
68115
<filename>webapp/app/__init__.py #!/usr/bin/env python3 from flask import Flask from flask_socketio import SocketIO app = Flask(__name__, static_url_path='') app.url_map.strict_slashes = False socketio = SocketIO(app) from app.routes import index
[ 1, 529, 9507, 29958, 2676, 932, 29914, 932, 29914, 1649, 2344, 26914, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 3166, 29784, 1053, 2379, 1278, 13, 3166, 29784, 29918, 11514, 601, 1053, 29141, 5971, 13, 13, ...
src/safe_diet_project/safe_ingredient.py
hiwett18/Safe-Diet
0
92513
<reponame>hiwett18/Safe-Diet from patients import PatientType from menu import EntireMenu from ingredient import Food from restrictor import Restriction p1 = PatientType() patient = p1.select_patient() print(patient) f1 = Food() food = f1.food_ingredeients() food1 = food[:] r1 = Restriction(patient, food1) safe...
[ 1, 529, 276, 1112, 420, 29958, 2918, 29893, 1803, 29896, 29947, 29914, 17618, 1725, 29899, 29928, 2035, 13, 3166, 22069, 1053, 4121, 993, 1542, 13, 3166, 6143, 1053, 4284, 533, 6823, 13, 3166, 2348, 1127, 993, 1053, 25453, 29871, 13, 31...
ArcGIS Code/CutFillStatistics.py
uob-hydrology/OptimizedPitRemoval
4
1600502
<gh_stars>1-10 # Script Name: CutFillStatistics 1.0 # # Created By: <NAME> # Date: 01/16/2013 # Import ArcPy site-package and os modules # import arcpy import os import sys import time import string import subprocess #set executable program location executablepath = os.path.dirname(os.path.abspath(__file__))...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14415, 4408, 29901, 315, 329, 20876, 9513, 6765, 29871, 29896, 29889, 29900, 13, 29937, 29871, 13, 29937, 6760, 630, 2648, 29901, 29871, 529, 5813, 29958, 13, ...
drams/vagrant-settings.py
FAIRDataPipeline/data-registry
0
89090
<reponame>FAIRDataPipeline/data-registry from .base_settings import * ALLOWED_HOSTS = ['192.168.20.10', '127.0.0.1', 'localhost']
[ 1, 529, 276, 1112, 420, 29958, 4519, 8193, 1469, 29925, 23828, 29914, 1272, 29899, 1727, 6020, 13, 3166, 869, 3188, 29918, 11027, 1053, 334, 13, 13, 1964, 27998, 3352, 29918, 20832, 29903, 353, 6024, 29896, 29929, 29906, 29889, 29896, 299...
src/narmax/utils.py
DavidContrerasFranco/Data-driven-Dynamics-Understanding
0
142244
import time import copy import numpy as np from functools import reduce from operator import indexOf, iconcat from sysidentpy.utils.display_results import results from sysidentpy.model_structure_selection import FROLS def narmax_state_space(nx_model:FROLS, X_train, X_test, states_names): xlag = nx_model.xlag if ...
[ 1, 29871, 13, 5215, 931, 13, 5215, 3509, 13, 5215, 12655, 408, 7442, 13, 13, 3166, 2090, 312, 8789, 1053, 10032, 13, 3166, 5455, 1053, 2380, 2776, 29892, 9849, 4117, 13, 3166, 10876, 1693, 2272, 29889, 13239, 29889, 4990, 29918, 9902, ...
JumpscaleCore/servers/graphql/GraphqlBottle.py
gneumann333/jumpscaleX_core
1
151261
import json from collections import namedtuple from bottle import request, response from graphql import GraphQLError, format_error as format_graphql_error def format_error(error): if isinstance(error, GraphQLError): return format_graphql_error(error) return {"message": str(error)} def handle_grap...
[ 1, 1053, 4390, 13, 3166, 16250, 1053, 4257, 23583, 13, 13, 3166, 18046, 280, 1053, 2009, 29892, 2933, 13, 13, 3166, 3983, 1519, 1053, 12367, 29984, 1307, 24616, 29892, 3402, 29918, 2704, 408, 3402, 29918, 4262, 1519, 29918, 2704, 13, 13...
iconary/models/t5_decoding.py
allenai/iconary
6
103633
<reponame>allenai/iconary<gh_stars>1-10 """Logic to use T5 in allennlp's BeamSearch This allows us to use T5 to create the initial_state, starting predictions, and `StepFunctionType` functions needed to run `BeamSearch` from allennlp. It also includes the constraint logic we use to ensure Drawers produce valid drawing...
[ 1, 529, 276, 1112, 420, 29958, 5442, 1794, 29914, 4144, 653, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 3403, 293, 304, 671, 323, 29945, 297, 599, 2108, 22833, 29915, 29879, 1522, 314, 7974, 13, ...
tests/test_doctest.py
nlaurance/sourceparse
0
75649
import doctest def test_doctests(): doctest.testfile("../README.rst") if __name__ == "__main__": test_doctests()
[ 1, 1053, 437, 312, 342, 13, 13, 13, 1753, 1243, 29918, 1867, 312, 9197, 7295, 13, 1678, 437, 312, 342, 29889, 1688, 1445, 703, 6995, 16310, 2303, 29889, 29878, 303, 1159, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649...
src/a05obiekty/Knife.py
tborzyszkowski/PSPI_Wstep_do_programowania
2
129977
from .Tool import * class Knife(Tool): def __init__(self) -> None: super().__init__() def can_drill(self): return False def can_cut(self): return True def can_sweep(self): return False
[ 1, 515, 869, 12229, 1053, 334, 13, 13, 13, 1990, 8360, 1607, 29898, 12229, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29897, 1599, 6213, 29901, 13, 4706, 2428, 2141, 1649, 2344, 1649, 580, 13, 13, 1678, 822, 508, 29918, 7707, 453, ...
docs/assets/greeting.py
pablodevs/StarwarsBlog
0
149424
<reponame>pablodevs/StarwarsBlog def blue(_str): return f"\033[0;33m{_str}\033[0m" print(f""" Hello 😁 ! Use the terminal to code! 1. Start the dev server by running {blue("$ npm run start")} 2. You can find a video tutorial and explanation on the README.md file. 3. Always read the terminal output, it's your bes...
[ 1, 529, 276, 1112, 420, 29958, 29886, 12478, 356, 4270, 29914, 16213, 29893, 1503, 29933, 1188, 13, 1753, 7254, 7373, 710, 1125, 13, 1678, 736, 285, 26732, 29900, 29941, 29941, 29961, 29900, 29936, 29941, 29941, 29885, 29912, 29918, 710, ...
network.py
QiaoZhongzheng/EWC-sample-PMNIST
0
2718
# -*- coding: UTF-8 -*- '''================================================= @Project -> File :EWC -> network @IDE :PyCharm @Author :<NAME> @Date :2021/6/23 20:28 @Desc : ==================================================''' from tensorflow.keras import Model from tensorflow.keras.layers import Dense, Conv2D,L...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 18351, 29899, 29947, 448, 29930, 29899, 13, 12008, 9166, 9166, 9166, 29922, 13, 29992, 7653, 1599, 3497, 1678, 30383, 29923, 29956, 29907, 1599, 3564, 13, 29992, 22027, 268, 30383, 19737, 1451, 2817,...
setup.py
aychedee/sniffer
0
199927
<reponame>aychedee/sniffer<gh_stars>0 from setuptools import setup, find_packages # will fail to install via pip/easy_install #from sniffer.metadata import __version__, __author__, __author_email__ __version__, __author__, __author_email__ = "0.3.4", "<NAME>", "<EMAIL>" setup( name='sniffer', version=__versi...
[ 1, 529, 276, 1112, 420, 29958, 388, 305, 2742, 29872, 29914, 16586, 8349, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 13, 29937, 674, 4418, 304, 2601, 3025, 8450, 2...
py/543. Diameter of Binary Tree.py
longwangjhu/LeetCode
3
105417
<gh_stars>1-10 # https://leetcode.com/problems/diameter-of-binary-tree/ # Given the root of a binary tree, return the length of the diameter of the tree. # The diameter of a binary tree is the length of the longest path between any two # nodes in a tree. This path may or may not pass through the root. # The length o...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 2045, 597, 280, 300, 401, 29889, 510, 29914, 17199, 29879, 29914, 29881, 2829, 1308, 29899, 974, 29899, 19541, 29899, 8336, 29914, 13, 13, 29937, 11221, 278, 3...
src/cstar-cli/cstar/cli/bpd/awardperiod.py
pagopa/cstar-cli
1
182488
<reponame>pagopa/cstar-cli import psycopg2 import psycopg2.extras import pandas as pd import pandas.io.sql as psql import random from datetime import timedelta, datetime, date import string from .constants import CITIZEN_RANKING_EXT_SCHEMA class Awardperiod() : def __init__(self, args): self.args = args ...
[ 1, 529, 276, 1112, 420, 29958, 13573, 459, 29874, 29914, 29883, 8508, 29899, 11303, 13, 5215, 6529, 29891, 9708, 29887, 29906, 13, 5215, 6529, 29891, 9708, 29887, 29906, 29889, 1062, 3417, 13, 13, 5215, 11701, 408, 10518, 13, 5215, 11701,...
quests/forms.py
czambuk/dnd
0
97570
<filename>quests/forms.py from django import forms from .models import ( Quest, QuestStage ) class QuestForm(forms.ModelForm): class Meta: model = Quest fields = ( 'name', 'description', 'which_campaign', 'characters', ) widg...
[ 1, 529, 9507, 29958, 1119, 29879, 29914, 9514, 29889, 2272, 13, 3166, 9557, 1053, 7190, 13, 13, 3166, 869, 9794, 1053, 313, 13, 1678, 751, 342, 29892, 13, 1678, 751, 342, 27276, 13, 29897, 13, 13, 13, 1990, 751, 342, 2500, 29898, 95...
src/pycropml/render_fortran.py
sielenk-yara/PyCrop2ML
0
139776
<filename>src/pycropml/render_fortran.py """Add License, Header. Use pkglts Problems: - name of a model unit? """ from __future__ import print_function from __future__ import absolute_import from path import Path from pycropml.formater_f90 import formater import six import os from pycropml.composition import mode...
[ 1, 529, 9507, 29958, 4351, 29914, 2272, 29883, 1336, 828, 29914, 9482, 29918, 3921, 661, 29889, 2272, 13, 15945, 29908, 2528, 19245, 29892, 19345, 29889, 13, 13, 11403, 282, 29895, 3820, 1372, 13, 13, 26604, 29879, 29901, 13, 29899, 1024,...
connect/reports/renderers/j2.py
effrenus/connect-reports-core
0
86607
# Copyright © 2021 CloudBlue. All rights reserved. import os from jinja2 import ( Environment, FileSystemLoader, select_autoescape, ) from connect.reports.renderers.base import BaseRenderer from connect.reports.renderers.registry import register @register('jinja2') class Jinja2Renderer(BaseRenderer): ...
[ 1, 396, 29871, 14187, 1266, 29871, 30211, 29871, 29906, 29900, 29906, 29896, 14293, 21319, 29889, 2178, 10462, 21676, 29889, 13, 13, 5215, 2897, 13, 13, 3166, 432, 262, 1764, 29906, 1053, 313, 13, 1678, 16738, 29892, 13, 1678, 3497, 3924,...
Inference_Model.py
CODEJIN/WaveRNN
1
29485
<reponame>CODEJIN/WaveRNN from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import functools import itertools import threading import numpy as np from six.moves import zip # pylint: disable=redefined-builtin from google.protobuf import js...
[ 1, 529, 276, 1112, 420, 29958, 16524, 29967, 1177, 29914, 29956, 1351, 29934, 10262, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596,...
experiments/_pytorch/_grpc_server/protofiles/imagedata_pb2.py
RedisAI/benchmarks
6
4468
<gh_stars>1-10 # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: imagedata.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from go...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3251, 630, 491, 278, 9608, 6835, 6516, 29889, 29871, 11662, 6058, 11488, 2999...
orangery/cli/cutfill.py
mrahnis/orangery
2
6682
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import logging import time import json import click import matplotlib.pyplot as plt import orangery as o from orangery.cli import defaults, util from orangery.tools.plotting import get_scale_factor @click.command(options_metavar='<options>') @click.argument(...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 10876, 13, 5215, 12183, 13, 5215, 931, 13, 13, 5215, 4390, 13, 5215, 2828, 13, 5215, 22889...
src/evolvepy/integrations/__init__.py
EltonCN/evolvepy
1
21132
<filename>src/evolvepy/integrations/__init__.py ''' EvolvePy's integrations with other modules. '''
[ 1, 529, 9507, 29958, 4351, 29914, 29872, 1555, 345, 2272, 29914, 14146, 800, 29914, 1649, 2344, 26914, 2272, 13, 12008, 13, 1678, 382, 1555, 345, 19737, 29915, 29879, 3990, 800, 411, 916, 10585, 29889, 13, 12008, 2 ]
blog/articles/views.py
dotHashemi/django-practice
1
118399
<filename>blog/articles/views.py from django.shortcuts import render from .models import Article def index(request): articles = Article.objects.order_by("-published")[:10] return render(request, 'index.html', { 'title': 'Articles Page', 'articles': articles }) def show(request, id):...
[ 1, 529, 9507, 29958, 7312, 29914, 18569, 29914, 7406, 29889, 2272, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 13, 3166, 869, 9794, 1053, 21746, 13, 13, 13, 1753, 2380, 29898, 3827, 1125, 13, 1678, 7456, 353, 21746, 29889, 12...
recommender/main.py
TxConvergentAdmin/f20-bt-impact-local-business
0
189390
<gh_stars>0 from script import get_rec def main(request): """Responds to any HTTP request. Args: request (flask.Request): HTTP request object. Returns: The response text or any set of values that can be turned into a Response object using `make_response <http://flask....
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 2471, 1053, 679, 29918, 3757, 30004, 13, 1753, 1667, 29898, 3827, 1125, 30004, 13, 1678, 9995, 1666, 2818, 29879, 304, 738, 7331, 2009, 22993, 13, 1678, 826, 3174, 29901, 30004, 1...
tests/utils_tests/test_glob.py
MikeAmy/django
5,079
92046
<reponame>MikeAmy/django from __future__ import unicode_literals from django.test import SimpleTestCase from django.utils.glob import glob_escape class TestUtilsGlob(SimpleTestCase): def test_glob_escape(self): filename = '/my/file?/name[with special chars*' expected = '/my/file[?]/name[[]with sp...
[ 1, 529, 276, 1112, 420, 29958, 29924, 9345, 29909, 1357, 29914, 14095, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 1688, 1053, 12545, 3057, 8259, 13, 3166, 9557, 29889, 13239, 29889, 2370...
gcloud/datastores/tests/STUB_test_bigquery.py
pantheon-ci-bot/etl-framework
2
10542
<filename>gcloud/datastores/tests/STUB_test_bigquery.py """tests bigquery client""" import unittest from gcloud.datastores.bigquery import BigqueryClient class BigqueryClientTestCases(unittest.TestCase): """stuff""" @classmethod def setUpClass(cls): cls.project_id = 'test' cls.dataset_i...
[ 1, 529, 9507, 29958, 29887, 9274, 29914, 4130, 579, 2361, 29914, 21150, 29914, 1254, 7466, 29918, 1688, 29918, 3752, 1972, 29889, 2272, 13, 15945, 29908, 21150, 4802, 1972, 3132, 15945, 29908, 13, 13, 5215, 443, 27958, 13, 13, 3166, 330, ...
ppo/train.py
esthergu/pytorch-a2c-ppo-acktr
0
183829
import os, sys, time, copy, glob from collections import deque import gym from gym import spaces import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from ppo.a2c_ppo_acktr import algo from ppo.a2c_ppo_acktr.arguments import get_args from ppo.a2c_ppo_acktr....
[ 1, 1053, 2897, 29892, 10876, 29892, 931, 29892, 3509, 29892, 13149, 13, 3166, 16250, 1053, 316, 802, 13, 13, 5215, 330, 962, 13, 3166, 330, 962, 1053, 8162, 13, 5215, 12655, 408, 7442, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, ...
Project--Make-Sense-of-Census/code.py
sahil-mehta/ga-learner-dsmp-repo
0
184583
<filename>Project--Make-Sense-of-Census/code.py # -------------- # Importing header files import numpy as np # Path of the file has been stored in variable called 'path' dfile='path' data=np.genfromtxt(path,delimiter=",", skip_header=1) data #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] census=np....
[ 1, 529, 9507, 29958, 7653, 489, 9984, 29899, 29903, 1947, 29899, 974, 29899, 29907, 8841, 29914, 401, 29889, 2272, 13, 29937, 448, 9072, 29899, 13, 29937, 16032, 292, 4839, 2066, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 30004, 13, ...
scripts/data/topple_dataset.py
davrempe/predicting-physical-dynamics
16
2956
import numpy as np import pickle from os.path import exists, realpath import sys import math from topple_data_loader import ToppleData, ToppleDataLoader import transforms3d class ToppleNormalizationInfo(): ''' Structure to hold all the normalization information for a dataset. ''' def __init__(self...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 5839, 280, 13, 3166, 2897, 29889, 2084, 1053, 4864, 29892, 1855, 2084, 13, 5215, 10876, 13, 5215, 5844, 13, 3166, 304, 407, 280, 29918, 1272, 29918, 12657, 1053, 1763, 407, 280, 1469, 29892, 1763, ...
Project_Euler/01_mults_3_or_5/find_sum.py
perlygatekeeper/glowing-robot
2
47757
#!/opt/local/bin/python sum_3_5 = 0 for i in range(1,1000): if i % 3 == 0 or i % 5 == 0: print(i) sum_3_5 += i print(sum_3_5)
[ 1, 18787, 3670, 29914, 2997, 29914, 2109, 29914, 4691, 13, 13, 2083, 29918, 29941, 29918, 29945, 353, 29871, 29900, 13, 1454, 474, 297, 3464, 29898, 29896, 29892, 29896, 29900, 29900, 29900, 1125, 13, 1678, 565, 474, 1273, 29871, 29941, 1...
load_dataset/custom_datasets.py
propelwise/ct-net-models
6
138900
<filename>load_dataset/custom_datasets.py #custom_datasets.py #Copyright (c) 2020 <NAME> <NAME> #MIT License #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including with...
[ 1, 529, 9507, 29958, 1359, 29918, 24713, 29914, 6341, 29918, 14538, 1691, 29889, 2272, 13, 29937, 6341, 29918, 14538, 1691, 29889, 2272, 13, 29937, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 529, 5813, 29958, 529, 58...
applications/structural_application/test_examples/balken.gid/balken_include.py
jiaqiwang969/Kratos-test
0
144207
<reponame>jiaqiwang969/Kratos-test ################################################################## ######################## include.py ############################ ################################################################## ##### ekate - Enhanced KRATOS for Advanced Tunnel Enineering ##### ##### copyright b...
[ 1, 529, 276, 1112, 420, 29958, 29926, 423, 29939, 9429, 574, 29929, 29953, 29929, 29914, 29968, 3605, 359, 29899, 1688, 13, 13383, 13383, 13383, 13383, 2277, 13, 13383, 7346, 3160, 29889, 2272, 259, 835, 13383, 7346, 29937, 13, 13383, 133...
setup.py
davidrpugh/solowPy
31
24481
<reponame>davidrpugh/solowPy import os from distutils.core import setup def read(*paths): """Build a file path from *paths* and return the contents.""" with open(os.path.join(*paths), 'r') as f: return f.read() DESCRIPTION = ("Library for solving, simulating, and estimating the " + "S...
[ 1, 529, 276, 1112, 420, 29958, 29881, 16093, 19080, 6129, 29914, 2929, 340, 19737, 13, 5215, 2897, 13, 13, 3166, 1320, 13239, 29889, 3221, 1053, 6230, 13, 13, 13, 1753, 1303, 10456, 24772, 1125, 13, 1678, 9995, 8893, 263, 934, 2224, 5...
wow.py
aswinmurali-io/magiclist
1
175799
<gh_stars>1-10 import sqlite3 import time import os print('\nsqlite3') file = 'example.db' if os.path.exists(file): os.remove(file) conn = sqlite3.connect(file) c = conn.cursor() # Create table start = time.time() c.execute('''CREATE TABLE stocks (date text, trans text, symbol text, qty real, price...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 21120, 29941, 13, 5215, 931, 13, 5215, 2897, 13, 13, 2158, 28909, 1983, 1519, 568, 29941, 1495, 13, 13, 1445, 353, 525, 4773, 29889, 2585, 29915, 13, 361, 2...
Code/binarytree.py
siko408/CS-1.3-Core-Data-Structures
0
187192
#!python from collections import deque class User(object): def __init__(self, age, testscore): self.age = age self.testscore = testscore def getAge(self): return self.age def getTestScore(self): return self.testscore class BinaryTreeNode(object): def __init__(self,...
[ 1, 396, 29991, 4691, 13, 3166, 16250, 1053, 316, 802, 13, 13, 13, 1990, 4911, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 5046, 29892, 1243, 13628, 1125, 13, 4706, 1583, 29889, 482, 353, 5046, 13, 4706, 1583, 298...
Python/add_networks_from_ddi.py
rexyim/netmri-toolkit
17
117932
<gh_stars>10-100 import requests import json requests.packages.urllib3.disable_warnings() gm_user = "admin" gm_pwd = "<PASSWORD>" url = "https://192.168.0.200/wapi/v2.7/" s = requests.Session() s.auth = (gm_user, gm_pwd) mri_url = "192.168.0.201" mri_user = "admin" mri_pwd = "<PASSWORD>" def get_networks_to_add(): ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 7274, 13, 5215, 4390, 13, 13, 24830, 29889, 8318, 29889, 2271, 1982, 29941, 29889, 20472, 29918, 25442, 886, 580, 13, 13, 29887, 29885, 29918, 179...
transfer_model/losses/losses.py
ribeiro-hugo/smplx
776
94920
<filename>transfer_model/losses/losses.py # -*- coding: utf-8 -*- # Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is # holder of all proprietary rights on this computer program. # You can only use this computer program if you have closed # a license agreement with MPG or you get the right to use ...
[ 1, 529, 9507, 29958, 3286, 571, 29918, 4299, 29914, 6758, 267, 29914, 6758, 267, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 5918, 29899, 20334, 384, 29899, 29954, 267, 1...
FT_to_prediction/finetune_launch.py
bm2-lab/X-MOL
19
164314
import sys import subprocess import commands import os import six import copy import argparse import time from utils.stream import stream_by_running as get_stream_m from utils.args import ArgumentGroup, print_arguments, inv_arguments from finetune_args import parser as finetuning_parser from extend_pos import extend_w...
[ 1, 1053, 10876, 13, 5215, 1014, 5014, 13, 5215, 8260, 13, 5215, 2897, 13, 5215, 4832, 13, 5215, 3509, 13, 5215, 1852, 5510, 13, 5215, 931, 13, 13, 3166, 3667, 29879, 29889, 5461, 1053, 4840, 29918, 1609, 29918, 21094, 408, 679, 29918,...
pyregion/conftest.py
stefanor/pyregion
21
104193
# this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.version import version as astropy_version if astropy_version < '3.0': # With older versions of Astrop...
[ 1, 396, 445, 3743, 24802, 18224, 393, 10822, 11451, 29889, 1688, 363, 8717, 14441, 6987, 29889, 13, 29937, 491, 28348, 963, 1244, 297, 378, 615, 342, 29889, 2272, 896, 526, 6523, 519, 491, 11451, 29889, 1688, 13, 29937, 694, 4383, 920, ...
esppy/helper/helpers.py
Mentos05/SAS_AskTheExpert
0
87285
<gh_stars>0 #Helpfer Function: def create_scoring_schema(number_objects): _field = "id*:int64,image:blob,_image_:blob,_nObjects_:double," for obj in range(0,number_objects): _field += "_Object" + str(obj) + "_:string," _field += "_P_Object" + str(obj) + "_:double," _field += "_Object" + ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 29648, 571, 6680, 29901, 13, 1753, 1653, 29918, 1557, 8253, 29918, 11010, 29898, 4537, 29918, 12650, 1125, 13, 1678, 903, 2671, 353, 376, 333, 29930, 29901, 524, 29953, 29946, 2989...
python/rikai/pytorch/models/__init__.py
askintution/rikai
1
106302
<filename>python/rikai/pytorch/models/__init__.py # Copyright 2022 Rikai Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
[ 1, 529, 9507, 29958, 4691, 29914, 374, 1335, 29875, 29914, 2272, 7345, 305, 29914, 9794, 29914, 1649, 2344, 26914, 2272, 13, 29937, 29871, 14187, 1266, 29871, 29906, 29900, 29906, 29906, 390, 17409, 13189, 943, 13, 29937, 13, 29937, 29871, ...
summer-of-code/week-01/Nessa/soc-wk1-cert-nessa-carson.py
supersciencegrl/toolkitten
0
120180
# ### CALC ### print("") print("### CALC ###") print("") print("Hours in a year:") print(24*365) print("Minutes in a decade:") print(60*24*365*10) print("My age in seconds:") print((365*27+6+2+31+30+31+30+16)*24*1440) # Correct to the nearest day at the time of writing! print("Andreea's age:") print(48618000/(365...
[ 1, 396, 835, 315, 1964, 29907, 835, 13, 13, 2158, 703, 1159, 13, 2158, 703, 2277, 29937, 315, 1964, 29907, 835, 1159, 13, 2158, 703, 1159, 13, 13, 2158, 703, 29950, 2470, 297, 263, 1629, 29901, 1159, 13, 2158, 29898, 29906, 29946, 2...
pyyeti/cla/_rptpct1.py
twmacro/pyye
0
38847
# -*- coding: utf-8 -*- """ Low level tool for writing percent difference reports. Typically, this is called via: :func:`cla.DR_Results.rptpct`. """ from io import StringIO from types import SimpleNamespace import warnings import numpy as np import matplotlib.pyplot as plt from pyyeti import ytools, locate, writer from...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 29931, 340, 3233, 5780, 363, 5007, 10151, 4328, 13676, 29889, 14213, 1711, 29892, 445, 13, 275, 2000, 3025, 29901, 584, 9891, 18078, 16...
plugins/matplotlib/komand_matplotlib/actions/create_line_plot/action.py
lukaszlaszuk/insightconnect-plugins
46
1608510
<filename>plugins/matplotlib/komand_matplotlib/actions/create_line_plot/action.py import komand from .schema import CreateLinePlotInput, CreateLinePlotOutput # Custom imports below import base64 import pandas as pd import seaborn as sns from io import BytesIO class CreateLinePlot(komand.Action): def __init__(sel...
[ 1, 529, 9507, 29958, 12800, 29914, 2922, 17357, 29914, 7218, 392, 29918, 2922, 17357, 29914, 7387, 29914, 3258, 29918, 1220, 29918, 5317, 29914, 2467, 29889, 2272, 13, 5215, 4677, 392, 13, 3166, 869, 11010, 1053, 6204, 3542, 20867, 4290, ...
wagtailrelated/utils.py
torchbox/wagtail-related
2
33710
<reponame>torchbox/wagtail-related<gh_stars>1-10 from bs4 import BeautifulSoup from wagtail.core.fields import StreamField def extract_text(obj): """Extracts data, concatenates and removes html tags from fields listed in a obj.related_source_fields list. """ related_source_fields = getattr(obj._meta.m...
[ 1, 529, 276, 1112, 420, 29958, 7345, 305, 1884, 29914, 29893, 351, 18237, 29899, 12817, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 3166, 281, 351, 18237, 29889, ...
python/testData/inspections/PyTypeCheckerInspection/FieldWithNoneInStub/m1.py
truthiswill/intellij-community
2
128524
class C(object): foo = None
[ 1, 770, 315, 29898, 3318, 1125, 13, 1678, 7953, 353, 6213, 13, 2 ]
crosstab/mega_analysis/lateralised_intensities.py
karandahele/Epilepsy-Repository
2
24549
import pandas as pd from crosstab.mega_analysis.pivot_result_to_pixel_intensities import * def lateralisation_to_pixel_intensities(all_combined_gifs, df, semiology_term, quantiles, method='non-linear', scale_factor=10, ...
[ 1, 1053, 11701, 408, 10518, 13, 3166, 274, 1883, 29256, 29889, 29885, 2442, 29918, 15916, 29889, 29886, 11002, 29918, 2914, 29918, 517, 29918, 29886, 15711, 29918, 524, 575, 1907, 1053, 334, 13, 13, 1753, 2678, 284, 4371, 29918, 517, 2991...
models/discriminator_net.py
hbin0701/c3vqg-official
13
166396
from torch import nn class Discriminator(nn.Module): def __init__(self, hidden_size=512): super(Discriminator,self).__init__() self.model = nn.Sequential( nn.Linear(hidden_size, hidden_size//2), nn.LeakyReLU(0.2, inplace=True), nn.Linear(hidden_size//2, 256), nn.LeakyReLU(0.2, inplace=True), nn.Li...
[ 1, 515, 4842, 305, 1053, 302, 29876, 13, 13, 1990, 8565, 20386, 1061, 29898, 15755, 29889, 7355, 1125, 13, 12, 1753, 4770, 2344, 12035, 1311, 29892, 7934, 29918, 2311, 29922, 29945, 29896, 29906, 1125, 13, 12, 12, 9136, 29898, 4205, 298...
examples/mmLogin.py
michaelrosejr/pyaos8
2
92102
<gh_stars>1-10 #!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests import pprint as pp import re from requests.packages.urllib3.exceptions import InsecureRequestWarning # requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # MM Login IP and credentials userName = 'admin' passWord = '<PASSWORD...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 5215, 7274, 13, 5215,...
docs/examples/models_abc.py
jasujm/pydantic
25
86099
<filename>docs/examples/models_abc.py import abc from pydantic import BaseModel class FooBarModel(BaseModel, abc.ABC): a: str b: int @abc.abstractmethod def my_abstract_method(self): pass
[ 1, 529, 9507, 29958, 2640, 29914, 19057, 29914, 9794, 29918, 10736, 29889, 2272, 13, 5215, 25638, 13, 3166, 282, 2941, 7716, 1053, 7399, 3195, 13, 13, 13, 1990, 13679, 4297, 3195, 29898, 5160, 3195, 29892, 25638, 29889, 19658, 1125, 13, ...
core/translator.py
bfu4/mdis
13
23605
from typing import List from parser import parse_bytes, split_bytes_from_lines, get_bytes, parse_instruction_set, wrap_parsed_set from reader import dump_file_hex_with_locs class Translator: """ Class handling file translations from *.mpy to hex dumps and opcodes """ def __init__(self, file: str): ...
[ 1, 515, 19229, 1053, 2391, 13, 13, 3166, 13812, 1053, 6088, 29918, 13193, 29892, 6219, 29918, 13193, 29918, 3166, 29918, 9012, 29892, 679, 29918, 13193, 29892, 6088, 29918, 2611, 4080, 29918, 842, 29892, 12244, 29918, 862, 8485, 29918, 842,...
Algo_Ds_Notes-master/Algo_Ds_Notes-master/A_Star_Search_Algorithm/A_Star_Search_Algorithm.py
rajatenzyme/Coding-Journey-
0
21224
class Node: """ A node class used in A* Pathfinding. parent: it is parent of current node position: it is current position of node in the maze. g: cost from start to current Node h: heuristic based estimated cost for current Node to end Node f: total cost of present n...
[ 1, 770, 9071, 29901, 13, 1678, 9995, 13, 4706, 319, 2943, 770, 1304, 297, 319, 29930, 10802, 2886, 292, 29889, 13, 4706, 3847, 29901, 372, 338, 3847, 310, 1857, 2943, 13, 4706, 2602, 29901, 372, 338, 1857, 2602, 310, 2943, 297, 278, ...
aws-refresh-ssh-config.py
Eximchain/deployment-scripts
0
84510
import argparse import boto3 import json import time IN_FILE = "initial-servers.json" OUT_FILE = "temp-servers.json" # Network ID for main network, gamma, and beta NETWORK_ID="1" NETWORK_ID_FILTER = {'Name': 'tag:NetworkId', 'Values': [NETWORK_ID]} RUNNING_FILTER={'Name': 'instance-state-name', 'Values': ['running']}...
[ 1, 1053, 1852, 5510, 13, 5215, 289, 3747, 29941, 13, 5215, 4390, 13, 5215, 931, 13, 13, 1177, 29918, 7724, 353, 376, 11228, 29899, 643, 874, 29889, 3126, 29908, 13, 12015, 29918, 7724, 353, 376, 7382, 29899, 643, 874, 29889, 3126, 299...
tests/autobahn_test.py
andreasbossard/deutschland
445
141231
from pprint import pprint from deutschland import autobahn from deutschland.autobahn.api import default_api autobahn_api_instance = default_api.DefaultApi() try: # Auflistung aller Autobahnen api_response = autobahn_api_instance.list_autobahnen() pprint(api_response) # Details zu einer Ladestation ...
[ 1, 515, 282, 2158, 1053, 282, 2158, 13, 13, 3166, 4795, 1049, 1053, 1120, 711, 5422, 13, 3166, 4795, 1049, 29889, 1300, 711, 5422, 29889, 2754, 1053, 2322, 29918, 2754, 13, 13, 1300, 711, 5422, 29918, 2754, 29918, 8758, 353, 2322, 299...
server/processes/migrations/0132_auto_20201108_0540.py
CloudReactor/task_manager
0
5448
# Generated by Django 2.2.14 on 2020-11-08 05:40 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('processes', '0131_auto_20201107_2316'), ] operations = [ migrations.RunSQL( "UPDATE processes_workflow SET run_environ...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29896, 29946, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29896, 29896, 29899, 29900, 29947, 29871, 29900, 29945, 29901, 29946, 29900, 30004, 13, 30004, 13, 3166, 9557, 2988...
test/tool_shed/base/test_db_util.py
thata/galaxy-dist
2
61139
import galaxy.model import galaxy.webapps.community.model as model from galaxy.model.orm import * from galaxy.webapps.community.model.mapping import context as sa_session from galaxy.model.mapping import context as ga_session def delete_obj( obj ): sa_session.delete( obj ) sa_session.flush() def delete_user_ro...
[ 1, 1053, 15400, 29891, 29889, 4299, 13, 5215, 15400, 29891, 29889, 2676, 13371, 29889, 23834, 29889, 4299, 408, 1904, 13, 3166, 15400, 29891, 29889, 4299, 29889, 555, 1053, 334, 13, 3166, 15400, 29891, 29889, 2676, 13371, 29889, 23834, 2988...
backstack/__init__.py
pixlie/platform
2
21837
<reponame>pixlie/platform from .models import SystemModel, BaseModel from .errors import ServerError, Errors from .config import settings from .db import db, Base from .commands import Commands name = "platform" __all__ = [ "name", "SystemModel", "BaseModel", "ServerError", "Errors", "settin...
[ 1, 529, 276, 1112, 420, 29958, 29886, 861, 3197, 29914, 12120, 13, 3166, 869, 9794, 1053, 2184, 3195, 29892, 7399, 3195, 13, 3166, 869, 12523, 1053, 5656, 2392, 29892, 4829, 29879, 13, 3166, 869, 2917, 1053, 6055, 13, 3166, 869, 2585, ...
backend/security/migrations/8036f244db77_create_user_and_role.py
anu-act-health-covid19-support/hospital-demand-webapp-backup
558
143754
""" create user and role Revision ID: 8036f244db77 Revises: Create Date: 2017-10-11 17:22:00.467780 """ from alembic import op import sqlalchemy as sa import backend # revision identifiers, used by Alembic. revision = '8036f244db77' down_revision = None branch_labels = ('security',) depends_on = None def upgrad...
[ 1, 9995, 13, 3258, 1404, 322, 6297, 13, 13, 1123, 4924, 3553, 29901, 29871, 29947, 29900, 29941, 29953, 29888, 29906, 29946, 29946, 2585, 29955, 29955, 13, 1123, 1730, 267, 29901, 29871, 13, 4391, 4712, 29901, 29871, 29906, 29900, 29896, ...