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
cruzdb/sequence.py
adelq/cruzdb
82
48678
import urllib as U __all__ = ('sequence', ) def _seq_from_xml(xml): start = xml.find(">", xml.find("<DNA")) + 1 end = xml.rfind("</DNA>") return xml[start:end].replace(' ', '').replace('\n', '').strip() def sequence(db, chrom, start, end): """ return the sequence for a region using the UCSC DAS ...
[ 1, 1053, 3142, 1982, 408, 501, 13, 13, 1649, 497, 1649, 353, 6702, 16506, 742, 1723, 13, 13, 1753, 903, 11762, 29918, 3166, 29918, 3134, 29898, 3134, 1125, 13, 1678, 1369, 353, 4903, 29889, 2886, 703, 28341, 4903, 29889, 2886, 28945, ...
chapter2-5-your-code-in-multiple-servers/packer/webapp.py
andrecp/devops-fundamentals-to-k8s
0
12593
<reponame>andrecp/devops-fundamentals-to-k8s<gh_stars>0 #!/usr/bin/env python3 import json from http.server import HTTPServer, BaseHTTPRequestHandler num_requests = 0 class Handler(BaseHTTPRequestHandler): def _set_headers(self): self.send_response(200) self.send_header("Content-type", "applicatio...
[ 1, 529, 276, 1112, 420, 29958, 392, 3757, 29886, 29914, 3359, 3554, 29899, 27159, 1166, 1338, 29899, 517, 29899, 29895, 29947, 29879, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 2994...
tests/test_watcher.py
hiyongz/uiautomator2
4,493
134778
# coding: utf-8 # import uiautomator2 as u2 def test_watch_context(sess: u2.Device): with sess.watch_context(builtin=True) as ctx: ctx.when("App").click() sess(text='Menu').click() assert sess(text='Inflate from XML').wait() def teardown_function(d: u2.Device): print("Teard...
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 29937, 13, 13, 5215, 318, 423, 329, 290, 1061, 29906, 408, 318, 29906, 13, 13, 13, 1753, 1243, 29918, 12344, 29918, 4703, 29898, 29879, 404, 29901, 318, 29906, 29889, 11501, 1125, 13, 1678,...
agenda/tests/test_models.py
migueleichler/django-tdd
0
21543
<filename>agenda/tests/test_models.py from django.test import TestCase from agenda.models import Compromisso from model_mommy import mommy class CompromissoModelTest(TestCase): def setUp(self): self.instance = mommy.make('Compromisso') def test_string_representation(self): self.assertEqual(...
[ 1, 529, 9507, 29958, 351, 8395, 29914, 21150, 29914, 1688, 29918, 9794, 29889, 2272, 13, 3166, 9557, 29889, 1688, 1053, 4321, 8259, 13, 13, 3166, 946, 8395, 29889, 9794, 1053, 3831, 456, 275, 578, 13, 3166, 1904, 29918, 29885, 290, 1357...
Cas_1/C_ETA.py
Herpinemmanuel/Oceanography
1
153365
import numpy as np import matplotlib.pyplot as plt import cartopy.crs as ccrs from xmitgcm import open_mdsdataset from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER plt.ion() dir1 = '/homedata/bderembl/runmit/test_southatlgyre' ds1 = open_mdsdataset(dir1,iters='all',prefix=['Eta']) nt = 0 ...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 29871, 13, 5215, 7774, 2270, 29889, 29883, 2288, 408, 21759, 2288, 29871, 13, 13, 3166, 921, 2415, 29887, 4912, 1053, 1722, 29918, 3487, 29879, 24713, 29871, 13, ...
board/mates/backrank.py
raaahuuulll/chess-concepts
0
162910
import chess import board def is_back_rank_mate(fen, move): """ According to Wikipedia: > In chess, a back-rank checkmate (also known as the corridor mate) is a checkmate delivered by a rook or queen > along a back rank (that is, the row on which the pieces [not pawns] stand at the start of the game)...
[ 1, 1053, 521, 404, 13, 13, 5215, 7613, 13, 13, 13, 1753, 338, 29918, 1627, 29918, 10003, 29918, 25046, 29898, 11350, 29892, 4337, 1125, 13, 1678, 9995, 13, 1678, 7579, 304, 14109, 29901, 13, 1678, 1405, 512, 521, 404, 29892, 263, 1250...
standoffconverter/standoffs.py
millawell/standoffconverter
3
119132
<reponame>millawell/standoffconverter import numpy as np import json from .converters import flat_tree2position_table, flatten_tree, standoff2tree from .utils import get_order_for_traversal, create_el_from_so class Standoff: """Contains a reference to the etree.Element object and the corresponding...
[ 1, 529, 276, 1112, 420, 29958, 29885, 2911, 5872, 29914, 1689, 2696, 535, 13549, 13, 5215, 12655, 408, 7442, 13, 5215, 4390, 13, 3166, 869, 535, 369, 2153, 1053, 12151, 29918, 8336, 29906, 3283, 29918, 2371, 29892, 1652, 8606, 29918, 83...
set6/rsa_armor_server.py
adbforlife/cryptopals
0
87899
import socketserver p = 16039569229106620464524040800514429884124257515719815158247901984500687314230772373740952557793458300386707034523591862955887078885248615279630352356782248342739234012971726335390927874256196523321658767535081694857260019127316912317430419938467439526443514390709889089398059121111652224038200847...
[ 1, 1053, 9909, 2974, 13, 29886, 353, 29871, 29896, 29953, 29900, 29941, 29929, 29945, 29953, 29929, 29906, 29906, 29929, 29896, 29900, 29953, 29953, 29906, 29900, 29946, 29953, 29946, 29945, 29906, 29946, 29900, 29946, 29900, 29947, 29900, 2990...
cities_light/tests/test_import.py
jsandovalc/django-cities-light
0
6724
from __future__ import unicode_literals import glob import os from dbdiff.fixture import Fixture from .base import TestImportBase, FixtureDir from ..settings import DATA_DIR class TestImport(TestImportBase): """Load test.""" def test_single_city(self): """Load single city.""" fixture_dir = ...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 5215, 13149, 13, 5215, 2897, 13, 13, 3166, 4833, 12765, 29889, 7241, 15546, 1053, 383, 29875, 15546, 13, 3166, 869, 3188, 1053, 4321, 17518, 5160, 29892, 383, 298...
api/go/tenki/hash/hash.py
Goryudyuma/isucon5-final
0
1616125
# -*- coding: utf-8 -*- """ $ python3 hash.py --date="Tue, 27 Oct 2015 08:46:40 JST" 51498849 """ import argparse import hashlib import struct def toint(date, secret): s = date + " " + secret m = hashlib.md5(s.encode("utf-8")) d = m.digest() n = struct.unpack(">I", d[0:4])[0] return n parser = argparse.Argumen...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 13, 29938, 3017, 29941, 6608, 29889, 2272, 1192, 1256, 543, 29911, 434, 29892, 29871, 29906, 29955, 4756, 29871, 29906, 29900, 29896, 299...
setup.py
noelnamai/machine-learning
0
106306
<reponame>noelnamai/machine-learning #!/usr/bin/env python3 from setuptools import setup setup( name = "sebaba", version = "0.0.1", description = "A bare metal implementation of Machine Learning algorithms", author = "<NAME>", author_email = "<EMAIL>", url = "http://github.com/noelnamai/sebab...
[ 1, 529, 276, 1112, 420, 29958, 1217, 3478, 314, 1794, 29914, 23523, 29899, 21891, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 3166, 731, 21245, 8789, 1053, 6230, 13, 13, 14669, 29898, 13, 1678, 1024, 353, 376,...
mmdet/models/losses/uncertainty_loss.py
sanghun3819/LQM
4
94884
import torch.nn as nn import torch from ..builder import LOSSES import numpy as np from .utils import weighted_loss import torch.nn.functional as F from mmdet.core import bbox_overlaps def _gaussian_dist_pdf(val, mean, var): return torch.exp(- (val - mean) ** 2.0 / var / 2.0) / torch.sqrt(2.0 * np.pi * var) # @we...
[ 1, 1053, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 13, 3166, 6317, 16409, 1053, 365, 3267, 1660, 29903, 13, 5215, 12655, 408, 7442, 13, 3166, 869, 13239, 1053, 7688, 287, 29918, 6758, 13, 5215, 4842, 305, 29889, 1...
tests/benchmark/generate_libsvm.py
bclehmann/xgboost
23,866
66655
"""Generate synthetic data in LIBSVM format.""" import argparse import io import time import numpy as np from sklearn.datasets import make_classification from sklearn.model_selection import train_test_split RNG = np.random.RandomState(2019) def generate_data(args): """Generates the data.""" print("Generati...
[ 1, 9995, 5631, 403, 14710, 7492, 848, 297, 365, 8979, 7597, 29924, 3402, 1213, 15945, 13, 13, 5215, 1852, 5510, 13, 5215, 12013, 13, 5215, 931, 13, 13, 5215, 12655, 408, 7442, 13, 3166, 2071, 19668, 29889, 14538, 1691, 1053, 1207, 299...
olwi/hw/gpiorelay.py
molkoback/olwi
0
58932
<reponame>molkoback/olwi<filename>olwi/hw/gpiorelay.py<gh_stars>0 from olwi.relay import Relay, RelayException import gpiozero class GPIORelay(Relay): def __init__(self, pin=0): self.pin = gpiozero.DigitalOutputDevice(pin, initial_value=False) async def on(self): self.pin.on() async def off(self): self.p...
[ 1, 529, 276, 1112, 420, 29958, 29885, 28387, 711, 547, 29914, 324, 4353, 29966, 9507, 29958, 324, 4353, 29914, 26828, 29914, 29887, 29886, 1611, 295, 388, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 13386, 4353, 2...
flaskr_carved_rock/sqla.py
ron4u1998/flaskr-carved-rock
0
1609167
from flask_sqlalchemy import SQLAlchemy sqla = SQLAlchemy()
[ 1, 515, 29784, 29918, 2850, 284, 305, 6764, 1053, 3758, 2499, 305, 6764, 13, 13, 3044, 433, 353, 3758, 2499, 305, 6764, 580, 2 ]
petal/menu.py
hdmifish/petal
15
119717
<gh_stars>10-100 from asyncio import create_task, sleep, Task from collections import Counter from datetime import datetime as dt, timedelta as td from itertools import chain from typing import Dict, List, Optional, Sequence, Tuple, TypeVar from discord import abc, Embed, TextChannel, Message, Reaction, User from .ut...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 408, 948, 3934, 1053, 1653, 29918, 7662, 29892, 8709, 29892, 9330, 13, 3166, 16250, 1053, 315, 5336, 13, 3166, 12865, 1053, 12865, 408, 11636, 298...
assets/mediasite/modules/folder.py
UbiCastTeam/mediasite_client
0
1616469
<reponame>UbiCastTeam/mediasite_client<filename>assets/mediasite/modules/folder.py """ Mediasite client class for folder-sepcific actions Last modified: December 2020 By: <NAME> License: MIT - see license.txt """ import logging class folder(): def __init__(self, mediasite, *args, **kwargs): ...
[ 1, 529, 276, 1112, 420, 29958, 29965, 5365, 15738, 19409, 29914, 2168, 3173, 568, 29918, 4645, 29966, 9507, 29958, 16596, 29914, 2168, 3173, 568, 29914, 7576, 29914, 12083, 29889, 2272, 13, 15945, 19451, 13, 19302, 3173, 568, 3132, 770, 3...
setup.py
wrap-api/python-nasa
0
132642
<gh_stars>0 from typing import List, Text import nasa from setuptools import setup with open("README.md") as readme_file: readme: Text = readme_file.read() requirements: List[Text] = ["requests", "pillow"] test_requirements: List[Text] = ["requests", "pre-commit", "pillow", "wheel"] setup( name="python-nas...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 19229, 1053, 2391, 29892, 3992, 13, 5215, 8281, 29874, 13, 13, 3166, 731, 21245, 8789, 1053, 6230, 13, 13, 2541, 1722, 703, 16310, 2303, 29889, 3487, 1159, 408, 1303, 1004, 29918,...
src/python/zensols/deepnlp/transformer/vectorizers.py
plandes/deepnlp
7
133065
<gh_stars>1-10 """Contains classes that are used to vectorize documents in to transformer embeddings. """ __author__ = '<NAME>' from typing import Tuple, List, Dict from dataclasses import dataclass, field import logging from itertools import chain import torch from torch import Tensor from zensols.persist import per...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 21409, 4413, 393, 526, 1304, 304, 4608, 675, 10701, 297, 304, 4327, 261, 13, 17987, 29881, 886, 29889, 13, 13, 15945, 29908, 13, 1649, 8921, 1649, 353...
checkers/gallery/paintings.py
vient/proctf-2019
2
88317
import os import pathlib import random TEAMS_COUNT = 30 PAINTINGS_DIR = pathlib.Path("paintings") def next_painting(team_num): files = [] team_dir = PAINTINGS_DIR / team_num for x in team_dir.iterdir(): if x.suffix == ".jpg" and not x.stem.endswith("_replica") and not x.stem.endswith("_co...
[ 1, 1053, 2897, 13, 5215, 2224, 1982, 13, 5215, 4036, 13, 13, 4330, 29909, 4345, 29918, 18736, 353, 29871, 29941, 29900, 13, 13, 7228, 10192, 4214, 29903, 29918, 9464, 353, 2224, 1982, 29889, 2605, 703, 29886, 2365, 886, 1159, 13, 13, ...
libs/camera_cal.py
kavach-feature/Advanced_lane_finding
0
86691
<reponame>kavach-feature/Advanced_lane_finding import numpy as np import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg import glob #%matplotlib inline images= glob.glob('./camera_cal/calibration*.jpg') def cal_undistort(img, objpoints, imgpoints): gray = cv2.cvtColor(img, cv2....
[ 1, 529, 276, 1112, 420, 29958, 29895, 485, 496, 29899, 14394, 29914, 3253, 16858, 29918, 25821, 29918, 2886, 292, 13, 5215, 12655, 408, 7442, 30004, 13, 5215, 13850, 29906, 30004, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 30004, 13,...
handlers/order_request/operation_type.py
itcosplay/cryptobot
0
81642
from traceback import print_exc from aiogram import types from aiogram.dispatcher import FSMContext from loader import dp, bot from states import Request from keyboards import create_kb_coustom_main_menu from utils import get_data_to_show # from create_request.py @dp.callback_query_handler(state=Request.operation_ty...
[ 1, 515, 9637, 1627, 1053, 1596, 29918, 735, 29883, 13, 3166, 7468, 13342, 1053, 4072, 13, 3166, 7468, 13342, 29889, 13369, 261, 1053, 383, 17061, 2677, 13, 13, 3166, 23466, 1053, 270, 29886, 29892, 9225, 13, 3166, 5922, 1053, 10729, 13,...
Python3/0641-Design-Circular-Deque/soln.py
wyaadarsh/LeetCode-Solutions
5
133583
class MyCircularDeque: def __init__(self, k: int): """ Initialize your data structure here. Set the size of the deque to be k. """ self.nums = [0] * k self.k = k self.size = 0 self.front = -1 self.back = 0 def insertFront(self, value: in...
[ 1, 770, 1619, 23495, 1070, 2772, 802, 29901, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 413, 29901, 938, 1125, 13, 4706, 9995, 13, 4706, 25455, 596, 848, 3829, 1244, 29889, 3789, 278, 2159, 310, 278, 316, 802, 304, 367, 413, ...
Dataloaders/GestureDataSet.py
XLPRUtils/XLPR_Classification
2
62073
<filename>Dataloaders/GestureDataSet.py # -*- coding:utf-8 -*- import os from PIL import Image from torch.utils import data from torchvision import transforms import torch import torch.nn.functional as F from torch.autograd import Variable import numpy as np import random import matplotlib.pyplot as plt impo...
[ 1, 529, 9507, 29958, 29928, 2075, 29877, 24574, 29914, 24110, 28449, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 9420, 29899, 29947, 448, 29930, 29899, 30004, 13, 5215, 2897, 30004, 13, 3166, 349, 6227, 1053, 7084, 30004, 13, ...
src/utils/utils.py
Vnicius/ed-tsp
0
173547
<reponame>Vnicius/ed-tsp # -*- coding: utf-8 -*- import numpy as np def calculate_cost(solution): cost = 0 size_points = len(solution) for index in range(size_points): next_index = index + 1 if (index + 1) < size_points else 0 next_node = solution[next_index].key next_neighbor = ...
[ 1, 529, 276, 1112, 420, 29958, 29963, 29876, 1654, 375, 29914, 287, 29899, 29873, 1028, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 8147, 29918, 18253, ...
pando/testing/client.py
AspenWeb/pando.py
28
140495
<filename>pando/testing/client.py """ :mod:`client` ------------- """ from functools import partial from http.cookies import SimpleCookie from io import BytesIO import warnings import mimetypes from .. import Response from ..http.request import STANDARD_METHODS from ..utils import maybe_encode, typecheck from ..webs...
[ 1, 529, 9507, 29958, 29886, 1743, 29914, 13424, 29914, 4645, 29889, 2272, 13, 15945, 29908, 13, 29901, 1545, 18078, 4645, 29952, 13, 9072, 29899, 13, 15945, 29908, 13, 13, 3166, 2090, 312, 8789, 1053, 7687, 13, 3166, 1732, 29889, 15108, ...
my_utils/dicts/set_config_default_item.py
fgitmichael/SelfSupevisedSkillDiscovery
0
98978
def set_config_default_item(config: dict, key, default) -> dict: if not key in config.keys(): config[key] = default return config
[ 1, 822, 731, 29918, 2917, 29918, 4381, 29918, 667, 29898, 2917, 29901, 9657, 29892, 1820, 29892, 2322, 29897, 1599, 9657, 29901, 13, 1678, 565, 451, 1820, 297, 2295, 29889, 8149, 7295, 13, 4706, 2295, 29961, 1989, 29962, 353, 2322, 13, ...
testdata/setup.py
gjtempleton/drone-pypi
0
148206
<filename>testdata/setup.py<gh_stars>0 from setuptools import setup setup( name='drone-pypi-test', version='0.1.0', description='Testing drone-pypi publishes, no other purpose.', url='http://github.com/gjtempleton/drone-pypi', packages=['testdata/drone_pypi_test'], maintainer='<NAME>', mai...
[ 1, 529, 9507, 29958, 1688, 1272, 29914, 14669, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 731, 21245, 8789, 1053, 6230, 13, 13, 13, 14669, 29898, 13, 1678, 1024, 2433, 7707, 650, 29899, 29886, 1478, 29875, 29899,...
tests/twitter_learning_journal/builders/test_detail_builder.py
DEV3L/twitter-learning-journal
1
121157
<filename>tests/twitter_learning_journal/builders/test_detail_builder.py<gh_stars>1-10 from pytest import mark from app.twitter_learning_journal.builders.detail_builder import DetailBuilder from app.twitter_learning_journal.models.tweet import Tweet def test_detail_builder_init(): tweet = Tweet() detail_bui...
[ 1, 529, 9507, 29958, 21150, 29914, 24946, 29918, 21891, 29918, 29926, 4659, 29914, 4282, 414, 29914, 1688, 29918, 16432, 29918, 16409, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 11451, 1688, 1053...
translator/opennebula.py
5g-media/mape-translation
0
69410
<gh_stars>0 from translator.basemetric import BaseMetric from translator.exceptions import OsmInfoNotFound from translator.utils import get_vdu_details, opennebula_metrics import copy class Metric(BaseMetric): def __init__(self, raw_metric, source="opennebula"): self.source = source self.raw_metri...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 5578, 1061, 29889, 6500, 21056, 2200, 1053, 7399, 10095, 2200, 13, 3166, 5578, 1061, 29889, 11739, 29879, 1053, 438, 3844, 3401, 17413, 13, 3166, 5578, 1061, 29889, 13239, 1053, 679...
app.py
TimeaKovacs86/PraiseABook
0
84257
<reponame>TimeaKovacs86/PraiseABook import os import pymongo as pymongo from bson import ObjectId from flask import Flask, render_template, request, flash, redirect, url_for # Set environmental variables USERNAME = os.getenv("USERNAME") PASSWORD = os.getenv("PASSWORD") CLUSTER = os.getenv("CLUSTER") DB_NAME = os.gete...
[ 1, 529, 276, 1112, 420, 29958, 2481, 29874, 29968, 586, 16815, 29947, 29953, 29914, 29925, 22692, 2882, 2550, 13, 5215, 2897, 13, 13, 5215, 282, 962, 7443, 408, 282, 962, 7443, 13, 3166, 289, 1100, 1053, 4669, 1204, 13, 3166, 29784, 1...
src/clients/python/grpc_image_client.py
hsubbaraj/tensorrt-experiments
0
199009
#!/usr/bin/python # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this l...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 29892, 405, 13044, 10764, 315, 1955, 29925, 1955, 8098, 29889, 2178, 10462, 21676, 29889, 13, 29937, 13, 29937, 4367...
HITCON-Training/LAB/lab5/simplerop.py
kernweak/HITCON-Training-writeup
30
101802
#!/usr/bin/env python # -*- coding: utf-8 -*- from pwnpwnpwn import * from pwn import * host = "10.211.55.28" port = 8888 r = remote(host,port) gadget = 0x809a15d # mov dword ptr [edx], eax ; ret pop_eax_ret = 0x80bae06 pop_edx_ret = 0x806e82a pop_edx_ecx_ebx = 0x0806e850 pop_eax_ret = 0x080bae06 buf = 0x80ea060 int...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 282, 1233, 29886, 1233, 29886, 1233, 1053, 334, 13, 3166, 282, 1233, 1053, 334, 13, 13, 3069, ...
eetfestijn/urls.py
thaliawww/eetFestijn
1
113692
from django.conf.urls import include from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), path('wiebetaaltwat/', include('wiebetaaltwat.urls')), path('', include('orders.urls')), ]
[ 1, 515, 9557, 29889, 5527, 29889, 26045, 1053, 3160, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 3166, 9557, 29889, 26045, 1053, 2224, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, 2224, 877, 6406, 29914, 742, 4113, 29889, 2746, 298...
utils/file_utils.py
MasterOdin/Python-Utils
0
1606416
""" Collection of util functions that help dealing with files and directories """ from contextlib import contextmanager import os @contextmanager def pushd(directory): """ Enter a given directory for some context, then once leaving the context, go back to the original directory you were in. Operates the ...
[ 1, 9995, 13, 7196, 310, 3667, 3168, 393, 1371, 16743, 411, 2066, 322, 17525, 13, 15945, 29908, 13, 13, 3166, 3030, 1982, 1053, 3030, 12847, 13, 5215, 2897, 13, 13, 13, 29992, 4703, 12847, 13, 1753, 5503, 29881, 29898, 12322, 1125, 13,...
simplydomain/src/module_recursion.py
SimplySecurity/SimplyDomain-Old
17
18194
import multiprocessing as mp class ModuleRecursion(object): """Class to handle recursion. Simple class to handle tracking and storing prior sub-domains discovred. """ def __init__(self): """class init. """ self.recursion_queue = mp.Queue() def add_subdomain(self, domain): """add subdomain to Q. ...
[ 1, 1053, 6674, 307, 985, 292, 408, 22326, 13, 13, 13, 1990, 15591, 4789, 1295, 291, 29898, 3318, 1125, 13, 12, 15945, 29908, 2385, 304, 4386, 20437, 29889, 13, 12, 13, 12, 15427, 770, 304, 4386, 23110, 322, 15446, 7536, 29871, 13, 1...
seatsio/events/objectProperties.py
nathanielwarner/seatsio-python
2
32674
class ObjectProperties: def __init__(self, object_id, extra_data=None, ticket_type=None, quantity=None): if extra_data: self.extraData = extra_data self.objectId = object_id if ticket_type: self.ticketType = ticket_type if quantity: self.quantity =...
[ 1, 770, 4669, 11857, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1203, 29918, 333, 29892, 4805, 29918, 1272, 29922, 8516, 29892, 23381, 29918, 1853, 29922, 8516, 29892, 14728, 29922, 8516, 1125, 13, 4706, 565, 4805, 29918, 1272, ...
backend/app/app/api/api_v1/websocket/monitor.py
QQting/vue-element-admin-fastapi
0
138555
<gh_stars>0 from typing import Any, Optional from fastapi import APIRouter, Depends from sqlalchemy.orm import Session from app import models, schemas from app.api import deps from app.extensions.utils import list_to_tree from random import randint import rmt_py_wrapper import json import numpy as np import socketio i...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 19229, 1053, 3139, 29892, 28379, 13, 13, 3166, 5172, 2754, 1053, 3450, 23971, 29892, 10034, 1975, 13, 3166, 4576, 284, 305, 6764, 29889, 555, 1053, 16441, 13, 3166, 623, 1053, 473...
tests/api/tc/v2/batch/test_attributes_1.py
GShepherdTC/tcex
0
106240
"""Test the TcEx Batch Module.""" # third-party import pytest class TestAttributes: """Test the TcEx Batch Module.""" @pytest.mark.parametrize( 'name,description,attr_type,attr_value,displayed,source', [ ( 'pytest-adversary-i1-001', 'Attribute Testi...
[ 1, 9995, 3057, 278, 323, 29883, 1252, 350, 905, 15591, 1213, 15945, 13, 29937, 4654, 29899, 22633, 13, 5215, 11451, 1688, 13, 13, 13, 1990, 4321, 15801, 29901, 13, 1678, 9995, 3057, 278, 323, 29883, 1252, 350, 905, 15591, 1213, 15945, ...
dashboard/dashboard/pinpoint/models/quest/run_gtest_test.py
ncalexan/catapult
0
194535
<filename>dashboard/dashboard/pinpoint/models/quest/run_gtest_test.py # Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from dashboard.pinpoint.models.quest import run_gtest from dashboard.p...
[ 1, 529, 9507, 29958, 14592, 3377, 29914, 14592, 3377, 29914, 12687, 3149, 29914, 9794, 29914, 1119, 29914, 3389, 29918, 29887, 1688, 29918, 1688, 29889, 2272, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29947, 450, 678, 456, 1974, 1...
hash-table/Python/0349-intersection-of-two-arrays-3.py
ljyljy/LeetCode-Solution-in-Good-Style
1
151513
<gh_stars>1-10 from typing import List class Solution: def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]: num1_set = set(nums1) num2_set = set(nums2) return list(num1_set & num2_set) if __name__ == '__main__': nums1 = [4, 9, 5] nums2 = [9, 4, 9, 8, 4] s =...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 19229, 1053, 2391, 13, 13, 1990, 24380, 29901, 13, 1678, 822, 17686, 29898, 1311, 29892, 954, 29879, 29896, 29901, 2391, 29961, 524, 1402, 954, 29879, 29906, 29...
nautobot/circuits/__init__.py
psmware-ltd/nautobot
384
12847
<reponame>psmware-ltd/nautobot default_app_config = "nautobot.circuits.apps.CircuitsConfig"
[ 1, 529, 276, 1112, 420, 29958, 567, 29885, 2519, 29899, 29880, 1594, 29914, 1056, 329, 711, 327, 13, 4381, 29918, 932, 29918, 2917, 353, 376, 1056, 329, 711, 327, 29889, 6034, 19544, 29889, 13371, 29889, 23495, 19544, 3991, 29908, 13, 2...
exercises/perform_model_selection.py
noavilk/IML.HUJI
0
4403
from __future__ import annotations import numpy as np import pandas as pd from sklearn import datasets from IMLearn.metrics import mean_square_error from IMLearn.utils import split_train_test from IMLearn.model_selection import cross_validate from IMLearn.learners.regressors import PolynomialFitting, LinearRegression, ...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 25495, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 3166, 2071, 19668, 1053, 20035, 13, 3166, 306, 1988, 799, 29876, 29889, 2527, 10817, 1053, 2099, 29918, 17619, 29918, 2704, 13, 3...
useful_scripts/prepDataset.py
jessvb/3d_world_procedural_generation
7
39971
<gh_stars>1-10 import os import tensorflow as tf import random import numpy as np import matplotlib.pyplot as plt # uncomment for inline for the notebook: # %matplotlib inline import pickle # enter the directory where the training images are: TRAIN_DIR = 'train/' IMAGE_SIZE = 512 train_image_file_names = [TRAIN_DIR+i...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 2897, 13, 5215, 26110, 408, 15886, 13, 5215, 4036, 13, 5215, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 29937, 443, 9342, 363, 1058...
combination/combination_generator_process.py
leodenault/mhw_optimizer
0
149106
<filename>combination/combination_generator_process.py from multiprocessing import Process, Value from typing import List from combination.data_structures import MaxCapacityMaxHeap from combination.equipment_view import EquipmentView from scorer import Scorer DONE_MESSAGE = "combination_generation_done" class Combi...
[ 1, 529, 9507, 29958, 510, 2109, 362, 29914, 510, 2109, 362, 29918, 27959, 29918, 5014, 29889, 2272, 13, 3166, 6674, 307, 985, 292, 1053, 10554, 29892, 7865, 13, 3166, 19229, 1053, 2391, 13, 13, 3166, 10296, 29889, 1272, 29918, 4984, 197...
application/web/populate_users.py
satan1a/poopak
91
1602512
<filename>application/web/populate_users.py #!/usr/bin/python # # from werkzeug.security import generate_password_hash # from pymongo import MongoClient # from pymongo.errors import DuplicateKeyError # # # def populate_user(client, user, password): # # Connect to the DB # # collection = MongoClient()["crawler"]...
[ 1, 529, 9507, 29958, 6214, 29914, 2676, 29914, 7323, 5987, 29918, 7193, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 29937, 13, 29937, 515, 23085, 13289, 29889, 8926, 1053, 5706, 29918, 5630, 29918, 8568, 13, 29937, ...
FWCore/Integration/test/ThinningTest1_cfg.py
gputtley/cmssw
6
20475
<filename>FWCore/Integration/test/ThinningTest1_cfg.py # This process is the first step of a test that involves multiple # processing steps. It tests the thinning collections and # redirecting Refs, Ptrs, and RefToBases. # # Produce 15 thinned collections # # Collection A contains Things 0-8 # Collection B contains...
[ 1, 529, 9507, 29958, 29943, 29956, 9203, 29914, 23573, 362, 29914, 1688, 29914, 1349, 262, 1076, 3057, 29896, 29918, 16859, 29889, 2272, 13, 29937, 910, 1889, 338, 278, 937, 4331, 310, 263, 1243, 393, 20789, 2999, 13, 29937, 9068, 6576, ...
photo/views.py
alexomaset/Photo-Gallery23
0
197604
from django.shortcuts import render from django.http import HttpResponse import datetime as dt from .models import * # Create your views here. def day_photos(request): date = dt.date.today() photos = Image.objects.all() return render(request, 'day_photos.html', {"date": date,"images":photos}) def image(re...
[ 1, 515, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 13, 3166, 9557, 29889, 1124, 1053, 9056, 5103, 13, 5215, 12865, 408, 11636, 13, 3166, 869, 9794, 1053, 334, 13, 29937, 6204, 596, 8386, 1244, 29889, 13, 1753, 2462, 29918, 561, 15788,...
criterion_core/utils/tag_utils.py
criterion-ai/criterion_core
0
101318
<gh_stars>0 def find(tree, key, value): items = tree.get("children", []) if isinstance(tree, dict) else tree for item in items: if item[key] == value: yield item else: yield from find(item, key, value) def find_path(tree, key, value, path=()): items = tree.get("chil...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 1753, 1284, 29898, 8336, 29892, 1820, 29892, 995, 1125, 13, 1678, 4452, 353, 5447, 29889, 657, 703, 11991, 613, 518, 2314, 565, 338, 8758, 29898, 8336, 29892, 9657, 29897, 1683, 5447, 1...
keyring/tests/backends/test_Windows.py
EnjoyLifeFund/py36pkgs
4
137966
<reponame>EnjoyLifeFund/py36pkgs from __future__ import print_function import sys import unittest import pytest import keyring.backends.Windows from ..test_backend import BackendBasicTests @unittest.skipUnless(keyring.backends.Windows.WinVaultKeyring.viable, "Needs Windows") class WinVaultKeyringTestCase(Backe...
[ 1, 529, 276, 1112, 420, 29958, 2369, 2212, 29891, 26754, 29943, 870, 29914, 2272, 29941, 29953, 20571, 3174, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 10876, 13, 5215, 443, 27958, 13, 13, 5215, 11451, 168...
exemplos/Basico/formatando_valores.py
kalilventura/python
0
154340
""" Formatando valores: :s -> Texto (string) :d -> Inteiro (int) :f -> Números de ponto flutuante (float) :.(NUMERO)f -> Quantidade de casas decimais (float) :(CARACTERE)(> ou < ou ^)(QUANTIDADE)(TIPO - s, d ou f) > -> Esquerda < -> Direita ^ -> Centro """ num_1 = 10 num_2...
[ 1, 9995, 13, 1678, 19191, 1743, 659, 2361, 29901, 13, 268, 13, 1678, 584, 29879, 1599, 3992, 29877, 313, 1807, 29897, 13, 1678, 584, 29881, 1599, 512, 371, 3350, 313, 524, 29897, 13, 1678, 584, 29888, 1599, 405, 30030, 1050, 359, 316,...
flink-ai-flow/ai_flow/api/configuration.py
shanshanpt/flink-ai-extended
0
1609814
<reponame>shanshanpt/flink-ai-extended<gh_stars>0 # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache L...
[ 1, 529, 276, 1112, 420, 29958, 845, 550, 5403, 415, 29914, 1579, 682, 29899, 1794, 29899, 1062, 2760, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 13, 29937, 10413, 21144, 304, 278, 13380, 18540, 10606, 313, 3289, 29943, 29897...
build/python_module.py
Romit-Maulik/CBurgers
5
26903
print("From python: Within python module") import os,sys HERE = os.getcwd() sys.path.insert(0,HERE) import numpy as np import tensorflow as tf import matplotlib.pyplot as plt data_array = np.zeros(shape=(2001,258)) # Very important that this matches the number of timesteps in the main solver x = np.arange(start=0,st...
[ 1, 1596, 703, 4591, 3017, 29901, 23732, 3017, 3883, 1159, 13, 13, 5215, 2897, 29892, 9675, 13, 5006, 353, 2897, 29889, 657, 29883, 9970, 580, 13, 9675, 29889, 2084, 29889, 7851, 29898, 29900, 29892, 5006, 29897, 13, 13, 5215, 12655, 408...
pyclick/click_models/task_centric/SearchTask.py
gaudel/ranking_bandits
3
78708
# # Copyright (C) 2015 <NAME> # # Full copyright notice can be found in LICENSE. # from collections import OrderedDict __author__ = '<NAME>' class SearchTask(object): """A search task consisting of multiple search sessions.""" def __init__(self, task): self._task = task self.search_sessions...
[ 1, 396, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29945, 29871, 529, 5813, 29958, 13, 29937, 13, 29937, 14846, 3509, 1266, 8369, 508, 367, 1476, 297, 365, 2965, 1430, 1660, 29889, 13, 29937, 13, 3166, 16250, ...
example/generate.py
kohjaen/kojen
3
64821
<filename>example/generate.py #!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'eugene' ''' MIT License Copyright (c) 2015 <NAME> (email : <EMAIL>) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software...
[ 1, 529, 9507, 29958, 4773, 29914, 17158, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 1649, 8921, 1649, 353, 525, 29872, 688, ...
Droit/views/errors.py
Halleloya/DBAC
0
76828
<filename>Droit/views/errors.py """ Define the error pages for the project """ from flask import render_template def register_error_page(app): @app.errorhandler(404) def page_not_found(e): # note that we set the 404 status explicitly return render_template('/errors/404.html', description = e),...
[ 1, 529, 9507, 29958, 29928, 15164, 29914, 7406, 29914, 12523, 29889, 2272, 13, 15945, 29908, 13, 3206, 457, 278, 1059, 6515, 363, 278, 2060, 13, 15945, 29908, 13, 13, 3166, 29784, 1053, 4050, 29918, 6886, 13, 13, 1753, 6036, 29918, 2704...
find_duplicate_7kyu/find_the_duplicate.py
philipwerner/code-katas
0
24258
<reponame>philipwerner/code-katas """Kata: Find the Duplicated Number in a Consecutive Unsorted List - Finds and returns the duplicated number from the list #1 Best Practices Solution by SquishyStrawberry def find_dup(arr): return (i for i in arr if arr.count(i) > 1).next() """ def find_dup(arr): """This wi...
[ 1, 529, 276, 1112, 420, 29958, 561, 309, 666, 556, 1089, 29914, 401, 29899, 29895, 271, 294, 13, 15945, 29908, 29968, 532, 29901, 10987, 278, 18733, 9169, 9681, 297, 263, 1281, 3471, 11067, 853, 24582, 2391, 29871, 448, 10987, 29879, 32...
infinite_iterator.py
ysharma1126/ssl_identifiability
19
198664
from typing import Iterable class InfiniteIterator: """Infinitely repeat the iterable.""" def __init__(self, iterable: Iterable): self._iterable = iterable self.iterator = iter(self._iterable) def __iter__(self): return self def __next__(self): for _ in range(2): ...
[ 1, 515, 19229, 1053, 20504, 519, 13, 13, 13, 1990, 512, 18925, 20277, 29901, 13, 1678, 9995, 25433, 18639, 12312, 278, 4256, 519, 1213, 15945, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4256, 519, 29901, 20504, 519, 1125, 13, 4706, ...
Masters/Copy Layer to Layer.py
davidtahim/Glyphs-Scripts
1
3982
#MenuTitle: Copy Layer to Layer # -*- coding: utf-8 -*- __doc__=""" Copies one master to another master in selected glyphs. """ import GlyphsApp import vanilla import math def getComponentScaleX_scaleY_rotation( self ): a = self.transform[0] b = self.transform[1] c = self.transform[2] d = self.transform[3] ...
[ 1, 396, 6823, 7030, 29901, 14187, 365, 2747, 304, 365, 2747, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 1649, 1514, 1649, 13776, 29908, 13, 29907, 459, 583, 697, 5835, 304, 1790, 5835, 297, 4...
venv/lib/python3.8/site-packages/azureml/_tracing/__init__.py
amcclead7336/Enterprise_Data_Science_Final
0
47127
<gh_stars>0 # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- from azureml._base_sdk_common import __version__ as VERSION from ._tracer_factory import get_tracer __version__ = VERSI...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 448, 2683, 2683, 2683, 1378, 30004, 13, 29937, 14187, 1266, 313, 29883, 29897, 7783, 15025, 29889, 2178, 10462, 21676, 22993, 13, 29937, 448, 2683, 2683, 2683, 1378, 30004, 13, 300...
src/util/__init__.py
Newms226/project_creator
0
75031
URL_Root = ''
[ 1, 29871, 13, 4219, 29918, 10303, 353, 6629, 2 ]
src/shipchain_common/mixins.py
ShipChain/python-common
2
150454
""" Copyright 2019 ShipChain, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
[ 1, 9995, 13, 11882, 1266, 29871, 29906, 29900, 29896, 29929, 1383, 666, 14688, 29892, 9266, 29889, 13, 13, 29931, 293, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 6...
exercicio3.py
DrokaGit/-infosatc-lp-avaliativo-02
0
10655
nume1 = int(input("Digite um numero")) nume2 = int(input("Digite um numero")) nume3 = int(input("Digite um numero")) nume4 = int(input("Digite um numero")) nume5 = int(input("Digite um numero")) table = [nume1,nume2,nume3,nume4,nume5] tableM = (float((nume1 + nume2 + nume3 + nume4 + nume5))) print(float(tableM))
[ 1, 954, 29872, 29896, 353, 938, 29898, 2080, 703, 14991, 568, 1922, 17910, 5783, 13, 1949, 29872, 29906, 353, 938, 29898, 2080, 703, 14991, 568, 1922, 17910, 5783, 13, 1949, 29872, 29941, 353, 938, 29898, 2080, 703, 14991, 568, 1922, 17...
src/biokbase/narrative/__init__.py
pranjan77/narrative
0
138662
<filename>src/biokbase/narrative/__init__.py __all__ = ['magics', 'common', 'handlers', 'contents', 'services', 'widgetmanager'] from semantic_version import Version __version__ = Version("4.2.1") version = lambda: __version__ # if run directly: # no args = print current version # 1 arg = self-modify version to a...
[ 1, 529, 9507, 29958, 4351, 29914, 5365, 554, 3188, 29914, 29876, 2749, 1230, 29914, 1649, 2344, 26914, 2272, 13, 1649, 497, 1649, 353, 6024, 11082, 1199, 742, 525, 9435, 742, 525, 3179, 9306, 742, 525, 10853, 742, 525, 9916, 742, 525, ...
home/processors.py
saqlainrasheed/iogt
20
105448
<reponame>saqlainrasheed/iogt<filename>home/processors.py from django.conf import settings def show_welcome_banner(request): return { "first_time_user": request.session.get("first_time_user", True) } def commit_hash(request): return {'commit_hash': settings.COMMIT_HASH}
[ 1, 529, 276, 1112, 420, 29958, 4977, 29939, 7420, 3417, 354, 287, 29914, 29875, 468, 29873, 29966, 9507, 29958, 5184, 29914, 5014, 943, 29889, 2272, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 13, 13, 1753, 1510, 29918, 20466, 2763, 29...
trajectron_plus_plus/model/mgcvae/encoding/edge_state_encoding.py
rozzong/trajectron-plus-plus
0
168779
from abc import ABC, abstractmethod from typing import Callable, Union import torch from torch import nn from .utils import run_lstm_on_variable_length_seqs # TODO: Specify types in signatures class EdgeStateEncoder(nn.Module, ABC): def __init__( self, edge_type, input_size...
[ 1, 515, 25638, 1053, 16417, 29892, 9846, 5696, 13, 3166, 19229, 1053, 8251, 519, 29892, 7761, 13, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 1053, 302, 29876, 13, 13, 3166, 869, 13239, 1053, 1065, 29918, 20155, 29885, 29918, 265, 29918, ...
gui/qt/openswap_public.py
ComputerCraftr/openswap
16
109757
""" OpenSwap main public messaging """ import time from html import escape try: # python 3.6 + from secrets import token_bytes except ImportError: from os import urandom as token_bytes from electroncash.i18n import _ from electroncash.address import Address import electroncash.web as web from PyQt5.QtCo...
[ 1, 9995, 13, 6585, 10840, 481, 1667, 970, 4473, 6751, 13, 15945, 29908, 13, 13, 5215, 931, 13, 3166, 3472, 1053, 10169, 13, 13, 2202, 29901, 13, 1678, 396, 3017, 29871, 29941, 29889, 29953, 718, 13, 1678, 515, 22183, 1372, 1053, 5993,...
test1/views/models/axfundaddress.py
biz2013/xwjy
1
39731
class AXFundAddress(object): def __init__(self, address, alias): self.address = address self.alias = alias
[ 1, 770, 319, 29990, 29943, 870, 7061, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3211, 29892, 13995, 1125, 13, 4706, 1583, 29889, 7328, 353, 3211, 13, 4706, 1583, 29889, 19973, 353, 13995, 13, 2 ]
backend/model/migrate/versions/4dbaa3104f4_.py
deti/boss
7
15818
"""Added tariff Revision ID: 4dbaa3104f4 Revises: <PASSWORD> Create Date: 2015-05-27 16:00:09.343862 """ # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '<PASSWORD>' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(engine_name): glob...
[ 1, 9995, 2528, 287, 9913, 2593, 13, 13, 1123, 4924, 3553, 29901, 29871, 29946, 29881, 2291, 29874, 29941, 29896, 29900, 29946, 29888, 29946, 13, 1123, 1730, 267, 29901, 529, 25711, 17013, 29958, 13, 4391, 4712, 29901, 29871, 29906, 29900, ...
Integrations/FeedCSV/FeedCSV.py
mvpe/content
0
1604847
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import urllib3 import csv # disable insecure warnings urllib3.disable_warnings() SOURCE_NAME = 'CSV Feed Integration' class Client(BaseClient): def __init__(self, url: str, fieldnames: str, insec...
[ 1, 1053, 1261, 391, 290, 1698, 408, 1261, 5137, 13, 3166, 13103, 6004, 11980, 1053, 334, 13, 3166, 13103, 6004, 2659, 11980, 1053, 334, 13, 13, 12008, 306, 3580, 8476, 29903, 14550, 13, 5215, 3142, 1982, 29941, 13, 5215, 11799, 13, 13...
lib/python2.7/site-packages/appionlib/apCtf/circle.py
leschzinerlab/myami-3.2-freeHand
6
119179
<gh_stars>1-10 #!/usr/bin/env python import math import time import numpy from appionlib.apImage import imagestat #=================== # ANGULAR FUNCTIONS #=================== #=================== class Angular(object): def __init__(self, shape, xfreq=1.0, yfreq=1.0, center=True, flip=False): # setup if center...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 5844, 13, 5215, 931, 13, 5215, 12655, 13, 13, 3166, 623, 291, 1982, 29889, 481, 2940, 1053, 6382, ...
publications/leveraging_domain_knowledge/2_false_merge_detection/3_skeletonize.py
constantinpape/cluster_tools
28
171989
#! /g/kreshuk/pape/Work/software/conda/miniconda3/envs/cluster-new/bin/python import os import json from concurrent import futures import numpy as np import luigi import z5py import skeletor.io from cluster_tools.skeletons import SkeletonWorkflow def check_scale(scale): path = '/g/kreshuk/data/FIB25/data.n5' ...
[ 1, 396, 29991, 847, 29887, 29914, 29895, 3781, 2679, 29914, 3274, 412, 29914, 5531, 29914, 20415, 29914, 18050, 29914, 1195, 293, 14287, 29941, 29914, 264, 4270, 29914, 19594, 29899, 1482, 29914, 2109, 29914, 4691, 13, 13, 5215, 2897, 13, ...
fabrikApi/views/assembly/list.py
demokratiefabrik/fabrikApi
0
23710
""" Assemblies List View. """ import logging from datetime import datetime from cornice.service import Service from fabrikApi.models.assembly import DBAssembly from fabrikApi.models.mixins import arrow # from fabrikApi.util.cors import CORS_LOCATION, CORS_MAX_AGE logger = logging.getLogger(__name__) # SERVICES as...
[ 1, 9995, 4007, 1590, 3687, 2391, 4533, 29889, 9995, 13, 13, 5215, 12183, 13, 3166, 12865, 1053, 12865, 13, 13, 3166, 1034, 16533, 29889, 5509, 1053, 6692, 13, 13, 3166, 10135, 5357, 11713, 29889, 9794, 29889, 26936, 1053, 360, 5688, 893...
scripts/cloud/aws/ops-ec2-add-snapshot-tag-to-ebs-volumes.py
fahlmant/openshift-tools
164
25638
#!/usr/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 """ This is a script that can be used to tag EBS volumes in OpenShift v3. This script assume that your AWS credentials are setup in ~/.aws/credentials like this: [default] aws_access_key_id = xxxx aws_secret_access_key = xxxx Or that environmen...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 325, 326, 29901, 7985, 3891, 29901, 3891, 9847, 29922, 29946, 29901, 10889, 2103, 29922, 29946, 13, 13, 15945, 29908, 13, 910, 338, 263, 2471, 393, 508, 367, 1304, 304, 4055, 38...
dxm/lib/DxConnector/ExtendedConnector.py
experiortec/dxm-toolkit
5
80007
<reponame>experiortec/dxm-toolkit<gh_stars>1-10 # # 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 agr...
[ 1, 529, 276, 1112, 420, 29958, 735, 546, 1611, 371, 29883, 29914, 8235, 29885, 29899, 10154, 7354, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079,...
src/image/video/__init__.py
fronovics/AI_playground
0
142772
<filename>src/image/video/__init__.py from src.image.video.video_loop import VideoLoop
[ 1, 529, 9507, 29958, 4351, 29914, 3027, 29914, 9641, 29914, 1649, 2344, 26914, 2272, 13, 3166, 4765, 29889, 3027, 29889, 9641, 29889, 9641, 29918, 7888, 1053, 13987, 18405, 13, 2 ]
genetic.py
AHDiniz/AI-2020-02-Assignment-2
0
41643
#!/usr/bin/python3.8 import time import copy import random import numpy as np import clustering as clt class HyperParams: def __init__(self, population_size : int, crossover_rate : float, mutation_rate : float): self._population_size = population_size self._crossover_rate = crossover_rate ...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 29889, 29947, 13, 13, 5215, 931, 13, 5215, 3509, 13, 5215, 4036, 13, 5215, 12655, 408, 7442, 13, 5215, 16993, 3241, 408, 1067, 29873, 13, 13, 1990, 26078, 9629, 29901, 13, 1678, 822, 47...
wagtail/core/tests/test_comments.py
brownaa/wagtail
8,851
92627
<reponame>brownaa/wagtail from django.contrib.auth import get_user_model from django.test import TestCase from wagtail.core.models import Comment, Page class CommentTestingUtils: def setUp(self): self.page = Page.objects.get(title="Welcome to the Wagtail test site!") self.revision_1 = self.page.s...
[ 1, 529, 276, 1112, 420, 29958, 23721, 1056, 29874, 29914, 29893, 351, 18237, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 679, 29918, 1792, 29918, 4299, 13, 3166, 9557, 29889, 1688, 1053, 4321, 8259, 13, 13, 3166, 281, 351, 18237, 2...
src/routes/web.py
enflo/weather-flask
0
6999
<gh_stars>0 from flask import Blueprint, render_template from gateways.models import getWeatherData web = Blueprint("web", __name__, template_folder='templates') @web.route("/", methods=['GET']) def home(): items = getWeatherData.get_last_item() cityName = items["city"] return render_template("index.html...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 29784, 1053, 10924, 2158, 29892, 4050, 29918, 6886, 13, 3166, 12417, 1994, 29889, 9794, 1053, 679, 4806, 1624, 1469, 13, 13, 13, 2676, 353, 10924, 2158, 703, 2676, 613, 4770, 978,...
lino_xl/lib/reception/__init__.py
khchine5/xl
1
12522
<reponame>khchine5/xl<gh_stars>1-10 # -*- coding: UTF-8 -*- # Copyright 2013-2016 <NAME> # # License: BSD (see file COPYING for details) """This module is for managing a reception desk and a waiting queue: register clients into a waiting queue as they present themselves at a reception desk (Empfangsschalter), and unre...
[ 1, 529, 276, 1112, 420, 29958, 15339, 305, 457, 29945, 29914, 15524, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 18351, 29899, 29947, 448, 29930, 29899, 13, 29937, 14187, 12...
python/fedml/cli/comm_utils/remote_storage.py
ray-ruisun/FedML
0
126495
import os import boto3 from python.fedml.utils import logging from python.fedml.utils.logging import logger BUCKET_NAME = "fedmls3" # aws_access_key_id、aws_secret_access_key、region CN_S3_AKI = '' CN_S3_SAK = '' CN_REGION_NAME = 'us-east-1' # s3 client s3 = boto3.client('s3', region_name=CN_REGION_NAME, ...
[ 1, 1053, 2897, 13, 13, 5215, 289, 3747, 29941, 13, 13, 3166, 3017, 29889, 29888, 287, 828, 29889, 13239, 1053, 12183, 13, 3166, 3017, 29889, 29888, 287, 828, 29889, 13239, 29889, 21027, 1053, 17927, 13, 13, 7838, 7077, 2544, 29918, 5813...
database/repositories/ModelBlobRepository.py
roblkenn/EECS441-Backend
0
34472
<filename>database/repositories/ModelBlobRepository.py from azure.storage.blob.baseblobservice import BaseBlobService from azure.storage.blob.blockblobservice import BlockBlobService from database.models.Blob import Blob class ModelBlobRepository: def __init__(self): self.blockBlobService = BlockBlobServic...
[ 1, 529, 9507, 29958, 9803, 29914, 276, 1066, 20106, 29914, 3195, 29933, 2127, 11481, 29889, 2272, 13, 3166, 15699, 29889, 12925, 29889, 10054, 29889, 3188, 10054, 5509, 1053, 7399, 29933, 2127, 3170, 13, 3166, 15699, 29889, 12925, 29889, 10...
datasets/__init__.py
bomtorazek/LateTemporalModeling3DCNN
3
107858
<gh_stars>1-10 from .ucf101 import ucf101 from .hmdb51 import hmdb51 from .cvpr import cvpr from .cvpr_le import cvpr_le __all__ = ('ucf101','hmdb51', 'cvpr', 'cvpr_le')
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 869, 1682, 29888, 29896, 29900, 29896, 1053, 318, 6854, 29896, 29900, 29896, 13, 3166, 869, 7184, 2585, 29945, 29896, 1053, 298, 29885, 2585, 29945, 29896, 13, ...
Codility/CyclicRotation.py
royn5618/ProgrammingPractice
0
112862
# Challenge Link - https://app.codility.com/programmers/lessons/2-arrays/cyclic_rotation/ # My Results - https://app.codility.com/demo/results/trainingFGAZZW-5XB/ def solution(A, K): # write your code in Python 3.6 if not A: return [] idx = [i for i in range(0, len(A))] while K: idx = [...
[ 1, 396, 27211, 6645, 448, 2045, 597, 932, 29889, 19284, 1793, 29889, 510, 29914, 8860, 13269, 29914, 2222, 787, 29914, 29906, 29899, 2378, 29879, 29914, 8798, 506, 29918, 5450, 362, 29914, 13, 29937, 1619, 17212, 448, 2045, 597, 932, 2988...
src/cupcake/tofu/counting/combine_abundance_across_samples.py
milescsmith/cDNA_Cupcake
0
197709
__author__ = "<EMAIL>" import re import sys from collections import defaultdict, namedtuple from csv import DictWriter from pathlib import Path from typing import Any, Dict, List, Optional, Union from Bio import SeqIO from bx.intervals import IntervalTree from bx.intervals.cluster import ClusterTree from cupcake im...
[ 1, 4770, 8921, 1649, 353, 9872, 26862, 6227, 11903, 13, 13, 13, 5215, 337, 13, 5215, 10876, 13, 3166, 16250, 1053, 2322, 8977, 29892, 4257, 23583, 13, 3166, 11799, 1053, 360, 919, 10507, 13, 3166, 2224, 1982, 1053, 10802, 13, 3166, 19...
QuizApp/admin.py
mokosaur/legit-quizzes
1
40599
from django.contrib import admin from .models import Label, Choice, Quiz, Question, Answer, Submit # Register your models here. admin.site.register(Quiz) admin.site.register(Question) admin.site.register(Answer) admin.site.register(Label) admin.site.register(Submit) admin.site.register(Choice)
[ 1, 515, 9557, 29889, 21570, 1053, 4113, 13, 3166, 869, 9794, 1053, 15796, 29892, 14542, 625, 29892, 751, 466, 29892, 894, 29892, 673, 29892, 3323, 2415, 13, 13, 29937, 12577, 596, 4733, 1244, 29889, 13, 6406, 29889, 2746, 29889, 9573, 2...
splearn/cluster/tests/test_k_means.py
dtrckd/sparkit-learn
1,219
46310
import numpy as np from sklearn.cluster import KMeans from splearn.cluster import SparkKMeans from splearn.utils.testing import SplearnTestCase, assert_array_almost_equal class TestKMeans(SplearnTestCase): def test_same_centroids(self): X, y, X_rdd = self.make_blobs(centers=4, n_samples=200000) ...
[ 1, 1053, 12655, 408, 7442, 13, 3166, 2071, 19668, 29889, 19594, 1053, 476, 6816, 550, 13, 3166, 269, 552, 2753, 29889, 19594, 1053, 20814, 29968, 6816, 550, 13, 3166, 269, 552, 2753, 29889, 13239, 29889, 13424, 1053, 317, 552, 2753, 305...
dmatch/logger.py
mcrts/dmatch
1
188182
#!/usr/bin/env python # -*- coding: utf-8 -* import sys import logging log = logging.getLogger("dmatch") log.setLevel(logging.INFO) formatter = logging.Formatter('[%(asctime)s] {%(filename)s:%(lineno)d} %(levelname)s - %(message)s') ch = logging.StreamHandler() ch.setFormatter(formatter) log.addHandler(ch)
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 13, 5215, 10876, 13, 5215, 12183, 13, 1188, 353, 12183, 29889, 657, 16363, 703, 29881, 4352, 1159, 13, 1188, 2988...
calaccess_website/views/docs/__init__.py
california-civic-data-coalition/django-calaccess-downloads
3
134631
from .calaccess import ( CalAccessFileList, CalAccessFileDetail, CalAccessFileDownloadsList, ) from .ccdc import ( CcdcFileList, CcdcFileDetail, CcdcFileDownloadsList, ) from .forms import FormList, FormDetail from .official import OfficialDocumentation from .other import DocumentationIndex, FAQ...
[ 1, 515, 869, 1052, 5943, 1053, 313, 13, 1678, 3037, 6638, 2283, 1293, 29892, 13, 1678, 3037, 6638, 2283, 16570, 29892, 13, 1678, 3037, 6638, 2283, 6767, 18132, 1293, 29892, 13, 29897, 13, 3166, 869, 617, 13891, 1053, 313, 13, 1678, 31...
script/python/lib/exhaust_generation/exhaustive_tpls.py
timblechmann/nt2
2
28627
#! /usr/bin/env python # -*- coding: iso-8859-15 -*- ############################################################################## # Copyright 2003 & onward LASMEA UMR 6602 CNRS/Univ. Clermont II # Copyright 2009 & onward LRI UMR 8623 CNRS/Univ Paris Sud XI # # Distributed under the Boost ...
[ 1, 396, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 338, 29877, 29899, 29947, 29947, 29945, 29929, 29899, 29896, 29945, 29871, 448, 29930, 29899, 13, 13383, 13383, 13383, 13383, 7346, 4136, ...
WEEKS/CD_Sata-Structures/_MISC/algorithms/map/is_anagram.py
webdevhub42/Lambda
0
166947
<reponame>webdevhub42/Lambda ##------------------------------------------------------------------- """ Given two strings s and t , write a function to determine if t is an anagram of s. Example 1: Input: s = "anagram", t = "nagaram" Output: true Example 2: Input: s = "rat", t = "car" Output: false Note: You may assu...
[ 1, 529, 276, 1112, 420, 29958, 2676, 3359, 29882, 431, 29946, 29906, 29914, 9099, 13, 2277, 2683, 2683, 2683, 2683, 5634, 13, 15945, 29908, 13, 29954, 5428, 1023, 6031, 269, 322, 260, 1919, 2436, 263, 740, 304, 8161, 565, 260, 338, 38...
exercices/clock/clock.py
gkaeso/exercism-python
0
141177
<reponame>gkaeso/exercism-python<filename>exercices/clock/clock.py class Clock: def __init__(self, hour, minute): self.total: int = hour * 60 + minute # in minutes def __repr__(self): hour, minute = (self.total // 60) % 24, self.total % 60 return '{:02d}:{:02d}'.format(hour, minute) ...
[ 1, 529, 276, 1112, 420, 29958, 29887, 1335, 20135, 29914, 735, 6269, 1608, 29899, 4691, 29966, 9507, 29958, 735, 6269, 1575, 29914, 13058, 29914, 13058, 29889, 2272, 13, 1990, 315, 908, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892...
misc/angleutil.py
SpencerZPoole/pythontools
1
189851
<reponame>SpencerZPoole/pythontools<gh_stars>1-10 from math import radians, sin, cos def apply_angle(angle, dist, *args): x, y = args[0] if len(args) == 1 else args return x + dist * radians(cos(angle)), y + dist * radians(sin(angle)) class Angle: __slots__ = 'angle', 'initial_angle', 'last' def __...
[ 1, 529, 276, 1112, 420, 29958, 29903, 2238, 2265, 29999, 9837, 1772, 29914, 4691, 8504, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 5844, 1053, 2971, 5834, 29892, 4457, 29892, 6776, 13, 13, 13, 1753, 3394,...
network/pytorch2onnx.py
MRsoymilk/toy-car
0
7733
import Net import configparser import torch from PIL import Image config = configparser.ConfigParser() config.read('./config.ini') MODEL = config.get("Network", "Model") transformations = Net.transformations net = Net.Net() net.eval() net.load_state_dict(torch.load(MODEL)) image = Image.open("./html/rwby.jpg") imag...
[ 1, 1053, 12670, 13, 5215, 2295, 16680, 13, 5215, 4842, 305, 13, 3166, 349, 6227, 1053, 7084, 13, 13, 2917, 353, 2295, 16680, 29889, 3991, 11726, 580, 13, 2917, 29889, 949, 877, 6904, 2917, 29889, 2172, 1495, 13, 20387, 29931, 353, 229...
tests/model/pydantic/test_types.py
PieInsurance/datamodel-code-generator
0
195562
<gh_stars>0 import pytest from datamodel_code_generator import PythonVersion from datamodel_code_generator.imports import Import from datamodel_code_generator.model.pydantic.imports import ( IMPORT_CONDECIMAL, IMPORT_CONFLOAT, IMPORT_CONINT, IMPORT_CONSTR, IMPORT_NEGATIVE_FLOAT, IMPORT_NEGATIVE...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 11451, 1688, 13, 13, 3166, 1418, 314, 27224, 29918, 401, 29918, 27959, 1053, 5132, 6594, 13, 3166, 1418, 314, 27224, 29918, 401, 29918, 27959, 29889, 326, 4011, 1053, 16032, 13, 3...
rk_brain/knowldgegraph/abstract/neo4j_node_builder_abstract.py
ResearchKernel/MachineLearning
1
191624
<reponame>ResearchKernel/MachineLearning import logging logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) import pandas as pd import gensim import pymysql.cursors from py2neo import authenticate, Graph, Node, Relationship from multiprocessing import Pool # set up authentica...
[ 1, 529, 276, 1112, 420, 29958, 1666, 2842, 29968, 5851, 29914, 29076, 29931, 799, 1076, 13, 5215, 12183, 13, 21027, 29889, 16121, 3991, 29898, 4830, 2433, 29995, 29898, 294, 312, 603, 29897, 29879, 584, 1273, 29898, 5563, 978, 29897, 2987...
rdll.py
juntalis/python-ctypes-sandbox
3
48643
# encoding: utf-8 """ This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for mor...
[ 1, 396, 8025, 29901, 23616, 29899, 29947, 13, 15945, 29908, 13, 4013, 1824, 338, 3889, 7047, 29889, 739, 5304, 1728, 738, 1370, 21867, 29891, 29892, 304, 13, 1552, 15834, 21905, 491, 22903, 4307, 29889, 887, 508, 2654, 391, 2666, 372, 1...
admit/xmlio/bdpTest.py
astroumd/admit
4
114652
#! /usr/bin/env python from admit.bdp import * import admit.xmlio.dtdGenerator as dtdGenerator import admit.xmlio.Parser as Parser import numpy as np if __name__ == "__main__" : dtdGenerator.generate() print "Creating initial class" cs = CubeStats.CubeStats() print "Setting initial values" ...
[ 1, 396, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 3166, 20000, 29889, 29890, 6099, 1053, 334, 13, 5215, 20000, 29889, 29916, 29885, 5991, 29889, 29881, 1594, 21575, 408, 270, 1594, 21575, 13, 5215, 20000, 29889, 29916, 298...
controller/controller_helper/__init__.py
IDNatte/mygamelist
0
1614272
""" Controller helper """ from flask import current_app from functools import wraps from flask import request from jose import jwt import requests import datetime from model import SystemAuthKey from shared import db class AuthError(Exception): """ Authentication error Error related to Authentication. ...
[ 1, 9995, 13, 2956, 16876, 13, 15945, 29908, 13, 3166, 29784, 1053, 1857, 29918, 932, 13, 3166, 2090, 312, 8789, 1053, 11463, 567, 13, 3166, 29784, 1053, 2009, 13, 3166, 432, 852, 1053, 432, 14554, 13, 5215, 7274, 13, 5215, 12865, 13, ...
workflow/src/routing.py
mibexsoftware/alfred-stash-workflow
13
10326
# -*- coding: utf-8 -*- from src import icons, __version__ from src.actions import HOST_URL from src.actions.configure import ConfigureWorkflowAction from src.actions.help import HelpWorkflowAction from src.actions.index import IndexWorkflowAction from src.actions.projects import ProjectWorkflowAction from src.actions....
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4765, 1053, 27673, 29892, 4770, 3259, 1649, 13, 3166, 4765, 29889, 7387, 1053, 379, 3718, 29918, 4219, 13, 3166, 4765, 29889, 7387, 29889, 17591, 1...