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
wasatch/ROI.py
adiravishankara/Wasatch.PY
9
2417
## # This class encapsulates a Region Of Interest, which may be either horizontal # (pixels) or vertical (rows/lines). class ROI: def __init__(self, start, end): self.start = start self.end = end self.len = end - start + 1 def valid(self): return self.start >= 0 and self.start ...
[ 1, 444, 13, 29937, 910, 770, 2094, 2547, 352, 1078, 263, 11069, 4587, 23829, 29892, 607, 1122, 367, 2845, 14698, 29871, 13, 29937, 313, 29886, 861, 1379, 29897, 470, 11408, 313, 5727, 29914, 9012, 467, 13, 1990, 16641, 29902, 29901, 13,...
pcWacomToMouseTouchpad.py
Amanita-muscaria/rmWacomToMouse
50
51420
<reponame>Amanita-muscaria/rmWacomToMouse #!/usr/bin/env python3 ''' Meant to run on your PC. Receives data generated by rmServerWacomInput.py, moves the mouse and presses accordingly. Acts like a touchpad. ''' import socket import struct from pynput.mouse import Button, Controller mouse = Controller() # ---------...
[ 1, 529, 276, 1112, 420, 29958, 29909, 1171, 2028, 29899, 8366, 4287, 423, 29914, 1758, 29956, 29874, 510, 1762, 14346, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 12008, 13, 6816, 424, 304, 1065, 373, 596, 9609, 2...
tensorflow_federated/python/learning/federated_evaluation.py
Tensorflow-Devs/federated
0
8938
<reponame>Tensorflow-Devs/federated<filename>tensorflow_federated/python/learning/federated_evaluation.py # Copyright 2019, The TensorFlow Federated 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 ...
[ 1, 529, 276, 1112, 420, 29958, 29911, 6073, 1731, 29899, 2772, 4270, 29914, 29888, 2447, 630, 29966, 9507, 29958, 29056, 29918, 29888, 2447, 630, 29914, 4691, 29914, 21891, 29914, 29888, 2447, 630, 29918, 24219, 362, 29889, 2272, 13, 29937,...
Session II/Encapsulation.py
intrepidkarthi/softwareengineer
4
112057
class Encapsulation: def __init__(self): self.__my_price = 10 def sell(self): print("my selling price is {}".format(self.__my_price)) def setprice(self, price): self.__my_price = price encap = Encapsulation() encap.sell() encap.__my_price = 20 encap.sell() encap.setprice(20) encap...
[ 1, 770, 11346, 2547, 2785, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 17255, 1357, 29918, 9175, 353, 29871, 29896, 29900, 13, 13, 1678, 822, 19417, 29898, 1311, 1125, 13, 4706, 1596, 703, 1357, 269, 7807, 8666,...
ecs_pipeline_deploy/cli.py
gmr/ecs-pipeline-deploy
2
150467
<gh_stars>1-10 # coding=utf-8 """ CLI Application Implementation ============================== """ import argparse import collections import logging import re import sys import time import boto3 import coloredlogs from . import __version__ LOGGER = logging.getLogger(__name__) LOGGING_FORMAT = '%(asctime)s %(name)...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14137, 29922, 9420, 29899, 29947, 13, 15945, 29908, 13, 27205, 8427, 1954, 14607, 13, 9166, 4936, 2751, 1360, 13, 13, 15945, 29908, 13, 5215, 1852, 5510, 13, ...
www/src/Lib/test/test_abc.py
stefanhoelzl/brython
652
131218
<filename>www/src/Lib/test/test_abc.py # Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Unit tests for abc.py.""" import unittest from test import support import abc from inspect import isabstract class TestLegacyAPI(unittest.TestCase): def test_abstractpr...
[ 1, 529, 9507, 29958, 1636, 29914, 4351, 29914, 14868, 29914, 1688, 29914, 1688, 29918, 10736, 29889, 2272, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29900, 29955, 5087, 29892, 9266, 29889, 2178, 26863, 2538, 9841, 29889, 13, 29937, 10413, ...
docs/source/examples/client-server-request.py
lslebodn/conu
95
139504
# -*- coding: utf-8 -*- # # Copyright Contributors to the Conu project. # SPDX-License-Identifier: MIT # import subprocess import logging import time from conu import DockerBackend, DockerRunBuilder environment = ["-e", "POSTGRESQL_USER=user", "-e", "POSTGRESQL_PASSWORD=<PASSWORD>", "-...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 13, 29937, 14187, 1266, 2866, 1091, 29560, 304, 278, 1281, 29884, 2060, 29889, 13, 29937, 10937, 29928, 29990, 29899, 29931, 293, 1947, 29899, 12889...
scratch/trycubes/cubes.py
ibrahemesam/Fos
0
84971
import numpy as np from itertools import chain, islice, product, repeat, cycle, izip from fos.actor.surf import CommonSurfaceGroup, IlluminatedSurfaceGroup from fos.core.world import World from fos.lib.pyglet.gl import * from fos.lib.pyglet.graphics import Batch from fos.core.actor import Actor from fos.geometry.ve...
[ 1, 1053, 12655, 408, 7442, 13, 3166, 4256, 8504, 1053, 9704, 29892, 338, 5897, 29892, 3234, 29892, 12312, 29892, 11412, 29892, 5951, 666, 13, 13, 3166, 14452, 29889, 7168, 29889, 7610, 29888, 1053, 13103, 18498, 2161, 4782, 29892, 8408, 9...
main.py
henryshunt/psn-logger
0
42214
<filename>main.py import json import os from datetime import datetime import sys import queue import threading import smtplib import ssl import daemon import paho.mqtt.client as mqtt import pymysql import config import helpers broker = None alarm_analysis_queue = queue.Queue() is_processing_alarm...
[ 1, 529, 9507, 29958, 3396, 29889, 2272, 13, 5215, 4390, 30004, 13, 5215, 2897, 30004, 13, 3166, 12865, 1053, 12865, 30004, 13, 5215, 10876, 30004, 13, 5215, 9521, 30004, 13, 5215, 3244, 292, 30004, 13, 5215, 1560, 9392, 1982, 30004, 13,...
skrypt.py
kosiacz3q/isbh
0
80339
import sys def longest_common_substring(s1, s2): m = [[0] * (1 + len(s2)) for i in range(1 + len(s1))] longest, x_longest = 0, 0 for x in range(1, 1 + len(s1)): for y in range(1, 1 + len(s2)): if s1[x - 1] == s2[y - 1]: m[x][y] = m[x - 1][y - 1] + 1 if m...
[ 1, 1053, 10876, 13, 13, 13, 1753, 27217, 29918, 9435, 29918, 20363, 29898, 29879, 29896, 29892, 269, 29906, 1125, 13, 1678, 286, 353, 5519, 29900, 29962, 334, 313, 29896, 718, 7431, 29898, 29879, 29906, 876, 363, 474, 297, 3464, 29898, ...
solutions/recommendation_system/quick_deploy/movie_recommender/milvus_tool/milvus_insert.py
NotRyan/bootcamp
6
76705
from pymilvus_orm import * # from milvus_tool.config import MILVUS_HOST, MILVUS_PORT, schema, index_param from milvus_tool.config import * class VecToMilvus(): def __init__(self): try: connections.connect(host=MILVUS_HOST, port=MILVUS_PORT) collection = None except Except...
[ 1, 515, 282, 962, 309, 29894, 375, 29918, 555, 1053, 334, 13, 13, 29937, 515, 2316, 29894, 375, 29918, 10154, 29889, 2917, 1053, 341, 6227, 29963, 3308, 29918, 20832, 29892, 341, 6227, 29963, 3308, 29918, 15082, 29892, 10938, 29892, 2380,...
snafu/installations.py
uranusjr/snafu
27
148414
import contextlib import itertools import os import pathlib import re import subprocess import attr @attr.s class Installation: path = attr.ib(convert=pathlib.Path) @property def python(self): return self.path.joinpath('python.exe') @property def scripts_dir(self): return self....
[ 1, 1053, 3030, 1982, 13, 5215, 4256, 8504, 13, 5215, 2897, 13, 5215, 2224, 1982, 13, 5215, 337, 13, 5215, 1014, 5014, 13, 13, 5215, 12421, 13, 13, 13, 29992, 5552, 29889, 29879, 13, 1990, 16052, 362, 29901, 13, 13, 1678, 2224, 353, ...
Dataset/Leetcode/valid/35/31.py
kkcookies99/UAST
0
32238
<gh_stars>0 class Solution: def XXX(self, nums: List[int], target: int) -> int: l, r = 0, len(nums)-1 # 找到第一个大于或等于target的位置 while l<r: m = (l+r) // 2 if nums[m] >= target: r = m else: l = m + 1 if nums[r] >= targe...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 770, 24380, 29901, 13, 1678, 822, 22615, 29898, 1311, 29892, 954, 29879, 29901, 2391, 29961, 524, 1402, 3646, 29901, 938, 29897, 1599, 938, 29901, 13, 4706, 301, 29892, 364, 353, 29871, ...
planex/cms_site/blocks/hero.py
octue/planex-cms
0
117946
from wagtail.core.blocks import CharBlock, StreamBlock, StructBlock, TextBlock, URLBlock from wagtail.embeds.blocks import EmbedBlock from wagtail.images.blocks import ImageChooserBlock from .base import SectionBlock class HeroSectionBlock(SectionBlock): heading = CharBlock( required=False, max_l...
[ 1, 515, 281, 351, 18237, 29889, 3221, 29889, 1271, 29879, 1053, 2896, 7445, 29892, 13763, 7445, 29892, 28771, 7445, 29892, 3992, 7445, 29892, 3988, 7445, 13, 3166, 281, 351, 18237, 29889, 1590, 5779, 29889, 1271, 29879, 1053, 2812, 2580, ...
spotpuppy/rotation/rotation_sensor_base.py
JoshPattman/Spot-Puppy-Lib
1
158845
import numpy as np class sensor: def __init__(self, inverse_x=False, inverse_z=False): self.inverse_x = inverse_x self.inverse_z = inverse_z self.flip_x_z = False self.rotation = np.array([0, 0]) def get_angle(self): rot = np.copy(self.rotation) if self.flip_x_...
[ 1, 1053, 12655, 408, 7442, 13, 13, 13, 1990, 23530, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 16402, 29918, 29916, 29922, 8824, 29892, 16402, 29918, 29920, 29922, 8824, 1125, 13, 4706, 1583, 29889, 262, 3901, 29918, 29916, 353...
vsm/extensions/corpusbuilders/__init__.py
inpho/vsm
31
51260
""" [Documentation about the corpusbuilders extension] """ from __future__ import absolute_import from .corpusbuilders import *
[ 1, 9995, 13, 29961, 6268, 362, 1048, 278, 1034, 13364, 4282, 414, 6081, 29962, 13, 15945, 29908, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 13, 3166, 869, 2616, 13364, 4282, 414, 1053, 334, 13, 2 ]
christmasflix/tests.py
jbettenh/last_christmas
0
31909
<reponame>jbettenh/last_christmas from django.test import TestCase from django.shortcuts import reverse from .models import MovieList from christmasflix import omdbmovies class MovieListIndexViewTests(TestCase): def test_no_lists(self): response = self.client.get(reverse('christmasflix:index')) s...
[ 1, 529, 276, 1112, 420, 29958, 29926, 6878, 841, 29882, 29914, 4230, 29918, 305, 2021, 8247, 13, 3166, 9557, 29889, 1688, 1053, 4321, 8259, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 11837, 13, 13, 3166, 869, 9794, 1053, 7871, 129...
joblib/SubprocessFunctionCaller.py
Topaz1618/Plasticine
0
116069
import time import multiprocessing class SubprocessFunctionCaller(object): class CliFunction(object): def __init__(self, s2c, c2s, lock): self.s2c = s2c self.c2s = c2s self.lock = lock def __call__(self, *args, **kwargs): self.lock.acquire() ...
[ 1, 1053, 931, 13, 5215, 6674, 307, 985, 292, 13, 13, 1990, 3323, 5014, 6678, 5594, 261, 29898, 3318, 1125, 13, 1678, 770, 315, 492, 6678, 29898, 3318, 1125, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 269, 29906, 29883, 29892, 274,...
storm_control/test/test_buffered_1.py
shiwei23/STORM6
47
59491
<gh_stars>10-100 #!/usr/bin/env python """ A test of the BufferedFunctionality class. """ import sys import time from PyQt5 import QtCore, QtWidgets import storm_control.sc_hardware.baseClasses.hardwareModule as hardwareModule class TBWidgetBase(QtWidgets.QWidget): processed = QtCore.pyqtSignal(str) de...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 15945, 29908, 13, 29909, 1243, 310, 278, 22217, 6678, 2877, 770, 29889, 13, 15945, 29908, 13, 52...
abandonedio/urls.py
Kunstmord/abandoned
0
175223
<reponame>Kunstmord/abandoned import abandoned.views from django.conf.urls import patterns, include, url from django.contrib import admin from rest_framework import routers router = routers.DefaultRouter() router.register(r'tags', abandoned.views.TagViewSet) router.register(r'authors', abandoned.views.AuthorViewSet) ...
[ 1, 529, 276, 1112, 420, 29958, 29968, 6465, 29885, 536, 29914, 370, 9214, 287, 13, 5215, 23181, 29889, 7406, 13, 3166, 9557, 29889, 5527, 29889, 26045, 1053, 15038, 29892, 3160, 29892, 3142, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, ...
tests/settings.py
Francislley/CrudDajndo2017.2
0
49881
SECRET_KEY = 'testing' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.staticfiles', 'django.contrib.sessions', 'c...
[ 1, 3725, 22245, 29911, 29918, 10818, 353, 525, 13424, 29915, 13, 13, 25832, 27982, 29903, 353, 426, 13, 1678, 525, 4381, 2396, 426, 13, 4706, 525, 1430, 29954, 8895, 2396, 525, 14095, 29889, 2585, 29889, 1627, 1975, 29889, 22793, 29941, ...
tests/test_annotations_notebook.py
jeromedockes/pylabelbuddy
0
6684
from pylabelbuddy import _annotations_notebook def test_annotations_notebook(root, annotations_mock, dataset_mock): nb = _annotations_notebook.AnnotationsNotebook( root, annotations_mock, dataset_mock ) nb.change_database() assert nb.notebook.index(nb.notebook.select()) == 2 nb.go_to_annot...
[ 1, 515, 11451, 1643, 15841, 4518, 1053, 903, 6735, 800, 29918, 1333, 19273, 13, 13, 13, 1753, 1243, 29918, 6735, 800, 29918, 1333, 19273, 29898, 4632, 29892, 25495, 29918, 17640, 29892, 8783, 29918, 17640, 1125, 13, 1678, 302, 29890, 353,...
sanic_jwt_extended/decorators.py
devArtoria/Sanic-JWT-extended
465
133930
from functools import wraps from typing import Callable, List, Optional, Tuple from sanic.request import Request from sanic_jwt_extended.exceptions import ( AccessDeniedError, ConfigurationConflictError, CSRFError, FreshTokenRequiredError, InvalidHeaderError, NoAuthorizationError, RevokedT...
[ 1, 515, 2090, 312, 8789, 1053, 11463, 567, 13, 3166, 19229, 1053, 8251, 519, 29892, 2391, 29892, 28379, 29892, 12603, 552, 13, 13, 3166, 9753, 293, 29889, 3827, 1053, 10729, 13, 13, 3166, 9753, 293, 29918, 29926, 14554, 29918, 1062, 276...
gen/build_deploy/powershell.py
KostiantynOleksiienko/dcos
0
101060
""" Generates a powershell script to install Windows agent - dcos_install.ps1 """ import os import os.path import gen.build_deploy.util as util import gen.template import gen.util import pkgpanda import pkgpanda.util def generate(gen_out, output_dir): print("Generating Powershell configuration files for DC/OS"...
[ 1, 9995, 13, 5631, 1078, 263, 25532, 2471, 304, 2601, 3852, 10823, 448, 270, 3944, 29918, 6252, 29889, 567, 29896, 13, 15945, 29908, 13, 13, 5215, 2897, 13, 5215, 2897, 29889, 2084, 13, 13, 5215, 2531, 29889, 4282, 29918, 16519, 29889, ...
http-lib-serv/test/__main__.py
jbschool/hpotter-api
0
129358
<gh_stars>0 import unittest # import schema class TestCanTest(unittest.TestCase): def setUp(self): print('setting up...') def test_true_is_true(self): self.assertTrue(1 == 1) def test_false_is_false(self): self.assertFalse(False) if __name__ == '__main__': unittest.main()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 443, 27958, 13, 29937, 1053, 10938, 13, 13, 1990, 4321, 6028, 3057, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 1596, ...
jumeg/gui/tsv/wxutils/jumeg_tsv_wxutils_dlg_options.py
fboers/jumeg
6
144730
#!/usr/bin/env python3 # -+-coding: utf-8 -+- #-------------------------------------------- # Authors: <NAME> <<EMAIL>> # #-------------------------------------------- # Date: 05.09.19 #-------------------------------------------- # License: BSD (3-clause) #-------------------------------------------- # Updates #-----...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29974, 29899, 29883, 3689, 29901, 23616, 29899, 29947, 448, 29974, 29899, 13, 13, 29937, 2683, 2683, 9072, 13, 29937, 13189, 943, 29901, 529, 5813, 29958, 3532, 26862, ...
du/ps_utils.py
diogo149/doo
1
14670
import os import psutil import time def process_time(): p = psutil.Process(os.getpid()) return time.time() - p.create_time()
[ 1, 1053, 2897, 13, 5215, 6529, 4422, 13, 5215, 931, 13, 13, 13, 1753, 1889, 29918, 2230, 7295, 13, 1678, 282, 353, 6529, 4422, 29889, 7032, 29898, 359, 29889, 657, 5935, 3101, 13, 1678, 736, 931, 29889, 2230, 580, 448, 282, 29889, 3...
scripts/hdfs_store.py
coastrock/CEBD1261-2019-fall-group-project
1
26604
<gh_stars>1-10 try: from zipfile import ZipFile from pyspark import SparkContext, SparkConf from pyspark.sql import SparkSession import pyspark.sql.functions as f import os except Exception as e: print(e) ## http://www.hongyusu.com/imt/technology/spark-via-python-basic-setup-count-lines-and-wor...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 2202, 29901, 13, 1678, 515, 14319, 1445, 1053, 796, 666, 2283, 13, 1678, 515, 282, 952, 6378, 1053, 20814, 2677, 29892, 20814, 16376, 13, 1678, 515, 282, 952, 6378,...
parsifal/reviews/metaanalysis/urls.py
glauberferreira/parsifal-mec
1
141682
# coding: utf-8 from django.conf.urls import patterns, include, url urlpatterns = patterns('parsifal.reviews.metaanalysis.views', url(r'^save_metaanalysis/$', 'save_metaanalysis', name='save_metaanalysis'), )
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 13, 3166, 9557, 29889, 5527, 29889, 26045, 1053, 15038, 29892, 3160, 29892, 3142, 13, 13, 2271, 11037, 29879, 353, 15038, 877, 862, 29879, 361, 284, 29889, 276, 7406, 29889, 7299, 15916, 2988...
0120.triangle/solution.py
WZMJ/Algorithms
5
100012
<filename>0120.triangle/solution.py from typing import List class Solution: def minimumTotal(self, triangle: List[List[int]]) -> int: # 自底向上 length = len(triangle) if not length: return 0 for i in range(length - 2, -1, -1): for j in range(i + 1): ...
[ 1, 529, 9507, 29958, 29900, 29896, 29906, 29900, 29889, 26701, 29914, 2929, 918, 29889, 2272, 13, 3166, 19229, 1053, 2391, 13, 13, 13, 1990, 24380, 29901, 13, 1678, 822, 9212, 11536, 29898, 1311, 29892, 17205, 29901, 2391, 29961, 1293, 29...
libweasyl/libweasyl/test/test_text.py
theSeracen/weasyl
0
194640
# encoding: utf-8 from lxml.etree import LIBXML_VERSION import pytest from libweasyl.text import markdown, markdown_excerpt, markdown_link libxml_xfail = pytest.mark.xfail(LIBXML_VERSION < (2, 9), reason='libxml2 too old to preserve whitespace') user_linking_markdown_tests = [ ('<~spam>', '<a href="/~spam">spam...
[ 1, 396, 8025, 29901, 23616, 29899, 29947, 13, 3166, 301, 3134, 29889, 300, 929, 1053, 365, 8979, 9165, 29918, 16358, 13, 5215, 11451, 1688, 13, 13, 3166, 4303, 705, 294, 2904, 29889, 726, 1053, 2791, 3204, 29892, 2791, 3204, 29918, 735,...
cli/work_cli.py
ayonymus/gits
4
83377
class WorkCli: def __init__(self, workbranch): self.workbranch = workbranch def add_subparser(self, subparsers): work_parser = subparsers.add_parser('work', help="Keep track of a currently important branch") work_parser.add_argument("current", nargs="?", type=str, default=None, help="...
[ 1, 29871, 13, 1990, 5244, 29907, 492, 29901, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 664, 17519, 1125, 13, 4706, 1583, 29889, 1287, 17519, 353, 664, 17519, 13, 13, 1678, 822, 788, 29918, 1491, 16680, 29898, 1311, 29892, 1014,...
model-server/ServeAll.py
tmobile/node-red-contrib-yolo-object-detection
2
151936
#!/usr/bin/env python3 import base64 from gevent.pywsgi import WSGIServer import io import os import signal import sys import shutil from threading import Thread def get_parent_dir(n=1): """ returns the n-th parent dicrectory of the current working directory """ current_path = os.path.dirname(os.path.abs...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 2967, 29953, 29946, 13, 3166, 1737, 794, 29889, 2272, 5652, 3146, 1053, 399, 26016, 29902, 6004, 13, 5215, 12013, 13, 5215, 2897, 13, 5215, 7182, 13, 5215, 10876, 13, ...
core/topology/constraint/any.py
xUndero/noc
0
57976
<reponame>xUndero/noc # -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # AnyConstraint # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ------------------------------------------...
[ 1, 529, 276, 1112, 420, 29958, 29916, 25263, 1489, 29914, 10763, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 448, 2683, 2683, 2683, 2683, 23648, 13, 29937, 3139, 21529, 13, 29937, 448, 26...
tests/integration/agenda/test_models.py
rolandgeider/OpenSlides
0
6459
<reponame>rolandgeider/OpenSlides from openslides.agenda.models import Item from openslides.core.models import CustomSlide from openslides.utils.test import TestCase class TestItemManager(TestCase): def test_get_root_and_children_db_queries(self): """ Test that get_root_and_children needs only one...
[ 1, 529, 276, 1112, 420, 29958, 307, 1049, 479, 1241, 29914, 6585, 16973, 2247, 13, 3166, 13246, 29880, 2247, 29889, 351, 8395, 29889, 9794, 1053, 10976, 13, 3166, 13246, 29880, 2247, 29889, 3221, 29889, 9794, 1053, 8701, 29903, 7459, 13, ...
Beginner/WhileLoop.py
mihirkemkar/pythonexercises
0
152106
num = 1 factors = list() while num <= 100: if (num % 10) == 0: factors.append(num) num = num + 1 print("Factors :",factors)
[ 1, 6756, 13, 1949, 353, 29871, 29896, 30004, 13, 17028, 943, 353, 1051, 26471, 13, 8000, 954, 5277, 29871, 29896, 29900, 29900, 29901, 30004, 13, 1678, 565, 313, 1949, 1273, 29871, 29896, 29900, 29897, 1275, 29871, 29900, 29901, 30004, 13...
src/greplin/defer/semaphore_test.py
Cue/greplin-twisted-utils
2
1605621
# Copyright 2012 The greplin-twisted-utils 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...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29906, 450, 1395, 572, 262, 29899, 7516, 12652, 29899, 13239, 13189, 943, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 15...
src/philipstv/pairing.py
bcyran/philipstv
0
1603563
<reponame>bcyran/philipstv<filename>src/philipstv/pairing.py import logging from base64 import b64decode from typing import Callable from ._utils import create_signature from .api import PhilipsTVAPI from .exceptions import PhilipsTVPairingError from .model import DeviceInfo, PairingAuthInfo, PairingGrantPayload, Pair...
[ 1, 529, 276, 1112, 420, 29958, 29890, 1270, 661, 29914, 561, 309, 666, 303, 29894, 29966, 9507, 29958, 4351, 29914, 561, 309, 666, 303, 29894, 29914, 18784, 292, 29889, 2272, 13, 5215, 12183, 13, 3166, 2967, 29953, 29946, 1053, 289, 299...
Stack_and_Queue/S_and_Q_Review.py
misscindy/Interview
0
190284
# Stack & Queue Review # 9.3 valid paren # 9.4 Longest Valid Paren # "(()))(()())" def longest_valid(s): left_p, max_len, end = [], 0, -1 for ndx, p in enumerate(s): if p == "(": left_p.append(ndx) # see a ")" else: if not left_p: end = ndx ...
[ 1, 396, 10292, 669, 5462, 434, 13957, 13, 13, 13, 29937, 29871, 29929, 29889, 29941, 2854, 610, 264, 13, 13, 13, 29937, 29871, 29929, 29889, 29946, 6242, 342, 15758, 1459, 264, 13, 29937, 376, 14885, 876, 14885, 3101, 29908, 13, 1753, ...
papermerge/core/migrations/0023_auto_20200921_0456.py
jcollie/papermerge-core
45
109231
# Generated by Django 3.0.10 on 2020-09-21 04:56 from django.db import migrations, models import taggit.managers class Migration(migrations.Migration): dependencies = [ ('core', '0022_auto_20200909_0826'), ] operations = [ migrations.AlterModelOptions( name='tag', ...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29941, 29889, 29900, 29889, 29896, 29900, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29900, 29929, 29899, 29906, 29896, 29871, 29900, 29946, 29901, 29945, 29953, 13, 13, 3166, 9557, 29889, 2585, 1053,...
app/omwebapp/tests/view/__init__.py
JojiKoike/OMWebAppEngine
0
109341
""" View(WebAPI)のテストコード群パッケージです。 """
[ 1, 9995, 13, 1043, 29898, 3609, 8787, 29897, 30199, 30572, 30255, 30279, 30459, 30185, 30335, 31829, 30715, 30317, 30978, 30185, 30391, 30499, 30427, 30267, 13, 15945, 29908, 13, 2 ]
Exercicios/ex013.py
GabrielMazzuchello/Curso-Em-Video
2
125190
<reponame>GabrielMazzuchello/Curso-Em-Video s = float(input('qual erá o salario do funcionario? R$')) aul = s * 15 / 100 print('o salario do funcionari que andes custava R${:.2f} agora com 15% de aumento custará R${:.2f}'.format(s, (s+aul)))
[ 1, 529, 276, 1112, 420, 29958, 29954, 370, 12836, 29924, 7511, 987, 3156, 29914, 23902, 578, 29899, 6026, 29899, 15167, 13, 29879, 353, 5785, 29898, 2080, 877, 15380, 604, 29976, 288, 4497, 2628, 437, 21802, 2628, 29973, 390, 29938, 8785,...
Code/ConvNetAbel.py
abel-gr/AbelNN
1
17902
<reponame>abel-gr/AbelNN # Copyright <NAME>. All Rights Reserved. # https://github.com/abel-gr/AbelNN import numpy as np import copy as copy import random import matplotlib import matplotlib.pyplot as plt import matplotlib.cm as cm from pylab import text import math class ConvNetAbel: version = 1.2 def...
[ 1, 529, 276, 1112, 420, 29958, 1107, 29899, 629, 29914, 4920, 295, 10262, 13, 29937, 14187, 1266, 529, 5813, 15513, 2178, 26863, 2538, 9841, 29889, 13, 29937, 2045, 597, 3292, 29889, 510, 29914, 1107, 29899, 629, 29914, 4920, 295, 10262, ...
src/iert/router.py
IERT-Prayagraj/iert_django_webapp
0
121660
<reponame>IERT-Prayagraj/iert_django_webapp<gh_stars>0 from iert_news.api.viewsets import newViewset from rest_framework import
[ 1, 529, 276, 1112, 420, 29958, 29902, 20161, 29899, 29925, 764, 351, 10665, 29914, 3722, 29918, 14095, 29918, 2676, 932, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 474, 814, 29918, 15753, 29889, 2754, 29889, 1493, 7224, 1053, ...
about.py
astrid-project/cubebeat
1
175524
title = 'Cubebeat' version = '1.1.0' description = ''
[ 1, 3611, 353, 525, 29907, 431, 774, 29872, 271, 29915, 13, 3259, 353, 525, 29896, 29889, 29896, 29889, 29900, 29915, 13, 8216, 353, 6629, 13, 2 ]
print_numbers.py
sonmezbaris/python-exercises
0
151404
#Prints the number in matrix form def print_numbers(number): for i in range(1,number+1): for j in range(1, number+1): print(i,end=" ") print() number=int(input("please enter a number: ")) if number%2==0: print_numbers(number+1) else: print_numbers(number-1)
[ 1, 29871, 13, 29937, 4040, 9466, 278, 1353, 297, 4636, 883, 13, 1753, 1596, 29918, 20326, 29898, 4537, 1125, 13, 1678, 363, 474, 297, 3464, 29898, 29896, 29892, 4537, 29974, 29896, 1125, 13, 4706, 363, 432, 297, 3464, 29898, 29896, 2989...
main.py
cryos/qmicroscope
0
110099
<reponame>cryos/qmicroscope import sys from qtpy.QtCore import ( QPoint, QSettings, QSize, ) from qtpy.QtWidgets import ( QCheckBox, QLineEdit, QPushButton, QApplication, QVBoxLayout, QHBoxLayout, QFormLayout, QSpinBox, QMainWindow, QWidget, ) from microscope.micro...
[ 1, 529, 276, 1112, 420, 29958, 29883, 719, 359, 29914, 29939, 13076, 1883, 4338, 13, 5215, 10876, 13, 13, 3166, 3855, 29873, 2272, 29889, 17303, 9203, 1053, 313, 13, 1678, 660, 5228, 29892, 13, 1678, 660, 9585, 29892, 13, 1678, 660, 3...
examples/scoring/energy_gbsa/run.py
JonnyWideFoot/pd.arcus
0
175320
<gh_stars>0 from pd import * cseed(4) info() timer() ffps = FFParamSet() ffps.readLib("amber03aa.ff") ## test simple loading of PDB file sim = PDB_In(ffps, "trpcage.pdb"); sim.loadAll(); # create workspace from the system sim wspace = WorkSpace( sim ) # print loaded system - this can be compared later wspace.printP...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 10518, 1053, 334, 13, 29883, 26776, 29898, 29946, 29897, 13, 3888, 580, 13, 20404, 580, 13, 13, 600, 567, 353, 21379, 4736, 2697, 580, 13, 600, 567, 29889, 949, 14868, 703, 314,...
library/python/stu/maya/__init__.py
smiletechnologyunited/seminar_sample
3
1611143
<reponame>smiletechnologyunited/seminar_sample<gh_stars>1-10 #!/usr/bin/env python # coding=utf-8 from __future__ import absolute_import, division, print_function import maya.mel def _escape(msg): m = msg m = m.replace(u"\n", u"\\n") m = m.replace(u"\t", u"\\t") return m.replace(u"\"", u"'") def ...
[ 1, 529, 276, 1112, 420, 29958, 3844, 488, 21695, 3002, 348, 1573, 29914, 12846, 18220, 29918, 11249, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 30143, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937...
webserver/contest/context_processors.py
theSage21/judge-interface
3
29864
<gh_stars>1-10 from contest import models from django.utils import timezone from contest.functions import is_contest_on, contest_phase def contest_time(request): context = {} now = timezone.now() contest = models.ContestControl.objects.first() if now < contest.start: time = contest.start e...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 17793, 1053, 4733, 13, 3166, 9557, 29889, 13239, 1053, 29431, 13, 3166, 17793, 29889, 12171, 1053, 338, 29918, 1285, 342, 29918, 265, 29892, 17793, 29918, 21646, ...
hazelcast/metrics.py
tonytheonlypony/hazelcast-python-client
0
193477
import zlib from hazelcast.serialization import ( BYTE_SIZE_IN_BYTES, CHAR_SIZE_IN_BYTES, BE_UINT16, DOUBLE_SIZE_IN_BYTES, BE_DOUBLE, INT_SIZE_IN_BYTES, BE_INT, LONG_SIZE_IN_BYTES, BE_LONG, BE_UINT8, ) _MASK_PREFIX = 1 _MASK_METRIC = 1 << 1 _MASK_DISCRIMINATOR = 1 << 2 _MASK_DI...
[ 1, 1053, 503, 1982, 13, 13, 3166, 447, 10533, 4384, 29889, 15550, 2133, 1053, 313, 13, 1678, 6770, 4330, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 29892, 13, 1678, 26871, 29918, 14226, 29918, 1177, 29918, 22716, 29911, 2890, 2...
operations/sgRNAProcessing/UpdateGroupReferences.py
BioGRID/CUP-LIMS
2
160863
<filename>operations/sgRNAProcessing/UpdateGroupReferences.py #!/bin/env python # Take a set of sgRNA_Groups and attempt to map them # to better references import sys, string, argparse import MySQLdb import Config import Database from classes import Lookups with Database.db as cursor : cursor.execute( "SELECT sgr...
[ 1, 529, 9507, 29958, 3372, 800, 29914, 5311, 29934, 3521, 7032, 292, 29914, 6422, 4782, 1123, 10662, 29889, 2272, 13, 29937, 14708, 2109, 29914, 6272, 3017, 13, 13, 29937, 11190, 263, 731, 310, 269, 29887, 29934, 3521, 29918, 24020, 322, ...
blog/admin.py
Developer-R-7/CaffeineCode
1
137505
from django.contrib import admin from .models import Category, Post admin.site.register(Post) admin.site.register(Category)
[ 1, 515, 9557, 29889, 21570, 1053, 4113, 13, 13, 3166, 869, 9794, 1053, 17943, 29892, 4918, 13, 6406, 29889, 2746, 29889, 9573, 29898, 6747, 29897, 13, 6406, 29889, 2746, 29889, 9573, 29898, 10900, 29897, 2 ]
physics_aware_training/model_architectures/SplitInputParameterNet.py
mcmahon-lab/Physics-Aware-Training
182
64240
import torch import torch.nn as nn import physics_aware_training.digital_twin_utils class SplitInputParameterNet(nn.Module): def __init__(self, input_dim, nparams, output_dim, parameterNunits = [100,100,100], internalNunits =...
[ 1, 1053, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 17558, 29918, 28327, 29918, 26495, 29889, 7501, 2410, 29918, 29873, 5080, 29918, 13239, 13, 13, 1990, 26178, 4290, 9329, 6779, 29898, 15755, 29889, 7355, 11...
slackforms/conf.py
Albatrous/django-slack-forms
1
43546
""" Use this file to configure pluggable app settings and resolve defaults with any overrides set in project settings. """ from django.conf import settings as project_settings class Settings: pass Settings.SECRET_KEY = getattr( project_settings, "SLACKFORMS_SECRET_KEY", "a-bad-secret-key" ) Settings.SLACK...
[ 1, 9995, 13, 11403, 445, 934, 304, 10822, 715, 12981, 519, 623, 6055, 322, 8814, 21274, 13, 2541, 738, 975, 24040, 731, 297, 2060, 6055, 29889, 13, 15945, 29908, 13, 13, 3166, 9557, 29889, 5527, 1053, 6055, 408, 2060, 29918, 11027, 13...
blog/models.py
gnidoc327/django_web_dev_bookmark
0
87666
from __future__ import unicode_literals from django.contrib.auth.models import User from django.utils.encoding import python_2_unicode_compatible from django.db import models from django.core.urlresolvers import reverse @python_2_unicode_compatible class Post(models.Model): title = models.CharField('TITLE',max_l...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 4911, 13, 3166, 9557, 29889, 13239, 29889, 22331, 1053, 3017, 29918, 29906, 29918, 2523, 356, 29918, 23712, ...
src/app/bin/slack.py
bclarkejr/slack-alerts
8
96173
<filename>src/app/bin/slack.py import json import re import sys import time import traceback from copy import deepcopy from fnmatch import fnmatch from safe_fmt import safe_format from six import ensure_binary from six.moves import urllib SEVERITY_COLORS = ['#555555','#6DB7C6','#65A637','#F7BC38','#F58F39','#D93F3C'] ...
[ 1, 529, 9507, 29958, 4351, 29914, 932, 29914, 2109, 29914, 29879, 2364, 29889, 2272, 13, 5215, 4390, 13, 5215, 337, 13, 5215, 10876, 13, 5215, 931, 13, 5215, 9637, 1627, 13, 3166, 3509, 1053, 6483, 8552, 13, 3166, 7876, 4352, 1053, 78...
baselines/bert_model.py
vvyadrincev/taxonomy-enrichment
11
168088
<reponame>vvyadrincev/taxonomy-enrichment<gh_stars>10-100 import numpy as np from tensorflow.keras.preprocessing.sequence import pad_sequences import torch device = torch.device('cuda') n_gpu = torch.cuda.device_count() for i in range(n_gpu): print(torch.cuda.get_device_name(i)) torch.manual_seed(117) from pyto...
[ 1, 529, 276, 1112, 420, 29958, 29894, 13308, 7887, 1239, 29894, 29914, 20725, 21926, 29899, 264, 4018, 358, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 12655, 408, 7442, 13, 3166, 26110, 29889,...
servo_appdynamics_test.py
opsani/servo-appdynamics
0
182105
<reponame>opsani/servo-appdynamics import pytest import datetime import re import httpx import respx import freezegun import pydantic import servo from servo.types import * from servo_appdynamics import ( AppdynamicsChecks, AppdynamicsConfiguration, AppdynamicsMetric, AppdynamicsRequest, Appdynami...
[ 1, 529, 276, 1112, 420, 29958, 3554, 3270, 29914, 643, 1365, 29899, 932, 29881, 2926, 1199, 13, 5215, 11451, 1688, 13, 5215, 12865, 13, 5215, 337, 13, 13, 5215, 1732, 29916, 13, 5215, 620, 1756, 13, 5215, 3889, 28530, 348, 13, 5215, ...
ChatApp/settings.py
xckomorebi/ChatApp
0
79491
import os from pathlib import Path DB_NAME = "chatapp.db" PROJECT_PATH = Path(__file__).parents[1] DB_PATH = os.path.join(PROJECT_PATH, "resource", DB_NAME) PORT_MIN = 1024 PORT_MAX = 65535 DEBUG = os.getenv("CHAT_APP_DEBUG", False) if DEBUG: TIMEOUT = 30 else: TIMEOUT = 0.5
[ 1, 1053, 2897, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 4051, 29918, 5813, 353, 376, 305, 532, 407, 29889, 2585, 29908, 13, 8618, 17637, 29918, 10145, 353, 10802, 22168, 1445, 1649, 467, 862, 1237, 29961, 29896, 29962, 13, 4051, 29918...
responsibleai/responsibleai/modelanalysis/model_analysis.py
PYTHON01100100/responsible-ai-widgets
1
197447
# Copyright (c) Microsoft Corporation # Licensed under the MIT License. """Defines the ModelAnalysis class.""" import json import numpy as np import pandas as pd from pathlib import Path import pickle import warnings from responsibleai._input_processing import _convert_to_list from responsibleai._interfaces import ...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 7783, 15025, 13, 29937, 10413, 21144, 1090, 278, 341, 1806, 19245, 29889, 13, 13, 15945, 29908, 3206, 1475, 278, 8125, 21067, 4848, 770, 1213, 15945, 13, 13, 5215, 4390, 13, 5215, 12655, 408, 7442...
kanpai/array.py
chandrakantap/kanpai
3
1607769
<filename>kanpai/array.py from .validator import Validator, RequiredMixin class Array(RequiredMixin): def __init__(self, error="Expecting an array.", convert_none_to_empty=False): self.processors = [] self.processors.append({ 'action': self.__assert_array, 'attribs': { ...
[ 1, 529, 9507, 29958, 11052, 29886, 1794, 29914, 2378, 29889, 2272, 13, 3166, 869, 3084, 1061, 1053, 15758, 1061, 29892, 830, 5958, 29924, 861, 262, 13, 13, 13, 1990, 4398, 29898, 19347, 29924, 861, 262, 1125, 13, 1678, 822, 4770, 2344, ...
convert/photo2movie.py
penrin/SP-mapping
0
47433
<reponame>penrin/SP-mapping import sys import cv2 import argparse import time from math import ceil class ProgressBar(): def __init__(self, bar_length=40, slug='#', space='-', countdown=True): self.bar_length = bar_length self.slug = slug self.space = space self.countdown = count...
[ 1, 529, 276, 1112, 420, 29958, 2238, 17056, 29914, 5550, 29899, 20698, 13, 5215, 10876, 13, 5215, 13850, 29906, 13, 5215, 1852, 5510, 13, 5215, 931, 13, 3166, 5844, 1053, 2257, 309, 13, 13, 13, 1990, 20018, 4297, 7295, 13, 13, 1678, ...
migrator/cf.py
cloud-gov/external-domain-broker-migrator
1
82815
import logging from cloudfoundry_client.client import CloudFoundryClient from cloudfoundry_client.errors import InvalidStatusCode logger = logging.getLogger(__name__) def get_cf_client(config): # "why is this a function, and the rest of these are static?" # good question. The __init__ on this immediately pro...
[ 1, 1053, 12183, 13, 3166, 1067, 283, 2176, 618, 719, 29918, 4645, 29889, 4645, 1053, 14293, 9692, 719, 4032, 13, 3166, 1067, 283, 2176, 618, 719, 29918, 4645, 29889, 12523, 1053, 21403, 5709, 3399, 13, 13, 21707, 353, 12183, 29889, 657,...
CodeForces/easy problems/230_b_t_primes.py
dimitrov-dimitar/competitive-programming
0
112361
<filename>CodeForces/easy problems/230_b_t_primes.py<gh_stars>0 # https://codeforces.com/problemset/problem/230/B n = int(input()) numbers = [int(x) for x in input().split()] counter = 0 for number in numbers: if number == 1 or number == 2: print('NO') continue for x in range(2, number): ...
[ 1, 529, 9507, 29958, 3399, 2831, 778, 29914, 29872, 8995, 4828, 29914, 29906, 29941, 29900, 29918, 29890, 29918, 29873, 29918, 558, 1355, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 2045, 597, 401, 1454, 778, 29889...
tutorial/11_Segmentation/03_cluster_extraction.py
maguangyan/pclpy_tutorial
17
1610114
# -*- coding: utf-8 -*- # @Time : DATE:2021/10/6 # @Author : yan # @Email : <EMAIL> # @File : 03_cluster_extraction.py import pclpy from pclpy import pcl import numpy as np def compareCloudShow(cloud, cloud_filtered): # Open 3D viewer and add point cloud and normals viewer = pcl.visualization.PCLVisualizer("...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 732, 2481, 584, 20231, 29901, 29906, 29900, 29906, 29896, 29914, 29896, 29900, 29914, 29953, 13, 29937, 732, 13720, 584, 343, 273, 13, 29937, 732, ...
website/openeuler_release_refresher/obs/__init__.py
openeuler-mirror/infrastructure
1
1615335
<reponame>openeuler-mirror/infrastructure<filename>website/openeuler_release_refresher/obs/__init__.py # -*- coding:utf-8 -*- # Copyright 2019 Huawei Technologies Co.,Ltd. # 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...
[ 1, 529, 276, 1112, 420, 29958, 459, 1600, 8584, 29899, 11038, 729, 29914, 262, 14867, 12425, 29966, 9507, 29958, 22942, 29914, 459, 1600, 8584, 29918, 14096, 29918, 999, 690, 2276, 29914, 26290, 29914, 1649, 2344, 26914, 2272, 13, 29937, ...
days/01/part1.py
gr3yknigh1/aoc2021
0
12537
<filename>days/01/part1.py<gh_stars>0 from __future__ import annotations import os import collections BASE_PATH = os.path.dirname(__file__) INPUT_PATH = os.path.join(BASE_PATH, "input.txt") OUTPUT_PATH = os.path.join(BASE_PATH, "output.txt") def proceed_buffer(buffer: str) -> list[int]: return [int(line) for ...
[ 1, 529, 9507, 29958, 16700, 29914, 29900, 29896, 29914, 1595, 29896, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 5215, 2897, 13, 5215, 16250, 13, 13, 13, 25416, 29918, 101...
falconcv/data/scraper/flickr_scraper.py
haruiz/FalconCV
16
17703
import logging import math import re import time import dask import numpy as np import requests import json import xml.etree.ElementTree as ET from falconcv.data.scraper.scraper import ImagesScraper from falconcv.util import ImageUtil logger = logging.getLogger(__name__) FLICKR_ENDPOINT = "https://www.flickr.com/servic...
[ 1, 1053, 12183, 13, 5215, 5844, 13, 5215, 337, 13, 5215, 931, 13, 5215, 270, 1278, 13, 5215, 12655, 408, 7442, 13, 5215, 7274, 13, 5215, 4390, 13, 5215, 4903, 29889, 300, 929, 29889, 2642, 9643, 408, 382, 29911, 13, 3166, 11092, 535...
engineer/apps.py
mostafaitalian/digitec
0
1610949
from django.apps import AppConfig class EngineerConfig(AppConfig): name = 'engineer'
[ 1, 515, 9557, 29889, 13371, 1053, 2401, 3991, 13, 13, 13, 1990, 10863, 261, 3991, 29898, 2052, 3991, 1125, 13, 1678, 1024, 353, 525, 10599, 261, 29915, 13, 2 ]
reverse_linked_list.py
jaebradley/leetcode.py
0
148325
# Reverse a singly linked list. # Input: 1->2->3->4->5->NULL # Output: 5->4->3->2->1->NULL class Solution(object): def reverseList(self, head): """ Iterative solution that involves changing the next reference for the following node to point at current node. If empty list (i.e. head is Non...
[ 1, 396, 830, 3901, 263, 1809, 368, 9024, 1051, 29889, 13, 29937, 10567, 29901, 29871, 29896, 976, 29906, 976, 29941, 976, 29946, 976, 29945, 976, 10074, 13, 29937, 10604, 29901, 29871, 29945, 976, 29946, 976, 29941, 976, 29906, 976, 29896...
tests/stack_test.py
arthurlogilab/py_zipkin
225
3494
import mock import pytest import py_zipkin.storage @pytest.fixture(autouse=True, scope="module") def create_zipkin_attrs(): # The following tests all expect _thread_local.zipkin_attrs to exist: if it # doesn't, mock.patch will fail. py_zipkin.storage.ThreadLocalStack().get() def test_get_zipkin_attrs_r...
[ 1, 1053, 11187, 13, 5215, 11451, 1688, 13, 13, 5215, 11451, 29918, 7554, 9089, 29889, 12925, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 1300, 1709, 29922, 5574, 29892, 6874, 543, 5453, 1159, 13, 1753, 1653, 29918, 7554, 9...
Taller de Estrucuras de Control Repeticion/Punto01.py
Ricardoppp/Talleres_De_Algoritmos_Ricardo
0
41759
#punto 1 #entradas n=int(input("Escriba el primer digito ")) k=int(input("Escriba el primer digito ")) #caja negra y salidas while True: n=0 if(k<n): n=n-1 print(n) elif(n==k): print(k) break
[ 1, 396, 29886, 12578, 29871, 29896, 13, 29937, 296, 3665, 294, 29871, 13, 29876, 29922, 524, 29898, 2080, 703, 29923, 7588, 2291, 560, 7130, 4697, 2049, 376, 876, 13, 29895, 29922, 524, 29898, 2080, 703, 29923, 7588, 2291, 560, 7130, 46...
Solutions/Problem7.py
igerry/ProjectEulerInPython
0
109766
<gh_stars>0 #!/usr/bin/python class Problem7: ''' 10001st prime Problem 7 104743 By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10 001st prime number? ''' def solution(self): primes = [] nextPrime = 2 ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 13, 1990, 11583, 29955, 29901, 13, 1678, 14550, 13, 268, 29896, 29900, 29900, 29900, 29896, 303, 6019, 13, 1678, 11583, 29871, 29955, 13,...
text/color/__init__.py
jedhsu/text
0
43781
""" *graphical color* Spectral color measures. """ # from ._color import Color # from ._rgb import Rgba # from ._hsv import Hsba __all__ = [ "Color", "Rgba", "Hsba", ]
[ 1, 9995, 13, 13, 1678, 334, 4262, 936, 2927, 29930, 13, 13, 29871, 27738, 1705, 2927, 15366, 29889, 13, 13, 15945, 29908, 13, 13, 29937, 515, 869, 29918, 2780, 1053, 9159, 13, 13, 29937, 515, 869, 29918, 23973, 1053, 390, 29887, 2291,...
perses/samplers/__init__.py
schallerdavid/perses
99
28150
from perses.samplers.samplers import *
[ 1, 515, 3736, 267, 29889, 13445, 572, 414, 29889, 13445, 572, 414, 1053, 334, 13, 2 ]
CL_Net/Referential_Game/Number_Set/teacher.py
MarkFzp/ToM-Pragmatics
0
66860
import os import math import numpy as np import tensorflow as tf from concept import Concept import pdb np.set_printoptions(precision=5, suppress=True) class Teacher: def __init__(self, sess, rl_gamma, boltzman_beta, belief_var_1d, num_distractors, attributes_size, message_space_size): self.sess = sess ...
[ 1, 1053, 2897, 13, 5215, 5844, 13, 5215, 12655, 408, 7442, 13, 5215, 26110, 408, 15886, 13, 13, 3166, 6964, 1053, 1281, 1547, 13, 5215, 282, 2585, 13, 9302, 29889, 842, 29918, 558, 8941, 1980, 29898, 17990, 2459, 29922, 29945, 29892, ...
src/game/law_scope.py
Tequilac/Hacknarok2021
1
166325
<filename>src/game/law_scope.py<gh_stars>1-10 from enum import Enum, auto class LawScope(Enum): state = auto() city = auto()
[ 1, 529, 9507, 29958, 4351, 29914, 11802, 29914, 10653, 29918, 6078, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 14115, 1053, 1174, 398, 29892, 4469, 13, 13, 13, 1990, 7927, 15289, 29898, 16854, ...
src/engineV2.py
JTechnologies/daze-lang
2
72540
<filename>src/engineV2.py escapeProtect = "🵋" def parseTag(line, skip=0): skipNext = skip split = line.replace("\:", "🵋") split = line.split(":") for i in range(len(split)-1): split[i] = split[i].replace("🵋", ":") split[i] = split[i].replace("\(", "🵋") split[0] = split[0].replace...
[ 1, 529, 9507, 29958, 4351, 29914, 10599, 29963, 29906, 29889, 2272, 13, 21587, 1184, 371, 312, 353, 376, 243, 162, 184, 142, 29908, 13, 1753, 6088, 8176, 29898, 1220, 29892, 14383, 29922, 29900, 1125, 13, 1678, 14383, 9190, 353, 14383, ...
uwsgiconf/options/alarms.py
graceshaw/uwsgiconf
0
1601087
<filename>uwsgiconf/options/alarms.py<gh_stars>0 from operator import attrgetter from typing import List from .alarm_types import AlarmType, AlarmCommand, AlarmSignal, AlarmCurl, AlarmLog, AlarmMule, AlarmXmpp from ..base import OptionsGroup from ..utils import listify TypeAlarmExt = List[AlarmType] class Alarms(Op...
[ 1, 529, 9507, 29958, 7262, 5311, 4144, 29888, 29914, 6768, 29914, 284, 279, 1516, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 5455, 1053, 12421, 657, 357, 13, 3166, 19229, 1053, 2391, 13, 13, 3166, 869, 284, 281...
src/ambient/cli.py
mikepqr/ambient
1
128348
<reponame>mikepqr/ambient<filename>src/ambient/cli.py import logging import click from ambient.ambient import make_context from ambient.ambient import today as _today from ambient.ambient import yesterday as _yesterday from ambient.backfill import backfill as _backfill @click.group() @click.version_option() @click....
[ 1, 529, 276, 1112, 420, 29958, 2460, 446, 29886, 29939, 29878, 29914, 1117, 993, 29966, 9507, 29958, 4351, 29914, 1117, 993, 29914, 11303, 29889, 2272, 13, 5215, 12183, 13, 13, 5215, 2828, 13, 13, 3166, 25040, 29889, 1117, 993, 1053, 12...
lib/utils/views/decorators.py
arkanister/minitickets
0
114578
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_required as django_login_required, user_passes_test from django.contrib.auth.views import redirect_to_login from django.core.exceptions import PermissionDenied f...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 390, 3352, 29902, 26282, 29918, 3738, 27286, 29918, 5813, 13, 3...
migrations/versions/013_Fields.py
LCBRU/lbrc_upload
0
169391
from sqlalchemy import ( MetaData, Table, Column, Integer, DateTime, NVARCHAR, String, Index, Boolean, ) from migrate.changeset.constraint import ForeignKeyConstraint, UniqueConstraint meta = MetaData() field = Table( "field", meta, Column("id", Integer, primary_key=Tr...
[ 1, 515, 4576, 284, 305, 6764, 1053, 313, 13, 1678, 20553, 1469, 29892, 13, 1678, 6137, 29892, 13, 1678, 12481, 29892, 13, 1678, 8102, 29892, 13, 1678, 12315, 29892, 13, 1678, 405, 29963, 15364, 29892, 13, 1678, 1714, 29892, 13, 1678, ...
web/fixtures/load_psite_gps_coordinates.py
MTES-MCT/biocarburants
4
1602137
import sys, os import django import csv import pandas as pd os.environ.setdefault("DJANGO_SETTINGS_MODULE", "carbure.settings") django.setup() from producers.models import ProductionSite filename = '%s/web/fixtures/csv/production_sites_gps.csv' % (os.environ['CARBURE_HOME']) df = pd.read_csv(filename, delimiter=';'...
[ 1, 1053, 10876, 29892, 2897, 13, 5215, 9557, 13, 5215, 11799, 13, 5215, 11701, 408, 10518, 13, 13, 359, 29889, 21813, 29889, 842, 4381, 703, 29928, 29967, 2190, 17080, 29918, 10490, 29911, 4214, 29903, 29918, 6720, 14849, 1307, 613, 376, ...
layers/modules/fast_mask_iou.py
sebastian-ruiz/yolact
1
23701
<reponame>sebastian-ruiz/yolact import torch from torch import nn import torch.nn.functional as F #locals from data.config import Config from utils.functions import make_net from utils.script_module_wrapper import ScriptModuleWrapper, script_method_wrapper class FastMaskIoUNet(ScriptModuleWrapper): def __init__(...
[ 1, 529, 276, 1112, 420, 29958, 344, 29890, 579, 713, 29899, 582, 466, 29914, 29891, 324, 627, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 1053, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 13, 29937, ...
src/test_likdelta.py
casutton/bayes-qnet
12
187128
import unittest import qnet import qnetu import numpy import numpy.random import mytime import netutils import estimation import yaml import arrivals import sampling import qstats import sys class TestLikDelta (unittest.TestCase): def test_mm1_delta (self): sampling.set_seed(68310) nreps =...
[ 1, 1053, 443, 27958, 13, 5215, 3855, 1212, 13, 5215, 3855, 1212, 29884, 13, 5215, 12655, 13, 5215, 12655, 29889, 8172, 13, 5215, 590, 2230, 13, 5215, 7787, 13239, 13, 5215, 23248, 13, 5215, 343, 8807, 13, 5215, 18517, 29879, 13, 5215,...
Image Processing/03_Geometric_Transformations.py
siddarthjha/Opencv
2
186001
import numpy as np import cv2 from matplotlib import pyplot as plt # Scaling img = cv2.imread('a.jpg') print(img.shape) cv2.imshow('img', img) res = cv2.resize(img, None, fx=2, fy=2, interpolation = cv2.INTER_AREA) print(res.shape) print(img.shape) cv2.imshow('res', res) cv2.waitKey(0) cv2.destroyAllWindows() # Tran...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 13850, 29906, 13, 3166, 22889, 1053, 11451, 5317, 408, 14770, 13, 13, 29937, 317, 1052, 292, 13, 2492, 353, 13850, 29906, 29889, 326, 949, 877, 29874, 29889, 6173, 1495, 13, 2158, 29898, 2492, 29889,...
DSTK/Timeseries/recurrence_plots.py
jotterbach/dstk
12
27649
import _recurrence_map import numpy as np def poincare_map(ts, ts2=None, threshold=0.1): rec_dist = poincare_recurrence_dist(ts, ts2) return (rec_dist < threshold).astype(int) def poincare_recurrence_dist(ts, ts2=None): if ts2 is None: return _recurrence_map.recurrence_map(ts, ts) else: ...
[ 1, 1053, 903, 3757, 26841, 29918, 1958, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 772, 3742, 598, 29918, 1958, 29898, 1372, 29892, 18696, 29906, 29922, 8516, 29892, 16897, 29922, 29900, 29889, 29896, 1125, 13, 1678, 1162, 29918, 5721,...
sokoapp/contests/tests/test_app/models.py
Mercy-Nekesa/sokoapp
1
120743
<filename>sokoapp/contests/tests/test_app/models.py<gh_stars>1-10 from referee.models import TimePeriodBase class TimePeriod(TimePeriodBase): pass
[ 1, 529, 9507, 29958, 29879, 15218, 932, 29914, 1285, 9197, 29914, 21150, 29914, 1688, 29918, 932, 29914, 9794, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 2143, 23987, 29889, 9794, 1053, 5974, 2...
main.py
felipedmsantos95/hangman-game-py
1
141513
<filename>main.py from lerArquivo import * from utilitariosJogo import * from datetime import datetime import os import json #-------------------------------- Variáveis de controle do jogo ------------------------------ tentativasLetra = 6 letrasErradas = 0 suporPalavras = 3 ganhouJogo = False letrasUtilizadas = [] ...
[ 1, 529, 9507, 29958, 3396, 29889, 2272, 13, 3166, 301, 261, 1433, 339, 4243, 1053, 334, 13, 3166, 3667, 277, 8596, 29967, 10482, 1053, 334, 13, 3166, 12865, 1053, 12865, 13, 5215, 2897, 13, 5215, 4390, 13, 13, 29937, 2683, 2683, 9586,...
Project1-name.py
the-fridge/Python_Projects
1
169745
# !/usr/bin/env python3 # -*- coding: utf-8 -*- # authors: <NAME> / <NAME> """`Project1-name.py` is a program that asks for the user's name Then it print the given name, and the lenght of this name. """ def initial_way (): """ asks the name, print it with its lenght Original code by <NAME>, using several `pr...
[ 1, 396, 1738, 29914, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 15717, 29901, 529, 5813, 29958, 847, 529, 5813, 29958, 13, 13, 15945, 6937, 7...
TemplatesAndTests.py
LSRCT/TandT
0
113402
""" Usefull functions for loading files etc. -AN """ import os import pickle import zipfile, lzma import numpy as np import matplotlib.pyplot as plt from collections import OrderedDict # saves dict to csv using keys as headers def saveToCSV(savedict, filename = "", path = ""): try: #print(sav...
[ 1, 9995, 30004, 13, 11403, 8159, 3168, 363, 8363, 2066, 2992, 22993, 13, 29899, 2190, 30004, 13, 15945, 19451, 13, 30004, 13, 5215, 2897, 30004, 13, 5215, 5839, 280, 30004, 13, 5215, 14319, 1445, 29892, 301, 29920, 655, 30004, 13, 5215,...
docs/hydrostatic-pressure/hydrostatic_pressure.py
TOKU-Systems/tutorials
0
24824
<filename>docs/hydrostatic-pressure/hydrostatic_pressure.py import pandas as pd df = pd.read_sql( ''' SELECT a.name, h.name, s.name, sd.t, sd.y FROM assets a JOIN hardpoints h ON a.id = h.asset_id JOIN signals s ON h.id = s.hardpoint_id JOIN LATERAL ( SELECT x.t, x.y FROM signa...
[ 1, 529, 9507, 29958, 2640, 29914, 29882, 11279, 7959, 29899, 2139, 545, 29914, 29882, 11279, 7959, 29918, 2139, 545, 29889, 2272, 13, 5215, 11701, 408, 10518, 13, 13, 13, 2176, 353, 10518, 29889, 949, 29918, 2850, 29898, 13, 1678, 14550, ...
matchmaker/api.py
gnmerritt/casino
2
65575
from flask import request, jsonify, abort from flask.ext.login import login_required, current_user import bots from matchmaker import app, db import matches import match_logs import util import profile # # Public API # @app.route('/api/matches') @login_required def open_matches(): open = matches.OpenMatches(db...
[ 1, 515, 29784, 1053, 2009, 29892, 4390, 1598, 29892, 27450, 13, 3166, 29784, 29889, 1062, 29889, 7507, 1053, 6464, 29918, 12403, 29892, 1857, 29918, 1792, 13, 13, 5215, 289, 1862, 13, 3166, 1993, 28107, 1053, 623, 29892, 4833, 13, 5215, ...
graphstar/utils.py
pengboomouch/graphstar
0
2303
""" graphstar.utils ~~~~~~~~~~~~~~~ <NAME> A simple bedirectional graph with A* and breadth-first pathfinding. Utils are either used by the search algorithm, or when needed :) Pretty self explainatory (I hope) For more information see the examples and tests folder """ def smooth_path(p): # If the path is o...
[ 1, 9995, 13, 12, 4262, 8508, 29889, 13239, 13, 12, 26594, 14087, 7377, 30022, 13, 12, 29966, 5813, 29958, 13, 13, 12, 29909, 2560, 6592, 8684, 284, 3983, 411, 319, 29930, 322, 18423, 386, 29899, 4102, 2224, 2886, 292, 29889, 13, 13, ...
util.py
andrewdyates/geo_api
1
187412
#!/usr/bin/python from geo import * def get_gpl(gpl_brief=None, gpl_data=None, is_tab=True): """Return geo.Local_GPL object from GPL file names. Args: gpl_brief: str of file path to GPL file meta data brief (as from geo_downloader) gpl_data: str of file path to GPL row descriptions IN DATA ROW ORDER (as f...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 3166, 1737, 29877, 1053, 334, 13, 13, 1753, 679, 29918, 29887, 572, 29898, 29887, 572, 29918, 1182, 2575, 29922, 8516, 29892, 330, 572, 29918, 1272, 29922, 8516, 29892, 338, 29918, 3891, 29922...
demo/demo.py
lrscy/Unsupervised-Dual-Learning-Neural-Machine-Translation-Model
3
68011
<gh_stars>1-10 # coding: utf-8 """ Abstract The demo is a prototype of the project model. Codes and structure here could change in the future. The main point of codes below is to run on local computer and test whether it works on small scale of data. Now: Prove that original model is inaccessible. Start to imple...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 15945, 29908, 25513, 13, 13, 1576, 13455, 338, 263, 22267, 310, 278, 2060, 1904, 29889, 315, 2631, 322, 3829, 1244, ...
types-operations/strings.py
rawzes/python-book
0
149733
s = 'test' print(s[:]) # print whole string print(s[0:-1]) # print tes print(s[1]) # e print(s + "xyz") # concatination testxyz print("A"*90) #s[0] = "s" #str' object does not support item assignment S = "strawberry" L = list(S) print(L) L[0] = 'Z' print(''.join(L)) # Ztrawberry s = ''.join(L) s = s.replace('rr', 'r...
[ 1, 29871, 13, 29879, 353, 525, 1688, 29915, 13, 2158, 29898, 29879, 7503, 2314, 396, 1596, 3353, 1347, 13, 2158, 29898, 29879, 29961, 29900, 13018, 29896, 2314, 396, 1596, 260, 267, 13, 2158, 29898, 29879, 29961, 29896, 2314, 396, 321, ...
ui_lanzou.py
wangkun19930608/lanzou-gui
0
1607854
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'lanzou-gui/lanzou.ui' # # Created by: PyQt5 UI code generator 5.13.2, and I have edited # from PyQt5 import QtCore, QtGui, QtWidgets from dialogs import MyLineEdit class MyTableView(QtWidgets.QTableView): """加入拖拽功能的表格显示器""" drop_fil...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 3812, 5314, 5759, 515, 5183, 14313, 934, 525, 29880, 4096, 283, 29899, 23569, 29914, 29880, 4096, 283, 29889, 1481, 29915, 13, 29937, 13, 2993...
Backend/core/destiny/profile.py
LukasSchmid97/elevatorbot
0
74535
import asyncio import dataclasses import datetime from typing import Optional from anyio import to_thread from sqlalchemy.ext.asyncio import AsyncSession from Backend.core.errors import CustomException from Backend.crud import crud_activities, destiny_manifest, discord_users from Backend.crud.destiny.collectibles imp...
[ 1, 1053, 408, 948, 3934, 13, 5215, 848, 13203, 13, 5215, 12865, 13, 3166, 19229, 1053, 28379, 13, 13, 3166, 738, 601, 1053, 304, 29918, 7097, 13, 3166, 4576, 284, 305, 6764, 29889, 1062, 29889, 294, 948, 3934, 1053, 20688, 7317, 13, ...