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
trainer/train_debug.py
naivelogic/dotatron
0
1610322
<reponame>naivelogic/dotatron #!/usr/bin/python import os import torch import warnings warnings.filterwarnings("ignore", category=FutureWarning) from detectron2.config import * from detectron2 import model_zoo from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.engine import launch from rota...
[ 1, 529, 276, 1112, 420, 29958, 1056, 13255, 468, 293, 29914, 6333, 271, 1617, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 13, 5215, 2897, 13, 5215, 4842, 305, 13, 13, 5215, 18116, 13, 25442, 886, 29889, 4572, 25442, 886, 703...
pyskyqremote/classes/device.py
RogerSelwyn/pyskyqremote
0
119010
"""Methods for retrieving device information.""" import json import logging from dataclasses import dataclass, field from ..const import (CURRENT_SPEED, CURRENT_TRANSPORT_STATE, CURRENT_TRANSPORT_STATUS, DEFAULT_TRANSPORT_SPEED, DEFAULT_TRANSPORT_STATE, KNOWN_COUNTRIES, ...
[ 1, 9995, 26112, 363, 5663, 15387, 4742, 2472, 1213, 15945, 13, 13, 5215, 4390, 13, 5215, 12183, 13, 3166, 848, 13203, 1053, 848, 1990, 29892, 1746, 13, 13, 3166, 6317, 3075, 1053, 313, 22484, 29450, 29918, 29903, 4162, 3352, 29892, 315,...
school/migrations/0001_initial.py
muzamilqadir786/smartchild
0
1605010
<reponame>muzamilqadir786/smartchild # -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-13 07:18 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] o...
[ 1, 529, 276, 1112, 420, 29958, 2589, 29920, 1344, 29939, 328, 381, 29955, 29947, 29953, 29914, 3844, 442, 5145, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3251, 630, 491, 15337, 29871, 2...
archieve/2020/day3b.py
jabra98/aoc
0
107429
<reponame>jabra98/aoc<gh_stars>0 def main(): grid = open("data.txt").readlines() for i in range(0, len(grid)): grid[i] = grid[i][:-1] x_width = len(grid[i]) y_length = len(grid) ctr = 0 y_pos = 0 x_pos = 0 product = 1 for i in [[1,1], [3,1], [5,1], [7,1], [1,2]]: ...
[ 1, 529, 276, 1112, 420, 29958, 29926, 370, 336, 29929, 29947, 29914, 29874, 542, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 1753, 1667, 7295, 13, 1678, 6856, 353, 1722, 703, 1272, 29889, 3945, 2564, 949, 9012, 580, 13, 13, 1678, ...
daisy/convenience.py
rhoadesScholar/daisy
0
1612953
from .cl_monitor import CLMonitor from .server import Server from .tcp import IOLooper from multiprocessing.pool import ThreadPool from multiprocessing import Event def run_blockwise(tasks): '''Schedule and run the given tasks. Args: list_of_tasks: The tasks to schedule over. ...
[ 1, 515, 869, 695, 29918, 3712, 2105, 1053, 17332, 7185, 2105, 13, 3166, 869, 2974, 1053, 5656, 13, 3166, 869, 23981, 1053, 10663, 3410, 3372, 13, 3166, 6674, 307, 985, 292, 29889, 10109, 1053, 10480, 11426, 13, 3166, 6674, 307, 985, 2...
Tools/decrypt_ulog.py
lgarciaos/Firmware
4,224
33612
#!/usr/bin/env python3 from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_OAEP from Crypto.Cipher import ChaCha20 from Crypto.Hash import SHA256 import binascii import argparse #from pathlib import Path import sys if __name__ == "__main__": parser = argparse.ArgumentParser(description="""CLI tool t...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 3166, 315, 17929, 29889, 19858, 2558, 1053, 390, 8132, 13, 3166, 315, 17929, 29889, 29907, 29875, 8096, 1053, 24457, 9295, 29896, 29918, 29949, 29909, 15488, 13, 3166, 315, 17...
packages/core/minos-microservice-common/minos/common/protocol/avro/base.py
minos-framework/minos-python
247
162959
<gh_stars>100-1000 import io from typing import ( Any, Union, ) from fastavro import ( parse_schema, reader, writer, ) from ...exceptions import ( MinosProtocolException, ) from ..abc import ( MinosBinaryProtocol, ) class MinosAvroProtocol(MinosBinaryProtocol): """Minos Avro Protocol...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29899, 29896, 29900, 29900, 29900, 13, 5215, 12013, 13, 3166, 19229, 1053, 313, 13, 1678, 3139, 29892, 13, 1678, 7761, 29892, 13, 29897, 13, 13, 3166, 5172, 485, 307, 1053, 31...
src/LASER/utils/__init__.py
BigBird01/LASER
7
93894
from .logger_util import * from .argument_types import *
[ 1, 515, 869, 21707, 29918, 4422, 1053, 334, 13, 3166, 869, 23516, 29918, 8768, 1053, 334, 13, 2 ]
rain_atten/powerlaw.py
bzohidov/TomoRain
0
156301
#------------------------------------------------------------------------------- # Name: powerlaw.py # Purpose: This is a set of power law coefficients(a,b) for the calculation of # empirical rain attenuation model A = a*R^b. #------------------------------------------------------------------------------- ...
[ 1, 396, 2683, 2683, 2683, 2683, 9072, 5634, 13, 29937, 4408, 29901, 3081, 10653, 29889, 2272, 13, 29937, 15247, 4220, 29901, 910, 338, 263, 731, 310, 3081, 4307, 16127, 29898, 29874, 29892, 29890, 29897, 363, 278, 13944, 310, 13, 29937, ...
curriculum/07_game_02_circle_clash_2_DAYS/07_game_02_circle_clash_day_1/07_02_02_circle_clash_advanced.py
google/teknowledge
31
52030
from tkinter import * # the game data for the initial game state def init(): data.playerX = 250 data.playerY = 550 data.circleX = 250 data.circleY = 0 data.gameOver = False # events updating the game data def keyPressed(event): if event.keysym == "Right" and data.playerX < 550:...
[ 1, 515, 18883, 1639, 1053, 334, 30004, 13, 30004, 13, 30004, 13, 29937, 278, 3748, 848, 363, 278, 2847, 3748, 2106, 30004, 13, 1753, 2069, 7295, 30004, 13, 1678, 848, 29889, 9106, 29990, 353, 29871, 29906, 29945, 29900, 30004, 13, 1678,...
activecampaign/admin/__init__.py
pmiguelima/django-activecampaign
1
142539
<filename>activecampaign/admin/__init__.py from .list import List from .message import Message from .campaign import Campaign
[ 1, 529, 9507, 29958, 4925, 24821, 8729, 29914, 6406, 29914, 1649, 2344, 26914, 2272, 13, 3166, 869, 1761, 1053, 2391, 13, 3166, 869, 4906, 1053, 7777, 13, 3166, 869, 24821, 8729, 1053, 7259, 8729, 13, 2 ]
python/practice/rules.py
icefoxen/lang
0
180169
# Heh, found this on a Usenet sig. reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
[ 1, 396, 940, 29882, 29892, 1476, 445, 373, 263, 501, 4881, 300, 4365, 22993, 13, 30004, 13, 17469, 29898, 2892, 921, 29892, 29891, 29901, 29916, 29974, 29891, 29892, 1958, 29898, 2892, 921, 29901, 22495, 29898, 536, 29898, 29916, 4887, 29...
Leetcode/week_6/multi_threaded_merge_sort.py
SamSamhuns/wallbreakers_projekts
1
16463
import threading def merge_sort(arr): def _merge(arr1, arr2): i, j = 0, 0 l1, l2 = len(arr1), len(arr2) arr_sorted = [0] * (l1 + l2) idx = 0 while i < l1 and j < l2: if arr1[i] < arr2[j]: arr_sorted[idx] = arr1[i] i += 1 ...
[ 1, 1053, 3244, 292, 13, 13, 13, 1753, 10366, 29918, 6605, 29898, 2749, 1125, 13, 13, 1678, 822, 903, 14634, 29898, 2749, 29896, 29892, 3948, 29906, 1125, 13, 4706, 474, 29892, 432, 353, 29871, 29900, 29892, 29871, 29900, 13, 4706, 301, ...
main.py
impressive8/Practice
197
44090
# =================================== # Import the libraries # =================================== import numpy as np from matplotlib import pylab as plt import imaging import utility import os,sys # =================================== # Which stages to run # =================================== do_add_noise = False d...
[ 1, 396, 1275, 9166, 9166, 29922, 13, 29937, 16032, 278, 9562, 13, 29937, 1275, 9166, 9166, 29922, 13, 5215, 12655, 408, 7442, 13, 3166, 22889, 1053, 282, 2904, 370, 408, 14770, 13, 5215, 6382, 292, 13, 5215, 19725, 13, 5215, 2897, 298...
src/pywriter/csv/csv_file.py
peter88213/PyWriter
1
169947
<reponame>peter88213/PyWriter """Provide a generic class for csv file import. Other csv file representations inherit from this class. Copyright (c) 2021 <NAME> For further information see https://github.com/peter88213/PyWriter Published under the MIT License (https://opensource.org/licenses/mit-license.php) ""...
[ 1, 529, 276, 1112, 420, 29958, 29886, 1308, 29947, 29947, 29906, 29896, 29941, 29914, 19737, 10507, 13, 15945, 29908, 1184, 29894, 680, 263, 10035, 770, 363, 11799, 934, 1053, 22993, 13, 30004, 13, 16107, 11799, 934, 22540, 13125, 515, 44...
lib/src/align/aligner/basic/BasicAlignerStrategy.py
thormeier-fhnw-repos/ip619bb-i4ds02-audio-text-alignment
0
169960
<reponame>thormeier-fhnw-repos/ip619bb-i4ds02-audio-text-alignment<filename>lib/src/align/aligner/basic/BasicAlignerStrategy.py from typing import List from lib.src.align.aligner.AbstractAlignerStrategy import AbstractAlignerStrategy from lib.src.align.utils.transcript_to_sentences import transcript_to_sentences from l...
[ 1, 529, 276, 1112, 420, 29958, 386, 555, 29872, 631, 29899, 29888, 3123, 29893, 29899, 276, 1066, 29914, 666, 29953, 29896, 29929, 1327, 29899, 29875, 29946, 6289, 29900, 29906, 29899, 18494, 29899, 726, 29899, 2520, 358, 29966, 9507, 29958...
imgaug/augmenters/flip.py
pAoenix/image-Augmented
1
3912
<reponame>pAoenix/image-Augmented """ Augmenters that apply mirroring/flipping operations to images. Do not import directly from this file, as the categorization is not final. Use instead :: from imgaug import augmenters as iaa and then e.g. :: seq = iaa.Sequential([ iaa.Fliplr((0.0, 1.0)), ...
[ 1, 529, 276, 1112, 420, 29958, 29886, 29909, 29877, 23534, 29914, 3027, 29899, 29909, 688, 358, 287, 13, 15945, 29908, 13, 29909, 688, 358, 414, 393, 3394, 19571, 292, 29914, 20157, 3262, 6931, 304, 4558, 29889, 13, 13, 6132, 451, 1053,...
reid_main.py
yujheli/ARN
26
61077
<reponame>yujheli/ARN<filename>reid_main.py from __future__ import print_function, division import os import numpy as np import torch import torch.nn as nn import torch.optim as optim from torchvision import datasets from torch.utils.data import DataLoader from torchvision.utils import make_grid from torchvision import...
[ 1, 529, 276, 1112, 420, 29958, 29891, 8016, 3952, 29875, 29914, 15249, 29966, 9507, 29958, 276, 333, 29918, 3396, 29889, 2272, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 29892, 8542, 13, 5215, 2897, 13, 5215, 12655, 408, ...
scripts/libfranka_gui_gripper_run.py
nbfigueroa/franka_interactive_controllers
6
8052
#!/usr/bin/env python3 import shlex from tkinter import * from tkinter import messagebox from psutil import Popen top = Tk() top.title("Franka Gripper Control") top.geometry("300x75") def open(): node_process = Popen(shlex.split('rosrun franka_interactive_controllers libfranka_gripper_run 1')) messagebox.showinfo...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 5215, 528, 2506, 13, 3166, 18883, 1639, 1053, 334, 13, 3166, 18883, 1639, 1053, 2643, 1884, 13, 3166, 6529, 4422, 1053, 349, 3150, 13, 13, 13, 3332, 353, 323, 29895, 580, 13, ...
Numpy-project/code.py
nish700/ga-learner-dsmp-repo
0
133963
# -------------- # Importing header files import numpy as np # Path of the file has been stored in variable called 'path' #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] #Code starts here data = np.genfromtxt(path, delimiter=',' ,skip_header=1) census = np.concatenate((data,np.asarray(new_recor...
[ 1, 396, 448, 9072, 29899, 13, 29937, 16032, 292, 4839, 2066, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 30004, 13, 29937, 10802, 310, 278, 934, 756, 1063, 6087, 297, 2286, 2000, 525, 2084, 29915, 30004, 13, 30004, 13, 29937, 4373, ...
usernamerules/simple.py
74wny0wl/entusergenerator
1
60751
<filename>usernamerules/simple.py def simple(user_data, with_separator=''): return [with_separator.join(user_data)]
[ 1, 529, 9507, 29958, 375, 824, 4183, 2540, 29914, 12857, 29889, 2272, 13, 1753, 2560, 29898, 1792, 29918, 1272, 29892, 411, 29918, 344, 17954, 2433, 29374, 13, 1678, 736, 518, 2541, 29918, 344, 17954, 29889, 7122, 29898, 1792, 29918, 1272...
pylinex/basis/GramSchmidtBasis.py
CU-NESS/pylinex
0
159564
<gh_stars>0 """ File: pylinex/basis/GramSchmidtBasis.py Author: <NAME> Date: 3 Sep 2017 Description: File containing subclass of Basis which implements a set of basis vectors created through a Gram-Schmidt orthogonalization procedure. """ from __future__ import division import numpy as np fro...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 2283, 29901, 11451, 1220, 29916, 29914, 6500, 275, 29914, 29954, 2572, 4504, 19720, 9496, 275, 29889, 2272, 13, 13720, 29901, 529, 5813, 29958, 13, 2539, 29901, 29871, 2...
daemon/lib/traceroute.py
shawnduong/CyberTrace
2
40371
<reponame>shawnduong/CyberTrace import subprocess def traceroute(dest: str) -> dict: """ Trace the route to some destination IP and return a dict of intermediates. In order to prevent the daemon itself from needing to run with elevated privileges, this is primarily handled by the system's traceroute utility. """ ...
[ 1, 529, 276, 1112, 420, 29958, 845, 1450, 299, 29884, 549, 29914, 29733, 495, 11591, 13, 5215, 1014, 5014, 13, 13, 1753, 16703, 261, 2663, 29898, 7854, 29901, 851, 29897, 1599, 9657, 29901, 13, 12, 15945, 29908, 13, 12, 11591, 278, 57...
test_api.py
atifar/mini-key-value
0
26779
def test_check_sanity(client): resp = client.get('/sanity') assert resp.status_code == 200 assert 'Sanity check passed.' == resp.data.decode() # 'list collections' tests def test_get_api_root(client): resp = client.get('/', content_type='application/json') assert resp.status_code == 200 resp_d...
[ 1, 822, 1243, 29918, 3198, 29918, 28455, 537, 29898, 4645, 1125, 13, 1678, 4613, 353, 3132, 29889, 657, 11219, 28455, 537, 1495, 13, 1678, 4974, 4613, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 13, 1678, 4974, 525, 22509, ...
TSNE/clustering.py
KatherLab/Pathology_Adversarial
0
114995
<reponame>KatherLab/Pathology_Adversarial # -*- coding: utf-8 -*- """ Created on Tue Jul 13 2021 @author: dcifci """ import numpy as np import seaborn as sns import pandas as pd import matplotlib.pyplot as plt import matplotlib as mpl from sklearn.manifold import TSNE from dataclasses import dataclass from sklearn.d...
[ 1, 529, 276, 1112, 420, 29958, 29968, 1624, 28632, 29914, 2605, 3002, 29918, 3253, 874, 27521, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 373, 323, 434, 2739, 29871, 29...
src/citycode.py
masaminh/weatherapi
0
170616
"""市町村コード関係の関数群.""" from collections import namedtuple Urls = namedtuple('Urls', 'hourly') def get_cityname(code): """市町村名を取得する. Arguments: code {str} -- 市町村コード Returns: str -- 市町村名 """ if code != '01101': return None return "札幌市中央区" def get_tenkijp_urls(code): ...
[ 1, 9995, 30461, 30829, 30402, 30459, 30185, 30335, 31606, 231, 194, 133, 30199, 31606, 30354, 31829, 1213, 15945, 13, 13, 3166, 16250, 1053, 4257, 23583, 13, 13, 5983, 29879, 353, 4257, 23583, 877, 5983, 29879, 742, 525, 18721, 368, 1495,...
main.py
chillum1718/EffcientNetV2
0
3054
<filename>main.py import argparse import csv import os import torch import tqdm from torch import distributed from torch.utils import data from torchvision import datasets from torchvision import transforms from nets import nn from utils import util data_dir = os.path.join('..', 'Dataset', 'IMAGENET') def batch(im...
[ 1, 529, 9507, 29958, 3396, 29889, 2272, 13, 5215, 1852, 5510, 13, 5215, 11799, 13, 5215, 2897, 13, 13, 5215, 4842, 305, 13, 5215, 260, 29939, 18933, 13, 3166, 4842, 305, 1053, 13235, 13, 3166, 4842, 305, 29889, 13239, 1053, 848, 13, ...
test/functional/test-framework/storage_devices/disk.py
josehu07/open-cas-linux-mf
2
85835
<filename>test/functional/test-framework/storage_devices/disk.py # # Copyright(c) 2019-2020 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause-Clear # import itertools from enum import IntEnum from test_utils import disk_finder from test_utils.output import CmdException from test_utils.size import Unit from tes...
[ 1, 529, 9507, 29958, 1688, 29914, 2220, 284, 29914, 1688, 29899, 4468, 29914, 12925, 29918, 3359, 1575, 29914, 20960, 29889, 2272, 13, 29937, 13, 29937, 14187, 1266, 29898, 29883, 29897, 29871, 29906, 29900, 29896, 29929, 29899, 29906, 29900,...
Python3/0947-Most-Stones-Removed-with-Same-Row-or-Column/soln.py
wyaadarsh/LeetCode-Solutions
5
1608142
class Solution: def removeStones(self, stones): """ :type stones: List[List[int]] :rtype: int """ parent = {} def find(x): if x != parent[x]: parent[x] = find(parent[x]) return parent[x] def union(x, y): pare...
[ 1, 770, 24380, 29901, 13, 1678, 822, 3349, 855, 2873, 29898, 1311, 29892, 25702, 1125, 13, 4706, 9995, 13, 4706, 584, 1853, 25702, 29901, 2391, 29961, 1293, 29961, 524, 5262, 13, 4706, 584, 29878, 1853, 29901, 938, 13, 4706, 9995, 13, ...
clearfile.py
redcapattitide/Python
0
134225
f = open('C:/Users/Tom/Documents/Python/Bot/Receptura/Recept/Recept/bin/Release/moves_info.txt','w',encoding='UTF-8') f.close()
[ 1, 29871, 13, 29888, 353, 1722, 877, 29907, 8419, 5959, 29914, 21599, 29914, 20128, 29914, 11980, 29914, 29933, 327, 29914, 1123, 1547, 2002, 29914, 1123, 1547, 29914, 1123, 1547, 29914, 2109, 29914, 19729, 29914, 13529, 267, 29918, 3888, 2...
pgmpy/factors/base.py
Stoffle/pgmpy
0
135871
from abc import abstractmethod from pgmpy.extern.six.moves import reduce class BaseFactor(object): """ Base class for Factors. Any Factor implementation should inherit this class. """ def __init__(self, *args, **kwargs): pass @abstractmethod def is_valid_cpd(self): pass de...
[ 1, 515, 25638, 1053, 9846, 5696, 13, 13, 3166, 23822, 1526, 29891, 29889, 735, 725, 29889, 28319, 29889, 13529, 267, 1053, 10032, 13, 13, 13, 1990, 7399, 29943, 7168, 29898, 3318, 1125, 13, 1678, 9995, 13, 1678, 7399, 770, 363, 26748, ...
src/utils.py
headout/dagen-airflow
2
147251
<filename>src/utils.py __loader = None def get_template_loader(): from dagen.loader import TemplateLoader # Avoid circular imports global __loader if __loader is None: __loader = TemplateLoader() return __loader def get_managed_dags(): loader = get_template_loader() if not loader.t...
[ 1, 529, 9507, 29958, 4351, 29914, 13239, 29889, 2272, 13, 1649, 12657, 353, 6213, 13, 13, 13, 1753, 679, 29918, 6886, 29918, 12657, 7295, 13, 1678, 515, 270, 5370, 29889, 12657, 1053, 25663, 10036, 29871, 396, 319, 5405, 19308, 24802, 1...
tess_exoplanet_search/jobs.py
jbcurtin/bert-etl-tess-exoplanet-search
0
68329
from bert import binding, utils, constants @binding.follow('noop') def create_data(): work_queue, done_queue, ologger = utils.comm_binders(create_data) for idx in range(0, 100): done_queue.put({ 'idx': idx }) @binding.follow(create_data, pipeline_type=constants.PipelineType.CONCUR...
[ 1, 515, 289, 814, 1053, 9956, 29892, 3667, 29879, 29892, 17727, 13, 13, 29992, 19672, 29889, 23031, 877, 1217, 459, 1495, 13, 1753, 1653, 29918, 1272, 7295, 13, 1678, 664, 29918, 9990, 29892, 2309, 29918, 9990, 29892, 288, 21707, 353, 3...
api/beers/migrations/0031_matchfilter.py
haavardnk/Vinmonopolet-x-Untappd
0
178631
<filename>api/beers/migrations/0031_matchfilter.py<gh_stars>0 # Generated by Django 3.1.4 on 2020-12-11 07:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('beers', '0030_beer_match_manually'), ] operations = [ migrations.C...
[ 1, 529, 9507, 29958, 2754, 29914, 915, 414, 29914, 26983, 800, 29914, 29900, 29900, 29941, 29896, 29918, 4352, 4572, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896, 29...
migrations/versions/e1c435b9e9dc_.py
vipshae/todo-lister
0
20381
<reponame>vipshae/todo-lister """empty message Revision ID: e1c435b9e9dc Revises: <PASSWORD> Create Date: 2020-06-11 14:22:00.453626 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e1c435b9e9dc' down_revision = '<PASSWORD>' branch_labels = None depends_on = No...
[ 1, 529, 276, 1112, 420, 29958, 1403, 567, 2350, 29872, 29914, 29873, 8144, 29899, 29880, 1531, 13, 15945, 29908, 6310, 2643, 13, 13, 1123, 4924, 3553, 29901, 321, 29896, 29883, 29946, 29941, 29945, 29890, 29929, 29872, 29929, 13891, 13, 1...
starbursts/plots/mpl.sr_fe_5Gyr_burst.py
rcooke-ast/VICE
22
124896
import visuals import matplotlib.pyplot as plt import vice import sys def plot_sr_fe_tracks(ax): plot_track(ax, "../../simulations/sudden_5Gyr_5e9Msun", "sr", "crimson", '-') plot_track(ax, "../../simulations/sudden_5Gyr_5e9Msun", "fe", "black", ':') plot_track(ax, "../../simulations/sudden_5Gyr_5e9Msun_riaexp", "...
[ 1, 29871, 13, 5215, 7604, 29879, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 11289, 13, 5215, 10876, 13, 13, 1753, 6492, 29918, 21935, 29918, 1725, 29918, 3018, 4684, 29898, 1165, 1125, 13, 12, 5317, 29918, 11294, 29898, 1...
treebuilder/spinn_cnn/model.py
NLP-Discourse-SoochowU/cdtb_dp2018
6
134603
<reponame>NLP-Discourse-SoochowU/cdtb_dp2018 # -*- coding: utf-8 -*- """ @Author: oisc <<EMAIL>> @Date: 2018/5/4 @Description: SPINN shift reduce model Ref: <NAME>, <NAME>, <NAME>, et al. A fast unified model for parsing and sentence understanding[J]. 2016. """ from collections import deque import torch import torch.n...
[ 1, 529, 276, 1112, 420, 29958, 29940, 13208, 29899, 4205, 15775, 29899, 6295, 2878, 340, 29965, 29914, 2252, 22625, 29918, 6099, 29906, 29900, 29896, 29947, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, ...
hug/__init__.py
zhwei820/aio_hug
3
71893
<filename>hug/__init__.py """hug/__init__.py Everyone needs a hug every once in a while. Even API developers. Hug aims to make developing Python driven APIs as simple as possible, but no simpler. Hug's Design Objectives: - Make developing a Python driven API as succint as a written definition. - The framework should...
[ 1, 529, 9507, 29958, 29882, 688, 29914, 1649, 2344, 26914, 2272, 13, 15945, 29908, 29882, 688, 29914, 1649, 2344, 26914, 2272, 13, 13, 26526, 650, 4225, 263, 298, 688, 1432, 2748, 297, 263, 1550, 29889, 7753, 3450, 18777, 29889, 379, 68...
utils/hpelm/tests/unittest_elm.py
mohyunho/ENAS_ELM
187
196435
<gh_stars>100-1000 # -*- coding: utf-8 -*- """ Created on Tue Mar 15 22:04:41 2016 @author: akusok """ import os import tempfile from unittest import TestCase import numpy as np import sys from hpelm import ELM class TestCorrectness(TestCase): def test_AddNeurons_WorksWithLongType(self): if sys.version...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29899, 29896, 29900, 29900, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 373, 323, 434, 1085, 29871, 298...
dsmlbc5/eda/eda.py
tahayasindemir/dsmlbc5
13
140379
<filename>dsmlbc5/eda/eda.py<gh_stars>10-100 """EDA Modülüne hoş geldiniz. Bedava bööörek var.""" import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt def check_df(dataframe, head=5): """Hello boyöööööz""" print("##################### Shape #####################") p...
[ 1, 529, 9507, 29958, 6289, 828, 12328, 29945, 29914, 8710, 29914, 8710, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 15945, 29908, 3352, 29909, 3382, 6001, 29993, 484, 5089, 30169, 10559, ...
pyfibre/gui/pyfibre_plugin.py
franklongford/ImageCol
2
1609715
<reponame>franklongford/ImageCol<filename>pyfibre/gui/pyfibre_plugin.py from envisage.api import Plugin from envisage.ui.tasks.api import TaskFactory from traits.api import List from pyfibre.ids import TASKS, MULTI_IMAGE_FACTORIES from pyfibre.gui.pyfibre_main_task import PyFibreMainTask class PyFibreGUIPlugin(Plugi...
[ 1, 529, 276, 1112, 420, 29958, 29888, 10003, 5426, 4006, 29914, 2940, 1625, 29966, 9507, 29958, 2272, 29888, 747, 276, 29914, 23569, 29914, 2272, 29888, 747, 276, 29918, 8582, 29889, 2272, 13, 3166, 427, 1730, 482, 29889, 2754, 1053, 1858...
deprecated/code_manager/javascript_parser/pre_process_constant.py
utarsuno/quasar_source
7
188638
<filename>deprecated/code_manager/javascript_parser/pre_process_constant.py<gh_stars>1-10 # coding=utf-8 """This module, pre_process_constant.py, provides an abstraction for JS constants to pre-process.""" class PreProcessConstant(object): """Represents a constant to pre-process.""" def __init__(self, raw_line): ...
[ 1, 529, 9507, 29958, 311, 17990, 630, 29914, 401, 29918, 12847, 29914, 7729, 29918, 16680, 29914, 1457, 29918, 5014, 29918, 23362, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14137, 29922, 9420, ...
missingdata/tests/test_missingdata.py
jubyraju1979/new
13
189659
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `missingdata` package.""" from os import makedirs from os.path import join as pjoin import numpy as np import pandas as pd from missingdata.base import blackholes # from quilt.data.ResidentMario import missingno_data # collisions = missingno_data.nyc_colli...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 24376, 363, 421, 27259, 1272, 29952, 3577, 1213, 15945, 13, 13, 3166, 2897, 1053, 21...
src/artists/migrations/0003_auto_20191025_0454.py
slee981/sos-music-project
0
176428
<filename>src/artists/migrations/0003_auto_20191025_0454.py # Generated by Django 2.2.1 on 2019-10-25 04:54 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('artists', '0002_auto_20191025_0444'), ] operations = [ migrations.AlterModelTable( ...
[ 1, 529, 9507, 29958, 4351, 29914, 442, 2879, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29941, 29918, 6921, 29918, 29906, 29900, 29896, 29929, 29896, 29900, 29906, 29945, 29918, 29900, 29946, 29945, 29946, 29889, 2272, 13, 29937, 3251, 63...
game.py
Rafael705/pong-game
0
1617430
<gh_stars>0 import pygame, sys, random # ------- # CLASSES # ------- class Paddle: def __init__(self, screen, color, posX, posY, width, height): self.screen = screen self.color = color self.posX = posX self.posY = posY self.width = width self.height = height self.state = 'stopped' self.draw() def dra...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 22028, 29892, 10876, 29892, 4036, 13, 29937, 448, 22158, 13, 29937, 17332, 3289, 1660, 29903, 13, 29937, 448, 22158, 13, 1990, 349, 22352, 29901, 13, 12, 1753, 4770, 2344, 12035, ...
paraments.py
JoenHune/DQN-Meets-Atari
0
56730
<gh_stars>0 import sys import tensorflow as tf2 DEFAULT_GPU_LIST = [0, 1, 2] SCALE = 2 MEMORY_LENGTH = 1000000 STACK_LENGTH = 4 BATCH_SIZE = 64 LEARNING_RATE = 0.00025 GAMMA = 0.9 EPSILON = 1.0 EPSILON_MIN = 0.01 EPSILON_DECAY = 0.00003 GIVEN_GPU = [eval(sys.argv[1])] if len(sys.argv) > 1 else DEFAULT_GPU_LIST ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 5215, 10876, 13, 5215, 26110, 408, 15886, 29906, 13, 13, 23397, 29918, 29954, 7056, 29918, 24360, 353, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29962, 13, 13, 29903, 5454...
aulaDjango/py3.5/bin/django-admin.py
tmenegaz/django
0
85931
<reponame>tmenegaz/django<gh_stars>0 #!/home/tmenegaz/Documentos/cimatec/2016.2/escolaTecnica/mundoSenai/django/aula/aulaDjango/py3.5/bin/python3.5 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
[ 1, 529, 276, 1112, 420, 29958, 29873, 1527, 387, 834, 29914, 14095, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 5184, 29914, 29873, 1527, 387, 834, 29914, 6268, 359, 29914, 29883, 6490, 29883, 29914, 29906, 29900, 29896,...
Dataset/2DGS_FD_Solver[RK4].py
paulpuren/PhySR
6
177463
import torch import torch.nn as nn import numpy as np import scipy.io as scio import os import matplotlib.pyplot as plt os.environ['CUDA_VISIBLE_DEVICES'] = '0' torch.manual_seed(1) np.random.seed(1) lapl_op = [[[[ 0, 0, -1/12, 0, 0], [ 0, 0, 4/3, 0, 0], [-1/12, 4/3...
[ 1, 1053, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 12655, 408, 7442, 13, 5215, 4560, 2272, 29889, 601, 408, 269, 3934, 13, 5215, 2897, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 359, 29889, ...
vagrant/tournament/tournament.py
sxw031/fullstack-nanodegree-vm
0
1611187
#!/usr/bin/env python # # tournament.py -- implementation of a Swiss-system tournament # # A Swiss-System tournament is a kind of game or sports tournament in which players # are not eliminated when they are lose a match, but are paired in each round with opponents # having approximately the same win-loss record. im...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 29871, 13, 29937, 14743, 29889, 2272, 1192, 5314, 310, 263, 26182, 29899, 5205, 14743, 13, 29937, 13, 29937, 319, 26182, 29899, 3924, 14743, 338, 263, 2924, 310, 3748, 470, 14717,...
pepys_import/file/highlighter/support/export.py
debrief/pepys-import
4
30001
import html from tqdm import tqdm from .color_picker import color_for, html_color_for, mean_color_for def export_report(filename, chars, dict_colors, include_key=False): """ Export a HTML report showing all the extraction usages for the file. :param filename: Output filename :param chars: Character...
[ 1, 1053, 3472, 13, 13, 3166, 260, 29939, 18933, 1053, 260, 29939, 18933, 13, 13, 3166, 869, 2780, 29918, 13908, 1053, 2927, 29918, 1454, 29892, 3472, 29918, 2780, 29918, 1454, 29892, 2099, 29918, 2780, 29918, 1454, 13, 13, 13, 1753, 560...
app/routers/openstack/sizes.py
skyworkflows/swm-cloud-gate
3
46341
<reponame>skyworkflows/swm-cloud-gate import typing from fastapi import APIRouter, Header from .connector import OpenStackConnector from .models import convert_to_flavor CONNECTOR = OpenStackConnector() ROUTER = APIRouter() @ROUTER.get("/openstack/flavors") async def list_flavors(username: str = Header(None), pass...
[ 1, 529, 276, 1112, 420, 29958, 7912, 1287, 1731, 29879, 29914, 2774, 29885, 29899, 9274, 29899, 17062, 13, 5215, 19229, 13, 13, 3166, 5172, 2754, 1053, 3450, 23971, 29892, 19345, 13, 13, 3166, 869, 11958, 2801, 1053, 4673, 7264, 20971, ...
state/state_example_01.py
brandaoplaster/learning-design-patterns-in-python
0
1601781
from __future__ import annotations from abc import ABC, abstractmethod class Order: """ Context """ def __init__(self) -> None: self.state: OrderState = PaymentPending(self) def pending(self) -> None: print("Trying to pending()") self.state.pending() print("Current state ~>", self.state) pr...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 25495, 13, 3166, 25638, 1053, 16417, 29892, 9846, 5696, 13, 13, 1990, 8170, 29901, 13, 29871, 9995, 15228, 9995, 13, 13, 29871, 822, 4770, 2344, 12035, 1311, 29897, 1599, 6213, 29901, 13, 1678, 158...
data_structures/stacks_and_queues/stack/node.py
michaelsklepowich/data_structures_and_algorithms
0
125455
class Node: def __init__(self, value, _next=None): self._value = value self._next = _next def __str__(self): return f'{self._value}' def __repr__(self): return f'<Node | Val: {self._value} | Next: {self._next}>'
[ 1, 770, 9071, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 995, 29892, 903, 4622, 29922, 8516, 1125, 13, 4706, 1583, 3032, 1767, 353, 995, 13, 4706, 1583, 3032, 4622, 353, 903, 4622, 13, 13, 1678, 822, 4770, 710, 12035, 1311,...
01_Diag_Dispersion_Bicis.py
JosefinaMedina/Deep-Learning-2021-P1
0
91804
<gh_stars>0 import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import os import chardet os.chdir('../Datos//') nomArch = 'SeoulBikeData.csv' with open(nomArch, 'rb') as f: result = chardet.detect(f.read()) df= pd.read_csv(nomArch, encoding=result['encoding']) print(df.dtypes...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 30004, 13, 5215, 11701, 408, 10518, 30004, 13, 5215, 409, 370, 1398, 408, 269, 1983, 30004, 13, 5215, 2897, 30004, 13, 5215, 521, 538, 300, ...
IoT/presentation/plots/step_plot.py
Mohitsharma44/CUSP-GX-6004-C
5
53208
import matplotlib.pyplot as plt import numpy as np plt.style.use('seaborn-darkgrid') x = range(8) y = np.linspace(1.1, 5.0, 8) ylabel = map(lambda num: bin(num)[2:], x) xlabel = map(lambda num: "{0:.2f}".format(num), y) plt.step(x, y) plt.yticks(y, ylabel) plt.xticks(x, xlabel, rotation=45) plt.ylabel("Binary Output...
[ 1, 1053, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 12655, 408, 7442, 13, 572, 29873, 29889, 3293, 29889, 1509, 877, 344, 370, 1398, 29899, 26031, 7720, 1495, 13, 13, 29916, 353, 3464, 29898, 29947, 29897, 13, 29891, 353, 7442, 298...
robot-server/tests/service/json_api/test_response.py
mrod0101/opentrons
0
2129
<filename>robot-server/tests/service/json_api/test_response.py from pytest import raises from pydantic import ValidationError from robot_server.service.json_api.response import ( ResponseDataModel, ResponseModel, MultiResponseModel, ) from tests.service.helpers import ItemResponseModel def test_attribute...
[ 1, 529, 9507, 29958, 307, 7451, 29899, 2974, 29914, 21150, 29914, 5509, 29914, 3126, 29918, 2754, 29914, 1688, 29918, 5327, 29889, 2272, 13, 3166, 11451, 1688, 1053, 1153, 4637, 13, 3166, 282, 2941, 7716, 1053, 15758, 362, 2392, 13, 13, ...
WorkingExamples/MNIST_Worker.py
iansee/FYP
0
1617385
import tensorflow as tf import h5py import collections import six from syft.workers.websocket_server import WebsocketServerWorker import torch import sys import syft import sys import argparse from torchvision import datasets from torchvision import transforms import numpy as np import tensorflow_federated as tff im...
[ 1, 29871, 13, 5215, 26110, 408, 15886, 13, 5215, 298, 29945, 2272, 13, 5215, 16250, 13, 5215, 4832, 13, 13, 3166, 9878, 615, 29889, 1287, 414, 29889, 2676, 11514, 29918, 2974, 1053, 2563, 11514, 6004, 16164, 13, 5215, 4842, 305, 13, 5...
ui/controller/user_handler.py
ctwardy/sitehound
0
65811
from ui import app, Singleton import json from dao.JsonDatetimeEncoder import MyEncoder from ui import app from flask import Response, request, jsonify from utils.json_encoder import JSONEncoder from flask_login import login_required from flask_security import roles_required, utils from mongoengine import NotUnique...
[ 1, 29871, 13, 3166, 14313, 1053, 623, 29892, 6106, 11285, 13, 13, 13, 5215, 4390, 13, 13, 3166, 1146, 29877, 29889, 8148, 16390, 5410, 8566, 6119, 1053, 1619, 8566, 6119, 13, 3166, 14313, 1053, 623, 13, 3166, 29784, 1053, 13291, 29892, ...
scripts/python/lib/bmc.py
purushammi/power-up
0
75435
<filename>scripts/python/lib/bmc.py #!/usr/bin/env python3 # Copyright 2019 IBM Corp. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/li...
[ 1, 529, 9507, 29958, 16713, 29914, 4691, 29914, 1982, 29914, 5838, 29883, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29929, 27955, 2994, 29886, 29889, 13, ...
backend/base/urls/order_urls.py
danylott/sale-rent-real-estate-platform
0
155565
from django.urls import path from base.views import order_views as views urlpatterns = [ path("", views.get_orders, name="orders"), path("add/", views.add_order_items, name="orders-add"), path("myorders/", views.get_my_orders, name="myorders"), path("<str:pk>/", views.get_order_by_id, name="user-order...
[ 1, 515, 9557, 29889, 26045, 1053, 2224, 13, 13, 3166, 2967, 29889, 7406, 1053, 1797, 29918, 7406, 408, 8386, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, 2224, 703, 613, 8386, 29889, 657, 29918, 20488, 29892, 1024, 543, 20488, 4968, ...
value_based_1.py
frankfangy/gridlab
0
32200
<reponame>frankfangy/gridlab # -*- coding: utf-8 -*- ''' 这个来源于 udacity 的讲座 验证基础的概念和算法 ''' from grid_world import * import sys #from PyQt5.QtCore import QPoint, QRect, QSize, Qt #from PyQt5.QtGui import (QBrush, QPainter, QColor, QPen ) #from PyQt5.QtWidgets import (QApplication, QPushButton, QCheckB...
[ 1, 529, 276, 1112, 420, 29958, 29888, 10003, 11363, 29891, 29914, 7720, 8205, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 6756, 13, 12008, 30004, 13, 30810, 30502, 30805, 31193, 30909, 11430, 5946, 29...
BasicConcepts/SyntaxErrors/Volume1_Chapter6_SyntaxErrors_Fixed.py
jpike/PythonProgrammingForKids
0
37565
# Commenting syntax errors. print("Printing out a message!") # This is a comment. floating_point_number = 1.5 * 2.7
[ 1, 396, 461, 292, 5877, 4436, 29889, 13, 2158, 703, 11816, 292, 714, 263, 2643, 29991, 1159, 29871, 396, 910, 338, 263, 3440, 29889, 13, 29888, 417, 1218, 29918, 3149, 29918, 4537, 353, 29871, 29896, 29889, 29945, 334, 29871, 29906, 298...
knox/serializers.py
liradb2000/django-rest-knox
0
177945
from django.contrib.auth import get_user_model from rest_framework import serializers from knox.models import AuthToken User = get_user_model() username_field = User.USERNAME_FIELD if hasattr(User, 'USERNAME_FIELD') else 'username' class UserSerializer(serializers.ModelSerializer): class Meta: model = Us...
[ 1, 515, 9557, 29889, 21570, 29889, 5150, 1053, 679, 29918, 1792, 29918, 4299, 13, 3166, 1791, 29918, 4468, 1053, 7797, 19427, 13, 3166, 889, 2251, 29889, 9794, 1053, 13189, 6066, 13, 2659, 353, 679, 29918, 1792, 29918, 4299, 580, 13, 13...
src/rgw/setup/rgw.py
Seagate/cortx-rgw-integration
2
91089
#!/usr/bin/python3 # Copyright (c) 2022 Seagate Technology LLC and/or its Affiliates # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 13, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29906, 922, 351, 403, 17968, 365, 12182, 322, 29914, 272, 967, 13737, 2638, 1078, 13, 29937, 910, 1824, 338, 3889,...
appiumbase/fixtures/page_utils.py
Pawan7593/AppiumBase
0
177243
<reponame>Pawan7593/AppiumBase<gh_stars>0 def is_xpath_selector(selector): """ A basic method to determine if a selector is an xpath selector. """ if ( selector.startswith("/") or selector.startswith("./") or selector.startswith("(") ): return True ret...
[ 1, 529, 276, 1112, 420, 29958, 29925, 1450, 273, 29955, 29945, 29929, 29941, 29914, 2052, 1974, 5160, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 1753, 338, 29918, 23635, 29918, 14357, 29898, 14357, 1125, 13, 1678, 9995, 13, 1678, 3...
tests/587/test_interface.py
CSUN-COMP587-F18/keras
0
79783
<reponame>CSUN-COMP587-F18/keras<gh_stars>0 from __future__ import print_function import pytest from keras.preprocessing import sequence from keras.models import Sequential from keras.layers import Dense, Dropout, Activation from keras.layers import Embedding from keras.layers import Conv1D, GlobalMaxPooling1D from k...
[ 1, 529, 276, 1112, 420, 29958, 9295, 3904, 29899, 21514, 29945, 29947, 29955, 29899, 29943, 29896, 29947, 29914, 3946, 294, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, ...
mall_spider/utils/session_id_generator.py
524243642/taobao_spider
12
116616
# coding: utf-8 from abc import ABCMeta, abstractmethod class SessionIdGenerator(object): __metaclass__ = ABCMeta @abstractmethod def generate_id(self, session): pass
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 3166, 25638, 1053, 16417, 19346, 29892, 9846, 5696, 13, 13, 13, 1990, 16441, 1204, 21575, 29898, 3318, 1125, 13, 1678, 4770, 2527, 562, 605, 1649, 353, 16417, 19346, 13, 13, 1678, 732, 1659...
conduit/transforms/fixmatch.py
wearepal/conduit
0
199000
from dataclasses import dataclass from typing import Callable, Generic, List, Optional, TypeVar, Union from PIL import Image import numpy as np from ranzen.decorators import implements from ranzen.misc import gcopy from torch import Tensor from typing_extensions import Self from conduit.data.datasets.utils import Ima...
[ 1, 515, 848, 13203, 1053, 848, 1990, 13, 3166, 19229, 1053, 8251, 519, 29892, 3251, 293, 29892, 2391, 29892, 28379, 29892, 5167, 9037, 29892, 7761, 13, 13, 3166, 349, 6227, 1053, 7084, 13, 5215, 12655, 408, 7442, 13, 3166, 6350, 2256, ...
scripts/SV_modules/BioNanoDuplications.py
wongkarenhy/Full-Genome-Analysis-Pipeline
2
159776
<gh_stars>1-10 #!/usr/bin/env python3.6 import pandas as pd import os import pyranges as pr from pyranges import PyRanges from io import StringIO import numpy as np import argparse from .BioNanoDeletions import reciprocal_overlap, checkRefOverlap, checkParentsOverlap, exonOverlap, overlap_length def readsmapDup(inpu...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 29889, 29953, 13, 13, 5215, 11701, 408, 10518, 13, 5215, 2897, 13, 5215, 282, 4316, 6916, 408, 544, 13, 3...
tests/integration/Containers.py
adnrs96/runtime
0
10448
# -*- coding: utf-8 -*- from storyruntime.Containers import Containers from storyruntime.constants.ServiceConstants import ServiceConstants import storyscript def test_containers_format_command(story): """ Ensures a simple resolve can be performed """ story_text = 'alpine echo msg:"foo"\n' story....
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 5828, 15634, 29889, 1323, 475, 414, 1053, 2866, 475, 414, 13, 3166, 5828, 15634, 29889, 3075, 1934, 29889, 3170, 26570, 1053, 6692, 26570, 13, 13, ...
photos/models.py
eude313/vault
0
2801
from django.db import models from cloudinary.models import CloudinaryField # Create your models here. class Category(models.Model): name = models.CharField( max_length=200, null=False, blank=False ) def __str__(self): return self.name class Photo(models.Model): category = models.ForeignKey(...
[ 1, 515, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9570, 3821, 29889, 9794, 1053, 14293, 3821, 3073, 13, 13, 29937, 6204, 596, 4733, 1244, 29889, 13, 13, 1990, 17943, 29898, 9794, 29889, 3195, 1125, 13, 1678, 1024, 353, 4733, 29889, 27890...
core/tests/test_polyflow/test_workflows/test_hyperband.py
erexer/polyaxon
0
8286
<reponame>erexer/polyaxon #!/usr/bin/python # # Copyright 2018-2020 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
[ 1, 529, 276, 1112, 420, 29958, 406, 29916, 261, 29914, 22678, 1165, 265, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 29937, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29947, 29899, 29906, 29900, 29906, 29900, 21755, 1165,...
Day 4/D4.py
avidiotic/advent-of-code
0
186805
<reponame>avidiotic/advent-of-code import re from collections import defaultdict input_file = open('Puzzle4_input.txt','r') data = input_file.read().split('\n') data.sort() entry = [(list(map(int,re.findall(r'\d+',line))), re.findall(r'[a-zA-Z].+',line)) for line in data] log_gt = defaultdict(int) log_g = defaultdic...
[ 1, 529, 276, 1112, 420, 29958, 485, 8819, 13574, 29914, 328, 794, 29899, 974, 29899, 401, 13, 5215, 337, 13, 3166, 16250, 1053, 2322, 8977, 13, 13, 2080, 29918, 1445, 353, 1722, 877, 29925, 18813, 280, 29946, 29918, 2080, 29889, 3945, ...
src/fresnel/f_ratio.py
JonNRb/physics506
0
52192
<gh_stars>0 txt = None with open('f_data.txt') as f: txt = f.read() lines = [i for i in txt.split('\n') if i] data = [[int(i.strip()) for i in j.split('\t')] for j in lines] import math d2r = lambda ang: ang * math.pi / 180 ratio = lambda ang_2, ang_1: math.sin(d2r(ang_1)) / math.sin(d2r(ang_2)) for point in da...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3945, 353, 6213, 13, 2541, 1722, 877, 29888, 29918, 1272, 29889, 3945, 1495, 408, 285, 29901, 13, 29871, 13872, 353, 285, 29889, 949, 580, 13, 13, 9012, 353, 518, 29875, 363, 474, 297...
ofspy/interSatelliteLink.py
ehsanfar/ofspy_v2
0
138010
""" Copyright 2015 <NAME>, Massachusetts Institute of Technology 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...
[ 1, 9995, 13, 11882, 1266, 29871, 29906, 29900, 29896, 29945, 529, 5813, 10202, 16167, 8907, 310, 17968, 13, 13, 29931, 293, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, ...
pytils/clock.py
d33jiang/pytils
0
28441
import functools import heapq import logging from collections import deque from threading import Condition, RLock from typing import Any, Callable, List, NamedTuple, Optional from pytils.mixins import DaemonHandler from ._config.time import DEFAULT_TIME_SUPPLIER, TimeSupplier, TimeType, ZERO_DURATION __all__ = [ ...
[ 1, 1053, 2090, 312, 8789, 13, 5215, 16947, 29939, 13, 5215, 12183, 13, 3166, 16250, 1053, 316, 802, 13, 3166, 3244, 292, 1053, 11790, 654, 29892, 390, 16542, 13, 3166, 19229, 1053, 3139, 29892, 8251, 519, 29892, 2391, 29892, 405, 2795, ...
pyjq/__init__.py
spraakbanken/pyjq
0
192198
<gh_stars>0 from .cli import cli
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 3166, 869, 11303, 1053, 9335, 13, 2 ]
splicing_annotations/countSupportingReads.py
stevenxchen/splicing-modulators
0
154382
<filename>splicing_annotations/countSupportingReads.py #Junction counter adapted from rMATS "process unique sam" ### import necessary libraries import re,os,sys,logging,time,datetime,commands,argparse; import scipy,math,pickle,pysam; from scipy import stats; def listToString(x): rVal = ''; for a in x: ...
[ 1, 529, 9507, 29958, 1028, 506, 292, 29918, 6735, 800, 29914, 2798, 14039, 292, 6359, 29879, 29889, 2272, 13, 29937, 29967, 651, 6795, 23430, 515, 364, 29924, 1299, 29903, 376, 5014, 5412, 3514, 19451, 13, 30004, 13, 2277, 29937, 1053, ...
util.py
asahi417/VAE
9
74889
import logging import os import numpy as np import tensorflow as tf import sys def create_log(name): """Logging.""" if os.path.exists(name): os.remove(name) logger = logging.getLogger(name) logger.setLevel(logging.DEBUG) # handler for logger file handler1 = logging.FileHandler(name) ...
[ 1, 1053, 12183, 13, 5215, 2897, 13, 5215, 12655, 408, 7442, 13, 5215, 26110, 408, 15886, 13, 5215, 10876, 13, 13, 13, 1753, 1653, 29918, 1188, 29898, 978, 1125, 13, 1678, 9995, 3403, 3460, 1213, 15945, 13, 1678, 565, 2897, 29889, 2084...
data/pandas.py
sean-liang/crypto-quant-toolkit
0
1600481
<gh_stars>0 def with_dataframe(df, method, **kwargs): """ 包装pandas的dataframe方法为pipeline形式 """ func = getattr(df, method) new_df = func(**kwargs) return df if new_df is None or ('inplace' in kwargs and kwargs['inplace']) else new_df
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 1753, 411, 29918, 1272, 2557, 29898, 2176, 29892, 1158, 29892, 3579, 19290, 1125, 13, 1678, 9995, 13, 268, 31473, 31905, 15112, 30210, 1272, 2557, 30525, 30545, 30573, 13096, 5570, 31305, ...
lib/googlecloudsdk/command_lib/compute/os_config/declarative.py
google-cloud-sdk-unofficial/google-cloud-sdk
2
187558
<filename>lib/googlecloudsdk/command_lib/compute/os_config/declarative.py # -*- coding: utf-8 -*- # # Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lice...
[ 1, 529, 9507, 29958, 1982, 29914, 3608, 9274, 15348, 29914, 6519, 29918, 1982, 29914, 26017, 29914, 359, 29918, 2917, 29914, 311, 16544, 1230, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, ...
augment.py
MohamedHeshamMustafa/Brain-Tumor-Automatic-Detection-and-Segmentation-
0
121498
from __future__ import absolute_import, print_function import numpy as np import sys import tensorflow as tf from util.data_loader import * from util.data_aug import * from util.parse_config import parse_config def test(config_file): # 1, load configure file config = parse_config(config_file) config_data = config['...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 29892, 1596, 29918, 2220, 13, 5215, 12655, 408, 7442, 13, 5215, 10876, 13, 5215, 26110, 408, 15886, 13, 3166, 3667, 29889, 1272, 29918, 12657, 1053, 334, 13, 3166, 3667, 29889, 1...
cio/plugins/txt.py
beshrkayali/content-io
6
4298
<reponame>beshrkayali/content-io # coding=utf-8 from __future__ import unicode_literals from .base import BasePlugin class TextPlugin(BasePlugin): ext = 'txt'
[ 1, 529, 276, 1112, 420, 29958, 5707, 1092, 29895, 388, 2606, 29914, 3051, 29899, 601, 13, 29937, 14137, 29922, 9420, 29899, 29947, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 869, 3188, 1053, 7399, ...
HMQ/datasets/auto_augmentation_transform.py
UniSerj/ai-research
46
167742
import random from PIL import ImageOps, ImageEnhance, ImageFilter, Image import torchvision.transforms as transforms PARAMETER_MAX = 10 # What is the max 'level' a transform could be predicted def int_parameter(level, maxval) -> int: """ A function to scale between zero to max val with casting to int :p...
[ 1, 1053, 4036, 13, 3166, 349, 6227, 1053, 7084, 29949, 567, 29892, 7084, 2369, 29882, 749, 29892, 7084, 5072, 29892, 7084, 13, 5215, 4842, 305, 4924, 29889, 9067, 29879, 408, 4327, 29879, 13, 13, 16320, 25797, 4945, 29918, 12648, 353, 2...
backend/course/views.py
thangplum/nova-cs322
0
116790
<filename>backend/course/views.py from rest_framework import viewsets, status from rest_framework.response import Response from django.shortcuts import get_object_or_404 from .serializers import courseSerializer, courseSerializer2 from .models import course class CourseViewSet(viewsets.ViewSet): def list(self, re...
[ 1, 529, 9507, 29958, 27852, 29914, 15775, 29914, 7406, 29889, 2272, 13, 3166, 1791, 29918, 4468, 1053, 1776, 7224, 29892, 4660, 13, 3166, 1791, 29918, 4468, 29889, 5327, 1053, 13291, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 679, 2...
wxPython/wxGlade-0.9.1/tests/testsupport_new.py
DarkShadow4/python
0
44240
""" @copyright: 2012-2016 <NAME> (as file __init__.py) @copyright: 2016-2018 <NAME> @license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY """ import os, sys sys.path.insert(1, os.path.dirname(sys.path[0])) import errno, fnmatch, glob, shutil, re import unittest, difflib, logging, imp import gettext...
[ 1, 29871, 13, 15945, 29908, 13, 29992, 8552, 1266, 29901, 29871, 29906, 29900, 29896, 29906, 29899, 29906, 29900, 29896, 29953, 529, 5813, 29958, 313, 294, 934, 4770, 2344, 26914, 2272, 29897, 13, 29992, 8552, 1266, 29901, 29871, 29906, 299...
src/tools/rut5_finetuning.py
JetBrains-Research/relevant-tasks-search
1
168760
<filename>src/tools/rut5_finetuning.py<gh_stars>1-10 import os from argparse import ArgumentParser import numpy as np import pandas as pd from transformers import ( AutoTokenizer, AutoModelForSeq2SeqLM, DataCollatorForSeq2Seq, Seq2SeqTrainingArguments, Seq2SeqTrainer, ) from datasets import Dataset...
[ 1, 529, 9507, 29958, 4351, 29914, 8504, 29914, 23798, 29945, 29918, 4951, 300, 27964, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 2897, 13, 3166, 1852, 5510, 1053, 23125, 11726, 13, 13, 5215, ...
Two pointers/26. Remove Duplicates from Sorted Array.py
ParisMineur/LeetCode-note
0
40410
class Solution: def removeDuplicates(self, nums: List[int]) -> int: l = len(nums) if l == 1: return 1 index = 1 num = nums[0] for i in range(1, l): if nums[i] == num: continue num = nums[i]...
[ 1, 770, 24380, 29901, 13, 1678, 822, 3349, 29928, 786, 15815, 29898, 1311, 29892, 954, 29879, 29901, 2391, 29961, 524, 2314, 1599, 938, 29901, 13, 4706, 301, 353, 7431, 29898, 1949, 29879, 29897, 13, 4706, 565, 301, 1275, 29871, 29896, ...
Lesson2_Functions/8-return.py
StyvenSoft/degree-python
0
30229
<filename>Lesson2_Functions/8-return.py def divide_by_four(input_number): return input_number/4 result = divide_by_four(16) # result now holds 4 print("16 divided by 4 is " + str(result) + "!") result2 = divide_by_four(result) print(str(result) + " divided by 4 is " + str(result2) + "!") def calculate_age(curren...
[ 1, 529, 9507, 29958, 29931, 404, 265, 29906, 29918, 6678, 29879, 29914, 29947, 29899, 2457, 29889, 2272, 13, 1753, 16429, 29918, 1609, 29918, 17823, 29898, 2080, 29918, 4537, 1125, 13, 29871, 736, 1881, 29918, 4537, 29914, 29946, 13, 259, ...
bauble/routes/auth.py
Bauble/bauble.api
0
120367
<reponame>Bauble/bauble.api<filename>bauble/routes/auth.py """ All routes in Bauble use HTTP basic auth. """ from datetime import datetime, timedelta import os import smtplib import bottle from bottle import request import sqlalchemy as sa import bauble import bauble.config as config import bauble.db as db import ba...
[ 1, 529, 276, 1112, 420, 29958, 29933, 29874, 431, 280, 29914, 2291, 431, 280, 29889, 2754, 29966, 9507, 29958, 2291, 431, 280, 29914, 27894, 29914, 5150, 29889, 2272, 13, 15945, 29908, 13, 3596, 12049, 297, 6000, 431, 280, 671, 7331, 69...
bin/make_expmap.py
sjtuzyk/chandra-acis-analysis
3
110917
<filename>bin/make_expmap.py<gh_stars>1-10 #!/usr/bin/env python3 # # Copyright (c) 2017 <NAME> <<EMAIL>> # MIT license """ Create the spectral-weighted exposure map, which will be used to produce the exposure-corrected images and to extract the surface brightness profiles. NOTE ---- We do not use the CIAO tool ``flu...
[ 1, 529, 9507, 29958, 2109, 29914, 5675, 29918, 4548, 1958, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 13, 29937, 14187, 1266, 313...
protos/control_pb2_grpc.py
uni-tue-kn/p4-ipsec
13
169849
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import control_pb2 as control__pb2 class ControlStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ ...
[ 1, 396, 3251, 630, 491, 278, 330, 29934, 9026, 5132, 9608, 6516, 7079, 29889, 11662, 6058, 11488, 29991, 13, 5215, 867, 6739, 13, 13, 5215, 2761, 29918, 24381, 29906, 408, 2761, 1649, 24381, 29906, 13, 13, 13, 1990, 11264, 855, 431, 2...
v7/mediawiki/mediawiki.py
hardening/nikola-plugins
0
139157
# -*- coding: utf-8 -*- # Copyright © 2015 <NAME> and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the # Software without restriction, including without limitation # the rights to use, copy, ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 14187, 1266, 29871, 30211, 29871, 29906, 29900, 29896, 29945, 529, 5813, 29958, 322, 4045, 29889, 13, 13, 29937, 20894, 2333, 338, 1244, 1609, ...
src/mobu/autostart.py
lsst-sqre/sciencemonkey
0
176381
<reponame>lsst-sqre/sciencemonkey """Support for automatically starting flocks.""" from __future__ import annotations import yaml from .config import config from .dependencies.manager import monkey_business_manager from .models.flock import FlockConfig async def autostart() -> None: """Automatically start conf...
[ 1, 529, 276, 1112, 420, 29958, 3137, 303, 29899, 3044, 276, 29914, 26167, 3977, 9857, 1989, 13, 15945, 29908, 14039, 363, 6336, 6257, 285, 908, 29879, 1213, 15945, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 13, 5215, 343, ...
edx/config/lms/docker_run.py
openfun/learning-analytics-playground
1
16741
""" This is the default template for our main set of servers. This does NOT cover the content machines, which use content.py Common traits: * Use memcached, and cache-backed sessions * Use a MySQL 5.1 database """ # We intentionally define lots of variables that aren't used, and # want to import all variables from ba...
[ 1, 9995, 13, 4013, 338, 278, 2322, 4472, 363, 1749, 1667, 731, 310, 12424, 29889, 910, 947, 6058, 13, 11911, 278, 2793, 14884, 29892, 607, 671, 2793, 29889, 2272, 13, 13, 18877, 1020, 1169, 29901, 13, 29930, 4803, 2626, 29883, 3791, 2...
catkin_ws/src/o2as_routines/scripts/kitting.py
DevwratJoshi/ur-o2as
0
1615468
#!/usr/bin/env python import sys import copy import rospy import geometry_msgs.msg import tf_conversions import tf from math import pi import numpy as np from collections import namedtuple from o2as_msgs.srv import * import actionlib from o2as_msgs.msg import * # from o2as_usb_relay.srv import * from graspability_est...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 10876, 13, 5215, 3509, 13, 5215, 696, 1028, 29891, 13, 5215, 16303, 29918, 1516, 3174, 29889, 7645, 13, 5215, 15886, 29918, 535, 26100, 13, 5215, 15886, 13, 3166, 5844, 1053,...
example.py
duanyytop/ckb-sdk-python
1
55675
<gh_stars>1-10 from ckb_toolkit.core.signer import sign_tx from ckb_toolkit.core.rpc import RPCClient from ckb_toolkit.core.hash import ckb_blake160 from ckb_toolkit.core.hex_coder import hex_to_bytes, hex_from_bytes from ckb_toolkit.address.address import generateShortAddress, generateFullAddress from coincurve import...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 274, 21066, 29918, 10154, 7354, 29889, 3221, 29889, 4530, 261, 1053, 1804, 29918, 7508, 13, 3166, 274, 21066, 29918, 10154, 7354, 29889, 3221, 29889, 29878, 6739,...
src/aria/aria/reading/__init__.py
tliron/aria-ng
0
143402
# # Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
[ 1, 396, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29953, 402, 4324, 5592, 3302, 8364, 11763, 19806, 29889, 2178, 10462, 21676, 29889, 13, 29937, 29871, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10...
pymars/tests/test_drg.py
kbronstein56/pyMARS
39
47179
"""Tests for drg module""" import sys import os import pkg_resources import pytest import numpy as np import networkx as nx import cantera as ct from ..sampling import data_files, InputIgnition from ..drg import graph_search, create_drg_matrix, run_drg, trim_drg, reduce_drg # Taken from http://stackoverflow.com/a/2...
[ 1, 9995, 24376, 363, 4192, 29887, 3883, 15945, 29908, 13, 13, 5215, 10876, 13, 5215, 2897, 13, 5215, 282, 9415, 29918, 13237, 13, 13, 5215, 11451, 1688, 13, 5215, 12655, 408, 7442, 13, 5215, 3564, 29916, 408, 302, 29916, 13, 5215, 508...
stagifyapi/api/migrations/0004_create_artist.py
Davee02/Stagify
0
101718
<reponame>Davee02/Stagify # Generated by Django 3.1.3 on 2020-12-10 14:25 import api.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("api", "0003_delete_old"), ] operations = [ migrations.CreateModel( name="Artist", ...
[ 1, 529, 276, 1112, 420, 29958, 29928, 1351, 29872, 29900, 29906, 29914, 855, 351, 1598, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896, 29889, 29941, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29896, 29906, 29899, 29896, 2...