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
slimano/core/persistence/models/nst.py
ATNoG/5gcontact
1
123562
from persistence.models.models_base import Base from sqlalchemy import Column, Integer, String class Nst(Base): __tablename__ = 'nst' id = Column(String(40), primary_key=True) name = Column(String(16)) template = Column(String(10000))
[ 1, 515, 3736, 11416, 29889, 9794, 29889, 9794, 29918, 3188, 1053, 7399, 13, 3166, 4576, 284, 305, 6764, 1053, 12481, 29892, 8102, 29892, 1714, 13, 13, 13, 1990, 405, 303, 29898, 5160, 1125, 13, 1678, 4770, 3891, 2435, 420, 1649, 353, ...
scripts/init.py
LCAS/spqrel_tools
9
80923
#!/usr/bin/env python import qi import argparse import sys import time import os import webinit, postureinit, behaviorinit, manage_BG_behaviors, tmuxinit def main(): parser = argparse.ArgumentParser() parser.add_argument("--pip", type=str, default=os.getenv('PEPPER_IP'), help="Robot I...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 3855, 29875, 13, 5215, 1852, 5510, 13, 5215, 10876, 13, 5215, 931, 13, 5215, 2897, 13, 13, 5215, 1856, 2344, 29892, 1400, 545, 2344, 29892, 6030, 2344, 29892, 10933, 29918, ...
disturbance/migrations/0006_auto_20180618_1556.py
wilsonc86/ledger
0
66528
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-06-18 07:56 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('disturbance', '0005_auto_20180618_1123'), ] operations = [ migrations.RemoveField( ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3251, 630, 491, 15337, 29871, 29896, 29889, 29896, 29900, 29889, 29947, 373, 29871, 29906, 29900, 29896, 29947, 29899, 29900, 29953, 29899, 29896, 299...
time_management/main.py
AyushRawal/time-management
1
187021
<gh_stars>1-10 from interface_mode import run_menu_loop_mode from facade import DatabaseFacade import os def main(): print("Welcome to Time Management!\n\n") database = os.path.join(os.path.dirname(__file__), "time_management.db") database_facade = DatabaseFacade(database) run_menu_loop_mode(database_...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 5067, 29918, 8513, 1053, 1065, 29918, 6510, 29918, 7888, 29918, 8513, 13, 3166, 4024, 1943, 1053, 5470, 29943, 562, 1943, 13, 5215, 2897, 13, 13, 13, 1753, 16...
ssplanner/coresetup/models.py
AravinthKannan/Bharathi
0
81921
<reponame>AravinthKannan/Bharathi # -*- coding: utf-8 -*- # python manage.py make migrations your_app_label # python manage.py migrate --fake-initial your_app_label from __future__ import unicode_literals from django.db import models #from django.contrib.auth.models import User from django.contrib.auth.models import ...
[ 1, 529, 276, 1112, 420, 29958, 29909, 336, 3845, 386, 29968, 812, 273, 29914, 29933, 8222, 493, 29875, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3017, 10933, 29889, 2272, 1207, 9725, 80...
Packs/Pcysys/Integrations/Pcysys/Pcysys_test.py
diCagri/content
799
158790
import demistomock as demisto import jwt from Pcysys import Client, pentera_run_template_command, pentera_get_task_run_status_command, \ pentera_get_task_run_full_action_report_command, pentera_authentication MOCK_PENTERA_FULL_ACTION_REPORT = 'penterascan-5e4530961deb8eda82b08730.csv' MOCK_CSV = open('TestData/m...
[ 1, 1053, 1261, 391, 290, 1698, 408, 1261, 5137, 13, 5215, 432, 14554, 13, 13, 3166, 349, 29883, 952, 952, 1053, 12477, 29892, 11137, 1572, 29918, 3389, 29918, 6886, 29918, 6519, 29892, 11137, 1572, 29918, 657, 29918, 7662, 29918, 3389, ...
src/python/weblyzard_api/client/openrdf/__init__.py
PhilippKuntschik/weblyzard_api
9
94646
<reponame>PhilippKuntschik/weblyzard_api<gh_stars>1-10 #!/usr/bin/python # -*- coding: utf8 -*- ''' Created on 19.12.2013 @author: heinz-peterlang For details: `check Sesame REST API<http://openrdf.callimachus.net/sesame/2.7/docs/system.docbook?view#The_Sesame_REST_HTTP_Protocol>`_ http://www.csee.umbc.edu/courses/g...
[ 1, 529, 276, 1112, 420, 29958, 4819, 2638, 407, 29968, 1657, 816, 638, 29914, 2676, 368, 29920, 538, 29918, 2754, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 299...
homeassistant/components/sensor/verisure.py
beschouten/home-assistant
1
16894
""" Interfaces with Verisure sensors. For more details about this platform, please refer to the documentation at documentation at https://home-assistant.io/components/verisure/ """ import logging from homeassistant.components.verisure import HUB as hub from homeassistant.const import TEMP_CELSIUS from homeassistant.h...
[ 1, 9995, 13, 4074, 8726, 411, 1798, 275, 545, 4771, 943, 29889, 13, 13, 2831, 901, 4902, 1048, 445, 7481, 29892, 3113, 2737, 304, 278, 5106, 472, 13, 12663, 472, 2045, 597, 5184, 29899, 465, 22137, 29889, 601, 29914, 14036, 29914, 369...
src/solutions/188.py
bshankar/euler
0
124994
<reponame>bshankar/euler<filename>src/solutions/188.py def hyperpower(n, k): n_ = n for i in range(k-1): n_ = n**n_ % 100 return n_ print hyperpower(1777, 1855)
[ 1, 529, 276, 1112, 420, 29958, 29890, 845, 804, 279, 29914, 29872, 8584, 29966, 9507, 29958, 4351, 29914, 2929, 17925, 29914, 29896, 29947, 29947, 29889, 2272, 13, 1753, 11266, 13519, 29898, 29876, 29892, 413, 1125, 13, 1678, 302, 29918, ...
source_code/day021/snake.py
Zapdos26-Forks/100daysofcode
0
1608085
<filename>source_code/day021/snake.py from turtle import Turtle import math class Snake: def __init__(self): self.segments = [] self.starting_position = [ (0, 0), (-20, 0), (-40, 0)] self.move_distance = 20 self.directions = {'up': 90, 'down': 270, 'left': 180, 'right'...
[ 1, 529, 9507, 29958, 4993, 29918, 401, 29914, 3250, 29900, 29906, 29896, 29914, 29879, 21040, 29889, 2272, 13, 3166, 260, 4227, 280, 1053, 323, 4227, 280, 13, 5215, 5844, 13, 13, 13, 1990, 317, 21040, 29901, 13, 13, 1678, 822, 4770, 2...
src/while_exit.py
Alex9808/py101
25
16150
<reponame>Alex9808/py101<gh_stars>10-100 #!/usr/bin/env python ''' Este programa se repetirá 3 veces o hasta que se ingrese la palabra "despedida" y desplegará sólo el número de intentos fallidos hasta que cualquiera de los eventos ocurentradara. Al ingresar la palabra "termina" el programa se detendr...
[ 1, 529, 276, 1112, 420, 29958, 17406, 29929, 29947, 29900, 29947, 29914, 2272, 29896, 29900, 29896, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 30004...
easy-receptive-fields-pytorch/receptivefield/tests/test_pytorch.py
Swinsie/cv-rep-fork
0
29989
<filename>easy-receptive-fields-pytorch/receptivefield/tests/test_pytorch.py import pytest import torch.nn as nn from numpy.testing import assert_allclose from receptivefield.pytorch import PytorchReceptiveField from receptivefield.image import get_default_image from receptivefield.types import ImageShape class Linea...
[ 1, 529, 9507, 29958, 29872, 8995, 29899, 276, 1547, 573, 29899, 9621, 29899, 2272, 7345, 305, 29914, 276, 1547, 573, 2671, 29914, 21150, 29914, 1688, 29918, 2272, 7345, 305, 29889, 2272, 13, 5215, 11451, 1688, 13, 5215, 4842, 305, 29889, ...
setup.py
anthonyvallee/bettejpeg
1
35798
<reponame>anthonyvallee/bettejpeg<gh_stars>1-10 from setuptools import (find_packages, setup) from rap import betterjpeg setup( name=betterjpeg.__pkgname__, description=betterjpeg.__description__, version=betterjpeg.__version__, packages=["rap.betterjpeg"], entry_points=""" [cons...
[ 1, 529, 276, 1112, 420, 29958, 9716, 2592, 791, 17179, 29914, 29890, 2353, 26568, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 731, 21245, 8789, 1053, 313, 2886, 29918, 8318, 29892, 6230, 8443, 13, 30004, 1...
a10sdk/core/ip/ip_as_path.py
deepfield/a10sdk-python
16
73003
<filename>a10sdk/core/ip/ip_as_path.py from a10sdk.common.A10BaseClass import A10BaseClass class AsPath(A10BaseClass): """Class Description:: Configure an AS-path list for BGP. Class as-path supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for ...
[ 1, 529, 9507, 29958, 29874, 29896, 29900, 15348, 29914, 3221, 29914, 666, 29914, 666, 29918, 294, 29918, 2084, 29889, 2272, 13, 3166, 263, 29896, 29900, 15348, 29889, 9435, 29889, 29909, 29896, 29900, 5160, 2385, 1053, 319, 29896, 29900, 51...
asyncapi/events/backends/gcloud_pubsub.py
dutradda/doodle
34
137471
import asyncio import functools import secrets from concurrent.futures import ThreadPoolExecutor from concurrent.futures import TimeoutError as FutureTimeoutError from logging import Logger, getLogger from typing import TYPE_CHECKING, Any, Dict, Tuple from urllib.parse import urlparse from broadcaster._backends.base i...
[ 1, 1053, 408, 948, 3934, 13, 5215, 2090, 312, 8789, 13, 5215, 22183, 1372, 13, 3166, 21984, 29889, 29888, 329, 1973, 1053, 10480, 11426, 13366, 13, 3166, 21984, 29889, 29888, 329, 1973, 1053, 5974, 449, 2392, 408, 16367, 10851, 2392, 13...
Yellow_Pages_Lithuania/unit_tests.py
Jay4C/Web-Scraping
1
70
<gh_stars>1-10 import time from bs4 import BeautifulSoup import requests import pymysql.cursors import unittest class UnitTestsDataMinerYellowPagesLithuania(unittest.TestCase): def test_extract_one_email(self): url = "https://www.visalietuva.lt/en/company/astorija-hotel-uab" # Request the content...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 931, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 5215, 7274, 13, 5215, 282, 962, 952, 1519, 29889, 29883, 1295, 943, 13, 5215, 443, 27958, 13, 13, ...
beancount_gmail/debug_handling.py
kubauk/beancount-import-gmail
1
184069
<reponame>kubauk/beancount-import-gmail import datetime from os import PathLike from typing import Union, AnyStr, Callable, IO, Optional import jsonpickle import os from mailbox import Message from beancount_gmail.email_parser_protocol import EmailParser from beancount_gmail.receipt import Receipt DEBUGGING_DATA_DIR...
[ 1, 529, 276, 1112, 420, 29958, 29895, 431, 585, 29895, 29914, 14471, 2798, 29899, 5215, 29899, 21980, 13, 5215, 12865, 13, 3166, 2897, 1053, 10802, 27552, 13, 3166, 19229, 1053, 7761, 29892, 3139, 5015, 29892, 8251, 519, 29892, 10663, 298...
Slide21/calculadora_python.py
yuutognr/MiniCursoPython2020
2
31118
a = 2 ** 50 b = 2 ** 50 * 3 c = 2 ** 50 * 3 - 1000 d = 400 / 2 ** 50 + 50 print(a,b,c,d)
[ 1, 263, 353, 29871, 29906, 3579, 29871, 29945, 29900, 13, 29890, 353, 29871, 29906, 3579, 29871, 29945, 29900, 334, 29871, 29941, 13, 29883, 353, 29871, 29906, 3579, 29871, 29945, 29900, 334, 29871, 29941, 448, 29871, 29896, 29900, 29900, 2...
4_vrf_verification/main.py
gve-sw/gve_devnet_dnac_automation_workshop
0
87213
<gh_stars>0 """ Copyright (c) 2022 Cisco and/or its affiliates. This software is licensed to you under the terms of the Cisco Sample Code License, Version 1.1 (the "License"). You may obtain a copy of the License at https://developer.cisco.com/docs/licenses All use of the material herein must be in accordanc...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29906, 315, 275, 1111, 322, 29914, 272, 967, 23736, 1078, 29889, 13, 4013, 7047, 338, 7794, 21144, 304, 366, 1090...
src/test_ptmod.py
LuDubies/Differender
4
147508
<filename>src/test_ptmod.py<gh_stars>1-10 import torch from torch.autograd import gradcheck from torchvtk.datasets import TorchDataset import matplotlib.pyplot as plt from transfer_functions import get_tf from pytorch_module import Raycaster from torchvision.utils import save_image tf = torch.from_numpy(get_tf('tf1'...
[ 1, 529, 9507, 29958, 4351, 29914, 1688, 29918, 415, 1545, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 29889, 1300, 468, 3665, 1053, 4656, 3198, 13, 3166, 4842, ...
eots/serializers.py
lextoumbourou/eyeofthestorm
0
93132
<reponame>lextoumbourou/eyeofthestorm<filename>eots/serializers.py """ Eventually we'll probably want to add some decent serialization support. For now - this is a pass through. Patches accepted :) """ class Serializer(object): def serialize(cls, obj): return obj def is_valid(self): return Tr...
[ 1, 529, 276, 1112, 420, 29958, 280, 486, 283, 29885, 6526, 283, 29914, 1032, 29872, 974, 386, 342, 555, 29966, 9507, 29958, 29872, 1862, 29914, 15550, 19427, 29889, 2272, 13, 15945, 29908, 13, 2624, 1474, 591, 29915, 645, 3117, 864, 304...
StatM/__init__.py
Blaizzy/Boring_weekends
3
107040
from StatM import Bisection, Regula_Falsi, Secant
[ 1, 515, 6666, 29924, 1053, 350, 895, 428, 29892, 2169, 2497, 29918, 29943, 284, 1039, 29892, 5356, 424, 13, 2 ]
util.py
mobarski/smash
0
176152
import re def flag(value): "convert value to integer bool type" s = str(value).strip().lower() is_true = s in "yes y true t on 1".split(' ') return int(is_true) def join(lst,dlm='',fmt="{0}",strip=True): if strip: lst = [x.strip() if hasattr(x,"strip") else x for x in lst] return dlm.join([fmt.format(x) for x...
[ 1, 1053, 337, 13, 13, 1753, 7353, 29898, 1767, 1125, 13, 12, 29908, 13441, 995, 304, 6043, 6120, 1134, 29908, 13, 12, 29879, 353, 851, 29898, 1767, 467, 17010, 2141, 13609, 580, 13, 12, 275, 29918, 3009, 353, 269, 297, 376, 3582, 34...
lib/datamanager/samplerbase.py
chenyanghungry/person-reid-lib
81
62305
<reponame>chenyanghungry/person-reid-lib<gh_stars>10-100 from torch.utils.data.sampler import Sampler import numpy as np class SamplerBase(Sampler): def __init__(self, data_info, instance_num, sample_num, sample_len, npr): super().__init__(data_info) self.npr = npr self.data_info = data_i...
[ 1, 529, 276, 1112, 420, 29958, 2724, 29891, 574, 29882, 348, 14793, 29914, 10532, 29899, 276, 333, 29899, 1982, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 4842, 305, 29889, 13239, 29889, 1272,...
components/shelly/sensor.py
tefinger/hass
0
191331
""" Shelly platform for the sensor component. For more details about this platform, please refer to the documentation https://home-assistant.io/components/shelly/ """ import logging from homeassistant.const import (DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, ...
[ 1, 9995, 30004, 13, 2713, 14112, 7481, 363, 278, 23530, 4163, 22993, 13, 30004, 13, 2831, 901, 4902, 1048, 445, 7481, 29892, 3113, 2737, 304, 278, 5106, 30004, 13, 991, 597, 5184, 29899, 465, 22137, 29889, 601, 29914, 14036, 29914, 845,...
evolversFiles/cameraEngine.py
coding-lines/evolvers
0
154408
#cameraCoords syntax: [x1 (oben links),y1,x2 (unten rechts),y2,zoomLevel] def moveCamera(cameraCoords, move,worldSize): if cameraCoords[0]+move[0] <= 1 and move[0] < 0: cameraCoords[0] -= cameraCoords[0]%1 cameraCoords[2] -= cameraCoords[2]%1 while cameraCoords[0] > 1: ca...
[ 1, 396, 26065, 7967, 4339, 5877, 29901, 518, 29916, 29896, 313, 29217, 2988, 511, 29891, 29896, 29892, 29916, 29906, 313, 348, 841, 337, 10333, 511, 29891, 29906, 29892, 2502, 290, 10108, 29962, 30004, 13, 30004, 13, 1753, 4337, 20717, 29...
bot/plugins/keyboard/__init__.py
grahamtito/TelegramFiletoCloud
0
17911
#!/usr/bin/env python3 # This is bot coded by <NAME> and used for educational purposes only # https://github.com/AbhijithNT # Copyright <NAME> # Thank you https://github.com/pyrogram/pyrogram from pyrogram.types import ( InlineKeyboardMarkup, InlineKeyboardButton ) def server_select(): upload_selection =...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 910, 338, 9225, 274, 6797, 491, 529, 5813, 29958, 322, 1304, 363, 28976, 11976, 871, 13, 29937, 2045, 597, 3292, 29889, 510, 29914, 4920, 29882, 823, 389, 20321, 13, 2993...
tests/test_posterior.py
joergdietrich/CredibleIntervals
0
1600703
<reponame>joergdietrich/CredibleIntervals import numpy as np from numpy.testing import assert_almost_equal from credible_interval import Posterior def test_posterior(): np.random.seed(20180131) x = np.random.normal(10, 5, 10000) posterior = Posterior(x) assert_almost_equal(9.9243057716556589, posteri...
[ 1, 529, 276, 1112, 420, 29958, 2212, 15064, 29881, 2035, 4018, 29914, 15507, 1821, 12506, 29879, 13, 5215, 12655, 408, 7442, 13, 3166, 12655, 29889, 13424, 1053, 4974, 29918, 284, 3242, 29918, 11745, 13, 13, 3166, 6625, 1821, 29918, 19207...
dice roll project 1.py
anuraag392/How-to-make-a-simple-dice-roll-program
0
95393
<reponame>anuraag392/How-to-make-a-simple-dice-roll-program<filename>dice roll project 1.py<gh_stars>0 from tkinter import * import random root=Tk() root.title("Dice roll") root.geometry("500x400") label=Label(root,font=('helvetica',250,'bold'),text='') label.pack() def rolldice(): dice=['\u2680','\u2681','...
[ 1, 529, 276, 1112, 420, 29958, 273, 2002, 351, 29941, 29929, 29906, 29914, 5328, 29899, 517, 29899, 5675, 29899, 29874, 29899, 12857, 29899, 29881, 625, 29899, 1245, 29899, 8860, 29966, 9507, 29958, 29881, 625, 9679, 2060, 29871, 29896, 298...
TweetUpdateThread.py
mrtazz/twsh
1
1601740
# thread class for updating tweets in the background import time import threading class TweetUpdateThread(threading.Thread): ''' thread class to fetch tweets in the background ''' def __init__(self, cli_object, function, waittime): ''' At initialization some local variables are set...
[ 1, 396, 3244, 770, 363, 13271, 7780, 1691, 297, 278, 3239, 4706, 13, 13, 5215, 931, 13, 5215, 3244, 292, 13, 29871, 13, 1990, 323, 16668, 6422, 4899, 29898, 7097, 292, 29889, 4899, 1125, 13, 4706, 14550, 3244, 770, 304, 6699, 7780, ...
pdfmajor/interpreter/commands/state/PDFGraphicState/PDFColor.py
asosnovsky/pdfmajor
23
36885
<filename>pdfmajor/interpreter/commands/state/PDFGraphicState/PDFColor.py from typing import Tuple, Optional from .PDFColorSpace import PDFColorSpace class PDFColor: def __init__(self, color_space: Optional[PDFColorSpace], *values: float): self.color_space: Optional[PDFColorSpace] = color_space sel...
[ 1, 529, 9507, 29958, 5140, 21355, 29914, 1639, 1457, 357, 29914, 26381, 29914, 3859, 29914, 8493, 9527, 293, 2792, 29914, 8493, 3306, 29889, 2272, 13, 3166, 19229, 1053, 12603, 552, 29892, 28379, 13, 3166, 869, 8493, 3306, 14936, 1053, 11...
old/am2320.py
eggplant60/airalarm
0
133614
#!/usr/bin/python # -*- coding: utf-8 -*- import smbus import time import datetime import threading import crc16 ADDRESS = 0x5c # 7bit address (will be left shifted to add the read write bit) READ_INT = 10 # [sec], each reading interval is to be grater than 2 sec LOG_INT = 600 # [sec] DEBUG_MODE = True #W_ADDR =...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 1560, 8262, 13, 5215, 931, 13, 5215, 12865, 13, 5215, 3244, 292, 13, 5215, 2181, 29883, 29896, 2...
CoffeeMachine/Config/Services.py
kerusey/FES
7
169385
from getpass import getpass import subprocess from os import system import pathlib import string vncAutostartScript = """ [Desktop Entry] Type=Application Name=TightVNC Exec=vncserver :1 StartupNotify=false """ def vncautostart(): system("sudo mkdir /home/" + GLOBALUSERNAME + "") def getLan(): # OK import netiface...
[ 1, 515, 679, 3364, 1053, 679, 3364, 13, 5215, 1014, 5014, 13, 3166, 2897, 1053, 1788, 13, 5215, 2224, 1982, 13, 5215, 1347, 13, 13, 29894, 17608, 6147, 520, 442, 4081, 353, 9995, 13, 29961, 17600, 28236, 29962, 13, 1542, 29922, 4873, ...
venv/Lib/site-packages/zmq/tests/test_draft.py
ajayiagbebaku/NFL-Model
603
4103
# -*- coding: utf8 -*- # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import os import platform import time import pytest import zmq from zmq.tests import BaseZMQTestCase, skip_pypy class TestDraftSockets(BaseZMQTestCase): def setUp(self): if not zmq.DRAFT_AP...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29947, 448, 29930, 29899, 13, 29937, 14187, 1266, 313, 29907, 29897, 10772, 29999, 25566, 10682, 414, 13, 29937, 6652, 7541, 1090, 278, 4958, 310, 278, 3382, 2164, 350, 7230, 19245, 29889, 1...
report-conf/generate_report.py
sdinot/pytest-executable
0
84558
#! /usr/bin/env python # Copyright 2020 CS Systemes d'Information, http://www.c-s.fr # # This file is part of pytest-executable # https://www.github.com/CS-SI/pytest-executable # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
[ 1, 396, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 21107, 2184, 267, 270, 29915, 20350, 29892, 1732, 597, 1636, 29889, 29883, 29899, 29879, 29889, 1341, 13, 29937, 13, ...
python/data_sutram/scraper/perform__.py
SayanGhoshBDA/code-backup
16
122263
<filename>python/data_sutram/scraper/perform__.py<gh_stars>10-100 import json from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities options = webdriver.ChromeOptions() #options.binary_location = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" chrom...
[ 1, 529, 9507, 29958, 4691, 29914, 1272, 29918, 29879, 329, 2572, 29914, 1557, 336, 546, 29914, 19826, 26914, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 4390, 13, 3166, 18866, 1053, 1856,...
buildchain/buildchain/versions.py
zarumaru/metalk8s
0
73060
<filename>buildchain/buildchain/versions.py<gh_stars>0 # coding: utf-8 """Authoritative listing of image and package versions used in the project. This module MUST be kept valid in a standalone context, since it is intended for use in tests and documentation as well. """ import operator from collections import name...
[ 1, 529, 9507, 29958, 4282, 14153, 29914, 4282, 14153, 29914, 26100, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 13, 15945, 29908, 13720, 23378, 18028, 310, 1967, 322, 3577...
pconf/store/env.py
sthagen/pconf
20
107715
<reponame>sthagen/pconf import os import re from ast import literal_eval from warnings import warn class Env(object): def __init__( self, separator=None, match=None, whitelist=None, parse_values=False, to_lower=False, convert_underscores=False, docke...
[ 1, 529, 276, 1112, 420, 29958, 303, 25771, 29914, 29886, 5527, 13, 5215, 2897, 13, 5215, 337, 13, 3166, 8717, 1053, 16333, 29918, 14513, 13, 3166, 18116, 1053, 29383, 13, 13, 13, 1990, 1174, 29894, 29898, 3318, 1125, 13, 1678, 822, 47...
setup.py
breaks-software/OSCAAR
0
57386
# -*- coding: utf-8 -*- """Made by <NAME> (UL/TUD), with tweaks by <NAME> (NASA GSFC/UMD)""" import os import sys import shutil import subprocess import atexit import urllib2 def internet_on(): refURL = 'http://74.125.228.100' ## One Google IP address (bypass DNS lookup) try: response=urllib2.url...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 29924, 1943, 491, 529, 5813, 29958, 313, 13309, 29914, 29911, 15789, 511, 411, 7780, 10327, 491, 529, 5813, 29958, 313, 29940, 3289, 29...
users/forms.py
iurykrieger96/alura-django
0
9155
<filename>users/forms.py from django import forms from django.contrib.auth.models import User from django.forms.utils import ErrorList class UserForm(forms.Form): name = forms.CharField(required=True) email = forms.EmailField(required=True) password = forms.CharField(required=True) phone = forms.CharF...
[ 1, 529, 9507, 29958, 7193, 29914, 9514, 29889, 2272, 13, 3166, 9557, 1053, 7190, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 4911, 13, 3166, 9557, 29889, 9514, 29889, 13239, 1053, 4829, 1293, 13, 13, 13, 1990, 4911, 25...
beansdbadmin/core/client.py
ariesdevil/beansdbadmin
11
400
<filename>beansdbadmin/core/client.py #!/usr/bin/python # encoding: utf-8 '''a rich client 1. for one server (instead of multi like in libmc.Client) 2. encapsulate @, ?, gc ... use is instead of libmc.Client ''' import telnetlib import logging import libmc import string import urllib import itertools import w...
[ 1, 529, 9507, 29958, 11700, 2585, 6406, 29914, 3221, 29914, 4645, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 29937, 8025, 29901, 23616, 29899, 29947, 13, 12008, 29874, 8261, 3132, 13, 268, 29896, 29889, 363, 697, 1...
get_pos.py
zhuchong79/cok
0
169136
import cv2 import aircv as ac import os from cok_tool import click,snap,back # print circle_center_pos def draw_circle(img, pos, circle_radius, color, line_width): cv2.circle(img, pos, circle_radius, color, line_width) cv2.imshow('objDetect', imsrc) cv2.waitKey(0) cv2.destroyAllWindows() def hero(pic=...
[ 1, 1053, 13850, 29906, 13, 5215, 263, 2076, 29894, 408, 1274, 13, 5215, 2897, 13, 3166, 274, 554, 29918, 10154, 1053, 2828, 29892, 29879, 8971, 29892, 1627, 13, 29937, 1596, 8607, 29918, 5064, 29918, 1066, 13, 1753, 4216, 29918, 16622, ...
judge/submission/migrations/0001_initial.py
22shubh22/online-judge
0
159627
# Generated by Django 3.1.1 on 2021-12-26 10:44 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('question', '0005_auto_20211226_1036'), ] operations = [ migrations.CreateModel( ...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896, 29889, 29896, 373, 29871, 29906, 29900, 29906, 29896, 29899, 29896, 29906, 29899, 29906, 29953, 29871, 29896, 29900, 29901, 29946, 29946, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, ...
bioplotlib/collections.py
darcyabjones/bioplotlib
0
53782
<reponame>darcyabjones/bioplotlib """ Extension of matplotlib collections. Classes for the efficient drawing of large collections of objects that share most properties, e.g., a large number of line segments or polygons. The classes are not meant to be as flexible as their single element counterparts (e.g., you may no...
[ 1, 529, 276, 1112, 420, 29958, 16702, 1270, 370, 29926, 2873, 29914, 5365, 459, 8276, 1982, 13, 15945, 29908, 7338, 2673, 310, 22889, 16250, 29889, 13, 13, 27403, 363, 278, 8543, 11580, 310, 2919, 16250, 310, 3618, 393, 13, 13653, 1556,...
tests/functional_pyecore/test_processors_pyecore.py
aranega/textX
4
162359
""" Testing model and object processors. """ import pytest # noqa import sys pytestmark = pytest.mark.skipif(sys.version_info[0] < 3, reason="pyecore is not Python 2 compatible") # noqa pyecore = pytest.importorskip("pyecore") # noqa import textx from textx import metamodel_from_str ...
[ 1, 9995, 13, 3057, 292, 1904, 322, 1203, 1889, 943, 29889, 13, 15945, 29908, 13, 5215, 11451, 1688, 29871, 396, 694, 25621, 13, 5215, 10876, 13, 2272, 1688, 3502, 353, 11451, 1688, 29889, 3502, 29889, 11014, 361, 29898, 9675, 29889, 325...
leetcode/hard/145. Binary Tree Postorder Traversal.py
Jeongseo21/Algorithm-1
7
63047
# problem : https://leetcode.com/problems/binary-tree-postorder-traversal/ # time complexity : O(N) # data structure : stack # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def postord...
[ 1, 396, 1108, 584, 2045, 597, 280, 300, 401, 29889, 510, 29914, 17199, 29879, 29914, 19541, 29899, 8336, 29899, 2490, 2098, 29899, 3018, 874, 284, 29914, 13, 29937, 931, 13644, 584, 438, 29898, 29940, 29897, 13, 29937, 848, 3829, 584, 5...
plugins/modules/network_device.py
steinzi/ansible-ise
0
71213
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: network_device short_description: Resource module for Network Device description: - Manage operations create, upda...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29896, 29892, 315, 275, 1111, 23985, 13...
Tools/HTML/LIMEHTMLBuilder.py
bio-hpc/sibila
1
122094
<reponame>bio-hpc/sibila #!/usr/bin/env python # -*- coding: utf-8 -*- """ LIMEHTMLBuilder.py: Build a single HTML file with all the LIME plots. """ __author__ = "<NAME>" __version__ = "1.0" __maintainer__ = "Antonio" __email__ = "<EMAIL>" __status__ = "Production" import bs4 import html class LIMEHTMLBuilder...
[ 1, 529, 276, 1112, 420, 29958, 24840, 29899, 29882, 6739, 29914, 29879, 747, 4233, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908,...
validated/migrations/0004_auto_20191118_1323.py
andrewbird2/validated
0
1605045
<reponame>andrewbird2/validated # Generated by Django 2.2.7 on 2019-11-18 19:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('validated', '0003_auto_20191118_1245'), ] operations = [ migrations.AlterFi...
[ 1, 529, 276, 1112, 420, 29958, 392, 3973, 18513, 29906, 29914, 3084, 630, 13, 29937, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29955, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29896, 29896, 29899, 29896, 29947, 29871, 2...
utility_fun.py
Avijit20/Deep-Learning-Flower-Image-Classification-Using-PyTorch
0
194200
import numpy as np import pandas as pd import torch import torchvision import torch.nn.functional as F from torchvision import datasets,transforms,models import matplotlib.pyplot as plt #from train import get_pretrained_model from torch import nn,optim from PIL import Image #%matplotlib inline def load_dataset(data_di...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 4924, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 3166, 4842, 305, 4924, 1053, 20035, 29892, 9067, 29879, 29892, ...
src/linesegm.py
abhey1618/Text_Recognition
0
173811
import cv2 import os import numpy as np from sys import argv from lib import sauvola, linelocalization, pathfinder from WordSegmentation import wordSegmentation, prepareImg from time import time as timer from SamplePreprocessor import preprocess from DataLoader import Batch from Model import Model def draw_line(im, p...
[ 1, 1053, 13850, 29906, 13, 5215, 2897, 13, 5215, 12655, 408, 7442, 13, 3166, 10876, 1053, 1852, 29894, 13, 3166, 4303, 1053, 12507, 1555, 29874, 29892, 6276, 295, 18642, 2133, 29892, 2224, 2886, 261, 13, 3166, 10803, 17669, 358, 362, 10...
beaverdet/tests/test_tube.py
SoftwareDevEngResearch/BeaverDet
0
113006
<reponame>SoftwareDevEngResearch/BeaverDet # -*- coding: utf-8 -*- """ PURPOSE: Unit tests for tools.py CREATED BY: <NAME> Oregon State University CIRE and Propulsion Lab <EMAIL> """ from math import sqrt import pytest import pint import os import cantera as ct import numpy as np import pandas as...
[ 1, 529, 276, 1112, 420, 29958, 6295, 14093, 16618, 8100, 1666, 2842, 29914, 3629, 12483, 6362, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 29925, 4574, 13152, 1660, 29901, 13, ...
src/TestDice.py
Yamanama/CodeMonkeyApplication
0
14519
import unittest from Dice import Dice class TestDice(unittest.TestCase): def setUp(self): self.sides = 8 self.dice = Dice(self.sides) def test_roll(self): for i in range(1000): self.assertLessEqual(self.dice.roll(), self.sides) def test_error(self): self.asse...
[ 1, 1053, 443, 27958, 13, 3166, 360, 625, 1053, 360, 625, 13, 13, 13, 1990, 4321, 29928, 625, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 1583, 29889, 29879, 2247, 353, 29871, ...
Interfas Grafica VIII (GUI)/InterfasGraficaVIII.py
BrianMarquez3/Python-Course
20
45487
# Interfas Grafica VIII # Operacion Matematicas from tkinter import * raiz = Tk() miFrame=Frame(raiz) miFrame.pack() operacion ="" resultado=0 #Entry #------------------------------Pantalla--------------------------------- numeroPantalla=StringVar() pantalla=Entry(miFrame, textvariable=numeroPantalla) pantalla.gr...
[ 1, 396, 4124, 13629, 13721, 983, 15682, 13, 29937, 6607, 16337, 5345, 19217, 294, 13, 13, 3166, 18883, 1639, 1053, 334, 13, 13, 336, 466, 353, 323, 29895, 580, 13, 13, 2460, 4308, 29922, 4308, 29898, 336, 466, 29897, 13, 2460, 4308, ...
data/objects/sample.py
predictive-analytics-lab/tiny-comparison-framework
0
11491
<filename>data/objects/sample.py from data.objects.data import Data class Sample(Data): """ A way to sample from a dataset for testing purposes. """ def __init__(self, data, num = 100): self.data = data self.dataset_name = data.get_dataset_name() self.class_attr = data.get_class...
[ 1, 529, 9507, 29958, 1272, 29914, 12650, 29914, 11249, 29889, 2272, 13, 3166, 848, 29889, 12650, 29889, 1272, 1053, 3630, 13, 13, 1990, 21029, 29898, 1469, 1125, 13, 1678, 9995, 13, 1678, 319, 982, 304, 4559, 515, 263, 8783, 363, 6724, ...
Numpy/Numpy Basics.py
Akshat-MS/DataScience-Learning
0
180530
#!/usr/bin/env python # coding: utf-8 # # NumPy # # # In[32]: # NumPy is a library for scientific computations in Python. # Numpy is one of the packages you have to know if you're going to do data science with Python. # It is a Python library that provides support for large, multidimensional arrays along with ma...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 29937, 396, 11848, 19737, 13, 29937, 29871, 13, 29937, 29871, 13, 13, 29937, 512, 29961, 29941, 29906, 5387, 13, 13, 13, 29937, 11848, ...
src/matchingframework/scores/clusters.py
quoctoanpk2511/matching-framework
0
118801
import abc class Clustering: def add_matcher(self, matcher): """ Add the match object on the Clustering. Args: matcher: matchingframework.match.matchers.Matcher Returns: None """ self.matcher = matcher """The matcher object""" @abc.abstr...
[ 1, 1053, 25638, 13, 13, 13, 1990, 2233, 504, 3241, 29901, 13, 13, 1678, 822, 788, 29918, 4352, 261, 29898, 1311, 29892, 1993, 261, 1125, 13, 4706, 9995, 13, 4706, 3462, 278, 1993, 1203, 373, 278, 2233, 504, 3241, 29889, 13, 13, 4706...
packages/augur-core/tests/trading/test_affiliates.py
joeykrug/augur
0
72876
<filename>packages/augur-core/tests/trading/test_affiliates.py<gh_stars>0 #!/usr/bin/env python from eth_tester.exceptions import TransactionFailed from pytest import raises, fixture, mark from utils import fix, AssertLog, EtherDelta, TokenDelta, BuyWithCash, nullAddress, longTo32Bytes from constants import YES, NO fr...
[ 1, 529, 9507, 29958, 8318, 29914, 2987, 332, 29899, 3221, 29914, 21150, 29914, 509, 9382, 29914, 1688, 29918, 3470, 2638, 1078, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 301...
mainnotes/migrations/0001_initial.py
gokulvibe/NoteIt-NoteMaker-Django
1
71073
<filename>mainnotes/migrations/0001_initial.py<gh_stars>1-10 # Generated by Django 3.1.7 on 2021-03-30 08:22 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import encrypted_fields.fields class Migration(migrations.Migration): initial = True depend...
[ 1, 529, 9507, 29958, 3396, 16953, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29896, 29918, 11228, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896...
elyra/pipeline/component_parser_kfp.py
rachaelhouse/elyra
0
20440
# # Copyright 2018-2021 Elyra Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ 1, 396, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29947, 29899, 29906, 29900, 29906, 29896, 382, 368, 336, 13189, 943, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 155...
setup.py
akrito/cursors
1
160573
<filename>setup.py from setuptools import setup import os try: long_desc = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() except (IOError, OSError): long_desc = '' setup( name = "cursors", version = '0.1', url = 'http://github.com/akrito/cursors', author = '<NAME>', auth...
[ 1, 529, 9507, 29958, 14669, 29889, 2272, 13, 3166, 731, 21245, 8789, 1053, 6230, 13, 5215, 2897, 13, 13, 2202, 29901, 13, 1678, 1472, 29918, 14273, 353, 1722, 29898, 359, 29889, 2084, 29889, 7122, 29898, 359, 29889, 2084, 29889, 25721, ...
source/ui/button.py
HugoPFe/Project-Asteroids
0
171736
import pygame from media.paths import button_font class Button: def __init__(self, **kwargs): """ Creates a new Button istance for UI. Accepted Parameters: screen, x, y, width, height, text, padding, command. """ self.screen = kwargs.get('screen') self.x = kwargs...
[ 1, 1053, 22028, 13, 3166, 5745, 29889, 24772, 1053, 2826, 29918, 5657, 13, 13, 13, 13, 1990, 11025, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 19290, 1125, 13, 4706, 9995, 13, 4706, 6760, 1078, 263, 716, 11025, 1752, ...
tests/retrieval/helpers.py
sameetsinghsidhu/metrics
0
1613173
<gh_stars>0 # Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14187, 1266, 450, 10772, 29911, 25350, 12790, 1076, 3815, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376...
mmdet-v2/tools/__tmp__/3.py
li-phone/DetectionCompetition
0
113963
<filename>mmdet-v2/tools/__tmp__/3.py<gh_stars>0 import collections def equ(C1, C2): for k1, v1 in C1.items(): if k1 not in C2 or C1[k1] != C2[k1]: return False return True while True: try: n, m = list(map(int, input().split())) Ai = list(map(int, input().split())) ...
[ 1, 529, 9507, 29958, 29885, 3487, 300, 29899, 29894, 29906, 29914, 8504, 29914, 1649, 7050, 1649, 29914, 29941, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 16250, 13, 13, 13, 1753, 1592, 29898, 29907, 29896, 29892, ...
gnuradio-3.7.13.4/gr-wxgui/python/wxgui/stdgui2.py
v1259397/cosmic-gnuradio
1
1614416
# # Copyright 2004 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # #...
[ 1, 396, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29900, 29946, 12362, 18540, 10606, 29892, 9266, 29889, 13, 29937, 13, 29937, 910, 934, 338, 760, 310, 15143, 9204, 13, 29937, 13, 29937, 15143, 9204, 338, 3889, 7047, 29936, 366, 508, ...
ansys/dpf/core/operators/logic/identical_fc.py
TheGoldfish01/pydpf-core
11
40214
<reponame>TheGoldfish01/pydpf-core """ identical_fc ============ """ from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs, _modify_output_spec_with_one_type from ansys.dpf.core.operators.specification import PinSpecificatio...
[ 1, 529, 276, 1112, 420, 29958, 1576, 29954, 1025, 15161, 29900, 29896, 29914, 2272, 6099, 29888, 29899, 3221, 13, 15945, 29908, 13, 1693, 936, 29918, 13801, 13, 4936, 2751, 13, 15945, 29908, 13, 3166, 6063, 952, 29889, 6099, 29888, 29889,...
maps/urls.py
lueho/BRIT
0
1612756
<reponame>lueho/BRIT from django.urls import include, path from .views import ( AttributeListView, AttributeCreateView, AttributeModalCreateView, AttributeDetailView, AttributeModalDetailView, AttributeUpdateView, AttributeModalUpdateView, AttributeModalDeleteView, RegionAttributeVa...
[ 1, 529, 276, 1112, 420, 29958, 29880, 434, 1251, 29914, 15176, 1806, 13, 3166, 9557, 29889, 26045, 1053, 3160, 29892, 2224, 13, 13, 3166, 869, 7406, 1053, 313, 13, 1678, 23833, 15660, 29892, 13, 1678, 23833, 4391, 1043, 29892, 13, 1678,...
tahoe_scorm/exceptions.py
appsembler/tahoe-scorm
0
119394
<filename>tahoe_scorm/exceptions.py<gh_stars>0 class ScormException(Exception): pass
[ 1, 529, 9507, 29958, 29873, 801, 7297, 29918, 1557, 555, 29914, 11739, 29879, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 1990, 2522, 555, 2451, 29898, 2451, 1125, 13, 1678, 1209, 13, 2 ]
src/baselines/a2c/a2c.py
Officium/RL-Experiments
54
190393
import os import time from collections import deque import torch import torch.distributions import torch.nn as nn from torch.optim.lr_scheduler import LambdaLR from common.util import scale_ob, Trajectories def learn(logger, device, env, nenv, number_timesteps, network, optim...
[ 1, 1053, 2897, 13, 5215, 931, 13, 3166, 16250, 1053, 316, 802, 13, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 27691, 29879, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 3166, 4842, 305, 29889, 20640, 29889, 29212, 299...
src/test/marker_array_test.py
fftn/rviz
0
139469
#!/usr/bin/env python from visualization_msgs.msg import Marker from visualization_msgs.msg import MarkerArray import rospy import math topic = "visualization_marker_array" publisher = rospy.Publisher(topic, MarkerArray) rospy.init_node("register") markerArray = MarkerArray() count = 0 MARKERS_MAX = 100 while not...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 3166, 7604, 2133, 29918, 1516, 3174, 29889, 7645, 1053, 4485, 261, 13, 3166, 7604, 2133, 29918, 1516, 3174, 29889, 7645, 1053, 4485, 261, 2588, 13, 5215, 696, 1028, 29891, 13, 5215...
qa/rpc-tests/cryptoconditions_faucet.py
wallnutkraken/komodo
1
72566
<gh_stars>1-10 #!/usr/bin/env python2 # Copyright (c) 2018 SuperNET developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import CryptoconditionsTestFramework from test_framework.authproxy ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29906, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 5670, 6006, 18777, 13, 29937, 6...
models/points_rcnn/__init__.py
periakiva/finding_berries
11
97351
<reponame>periakiva/finding_berries from .faster_rcnn import * from .mask_rcnn import * from .keypoint_rcnn import *
[ 1, 529, 276, 1112, 420, 29958, 546, 24061, 4244, 29914, 2886, 292, 29918, 495, 2722, 13, 3166, 869, 29888, 1901, 29918, 2214, 15755, 1053, 334, 13, 3166, 869, 13168, 29918, 2214, 15755, 1053, 334, 13, 3166, 869, 1989, 3149, 29918, 2214,...
skins.py
shycoldii/agario
0
101524
<reponame>shycoldii/agario import pygame import pygame.gfxdraw import os import random from vector import vector default_skin = "skin1" class Skins: all_skins = None PATH = "./data" @classmethod def init(cls): cls.all_skins = {} all_skins = cls.loadskins() #грузим все скины из папки ...
[ 1, 529, 276, 1112, 420, 29958, 845, 11078, 1025, 2236, 29914, 351, 2628, 13, 5215, 22028, 13, 5215, 22028, 29889, 29887, 11093, 4012, 13, 5215, 2897, 13, 5215, 4036, 13, 13, 3166, 4608, 1053, 4608, 13, 13, 4381, 29918, 808, 262, 353, ...
treadmill_pipeline/treadmill.py
ttngu207/project-treadmill
0
22134
import numpy as np import datajoint as dj from treadmill_pipeline import project_database_prefix from ephys.utilities import ingestion, time_sync from ephys import get_schema_name schema = dj.schema(project_database_prefix + 'treadmill_pipeline') reference = dj.create_virtual_module('reference', get_schema_name('re...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 848, 12090, 408, 270, 29926, 13, 13, 3166, 260, 949, 19958, 29918, 13096, 5570, 1053, 2060, 29918, 9803, 29918, 13506, 13, 3166, 321, 14017, 29889, 4422, 1907, 1053, 2348, 602, 29892, 931, 29918, 165...
bookapp/views.py
RafaCucurull/Bookiernes
0
139445
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render, redirect from bookapp import models from bookapp.forms import AfegirLlibreForm, SolicitarImatgesForm, SolicitarMaquetacioForm, PujarMaquetacio, pujarImatge, \ SolicitarPublicacioForm, EnviarMissatgeForm, SolicitarTraducc...
[ 1, 515, 9557, 29889, 1124, 1053, 9056, 5103, 24735, 29892, 9056, 5103, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 29892, 6684, 13, 3166, 3143, 932, 1053, 4733, 13, 3166, 3143, 932, 29889, 9514, 1053, 10393, 387, 381, 29931, ...
test/pyroapi/test_pyroapi.py
MarcoGorelli/numpyro
1
91191
<reponame>MarcoGorelli/numpyro<filename>test/pyroapi/test_pyroapi.py # Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from pyroapi import pyro_backend from pyroapi.tests import * # noqa F401 import pytest pytestmark = pytest.mark.filterwarnings( "ignore::numpyro.compat.util.Uns...
[ 1, 529, 276, 1112, 420, 29958, 7083, 1111, 29954, 272, 5481, 29914, 23749, 307, 29966, 9507, 29958, 1688, 29914, 2272, 307, 2754, 29914, 1688, 29918, 2272, 307, 2754, 29889, 2272, 13, 29937, 14187, 1266, 2866, 1091, 29560, 304, 278, 10772...
knox/settings.py
liradb2000/django-rest-knox
0
77872
<filename>knox/settings.py from datetime import timedelta from django.conf import settings from django.test.signals import setting_changed from rest_framework.settings import APISettings, api_settings, import_from_string, perform_import, REMOVED_SETTINGS USER_SETTINGS = getattr(settings, 'REST_KNOX', None) DEFAULTS ...
[ 1, 529, 9507, 29958, 29895, 1217, 29916, 29914, 11027, 29889, 2272, 13, 3166, 12865, 1053, 5335, 287, 2554, 13, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 1688, 29889, 4530, 1338, 1053, 4444, 29918, 15033, 13, 3166, ...
misc/utils.py
citharus/AzuryModerator
2
1605456
from typing import Type import motor.motor_asyncio as motor from discord.ext import commands __all__: list[str] = ["add_cogs", "replace_placeholders"] def add_cogs(db: motor.AsyncIOMotorDatabase, bot: commands.Bot, cogs: list[Type[commands.Cog]]) -> None: for cog in cogs: bot.add_cog(cog(bot, db)) def...
[ 1, 515, 19229, 1053, 5167, 13, 13, 5215, 10992, 29889, 14817, 272, 29918, 294, 948, 3934, 408, 10992, 13, 3166, 2313, 536, 29889, 1062, 1053, 8260, 13, 13, 1649, 497, 1649, 29901, 1051, 29961, 710, 29962, 353, 6796, 1202, 29918, 29883, ...
src/scripts/flann.py
PenTesting/mlsvm
0
84112
<gh_stars>0 ''' Created on Feb 3, 2016 Version 1: March 8, 2016 The script reads 2 parameters from command line which are path and filename It calculates the Flann and save the result, in the same path with similar file names Drawback: convert from csr to ndarray and vise versa @author: <NAME> @note: read ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 12008, 13, 20399, 373, 26319, 29871, 29941, 29892, 29871, 29906, 29900, 29896, 29953, 13, 6594, 29871, 29896, 29901, 4779, 29871, 29947, 29892, 29871, 29906, 29900, 29896, 29953, 13, 1678, ...
infapy/v3/agentService.py
infapy/infapy
0
8345
# Copyright (c) 2021-Present (<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 writ...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29896, 29899, 13504, 296, 313, 29966, 5813, 12948, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1...
src/components/examples/python-sample/pysample.py
ghsecuritylab/comanche
19
100786
<reponame>ghsecuritylab/comanche<filename>src/components/examples/python-sample/pysample.py # python class import sys class Sample: def __init__(self): print("Python Sample component instantiated.") def say_hello(self): print("Say hello from Python my friend! :" + str(sys.version))
[ 1, 529, 276, 1112, 420, 29958, 12443, 8926, 8205, 29914, 510, 20372, 29966, 9507, 29958, 4351, 29914, 14036, 29914, 19057, 29914, 4691, 29899, 11249, 29914, 29886, 952, 981, 29889, 2272, 13, 29937, 3017, 770, 13, 5215, 10876, 13, 13, 1990...
tests/parallel/conftest.py
dtpryce/MLServer
0
164959
<reponame>dtpryce/MLServer import asyncio import pytest from multiprocessing import Queue from mlserver.settings import ModelSettings from mlserver.types import InferenceRequest from mlserver.utils import generate_uuid from mlserver.model import MLModel from mlserver.parallel.pool import InferencePool from mlserver.p...
[ 1, 529, 276, 1112, 420, 29958, 6008, 558, 29891, 346, 29914, 1988, 6004, 13, 5215, 408, 948, 3934, 13, 5215, 11451, 1688, 13, 13, 3166, 6674, 307, 985, 292, 1053, 5462, 434, 13, 13, 3166, 286, 29880, 2974, 29889, 11027, 1053, 8125, ...
src/seak/cct.py
HealthML/seak
2
72824
""" Functions related to STAAR """ import numpy as np from scipy.stats import cauchy c = cauchy() def cct(pvals, weights=None): """ Python port of the CCT function as defined in the STAAR R-package (https://github.com/xihaoli/STAAR/blob/2f67fafec591a45e81a54eca24564b09ce90e252/R/CCT.R) An analytical...
[ 1, 29871, 13, 15945, 29908, 13, 13, 6678, 29879, 4475, 304, 317, 6040, 1718, 13, 13, 15945, 29908, 13, 13, 5215, 12655, 408, 7442, 13, 3166, 4560, 2272, 29889, 16202, 1053, 274, 13989, 29891, 13, 13, 29883, 353, 274, 13989, 29891, 580...
mease_elabftw/tests/test_metadata.py
ssciwr/mease-elabftw
0
78273
import pytest import mease_elabftw import test_ids def test_get_metadata(): data = mease_elabftw.get_metadata(test_ids.valid_experiment) assert len(data.keys()) == 9 start_time = data.get("ElectrodeGroup name") assert start_time["value"] == "ElectrodeGroup" description = data.get("Ecephys Device n...
[ 1, 1053, 11451, 1688, 13, 5215, 592, 559, 29918, 295, 370, 615, 29893, 13, 5215, 1243, 29918, 4841, 13, 13, 13, 1753, 1243, 29918, 657, 29918, 19635, 7295, 13, 1678, 848, 353, 592, 559, 29918, 295, 370, 615, 29893, 29889, 657, 29918, ...
src/oracle/handlers/handlers.py
orisi/orisi
70
57721
<filename>src/oracle/handlers/handlers.py from timelock_contract.timelock_create_handler import TimelockCreateHandler from bounty_contract.bounty_create_handler import BountyCreateHandler from bounty_contract.bounty_redeem_handler import GuessPasswordHandler from transactionsigner import TransactionSigner from safe_tim...
[ 1, 529, 9507, 29958, 4351, 29914, 11347, 29914, 3179, 9306, 29914, 3179, 9306, 29889, 2272, 13, 3166, 5335, 295, 1698, 29918, 1285, 1461, 29889, 9346, 295, 1698, 29918, 3258, 29918, 13789, 1053, 7870, 295, 1698, 4391, 4598, 13, 3166, 289,...
plot_robeson.py
jsunn-y/gasseparationML
0
104839
<gh_stars>0 import matplotlib.pyplot as plt import pandas as pd import numpy as np import seaborn as sns ''' Script to visualize permeability data in the O2/N2, CO2/CH4, CO2/N2, and H2/CO2 Robeson spaces. Data must be a csv file with 6 columns in the order of ['He','H2','O2','N2','CO2','CH4'] permeabilities. U...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 30004, 13, 5215, 11701, 408, 10518, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 5215, 409, 370, 1398, 408, 269, 1983, 30004, 13, 30004, 13,...
Generalisation/utils.py
act65/Experiments
0
100141
from __future__ import print_function import tensorflow as tf import tensorflow.contrib.slim as slim from sklearn.utils import shuffle def wide_net(x): with slim.arg_scope([slim.fully_connected], activation_fn=tf.nn.relu, weights_initializer=tf.orthogonal_initializ...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 26110, 408, 15886, 13, 5215, 26110, 29889, 21570, 29889, 2536, 326, 408, 2243, 326, 13, 13, 3166, 2071, 19668, 29889, 13239, 1053, 528, 21897, 13, 13, 1753, 9377, ...
cbackup.py
andytaylor823/discord-draft-assist
0
197905
import functions as f import defs as d import discord import error_messages as em import numpy as np # look for bad input with the error functions defined here def check_bad_input(ctx, rd, pokemon, tier): testfns = [check_no_primary_yet, check_backup_equals_primary] e = '' i = 0 while e == '' and i < len(testfns)...
[ 1, 1053, 3168, 408, 285, 13, 5215, 822, 29879, 408, 270, 13, 5215, 2313, 536, 13, 5215, 1059, 29918, 19158, 408, 953, 13, 5215, 12655, 408, 7442, 13, 13, 29937, 1106, 363, 4319, 1881, 411, 278, 1059, 3168, 3342, 1244, 13, 1753, 1423...
build_vocab/build_vocab.py
zaidalyafeai/pytorch-G2P
22
197361
"""Standalone script to generate word vocabularies from monolingual corpus.""" import argparse import data_utils def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument( "--model_dir", default="../prepared_data/", help="Data for training") ...
[ 1, 9995, 11042, 18785, 2471, 304, 5706, 1734, 7931, 370, 1070, 583, 515, 1601, 324, 292, 950, 1034, 13364, 1213, 15945, 13, 13, 5215, 1852, 5510, 13, 13, 5215, 848, 29918, 13239, 13, 13, 13, 1753, 1667, 7295, 13, 29871, 13812, 353, ...
irlb/irlb.py
WeazelDev/ML_Project
0
124002
import numpy as np import scipy.sparse as sp import warnings #import pdb # Matrix-vector product wrapper # A is a numpy 2d array or matrix, or a scipy matrix or sparse matrix. # x is a numpy vector only. # Compute A.dot(x) if t is False, # A.transpose().dot(x) otherwise. def mult(A, x, t=False): if sp.isspa...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 4560, 2272, 29889, 29879, 5510, 408, 805, 13, 5215, 18116, 13, 29937, 5215, 282, 2585, 13, 13, 13, 29937, 22513, 29899, 8111, 3234, 14476, 13, 29937, 319, 338, 263, 12655, 29871, 29906, 29881, 1409, ...
messaging/kombu_brighter/kombu_messaging.py
iancooper/RpcIsEvil
0
24270
"""" File : kombu_messaging.py Author : ian Created : 09-28-2016 Last Modified By : ian Last Modified On : 09-28-2016 *********************************************************************** The MIT License (MIT) Copyright © 2016 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, t...
[ 1, 9995, 29908, 13, 2283, 308, 584, 4677, 2423, 29918, 12062, 6751, 29889, 2272, 13, 13720, 965, 584, 474, 273, 13, 20399, 3986, 584, 29871, 29900, 29929, 29899, 29906, 29947, 29899, 29906, 29900, 29896, 29953, 13, 8897, 3382, 2164, 2648,...
apps/materialPlanning/models.py
yhkl-dev/JAutoOps
0
76466
from django.db import models from django.contrib.auth import get_user_model from material.models import MaterialModel, MaterialGroup, Plant, ImportanceLevelModel, TechnologyCode, PurchaseTypeModel, ImportanceLevelModel, GICategoryModel from workflow.models import WorkFlowEntityModel, WorkFlowModel User = get_user_mod...
[ 1, 515, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 679, 29918, 1792, 29918, 4299, 13, 3166, 5518, 29889, 9794, 1053, 17582, 3195, 29892, 17582, 4782, 29892, 18058, 29892, 16032, 749, 10108, 3195, 29892, ...
week07/code09.py
byeongal/KMUCP
0
110671
<filename>week07/code09.py import turtle t = turtle.Turtle() color_list = ["black", "red", "green", "blue", "cyan", "yellow", "magenta"] for i in range(7): radius = (i + 1) * 10 t.color(color_list[i]) t.circle(radius) turtle.mainloop()
[ 1, 529, 9507, 29958, 18448, 29900, 29955, 29914, 401, 29900, 29929, 29889, 2272, 13, 5215, 260, 4227, 280, 13, 29873, 353, 260, 4227, 280, 29889, 29911, 4227, 280, 580, 13, 2780, 29918, 1761, 353, 6796, 8517, 613, 376, 1127, 613, 376, ...
pyPLANES/pw/pw_classes.py
matael/pyPLANES
0
11129
#! /usr/bin/env python # -*- coding:utf8 -*- # # pw_classes.py # # This file is part of pyplanes, a software distributed under the MIT license. # For any question, please contact one of the authors cited below. # # Copyright (c) 2020 # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # Permission is hereby g...
[ 1, 396, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 9420, 29947, 448, 29930, 29899, 13, 29937, 13, 29937, 282, 29893, 29918, 13203, 29889, 2272, 13, 29937, 13, 29937, 910, 934, 338, 760, ...
losses.py
EIHW/Logit_Separation
4
1604638
""" Computes the Batch Cross-Entropy loss, as appears in: "Fast Single-Class Classification and the Principle of Logit Separation", <NAME>, <NAME> and <NAME>. (https://arxiv.org/abs/1705.10246) Args: logits: The logits for the batch, of shape `[batch_size, num_classes]` labels: The labels for the ba...
[ 1, 9995, 13, 29871, 11796, 267, 278, 350, 905, 11189, 29899, 5292, 14441, 6410, 29892, 408, 5692, 297, 29901, 13, 29871, 376, 29943, 579, 16740, 29899, 2385, 23236, 322, 278, 14771, 552, 310, 4522, 277, 922, 862, 362, 613, 13, 29871, ...
CrazyFliePythonServer/lib/cflib/crazyflie/log.py
shreks7/crazyflie-android-no-otg
1
141309
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 13, 29937, 268, 3830, 3986, 903, 22359, 29871, 903, 4770, 13, 29937, 29871, 718, 25809, 418, 84...
day_1/if_2.py
YugoNishio/python_study
0
183763
<reponame>YugoNishio/python_study #条件について if int(input("整数を入力してください")): #整数が入力されれば条件がTrue print("整数が入力されました") else: #整数が入力されなかったら? print("整数が入力されませんでした") #残念ながら整数以外を入力するとエラーが起きてしまいました。 #どうすれば良かったのでしょうか...(error_1.pyに続く…)
[ 1, 529, 276, 1112, 420, 29958, 29979, 15490, 29940, 728, 601, 29914, 4691, 29918, 18082, 29891, 13, 29937, 31217, 30631, 30353, 30773, 30298, 30466, 13, 13, 361, 938, 29898, 2080, 703, 233, 152, 183, 30354, 30396, 30752, 31074, 30326, 304...
scripts/call_logs.py
asad-saleem-confiz/general-congress-hotline
44
175274
import csv import operator import os from collections import defaultdict from datetime import datetime from twilio.rest import TwilioRestClient FAILED_STATUSES = set(['busy', 'no-answer', 'ringing', 'failed', 'canceled']) account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ['TWILIO_AUT...
[ 1, 1053, 11799, 30004, 13, 5215, 5455, 30004, 13, 5215, 2897, 30004, 13, 30004, 13, 3166, 16250, 1053, 2322, 8977, 30004, 13, 3166, 12865, 1053, 12865, 30004, 13, 30004, 13, 3166, 3252, 14876, 29889, 5060, 1053, 8168, 14876, 15078, 4032, ...
tests/description/match_counter_test.py
centre-for-humanities-computing/danish-foundation-models
8
98261
import pytest import spacy from dfm.description import MatchCounter class TestMatchCounter: @pytest.fixture(scope="class") def texts(self): texts = [ "Der kom en soldat marcherende hen ad landevejen: én, to! én, to! Han havde sit tornyster på ryggen og en sabel ved siden, for han havde vær...
[ 1, 1053, 11451, 1688, 13, 5215, 805, 4135, 13, 3166, 4489, 29885, 29889, 8216, 1053, 14514, 17779, 13, 13, 13, 1990, 4321, 9652, 17779, 29901, 13, 1678, 732, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 543, 1990, 1159, 13, 1678, 822, ...
understand_morris.py
bhmueller/thesis
0
195117
<reponame>bhmueller/thesis from multiprocessing import Pool from multiprocessing import cpu_count from joblib import Parallel, delayed import numpy as np import pandas as pd from python.auxiliary import rust_model_morris from econsa.morris import elementary_effects from econsa.morris import _get_uniform_base_draws from...
[ 1, 529, 276, 1112, 420, 29958, 29890, 29882, 2589, 4539, 29914, 26533, 13, 3166, 6674, 307, 985, 292, 1053, 28625, 13, 3166, 6674, 307, 985, 292, 1053, 26403, 29918, 2798, 13, 3166, 4982, 1982, 1053, 1459, 6553, 29892, 29801, 13, 5215, ...