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
TCU/usageexample/automationexample.py
p--q/TCU
0
11767
<reponame>p--q/TCU #!/opt/libreoffice5.4/program/python # -*- coding: utf-8 -*- import unohelper # オートメーションには必須(必須なのはuno)。 def macro(): ctx = XSCRIPTCONTEXT.getComponentContext() # コンポーネントコンテクストの取得。 smgr = ctx.getServiceManager() # サービスマネージャーの取得。 tcu = smgr.createInstanceWithContext("pq.Tcu", ctx) # サービス名か実装名でイ...
[ 1, 529, 276, 1112, 420, 29958, 29886, 489, 29939, 29914, 9472, 29965, 13, 29937, 14708, 3670, 29914, 492, 1030, 20205, 29945, 29889, 29946, 29914, 8860, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 2993...
SLpackage/private/pacbio/pythonpkgs/pbsmrtpipe/lib/python2.7/site-packages/pbsmrtpipe/validators.py
fanglab/6mASCOPE
5
130183
"""General validation functions""" from __future__ import absolute_import, division, print_function import logging import types import inspect from pbcommand.models import (FileTypes, TaskTypes, SymbolTypes, ResourceTypes, FileType) from pbsmrtpipe.exceptions import (MalformedMetaTaskError, MalformedPipelineError) ...
[ 1, 9995, 15263, 8845, 3168, 15945, 29908, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 29892, 8542, 29892, 1596, 29918, 2220, 13, 13, 5215, 12183, 13, 5215, 4072, 13, 5215, 16096, 13, 13, 3166, 282, 29890, 6519, 29889...
encyclopaedia/labels.py
tcyrus/renpy-encyclopaedia
0
10039
<reponame>tcyrus/renpy-encyclopaedia from renpy import store class Labels(store.object): """Controls how the labels that display Encyclopaedia data appear. Attributes: percentage_label (str): Placed next to the percentage unlocked number page_label (str): Placed before the entry page displaye...
[ 1, 529, 276, 1112, 420, 29958, 29873, 1270, 15816, 29914, 1267, 2272, 29899, 3819, 15126, 3274, 1381, 13, 3166, 4325, 2272, 1053, 3787, 13, 13, 13, 1990, 15796, 29879, 29898, 8899, 29889, 3318, 1125, 13, 1678, 9995, 17825, 920, 278, 110...
freezer/job.py
mr-smart/freezer
0
94711
<filename>freezer/job.py """ (c) Copyright 2014,2015 Hewlett-Packard Development Company, L.P. (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP 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, 9021, 3298, 29914, 9057, 29889, 2272, 13, 15945, 29908, 13, 29898, 29883, 29897, 14187, 1266, 29871, 29906, 29900, 29896, 29946, 29892, 29906, 29900, 29896, 29945, 379, 809, 13650, 29899, 16638, 538, 14650, 6938, 29892, ...
code/abc069_a_01.py
KoyanagiHitoshi/AtCoder
3
98467
n,m=map(int,input().split()) print((n-1)*(m-1))
[ 1, 302, 29892, 29885, 29922, 1958, 29898, 524, 29892, 2080, 2141, 5451, 3101, 13, 2158, 3552, 29876, 29899, 29896, 11877, 29898, 29885, 29899, 29896, 876, 2 ]
simple_downloader/drive_space.py
jsyrovy/simple-downloader
0
182800
<reponame>jsyrovy/simple-downloader import dataclasses import shutil import hurry.filesize @dataclasses.dataclass class DriveSpace: path: str total: str used: str free: str free_perc: str def get_drive_space(path: str) -> DriveSpace: total, used, free = shutil.disk_usage(path) return D...
[ 1, 529, 276, 1112, 420, 29958, 1315, 29891, 10139, 29891, 29914, 12857, 29899, 10382, 261, 13, 5215, 848, 13203, 13, 5215, 528, 4422, 13, 13, 5215, 12166, 719, 29889, 5325, 675, 13, 13, 13, 29992, 1272, 13203, 29889, 1272, 1990, 13, 1...
cogs/dynamicslowmode.py
MM-coder/salbot-rewrite
0
147202
<reponame>MM-coder/salbot-rewrite """ Created by Epic at 8/1/20 """ import logging import asyncio import discord from discord.ext import commands from aiohttp import client_exceptions class DynamicSlowmode(commands.Cog): def __init__(self, bot): self.bot = bot self.logger = logging.getLogger("salb...
[ 1, 529, 276, 1112, 420, 29958, 7428, 29899, 29883, 6119, 29914, 19585, 7451, 29899, 23174, 13, 15945, 29908, 13, 20399, 491, 14055, 293, 472, 29871, 29947, 29914, 29896, 29914, 29906, 29900, 13, 15945, 29908, 13, 5215, 12183, 13, 5215, 40...
aiidalab_sssp/inspect/plot_utils.py
aiidalab/aiidalab-sssp
0
83163
import random import matplotlib.pyplot as plt import numpy as np def cmap(label: str) -> str: """Return RGB string of color for given standard psp label""" _, pp_family, pp_z, pp_type, pp_version = label.split("/") if pp_family == "sg15" and pp_version == "v1.0": return "#000000" if pp_fami...
[ 1, 1053, 4036, 13, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 274, 1958, 29898, 1643, 29901, 851, 29897, 1599, 851, 29901, 13, 1678, 9995, 11609, 390, 7210, 1347, 310, 2927, 363, 2183...
oops_fhir/r4/code_system/flag_priority_codes.py
Mikuana/oops_fhir
0
32958
<filename>oops_fhir/r4/code_system/flag_priority_codes.py from pathlib import Path from fhir.resources.codesystem import CodeSystem from oops_fhir.utils import CodeSystemConcept __all__ = ["FlagPriorityCodes"] _resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json")) class FlagPriorityCodes: """...
[ 1, 529, 9507, 29958, 29877, 3554, 29918, 29888, 29882, 381, 29914, 29878, 29946, 29914, 401, 29918, 5205, 29914, 15581, 29918, 29886, 21766, 29918, 18137, 29889, 2272, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 3166, 285, 29882, 381, 29889,...
logux/apps.py
sobolevn/django-1
17
147770
from django.apps import AppConfig from logux import settings from logux.utils import autodiscover class LoguxConfig(AppConfig): """ Logux app conf """ name = 'logux' verbose_name = 'Logux' def ready(self): # check if all required settings is defined settings.get_config() # im...
[ 1, 515, 9557, 29889, 13371, 1053, 2401, 3991, 13, 13, 3166, 1480, 1314, 1053, 6055, 13, 3166, 1480, 1314, 29889, 13239, 1053, 1120, 397, 10669, 957, 13, 13, 13, 1990, 4522, 1314, 3991, 29898, 2052, 3991, 1125, 13, 1678, 9995, 4522, 13...
premailer/__init__.py
locationlabs/premailer
0
31698
<reponame>locationlabs/premailer __version__ = '1.12.1-LL' __build__ = '' # set by the build server
[ 1, 529, 276, 1112, 420, 29958, 5479, 29880, 6897, 29914, 1457, 2549, 261, 13, 1649, 3259, 1649, 353, 525, 29896, 29889, 29896, 29906, 29889, 29896, 29899, 2208, 29915, 13, 1649, 4282, 1649, 353, 6629, 29871, 396, 731, 491, 278, 2048, 19...
tests/test_rotations.py
MarceloJacinto/dsorlib
0
187477
<filename>tests/test_rotations.py<gh_stars>0 from numpy import array from numpy.testing import assert_allclose from dsorlib.rotations import Rot_to_quaternion, RPY_to_quaternion, quaternion_to_Rot, quaternion_to_RPY, RPY_to_RotZYX, \ RotZYX_to_RPY """ The following tests are conducted for the rotations module The ...
[ 1, 529, 9507, 29958, 21150, 29914, 1688, 29918, 5450, 800, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 12655, 1053, 1409, 13, 3166, 12655, 29889, 13424, 1053, 4974, 29918, 497, 5358, 13, 3166, 18031, 272, 1982, 29...
generate.py
ShuKar99/Multi-Threaded-Sudoku-Solver
0
185746
from sudoku import * from thread import Threads from copy import * class SudokuCreater(): def __init__(self, sudoku): self.sudoku= sudoku dom= ['1','2','3','4','5','6','7','8','9'] self.constraints= self.sudoku.board_constraints() self.domain= dict() # all unassigned variab...
[ 1, 515, 5053, 9154, 1053, 334, 13, 3166, 3244, 1053, 10480, 29879, 13, 3166, 3509, 1053, 334, 13, 13, 1990, 8383, 9154, 9832, 1008, 7295, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 5053, 9154, 1125, 13, 4706, 1583, 29889, 2987...
airbnb/app.py
serinamarie/Saltiest-Hackers
0
190382
<filename>airbnb/app.py<gh_stars>0 from flask import Flask, request def create_app(): app = Flask(__name__) @app.route('/') def root(): return 'airbnb predictive project' @app.route('/predict', methods=['POST']) def predict(message=""): try: # find authorization header...
[ 1, 529, 9507, 29958, 1466, 29890, 9877, 29914, 932, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 29784, 1053, 2379, 1278, 29892, 2009, 13, 13, 1753, 1653, 29918, 932, 7295, 13, 1678, 623, 353, 2379, 1278, 22168, ...
accounts/migrations/0004_auto_20210517_1624.py
bencko/test_blog_api
0
120781
<filename>accounts/migrations/0004_auto_20210517_1624.py # Generated by Django 3.2.3 on 2021-05-17 16:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0003_auto_20210517_1623'), ] operations = [ migrations.RemoveField( ...
[ 1, 529, 9507, 29958, 10149, 29879, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29946, 29918, 6921, 29918, 29906, 29900, 29906, 29896, 29900, 29945, 29896, 29955, 29918, 29896, 29953, 29906, 29946, 29889, 2272, 13, 29937, 3251, 630, 491, 15...
Core/brainSeg/__init__.py
YongLiuLab/BrainRadiomicsTools
10
83548
from . brainSeg import brainSeg
[ 1, 515, 869, 17294, 17669, 1053, 17294, 17669, 2 ]
storm/stock/models.py
GaretJax/storm-erp
0
186297
import sqlalchemy as sa from sqlalchemy.orm import relationship, backref, object_session from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.ext.declarative import declarative_base from storm.database import mptt Model = declarative_base() class Location(mptt.MPTTBase, Model): """ ...
[ 1, 1053, 4576, 284, 305, 6764, 408, 872, 13, 3166, 4576, 284, 305, 6764, 29889, 555, 1053, 9443, 29892, 1250, 999, 29892, 1203, 29918, 7924, 13, 3166, 4576, 284, 305, 6764, 29889, 1062, 29889, 21264, 362, 14701, 1053, 15477, 29918, 1470...
famplex/html/__main__.py
steppi/famplex
11
186203
# -*- coding: utf-8 -*- """CLI for exporting FamPlex as a static site.""" from .api import html if __name__ == '__main__': html()
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 27205, 363, 5609, 292, 27458, 29925, 2506, 408, 263, 2294, 3268, 1213, 15945, 13, 13, 3166, 869, 2754, 1053, 3472, 13, 13, 361, 4770,...
demos/webcam.py
ndoo/esp32-hanover-flipdot-firmware
6
1613923
<filename>demos/webcam.py #!/usr/bin/python from os import path import socket import struct import sys import time import cv2 from lib import imageToBinary as i2b MULTICAST_GROUP = ('172.16.58.3', 8080) WIDTH = 96 HEIGHT = 32 vidcap = cv2.VideoCapture(cv2.CAP_DSHOW) sock = socket.socket(socket.AF_INET, # Interne...
[ 1, 529, 9507, 29958, 2310, 359, 29914, 2676, 11108, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 13, 3166, 2897, 1053, 2224, 13, 13, 5215, 9909, 13, 5215, 2281, 13, 5215, 10876, 13, 5215, 931, 13, 5215, 13850, 29...
dataset/research/__init__.py
mikhailkin/dataset
0
93345
<filename>dataset/research/__init__.py """ Research module. """ from .grid import KV, Grid, Option, ConfigAlias from .distributor import Worker, Distributor from .workers import PipelineWorker from .research import Research
[ 1, 529, 9507, 29958, 24713, 29914, 690, 2842, 29914, 1649, 2344, 26914, 2272, 13, 15945, 29908, 10550, 3883, 29889, 9995, 13, 3166, 869, 7720, 1053, 476, 29963, 29892, 11657, 29892, 10831, 29892, 12782, 29909, 18849, 13, 3166, 869, 5721, ...
tests/process_data.py
IPetr0v/compromutator
0
85929
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.rcParams.update({'font.size': 18}) def cut_by_item(dataframe, key, step): item_range = np.arange(0, dataframe[key].max(), step) grouped = dataframe.groupby(pd.cut(dataframe[key], item_ra...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 5215, 22889, 29889, 2272, 5317, 408, 1477...
main.py
AntonHei/Undertale_DiscordRichPresence
1
1603258
<gh_stars>1-10 # /////////////////////// # UndertaleDRP by AntonHei # MIT License - Copyright (c) 2020 AntonHei # /////////////////////// # Imports from pypresence import Presence import time import configparser import os from os import path import json import linecache # General config = configparser....
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 849, 19511, 6165, 29914, 30004, 13, 29937, 14211, 814, 744, 8353, 29925, 491, 5774, 3868, 29875, 30004, 13, 29937, 341, 1806, 19245, 448, 14187, 1266, 313, 298...
app/board/handlers/figure.py
CodeSopranos/SopranosWeb
0
130419
from django.urls import reverse from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth import login, logout, authenticate from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, get_obj...
[ 1, 515, 9557, 29889, 26045, 1053, 11837, 13, 3166, 9557, 29889, 1124, 1053, 9056, 5103, 29892, 9056, 5103, 24735, 13, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 6464, 29892, 1480, 449, 29892, 15585, 403, 13, 3166, 9557, 29889, 21570...
runs.py
petch/elsticity2019
1
37464
<filename>runs.py from ahm import * from dfm import * set_log_level(LogLevel.WARNING) def run(N, n, h, k, c, g, f, ls='mumps', pc='default', do_write=True): t1 = Timer() m = int(N/n) l = int(m/2) fp, fm, fd, fb = fibers(N, N, l, h, n, k*n, do_write) tp, tm, td, tb = fibers(N, N, 0, 0, n, k*n, do_w...
[ 1, 529, 9507, 29958, 3389, 29879, 29889, 2272, 13, 3166, 263, 7184, 1053, 334, 13, 3166, 4489, 29885, 1053, 334, 13, 13, 842, 29918, 1188, 29918, 5563, 29898, 3403, 10108, 29889, 29956, 25614, 29897, 13, 13, 1753, 1065, 29898, 29940, 29...
mgcpy/independence_tests/unit_tests/mgc/data/gen_sims.py
neurodata-papers/mgc
5
192526
import numpy as np from mgcpy.benchmarks.simulations import (circle_sim, cub_sim, exp_sim, joint_sim, linear_sim, log_sim, multi_indep_sim, multi_noise_sim, quad_sim, root_sim, sin_sim, ...
[ 1, 1053, 12655, 408, 7442, 13, 3166, 286, 29887, 23141, 29889, 1785, 16580, 29879, 29889, 3601, 8250, 1053, 313, 16622, 29918, 3601, 29892, 13630, 29918, 3601, 29892, 1518, 29918, 3601, 29892, 13, 462, 462, 3986, 14002, 29918, 3601, 29892, ...
tfl_data.py
dongyan1024/overtime
9
10553
<reponame>dongyan1024/overtime<filename>tfl_data.py<gh_stars>1-10 import overtime as ot times = ['14:00','14:05', '14:10', '14:15', '14:20', '14:25', '14:30', '14:35', '14:40', '14:45', '14:50', '14:55'] tfl_data = ot.TflInput(['victoria', 'central', 'bakerloo', 'piccadilly'], ['inbound', 'outbound'], times)
[ 1, 529, 276, 1112, 420, 29958, 29881, 549, 10094, 29896, 29900, 29906, 29946, 29914, 957, 2230, 29966, 9507, 29958, 29873, 1579, 29918, 1272, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 30004, 13, 521...
services/catalog/tests/unit/with_dbs/test_entrypoint_dags.py
KZzizzle/osparc-simcore
0
149855
<gh_stars>0 # pylint:disable=unused-variable # pylint:disable=unused-argument # pylint:disable=redefined-outer-name from typing import Dict, List import pytest from starlette.testclient import TestClient from simcore_service_catalog.__version__ import api_version from simcore_service_catalog.models.schemas.meta impo...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 282, 2904, 524, 29901, 20472, 29922, 348, 3880, 29899, 11918, 13, 29937, 282, 2904, 524, 29901, 20472, 29922, 348, 3880, 29899, 23516, 13, 29937, 282, 2904, 524, 29901, 20472, 2992...
scratch/check_bins.py
AdriJD/cmb_sst_ksw
0
47560
<reponame>AdriJD/cmb_sst_ksw ''' Test binning ''' import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import sys import os import numpy as np from scipy.special import spherical_jn sys.path.insert(0,'./../') from sst import Fisher opj = os.path.join def bin_test(parity, bins=None, lmin=2, lmax=23...
[ 1, 529, 276, 1112, 420, 29958, 3253, 374, 29967, 29928, 29914, 4912, 29890, 29918, 29879, 303, 29918, 2039, 29893, 13, 12008, 13, 3057, 9016, 1076, 13, 12008, 13, 13, 5215, 22889, 13, 2922, 17357, 29889, 1509, 877, 16170, 1495, 13, 5215...
data/studio21_generated/interview/1618/starter_code.py
vijaykumawat256/Prompt-Summarization
0
132148
<gh_stars>0 def differentiate(equation, point):
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 1753, 17473, 403, 29898, 2573, 29892, 1298, 1125, 13, 12, 2 ]
routers/routers.py
Soulike/Class-Note-Manager-Python
1
1603253
<filename>routers/routers.py from .Login import Login from .NoteManagement import NoteManagement from .ReactApp import ReactApp # 注册所有子路由 def registerRouters(app): app.register_blueprint(ReactApp) app.register_blueprint(NoteManagement, url_prefix = '/server') app.register_blueprint(Login, url_prefix = '/s...
[ 1, 529, 9507, 29958, 27537, 2153, 29914, 27537, 2153, 29889, 2272, 13, 3166, 869, 11049, 1053, 19130, 13, 3166, 869, 9842, 27107, 1053, 3940, 27107, 13, 3166, 869, 1123, 627, 2052, 1053, 9537, 2052, 13, 13, 13, 29937, 29871, 31368, 232,...
SimPEG/utils/curvutils.py
jcapriot/simpeg
1
165287
<reponame>jcapriot/simpeg from .code_utils import deprecate_module deprecate_module("curvutils", "curv_utils", "0.15.0") from .curv_utils import *
[ 1, 529, 276, 1112, 420, 29958, 29926, 5030, 374, 327, 29914, 14739, 387, 13, 3166, 869, 401, 29918, 13239, 1053, 16460, 403, 29918, 5453, 13, 13, 311, 17990, 403, 29918, 5453, 703, 2764, 29894, 13239, 613, 376, 2764, 29894, 29918, 13239...
detection/utils/misc_code.py
manogna-s/da-fer
1
191550
<gh_stars>1-10 """ for image in os.listdir(images_path): img = Image.open(os.path.join(images_path,image)) frame_draw = img.copy() draw = ImageDraw.Draw(frame_draw) for box in boxes: draw.rectangle(box.tolist(), outline=(255, 0, 0), width=6) for landmark in landmarks_points: print...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 13, 15945, 29908, 13, 1454, 1967, 297, 2897, 29889, 1761, 3972, 29898, 8346, 29918, 2084, 1125, 13, 1678, 10153, 353, 7084, 29889, 3150, 29898, 359, 29889, 2084, 2988...
survey/views_start.py
shagun30/djambala-2
0
107681
# -*- coding: utf-8 -*- """ /dms/survey/views_start.py .. enthaelt den View zum Starten der Dateneingabe des Fragebogens Django content Management System <NAME> <EMAIL> Die Programme des dms-Systems koennen frei genutzt und den spezifischen Beduerfnissen entsprechend angepasst werden. 0.01 21.01.2008 Beg...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 29914, 29881, 1516, 29914, 7610, 6950, 29914, 7406, 29918, 2962, 29889, 2272, 13, 13, 636, 875, 2350, 2152, 972, 4533, 3356, 7370, 264,...
src/Python/Graphs/ConstructTree.py
sankhesh/vtk-examples
0
132567
#!/usr/bin/env python import vtk def main(): graph = vtk.vtkMutableDirectedGraph() v1 = graph.AddVertex() v2 = graph.AddChild(v1) graph.AddChild(v1) graph.AddChild(v2) # equivalent to: # V1 = g.AddVertex() # V2 = g.AddVertex() # V3 = g.AddVertex() # V4 = g.AddVertex() #...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 325, 11178, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 3983, 353, 325, 11178, 29889, 29894, 11178, 15211, 17392, 287, 9527, 580, 13, 13, 1678, 325, 29896, 353, 3983, 29889, 25...
desicos/abaqus/abaqus_functions.py
saullocastro/desicos
1
106463
r""" ========================================================= Utilities Abaqus (:mod:`desicos.abaqus.abaqus_functions`) ========================================================= .. currentmodule:: desicos.abaqus.abaqus_functions Includes all utilities functions that must be executed from Abaqus. """ from __future__...
[ 1, 364, 15945, 29908, 13, 9166, 9166, 9166, 4936, 29922, 13, 7270, 1907, 1976, 18463, 29879, 13940, 1545, 18078, 2783, 4869, 29889, 5363, 339, 29879, 29889, 5363, 339, 29879, 29918, 12171, 6348, 13, 9166, 9166, 9166, 4936, 29922, 13, 13, ...
plugins/libinst.cfg.puppet/src/libinst/cfg/puppet/nodes.py
gonicus/clacks
2
1604210
<gh_stars>1-10 # This file is part of the clacks framework. # # http://clacks-project.org # # Copyright: # (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de # # License: # GPL-2: http://www.gnu.org/licenses/gpl-2.0.html # # See the LICENSE file in the project's top-level directory for details. import re im...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 910, 934, 338, 760, 310, 278, 274, 2364, 29879, 6890, 29889, 13, 29937, 13, 29937, 29871, 1732, 597, 29883, 2364, 29879, 29899, 4836, 29889, 990, 13, 29937, ...
tests/algorithm/test_tournament_selector.py
wbknez/evored-warrior
0
180980
""" """ from copy import copy from random import randint from unittest import TestCase from pathos.multiprocessing import ProcessPool from evored.genome import Genome from evored.algorithm.selection import TournamentSelector class TournamentSelectorTest(TestCase): """ Test suite for TournamentSelector. ...
[ 1, 9995, 13, 13, 15945, 29908, 13, 3166, 3509, 1053, 3509, 13, 3166, 4036, 1053, 20088, 524, 13, 3166, 443, 27958, 1053, 4321, 8259, 13, 13, 3166, 2224, 359, 29889, 18056, 307, 985, 292, 1053, 10554, 11426, 13, 13, 3166, 3415, 4395, ...
pycatia/space_analyses_interfaces/section.py
evereux/catia_python
90
179805
#! usr/bin/python3.6 """ Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-07-06 14:02:20.222384 .. warning:: The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. They are there as a guide as to how the visual basic / catscript function...
[ 1, 396, 29991, 502, 29878, 29914, 2109, 29914, 4691, 29941, 29889, 29953, 13, 15945, 29908, 13, 1678, 15591, 12919, 4469, 5759, 773, 478, 29945, 28451, 362, 2066, 515, 315, 1299, 10764, 478, 29945, 390, 29906, 29947, 373, 29871, 29906, 29...
obniz/parts/Moving/StepperMotor/__init__.py
izm51/obniz-python-sdk
11
8683
from attrdict import AttrDefault import asyncio class StepperMotor: def __init__(self): self.keys = ['<KEY> 'common'] self.required_keys = ['a', 'b', 'aa', 'bb'] self._step_instructions = AttrDefault(bool, { '1': [[0, 1, 1, 1], [1, 0, 1, 1], [1, 1, 0, 1], [1, 1,...
[ 1, 515, 12421, 8977, 1053, 2180, 509, 4592, 13, 13, 5215, 408, 948, 3934, 13, 13, 1990, 2443, 2496, 29924, 327, 272, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 8149, 353, 6024, 29966, 10818, 29958, 525...
L8-pandas-autocorr.py
jdherman/eci273
10
43109
import numpy as np import matplotlib.pyplot as plt import pandas as pd # read CSV data into a "dataframe" - pandas can parse dates # this will be familiar to R users (not so much matlab users) df = pd.read_csv('data/SHA.csv', index_col=0, parse_dates=True) Q = df.SHA_INFLOW_CFS # a pandas series (daily) # Q = Q.resa...
[ 1, 1053, 12655, 408, 7442, 29871, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 11701, 408, 10518, 13, 13, 29937, 1303, 16874, 848, 964, 263, 376, 1272, 2557, 29908, 448, 11701, 508, 6088, 10116, 13, 29937, 445, 674, 367, ...
dosu/utils.py
tsandrini/DoSU
0
45198
<filename>dosu/utils.py """ __/\\\\\\\\\\\\______________________/\\\\\\\\\\\____/\\\________/\\\_ _\/\\\////////\\\__________________/\\\/////////\\\_\/\\\_______\/\\\_ _\/\\\______\//\\\________________\//\\\______\///__\/\\\_______\/\\\_ _\/\\\_______\/\\\_____/\\\\\______\////\\\_________\/\\\_______\/\\\_ ...
[ 1, 529, 9507, 29958, 29881, 359, 29884, 29914, 13239, 29889, 2272, 13, 15945, 29908, 13, 1649, 29914, 1966, 1966, 1966, 1966, 1966, 1966, 27097, 7652, 1649, 29914, 1966, 1966, 1966, 1966, 1966, 29905, 7652, 29914, 1966, 29905, 14365, 29914,...
src/lib/pdb.py
DTenore/skulpt
2,671
128113
<reponame>DTenore/skulpt<filename>src/lib/pdb.py<gh_stars>1000+ import _sk_fail; _sk_fail._("pdb")
[ 1, 529, 276, 1112, 420, 29958, 12972, 264, 487, 29914, 808, 14185, 29966, 9507, 29958, 4351, 29914, 1982, 29914, 29886, 2585, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29900, 29974, 13, 5215, 903, 808, 29918, ...
DeepSpeech/bin/import_ccpmf.py
adimaini/WEAT-WEFAT
1
1604520
<reponame>adimaini/WEAT-WEFAT<filename>DeepSpeech/bin/import_ccpmf.py #!/usr/bin/env python """ Importer for dataset published from Centre de Conférence <NAME>-France Ministère de l'Économie, des Finances et de la Relance """ import csv import sys import os import progressbar import subprocess import zipfile from glob...
[ 1, 529, 276, 1112, 420, 29958, 328, 326, 475, 29875, 29914, 8851, 1299, 29899, 8851, 29943, 1299, 29966, 9507, 29958, 2772, 1022, 10649, 5309, 29914, 2109, 29914, 5215, 29918, 617, 3358, 29888, 29889, 2272, 13, 29937, 14708, 4855, 29914, ...
okta/models/app/AppUserProfile.py
xmercury-qb/okta-sdk-python
1
110320
<gh_stars>1-10 class AppUserProfile: types = { 'username': str, 'password': <PASSWORD> } def __init__(self): self.username = None # str self.password = None # str
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 1990, 2401, 2659, 13909, 29901, 13, 13, 1678, 4072, 353, 426, 13, 4706, 525, 6786, 2396, 851, 29892, 13, 4706, 525, 5630, 2396, 529, 25711, 17013, 29958, 13, 1678, ...
setup.py
rmax/django-dummyimage
11
101222
<filename>setup.py #!/usr/bin/env python from setuptools import setup, find_packages setup( name = "django-dummyimage", version = "0.1.1", description = "Dynamic Dummy Image Generator For Django!", author = "<NAME>", author_email = "<EMAIL>", url = "https://github.com/darkrho/django-dummyimage"...
[ 1, 529, 9507, 29958, 14669, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 13, 14669, 29898, 13, 1678, 1024, 353, 376, 14095, 29899, 29881, 11770,...
_posts/ideals_varieties_and_algorithms/chapter3/section2/ex-3-2-2.py
hidenori-shinohara/hidenori-shionohara.github.io
0
1603012
from sympy import * from sympy.polys.orderings import monomial_key x, y, z = symbols('x y z') print(groebner([x*y - 1, x*z - 1], x, y, z, order='lex'))
[ 1, 515, 5016, 2272, 1053, 334, 13, 3166, 5016, 2272, 29889, 3733, 952, 29889, 2098, 886, 1053, 1601, 7615, 29918, 1989, 13, 13, 29916, 29892, 343, 29892, 503, 353, 15072, 877, 29916, 343, 503, 1495, 13, 13, 2158, 29898, 17170, 774, 10...
profiles/apps.py
mlutok/portal_backend
1
142161
from django.apps import AppConfig class ProfilesConfig(AppConfig): name = "profiles" verbose_name = "Profiles of Players" def ready(self): from . import signals
[ 1, 515, 9557, 29889, 13371, 1053, 2401, 3991, 13, 13, 13, 1990, 1019, 5325, 3991, 29898, 2052, 3991, 1125, 13, 1678, 1024, 353, 376, 771, 5325, 29908, 13, 1678, 26952, 29918, 978, 353, 376, 1184, 5325, 310, 7412, 414, 29908, 13, 13, ...
src/fortrace/application/userManagement.py
dasec/ForTrace
1
1603319
<reponame>dasec/ForTrace<gh_stars>1-10 # Copyright (C) 2013-2014 <NAME> # This file is part of fortrace - http://fortrace.fbi.h-da.de # See the file 'docs/LICENSE' for copying permission. # Modified by <NAME> in 2021 from __future__ import absolute_import from __future__ import print_function try: import logging ...
[ 1, 529, 276, 1112, 420, 29958, 29881, 559, 29883, 29914, 2831, 11591, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29941, 29899, 29906, 29900, 29896,...
example.py
davehenton/tf-lyrics
0
34601
<gh_stars>0 from tflyrics import Poet, LyricsGenerator artists = ['<NAME>', '<NAME>', 'The Beatles'] gen = LyricsGenerator(artists, per_artist=5) ds = gen.as_dataset(batch_size=4) p = Poet() p.train_on(ds, n_epochs=10) poem = p.generate(start_string='Hey ', n_gen_chars=1000) print(poem)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 15886, 368, 10817, 1053, 3929, 300, 29892, 365, 4316, 1199, 21575, 13, 13, 442, 2879, 353, 6024, 29966, 5813, 29958, 742, 12801, 5813, 29958, 742, 525, 1576, 18573, 793, 2033, 13,...
pkmn_type_scrapper.py
Cesar-Miranda/Pkm_Scrapper_DataAnalysis
0
53772
import scrapy from scrapy.crawler import CrawlerProcess def pkm_spider(): class PkmSpider(scrapy.Spider): name = 'pkms' def start_requests(self): yield scrapy.Request('https://bulbapedia.bulbagarden.net/wiki/Bulbasaur_(Pok%C3%A9mon)') def parse(self, response): ite...
[ 1, 1053, 24559, 2272, 13, 3166, 24559, 2272, 29889, 29883, 1610, 1358, 1053, 315, 1610, 1358, 7032, 13, 13, 1753, 282, 8848, 29918, 1028, 1241, 7295, 13, 1678, 770, 349, 8848, 5592, 1241, 29898, 1557, 336, 2272, 29889, 5592, 1241, 1125,...
Posts/viewsAPI.py
CMPUT404-Fa21-Organization/CMPUT404-Project-Social-Distribution
3
483
from django.conf import settings from django.core import serializers from django.utils import timezone import requests from Posts.commentModel import Comments #from Posts.commentView import add_Comment from rest_framework import status from rest_framework.decorators import api_view, authentication_classes, permission_c...
[ 1, 515, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 3221, 1053, 7797, 19427, 13, 3166, 9557, 29889, 13239, 1053, 29431, 13, 5215, 7274, 13, 3166, 4918, 29879, 29889, 9342, 3195, 1053, 461, 29879, 13, 29937, 3166, 4918, 29879, ...
src/brewlog/utils/app.py
zgoda/brewlog
3
110522
from flask import Flask class Brewlog(Flask): @property def jinja_options(self): options = dict(super().jinja_options) options.update({ 'trim_blocks': True, 'lstrip_blocks': True, }) return options
[ 1, 515, 29784, 1053, 2379, 1278, 13, 13, 13, 1990, 350, 3973, 1188, 29898, 8754, 1278, 1125, 13, 13, 1678, 732, 6799, 13, 1678, 822, 432, 262, 1764, 29918, 6768, 29898, 1311, 1125, 13, 4706, 3987, 353, 9657, 29898, 9136, 2141, 28789, ...
python/toy/weather_wechat.py
tagwan/scripts
0
38632
<reponame>tagwan/scripts import requests import json import datetime def weather(city): url = "http://wthrcdn.etouch.cn/weather_mini?city=%s" % city try: data = requests.get(url).json()['data'] city = data['city'] ganmao = data['ganmao'] today_weather = data['forecast'][0] ...
[ 1, 529, 276, 1112, 420, 29958, 4039, 11440, 29914, 16713, 13, 5215, 7274, 13, 5215, 4390, 13, 5215, 12865, 13, 13, 13, 1753, 14826, 29898, 12690, 1125, 13, 1678, 3142, 353, 376, 1124, 597, 29893, 386, 2214, 5200, 29889, 300, 3222, 298...
data/free_st_chinese_mandarin_corpus.py
yeyupiaoling/MASR
126
196409
<filename>data/free_st_chinese_mandarin_corpus.py import argparse import functools import codecs import os from utility import download, unpack from utility import add_arguments, print_arguments URL_ROOT = 'http://www.openslr.org/resources/38' DATA_URL = URL_ROOT + '/ST-CMDS-20170001_1-OS.tar.gz' MD5_DATA = 'c28ddfc8e...
[ 1, 529, 9507, 29958, 1272, 29914, 9021, 29918, 303, 29918, 305, 8233, 29918, 29885, 392, 27139, 29918, 2616, 13364, 29889, 2272, 13, 5215, 1852, 5510, 13, 5215, 2090, 312, 8789, 13, 5215, 775, 2395, 13, 5215, 2897, 13, 3166, 19725, 1053...
server/src/voodoo/gen/caller_checker.py
zstars/weblabdeusto
0
75106
ALL = 'All servers' def caller_check(servers = ALL): def func_wrapper(func): # TODO: To be implemented. Could get current_app and check it. Useful for anything? return func return func_wrapper
[ 1, 15149, 353, 525, 3596, 12424, 29915, 13, 13, 1753, 24959, 29918, 3198, 29898, 643, 874, 353, 15149, 1125, 13, 1678, 822, 3653, 29918, 17699, 29898, 9891, 1125, 13, 4706, 396, 14402, 29901, 1763, 367, 8762, 29889, 6527, 679, 1857, 299...
adapt.py
fredericcassin/adapt-config
0
87405
#!/usr/bin/env python3 import fnmatch import os import sys import yaml import json import re import glob import argparse import csv from jinja2 import Template import yamlordereddictloader import fs from shutil import copyfile from jsonpath_rw import jsonpath, parse from box import Box from deepmerge import always_merg...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 5215, 7876, 4352, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 343, 8807, 13, 5215, 4390, 13, 5215, 337, 13, 5215, 13149, 13, 5215, 1852, 5510, 13, 5215, 11799, 13, 3166, 432, ...
tvm_benchmark/test_resnet_inference.py
adwwsd/HAWQ
0
28573
<gh_stars>0 import torch import tvm from tvm import autotvm from tvm import relay from tvm.contrib import download from tvm.contrib.debugger import debug_runtime from PIL import Image import matplotlib.pyplot as plt import numpy as np import argparse import os from os.path import join, isfile import sys import json, ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 4842, 305, 13, 5215, 260, 6925, 13, 3166, 260, 6925, 1053, 1120, 327, 6925, 13, 3166, 260, 6925, 1053, 29856, 13, 3166, 260, 6925, 29889, 21570, 1053, 5142, 13, 3166, 260, 6925,...
atv/tests/factories.py
City-of-Helsinki/atv
0
166978
import factory from django.contrib.auth.models import Group class GroupFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: "group-%d" % n) class Meta: model = Group django_get_or_create = ("name",)
[ 1, 1053, 12529, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 6431, 13, 13, 13, 1990, 6431, 5126, 29898, 14399, 29889, 14095, 29889, 29928, 5364, 3195, 5126, 1125, 13, 1678, 1024, 353, 12529, 29889, 20529, 29898, 2892, 302...
scripts/pickrunner/visibility_widget.py
ColinKennedy/pickrunner
1
76406
<reponame>ColinKennedy/pickrunner #!/usr/bin/env python # -*- coding: utf-8 -*- '''A set of small widgets that are meant to show/hide themselves.''' # IMPORT THIRD-PARTY LIBRARIES from Qt import QtWidgets from Qt import QtCore class ExpandCollapseWidget(QtWidgets.QWidget): '''A "show/hide" widget which opens a...
[ 1, 529, 276, 1112, 420, 29958, 1625, 262, 29968, 2108, 7584, 29914, 23945, 27492, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 12008, 2...
tools/benchmark/do_not_run_create_benchmark_data.py
dangervon/ironic
0
37718
<gh_stars>0 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 13, 29937, 1678, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 366, 1122, 13, 29937, 1678, 451, 671, 445,...
j24/learn.py
juhi24/j24py
0
58409
<filename>j24/learn.py<gh_stars>0 # coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals __metaclass__ = type import pandas as pd import matplotlib.pyplot as plt def fit_predict(t, km): km.fit(t.T) classes = pd.Series(data=km.predict(t.T), index=t.columns) retu...
[ 1, 529, 9507, 29958, 29926, 29906, 29946, 29914, 19668, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 29892, 8542, 29892, ...
ocellaris/__init__.py
TormodLandet/Ocellaris
1
58956
# Copyright (C) 2015-2019 <NAME> # SPDX-License-Identifier: Apache-2.0 # Check for presence of FEniCS etc from .verify_environment import verify_env verify_env() __version__ = '2019.0.2' # This should potentially be made local to the mesh creation routines import dolfin dolfin.parameters['ghost_mode'] = 'shared_...
[ 1, 396, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29945, 29899, 29906, 29900, 29896, 29929, 529, 5813, 29958, 13, 29937, 10937, 29928, 29990, 29899, 29931, 293, 1947, 29899, 12889, 29901, 13380, 29899, 29906, 29889, 29900, 1...
main_app/app.py
johncoleman83/AirBnB
2
1610911
#!/usr/bin/python3 """ Flask App that integrates with AirBnB static HTML Template """ from flask import Flask, render_template, request, url_for import json from models import storage import requests from uuid import uuid4 # flask setup app = Flask(__name__) app.url_map.strict_slashes = False port = 8000 host = '0.0....
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 13, 15945, 29908, 13, 8754, 1278, 2401, 393, 3990, 1078, 411, 5593, 29933, 29876, 29933, 2294, 4544, 25663, 13, 15945, 29908, 13, 3166, 29784, 1053, 2379, 1278, 29892, 4050, 29918, 6886, 29...
me/storage/mongodb/collections/Collection.py
me-env/me.
2
1608693
from me.storage.mongodb.config import BULK_LIMIT, BULK_MIN from me.storage.mongodb.config import mongo_to_python from me.tools import fread_json class Collection: def __init__(self, db, name, logger, reset=False, schema_file=None): self.db = db self.name = name self.bulk_buffer = [] ...
[ 1, 515, 592, 29889, 12925, 29889, 23264, 29889, 2917, 1053, 350, 13309, 29968, 29918, 5265, 26349, 29892, 350, 13309, 29968, 29918, 16173, 13, 3166, 592, 29889, 12925, 29889, 23264, 29889, 2917, 1053, 19476, 29918, 517, 29918, 4691, 13, 316...
gym_combat/gym_combat/envs/main.py
refaev/combat_gym
0
3992
<filename>gym_combat/gym_combat/envs/main.py from matplotlib import style from tqdm import tqdm style.use("ggplot") from gym_combat.envs.Arena.CState import State from gym_combat.envs.Arena.Entity import Entity from gym_combat.envs.Arena.Environment import Environment, Episode from gym_combat.envs.Common.constants imp...
[ 1, 529, 9507, 29958, 29887, 962, 29918, 510, 10222, 29914, 29887, 962, 29918, 510, 10222, 29914, 264, 4270, 29914, 3396, 29889, 2272, 13, 3166, 22889, 1053, 3114, 13, 3166, 260, 29939, 18933, 1053, 260, 29939, 18933, 13, 13, 3293, 29889, ...
qf_lib/analysis/strategy_monitoring/assets_monitoring_sheet.py
webclinic017/qf-lib
198
100317
# Copyright 2016-present CERN – European Organization for Nuclear Research # # 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...
[ 1, 396, 268, 14187, 1266, 29871, 29906, 29900, 29896, 29953, 29899, 6338, 315, 1001, 29940, 785, 7824, 9205, 2133, 363, 405, 1682, 1945, 10550, 13, 29937, 13, 29937, 268, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, ...
prologix_usb.py
rohankumardubey/pylt
0
54089
#!/usr/local/bin/python from __future__ import print_function import sys import time import serial import pylt pusb = dict() ver = "Prologix GPIB-USB Controller version 6.95" hwset = ( "addr", "auto", "eoi", "eos", "eot_enable", "eot_char", "read_tmo_ms" ) def def_set(setting): setting["auto"] = 0...
[ 1, 18787, 4855, 29914, 2997, 29914, 2109, 29914, 4691, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 10876, 13, 5215, 931, 13, 5215, 7797, 13, 5215, 11451, 1896, 13, 13, 13364, 29890, 353, 9657, 580, 13...
ML/nlp/reuters_analysis.py
saneravi/ML_Stuff
209
107210
#!/usr/bin/env python from collections import defaultdict import numpy as np from nltk.corpus import reuters def analyze_data_distribution(cat2count): i = 1 most_frequent_words = sorted(cat2count.items(), key=lambda n: n[1]['train'], reverse=...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 3166, 16250, 1053, 2322, 8977, 13, 13, 5215, 12655, 408, 7442, 13, 3166, 302, 1896, 29895, 29889, 2616, 13364, 1053, 337, 329, 414, 13, 13, 13, 1753, 27599, 29918, 1272, 29918, 2...
convert_rhd.py
miketrumpis/rhd-to-hdf5
0
1605128
<reponame>miketrumpis/rhd-to-hdf5 #!/usr/bin/env python import os import sys import json import numpy as np import h5py import logging from rhdlib.rhd_reader import RHDFile, signed_arrays def convert(filenames, outfile): """ Concatenate the contents of the RHD files into contiguous HDF5 datasets Paramet...
[ 1, 529, 276, 1112, 420, 29958, 29885, 638, 300, 5848, 3334, 29914, 29878, 16440, 29899, 517, 29899, 29882, 2176, 29945, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 4390, 13, 521...
users/serializers.py
tahasama/Bugatti-Django-Docker-API
0
150660
from django.db import transaction from rest_framework import serializers from dj_rest_auth.registration.serializers import RegisterSerializer from django_countries.serializer_fields import CountryField from .models import GENDER_CHOICES,CustomUser class CustomUserRegistrationSerializer(RegisterSerializer): name=s...
[ 1, 515, 9557, 29889, 2585, 1053, 10804, 13, 3166, 1791, 29918, 4468, 1053, 7797, 19427, 13, 3166, 270, 29926, 29918, 5060, 29918, 5150, 29889, 1727, 8306, 29889, 15550, 19427, 1053, 12577, 17679, 13, 3166, 9557, 29918, 2798, 2722, 29889, ...
AlphaGoZero/code/UI/UI.py
OoSnowfxm/AlphaZero_Othello
0
46941
''' @Author: fxm @Date: Dec 27, 2020. @Title: UI class. ''' import sys sys.path.append('..') import pygame import logging from pygame.locals import * import pygame.gfxdraw from collections import namedtuple from Framework.Net import dotdict from Othello.Board import Board log = logging.getLogger(__name__) ...
[ 1, 14550, 13, 1678, 732, 13720, 29901, 285, 29916, 29885, 13, 1678, 732, 2539, 29901, 3826, 29871, 29906, 29955, 29892, 29871, 29906, 29900, 29906, 29900, 29889, 13, 1678, 732, 7030, 29901, 3740, 770, 29889, 13, 12008, 13, 5215, 10876, 13...
im_v2/common/db/remove_db.py
alphamatic/amp
5
50340
<gh_stars>1-10 #!/usr/bin/env python """ Script to remove IM database using connection. # Remove a DB named 'test_db' using environment variables: > remove_db.py --db_name 'test_db' """ import argparse import helpers.hparser as hparser import helpers.hsql as hsql import im_v2.im_lib_tasks as imvimlita def _parse()...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 15945, 29908, 13, 4081, 304, 3349, 22313, 2566, 773, 3957, 29889, 13, 13, 29937, 15154, 263, 6535, 4257, 525, ...
qiime_2_ll_quick_viewer/cli.py
gluque/qiime_2_ll_quick_viewer
1
188834
# -*- coding: utf-8 -*- """Console script for qiime_2_ll_quick_viewer.""" import click from qiime_2_ll_quick_viewer import qiime_2_ll_quick_viewer CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) @click.command(context_settings=CONTEXT_SETTINGS) @click.option('-f', '--filename', required=True, ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 20008, 2471, 363, 3855, 29875, 603, 29918, 29906, 29918, 645, 29918, 24561, 29918, 29894, 15580, 1213, 15945, 13, 13, 5215, 2828, 13, 3...
cfgov/jobmanager/models/django.py
thephillipsequation/cfgov-refresh
0
135384
<gh_stars>0 from django.db import models from wagtail.admin.edit_handlers import FieldPanel, InlinePanel from wagtail.core.fields import RichTextField from modelcluster.fields import ParentalKey from modelcluster.models import ClusterableModel class ApplicantType(models.Model): applicant_type = models.CharField...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 13, 3166, 281, 351, 18237, 29889, 6406, 29889, 5628, 29918, 3179, 9306, 1053, 8989, 7490, 29892, 512, 1220, 7490, 13, 3166, 281, 351, 18237, 298...
python/revegetate.py
TenType/competition
1
170418
<reponame>TenType/competition n, m = map(int, input().split()) connected = [] seeds = [] for i in range(0, n): connected.append([]) for i in range(0, m): a, b = map(int, input().split()) if (b not in connected[a-1]): connected[a-1].append(b) if (a not in connected[b-1]): connected[b-1].append(a) print(connec...
[ 1, 529, 276, 1112, 420, 29958, 29911, 264, 1542, 29914, 2388, 300, 654, 13, 29876, 29892, 286, 353, 2910, 29898, 524, 29892, 1881, 2141, 5451, 3101, 13, 18045, 353, 5159, 13, 344, 5779, 353, 5159, 13, 1454, 474, 297, 3464, 29898, 2990...
lib/datasets/carla.py
BuiKhoi/DDRNet.pytorch
0
160702
<reponame>BuiKhoi/DDRNet.pytorch # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by <NAME> (<EMAIL>) # ------------------------------------------------------------------------------ import os import cv2 import numpy...
[ 1, 529, 276, 1112, 420, 29958, 29933, 1481, 29968, 1251, 29875, 29914, 7858, 29934, 6779, 29889, 2272, 7345, 305, 13, 29937, 448, 2683, 2683, 2683, 2683, 9072, 29899, 13, 29937, 14187, 1266, 313, 29883, 29897, 7783, 13, 29937, 10413, 2114...
examples/distributed_dl/distributed_ml.py
james-tn/ray-on-aml
19
117045
<filename>examples/distributed_dl/distributed_ml.py from ray_on_aml.core import Ray_On_AML from azureml.core import Run import numpy as np import torch import torch.optim as optim import torch.nn as nn from torchvision import datasets, transforms from torch.utils.data import DataLoader import torch.nn.functional as F ...
[ 1, 529, 9507, 29958, 19057, 29914, 5721, 7541, 29918, 11671, 29914, 5721, 7541, 29918, 828, 29889, 2272, 13, 13, 3166, 15570, 29918, 265, 29918, 8807, 29889, 3221, 1053, 9596, 29918, 2951, 29918, 23956, 13, 3166, 15699, 828, 29889, 3221, ...
src/z3c/viewtemplate/macro.py
zopefoundation/z3c.viewtemplate
0
1608576
############################################################################## # # Copyright (c) 2005 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
[ 1, 835, 13383, 13383, 13383, 13383, 7346, 2277, 29937, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29900, 29945, 796, 2300, 10606, 322, 2866, 1091, 29560, 29889, 13, 29937, 2178, 26863, 2538, 9841, 29889, 13, ...
Chapter 05/thread_sync.py
bpbpublications/Advance-Core-Python-Programming
0
90764
<gh_stars>0 import threading x = 0 range_val = int(input("Enter the range : ")) def thread_sync(lock): global x for i in range(range_val): # lock.acquire() x += 1 lock.release() lock = threading.Lock() t1 = threading.Thread(target = thread_sync, args = (loc...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 3244, 292, 30004, 13, 30004, 13, 29916, 353, 29871, 29900, 30004, 13, 3881, 29918, 791, 353, 938, 29898, 2080, 703, 10399, 278, 3464, 584, 376, 876, 30004, 13, 30004, 13, 30004, ...
backend/test.py
Harin329/Masterplan
0
38114
<reponame>Harin329/Masterplan<gh_stars>0 import boto3 import os from dotenv import load_dotenv load_dotenv() client = boto3.client( 'dynamodb', aws_access_key_id=os.getenv('AWS_ACCESS_KEY_ID'), aws_secret_access_key=os.getenv('AWS_SECRET_ACCESS_KEY'), region_name="us-east-1" )
[ 1, 529, 276, 1112, 420, 29958, 21972, 262, 29941, 29906, 29929, 29914, 19203, 9018, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 289, 3747, 29941, 13, 5215, 2897, 13, 3166, 8329, 6272, 1053, 2254, 29918, 6333, 6272, 13, 13, 1...
med_files_api/med_result/migrations/0003_auto_20200509_1024.py
TheProrok29/med-files-api
0
101591
<reponame>TheProrok29/med-files-api # Generated by Django 3.0.5 on 2020-05-09 08:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('med_result', '0002_medresult_name'), ] operations = [ migrations.AlterField( model_name='med...
[ 1, 529, 276, 1112, 420, 29958, 1576, 29925, 729, 554, 29906, 29929, 29914, 2168, 29899, 5325, 29899, 2754, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29900, 29889, 29945, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29900, 299...
render_utils.py
IBM/photorealistic-blocksworld
17
50045
from __future__ import print_function import sys, random, json, os, tempfile from collections import Counter import numpy as np INSIDE_BLENDER = True try: import bpy from mathutils import Vector except ImportError as e: INSIDE_BLENDER = False if INSIDE_BLENDER: try: import utils except ImportError as e: ...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 5215, 10876, 29892, 4036, 29892, 4390, 29892, 2897, 29892, 5694, 1445, 13, 3166, 16250, 1053, 315, 5336, 13, 5215, 12655, 408, 7442, 13, 13, 1177, 29903, 22027, 29918, 29933, ...
display_stats.py
rionbr/ddi-blumenau
1
124620
# coding=utf-8 # Author: <NAME> # Date: Nov 16, 2014 # # Description: Plot DDI Statistics # # # coding=utf-8 from __future__ import division import numpy as np import pandas as pd import scipy.stats from scipy import stats slice = pd.IndexSlice pd.set_option('display.max_rows', 24) pd.set_option('display.max_columns', ...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 13361, 29901, 529, 5813, 29958, 13, 29937, 4712, 29901, 2864, 29871, 29896, 29953, 29892, 29871, 29906, 29900, 29896, 29946, 13, 29937, 13, 29937, 12953, 29901, 18399, 360, 4571, 27098, 1...
composite/serializers.py
Skydipper/Composite
0
112861
"""Serializers""" import logging def serialize_composite_output(analysis, type): """.""" return { 'id': None, 'type': type, 'attributes': { 'thumb_url': analysis.get('thumb_url', None), 'tile_url':analysis.get('tile_url', None), 'dem':analysis.get('d...
[ 1, 9995, 9125, 19427, 15945, 29908, 13, 5215, 12183, 13, 13, 13, 1753, 28755, 29918, 22410, 568, 29918, 4905, 29898, 15916, 29892, 1134, 1125, 13, 1678, 9995, 1213, 15945, 13, 1678, 736, 426, 13, 4706, 525, 333, 2396, 6213, 29892, 13, ...
ex088.py
nascimentobrenda24/PythonExercises
1
42031
<filename>ex088.py # Faça um programa que ajude um jogador da MEGA SENA a criar palpites. O programa vai perguntar quantos jogos serão # gerados e vai sortear 6 números entre 1 e 60 para cada jogo, cadastrando tudo em uma lista composta. from random import randint games = [] temp = [] print('-'*30) print(' JOG...
[ 1, 529, 9507, 29958, 735, 29900, 29947, 29947, 29889, 2272, 13, 29937, 7748, 4277, 1922, 16914, 712, 13612, 1151, 1922, 16812, 3136, 1146, 341, 11787, 29909, 317, 1430, 29909, 263, 14783, 279, 5112, 29886, 3246, 29889, 438, 16914, 325, 17...
signuplogin/views.py
xflows/textflows
18
46284
<gh_stars>10-100 from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.shortcuts import render, get_object_or_404, redirect from django.utils import timezone def signuplogin(request): if request.method == 'POST': if request.POST.get('login'): ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 4911, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 15585, 403, 29892, 6464, 29892, 1480, 449...
gridded/tests/test_ugrid/test_find_nodes.py
groutr/gridded
49
51287
<reponame>groutr/gridded #!/usr/bin/env python """ Testing of code to find nodes. Currently only nearest neighbor. """ from __future__ import (absolute_import, division, print_function) import numpy as np from .utilities import twenty_one_triangles def test_locate_node(twenty_one_triangles): """Test finding...
[ 1, 529, 276, 1112, 420, 29958, 629, 449, 29878, 29914, 629, 2205, 287, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 15945, 29908, 13, 3057, 292, 310, 775, 304, 1284, 7573, 29889, 13, 13, 7583, 368, 871, 20471, 12307...
remoto/lib/__init__.py
ktdreyer/remoto
0
90567
""" This module is meant for vendorizing Python libraries. Most libraries will need to have some ``sys.path`` alterations done unless they are doing relative imports. Do **not** add anything to this module that does not represent a vendorized library. Vendored libraries should go into the ``vendor`` directory and imp...
[ 1, 9995, 13, 4013, 3883, 338, 6839, 363, 27042, 5281, 5132, 9562, 29889, 7849, 9562, 674, 817, 13, 517, 505, 777, 4954, 9675, 29889, 2084, 16159, 10551, 800, 2309, 6521, 896, 526, 2599, 6198, 13, 326, 4011, 29889, 13, 13, 6132, 3579, ...
trlib/environments/wrappers/persistent_action_wrapper.py
albertometelli/pfqi
2
111329
<gh_stars>1-10 from gym.wrappers import TimeLimit class PersistentActionWrapper(TimeLimit): def __init__(self, env, persistence=1, gamma=1, max_episode_steps=None): super(PersistentActionWrapper, self).__init__(env, max_episode_steps) self.persistence = max(1, persistence) self.gamma = gam...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 330, 962, 29889, 29893, 336, 22437, 1053, 5974, 24445, 13, 13, 1990, 9034, 9696, 4276, 15646, 29898, 2481, 24445, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, ...
post.py
strickyak/gforth-transpiler
2
122326
# Filter to normalize how floating point numbers are printed # to clean up diffs between gforth and transpiler output. # # python post.py < output > normalized_output import re, sys SEARCH_FLOAT = re.compile(r'([-]?([0-9]+[.][0-9]*|[0-9]*[.][0-9]+)([eE][-]?[0-9]+)?)(.*)$').search for line in sys.stdin: done, rest...
[ 1, 396, 19916, 304, 4226, 675, 920, 16526, 1298, 3694, 526, 13350, 13, 29937, 304, 5941, 701, 2923, 29879, 1546, 330, 1454, 386, 322, 1301, 29886, 3955, 1962, 29889, 13, 29937, 13, 29937, 259, 3017, 1400, 29889, 2272, 529, 1962, 1405, ...
koocook_core/tests/test_support/test_quantity.py
KooCook/koocook-dj
1
188579
<filename>koocook_core/tests/test_support/test_quantity.py import unittest from koocook_core.support import quantity, unit class TestQuantity(unittest.TestCase): int_amounts = tuple(range(20)) float_amounts = tuple(x / 8 for x in range(20)) amounts = int_amounts + float_amounts def setUp(self) -> No...
[ 1, 529, 9507, 29958, 2901, 542, 2550, 29918, 3221, 29914, 21150, 29914, 1688, 29918, 5924, 29914, 1688, 29918, 22640, 29889, 2272, 13, 5215, 443, 27958, 13, 13, 3166, 5812, 542, 2550, 29918, 3221, 29889, 5924, 1053, 14728, 29892, 5190, 13...
PyFlow/ConfigManager.py
luzpaz/PyFlow
1,463
1612332
## Copyright 2015-2019 <NAME>, <NAME> ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## http://www.apache.org/licenses/LICENSE-2.0 ## Unless required by applicable law or agreed to i...
[ 1, 444, 14187, 1266, 29871, 29906, 29900, 29896, 29945, 29899, 29906, 29900, 29896, 29929, 529, 5813, 10202, 529, 5813, 29958, 13, 13, 2277, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29...
extraResources/electron-backend/routes/delete_toa_entry.py
vilaj46/ad1-ad2-briefs
0
55884
<reponame>vilaj46/ad1-ad2-briefs from classes.Table_Of_Authorities import get_my_toa def delete_toa_entry(IDNumber): TABLE_OF_AUTHORITIES = get_my_toa() old_entries = TABLE_OF_AUTHORITIES.data['entries'] index = TABLE_OF_AUTHORITIES.find_index_with_IDNumber(IDNumber) if str(index) != 'False': ...
[ 1, 529, 276, 1112, 420, 29958, 17191, 1175, 29946, 29953, 29914, 328, 29896, 29899, 328, 29906, 29899, 1182, 2575, 29879, 13, 3166, 4413, 29889, 3562, 29918, 2776, 29918, 13720, 1907, 1053, 679, 29918, 1357, 29918, 517, 29874, 13, 13, 13,...
Class10_Test.py
Kiran1178/Python201901
0
164058
# # ### # # # letter = input ("Please enter a letter:\n") # if (letter == 'i'): # print ("am lettera vowela") # elif (letter== 'a'): # print("am lettera vowela") # if (letter == 'u'): # print ("am lettera vowela") # elif (letter== 'e'): # print("am lettera vowela") # if (letter == 'o'): # print('am ...
[ 1, 396, 396, 835, 13, 29937, 396, 13, 29937, 5497, 353, 1881, 4852, 12148, 3896, 263, 5497, 3583, 29876, 1159, 13, 29937, 565, 313, 15670, 1275, 525, 29875, 29374, 13, 29937, 268, 1596, 4852, 314, 5497, 29874, 325, 340, 3100, 1159, 13...
linter.py
Adarma/SublimeLinter-contrib-dxl
1
87650
<reponame>Adarma/SublimeLinter-contrib-dxl # # linter.py # Linter for SublimeLinter, a code checking framework for Sublime Text 3 # # Written by <NAME> # Copyright (c) 2014 <NAME> # # License: MIT # """This module exports the Dxl plugin class.""" from SublimeLinter.lint import Linter, util from os.path import abspath...
[ 1, 529, 276, 1112, 420, 29958, 3253, 22824, 29914, 4035, 28046, 29931, 1639, 29899, 21570, 29899, 8235, 29880, 13, 29937, 13, 29937, 301, 1639, 29889, 2272, 13, 29937, 365, 1639, 363, 3323, 28046, 29931, 1639, 29892, 263, 775, 8454, 6890,...
metameasure/test_metameasure.py
analyticsdept/py-metameasure
0
198545
<gh_stars>0 from metameasure import MetaMeasure import unittest class TestMetaMeasure(unittest.TestCase): def setUp(self): self.m = MetaMeasure(max_size_bytes=10000, reset_when_threshold_exceeded=True) def test_byte_measure(self): d = {} self.assertEqual(self.m.measure(d), 64) def...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 1539, 420, 3745, 1053, 20553, 6816, 3745, 13, 5215, 443, 27958, 13, 13, 1990, 4321, 19346, 6816, 3745, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 822, 731, 3373, 29898,...
tests/io/test_hdf.py
lepy/sdata
1
111542
<filename>tests/io/test_hdf.py import sys import os import pandas as pd modulepath = os.path.dirname(__file__) sys.path.insert(0, os.path.join(modulepath, "..", "..", "..", "src")) import sdata import uuid from sdata.io.hdf import FlatHDFDataStore def test_flathdfstore(): store = FlatHDFDataStore("/tmp/flatstor...
[ 1, 529, 9507, 29958, 21150, 29914, 601, 29914, 1688, 29918, 29882, 2176, 29889, 2272, 13, 5215, 10876, 13, 5215, 2897, 13, 5215, 11701, 408, 10518, 13, 13, 5453, 2084, 353, 2897, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 29897, 13, ...
linearmodels/tests/panel/results/parse_stata_results.py
clarityai-eng/linearmodels
0
65337
<filename>linearmodels/tests/panel/results/parse_stata_results.py from io import StringIO import os from typing import List import pandas as pd from linearmodels.shared.utility import AttrDict filename = "stata-panel-simulated-results.txt" cwd = os.path.split(os.path.abspath(__file__))[0] blocks = {} block: List[st...
[ 1, 529, 9507, 29958, 10660, 9794, 29914, 21150, 29914, 15119, 29914, 9902, 29914, 5510, 29918, 303, 532, 29918, 9902, 29889, 2272, 13, 3166, 12013, 1053, 1714, 5971, 13, 5215, 2897, 13, 3166, 19229, 1053, 2391, 13, 13, 5215, 11701, 408, ...
Controller/controleTelas.py
IuriBritoDev/TKINO
0
34715
from View import telaRelatorio, telaNovoProjeto, telaAbrirProjeto, telaCadastro, telaConfigura, telaConexao, telaEditarControle, telaPopUp from View.Painel import painelSensores, painelControladores, painelConexao from View.Conexao import telaConAnalogAnalog, telaConAnalogDigit, telaConDigitAnalog, telaConDigitDigit ...
[ 1, 515, 4533, 1053, 260, 3100, 9662, 21392, 29892, 260, 3100, 29940, 6962, 1184, 4026, 29877, 29892, 260, 3100, 4920, 12416, 1184, 4026, 29877, 29892, 260, 3100, 29907, 328, 23364, 29892, 260, 3100, 3991, 2002, 29892, 260, 3100, 29907, 65...
exercises/part2/common-architectures/attention_setup.py
jacobdanovitch/allennlp-guide
0
101328
import torch from allennlp.modules.attention import ( DotProductAttention, BilinearAttention, LinearAttention, ) from allennlp.modules.matrix_attention import ( DotProductMatrixAttention, BilinearMatrixAttention, LinearMatrixAttention, ) from allennlp.nn import Activation
[ 1, 1053, 4842, 305, 13, 3166, 599, 2108, 22833, 29889, 7576, 29889, 1131, 2509, 1053, 313, 13, 1678, 360, 327, 7566, 4165, 2509, 29892, 13, 1678, 20347, 457, 279, 4165, 2509, 29892, 13, 1678, 22985, 4165, 2509, 29892, 13, 29897, 13, 3...