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
pype/vendor/pynput/keyboard/_darwin.py
tws0002/pype
0
1610615
# coding=utf-8 # pynput # Copyright (C) 2015-2017 <NAME> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # Th...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 282, 948, 649, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29945, 29899, 29906, 29900, 29896, 29955, 529, 5813, 29958, 13, 29937, 13, 29937, 910, 1824, 338, 3...
tests/test_provider_Mongey_kafka_connect.py
mjuenema/python-terrascript
507
3451
# tests/test_provider_Mongey_kafka-connect.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:20:11 UTC) def test_provider_import(): import terrascript.provider.Mongey.kafka_connect def test_resource_import(): from terrascript.resource.Mongey.kafka_connect import kafka_connect_connector # T...
[ 1, 396, 6987, 29914, 1688, 29918, 18121, 29918, 7185, 479, 29891, 29918, 28510, 29899, 6915, 29889, 2272, 13, 29937, 15854, 19574, 5759, 491, 8492, 29914, 5675, 401, 29889, 2272, 313, 29906, 29946, 29899, 29903, 1022, 29899, 29906, 29900, 2...
plugins/chatinfo.py
HtmlLoverExe/MultiUserbot1
0
58166
import configparser from datetime import datetime from pyrogram import Client, Filters, Emoji config = configparser.ConfigParser() config.read("config.ini") prefixes = list(config["prefixes"].keys()) chatinfo_message = {"id": f"{Emoji.ID_BUTTON} <b>Id</b>: <code>[%id%]</code>", "type": f"{Emoji.J...
[ 1, 1053, 2295, 16680, 13, 3166, 12865, 1053, 12865, 13, 13, 3166, 11451, 307, 1393, 1053, 12477, 29892, 2514, 2153, 29892, 2812, 29877, 2397, 13, 13, 2917, 353, 2295, 16680, 29889, 3991, 11726, 580, 13, 2917, 29889, 949, 703, 2917, 2988...
thing/awsiot.py
ymtomoyk/smarthome
0
184892
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient import logging MQTT_PORT = 8883 class MyAWSIoTClient: def __init__ (self, args): self.args = args self.client = AWSIoTMQTTClient (args.clientId) # Configure logging logger = logging.getLogger ('AWSIoTPythonSDK.core') logger.setLevel (loggin...
[ 1, 515, 319, 29956, 5425, 29877, 3557, 1656, 26912, 29889, 25566, 29911, 14632, 747, 1053, 319, 29956, 5425, 29877, 23081, 29984, 19988, 4032, 13, 5215, 12183, 13, 13, 25566, 19988, 29918, 15082, 259, 353, 29871, 29947, 29947, 29947, 29941,...
Lib/site-packages/pyexcel_io/writers/tsvz.py
percevalm/aumyproject
0
85126
<gh_stars>0 """ pyexcel_io.fileformat.tsvz ~~~~~~~~~~~~~~~~~~~~~~~~~~ The lower level tsvz file format handler. :copyright: (c) 2014-2017 by Onni Software Ltd. :license: New BSD License, see LICENSE for more details """ from pyexcel_io.constants import FILE_FORMAT_TSVZ, KEYWORD_TSV_DIALECT from ....
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 1678, 11451, 24633, 29918, 601, 29889, 1445, 4830, 29889, 1372, 29894, 29920, 13, 1678, 3695, 26594, 26594, 26594, 30022, 13, 13, 1678, 450, 5224, 3233, 260, 4501, 29920...
binaryclassifier/statistics/ks.py
bmathias12/model-analysis
0
181186
import numpy as np import pandas as pd def ks_table(y, quantiles): """Function to produce a K-S table""" if len(set(y)) > 2: raise ValueError('Function only defined for binary classification') df = pd.concat([pd.Series(y), pd.Series(quantiles)], axis=1) df.columns = ['y', 'quantiles'] # ...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 13, 13, 1753, 413, 29879, 29918, 2371, 29898, 29891, 29892, 4323, 5475, 1125, 13, 1678, 9995, 6678, 304, 7738, 263, 476, 29899, 29903, 1591, 15945, 29908, 13, 1678, 565, 7431, ...
module5/coroutine_pipelines_filter.py
axel-sirota/advanced-generator-and-coroutines
5
186491
<gh_stars>1-10 from module4 import coroutine @coroutine def filter_by_pattern(pattern, target): print(f'I am going to filter lines by pattern {pattern}') while True: line = yield if pattern in line: target.send(line) def iterate_file(file, target): with open(file) as f: ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 3883, 29946, 1053, 1034, 449, 457, 13, 13, 13, 29992, 2616, 449, 457, 13, 1753, 4175, 29918, 1609, 29918, 11037, 29898, 11037, 29892, 3646, 1125, 13, 1678, 15...
anoncreds/protocol/primary/primary_proof_builder.py
fabienpe/indy-anoncreds
16
72214
from typing import Sequence, Dict from anoncreds.protocol.globals import LARGE_VPRIME, LARGE_MVECT, LARGE_E_START, \ LARGE_ETILDE, \ LARGE_VTILDE, LARGE_UTILDE, LARGE_RTILDE, LARGE_ALPHATILDE, ITERATIONS, \ DELTA from anoncreds.protocol.primary.primary_proof_common import calcTge, calcTeq from anoncreds.pr...
[ 1, 515, 19229, 1053, 922, 3910, 29892, 360, 919, 13, 13, 3166, 385, 265, 1037, 6289, 29889, 20464, 29889, 23705, 1338, 1053, 365, 1718, 1692, 29918, 18510, 3960, 2303, 29892, 365, 1718, 1692, 29918, 29924, 12064, 1783, 29892, 365, 1718, ...
defx/metrics/f1_measure.py
DFKI-NLP/defx
5
32220
<reponame>DFKI-NLP/defx<filename>defx/metrics/f1_measure.py from statistics import mean from typing import Dict, List, Optional, Set from collections import defaultdict import torch from allennlp.common.checks import ConfigurationError from allennlp.nn.util import get_lengths_from_binary_sequence_mask from allennlp.d...
[ 1, 529, 276, 1112, 420, 29958, 4037, 29968, 29902, 29899, 29940, 13208, 29914, 1753, 29916, 29966, 9507, 29958, 1753, 29916, 29914, 2527, 10817, 29914, 29888, 29896, 29918, 26658, 29889, 2272, 13, 3166, 13964, 1053, 2099, 13, 3166, 19229, 1...
src/dlg_windows.py
seung-lab/SBEMimage
0
48752
<gh_stars>0 # -*- coding: utf-8 -*- # ============================================================================== # SBEMimage, ver. 2.0 # Acquisition control software for serial block-face electron microscopy # (c) 2018-2019 <NAME> Institute for Biomedical Research, Basel. # This software is licensed under ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 1275, 9166, 9166, 9166, 9166, 4936, 2751, 13, 29937, 259, 317, 29933, 12665, 3027, 29892, 11...
sequence_labeler.py
kamei86i/rnn-sequence-labeler
0
80955
<filename>sequence_labeler.py import tensorflow as tf from tensorflow.contrib import rnn import utils.data as du import numpy as np import random np.random.seed(1337) random.seed = 1337 class SequenceLabeler: def __init__(self, sequence_length, embedding, cell_size, num_classes, hls, gcap=5, lam=0.1, verbose=Fal...
[ 1, 529, 9507, 29958, 16506, 29918, 1643, 261, 29889, 2272, 13, 5215, 26110, 408, 15886, 13, 3166, 26110, 29889, 21570, 1053, 364, 15755, 13, 5215, 3667, 29879, 29889, 1272, 408, 868, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 4036, 13, ...
website/forms.py
imanbayati/my-site
0
135609
from ctypes import resize from dataclasses import field from django import forms from website.models import Contact,Newsletter class NameForm(forms.Form): name = forms.CharField(label='Your Name',max_length=225) email = forms.EmailField(label='Your Email') subject = forms.CharField(label='Your Subject',max...
[ 1, 515, 274, 8768, 1053, 19490, 13, 3166, 848, 13203, 1053, 1746, 13, 3166, 9557, 1053, 7190, 13, 3166, 4700, 29889, 9794, 1053, 22387, 29892, 29328, 15670, 13, 13, 1990, 4408, 2500, 29898, 9514, 29889, 2500, 1125, 13, 1678, 1024, 353, ...
django/feedreader/urls.py
devm1023/angular-Django
0
149158
<gh_stars>0 from django.conf.urls import url from . import views urlpatterns = [ url(regex=r'^recententries$', view=views.get_recent_entries, name='entries'), url(regex=r'^deletefeed', view=views.delete_feed, name='delete_feed'), url(regex=r'^deletegroup', view=views.delete_group, name='delete_group'), ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 9557, 29889, 5527, 29889, 26045, 1053, 3142, 13, 13, 3166, 869, 1053, 8386, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, 3142, 29898, 13087, 29922, 29878, 29915, 29985, 276, 17...
FuncionSeleccionPadres.py
BrendaMep/Proyecto1Reynas
0
75659
import numpy as np import random from FuncionAptitud import fitness lista = [0, 1, 2, 3, 4, 5, 6, 7] # son los valores en los que puede estar la reyna poblacion = np.empty((50,8)) for i in range(50): random.shuffle(lista) for j in range(8): poblacion[i, j] = lista[j] def padres(conjunto): r1 = ra...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 4036, 13, 3166, 383, 4661, 291, 29909, 415, 11267, 1053, 6216, 2264, 13, 13, 13, 19641, 353, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871...
pytorch3d/implicitron/dataset/dataset_zoo.py
JulianKnodt/pytorch3d
0
39576
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import copy import json import os from typing import Any, Dict, List, Optional, Sequence from iopath.common.f...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 20553, 28096, 29879, 29892, 9266, 29889, 322, 23736, 1078, 29889, 13, 29937, 2178, 10462, 21676, 29889, 13, 29937, 13, 29937, 910, 2752, 775, 338, 7794, 21144, 1090, 278, 350, 7230, 29899, 3293, 194...
mp3player.py
athavus/Mp3Player
2
176504
from pygame import mixer from PySimpleGUI import PySimpleGUI as sg sg.theme('DarkPurple1') # Definição do tema da interface do programa layout = [ [sg.Text('MP3 PLAYER'.center(50), font='Consolas')], # Título do programa [sg.Text('NOME DA MÚSICA:', font='Consolas'), sg.Input(key='music', size=(42, 1))]...
[ 1, 515, 22028, 1053, 6837, 261, 30004, 13, 3166, 10772, 15427, 29954, 3120, 1053, 10772, 15427, 29954, 3120, 408, 269, 29887, 30004, 13, 30004, 13, 5311, 29889, 18193, 877, 29928, 935, 29925, 332, 552, 29896, 1495, 396, 5282, 2172, 2340, ...
src/pkg/caendr/caendr/services/sql/etl/__init__.py
AndersenLab/CAENDR
3
1602015
<reponame>AndersenLab/CAENDR from .strains import load_strains from .wormbase import load_genes_summary, load_genes, load_orthologs from .homologs import load_homologs from .strain_annotated_variants import load_strain_annotated_variants
[ 1, 529, 276, 1112, 420, 29958, 2855, 414, 264, 28632, 29914, 5454, 1430, 8353, 13, 3166, 869, 4151, 1144, 1053, 2254, 29918, 4151, 1144, 13, 3166, 869, 29893, 555, 3188, 1053, 2254, 29918, 1885, 267, 29918, 7727, 29892, 2254, 29918, 188...
itp1_8a.py
ShinjiKatoA16/aoj-itp
0
168514
<reponame>ShinjiKatoA16/aoj-itp #!/usr/bin/python3 # -*- coding: utf-8 -*- import sys from string import ascii_lowercase as asc_l, ascii_uppercase as asc_u table = str.maketrans(asc_l+asc_u, asc_u+asc_l) s = sys.stdin.readline() print(s.translate(table), end='')
[ 1, 529, 276, 1112, 420, 29958, 2713, 262, 2397, 29968, 1219, 29909, 29896, 29953, 29914, 29874, 3848, 29899, 277, 29886, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 2994...
src/views/help.py
Amin-egn/Recipient
1
165881
<reponame>Amin-egn/Recipient<gh_stars>1-10 class Help(object): """Help View""" def __init__(self, ui): self.ui = ui self.tab = ui.contents.help # connect signals self.ui.menu.btnHelp.clicked.connect(self.tab_handler) def tab_handler(self): self.ui.contents.showTab(se...
[ 1, 529, 276, 1112, 420, 29958, 29909, 1195, 29899, 26567, 29914, 1123, 7334, 993, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 1990, 22305, 29898, 3318, 1125, 13, 1678, 9995, 29648, 4533, 15945, 29908, 13, 1678, ...
app/ext/api/services/file_services.py
fredsonchaves07/foodfy
0
1617476
from app.ext.api.models.file import Files from app.ext.database import db def create_file(filename, path): file = Files() file.name = filename file.path = path db.session.add(file) db.session.commit() return file.as_dict() def update_file(file_id, filename, path): file = get_file_by_i...
[ 1, 515, 623, 29889, 1062, 29889, 2754, 29889, 9794, 29889, 1445, 1053, 12745, 13, 3166, 623, 29889, 1062, 29889, 9803, 1053, 4833, 13, 13, 13, 1753, 1653, 29918, 1445, 29898, 9507, 29892, 2224, 1125, 13, 1678, 934, 353, 12745, 580, 13, ...
FastAutoAugment/pointaug/__init__.py
ironluffy/fast-autoaugment
0
152074
<reponame>ironluffy/fast-autoaugment from .train import train from .test import test from .test import test_model
[ 1, 529, 276, 1112, 420, 29958, 381, 265, 29880, 3096, 29891, 29914, 11255, 29899, 6921, 2987, 358, 13, 3166, 869, 14968, 1053, 7945, 13, 3166, 869, 1688, 1053, 1243, 13, 3166, 869, 1688, 1053, 1243, 29918, 4299, 2 ]
tools/examples.py
Hellowlol/plexapi
4
19018
<filename>tools/examples.py # -*- coding: utf-8 -*- """ PlexAPI Examples As of Plex version 0.9.11 I noticed that you must be logged in to browse even the plex server locatewd at localhost. You can run this example suite with the following command: >> python examples.py -u <USERNAME> -p <PASSWORD> -s <SERVERNAME> """ ...
[ 1, 529, 9507, 29958, 8504, 29914, 19057, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 29925, 2506, 8787, 1222, 9422, 13, 2887, 310, 349, 2506, 1873, 29871, 29900, 2...
Templates/Scripts/src/CGM2/CGM22_workflow.py
sremm/qualisys_CGM2_workflow
0
197132
<reponame>sremm/qualisys_CGM2_workflow # -*- coding: utf-8 -*- import matplotlib.pyplot as plt import logging import os import shutil import pyCGM2 from pyCGM2.Model.CGM2 import cgm from pyCGM2.Lib.CGM import cgm2_2 from pyCGM2.Utils import files from pyCGM2.Utils.utils import * from pyCGM2.qtm import qtmT...
[ 1, 529, 276, 1112, 420, 29958, 29879, 1745, 29885, 29914, 339, 5711, 952, 29918, 11135, 29924, 29906, 29918, 1287, 1731, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 30004, 13, 5215, 22889, 29889, 2272...
corona.py
taylordotfish/coronavirus-irc-bot
0
134307
from utils import json_request irc_formatting = True def format(number, sign = False): if irc_formatting: if sign: return '\x02\x0304{:+}\x03\x02'.format(number) else: return '\x02\x0304{}\x03\x02'.format(number) else: if sign: return '{:+}'.format(n...
[ 1, 515, 3667, 29879, 1053, 4390, 29918, 3827, 13, 13, 2076, 29918, 689, 23980, 353, 5852, 13, 13, 1753, 3402, 29898, 4537, 29892, 1804, 353, 7700, 1125, 13, 1678, 565, 29871, 2076, 29918, 689, 23980, 29901, 13, 4706, 565, 1804, 29901, ...
VFF/psi_statistics.py
st--/VFF
1
82524
# Copyright 2016 <NAME> # # 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, software ...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29953, 529, 5813, 29958, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 366, 1122, ...
Recommender/build.py
teamclouday/Mooner
0
1617393
<filename>Recommender/build.py # This file will build a database for each of the ids in crawled csv # How it works # For each of the ids, read through the tweets # run Sentiment model and Topic model on them # calculate a representative value for these features # store the result into a database (could be a csv file) ...
[ 1, 529, 9507, 29958, 1123, 2055, 1581, 29914, 4282, 29889, 2272, 13, 29937, 910, 934, 674, 2048, 263, 2566, 363, 1269, 310, 278, 18999, 297, 29349, 839, 11799, 13, 29937, 1128, 372, 1736, 13, 29937, 1152, 1269, 310, 278, 18999, 29892, ...
post/admin.py
bramvankooten/dienst2
1
164430
from __future__ import unicode_literals from django.contrib import admin from post.models import * @admin.register(Category) class CategoryAdmin(admin.ModelAdmin): """CategoryAdmin""" search_fields = ("name",) list_display = ("name", "grouping", "counting") @admin.register(Contact) class SourceAdmin(...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 13, 3166, 1400, 29889, 9794, 1053, 334, 13, 13, 13, 29992, 6406, 29889, 9573, 29898, 10900, 29897, 13, 1990, 17943, 1275...
gollahalli_cms/welcome/tests/test_apps.py
akshaybabloo/gollahalli-cms
1
1606831
<filename>gollahalli_cms/welcome/tests/test_apps.py<gh_stars>1-10 from django.apps import apps from django.test import TestCase from welcome.apps import WelcomeConfig class WelcomeConfigTests(TestCase): """ Test case for ``EditorConfig`` """ def test_welcome_config(self): """ Testing...
[ 1, 529, 9507, 29958, 29887, 324, 433, 4077, 492, 29918, 29883, 1516, 29914, 20466, 2763, 29914, 21150, 29914, 1688, 29918, 13371, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 9557, 29889, 13371, ...
main.py
jakebailey/pyright-action-test
0
118715
<reponame>jakebailey/pyright-action-test<filename>main.py from typing import List x: List[int] = [] x.append(1234) x.append("not a number")
[ 1, 529, 276, 1112, 420, 29958, 29926, 1296, 2291, 15168, 29914, 2272, 1266, 29899, 2467, 29899, 1688, 29966, 9507, 29958, 3396, 29889, 2272, 13, 3166, 19229, 1053, 2391, 13, 13, 13, 29916, 29901, 2391, 29961, 524, 29962, 353, 5159, 13, ...
cache.py
ivclab/Label_Reuse_Semisupervised
2
53497
import torch from torch import nn class Cache(nn.Module): def __init__(self, n_entries, entry_size): super(Cache, self).__init__() self.n_entries = n_entries self.entry_size = entry_size self.register_buffer( name='idx_sparse', tensor=torch.z...
[ 1, 1053, 4842, 305, 29871, 13, 3166, 4842, 305, 1053, 302, 29876, 29871, 13, 13, 1990, 28540, 29898, 15755, 29889, 7355, 1125, 29871, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 302, 29918, 26586, 29892, 6251, 29918, 2311, 1125, 29871,...
ldbcache.py
Exahilosys/ldbcache
0
39112
import pathing import collections import itertools import copy __all__ = ('Tree', 'Cache', 'Entry', 'EntryCache', 'RowCache', 'BulkRowCache', 'AlikeBulkRowCache') class Tree(dict): """ Simple **BTree** implementation. """ __slots__ = () def _make(self): """ Create ...
[ 1, 1053, 2224, 292, 13, 5215, 16250, 13, 5215, 4256, 8504, 13, 5215, 3509, 13, 13, 13, 1649, 497, 1649, 353, 6702, 9643, 742, 525, 10408, 742, 525, 9634, 742, 525, 9634, 10408, 742, 525, 4301, 10408, 742, 525, 29933, 24456, 4301, 10...
web/service/NetService.py
hao707822882/Bichon
0
88296
<gh_stars>0 # _*_ coding:utf-8 _*_ from web.broker.BrokerService import BrokerService from com.Config import Config __author__ = 'Administrator' class NetService(object): def __init__(self): self.before = {} pass '''获取net详细信息''' def getNetInfo(self, hostKey): broker = BrokerServ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 903, 29930, 29918, 14137, 29901, 9420, 29899, 29947, 903, 29930, 29918, 13, 3166, 1856, 29889, 6729, 3946, 29889, 29857, 3946, 3170, 1053, 4358, 3946, 3170, 13, 3166, 419, 29889, 3...
doppel/__init__.py
bburns632/doppel-cli
0
151194
<filename>doppel/__init__.py __all__ = [ 'PackageAPI', 'PackageCollection' ] from doppel.PackageAPI import PackageAPI from doppel.PackageCollection import PackageCollection from doppel.DoppelTestError import DoppelTestError from doppel.reporters import SimpleReporter
[ 1, 529, 9507, 29958, 1867, 17344, 29914, 1649, 2344, 26914, 2272, 13, 1649, 497, 1649, 353, 518, 13, 1678, 525, 14459, 8787, 742, 13, 1678, 525, 14459, 7196, 29915, 13, 29962, 13, 13, 3166, 437, 17344, 29889, 14459, 8787, 1053, 22029, ...
merger.py
theianrobertson/starbucks-names
0
193526
<gh_stars>0 """Merge a name and a cup""" import glob import random import os import sys from PIL import Image, ImageFilter import config def crop_image(image): """Crop an image to not include whatever is just white Parameters ---------- image : PIL image """ max_x = 0 min_x = image.width ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 15836, 479, 263, 1024, 322, 263, 18002, 15945, 29908, 13, 13, 5215, 13149, 13, 5215, 4036, 13, 5215, 2897, 13, 5215, 10876, 13, 3166, 349, 6227, 1053, 7084, 29892, 7084, ...
tests/models.py
sobolevn/django-fakery
1
144879
<filename>tests/models.py from decimal import Decimal from django import VERSION as django_version from django.contrib.postgres import fields as postgres_fields from django.db import models from django_fakery.compat import HAS_GEOS class Chef(models.Model): slug = models.SlugField() first_name = models.Char...
[ 1, 529, 9507, 29958, 21150, 29914, 9794, 29889, 2272, 13, 3166, 13677, 1053, 3826, 3039, 13, 13, 3166, 9557, 1053, 478, 1001, 13381, 408, 9557, 29918, 3259, 13, 3166, 9557, 29889, 21570, 29889, 2490, 7201, 1053, 4235, 408, 1400, 7201, 2...
src/geometry.py
nyucan/can-racecar-ros
1
166935
<reponame>nyucan/can-racecar-ros<gh_stars>1-10 #!/usr/bin/env python import numpy as np def calculate_theta(x, y): """ Extimate the theta. From -pi to pi. """ square_sum = np.sqrt(np.square(x) + np.square(y)) sin_theta = np.divide(y, square_sum) cos_theta = np.divide(x, square_sum) theta = np.zer...
[ 1, 529, 276, 1112, 420, 29958, 1460, 1682, 273, 29914, 3068, 29899, 25525, 4287, 29899, 1883, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 12655, ...
st2api/st2api/controllers/v1/actionalias.py
totalkyos/stack-storm
1
128073
<gh_stars>1-10 # Licensed to the StackStorm, Inc ('StackStorm') 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 License, Version 2.0 # (the "License"); you...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 10413, 21144, 304, 278, 10292, 855, 555, 29892, 9266, 6702, 7264, 855, 555, 1495, 1090, 697, 470, 901, 13, 29937, 17737, 3406, 19405, 8571, 4110, 29889, 29871,...
python/testData/codeInsight/controlflow/tryraisefinally.py
jnthn/intellij-community
2
195233
<reponame>jnthn/intellij-community try: raise KeyboardInterrupt finally: print 'test'
[ 1, 529, 276, 1112, 420, 29958, 29926, 20800, 29876, 29914, 28820, 29899, 23834, 13, 2202, 29901, 13, 1678, 12020, 7670, 3377, 4074, 6685, 13, 4951, 635, 29901, 13, 1678, 1596, 525, 1688, 29915, 2 ]
fjarrsyn/tests/test_agent_setup_mould_act_3.py
anderzzz/fjarrsyn
0
72661
<filename>fjarrsyn/tests/test_agent_setup_mould_act_3.py '''Integration test of agent setup of Moulder and Actuator organs with multiple output Directions and Resource Maps ''' import pytest from fjarrsyn.core.agent import Agent from fjarrsyn.core.instructor import Moulder, Actuator from fjarrsyn.core.message import ...
[ 1, 529, 9507, 29958, 29888, 4758, 2288, 948, 29914, 21150, 29914, 1688, 29918, 14748, 29918, 14669, 29918, 29885, 483, 29918, 627, 29918, 29941, 29889, 2272, 13, 12008, 23573, 362, 1243, 310, 10823, 6230, 310, 341, 483, 261, 322, 3185, 29...
__init__.py
Alex2Yang97/recommender
0
44528
<reponame>Alex2Yang97/recommender # -*- coding:utf8 -*- """ @Author: Zhirui(<NAME> @Date: 2021/4/25 下午11:07 """
[ 1, 529, 276, 1112, 420, 29958, 17406, 29906, 29979, 574, 29929, 29955, 29914, 276, 2055, 1581, 13, 29937, 448, 29930, 29899, 14137, 29901, 9420, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 29992, 13720, 29901, 27134, 381, 1481, 29898, ...
tests/conftest.py
Evpok/camphr
0
1617824
import os from pathlib import Path import omegaconf import pytest import sentencepiece as spm import torch from spacy.vocab import Vocab from camphr.lang.juman import Japanese as Juman from camphr.lang.mecab import Japanese as Mecab from camphr.models import create_model from camphr.pipelines.transformers.model impor...
[ 1, 1053, 2897, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 5215, 2703, 2442, 5527, 13, 5215, 11451, 1688, 13, 5215, 10541, 12343, 346, 408, 805, 29885, 13, 5215, 4842, 305, 13, 3166, 805, 4135, 29889, 29894, 542, 370, 1053, 478, 542, ...
tests/commands/test_release.py
williamirick/hatch
2,549
172858
import os from click.testing import CliRunner from twine.utils import TEST_REPOSITORY from hatch.cli import hatch from hatch.env import install_packages from hatch.settings import SETTINGS_FILE, copy_default_settings, save_settings from hatch.utils import env_vars, temp_chdir, temp_move_path from hatch.venv import cr...
[ 1, 1053, 2897, 13, 13, 3166, 2828, 29889, 13424, 1053, 315, 492, 16802, 13, 3166, 3252, 457, 29889, 13239, 1053, 17067, 1254, 29918, 1525, 24815, 1806, 18929, 13, 13, 3166, 298, 905, 29889, 11303, 1053, 298, 905, 13, 3166, 298, 905, 2...
test_pkg.py
rtmigo/neatest_py
3
99015
from chkpkg import Package if __name__ == "__main__": with Package() as pkg: pkg.run_python_code('import neatest; neatest.print_version()') pkg.run_shell_code('neatest --version') print("\nPackage is OK!")
[ 1, 515, 521, 29895, 15865, 1053, 22029, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 411, 22029, 580, 408, 282, 9415, 29901, 13, 4706, 282, 9415, 29889, 3389, 29918, 4691, 29918, 401, 877, 5215, 28539, 34...
pythonQuiz.py
Lakhankumawat/Python-Quiz
0
76219
<reponame>Lakhankumawat/Python-Quiz def q1(): print("hello" * 5) def q2(): x, y = 4, 5 y, x = x, y print(x) print(y) def q3(): z = 9 lst = [0] * z print(lst[:-1]) def q4(): def help(x): return x % 2 == 0 lst = [i**2 for i in range(10)] lst = filter(help, lst) print(list(lst)[::2]) def q5(): z = 0...
[ 1, 529, 276, 1112, 420, 29958, 29931, 19426, 804, 398, 1450, 271, 29914, 11980, 29899, 2182, 466, 13, 1753, 3855, 29896, 7295, 13, 12, 2158, 703, 12199, 29908, 334, 29871, 29945, 29897, 13, 13, 1753, 3855, 29906, 7295, 13, 12, 29916, ...
Protheus_WebApp/Modules/SIGAAGR/OGA250TestCase.py
98llm/tir-script-samples
17
171464
<reponame>98llm/tir-script-samples from tir import Webapp import unittest class OGA250(unittest.TestCase): @classmethod def setUpClass(inst): from datetime import datetime DateSystem = datetime.today().strftime('%d/%m/%Y') inst.oHelper = Webapp() inst.oHelper.Setup('SIGAAG...
[ 1, 529, 276, 1112, 420, 29958, 29929, 29947, 645, 29885, 29914, 29873, 381, 29899, 2154, 29899, 27736, 13, 3166, 19493, 1053, 2563, 932, 13, 5215, 443, 27958, 13, 13, 1990, 438, 12739, 29906, 29945, 29900, 29898, 348, 27958, 29889, 3057, ...
Listeners/messageListener.py
Aggis15/T4NK0R
0
126679
<filename>Listeners/messageListener.py import discord from discord.ext import commands import json import random as r from dotenv import load_dotenv import os import asyncpg import logging from PIL import Image, ImageFont, ImageDraw from resizeimage import resizeimage import requests load_dotenv() # Logging logging.b...
[ 1, 529, 9507, 29958, 1293, 264, 414, 29914, 4906, 3962, 29889, 2272, 13, 5215, 2313, 536, 13, 3166, 2313, 536, 29889, 1062, 1053, 8260, 13, 5215, 4390, 13, 5215, 4036, 408, 364, 13, 3166, 8329, 6272, 1053, 2254, 29918, 6333, 6272, 13,...
backend/unpp_api/apps/sanctionslist/migrations/0003_auto_20180615_1224.py
unicef/un-partner-portal
6
147648
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-15 12:24 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('partner', '0063_auto_20180612_0625'), ('sanctionslist', '0002_auto_20180612_1142'), ] ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3251, 630, 491, 15337, 29871, 29896, 29889, 29896, 29896, 29889, 29896, 29941, 373, 29871, 29906, 29900, 29896, 29947, 29899, 29900, 29953, 29899, 298...
exercise/2/2-5/test-all-code.py
toorevitimirp/SICP
0
51480
<reponame>toorevitimirp/SICP<gh_stars>0 import os import subprocess class Tester(object): def __init__(self, dir='./'): self.dir = dir self.report_fn = "report.txt" self.interpreter = "racket" self.suffix = ".rkt" def _program_files(self): programs_list = [] al...
[ 1, 529, 276, 1112, 420, 29958, 517, 487, 29894, 277, 17216, 29886, 29914, 29903, 2965, 29925, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2897, 13, 5215, 1014, 5014, 13, 13, 13, 1990, 323, 4156, 29898, 3318, 1125, 13, 1678, ...
dp101/lcs.py
cp105/dynamic_programming_101
0
185949
""" The longest common subsequence (LCS) problem is the problem of finding the longest subsequence common to all sequences in a set of sequences (often just two sequences). It differs from the longest common substring problem: unlike substrings, subsequences are not required to occupy consecutive positions within the ...
[ 1, 9995, 13, 13, 1576, 27217, 3619, 1014, 16506, 313, 29931, 9295, 29897, 1108, 338, 278, 1108, 310, 9138, 278, 27217, 1014, 16506, 3619, 304, 13, 497, 15602, 297, 263, 731, 310, 15602, 313, 29877, 15535, 925, 1023, 15602, 467, 13, 31...
sasquatch/error/exec.py
tmacro/s4
6
27433
from .base import SQError, BaseErrorHelper from .context import ContextAwareError class ExecutionError(SQError): '''raised when an error is encountered during script execution''' class ExecErrorHelper(BaseErrorHelper): _default = ExecutionError @staticmethod def throw(cls = ExecutionError, **kwargs): if 'ctx' i...
[ 1, 515, 869, 3188, 1053, 317, 29984, 2392, 29892, 7399, 2392, 10739, 13, 3166, 869, 4703, 1053, 15228, 29909, 2519, 2392, 13, 13, 1990, 11080, 918, 2392, 29898, 29903, 29984, 2392, 1125, 13, 12, 12008, 336, 3368, 746, 385, 1059, 338, ...
lib/rucio/core/transfer.py
ChristophAmes/rucio
0
74440
<gh_stars>0 # -*- coding: utf-8 -*- # Copyright 2013-2021 CERN # # 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 applica...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29941, 29899, 29906, 29900, 29906, 29896, 315, 1001, 29940,...
official/vision/beta/projects/yolo/modeling/factory.py
mcasanova1445/models
1
153961
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29906, 29906, 450, 323, 6073, 17907, 13189, 943, 29889, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 15...
bagpy/__init__.py
jmscslgroup/rosbagpy
107
53435
<reponame>jmscslgroup/rosbagpy # Initial Date: March 2, 2020 # Author: <NAME> # Copyright (c) <NAME>, Arizona Board of Regents # All rights reserved. from .bagreader import bagreader from .bagreader import animate_timeseries from .bagreader import create_fig
[ 1, 529, 276, 1112, 420, 29958, 29926, 1516, 2395, 29880, 2972, 29914, 1883, 23156, 2272, 13, 29937, 17250, 4712, 29901, 4779, 29871, 29906, 29892, 29871, 29906, 29900, 29906, 29900, 13, 29937, 13361, 29901, 529, 5813, 29958, 13, 29937, 1418...
Escola/views.py
JoaoGuilhermeBNascimento/DjangoAPI
0
105208
from rest_framework import serializers, viewsets from Escola.models import Aluno from Escola.serializer import AlunoSerializer class AlunosViewSet(viewsets.ModelViewSet): queryset = Aluno.objects.all() serializer_class = AlunoSerializer
[ 1, 515, 1791, 29918, 4468, 1053, 7797, 19427, 29892, 1776, 7224, 13, 3166, 3423, 15519, 29889, 9794, 1053, 838, 9447, 13, 3166, 3423, 15519, 29889, 15550, 3950, 1053, 838, 9447, 17679, 13, 13, 1990, 838, 12609, 1043, 2697, 29898, 1493, ...
slicedimage/backends/_s3.py
ttung/slicedimage
6
42305
<gh_stars>1-10 import urllib.parse from io import BytesIO from pathlib import PurePosixPath import boto3 from botocore import UNSIGNED from botocore.config import Config from ._base import Backend, verify_checksum RETRY_STATUS_CODES = frozenset({500, 502, 503, 504}) class S3Backend(Backend): CONFIG_UNSIGNED_RE...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 3142, 1982, 29889, 5510, 13, 3166, 12013, 1053, 2648, 2167, 5971, 13, 3166, 2224, 1982, 1053, 349, 545, 9135, 861, 2605, 13, 13, 5215, 289, 3747, 29941, 13, ...
setup.py
zhammer/LibCST
1
145415
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import importlib.util from os import path from typing import TYPE_CHECKING import setuptools if TYPE_CHECKING: from importlib.machiner...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 13327, 29892, 9266, 29889, 322, 967, 23736, 1078, 29889, 13, 29937, 13, 29937, 910, 2752, 775, 338, 7794, 21144, 1090, 278, 341, 1806, 19405, 1476, 297, 278, 13, 29937, 365, 2965, 1430, 1660, 934,...
src/medius/mediuspackets/respondtoclaninvitation.py
Metroynome/robo
8
191034
from enums.enums import MediusEnum, CallbackStatus from utils import utils from medius.mediuspackets.respondtoclaninvitationresponse import RespondToClanInvitationResponseSerializer class RespondToClanInvitationSerializer: data_dict = [ {'name': 'mediusid', 'n_bytes': 2, 'cast': None}, {'name': 'me...
[ 1, 515, 427, 6762, 29889, 264, 6762, 1053, 3436, 2482, 16854, 29892, 8251, 1627, 5709, 13, 3166, 3667, 29879, 1053, 3667, 29879, 13, 3166, 1612, 2482, 29889, 2168, 2482, 4058, 1691, 29889, 3636, 517, 695, 273, 11569, 7018, 5327, 1053, 2...
anime downloaders/animeblkom downloader.py
badr286/anime-stuff
0
15937
<reponame>badr286/anime-stuff from animeblkom import Animeblkom, animeblkom_episode from downloader import blkom from requests import get download_list = [] anime_url = input('Anime Url: ') # ex. https://animeblkom.net/watch/one-piece episodes = Animeblkom.get_anime_episodes(anime_url) print(f'{len(episodes...
[ 1, 529, 276, 1112, 420, 29958, 29890, 7887, 29906, 29947, 29953, 29914, 273, 603, 29899, 303, 3096, 13, 3166, 385, 603, 2204, 7218, 1053, 530, 603, 2204, 7218, 29892, 385, 603, 2204, 7218, 29918, 1022, 275, 356, 30004, 13, 3166, 5142, ...
lib/models/bn_helper.py
hongrui16/naic2020_B
0
7960
import torch import functools if torch.__version__.startswith('0'): from .sync_bn.inplace_abn.bn import InPlaceABNSync BatchNorm2d = functools.partial(InPlaceABNSync, activation='none') BatchNorm2d_class = InPlaceABNSync relu_inplace = False else: # BatchNorm2d_class = BatchNorm2d = torch.nn.SyncBa...
[ 1, 1053, 4842, 305, 13, 5215, 2090, 312, 8789, 13, 13, 361, 4842, 305, 17255, 3259, 26914, 27382, 2541, 877, 29900, 29374, 13, 1678, 515, 869, 16593, 29918, 11197, 29889, 262, 6689, 29918, 370, 29876, 29889, 11197, 1053, 512, 22150, 288...
tests/functional/Hydro/AcousticWave/CSPH_mod_package.py
jmikeowen/Spheral
22
13083
#------------------------------------------------------------------------------- # A mock physics package to mess around with the CRKSPH corrections. #------------------------------------------------------------------------------- from Spheral1d import * class CRKSPH_mod_package(Physics): def __init__(self): ...
[ 1, 396, 2683, 2683, 2683, 2683, 9072, 5634, 13, 29937, 319, 11187, 17558, 3577, 304, 4473, 2820, 411, 278, 15600, 29968, 5550, 29950, 14515, 1953, 29889, 13, 29937, 2683, 2683, 2683, 2683, 9072, 5634, 13, 3166, 317, 8096, 284, 29896, 29...
setup.py
deluxor/dcosdev
0
133345
<filename>setup.py #!/usr/bin/env python """dcosdev project""" from setuptools import find_packages, setup REQUIRES = [ 'docker==4.2.0', 'minio==5.0.8', 'requests==2.23.0', 'boto3==1.12.34', "click==7.1.1", "pyyaml==5.3.1", ] setup(name='dcosdev', version='0.0.1', description='sho...
[ 1, 529, 9507, 29958, 14669, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 15945, 29908, 29881, 3944, 3359, 2060, 15945, 29908, 13, 3166, 731, 21245, 8789, 1053, 1284, 29918, 8318, 29892, 6230, 13, 13, 1525, ...
distributed/__init__.py
merlinarer/scrl
102
148556
<reponame>merlinarer/scrl from .launch import launch from .getters import get_dist_url, scatter_values
[ 1, 529, 276, 1112, 420, 29958, 1050, 1915, 279, 261, 29914, 1557, 2096, 13, 3166, 869, 15343, 1053, 6826, 13, 3166, 869, 657, 2153, 1053, 679, 29918, 5721, 29918, 2271, 29892, 14801, 29918, 5975, 13, 2 ]
sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_async_lro.py
dmarx/azure-sdk-for-python
1
186490
<filename>sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_async_lro.py # coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from azure.core.polling.base_polling import OperationFailed, BadS...
[ 1, 529, 9507, 29958, 15348, 29914, 726, 7054, 22026, 29914, 17688, 29899, 1794, 29899, 726, 7054, 22026, 29914, 17688, 29914, 1794, 29914, 726, 7054, 22026, 19891, 12674, 29918, 29880, 307, 29889, 2272, 13, 29937, 14137, 29922, 9420, 29899, ...
ctlearn/default_models/resnet_rnn.py
sgh14/ctlearn
38
73496
import importlib import sys import tensorflow as tf LSTM_SIZE = 2048 def resnet_rnn_model(features, model_params, example_description, training): # Get hyperparameters dropout_rate = model_params['resnet_rnn'].get('dropout_rate', 0.5) # Reshape inputs into proper dimensions for (name, f), d in zip(...
[ 1, 1053, 1053, 1982, 13, 5215, 10876, 13, 13, 5215, 26110, 408, 15886, 13, 13, 29931, 1254, 29924, 29918, 14226, 353, 29871, 29906, 29900, 29946, 29947, 13, 13, 1753, 620, 1212, 29918, 29878, 15755, 29918, 4299, 29898, 22100, 29892, 1904,...
tests/python/pants_test/build_graph/test_build_file_address_mapper.py
qma/pants
0
43466
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from textw...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29946, 349, 1934, 2060, 17737, 29560, 313, 4149, 8707, 29911, 3960, 29933, 2692, 24125, 29889, 3487, 467, 13, 29937, 10413, 21144, 1090, 278, 1338...
tests/test_basic.py
blue-yonder/cee_syslog_handler
7
192216
<reponame>blue-yonder/cee_syslog_handler<filename>tests/test_basic.py from cee_syslog_handler import get_fields class Record(object): def __init__(self, value=None): if value: self.some_column = value def check_single_value(value): record = Record(value) message_dict = get_fields({},...
[ 1, 529, 276, 1112, 420, 29958, 9539, 29899, 29891, 8417, 29914, 346, 29872, 29918, 9675, 1188, 29918, 13789, 29966, 9507, 29958, 21150, 29914, 1688, 29918, 16121, 29889, 2272, 13, 3166, 2257, 29872, 29918, 9675, 1188, 29918, 13789, 1053, 67...
network/evaluate_keypoints.py
mhsung/deep-functional-dictionaries
41
3233
# <NAME> (<EMAIL>) # April 2018 import os, sys BASE_DIR = os.path.normpath( os.path.join(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(os.path.join(BASE_DIR, '..')) from datasets import * from generate_outputs import * from scipy.optimize import linear_sum_assignment #import matplotlib.pyplot a...
[ 1, 396, 529, 5813, 29958, 313, 29966, 26862, 6227, 12948, 13, 29937, 3786, 29871, 29906, 29900, 29896, 29947, 13, 13, 5215, 2897, 29892, 10876, 13, 25416, 29918, 9464, 353, 2897, 29889, 2084, 29889, 12324, 2084, 29898, 13, 4706, 2897, 298...
coursera/python_programming_basics/1_week_01.py
anklav24/Python-Education
0
120175
<reponame>anklav24/Python-Education<filename>coursera/python_programming_basics/1_week_01.py print('Hello, world.') print('Hello, Python!') print(2 + 3) print('2' * 3) print(f'2 + 3 = {2 + 3}') print('1', '2', '3', sep=' + ', end=' ') print('=', 1 + 2 + 3, end='') print('!')
[ 1, 529, 276, 1112, 420, 29958, 804, 4112, 29906, 29946, 29914, 11980, 29899, 29923, 29392, 29966, 9507, 29958, 29883, 473, 643, 29874, 29914, 4691, 29918, 28426, 29918, 6500, 1199, 29914, 29896, 29918, 18448, 29918, 29900, 29896, 29889, 2272,...
catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/contracts/enabling.py
johnson880319/Software
13
147230
<reponame>johnson880319/Software<gh_stars>10-100 from . import logger import os class Switches: # default to ENV variable disable_all = os.environ.get('DISABLE_CONTRACTS', False) def disable_all(): """ Disables all contracts checks. """ # print('disable_all()') Switches.disable_all = True lo...
[ 1, 529, 276, 1112, 420, 29958, 29926, 6547, 1100, 29947, 29947, 29900, 29941, 29896, 29929, 29914, 6295, 14093, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 869, 1053, 17927, 13, 5215, 2897, 13,...
google-challenge-problems/answer_Q2a.py
kevin-orr/Python
0
89134
__author__ = 'kevinorr' """ This was my attempt at the first part of Q2 in a Google challenge about maximising the number of bunnies in train cars... It passed the 'verify' section - all the tests passed. """ from collections import Counter def answer(x): """ sort the list and find out what the mode would ...
[ 1, 4770, 8921, 1649, 353, 525, 446, 3845, 25891, 29915, 13, 13, 15945, 29908, 13, 4013, 471, 590, 4218, 472, 278, 937, 760, 310, 660, 29906, 297, 263, 5087, 18766, 1048, 5256, 5921, 278, 1353, 310, 289, 5963, 583, 297, 7945, 18647, ...
Participants/Pixel Soup/src/frontend/networking/net_interface.py
python-discord/game-jam-2020
15
116166
import socket from pickle import loads, dumps class Pipe: def __init__(self, server: str, port: int) -> None: self.server = server self.port = port self.tcp = socket.socket() self.udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.connected = False self.use...
[ 1, 1053, 9909, 13, 3166, 5839, 280, 1053, 15376, 29892, 270, 17204, 13, 13, 13, 1990, 7362, 412, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1923, 29901, 851, 29892, 2011, 29901, 938, 29897, 1599, 6213, 29901, 13, 4706, 1583, ...
pgoapi/protos/pogoprotos/data/telemetry/battle_party_telemetry_pb2.py
SkOODaT/Pgoapi
1
167654
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: pogoprotos/data/telemetry/battle_party_telemetry.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from go...
[ 1, 396, 3251, 630, 491, 278, 9608, 6835, 6516, 29889, 29871, 11662, 6058, 11488, 29991, 13, 29937, 2752, 29901, 22086, 459, 5450, 359, 29914, 1272, 29914, 371, 2409, 27184, 29914, 29890, 5315, 29918, 22633, 29918, 371, 2409, 27184, 29889, ...
landlab/components/steepness_index/channel_steepness.py
amanaster2/landlab
4
1611473
# -*- coding: utf-8 -*- """Created on Mon Oct 19. @author: dejh """ import numpy as np from landlab import Component class SteepnessFinder(Component): """This component calculates steepness indices, sensu Wobus et al. 2006, for a Landlab landscape. Follows broadly the approach used in GeomorphTools, g...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 20399, 373, 2598, 4756, 29871, 29896, 29929, 29889, 13, 13, 29992, 8921, 29901, 26751, 29882, 13, 15945, 29908, 13, 13, 13, 5215, 12655, 40...
DailyProgrammer/DP20160926A.py
DayGitH/Python-Challenges
2
105053
<filename>DailyProgrammer/DP20160926A.py """ [2016-09-26] Challenge #285 [Easy] Cross Platform/Language Data Encoding part 1 https://www.reddit.com/r/dailyprogrammer/comments/54lu54/20160926_challenge_285_easy_cross/ We will make a binary byte oriented encoding of data that is self describing and extensible, and aims...
[ 1, 529, 9507, 29958, 29928, 8683, 9283, 1050, 29914, 11191, 29906, 29900, 29896, 29953, 29900, 29929, 29906, 29953, 29909, 29889, 2272, 13, 15945, 29908, 13, 29961, 29906, 29900, 29896, 29953, 29899, 29900, 29929, 29899, 29906, 29953, 29962, ...
flask_web_app.py
mrsixw/git-statistics
0
58777
#!/usr/bin/env python import sqlite3 import os import plotly import json from flask import Flask, render_template, session, g from flask_bootstrap import Bootstrap from git_insight_generator import generate_branch_insight, generate_monthly_commit_data, generate_month_change_data, generate_commit_time_of_day import lo...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 21120, 29941, 13, 13, 5215, 2897, 13, 5215, 6492, 368, 13, 5215, 4390, 13, 3166, 29784, 1053, 2379, 1278, 29892, 4050, 29918, 6886, 29892, 4867, 29892, 330, 13, 3166, 29784, ...
registrations/tasks.py
praekeltfoundation/nurseconnect-registration
0
117983
from datetime import datetime from urllib.parse import urljoin import requests from celery.exceptions import SoftTimeLimitExceeded from django.conf import settings from requests.exceptions import RequestException from temba_client.exceptions import TembaException from temba_client.utils import format_iso8601 from nur...
[ 1, 515, 12865, 1053, 12865, 13, 3166, 3142, 1982, 29889, 5510, 1053, 3142, 7122, 13, 13, 5215, 7274, 13, 3166, 6432, 708, 29889, 11739, 29879, 1053, 1105, 615, 2481, 24445, 1252, 3947, 287, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, ...
openbook_posts/migrations/0036_auto_20190620_1957.py
TamaraAbells/okuna-api
164
181159
# Generated by Django 2.2.2 on 2019-06-20 17:57 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('openbook_common', '0013_language'), ('openbook_posts', '0035_auto_20190620_1357'), ] operations = [ ...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29906, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29900, 29953, 29899, 29906, 29900, 29871, 29896, 29955, 29901, 29945, 29955, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, ...
src/spring-cloud/azext_spring_cloud/_validators_enterprise.py
SanyaKochhar/azure-cli-extensions
2
16247
<gh_stars>1-10 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 2683, 2683, 2683, 2683, 2683, 1378, 5634, 13, 29937, 14187, 1266, 313, 29883, 29897, 7783, 15025, 29889, 2178, 10462, 21676, 29889, 13, 29937, 10413, 21144,...
lista_par_impar.py
isaberamos/Programinhas
1
172490
princ = [[], []] valor = 0 for c in range(1,8): valor = int(input(f"Digite o {c}º valor: ")) if valor % 2 == 0: princ[0].append(valor) else: if valor % 2 != 0: princ[1].append(valor) princ[0].sort() princ[1].sort() print(f"Os números pares são: {princ[0]}") print(f"Os números ímp...
[ 1, 544, 3742, 353, 5519, 1402, 5159, 29962, 13, 791, 272, 353, 29871, 29900, 13, 1454, 274, 297, 3464, 29898, 29896, 29892, 29947, 1125, 13, 1678, 16497, 353, 938, 29898, 2080, 29898, 29888, 29908, 14991, 568, 288, 426, 29883, 29913, 30...
fancylog/tools/git.py
stephenlenzi/fancylog
3
174050
""" git =============== Wrappers around gitpython to return information about the git repository for debugging """ class GitPythonError(Exception): """ Exception if gitpython cannot be found (Typical in production environments). """ pass class GitEnvironmentError(Exception): """ Excep...
[ 1, 9995, 13, 5559, 13, 4936, 2751, 25512, 13, 13, 29956, 336, 22437, 2820, 6315, 4691, 304, 736, 2472, 1048, 278, 6315, 9810, 13, 1454, 13490, 13, 13, 15945, 29908, 13, 13, 13, 1990, 11786, 11980, 2392, 29898, 2451, 1125, 13, 1678, ...
project/acorta/models.py
cborao/Django-url-shortener
0
135088
<filename>project/acorta/models.py from django.db import models class Content(models.Model): key = models.CharField(max_length=200) url = models.CharField(max_length=200) def __str__(self): return self.key + ": " + self.url
[ 1, 529, 9507, 29958, 4836, 29914, 562, 441, 29874, 29914, 9794, 29889, 2272, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 13, 1990, 10576, 29898, 9794, 29889, 3195, 1125, 13, 1678, 1820, 353, 4733, 29889, 27890, 29898, 3317, 29918, 2848, ...
users/tokens.py
maks-nurgazy/diploma-project
0
27165
<reponame>maks-nurgazy/diploma-project from rest_framework_simplejwt.tokens import RefreshToken def get_jwt_tokens_for_user(user, **kwargs): """ Generates a refresh token for the valid user """ refresh = RefreshToken.for_user(user) return str(refresh), str(refresh.access_token)
[ 1, 529, 276, 1112, 420, 29958, 29885, 10327, 29899, 29876, 2007, 24683, 29914, 6051, 572, 4125, 29899, 4836, 13, 3166, 1791, 29918, 4468, 29918, 12857, 29926, 14554, 29889, 517, 12360, 1053, 9897, 3781, 6066, 13, 13, 13, 1753, 679, 29918,...
src/database/academics_db.py
git-vish/CodeSpaceAPI
1
119835
<filename>src/database/academics_db.py<gh_stars>1-10 """Database operations for Academics API. """ # Author Info __author__ = '<NAME>' __date__ = '10/07/21' __email__ = '<EMAIL>' # Library Imports from typing import Dict, List, Optional # Own Imports from src.settings import BASE_SUBJECT, BASE_LAB, BASE_RESOURCE d...
[ 1, 529, 9507, 29958, 4351, 29914, 9803, 29914, 562, 18401, 1199, 29918, 2585, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 9112, 6931, 363, 16146, 1199, 3450, 29889, 13, 15945, 29908, 13,...
inkcut-master/inkcut/device/protocols/debug.py
ilnanny/Inkscape-addons
3
27189
# -*- coding: utf-8 -*- ''' Created on Oct 23, 2015 @author: jrm ''' from inkcut.device.plugin import DeviceProtocol from inkcut.core.utils import async_sleep, log class DebugProtocol(DeviceProtocol): """ A protocol that just logs what is called """ def connection_made(self): log.debug("protocol.conn...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 12008, 13, 20399, 373, 4756, 29871, 29906, 29941, 29892, 29871, 29906, 29900, 29896, 29945, 13, 13, 29992, 8921, 29901, 432, 1758, 13, 12008, 13, 3166, 2...
sym_executor.py
zhangzhenghsy/fiber
0
12614
#!/usr/bin/python import angr,simuvex import sys,os import time from utils_sig import * from sym_tracer import Sym_Tracer from sig_recorder import Sig_Recorder #This class is responsible for performing symbolic execution. class Sym_Executor(object): def __init__(self,options=None,dbg_out=False): self.trace...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 5215, 385, 629, 29892, 3601, 29884, 13809, 13, 5215, 10876, 29892, 359, 13, 5215, 931, 13, 3166, 3667, 29879, 29918, 18816, 1053, 334, 13, 3166, 5016, 29918, 29873, 945, 261, 1053, 10667, 29...
src/ebay_rest/rates.py
gbm001/ebay_rest
0
100077
# Standard library imports from datetime import timedelta import threading import logging import math import time # Local imports from .date_time import DateTime from .error import Error from .multiton import Multiton @Multiton # return the same object when the __init__ params are identical class Rates: """ Man...
[ 1, 396, 10117, 3489, 24802, 13, 3166, 12865, 1053, 5335, 287, 2554, 13, 5215, 3244, 292, 13, 5215, 12183, 13, 5215, 5844, 13, 5215, 931, 13, 13, 29937, 9959, 24802, 13, 3166, 869, 1256, 29918, 2230, 1053, 12315, 13, 3166, 869, 2704, ...
tests/test_bus.py
MaLiN2223/py_proj_transport
0
157475
""" This file contains test for Bus class """ import sys import pytest from simulation import Bus from simulation.line import Line, LineStop from simulation.passenger_group import PassengersGroup from utils.TestsBase import TestBase from utils.helpers import get_full_class_name if sys.version_info[0] >= 3: impor...
[ 1, 9995, 13, 4013, 934, 3743, 1243, 363, 8406, 770, 13, 15945, 29908, 13, 5215, 10876, 13, 13, 5215, 11451, 1688, 13, 13, 3166, 17402, 1053, 8406, 13, 3166, 17402, 29889, 1220, 1053, 7407, 29892, 7407, 16329, 13, 3166, 17402, 29889, 3...
coding/learn_pytest/bak/test_anothersmtp.py
yatao91/learning_road
3
57478
<filename>coding/learn_pytest/bak/test_anothersmtp.py # -*- coding: utf-8 -*- smtpserver = "smtp.qq.com" # will be read by smtp fixture def test_showhelo(smtp_connection): assert 0, smtp_connection.helo()
[ 1, 529, 9507, 29958, 29883, 3689, 29914, 19668, 29918, 2272, 1688, 29914, 29890, 557, 29914, 1688, 29918, 273, 720, 414, 4378, 29886, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3844,...
utils.py
sWizad/HashNeRF-pytorch
0
12007
import json import numpy as np import pdb import torch from ray_utils import get_rays, get_ray_directions, get_ndc_rays BOX_OFFSETS = torch.tensor([[[i,j,k] for i in [0, 1] for j in [0, 1] for k in [0, 1]]], device='cuda') SQR_OFFSETS = torch.tensor([[[i,j] for i in [0, 1] for j in [0,...
[ 1, 1053, 4390, 13, 5215, 12655, 408, 7442, 13, 5215, 282, 2585, 13, 5215, 4842, 305, 13, 13, 3166, 15570, 29918, 13239, 1053, 679, 29918, 764, 29879, 29892, 679, 29918, 764, 29918, 20146, 1953, 29892, 679, 29918, 299, 29883, 29918, 764,...
models/discriminator.py
arminalgln/graphpmu
0
144930
<reponame>arminalgln/graphpmu import torch import torch.nn as nn import torch.nn.functional as F class Discriminator(nn.Module): def __init__(self, n_feat, n_hidden1, n_hidden2): super(Discriminator, self).__init__() self.fc1 = nn.Linear(n_feat, n_hidden1) self.fc2 = nn.Linear(n_hidden1, n_...
[ 1, 529, 276, 1112, 420, 29958, 2817, 979, 29887, 3083, 29914, 4262, 29886, 2589, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 13, 1990, 856...
DeepLearningExamples/TensorFlow/LanguageModeling/BERT/run_classifier.py
puririshi98/benchmark
0
208
# coding=utf-8 # Copyright (c) 2019 NVIDIA CORPORATION. All rights reserved. # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29929, 405, 13044, 10764, 315, 1955, 29925, 1955, 8098, 29889, 2178, 10462, 21676, 29889, 13, 29937, 14187, 1266, 29871, 29906, ...
main.py
Spferical/matrix-megahal
7
193354
#!/usr/bin/env python3 import time from matrix_client.client import MatrixClient from matrix_client.api import MatrixRequestError from requests.exceptions import ConnectionError, Timeout import argparse import random from configparser import ConfigParser import re import traceback import urllib.parse import logging imp...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 5215, 931, 13, 3166, 4636, 29918, 4645, 29889, 4645, 1053, 22513, 4032, 13, 3166, 4636, 29918, 4645, 29889, 2754, 1053, 22513, 3089, 2392, 13, 3166, 7274, 29889, 11739, 29879, 105...
VCD/utils/data_utils.py
Xingyu-Lin/VCD
25
170657
<reponame>Xingyu-Lin/VCD<filename>VCD/utils/data_utils.py<gh_stars>10-100 import numpy as np import torch from torch_geometric.data import Data import torch_geometric class PrivilData(Data): """ Encapsulation of multi-graphs for multi-step training ind: 0-(hor-1), type: vsbl or full Each graph contain...
[ 1, 529, 276, 1112, 420, 29958, 29990, 292, 29891, 29884, 29899, 11667, 29914, 29963, 6530, 29966, 9507, 29958, 29963, 6530, 29914, 13239, 29914, 1272, 29918, 13239, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 2989...
spectroscope/__init__.py
peterblockman/spectroscope
0
70985
<reponame>peterblockman/spectroscope import logging def log(): logging.basicConfig(level=logging.DEBUG) return logging.getLogger("spectroscope")
[ 1, 529, 276, 1112, 420, 29958, 29886, 1308, 1271, 1171, 29914, 21494, 1883, 4338, 13, 5215, 12183, 13, 13, 13, 1753, 1480, 7295, 13, 1678, 12183, 29889, 16121, 3991, 29898, 5563, 29922, 21027, 29889, 18525, 29897, 13, 1678, 736, 12183, ...
backend/optimizer.py
SINTEF-SE/PySSMic
0
1600045
import logging import math from collections import defaultdict from enum import Enum from itertools import chain from random import randint, random from typing import List import numpy as np from scipy import optimize import util.optimizer_utils as utils class Algorithm(Enum): """The currently possible algorithm...
[ 1, 1053, 12183, 13, 5215, 5844, 13, 3166, 16250, 1053, 2322, 8977, 13, 3166, 14115, 1053, 1174, 398, 13, 3166, 4256, 8504, 1053, 9704, 13, 3166, 4036, 1053, 20088, 524, 29892, 4036, 13, 3166, 19229, 1053, 2391, 13, 13, 5215, 12655, 40...
tests/IntegrationTest.py
CBurbidge/Cloudfigure
1
1611540
import unittest import cloudfigure as cf from unittest import mock import os, json from os import listdir from os.path import isfile, join class MockCfn: def __init__(self, directory_path): self.calls = {} describe_files = [f for f in listdir(directory_path) if f.startswith("DescribeStack_")] ...
[ 1, 1053, 443, 27958, 13, 5215, 9570, 4532, 408, 274, 29888, 13, 3166, 443, 27958, 1053, 11187, 13, 5215, 2897, 29892, 4390, 13, 3166, 2897, 1053, 1051, 3972, 13, 3166, 2897, 29889, 2084, 1053, 338, 1445, 29892, 5988, 13, 13, 1990, 262...
ww/api/admin.py
basilpork/watchword
1
76661
from django.contrib import admin from ww.api.models import Watch, Ping, Flare, Launch @admin.register(Watch) class WatchAdmin(admin.ModelAdmin): list_display = ('id', 'name', 'created', 'word', 'state', 'status', 'last_ping',) @admin.register(Ping) class PingAdmin(admin.ModelAdmin): list_display = ('id', 'cr...
[ 1, 515, 9557, 29889, 21570, 1053, 4113, 13, 13, 3166, 7673, 29889, 2754, 29889, 9794, 1053, 24274, 29892, 349, 292, 29892, 383, 8663, 29892, 997, 3322, 13, 13, 29992, 6406, 29889, 9573, 29898, 24709, 29897, 13, 1990, 24274, 12754, 29898, ...
tests/test_token.py
codingjerk/visiology-py
1
134071
from datetime import datetime from typing import Callable from unittest.mock import Mock, patch import visiology_py as vi from tests.fixtures import * def test_token_expires( expire_date: datetime, before_expire_date: datetime, after_expire_date: datetime, fixed_datetime: Callable[[datetime], Mock], ...
[ 1, 515, 12865, 1053, 12865, 13, 3166, 19229, 1053, 8251, 519, 13, 3166, 443, 27958, 29889, 17640, 1053, 26297, 29892, 13261, 13, 13, 5215, 1998, 29875, 3002, 29918, 2272, 408, 3516, 13, 3166, 6987, 29889, 7241, 486, 1973, 1053, 334, 13,...
modules/mbox/uatg_mbox_divu_insts_01.py
incoresemi/chromite_uatg_tests
3
86789
from random import choice, getrandbits from typing import Dict, List, Union, Any from uatg.instruction_constants import base_reg_file, mext_instructions from yapsy.IPlugin import IPlugin class uatg_mbox_divu_insts_01(IPlugin): """ The class contains the division instructions ( div, divu, divw, divuw, ...
[ 1, 515, 4036, 1053, 7348, 29892, 679, 9502, 14836, 13, 3166, 19229, 1053, 360, 919, 29892, 2391, 29892, 7761, 29892, 3139, 13, 13, 3166, 318, 271, 29887, 29889, 2611, 4080, 29918, 3075, 1934, 1053, 2967, 29918, 1727, 29918, 1445, 29892, ...
data_processor.py
ZouJoshua/deeptext_project
2
46507
#!/usr/bin/env python # coding:utf8 # Copyright (c) 2018, Tencent. All rights reserved # This file contain DataProcessor class which can # 1. Generate dict from train text data: # Text format: label\t[(token )+]\t[(char )+]\t[(custom_feature )+]. # Label could be flattened or hierarchical which is separat...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 9420, 29947, 13, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 29892, 12444, 1760, 29889, 2178, 10462, 21676, 13, 13, 29937, 910, 934, ...