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
pymunk-pymunk-4.0.0/examples/pyglet_util_demo.py
sneharavi12/DeepLearningFinals
9
172493
"""Showcase what the output of pymunk.pyglet_util draw methods will look like. See pygame_util_demo.py for a comparison to pygame. """ __version__ = "$Id:$" __docformat__ = "reStructuredText" import sys import pyglet import pymunk from pymunk.vec2d import Vec2d import pymunk.pyglet_util from shapes_for_draw_d...
[ 1, 9995, 8964, 4878, 825, 278, 1962, 310, 282, 962, 2960, 29889, 2272, 29887, 1026, 29918, 4422, 4216, 3519, 674, 1106, 763, 29889, 13, 13, 13393, 22028, 29918, 4422, 29918, 17482, 29889, 2272, 363, 263, 10230, 304, 22028, 29889, 13, 15...
researchutils/chainer/training/__init__.py
keio-ytlab/researchutils
1
101885
from researchutils.chainer.training import extensions
[ 1, 515, 5925, 13239, 29889, 305, 4008, 29889, 26495, 1053, 17752, 2 ]
pydocteur/__init__.py
awecx/PyDocTeur
4
185003
<filename>pydocteur/__init__.py from pydocteur.app import application __all__ = ["application"]
[ 1, 529, 9507, 29958, 2272, 1867, 312, 5411, 29914, 1649, 2344, 26914, 2272, 13, 3166, 11451, 1867, 312, 5411, 29889, 932, 1053, 2280, 13, 13, 1649, 497, 1649, 353, 6796, 6214, 3108, 13, 2 ]
examples/bintree.py
jdrprod/Pym-s
3
32847
class binary_tree: def __init__(self): pass class Node(binary_tree): __field_0 : int __field_1 : binary_tree __field_2 : binary_tree def __init__(self, arg_0 : int , arg_1 : binary_tree , arg_2 : binary_tree ): self.__field_0 = arg_0 self.__field_1 = arg_1 self.__fi...
[ 1, 770, 7581, 29918, 8336, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 308, 1209, 13, 13, 1990, 9071, 29898, 19541, 29918, 8336, 1125, 13, 1678, 4770, 2671, 29918, 29900, 584, 938, 13, 1678, 4770, 2671, 29918, 29896, 584, ...
updatesproducer/tests/mock_updates_provider.py
AppleteeYT/Iris
0
159303
from datetime import datetime from updatesproducer.iupdates_provider import IUpdatesProvider from updatesproducer.updateapi.update import Update class MockUpdatesProvider(IUpdatesProvider): def get_updates(self, user_id: str): return [ Update( content='Mock updateapi', ...
[ 1, 515, 12865, 1053, 12865, 13, 13, 3166, 11217, 5498, 2265, 29889, 29875, 786, 15190, 29918, 18121, 1053, 306, 3373, 15190, 6980, 13, 3166, 11217, 5498, 2265, 29889, 5504, 2754, 29889, 5504, 1053, 10318, 13, 13, 13, 1990, 26297, 3373, ...
PyOffice/OpenFile.py
AMoazeni/PyOffice
0
152205
<filename>PyOffice/OpenFile.py from time import time as t from urllib.request import urlopen as get def OpenFile(*args, **kwargs): ''' OpenFile(str 'file_path') requires an 'str' PATH or URL input, returns a Python Dictionary with the file data. ''' # Initialize func_name = 'OpenFile...
[ 1, 529, 9507, 29958, 19737, 27247, 29914, 6585, 2283, 29889, 2272, 13, 3166, 931, 1053, 931, 408, 260, 13, 3166, 3142, 1982, 29889, 3827, 1053, 5065, 417, 2238, 408, 679, 13, 13, 1753, 4673, 2283, 10456, 5085, 29892, 3579, 19290, 1125, ...
python-checker/Examples/FULL/cob_command_gui/src/command_gui_buttons/__init__.py
andersfischernielsen/ROS-dependency-checker
0
171309
from command_gui_buttons import *
[ 1, 515, 1899, 29918, 23569, 29918, 4187, 7453, 1053, 334, 13, 2 ]
convertJSON.py
Grupo-3-PEI/website
0
191660
<filename>convertJSON.py import json def convert(jsonfile): return json.dumps({ "type": "FeatureCollection", "features": [ {"type": "Feature", "geometry": { "type": "Point", ...
[ 1, 529, 9507, 29958, 13441, 7249, 29889, 2272, 13, 5215, 4390, 30004, 13, 30004, 13, 1753, 3588, 29898, 3126, 1445, 1125, 30004, 13, 1678, 736, 4390, 29889, 29881, 17204, 3319, 376, 1853, 1115, 376, 19132, 7196, 15231, 13, 462, 4706, 37...
FreeBSD/bsd_netstats_poller.py
failedrequest/telegraf-plugins
0
19639
<filename>FreeBSD/bsd_netstats_poller.py #!/usr/bin/env python3 # 3/21/2021 # Updated for python3 # A Simple sysctl to telegraf plugin for freebsd's netstats ip info from freebsd_sysctl import Sysctl as sysctl import subprocess as sp import re import json import sys import pprint as pp hostname = sysctl("kern.hostna...
[ 1, 529, 9507, 29958, 20475, 29933, 7230, 29914, 29890, 4928, 29918, 1212, 16202, 29918, 3733, 1358, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 29937, 29871, 29941, 29914, 29906, 29896, 29914, 29906, ...
utils/convert.py
apozanco/icaps2022.github.io
0
126263
<filename>utils/convert.py import sys def convert(in_file, out_file): with open(in_file, 'r') as f: lines = [l.strip() for l in f.readlines()] new_lines = [] # First, combine all lines that are not empty for line in lines: if (line == '') or (line[0] in ['-', '*']): new_l...
[ 1, 529, 9507, 29958, 13239, 29914, 13441, 29889, 2272, 13, 13, 5215, 10876, 13, 13, 1753, 3588, 29898, 262, 29918, 1445, 29892, 714, 29918, 1445, 1125, 13, 1678, 411, 1722, 29898, 262, 29918, 1445, 29892, 525, 29878, 1495, 408, 285, 299...
ggcontable/production.py
jmjacquet/IronWeb
0
53515
<reponame>jmjacquet/IronWeb # Django settings for sistema_bomberos project. from .settings import * from decouple import config DEBUG = False STATIC_URL = '/staticfiles/' DB_USER = config('DB_USER') DB_PASS = config('DB_PASS') DB_HOST = config('DB_HOST') DATABASES = { 'default': { 'ENGINE': 'dja...
[ 1, 529, 276, 1112, 420, 29958, 21231, 29926, 562, 12621, 29914, 29902, 1617, 3609, 13, 29937, 15337, 6055, 363, 10502, 29918, 29890, 290, 495, 359, 2060, 29889, 13, 3166, 869, 11027, 1053, 334, 13, 3166, 1602, 283, 552, 1053, 2295, 13, ...
gpenkf/experiments/data_provider.py
danilkuzin/GP-EnKF
12
156235
<reponame>danilkuzin/GP-EnKF class DataProvider(object): pass
[ 1, 529, 276, 1112, 420, 29958, 18386, 309, 2120, 23374, 29914, 19903, 29899, 2369, 29968, 29943, 13, 1990, 3630, 6980, 29898, 3318, 1125, 13, 1678, 1209, 2 ]
Codility/PassingCars.py
batumoglu/Python_Algorithms
0
121578
# you can write to stdout for debugging purposes, e.g. # print("this is a debug message") def prefix(A): pref = [0] * (len(A)+1) for i in range(1, len(A)+1): pref[i] = pref[i-1] + A[i-1] return pref def countTotal(P, left, right): return P[right] - P[left] def solution(A): pref = prefix(A)...
[ 1, 396, 366, 508, 2436, 304, 27591, 363, 13490, 11976, 29892, 321, 29889, 29887, 29889, 13, 29937, 1596, 703, 1366, 338, 263, 4744, 2643, 1159, 13, 1753, 10944, 29898, 29909, 1125, 13, 1678, 758, 29888, 353, 518, 29900, 29962, 334, 313,...
parakeet/models/fastspeech/length_regulator.py
xbsdsongnan/Parakeet
1
133923
<gh_stars>1-10 # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 349, 22352, 29925, 22352, 13189, 943, 29889, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29...
keras_textclassification/keras_layers/attention_dot.py
wyq0706/Keras-TextClassification
1
139680
<filename>keras_textclassification/keras_layers/attention_dot.py # !/usr/bin/python # -*- coding: utf-8 -*- # @time : 2020/3/31 19:10 # @author : Mo # @function: from keras.regularizers import L1L2, Regularizer # from keras.engine.topology import Layer from keras.layers import Layer from keras import backend as K...
[ 1, 529, 9507, 29958, 3946, 294, 29918, 726, 1990, 2450, 29914, 3946, 294, 29918, 29277, 29914, 1131, 2509, 29918, 6333, 29889, 2272, 13, 29937, 1738, 29914, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, ...
templates/setup/setup.py
0-complexity/kubernetes
0
190190
from js9 import j from zerorobot.template.base import TemplateBase from zerorobot.template.state import StateCheckError class Setup(TemplateBase): version = '0.0.1' template_name = "setup" SSHKEY_TEMPLATE = 'github.com/openvcloud/0-templates/sshkey/0.0.1' OVC_TEMPLATE = 'github.com/openvcloud/0-tem...
[ 1, 29871, 13, 3166, 6965, 29929, 1053, 432, 13, 3166, 503, 261, 272, 711, 327, 29889, 6886, 29889, 3188, 1053, 25663, 5160, 13, 3166, 503, 261, 272, 711, 327, 29889, 6886, 29889, 3859, 1053, 4306, 5596, 2392, 13, 13, 13, 1990, 3789, ...
tests/test_dialect.py
zzzeek/calchipan
1
137716
<reponame>zzzeek/calchipan from sqlalchemy.testing.fixtures import TestBase import pandas as pd from sqlalchemy import create_engine, MetaData, Table, Column, \ String, Integer, ForeignKey, select, exc, func from . import eq_, assert_raises_message class DialectTest(TestBase): def _emp_d_fixture(self, id_col...
[ 1, 529, 276, 1112, 420, 29958, 5617, 911, 1416, 29914, 1052, 305, 666, 273, 13, 3166, 4576, 284, 305, 6764, 29889, 13424, 29889, 7241, 486, 1973, 1053, 4321, 5160, 13, 13, 5215, 11701, 408, 10518, 13, 3166, 4576, 284, 305, 6764, 1053,...
www/purple_admin/urls.py
SubminO/vas
0
23537
from django.urls import path from purple_admin import views urlpatterns = [ path('', views.cabinet, name='admin_panel_cabinet'), # Адмника Наименований маршрутов path('route_list', views.cabinet_list, {'type': 'route'}, name='admin_panel_route_list'), path('route_add', views.cabinet_add, {'type': 'rou...
[ 1, 515, 9557, 29889, 26045, 1053, 2224, 13, 13, 3166, 3708, 552, 29918, 6406, 1053, 8386, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, 2224, 877, 742, 8386, 29889, 29883, 370, 10157, 29892, 1024, 2433, 6406, 29918, 15119, 29918, 2988...
gtm/GTM.py
TimurGimadiev/GTM
0
176024
<filename>gtm/GTM.py import os import sys import math import torch import torch.nn as nn class GTMEstimator(nn.Module): """ Generative Topographic Mapping implementation with Gaussian Noise manifold model. Source: https://www.microsoft.com/en-us/research/wp-content/uploads/1998/01/bishop-gtm-ncomp-98.pdf ...
[ 1, 529, 9507, 29958, 4141, 29885, 29914, 29954, 23081, 29889, 2272, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 5844, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 13, 13, 1990, 21342, 2303, 303, 326, 106...
module2-sql-for-analysis/assignment_2_postgresql.py
ash827/DS-Unit-3-Sprint-2-SQL-and-Databases
0
142367
<filename>module2-sql-for-analysis/assignment_2_postgresql.py<gh_stars>0 # -*- coding: utf-8 -*- """Assignment 2 PostgreSQL.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1RaFLSTAwoZ8IeLg27YQqhnMe-g3Vtt4m POSTGRES DEMO """ !pip install psycopg2...
[ 1, 529, 9507, 29958, 5453, 29906, 29899, 2850, 29899, 1454, 29899, 15916, 29914, 465, 10194, 29918, 29906, 29918, 29272, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 2994...
YouTube-PyQt5/09_radio_button.py
dloperab/Python-GUI
2
39693
import sys from PyQt5 import QtGui, QtCore from PyQt5.QtWidgets import QApplication, QDialog, QGroupBox, QVBoxLayout, QHBoxLayout, QRadioButton, QLabel class MainWindow(QDialog): def __init__(self): super().__init__() self.title = "PyQt5 Radio Button" self.top = 400 self.left = 2...
[ 1, 1053, 10876, 13, 13, 3166, 10772, 17303, 29945, 1053, 14705, 28707, 29892, 14705, 9203, 13, 3166, 10772, 17303, 29945, 29889, 17303, 8801, 29879, 1053, 660, 4873, 29892, 660, 7647, 29892, 660, 4782, 3313, 29892, 660, 29963, 3313, 3453, ...
Backend_folder/models/socials.py
Miguel22247/MatchGame
0
123893
<reponame>Miguel22247/MatchGame<gh_stars>0 #!/usr/bin/python3.6 """Script to create an instance of the class Social""" from sqlalchemy import Column, String from models.base_model import Base, BaseModel class Social(BaseModel, Base): """Class to store the social data""" __tablename__ = "social" name = Col...
[ 1, 529, 276, 1112, 420, 29958, 29924, 335, 2491, 29906, 29906, 29906, 29946, 29955, 29914, 9652, 14199, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 29941, 29889, 29953, 13, 15945, 29908, 4...
storage.py
eybisi/theFS
0
139105
import rpyc import uuid import os from rpyc.utils.server import ThreadedServer DATA_DIR = "/tmp/storage/" class StorageService(rpyc.Service): # exposed classes & methods ALIAES = ["storage"] def on_connect(self,conn): print("[+] Client Connected {}".format(conn._channel.stream.sock.getpeername())...
[ 1, 1053, 364, 2272, 29883, 13, 5215, 318, 5416, 13, 5215, 2897, 13, 13, 3166, 364, 2272, 29883, 29889, 13239, 29889, 2974, 1053, 10480, 287, 6004, 13, 13, 14573, 29918, 9464, 353, 5591, 7050, 29914, 12925, 12975, 13, 13, 1990, 26162, ...
app/controllers/web/admin/component.py
arxcdr/silverback
0
145068
""" Component Web Controller """ # Standard Library import os # Third Party Library from django.views import View from django.http import Http404 from django.shortcuts import render from django.utils.translation import gettext as _ # Local Library from app.modules.core.context import Context from app.modules.core.de...
[ 1, 9995, 13, 5308, 2563, 15830, 13, 15945, 29908, 13, 13, 29937, 10117, 9538, 13, 5215, 2897, 13, 13, 29937, 18008, 9173, 9538, 13, 3166, 9557, 29889, 7406, 1053, 4533, 13, 3166, 9557, 29889, 1124, 1053, 9056, 29946, 29900, 29946, 13, ...
pyPowerCLI/__init__.py
arielsafari/pyPowerCLI
0
120604
from .install import is_installed from .install import install_powercli from .install import uninstall_powercli from .powershell import Powershell from .powershell import PowershellException __version__ = "0.0.1"
[ 1, 29871, 13, 3166, 869, 6252, 1053, 338, 29918, 25537, 13, 3166, 869, 6252, 1053, 2601, 29918, 13519, 11303, 13, 3166, 869, 6252, 1053, 27608, 29918, 13519, 11303, 13, 3166, 869, 12248, 27456, 1053, 12265, 27456, 13, 3166, 869, 12248, ...
src/lib/utils/matching.py
jfparentledartech/DEFT
0
172598
<filename>src/lib/utils/matching.py<gh_stars>0 import lap import numpy as np import scipy from cython_bbox import bbox_overlaps as bbox_ious from scipy.spatial.distance import cdist from lib.utils.tracking_utils import kalman_filter import os.path, copy from scipy.spatial import ConvexHull # This function is taken fro...
[ 1, 529, 9507, 29958, 4351, 29914, 1982, 29914, 13239, 29914, 4352, 292, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 23012, 13, 5215, 12655, 408, 7442, 13, 5215, 4560, 2272, 13, 3166, 274, 1656, 29918, 29890, 1884,...
test1.py
redeye999/pyneta
0
198265
x = { 1, 2, 3, 4, 5 } for i in x: print i
[ 1, 921, 353, 426, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 500, 13, 1454, 474, 297, 921, 29901, 13, 1678, 1596, 474, 13, 13, 2 ]
reminder.py
starhound/Parts_Bot
2
118677
<filename>reminder.py<gh_stars>1-10 import main import parts_history import json import datetime import threading import logger PARTS_CHAT = 1 def report_action_card(message): message = message["msg"] content = message.split(':') reminder = "Parts order for " + content + " has been unclaimed for three or...
[ 1, 529, 9507, 29958, 1745, 4995, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 1667, 13, 5215, 5633, 29918, 18434, 13, 5215, 4390, 13, 5215, 12865, 13, 5215, 3244, 292, 13, 5215, 17927, 13, 13...
bin/generateLogTenX.py
ErikMeinders/cirrus
0
98480
<filename>bin/generateLogTenX.py<gh_stars>0 # # Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at # #...
[ 1, 529, 9507, 29958, 2109, 29914, 17158, 3403, 29911, 264, 29990, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 29937, 13, 29937, 29871, 14187, 1266, 29871, 29906, 29900, 29896, 29900, 29899, 29906, 29900, 29896, 29929, ...
realtime_kiawase/realtime_kiawase.py
actionpterygii/arishihiNoDetectMultiScale
0
87038
# -*- coding: utf-8 -*- """ Created on Fri Dec 09 13:52:37 2016 @author: _ """ import cv, cv2, numpy as np if __name__ == '__main__': ESC_KEY = 27 INTERVAL= 33 FRAME_RATE = 30 DEVICE_ID = 0 cap = cv2.VideoCapture(DEVICE_ID) end_flag, c_fr...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 30004, 13, 15945, 19451, 13, 20399, 373, 11169, 3826, 29871, 29900, 29929, 29871, 29896, 29941, 29901, 29945, 29906, 29901, 29941, 29955, 29871, 29906, 29900, 29...
esphomeyaml/helpers.py
TheJulianJES/esphomeyaml
0
80825
<filename>esphomeyaml/helpers.py from __future__ import print_function import errno import logging import os import socket import subprocess from esphomeyaml.py_compat import text_type, IS_PY2 _LOGGER = logging.getLogger(__name__) def ensure_unique_string(preferred_string, current_strings): test_string = prefe...
[ 1, 529, 9507, 29958, 267, 561, 608, 25162, 29914, 3952, 6774, 29889, 2272, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 4589, 1217, 13, 5215, 12183, 13, 5215, 2897, 13, 5215, 9909, 13, 5215, 1014, 5014, 13...
run_vn_baselines.py
netlab-lcy/CMIX
1
58237
<gh_stars>1-10 ''' argv[1]: log_dir path argv[2]: the VNEnv pickle instance path ''' from baselines.algorithm import * from envs.vn_env import VNEnv from utils.utils import cleanup_dir import sys import pickle import time scheme_list = ["no_relay", "max_SINR", "DCRA", "min_latency", "greedy"] log_dir = sys.argv[1] ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 12008, 13, 19218, 29961, 29896, 5387, 1480, 29918, 3972, 2224, 13, 19218, 29961, 29906, 5387, 278, 478, 29940, 21745, 5839, 280, 2777, 2224, 13, 12008, 13, 3166, 2362...
wandb/sklearn/calculate/outlier_candidates.py
soumik12345/client
0
135718
<reponame>soumik12345/client from warnings import simplefilter import numpy as np import wandb from wandb.sklearn import utils # ignore all future warnings simplefilter(action="ignore", category=FutureWarning) def outlier_candidates(regressor, X, y): # Fit a linear model to X and y to compute MSE regressor...
[ 1, 529, 276, 1112, 420, 29958, 29879, 283, 29885, 638, 29896, 29906, 29941, 29946, 29945, 29914, 4645, 13, 3166, 18116, 1053, 2560, 4572, 13, 13, 5215, 12655, 408, 7442, 13, 13, 5215, 24706, 29890, 13, 3166, 24706, 29890, 29889, 808, 19...
setup.py
marchete/django-adldap-sync
5
194545
#!/usr/bin/env python from setuptools import find_packages from setuptools import setup from adldap_sync import __version__ as version with open('README.md') as f: readme = f.read() setup( name='django-adldap-sync', version=version, description='A Django application for synchronizing LDAP users, gr...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 3166, 731, 21245, 8789, 1053, 1284, 29918, 8318, 13, 3166, 731, 21245, 8789, 1053, 6230, 13, 13, 3166, 594, 430, 481, 29918, 16593, 1053, 4770, 3259, 1649, 408, 1873, 13, 13, 13,...
pysal/spatial_dynamics/tests/test_directional.py
cubensys/pysal
0
78939
<reponame>cubensys/pysal import unittest import pysal from pysal.spatial_dynamics import directional import numpy as np class Rose_Tester(unittest.TestCase): def setUp(self): f = open(pysal.examples.get_path("spi_download.csv"), 'r') lines = f.readlines() f.close() lines = [line.st...
[ 1, 529, 276, 1112, 420, 29958, 29883, 431, 575, 952, 29914, 29886, 952, 284, 13, 5215, 443, 27958, 13, 5215, 282, 952, 284, 13, 3166, 282, 952, 284, 29889, 1028, 15238, 29918, 29881, 2926, 1199, 1053, 5305, 284, 13, 5215, 12655, 408, ...
nicos_mlz/delab/setups/qmesydaq.py
mlz-ictrl/nicos
12
163508
description = 'testing qmesydaq' group = 'optional' excludes = [] sysconfig = dict( datasinks = ['LiveViewSink'], ) tango_base = 'tango://localhost:10000/test/qmesydaq/' devices = dict( # RAWFileSaver = device('nicos.devices.datasinks.RawImageSink', # description = 'Saves image data in RAW format',...
[ 1, 6139, 353, 525, 13424, 3855, 4467, 29891, 1388, 29939, 29915, 13, 13, 2972, 353, 525, 25253, 29915, 13, 13, 735, 27722, 353, 5159, 13, 13, 9675, 2917, 353, 9657, 29898, 13, 1678, 6155, 19363, 353, 6024, 23859, 1043, 29903, 682, 746...
XGBoosting/code.py
Aditya1231/ga-learner-dsmp-repo
0
136324
<reponame>Aditya1231/ga-learner-dsmp-repo # -------------- import pandas as pd from sklearn.model_selection import train_test_split #path - Path of file df = pd.read_csv(path) X = df.drop(['customerID','Churn'],axis=1) y = df['Churn'].copy() X_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.3,random_...
[ 1, 529, 276, 1112, 420, 29958, 3253, 537, 29874, 29896, 29906, 29941, 29896, 29914, 3249, 29899, 1945, 1089, 29899, 6289, 1526, 29899, 20095, 13, 29937, 448, 9072, 29899, 13, 5215, 11701, 408, 10518, 13, 3166, 2071, 19668, 29889, 4299, 29...
retro/models.py
WSMathias/Retro360-API
0
182680
<reponame>WSMathias/Retro360-API<filename>retro/models.py from django.db import models from django.contrib.auth.models import User from django.urls import reverse from django.http import HttpResponseRedirect # class RetroUser(models.Model): # user = models.OneToOneField(User,on_delete=models.CASCADE,default='0') #...
[ 1, 529, 276, 1112, 420, 29958, 7811, 11309, 3173, 29914, 8015, 307, 29941, 29953, 29900, 29899, 8787, 29966, 9507, 29958, 2267, 307, 29914, 9794, 29889, 2272, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9557, 29889, 21570, 29889, 5...
Sergeant-RANK/PRACTICE/1420A.py
rohansaini886/Peer-Programming-Hub-CP-Winter_Camp
2
155677
<reponame>rohansaini886/Peer-Programming-Hub-CP-Winter_Camp<filename>Sergeant-RANK/PRACTICE/1420A.py for _ in range(int(input())): n = int(input()) l = list(map(int, input().split(" "))) is_true = False for i in range(1, n): if l[i] >= l[i-1]: is_true = True break if ...
[ 1, 529, 276, 1112, 420, 29958, 307, 29882, 550, 475, 29875, 29947, 29947, 29953, 29914, 15666, 261, 29899, 9283, 4056, 29899, 16046, 29899, 6271, 29899, 29956, 1639, 29918, 29907, 1160, 29966, 9507, 29958, 1748, 479, 424, 29899, 29934, 2190...
source/setups/euler/3d/bonnor-ebert/generate.py
jmark/nemo
0
63384
#!/usr/bin/env python import sys,os root = os.environ['NEMO_ROOT'] site = os.environ['NEMO_SITE'] sys.path.append(os.path.join(root,'scripts')) from nemo import Makefile mk = Makefile( root = root, sites = site, flags = dict(PP_N_NODES = 4, PP_KERNEL_DGFV_QMAX = 2, PP_SPLIT_FORM = 0, PP_MESH_PERIODIC =...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 10876, 29892, 359, 13, 13, 4632, 353, 2897, 29889, 21813, 1839, 8186, 6720, 29918, 21289, 2033, 13, 2746, 353, 2897, 29889, 21813, 1839, 8186, 6720, 29918, 29903, 9094, 2033, ...
tkinter/GroupBox/GroupBox.py
Python-clique/Examples_Python
1
177459
<reponame>Python-clique/Examples_Python<filename>tkinter/GroupBox/GroupBox.py<gh_stars>1-10 #!/usr/bin/env python3 # -*-coding:utf-8 -* import tkinter import tkinter.messagebox import tkinter.ttk class Form1(tkinter.Tk): def __init__(self): super().__init__() self.frame = tkinter.ttk.Frame(self) self.f...
[ 1, 529, 276, 1112, 420, 29958, 11980, 29899, 29883, 9854, 29914, 1252, 9422, 29918, 11980, 29966, 9507, 29958, 11178, 1639, 29914, 4782, 3313, 29914, 4782, 3313, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, ...
basic/007_Reverse_Int.py
Dynamic-Ruo/Leetcode-Practice-with-Python
1
83789
class Solution: def reverse(self, x: int) -> int: # get the sign of x if x == 0: return x sign = abs(x) / x x = abs(x) # reverse number num = 0 # reverse process while x != 0: temp = x % 10 num = num * 10 + temp ...
[ 1, 770, 24380, 29901, 13, 1678, 822, 11837, 29898, 1311, 29892, 921, 29901, 938, 29897, 1599, 938, 29901, 13, 4706, 396, 679, 278, 1804, 310, 921, 13, 4706, 565, 921, 1275, 29871, 29900, 29901, 13, 9651, 736, 921, 13, 4706, 1804, 353,...
indico/modules/events/util.py
javfg/indico
1
72875
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import json import os import random import re import warnings from collections import defaultdict from con...
[ 1, 396, 910, 934, 338, 760, 310, 1894, 1417, 29889, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29900, 29906, 448, 29871, 29906, 29900, 29906, 29896, 315, 1001, 29940, 13, 29937, 13, 29937, 1894, 1417, 338, 3889, 7047,...
newsXtract.py
selection-bias-www2018/NewsXtract
1
30133
<reponame>selection-bias-www2018/NewsXtract import os,json import requests BASE_URL = 'http://epfl.elasticsearch.spinn3r.com/content*/_search' BULK_SIZE = 100 SPINN3R_SECRET = os.environ['SPINN3R_SECRET'] HEADERS = { 'X-vendor': 'epfl', 'X-vendor-auth': SPINN3R_SECRET } query = { "size": BULK_SIZE, ...
[ 1, 529, 276, 1112, 420, 29958, 21731, 29899, 29890, 3173, 29899, 1636, 29906, 29900, 29896, 29947, 29914, 29328, 29990, 29873, 1461, 13, 5215, 2897, 29892, 3126, 13, 5215, 7274, 13, 13, 25416, 29918, 4219, 29871, 353, 525, 1124, 597, 1022...
ally/utils/option.py
rjfranssen/PyAlly
53
18650
<gh_stars>10-100 # MIT License # # Copyright (c) 2020 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mod...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 341, 1806, 19245, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 529, 5813, 29958, 13, 29937, 13, 29937, ...
falconapi_view.py
splunk-soar-connectors/falconapi
1
66587
# File: falconapi_view.py # # Copyright (c) 2016-2018 Splunk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ 1, 396, 3497, 29901, 11092, 535, 2754, 29918, 1493, 29889, 2272, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29953, 29899, 29906, 29900, 29896, 29947, 317, 572, 2960, 9266, 29889, 13, 29937, 13, 29937, ...
ginga/util/mosaic.py
astrofrog/ginga
0
193211
#! /usr/bin/env python # # mosaic.py -- Example of quick and dirty mosaicing of FITS images # # <NAME> (<EMAIL>) # # Copyright (c) <NAME>. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import sys, os import logging from ginga import A...
[ 1, 396, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 13, 29937, 286, 3628, 293, 29889, 2272, 1192, 8741, 310, 4996, 322, 26616, 286, 3628, 18499, 310, 383, 1806, 29903, 4558, 13, 29937, 13, 29937, 529, 5813, 29958, 313, ...
atest/testdata/standard_libraries/builtin/FailUntilSucceeds.py
rdagum/robotframework
7,073
193706
import time class FailUntilSucceeds: ROBOT_LIBRARY_SCOPE = 'TESTCASE' def __init__(self, times_to_fail=0): self.times_to_fail = int(times_to_fail) def set_times_to_fail(self, times_to_fail): self.__init__(times_to_fail) def fail_until_retried_often_enough(self, message="Hello", slee...
[ 1, 1053, 931, 13, 13, 13, 1990, 29098, 29965, 20233, 29903, 1682, 3947, 29879, 29901, 13, 1678, 390, 14824, 2891, 29918, 5265, 15176, 19926, 29918, 29903, 3217, 4162, 353, 525, 18267, 23487, 29915, 13, 13, 1678, 822, 4770, 2344, 12035, ...
alfred_client/tests/pushdata_test.py
coyote240/alfred-client
0
118914
<gh_stars>0 import unittest from alfred_client.message import PushData from alfred_client.packet.struct import alfred_packet expected_mac = '5e:5c:ce:ca:93:58' expected_message = 'raspberrypi\n' expected_length = len(expected_message) expected_bytes = b'\x00\x00\x00\x1a\x00\x00\x00\x00^\\\xce\xca\x93Xc\x00\x00\x0cras...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 443, 27958, 13, 3166, 394, 18447, 29918, 4645, 29889, 4906, 1053, 349, 1878, 1469, 13, 3166, 394, 18447, 29918, 4645, 29889, 4058, 300, 29889, 4984, 1053, 394, 18447, 29918, 4058, ...
tools/mkblocks.py
Commodore-Bench/u5remastered
14
9918
<filename>tools/mkblocks.py #!/usr/bin/env python3 # ---------------------------------------------------------------------------- # Copyright 2019 Drunella # # 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 t...
[ 1, 529, 9507, 29958, 8504, 29914, 11256, 1271, 29879, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 5634, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, ...
maxwell/publisher.py
maxwell-dev/maxwell-client-python
1
92236
import pycommons.logger import maxwell.protocol.maxwell_protocol_pb2 as protocol_types logger = pycommons.logger.get_instance(__name__) class Publisher(object): # =========================================== # apis # =========================================== def __init__(self, master, connection_mg...
[ 1, 1053, 11451, 22382, 29889, 21707, 13, 5215, 4236, 5872, 29889, 20464, 29889, 3317, 5872, 29918, 20464, 29918, 24381, 29906, 408, 9608, 29918, 8768, 13, 13, 21707, 353, 11451, 22382, 29889, 21707, 29889, 657, 29918, 8758, 22168, 978, 1649...
src/zocalo/wrapper.py
rjgildea/python-zocalo
2
180625
<reponame>rjgildea/python-zocalo import logging import threading import workflows.util import zocalo class BaseWrapper: def set_recipe_wrapper(self, recwrap): self.recwrap = recwrap def prepare(self, payload=""): if getattr(self, "recwrap", None): self.recwrap.send_to("starting"...
[ 1, 529, 276, 1112, 420, 29958, 29878, 29926, 29887, 7154, 29874, 29914, 4691, 29899, 29920, 542, 7003, 13, 5215, 12183, 13, 5215, 3244, 292, 13, 13, 5215, 27321, 29879, 29889, 4422, 13, 13, 5215, 503, 542, 7003, 13, 13, 13, 1990, 7399...
pyreto/continuous/environment.py
rwl/pylon
11
184120
<reponame>rwl/pylon<filename>pyreto/continuous/environment.py #------------------------------------------------------------------------------ # Copyright (C) 2007-2010 <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 ...
[ 1, 529, 276, 1112, 420, 29958, 13975, 29880, 29914, 2272, 12957, 29966, 9507, 29958, 2272, 276, 517, 29914, 20621, 681, 29914, 20944, 29889, 2272, 13, 29937, 2683, 2683, 2683, 2683, 9072, 489, 13, 29937, 14187, 1266, 313, 29907, 29897, 29...
sphinx-sources/Examples/ComputerPrac/FresnelPlane.py
jccmak/lightpipes
132
26893
#!/usr/bin/env python """ Computer practical 6.1. Fresnel diffraction, plane wavefront. ============================================================= This is part of the 'computer practical' set of assignments. Demonstrates Fresnel diffraction when a plane wavefront enters a round hole. Measur...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 15945, 29908, 13, 1678, 20972, 15031, 29871, 29953, 29889, 29896, 29889, 383, 690, 9139, 2923, 13857, 29892, 10694, 10742, 8862, 29889, 13, 1678, 1275, 9166, 9166, 9166, 4936, 25512, 13, ...
pyffs/automaton_management/__init__.py
rominf/pyffs
21
82724
<reponame>rominf/pyffs from .automaton_manager import manager from .utils import generate_automaton_to_file
[ 1, 529, 276, 1112, 420, 29958, 456, 7192, 29914, 2272, 600, 29879, 13, 3166, 869, 17405, 14114, 29918, 12847, 1053, 8455, 13, 3166, 869, 13239, 1053, 5706, 29918, 17405, 14114, 29918, 517, 29918, 1445, 13, 2 ]
py2cytoscape/cyrest/apps.py
g-simmons2/py2cytoscape
97
117889
from .base import * class apps(object): """ cytoscape session interface as shown in CyREST's swagger documentation. :param url: an url of the type 'http://' + host + ':' + str(port) + '/' + version + '/'. """ def __init__(self, url): self.__url = url + 'commands/apps' self.___url=...
[ 1, 515, 869, 3188, 1053, 334, 13, 13, 1990, 11446, 29898, 3318, 1125, 13, 1678, 9995, 13, 1678, 274, 3637, 359, 5738, 4867, 5067, 408, 4318, 297, 8045, 1525, 1254, 29915, 29879, 2381, 9921, 5106, 29889, 13, 13, 1678, 584, 3207, 3142, ...
monk/tf_keras_1/finetune/level_11_optimizers_main.py
Sanskar329/monk_v1
7
31468
from tf_keras_1.finetune.imports import * from system.imports import * from tf_keras_1.finetune.level_10_schedulers_main import prototype_schedulers class prototype_optimizers(prototype_schedulers): ''' Main class for all optimizers in expert mode Args: verbose (int): Set verbosity levels ...
[ 1, 515, 15886, 29918, 3946, 294, 29918, 29896, 29889, 4951, 300, 1540, 29889, 326, 4011, 1053, 334, 13, 3166, 1788, 29889, 326, 4011, 1053, 334, 13, 13, 3166, 15886, 29918, 3946, 294, 29918, 29896, 29889, 4951, 300, 1540, 29889, 5563, 2...
test/test_specs.py
USGS-EROS/lcmap-merlin
0
97071
from cytoolz import cons from cytoolz import merge from merlin import specs def test_only(): registry = [{'key': 1, 'ubid': 'a'}, {'key': 2, 'ubid': 'b'}, {'key': 3, 'ubid': 'c'}, {'key': 4, 'ubid': 'd'}] expected = tuple([{'key': 1, 'ubid': 'a'}, {'key': 4, 'ubid': 'd'}]) result = spec...
[ 1, 515, 5094, 10154, 29920, 1053, 1136, 13, 3166, 5094, 10154, 29920, 1053, 10366, 13, 3166, 2778, 1915, 1053, 1580, 29879, 13, 13, 13, 1753, 1243, 29918, 6194, 7295, 13, 1678, 21235, 353, 518, 10998, 1989, 2396, 29871, 29896, 29892, 52...
deem/pytorch/torch_utils.py
kuisu-GDUT/UltraGCN
0
69548
# ============================================================================== # 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 re...
[ 1, 396, 1275, 9166, 9166, 9166, 9166, 4936, 2751, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 366, 1122, 451, 671, 445, 934, 5174, 297, 7...
demo/trace_model.py
furkankirac/maskrcnn-benchmark
0
12035
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from __future__ import division import os import numpy from io import BytesIO from matplotlib import pyplot import requests import torch from PIL import Image from maskrcnn_benchmark.config import cfg from predictor import COCODemo from maskrcnn...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 13327, 29892, 9266, 29889, 322, 967, 23736, 1078, 29889, 2178, 26863, 2538, 9841, 29889, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 5215, 2897, 13, 13, 5215, 12655, 13, 3166, 12013, 1053, ...
pymeasure/virtual/power_test_setup.py
tinix84/pymeasure
2
31752
class EfficiencyMeasurement(): # input_voltage = None # input_current = None # output_voltage = None # output_current = None # input_power = None # output_power = None # loss_power = None # efficiency = None def __init__(self, input_voltage: float, input_current: float, ...
[ 1, 770, 382, 2416, 13396, 6816, 3745, 358, 7295, 13, 1678, 396, 1881, 29918, 1555, 29873, 482, 353, 6213, 13, 1678, 396, 1881, 29918, 3784, 353, 6213, 13, 1678, 396, 1962, 29918, 1555, 29873, 482, 353, 6213, 13, 1678, 396, 1962, 29918...
dlm/metrics/accuracy.py
romainloiseau/deep-linear-shapes
20
119546
<gh_stars>10-100 from collections import OrderedDict import numpy as np from sklearn.metrics.cluster import normalized_mutual_info_score as nmi_score from scipy.optimize import linear_sum_assignment import torch from ..viz import plot_matrix from .basemetric import DiscreetMetric class Accuracy(DiscreetMetric): ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 16250, 1053, 8170, 287, 21533, 13, 5215, 12655, 408, 7442, 13, 3166, 2071, 19668, 29889, 2527, 10817, 29889, 19594, 1053, 4226, 1891, 29918, 6149, ...
elena/emulators/workpiece_emulator.py
FYQ0919/Your_First_Decentralized_Application_Python
2
60571
<gh_stars>1-10 class Workpiece: def __init__(self, id): self.id = id # self.status = "awaiting production" self.status = "awaiting next step" self.actual_quality = None self.source = None self.sink = None self.location = "wc_0" # Starting point. Location ref...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 1990, 5244, 12343, 346, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1178, 1125, 13, 4706, 1583, 29889, 333, 353, 1178, 13, 4706, 396, 1583, 29889, 4882, 3...
innn/META_IPT_BD_TLS.py
mengban/traffic-src-spyder
0
67365
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 31 11:26:25 2018 @author: cadu """ print("66") import pandas as pd import numpy as np from sklearn import datasets, svm, metrics from sklearn import cross_validation import matplotlib.pyplot as plt import sys sys.path.append("../src") from data_pro...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 373, 498, 29884, 2610, 29871, 29941, 29896, 29871, 29896, 29896, 29901, ...
src/gridemissions/scripts/ampd.py
elijahjpassmore/gridemissions
4
175876
<reponame>elijahjpassmore/gridemissions import os from os.path import join import pandas as pd import argparse import logging.config from gridemissions import config from gridemissions.ampd import AMPD_download, extract_state def main(): # Parse command-line arguments argparser = argparse.ArgumentParser() ...
[ 1, 529, 276, 1112, 420, 29958, 3875, 801, 29926, 3364, 5514, 29914, 29887, 374, 2310, 6847, 13, 5215, 2897, 13, 3166, 2897, 29889, 2084, 1053, 5988, 13, 5215, 11701, 408, 10518, 13, 5215, 1852, 5510, 13, 5215, 12183, 29889, 2917, 13, ...
Leetcode/1000-2000/1202. Smallest String With Swaps/1202.py
Next-Gen-UI/Code-Dynamics
0
174222
<filename>Leetcode/1000-2000/1202. Smallest String With Swaps/1202.py class UF: def __init__(self, n: int): self.id = list(range(n)) def union(self, u: int, v: int) -> None: self.id[self.find(u)] = self.find(v) def find(self, u: int) -> int: if self.id[u] != u: self.id[u] = self.find(self.id[u...
[ 1, 529, 9507, 29958, 3226, 300, 401, 29914, 29896, 29900, 29900, 29900, 29899, 29906, 29900, 29900, 29900, 29914, 29896, 29906, 29900, 29906, 29889, 18285, 342, 1714, 2973, 3925, 2547, 29914, 29896, 29906, 29900, 29906, 29889, 2272, 13, 1990,...
src/waldur_core/core/migrations/0003_enlarge_username.py
geant-multicloud/MCMS-mastermind
26
166176
# Generated by Django 1.11.13 on 2018-09-11 14:40 import re import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0002_remove_organization'), ] operations = [ migrations.AlterField( model_name...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29896, 29889, 29896, 29896, 29889, 29896, 29941, 373, 29871, 29906, 29900, 29896, 29947, 29899, 29900, 29929, 29899, 29896, 29896, 29871, 29896, 29946, 29901, 29946, 29900, 13, 5215, 337, 13, 13, 5215, ...
documentation/tutorial/service_v5.py
F-Secure/resource-api
10
153954
import shelve import os import re from resource_api.interfaces import Resource as BaseResource, Link as BaseLink, AbstractUriPolicy from resource_api.schema import StringField, DateTimeField, IntegerField from resource_api.service import Service from resource_api.errors import ValidationError RE_SHA1 = re.compile("^...
[ 1, 1053, 528, 13841, 13, 5215, 2897, 13, 5215, 337, 13, 13, 3166, 6503, 29918, 2754, 29889, 1639, 8726, 1053, 18981, 408, 7399, 6848, 29892, 6645, 408, 7399, 6595, 29892, 25513, 14702, 15644, 13, 3166, 6503, 29918, 2754, 29889, 11010, 1...
wechat_config/customize_userManual.py
William-An/wechat_server
0
41757
import requests import os import sys # provide option import argparse # parse options import json PATH = os.path.abspath(os.path.dirname(sys.argv[0])) token_url = "https://api.weixin.qq.com/cgi-bin/token" # Change to control server create_interface = "https://api.weixin.qq.com/cgi-bin/menu/create" get_Allinterface = "...
[ 1, 1053, 7274, 13, 5215, 2897, 13, 5215, 10876, 396, 3867, 2984, 13, 5215, 1852, 5510, 396, 6088, 3987, 13, 5215, 4390, 13, 13, 10145, 353, 2897, 29889, 2084, 29889, 370, 1028, 493, 29898, 359, 29889, 2084, 29889, 25721, 29898, 9675, ...
player_roll.py
jeff012345/clue-part-duo
0
113082
from __future__ import annotations from typing import List, Set, Dict, Tuple, Optional import pygame import pygame_gui from player import HumanPlayer from paths import Board, board_spaces, doors from game_board_util import scale_position from definitions import roll_dice from log_book_ui import LogBookPanel from defi...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 25495, 13, 3166, 19229, 1053, 2391, 29892, 3789, 29892, 360, 919, 29892, 12603, 552, 29892, 28379, 13, 13, 5215, 22028, 13, 5215, 22028, 29918, 23569, 13, 13, 3166, 4847, 1053, 12968, 9075, 13, 316...
save.py
regismeyssonnier/NeuralNetwork
0
22096
<gh_stars>0 def write_file(filess, T): f = open(filess, "w") for o in T: f.write("[\n") for l in o: f.write(str(l)+"\n") f.write("]\n") f.close() def save_hidden_weight(nb_hidden, hiddenw): for i in range(nb_hidden): write_file("save/base_nn_hid_" + str(i+1) + "w.nn", hiddenw[i]) def load_hidden...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 13, 1753, 2436, 29918, 1445, 29898, 1777, 404, 29892, 323, 1125, 13, 12, 13, 12, 29888, 353, 1722, 29898, 1777, 404, 29892, 376, 29893, 1159, 13, 12, 1454, 288, 297, 323, 29901, ...
home/forms.py
Legaeldan/siobhan-mcgowan-photography
0
24667
from django import forms class ContactForm(forms.Form): user_name = forms.CharField(max_length=60, label='', required=True, widget=forms.TextInput(attrs={'placeholder': '<NAME>'})) user_email = forms.EmailField(label='', required=True) message = forms.CharField(label='', required=True, widget=forms.Texta...
[ 1, 515, 9557, 1053, 7190, 13, 13, 13, 1990, 22387, 2500, 29898, 9514, 29889, 2500, 1125, 13, 13, 1678, 1404, 29918, 978, 353, 7190, 29889, 27890, 29898, 3317, 29918, 2848, 29922, 29953, 29900, 29892, 3858, 2433, 742, 3734, 29922, 5574, ...
bagua/torch_api/contrib/sync_batchnorm.py
mmathys/bagua
635
10646
<gh_stars>100-1000 # Copyright (c) Uber Technologies, Inc. and its affiliates. # Copyright (c) 2021 Kuaishou AI Platform & DS3 Lab. # # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. from distutils.version import ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29899, 29896, 29900, 29900, 29900, 13, 29937, 14187, 1266, 313, 29883, 29897, 501, 495, 8364, 11763, 29892, 9266, 29889, 322, 967, 23736, 1078, 29889, 13, 29937, 14187, 1266, 313,...
lang/rust/types.py
adsharma/flattools
17
81345
<filename>lang/rust/types.py from fbs.fbs import FBSType class FBSRustType(FBSType): _VALUES_TO_RUST_TYPES = { FBSType.BOOL: "bool", FBSType.BYTE: "i8", FBSType.UBYTE: "u8", FBSType.SHORT: "i16", FBSType.USHORT: "u16", FBSType.INT: "i32", FBSType.UINT: "u32"...
[ 1, 529, 9507, 29958, 3893, 29914, 23575, 29914, 8768, 29889, 2272, 13, 3166, 285, 5824, 29889, 29888, 5824, 1053, 28816, 1254, 668, 13, 13, 13, 1990, 383, 9851, 29934, 504, 1542, 29898, 18426, 1254, 668, 1125, 13, 1678, 903, 8932, 12996...
ptah/ptahsettings.py
timgates42/ptah
13
1610830
<reponame>timgates42/ptah """ ptah settings """ import pytz import logging import sqlalchemy import translationstring import ptah.form from email.utils import formataddr from pyramid.events import ApplicationCreated from pyramid_mailer.interfaces import IMailer import ptah from ptah import settings _ = translationstr...
[ 1, 529, 276, 1112, 420, 29958, 29873, 2492, 1078, 29946, 29906, 29914, 415, 801, 13, 15945, 29908, 19592, 801, 6055, 9995, 13, 5215, 282, 3637, 29920, 13, 5215, 12183, 13, 5215, 4576, 284, 305, 6764, 13, 5215, 13962, 1807, 13, 5215, 1...
backend/models/events.py
nonamedb/kazan_backend
0
172762
# coding: utf-8 from datetime import datetime, timedelta from sqlalchemy import Column, Integer, String, Sequence, Boolean, ForeignKey, DateTime, Text, Date from sqlalchemy.dialects.postgresql import JSON from sqlalchemy.orm import relationship, backref from .organizers import organizer_event_table from .volunteers i...
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 13, 13, 3166, 12865, 1053, 12865, 29892, 5335, 287, 2554, 13, 3166, 4576, 284, 305, 6764, 1053, 12481, 29892, 8102, 29892, 1714, 29892, 922, 3910, 29892, 11185, 29892, 19358, 2558, 29892, 123...
ecs/processors/playerattackprocessor.py
joehowells/7drl2020
0
173751
from random import randint from esper import Processor, World import script from action import ActionType from ecs.components.attacktarget import AttackTarget from ecs.components.map import Map from ecs.components.message import Message from ecs.components.monster import Monster from ecs.components.player import Play...
[ 1, 515, 4036, 1053, 20088, 524, 13, 13, 3166, 17451, 1053, 10554, 272, 29892, 2787, 13, 13, 5215, 2471, 13, 3166, 3158, 1053, 9123, 1542, 13, 3166, 321, 2395, 29889, 14036, 29889, 1131, 547, 5182, 1053, 6212, 547, 8667, 13, 3166, 321,...
functions/tools.py
tmsmolnar/cth-uva
2
152436
import pandas as pd from bokeh.models import ColumnDataSource, HoverTool, LinearInterpolator, CategoricalColorMapper, Paragraph from bokeh.plotting import figure from bokeh.palettes import Category20b_20 from bokeh.layouts import column, row from bokeh.io import show, curdoc def load_data(path_to_file, index,...
[ 1, 1053, 11701, 408, 10518, 30004, 13, 3166, 1045, 446, 29882, 29889, 9794, 1053, 12481, 15559, 29892, 379, 957, 12229, 29892, 22985, 4074, 3733, 1061, 29892, 315, 20440, 936, 3306, 19968, 29892, 1459, 9895, 30004, 13, 3166, 1045, 446, 29...
website/views.py
nulldiego/cadavre-exquis
0
1603104
from django.shortcuts import render from website.models import Cadavre from django.views import generic from website.forms import SendCadavrePartForm from django.views.decorators.http import require_http_methods from django.shortcuts import get_object_or_404 from django.http import HttpResponseRedirect from django.urls...
[ 1, 515, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 13, 3166, 4700, 29889, 9794, 1053, 21542, 485, 276, 13, 3166, 9557, 29889, 7406, 1053, 10035, 13, 3166, 4700, 29889, 9514, 1053, 15076, 29907, 328, 485, 276, 7439, 2500, 13, 3166, 955...
utils/xmlrpc.py
NullReferenceError/rtorrent_orphan_cleanup
27
48588
import socket import xmlrpc.client """ referemce: https://stackoverflow.com/a/14397619 """ class ServerProxy: def __init__(self, url, timeout=10): self.__url = url self.__timeout = timeout self.__prevDefaultTimeout = None def __enter__(self): try: if self.__timeou...
[ 1, 1053, 9909, 13, 5215, 4903, 29878, 6739, 29889, 4645, 13, 13, 15945, 29908, 2737, 331, 346, 29901, 2045, 597, 2417, 29889, 510, 29914, 29874, 29914, 29896, 29946, 29941, 29929, 29955, 29953, 29896, 29929, 9995, 13, 13, 13, 1990, 5656, ...
Rover/install_isolated/lib/python2.7/dist-packages/cartographer_ros_msgs/msg/_TrajectoryOptions.py
Rose-Hulman-Rover-Team/Rover-2019-2020
1
158084
<reponame>Rose-Hulman-Rover-Team/Rover-2019-2020 # This Python file uses the following encoding: utf-8 """autogenerated by genpy from cartographer_ros_msgs/TrajectoryOptions.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class TrajectoryOptions(genp...
[ 1, 529, 276, 1112, 420, 29958, 29934, 852, 29899, 29950, 352, 1171, 29899, 29934, 957, 29899, 19409, 29914, 29934, 957, 29899, 29906, 29900, 29896, 29929, 29899, 29906, 29900, 29906, 29900, 13, 29937, 910, 5132, 934, 3913, 278, 1494, 8025, ...
cumulusci/tasks/robotframework/debugger/DebugListener.py
davisagli/CumulusCI
163
90682
""" Robot Debugger """ from cumulusci.tasks.robotframework.debugger import ( Breakpoint, DebuggerCli, Keyword, Suite, Testcase, ) class DebugListener(object): """A robot framework listener for debugging test cases This acts as the controller for the debugger. It is responsible for m...
[ 1, 9995, 13, 21860, 327, 16171, 914, 13, 13, 15945, 29908, 13, 13, 3166, 13299, 14999, 455, 29889, 20673, 29889, 307, 7451, 4468, 29889, 8382, 914, 1053, 313, 13, 1678, 28301, 3149, 29892, 13, 1678, 16171, 914, 29907, 492, 29892, 13, ...
h5Nastran/h5Nastran/h5/nastran/input/dynamic.py
ACea15/pyNastran
293
169099
<filename>h5Nastran/h5Nastran/h5/nastran/input/dynamic.py from __future__ import print_function, absolute_import from collections import defaultdict from six.moves import range from six import iteritems from h5Nastran.defaults import Defaults from h5Nastran.h5nastrannode import H5NastranNode from .input_table import...
[ 1, 529, 9507, 29958, 29882, 29945, 29940, 7614, 273, 29914, 29882, 29945, 29940, 7614, 273, 29914, 29882, 29945, 29914, 29876, 7614, 273, 29914, 2080, 29914, 16626, 29889, 2272, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 29...
tccli/services/cam/__init__.py
hapsyou/tencentcloud-cli-intl-en
0
182253
# -*- coding: utf-8 -*- from tccli.services.cam.cam_client import register_arg from tccli.services.cam.cam_client import get_actions_info from tccli.services.cam.cam_client import AVAILABLE_VERSION_LIST
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 260, 617, 492, 29889, 9916, 29889, 11108, 29889, 11108, 29918, 4645, 1053, 6036, 29918, 1191, 13, 3166, 260, 617, 492, 29889, 9916, 29889, 11108, 2...
python lab 5 & 6/l5q3.py
gonewithharshwinds/itt-lab
1
34013
#!/usr/bin/python3 m1 = int(input("Enter no. of rows : \t")) n1 = int(input("Enter no. of columns : \t")) a = [] print("Enter Matrix 1:\n") for i in range(n1): row = list(map(int, input().split())) a.append(row) print(a) m2 = int(n1) print("\n Your Matrix 2 must have",n1,"rows and",m1,"columns \n") n2 ...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 30004, 13, 29885, 29896, 353, 938, 29898, 2080, 703, 10399, 694, 29889, 310, 4206, 584, 320, 29873, 5783, 30004, 13, 29876, 29896, 353, 938, 29898, 2080, 703, 10399, 694, 29889, 310, 4341, ...
main.py
OrionDark7/Alakajam12
0
1566
import pygame, math from game import map, ui window = pygame.display.set_mode([800, 600]) ui.window = window screen = "game" s = {"fullscreen": False} running = True gamedata = {"level": 0, "coal": 0, "iron": 1, "copper":0} tiles = pygame.sprite.Group() rails = pygame.sprite.Group() carts = pygame.sprite.Group() inter...
[ 1, 1053, 22028, 29892, 5844, 13, 3166, 3748, 1053, 2910, 29892, 14313, 13, 13, 7165, 353, 22028, 29889, 4990, 29889, 842, 29918, 8513, 4197, 29947, 29900, 29900, 29892, 29871, 29953, 29900, 29900, 2314, 13, 1481, 29889, 7165, 353, 3474, 1...
textrank.py
ptarau/PyDS
2
150654
<filename>textrank.py # ranking a document for most important sentences import nltk import networkx as nx import heapq # nouns,verbs,adjectives def good_word(wt) : w,t=wt return t[0] in "NJV" and w.lower() not in stopwords # words not worth using for retrivieng content stopwords= {'am', 'are', 'be', 'been', 'bei...
[ 1, 529, 9507, 29958, 726, 10003, 29889, 2272, 13, 29937, 24034, 263, 1842, 363, 1556, 4100, 25260, 13, 5215, 302, 1896, 29895, 13, 5215, 3564, 29916, 408, 302, 29916, 13, 5215, 16947, 29939, 13, 13, 29937, 302, 1309, 29879, 29892, 369, ...
methods/POST.py
WebisD/http-api-without-lib
2
138259
import datetime from databaseUser.HandlerDatabase import HandlerDatabase from databaseUser.ObjectUser import UserObj from handler.HandlerErrors import HandlerErrors from message.Response import Response from message.StatusCode import StatusCode import json class POST: @staticmethod def response(request) -> st...
[ 1, 1053, 12865, 13, 3166, 2566, 2659, 29889, 4598, 9112, 1053, 5166, 1358, 9112, 13, 3166, 2566, 2659, 29889, 2061, 2659, 1053, 4911, 9930, 13, 3166, 7834, 29889, 4598, 22463, 1053, 5166, 1358, 22463, 13, 3166, 2643, 29889, 5103, 1053, ...
bot.py
mmonkey/covid-vaccine-slack-bot
9
174991
<reponame>mmonkey/covid-vaccine-slack-bot import json import os import pytz import requests from apscheduler.schedulers.blocking import BlockingScheduler from datetime import datetime from dotenv import load_dotenv from geopy import distance from slack_sdk import WebClient from slack_sdk.errors import SlackApiError fro...
[ 1, 529, 276, 1112, 420, 29958, 29885, 3712, 1989, 29914, 24542, 333, 29899, 29894, 5753, 457, 29899, 29879, 2364, 29899, 7451, 13, 5215, 4390, 13, 5215, 2897, 13, 5215, 282, 3637, 29920, 13, 5215, 7274, 13, 3166, 263, 567, 305, 14952, ...
mediawikiapi/config.py
srevinsaju/MediaWikiAPI
0
34544
<filename>mediawikiapi/config.py import requests from datetime import timedelta from .language import Language class Config(object): """ Contains global configuration """ DEFAULT_USER_AGENT = 'mediawikiapi (https://github.com/lehinevych/MediaWikiAPI/)' DONATE_URL = 'https://donate.wikimedia.org/w/index.php?...
[ 1, 529, 9507, 29958, 9799, 2851, 423, 1631, 29914, 2917, 29889, 2272, 13, 5215, 7274, 13, 3166, 12865, 1053, 5335, 287, 2554, 13, 3166, 869, 11675, 1053, 17088, 13, 13, 13, 1990, 12782, 29898, 3318, 1125, 13, 29871, 9995, 13, 29871, 2...
util/update-status.py
SCNU-SoCoding/mirror
1
198272
<reponame>SCNU-SoCoding/mirror #!/bin/python3 import json import codecs import sys import getopt from collections import OrderedDict if (len(sys.argv) != 3): sys.exit(1) file_dir = "/mnt/socoding/files/fancyindex/data/supported_os.json" with codecs.open(file_dir, 'r', 'utf-8') as f: oslist = json.load(f, obj...
[ 1, 529, 276, 1112, 420, 29958, 7187, 11601, 29899, 6295, 29907, 3689, 29914, 11038, 729, 13, 29937, 14708, 2109, 29914, 4691, 29941, 13, 5215, 4390, 13, 5215, 775, 2395, 13, 5215, 10876, 13, 5215, 679, 3670, 13, 3166, 16250, 1053, 8170,...
djangobmf/migrations/0002_removed_notification_and_watch.py
dmatthes/django-bmf
1
52645
<gh_stars>1-10 # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('djangobmf', '0001_initial'), ] operations = [ migrations.DeleteModel( ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, ...
pdeopt/pdeopt/TR.py
TiKeil/NCD-corrected-TR-RB-approach-for-pde-opt
0
186714
# ~~~ # This file is part of the paper: # # "A NON-CONFORMING DUAL APPROACH FOR ADAPTIVE TRUST-REGION REDUCED BASIS # APPROXIMATION OF PDE-CONSTRAINED OPTIMIZATION" # # https://github.com/TiKeil/NCD-corrected-TR-RB-approach-for-pde-opt # # Copyright 2019-2020 all developers. All rights reserved. # License:...
[ 1, 396, 3695, 7377, 13, 29937, 910, 934, 338, 760, 310, 278, 5650, 29901, 13, 29937, 13, 29937, 29871, 376, 29909, 405, 1164, 29899, 6007, 19094, 4214, 360, 29965, 1964, 12279, 8618, 2477, 29950, 15842, 11033, 3301, 29911, 18474, 10014, ...
src/processing/data_processor.py
niksaz/semantic-code-search
1
128741
import os from abc import ABC, abstractmethod from pathlib import Path from typing import Dict, Any from dpu_utils.utils import RichPath from tqdm import tqdm class DataProcessor(ABC): def __init__(self): self.skipped = 0 self.failed = 0 def parse_subfolders(self, input_folder: Path, output...
[ 1, 1053, 2897, 13, 3166, 25638, 1053, 16417, 29892, 9846, 5696, 13, 3166, 2224, 1982, 1053, 10802, 13, 3166, 19229, 1053, 360, 919, 29892, 3139, 13, 13, 3166, 270, 3746, 29918, 13239, 29889, 13239, 1053, 4385, 2605, 13, 3166, 260, 29939...
queue-using-stacks/queue_using_stacks.py
blairg23/common-interview-problems
0
1616899
<filename>queue-using-stacks/queue_using_stacks.py # Task # - Implement a Queue using Stacks # Example: # >>> a = Stack() # >>> a.push(1) # >>> a.push(2) # >>> a.push(3) # >>> a.pop() # 3 # >>> a.pop() # 2 # >>> a.pop() # 1 # >>> a.pop() # IndexError: list index out of range import time # Solutions copied fr...
[ 1, 529, 9507, 29958, 9990, 29899, 4746, 29899, 1429, 29879, 29914, 9990, 29918, 4746, 29918, 1429, 29879, 29889, 2272, 13, 29937, 9330, 13, 29937, 448, 1954, 2037, 263, 5462, 434, 773, 10292, 29879, 13, 13, 29937, 8741, 29901, 13, 29937, ...
entangle/http.py
radiantone/entangle
102
110889
<filename>entangle/http.py """ http.py - Module that provides http oriented decorators """ from functools import partial import requests def request(function=None, timeout=None, url=None, method='GET', sleep=None): """ :param function: :param timeout: :...
[ 1, 529, 9507, 29958, 296, 2521, 29914, 1124, 29889, 2272, 13, 15945, 29908, 13, 1124, 29889, 2272, 448, 15591, 393, 8128, 1732, 7769, 287, 10200, 4097, 13, 15945, 29908, 13, 3166, 2090, 312, 8789, 1053, 7687, 13, 5215, 7274, 13, 13, 1...
sandbox/order/migrations/0009_surcharge.py
thelabnyc/django-oscar-cch
14
77843
# Generated by Django 2.2.6 on 2020-02-19 09:16 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("order", "0008_auto_20190301_1035"), ] replaces = [ ("order", "0008_surcharge"), ] operations = [ ...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29953, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29900, 29906, 29899, 29896, 29929, 29871, 29900, 29929, 29901, 29896, 29953, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, ...
bcc-apps/python/hello_world.py
Huweicai/ebpf-apps
59
30997
#!/usr/bin/python3 # # This is a Hello World example of BPF. from bcc import BPF # define BPF program prog = """ int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\\n"); return 0; } """ # load BPF program b = BPF(text=prog) b.trace_print()
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 13, 29937, 13, 29937, 910, 338, 263, 15043, 2787, 1342, 310, 350, 13691, 29889, 13, 3166, 289, 617, 1053, 350, 13691, 13, 13, 29937, 4529, 350, 13691, 1824, 13, 29097, 353, 9995, 13, 52...
src/Pybind11Wraps/Neighbor/TreeNeighbor.py
markguozhiming/spheral
1
28496
#------------------------------------------------------------------------------- # TreeNeighbor #------------------------------------------------------------------------------- from PYB11Generator import * from Neighbor import * from NeighborAbstractMethods import * @PYB11template("Dimension") class TreeNeighbor(Neigh...
[ 1, 396, 2683, 2683, 2683, 2683, 9072, 5634, 13, 29937, 15472, 8139, 1141, 4089, 13, 29937, 2683, 2683, 2683, 2683, 9072, 5634, 13, 3166, 349, 29979, 29933, 29896, 29896, 21575, 1053, 334, 13, 3166, 2448, 1141, 4089, 1053, 334, 13, 3166,...
schema/predict/params/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/video_classification.py
SinaChavoshi/python-aiplatform
0
138456
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 5087, 365, 12182, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, ...