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
magenta/models/onsets_frames_transcription/infer.py
zhangxu999/magenta
17
69732
# Copyright 2020 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 450, 3561, 6381, 13189, 943, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, ...
templatizator/domain/container.py
jhonasn/templatizator
0
101566
'''Container module that instantiate classes to accomplish IoC role''' from templatizator.domain.repository import ConfigurationRepository, \ VariableRepository, TemplateRepository, TemplateFileRepository, \ ConfigurableRepository, ConfigurableFileRepository from templatizator.domain.service import ProjectS...
[ 1, 14550, 7895, 3883, 393, 25112, 4413, 304, 12709, 22244, 29907, 6297, 12008, 30004, 13, 3166, 1350, 572, 271, 466, 1061, 29889, 7247, 29889, 19033, 1053, 20999, 11481, 29892, 320, 30004, 13, 1678, 28736, 11481, 29892, 25663, 11481, 29892,...
azure-mgmt-network/azure/mgmt/network/v2018_10_01/models/next_hop_result_py3.py
JonathanGailliez/azure-sdk-for-python
1
1609855
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 29899, 13, 29937, 14187, 1266, 313, 29883, 29897, 7783, 15025, 29889, 2178, 10462, 21676, 29889, 13, 29937, 10413, 21144, 1090, 278, 341, 1806, 19245, ...
mhandle_content.py
zyhibook/igotolibrary
171
66325
#!/usr/bin/python # -*- coding: UTF-8 -*- # @filename:mhandle_content.py # @author: wheee/qmppz # @time:20190709 # @description: handle msg, python3 import configparser import time import random import json import os import re import requests import sys # sys.path.append("../..") # import igotolibrary.mhandle_conten...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 18351, 29899, 29947, 448, 29930, 29899, 13, 29937, 732, 9507, 29901, 29885, 8411, 29918, 3051, 29889, 2272, 13, 29937, 732, 8921, 29901, 21266, 3905, 2991...
vespa/simulation/auto_gui/calculate_add_sub.py
vespa-mrs/vespa
0
143845
# -*- coding: UTF-8 -*- # # generated by wxGlade 0.9.3 on Wed Sep 11 13:49:50 2019 # import wx # begin wxGlade: dependencies # end wxGlade # begin wxGlade: extracode # end wxGlade class MyDialog(wx.Dialog): def __init__(self, *args, **kwds): # begin wxGlade: MyDialog.__init__ kwds["style"] = kw...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 18351, 29899, 29947, 448, 29930, 29899, 13, 29937, 13, 29937, 5759, 491, 26437, 29954, 23373, 29871, 29900, 29889, 29929, 29889, 29941, 373, 15050, 29639, 29871, 29896, 29896, 29871, 29896, 29941, 2990...
tests/py/test_state_chain.py
devmiyax/liberapay.com
1
77662
<filename>tests/py/test_state_chain.py # coding: utf8 from __future__ import absolute_import, division, print_function, unicode_literals from base64 import b64encode import json from pando.exceptions import MalformedBody, UnknownBodyType from pando.http.request import Request from pando.http.response import Response...
[ 1, 529, 9507, 29958, 21150, 29914, 2272, 29914, 1688, 29918, 3859, 29918, 14153, 29889, 2272, 13, 29937, 14137, 29901, 23616, 29947, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 29892, 8542, 29892, 1596, 29918, 2220, 2989...
problems/ic_45_graph_coloring.py
gregdferrell/algo
0
94273
<reponame>gregdferrell/algo # # Problem: Given an undirected graph with maximum degree, find a graph coloring using at most D+1 colors. # def color_graph_first_available(graph, colors): """ Solution: For each graph node, assign to it the first color not in the list of neighbor colors. Complexity: (where n is # nod...
[ 1, 529, 276, 1112, 420, 29958, 7642, 29881, 571, 15044, 29914, 284, 1484, 13, 29937, 13, 29937, 11583, 29901, 11221, 385, 563, 1088, 287, 3983, 411, 7472, 7426, 29892, 1284, 263, 3983, 2927, 292, 773, 472, 1556, 360, 29974, 29896, 11955...
script/testing/reporting/parsers/oltpbench/res_parser.py
weijietong/noisepage
2
83861
import csv import json from reporting.utils import get_value_by_pattern from reporting.constants import LATENCY_ATTRIBUTE_MAPPING def parse_res_file(path): """Read data from file ends with ".res". Args: path (str): The position of the res file. Returns: incremental_metrics (list, json a...
[ 1, 1053, 11799, 13, 5215, 4390, 13, 13, 3166, 23415, 29889, 13239, 1053, 679, 29918, 1767, 29918, 1609, 29918, 11037, 13, 3166, 23415, 29889, 3075, 1934, 1053, 365, 1299, 1430, 29907, 29979, 29918, 1299, 29911, 3960, 29933, 26027, 29918, ...
planbee/tracking/planbee_models/bee_tracking_object.py
Plan-Bee/planbee_yolov5
0
43254
import math from .hive_position import HivePosition from .bee_movement import BeeMovement class BeeTrackingObject: object_id: int start_frame_id: int end_frame_id: int end_age: int position_estimates: [(int, int)] angle: int = -1 # 0° is if the bee flies "to the right on the x-axis". Angle turns clockwise fl...
[ 1, 1053, 5844, 13, 13, 3166, 869, 29882, 573, 29918, 3283, 1053, 379, 573, 8003, 13, 3166, 869, 915, 29872, 29918, 13529, 882, 1053, 1522, 29872, 29924, 586, 882, 13, 13, 13, 1990, 1522, 29872, 17936, 292, 2061, 29901, 13, 12, 3318, ...
calculator/operations/calculation.py
jharilal/calculator_assignment
0
194341
"""This is the calculation class / abstraction class""" class Calculation: """Creates the Calculation parent class for the arithmetic subclasses""" # pylint: disable=bad-option-value, too-few-public-methods def __init__(self, values: tuple): """Constructor Method""" self.values = Calculati...
[ 1, 9995, 4013, 338, 278, 13944, 770, 847, 27086, 428, 770, 15945, 29908, 13, 13, 13, 1990, 20535, 362, 29901, 13, 1678, 9995, 9832, 1078, 278, 20535, 362, 3847, 770, 363, 278, 23342, 1014, 13203, 15945, 29908, 13, 1678, 396, 282, 2904...
Tests/test_hook_manager.py
joshuaboniface/kalliope
1
137430
import unittest import os import mock as mock import inspect import shutil from kalliope.core.Models import Singleton from kalliope.core.ConfigurationManager import SettingLoader from kalliope.core import HookManager from kalliope.core.Models.Settings import Settings class TestInit(unittest.TestCase): def set...
[ 1, 1053, 443, 27958, 13, 5215, 2897, 13, 5215, 11187, 408, 11187, 13, 5215, 16096, 13, 5215, 528, 4422, 13, 13, 3166, 25364, 492, 2300, 29889, 3221, 29889, 23785, 1053, 6106, 11285, 13, 13, 3166, 25364, 492, 2300, 29889, 3221, 29889, ...
app/__init__.py
ecsnavarretemit/cmsc265-image-search-engine-skin
0
89373
<filename>app/__init__.py # __init__.py # # Author(s): # <NAME> <<EMAIL>> # # Licensed under MIT # Version 1.0.0 import os import sys from flask import Flask from flask_caching import Cache # instantiate the application app = Flask(__name__, instance_relative_config=True) # initialize application configuration app...
[ 1, 529, 9507, 29958, 932, 29914, 1649, 2344, 26914, 2272, 13, 29937, 4770, 2344, 26914, 2272, 13, 29937, 13, 29937, 13361, 29898, 29879, 1125, 13, 29937, 259, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 13, 29937, 10413, 21144, ...
isotope/run_tests.py
daixiang0/tools
264
79576
#!/usr/bin/env python3 # Copyright Istio Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 29937, 14187, 1266, 11066, 601, 13189, 943, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, ...
bank_account_app/bank_account/migrations/0007_transaction_status.py
Gogee90/Bank-account
0
154028
# Generated by Django 4.0.3 on 2022-03-22 15:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bank_account', '0006_transaction_recipient_bank_account'), ] operations = [ migrations.AddField( model_name='transaction', ...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29946, 29889, 29900, 29889, 29941, 373, 29871, 29906, 29900, 29906, 29906, 29899, 29900, 29941, 29899, 29906, 29906, 29871, 29896, 29945, 29901, 29906, 29941, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, ...
rfdesigner/__main__.py
fronzbot/python-rfdesigner
1
77933
"""Main CLI entry point for RFDesigner.""" import sys from rfdesigner.cli import RFcli from rfdesigner.options import entry_arguments from rfdesigner.netlist import parse_netlist, IMPLEMENTED_BLOCKS def display_implemented(): """Display implemented variables.""" implemented_string = "Available blocks for netl...
[ 1, 9995, 6330, 24492, 6251, 1298, 363, 390, 29943, 4002, 21216, 1213, 15945, 13, 5215, 10876, 13, 3166, 364, 29888, 13892, 261, 29889, 11303, 1053, 390, 29943, 11303, 13, 3166, 364, 29888, 13892, 261, 29889, 6768, 1053, 6251, 29918, 25699...
source/server/annotation/migrations/0002_auto_20200622_0656.py
shizacat/shanno
1
37648
<reponame>shizacat/shanno # Generated by Django 3.0.7 on 2020-06-22 06:56 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('annotation', '0001_initial'), ] operations = [ migrations.AlterField( ...
[ 1, 529, 276, 1112, 420, 29958, 845, 466, 562, 271, 29914, 845, 7665, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29900, 29889, 29955, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29900, 29953, 29899, 29906, 29906, 29871, 29900,...
src/data_handlers/data_containers.py
Maxim-Mushizky/aws_data_collector
1
129429
from dataclasses import dataclass, field from datetime import datetime from typing import ( List, Optional, Dict ) @dataclass(frozen=True) class Ids: image_id: Optional[str] = field(default_factory=str) instance_id: Optional[str] = field(default_factory=str) reservation_id: Optional[str] = fie...
[ 1, 515, 848, 13203, 1053, 848, 1990, 29892, 1746, 13, 3166, 12865, 1053, 12865, 13, 3166, 19229, 1053, 313, 13, 1678, 2391, 29892, 13, 1678, 28379, 29892, 13, 1678, 360, 919, 13, 29897, 13, 13, 13, 29992, 1272, 1990, 29898, 29888, 307...
kryptobot/ta/pyti_average_true_range.py
eristoddle/Kryptobot
24
137265
from .generic_indicator import GenericIndicator from pyti.average_true_range import average_true_range as atr # params: period # https://github.com/kylejusticemagnuson/pyti/blob/master/pyti/average_true_range.py class PytiAverageTrueRange(GenericIndicator): def __init__(self, market, interval, periods, params=No...
[ 1, 515, 869, 19206, 29918, 513, 20485, 1053, 3251, 293, 28013, 13, 3166, 11451, 2034, 29889, 12483, 482, 29918, 3009, 29918, 3881, 1053, 6588, 29918, 3009, 29918, 3881, 408, 472, 29878, 13, 13, 13, 29937, 8636, 29901, 3785, 13, 29937, 2...
datageneration/dbmake_h264hits.py
utlive/VIDMAP
1
34454
<reponame>utlive/VIDMAP<filename>datageneration/dbmake_h264hits.py import skimage.io import skvideo.io import os import h5py from sklearn.externals import joblib from sklearn.linear_model import LinearRegression from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import f1_score import scipy.misc im...
[ 1, 529, 276, 1112, 420, 29958, 329, 9258, 29914, 13044, 23827, 29966, 9507, 29958, 4130, 351, 759, 362, 29914, 2585, 5675, 29918, 29882, 29906, 29953, 29946, 29882, 1169, 29889, 2272, 13, 5215, 2071, 3027, 29889, 601, 13, 5215, 2071, 9641...
fringes/python_zwoasi/zwoasi/examples/zwoasi_demo.py
drs251/fringes
2
141054
#!/usr/bin/env python import argparse import os import sys import time import zwoasi as asi __author__ = '<NAME>' __version__ = '0.0.22' __license__ = 'MIT' def save_control_values(filename, settings): filename += '.txt' with open(filename, 'w') as f: for k in sorted(settings.keys()): f...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 1852, 5510, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 931, 13, 5215, 503, 827, 6840, 408, 28278, 13, 13, 13, 1649, 8921, 1649, 353, 12801, 5813, 16299, 13, 1649, 3259, 1...
detect.py
tranbamanh229289/Facenet
0
163201
<filename>detect.py from os import listdir from PIL import Image import numpy from numpy import asarray from numpy import savez_compressed from matplotlib import pyplot as plt from tensorflow.keras.models import load_model #detection def extract_face(filename ) : image = Image.open(filename) image...
[ 1, 529, 9507, 29958, 4801, 522, 29889, 2272, 13, 3166, 2897, 1053, 1051, 3972, 30004, 13, 3166, 349, 6227, 1053, 7084, 30004, 13, 5215, 12655, 30004, 13, 3166, 12655, 1053, 408, 2378, 30004, 13, 3166, 12655, 1053, 4078, 29920, 29918, 51...
loadtest/example3.py
elyssonmr/loadtest-TDC-POA2018
2
177676
from random import randint import os from locust import HttpLocust, TaskSet, task MAX_TIME = int(os.environ.get("MAX_TIME", 2000)) print(f"Response time should not be higher than {MAX_TIME} ms") class APITasks(TaskSet): def on_start(self): for i in range(1, 6): book = { "Tit...
[ 1, 515, 4036, 1053, 20088, 524, 13, 5215, 2897, 13, 13, 3166, 1180, 504, 1053, 9056, 3524, 504, 29892, 9330, 2697, 29892, 3414, 13, 13, 13, 12648, 29918, 15307, 353, 938, 29898, 359, 29889, 21813, 29889, 657, 703, 12648, 29918, 15307, ...
RecoLocalCalo/Configuration/python/ecalLocalRecoSequenceCosmics_cff.py
Purva-Chaudhari/cmssw
852
41439
<reponame>Purva-Chaudhari/cmssw import FWCore.ParameterSet.Config as cms # Calo geometry service model # # removed by tommaso # #ECAL conditions # include "CalibCalorimetry/EcalTrivialCondModules/data/EcalTrivialCondRetriever.cfi" # #TPG condition needed by ecalRecHit producer if TT recovery is ON from RecoLocalCalo....
[ 1, 529, 276, 1112, 420, 29958, 29925, 332, 1564, 29899, 1451, 15052, 29882, 1306, 29914, 4912, 893, 29893, 13, 5215, 383, 29956, 9203, 29889, 9329, 2697, 29889, 3991, 408, 274, 1516, 13, 13, 29937, 3037, 29877, 16303, 2669, 1904, 13, 29...
moya/tests/test_expose.py
moyaproject/moya
129
172028
<reponame>moyaproject/moya from __future__ import unicode_literals from __future__ import print_function import unittest import os from moya import db from moya import pilot from moya.wsgi import WSGIApplication from moya.console import Console from moya.context import Context from moya.context.tools import set_dyna...
[ 1, 529, 276, 1112, 420, 29958, 4346, 29891, 481, 307, 622, 29914, 4346, 3761, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 13, 5215, 443, 27958, ...
split_test_train.py
malfonso0/mmdetection_object_detection_demo
0
60868
import random import os files= os.listdir("data/VOC2007/Annotations") files = [os.path.splitext(file)[0] for file in files] random.shuffle(files) train_perc = .8 thres = int(len(files) * train_perc) train=files[:thres] test=files[thres+1:] outfolder = "data/VOC2007/ImageSets/Main" with open(os.path.join(outfolder...
[ 1, 1053, 4036, 13, 5215, 2897, 13, 13, 5325, 29922, 2897, 29889, 1761, 3972, 703, 1272, 29914, 29963, 20166, 29906, 29900, 29900, 29955, 29914, 2744, 1333, 800, 1159, 13, 13, 5325, 353, 518, 359, 29889, 2084, 29889, 23579, 568, 486, 298...
Discord Gamesense/botcommands.py
ATSchell/Discord-Gamesense
1
77788
<reponame>ATSchell/Discord-Gamesense import discord import GameSenseLinker as gsl from discord.ext import commands import time tracker=discord.client() config=gsl.loadConfig() #setup Gamesense using loaded config data @tracker.event async def on_ready(): gsl.setup(config) #main method to check various...
[ 1, 529, 276, 1112, 420, 29958, 1299, 4504, 514, 29914, 4205, 16090, 29899, 29954, 1280, 1947, 13, 5215, 2313, 536, 30004, 13, 5215, 8448, 29903, 1947, 6595, 261, 408, 330, 2536, 30004, 13, 3166, 2313, 536, 29889, 1062, 1053, 8260, 30004...
quarkchain/evm/tests/new_statetest_utils.py
QuarkChain/pyquarkchain
237
46755
<reponame>QuarkChain/pyquarkchain import sys from quarkchain.evm.state import State from quarkchain.evm.common import FakeHeader from quarkchain.evm.utils import ( decode_hex, parse_int_or_hex, sha3, to_string, remove_0x_head, encode_hex, big_endian_to_int, ) from quarkchain.evm.config impo...
[ 1, 529, 276, 1112, 420, 29958, 2182, 935, 14688, 29914, 2272, 339, 935, 14153, 13, 5215, 10876, 13, 13, 3166, 439, 935, 14153, 29889, 5750, 29885, 29889, 3859, 1053, 4306, 13, 3166, 439, 935, 14153, 29889, 5750, 29885, 29889, 9435, 1053...
scripts/mercedes_api_connector_bootstrap.py
eccenca/DataspaceConnector
0
24332
import requests import pprint import json # Suppress ssl verification warning requests.packages.urllib3.disable_warnings() s = requests.Session() s.auth = ("user", "password") s.verify = False host = "localhost" apis = ["https://api.mercedes-benz.com/vehicledata/v2/vehicles", "https://api.mercedes-benz.com/vehicled...
[ 1, 29871, 13, 5215, 7274, 13, 5215, 282, 2158, 13, 5215, 4390, 13, 13, 29937, 9179, 1253, 24250, 1147, 2450, 9177, 13, 24830, 29889, 8318, 29889, 2271, 1982, 29941, 29889, 20472, 29918, 25442, 886, 580, 13, 13, 29879, 353, 7274, 29889, ...
main.py
verdoSee/AnticheatBypassFor10fingers
2
1615969
import cv2 import pytesseract from time import sleep from selenium import webdriver from selenium.webdriver.common.keys import Keys Uemail = "" #Your email of the account you wish to pass the anticheat test Upasswd = "" ##Your password of the account you wish to pass the anticheat test PATH = "C:\Program Files (x86)\...
[ 1, 1053, 13850, 29906, 13, 5215, 282, 3637, 16136, 627, 13, 3166, 931, 1053, 8709, 13, 3166, 18866, 1053, 1856, 9465, 13, 3166, 18866, 29889, 29813, 29889, 9435, 29889, 8149, 1053, 4813, 952, 13, 13, 29965, 5269, 353, 5124, 396, 10858, ...
agro_site/orders/migrations/0001_initial.py
LukoninDmitryPy/agro_site-2
0
7698
<reponame>LukoninDmitryPy/agro_site-2<filename>agro_site/orders/migrations/0001_initial.py # Generated by Django 2.2.16 on 2022-04-12 13:28 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.db.models.expressions import django.utils.timezone class...
[ 1, 529, 276, 1112, 420, 29958, 29931, 2679, 265, 262, 29928, 2415, 719, 19737, 29914, 351, 307, 29918, 2746, 29899, 29906, 29966, 9507, 29958, 351, 307, 29918, 2746, 29914, 20488, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29896, 29918,...
test/pandas/1_select.py
wull566/tensorflow_demo
2
102283
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ pandas 学习 字典形式的numpy """ from __future__ import print_function import numpy as np import pandas as pd dates = pd.date_range('20130101', periods=6) df = pd.DataFrame(np.arange(24).reshape((6,4)),index=dates, columns=['A','B','C','D']) """ A B C ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 15945, 29908, 13, 15112, 29871, 30415, 231, 188, 163, 13, 13, 30578, 31259, 31305, 30607, 3...
Tests/test_genericmeth.py
aisk/ironpython3
1,872
197027
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. import os import unittest from iptest import IronPythonTestCase, is_cli, run_test, skipUnlessIronPython @skipU...
[ 1, 396, 10413, 21144, 304, 278, 869, 6006, 10606, 1090, 697, 470, 901, 8571, 4110, 29889, 13, 29937, 450, 869, 6006, 10606, 7794, 11259, 445, 934, 304, 366, 1090, 278, 13380, 29871, 29906, 29889, 29900, 19245, 29889, 13, 29937, 2823, 27...
inversor/train/models.py
aasensio/DeepLearning
0
101537
<filename>inversor/train/models.py from keras.layers import Input, Conv1D, BatchNormalization, Dense, LSTM, TimeDistributed, Flatten, Bidirectional from keras.models import Model from keras.regularizers import l2 def zdi(n_lambda, noise, activation='relu', n_filters=64, l2_reg=1e-7): """ Deep residual recurren...
[ 1, 529, 9507, 29958, 262, 874, 272, 29914, 14968, 29914, 9794, 29889, 2272, 13, 3166, 13023, 294, 29889, 29277, 1053, 10567, 29892, 1281, 29894, 29896, 29928, 29892, 350, 905, 19077, 2133, 29892, 360, 1947, 29892, 365, 1254, 29924, 29892, ...
examples/basic_auth.py
hibellm/jira
3
64616
# This script shows how to connect to a JIRA instance with a # username and password over HTTP BASIC authentication. from collections import Counter from jira import JIRA # By default, the client will connect to a JIRA instance started from the Atlassian Plugin SDK. # See # https://developer.atlassian.com/display/DOC...
[ 1, 396, 910, 2471, 3697, 920, 304, 4511, 304, 263, 435, 29902, 4717, 2777, 411, 263, 13, 29937, 8952, 322, 4800, 975, 7331, 350, 3289, 2965, 10760, 29889, 13, 13, 3166, 16250, 1053, 315, 5336, 13, 3166, 432, 3055, 1053, 435, 29902, ...
examples/maml_toy.py
Brikwerk/learn2learn
1,774
77655
#!/usr/bin/env python3 """ This script demonstrates how to use the MAML implementation of L2L. Each task i consists of learning the parameters of a Normal distribution N(mu_i, sigma_i). The parameters mu_i, sigma_i are themselves sampled from a distribution N(mu, sigma). """ import torch as th from torch import nn, ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 15945, 29908, 13, 4013, 2471, 9004, 1078, 920, 304, 671, 278, 14861, 1988, 5314, 310, 365, 29906, 29931, 29889, 13, 13, 9760, 3414, 474, 11624, 310, 6509, 278, 4128, 310, ...
examples/hello.py
ridgek/iscli
0
147985
<gh_stars>0 from iscli.cli import CommandSet, Cli hello = CommandSet() @hello.install('hello world') def cmd_hello_world(cli, args): print 'Hello World!' if __name__ == '__main__': cli = Cli('> ') cli.load(hello) cli.commandloop()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 338, 11303, 29889, 11303, 1053, 10516, 2697, 29892, 315, 492, 13, 13, 13, 12199, 353, 10516, 2697, 580, 13, 13, 13, 29992, 12199, 29889, 6252, 877, 12199, 3186, 1495, 13, 1753, ...
updaters/updater.py
tatsukawa/GAN_arbitrary_viewpoint
0
150270
# -*- coding: utf-8 -*- # !/usr/bin/env python from __future__ import print_function import chainer import chainer.functions as F from chainer import Variable import numpy as np import cupy as cp def loss_dcgan_dis(dis_fake, dis_real): L1 = F.mean(F.softplus(-dis_real)) L2 = F.mean(F.softplus(dis_fake)) ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 1738, 29914, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 521, 4008, 13, ...
test/IECore/TypedDataAsObject.py
bradleyhenke/cortex
386
109226
########################################################################## # # Copyright (c) 2007, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribu...
[ 1, 835, 13383, 13383, 13383, 13383, 4136, 2277, 29937, 13, 29937, 13, 29937, 29871, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29900, 29955, 29892, 7084, 10863, 12037, 9266, 29889, 2178, 10462, 21676, 29889, 13, 29937, 13, 29937, ...
lib/datatools/build_evaluate.py
JokerWDL/PyAnomaly
1
181554
from lib.datatools.evaluate.eval_function import eval_functions class EvaluateAPI(object): def __init__(self, cfg, logger): self.cfg = cfg self.logger = logger def __call__(self, eval_function_type): assert eval_function_type in eval_functions, f'there is no type of evaluat...
[ 1, 515, 4303, 29889, 4130, 1219, 3775, 29889, 24219, 403, 29889, 14513, 29918, 2220, 1053, 19745, 29918, 12171, 30004, 13, 30004, 13, 1990, 382, 4387, 403, 8787, 29898, 3318, 1125, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 274...
spInDP/SensorDataProvider.py
henkmollema/spInDP
0
133917
import math import threading import time import smbus import Adafruit_ADS1x15 class SensorDataProvider(object): """Provides data from sensors attached to the spider.""" _bus = None _adc = None # Choose a gain of 1 for reading voltages from 0 to 4.09V. # Or pick a different gain to change the ra...
[ 1, 1053, 5844, 13, 5215, 3244, 292, 13, 5215, 931, 13, 13, 5215, 1560, 8262, 13, 5215, 23255, 29888, 9216, 29918, 3035, 29903, 29896, 29916, 29896, 29945, 13, 13, 13, 1990, 317, 6073, 1469, 6980, 29898, 3318, 1125, 13, 1678, 9995, 118...
src/falconpy/quick_scan.py
CrowdStrike/falconpy
111
22906
"""Falcon Quick Scan API Interface Class _______ __ _______ __ __ __ | _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----. |. 1___| _| _ | | | | _ | 1___| _| _| | <| -__| |. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____| |: 1 | ...
[ 1, 9995, 29943, 284, 535, 26141, 2522, 273, 3450, 25796, 4134, 13, 13, 903, 7652, 1649, 462, 4706, 4770, 903, 7652, 1649, 4770, 4706, 4770, 4770, 13, 29989, 259, 903, 259, 869, 807, 29889, 23648, 7703, 7703, 7703, 7703, 29989, 29871, ...
backend/backend/algorithms/trend_follow.py
vbyravarasu/alpharithmic-trading
22
1607598
# Zipline API from zipline.api import attach_pipeline, pipeline_output, schedule_function, get_open_orders, order_target_percent from zipline.pipeline import Pipeline from zipline.utils.events import date_rules, time_rules from zipline.pipeline.factors import AverageDollarVolume from zipline import run_algorithm # Dat...
[ 1, 396, 796, 29875, 572, 457, 3450, 13, 3166, 503, 29875, 572, 457, 29889, 2754, 1053, 10641, 29918, 13096, 5570, 29892, 16439, 29918, 4905, 29892, 20410, 29918, 2220, 29892, 679, 29918, 3150, 29918, 20488, 29892, 1797, 29918, 5182, 29918, ...
paper/F3/D_fixed_points.py
FedeClaudi/manyfolds
3
36632
<reponame>FedeClaudi/manyfolds<filename>paper/F3/D_fixed_points.py import sys import numpy as np sys.path.append("./") from vedo import screenshot from vedo.shapes import Tube from myterial import salmon from manifold import embeddings, Plane from manifold.visualize import Visualizer from manifold import visualize f...
[ 1, 529, 276, 1112, 420, 29958, 29943, 2742, 20216, 4749, 29914, 13011, 29888, 3361, 29966, 9507, 29958, 19773, 29914, 29943, 29941, 29914, 29928, 29918, 20227, 29918, 9748, 29889, 2272, 13, 5215, 10876, 13, 5215, 12655, 408, 7442, 13, 13, ...
database/models.py
SebastjanLeskovar/thundergames
0
60535
<reponame>SebastjanLeskovar/thundergames from django.db import models from django.urls import reverse class TimeStampedModel(models.Model): """An abstract base class model that provides self-updating 'created' and 'modified' fields. """ created = models.DateTimeField(auto_now_add=True) modified = model...
[ 1, 529, 276, 1112, 420, 29958, 29903, 774, 579, 8931, 29931, 8488, 586, 279, 29914, 386, 5062, 29887, 1280, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9557, 29889, 26045, 1053, 11837, 13, 13, 1990, 5974, 855, 1160, 287, 3195, ...
chibi_django/snippet/url.py
dem4ply/chibi_django
0
111943
<reponame>dem4ply/chibi_django<gh_stars>0 def show_urls( urllist, depth=0 ): for entry in urllist: if ( hasattr( entry, 'namespace' ) ): print( "\t" * depth, entry.pattern.regex.pattern, "[%s]" % entry.namespace ) else: print( "\t" * depth, entry.pattern.re...
[ 1, 529, 276, 1112, 420, 29958, 2310, 29946, 17632, 29914, 305, 747, 29875, 29918, 14095, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 1753, 1510, 29918, 26045, 29898, 5065, 645, 391, 29892, 10809, 29922, 29900, 29871, 1125, 13, 1678, ...
betterthanbackprop/feedbackLearners/learningViz/OptimTrajViz.py
conradliste/SmarterThanBackProp
0
30942
import os import torch import numpy as np import torch.nn as nn import matplotlib.pyplot as plt def get_param_matrix(model_prefix, model_dir): """ Grabs the parameters of a saved model and returns them as a matrix """ # Load and combine the parameters param_matrix = [] for file in os.listdir(...
[ 1, 1053, 2897, 13, 5215, 4842, 305, 13, 5215, 12655, 408, 7442, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 1753, 679, 29918, 3207, 29918, 5344, 29898, 4299, 29918, 13506, ...
agenda/core/views.py
EderReisS/Django-DIO
0
126585
from django.shortcuts import render from core.models import Evento # Create your views here. def lista_eventos(request): evento = Evento.objects.all() dados = {'evento' : evento} return render(request,'agenda.html', dados)
[ 1, 515, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 13, 3166, 7136, 29889, 9794, 1053, 6864, 29877, 13, 13, 29937, 6204, 596, 8386, 1244, 29889, 13, 13, 1753, 15023, 29918, 3696, 359, 29898, 3827, 1125, 13, 1678, 1741, 29877, 353, 6864...
checkerapp/apps.py
sahilr05/sitechecker
2
105815
<reponame>sahilr05/sitechecker<filename>checkerapp/apps.py from django.apps import AppConfig class CheckerappConfig(AppConfig): name = "checkerapp"
[ 1, 529, 276, 1112, 420, 29958, 29879, 801, 309, 29878, 29900, 29945, 29914, 2746, 3198, 261, 29966, 9507, 29958, 3198, 261, 932, 29914, 13371, 29889, 2272, 13, 3166, 9557, 29889, 13371, 1053, 2401, 3991, 13, 13, 13, 1990, 5399, 261, 932...
vision/scraper.py
nabsabraham/amplify-hackathon
0
120588
<filename>vision/scraper.py from selenium import webdriver import time import requests import shutil import os user = os.getlogin() driver = webdriver.Chrome() #directory = 'C:\\Users'+'\\'+user+'\Desktop' directory = os.path.join(os.getcwd(), 'data') inp = input("ripe bananas") url = 'https://www.google.com/search?q=...
[ 1, 529, 9507, 29958, 4924, 29914, 1557, 336, 546, 29889, 2272, 13, 3166, 18866, 1053, 1856, 9465, 13, 5215, 931, 13, 5215, 7274, 13, 5215, 528, 4422, 13, 5215, 2897, 13, 13, 1792, 353, 2897, 29889, 657, 7507, 580, 13, 9465, 353, 185...
pipenv/cmdparse.py
sthagen/pipenv
23
17247
<reponame>sthagen/pipenv<filename>pipenv/cmdparse.py import itertools import re import shlex class ScriptEmptyError(ValueError): pass def _quote_if_contains(value, pattern): if next(iter(re.finditer(pattern, value)), None): return '"{0}"'.format(re.sub(r'(\\*)"', r'\1\1\\"', value)) return value...
[ 1, 529, 276, 1112, 420, 29958, 303, 25771, 29914, 13096, 6272, 29966, 9507, 29958, 13096, 6272, 29914, 9006, 5510, 29889, 2272, 13, 5215, 4256, 8504, 13, 5215, 337, 13, 5215, 528, 2506, 13, 13, 13, 1990, 14415, 8915, 2392, 29898, 1917, ...
lib/symbioticpy/symbiotic/symbiotic.py
IMULMUL/symbiotic
0
37758
<reponame>IMULMUL/symbiotic #!/usr/bin/python import os import sys import re from . transform import SymbioticCC from . verifier import SymbioticVerifier from . options import SymbioticOptions from . utils import err, dbg, print_elapsed_time, restart_counting_time from . utils.utils import print_stdout from . utils.p...
[ 1, 529, 276, 1112, 420, 29958, 7833, 13309, 29924, 13309, 29914, 11967, 5365, 13574, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 337, 13, 13, 3166, 869, 4327, 1053, 10667, 5365, 13574...
src/metarl/tf/policies/gaussian_mlp_multitask_policy.py
icml2020submission6857/metarl
2
157308
"""GaussianMLPMultitaskPolicy.""" import akro import numpy as np import tensorflow as tf from metarl.tf.models import GaussianMLPModel from metarl.tf.policies.multitask_policy import StochasticMultitaskPolicy class GaussianMLPMultitaskPolicy(StochasticMultitaskPolicy): """GaussianMLPMultitaskPolicy. Args: ...
[ 1, 9995, 29954, 17019, 1988, 29925, 6857, 277, 1278, 15644, 1213, 15945, 13, 5215, 11208, 307, 13, 5215, 12655, 408, 7442, 13, 5215, 26110, 408, 15886, 13, 13, 3166, 1539, 279, 29880, 29889, 13264, 29889, 9794, 1053, 22477, 1988, 29925, ...
sparse/coherence.py
dizcza/sparse-representation
5
62509
r""" Mutual Coherence and Babel Function are the properties of a matrix, used to estimate the Spark of a matrix, which in turn is used to determine the optimality of the solution to :math:`\text{P}_0` problem. Babel Function gives a tighter bound on the Spark of a matrix. Spark of a matrix :math:`\boldsymbol{A}` is t...
[ 1, 364, 15945, 29908, 13, 29924, 329, 950, 315, 1148, 261, 663, 322, 350, 1107, 6680, 526, 278, 4426, 310, 263, 4636, 29892, 1304, 304, 13, 342, 6490, 278, 20814, 310, 263, 4636, 29892, 607, 297, 2507, 338, 1304, 304, 8161, 278, 13,...
aio_parallel_tools/aio_task_pool/core/mixins/queue_mixin/simpleq_mixin.py
Python-Tools/aio_parallel_tools
0
1615676
<gh_stars>0 """Submit tasks and Send Signals using simple Q.""" import asyncio from typing import Optional, Dict, List, Any, Callable, Union from aio_parallel_tools.aio_task_pool.core.task import Task from aio_parallel_tools.aio_task_pool.core.signal import WorkerCloseSignal class SimpleQMixin: """Submit tasks an...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 16228, 9595, 322, 15076, 9954, 1338, 773, 2560, 660, 1213, 15945, 13, 5215, 408, 948, 3934, 13, 3166, 19229, 1053, 28379, 29892, 360, 919, 29892, 2391, 29892, 3139, 29892, ...
tests/test_utils.py
Kirembu/qpanel
0
39129
import unittest from qpanel.utils import clean_str_to_div_id, underscore_to_camelcase, \ timedelta_from_field_dict from qpanel.convert import convert_time_when_param import time import datetime class UtilsTestClass(unittest.TestCase): def test_clean_str_to_div(self): div = 'ro/.d. i _@l_k/d_@' ...
[ 1, 1053, 443, 27958, 13, 3166, 3855, 15119, 29889, 13239, 1053, 5941, 29918, 710, 29918, 517, 29918, 4563, 29918, 333, 29892, 23400, 3221, 29918, 517, 29918, 11108, 295, 4878, 29892, 320, 13, 1678, 5335, 287, 2554, 29918, 3166, 29918, 267...
wetterdienst/dwd/__init__.py
kmuehlbauer/wetterdienst
1
41794
# Load Pandas DataFrame extension. import wetterdienst.dwd.pandas # noqa:F401
[ 1, 396, 16012, 349, 7086, 3630, 4308, 6081, 29889, 13, 5215, 7990, 357, 26293, 29889, 29881, 9970, 29889, 15112, 29871, 396, 694, 25621, 29901, 29943, 29946, 29900, 29896, 13, 2 ]
server/www/packages/packages-windows/x86/ldap3/version.py
zhoulhb/teleport
640
94889
<filename>server/www/packages/packages-windows/x86/ldap3/version.py # THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY# version file for ldap3 # generated on 2018-08-01 17:55:24.174707 # on system uname_result(system='Windows', node='ELITE10GC', release='10', version='10.0.17134', machine='AMD64', processor='Intel64...
[ 1, 529, 9507, 29958, 2974, 29914, 1636, 29914, 8318, 29914, 8318, 29899, 10499, 29914, 29916, 29947, 29953, 29914, 430, 481, 29941, 29914, 3259, 29889, 2272, 13, 29937, 3446, 3235, 24080, 8519, 26524, 29949, 29899, 24647, 1001, 3040, 29928, ...
ML/linear-regression/dependent.py
PepSalehi/algorithms
0
118713
#!/usr/bin/env python # 3rd party modules from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_absolute_error import numpy as np # config n = 10**6 feature_dim = 3 # create data x = np.random.rand(n * feature_dim).reshape(n, feature_dim) y_true = np.random.rand(n) # x[:, 1] = x[:, 0] pr...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 29937, 29871, 29941, 5499, 6263, 10585, 13, 3166, 2071, 19668, 29889, 10660, 29918, 4299, 1053, 22985, 4597, 23881, 13, 3166, 2071, 19668, 29889, 2527, 10817, 1053, 2099, 29918, 23552,...
Week 1 - Not so-simple Hello World/AhmadHelloWorld.py
Jasleenk47/BeginnerRoom-2020
5
42022
print("Starter") print("Ahmad") print("Hello World") print("Not so Simple")
[ 1, 1596, 703, 855, 4254, 1159, 30004, 13, 2158, 703, 29909, 7184, 328, 1159, 30004, 13, 2158, 703, 10994, 2787, 1159, 30004, 13, 2158, 703, 3664, 577, 12545, 1159, 2 ]
src/wee/urls.py
dipkakwani/wee_app
2
36004
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf.urls.static import static from userModule.views import home from userModule.views import userSettings from userModule.views import logout from groupModule.views import createGroup from groupModule.views import group fr...
[ 1, 515, 9557, 29889, 5527, 29889, 26045, 1053, 15038, 29892, 3160, 29892, 3142, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 3166, 9557, 29889, 5527, 29889, 26045, 29889, 7959, 1053, 2294, 13, 3166, 1404, 7355, 29889, 7406, 1053, 3271, 1...
toy_example/data_import.py
hericonejito/health_recommendations
0
176831
<gh_stars>0 import pandas as pd import datetime as dt class DataImport: def __init__(self): self.user_ses_df = None def import_decagon_data(self,data_path,adjust_pk_names=False,custom_user = 'U', order_by_time=True, pk_item = 'pk_article',custom_session = 'S',custom_article = 'A',seperator='\...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 11701, 408, 10518, 30004, 13, 5215, 12865, 408, 11636, 30004, 13, 30004, 13, 1990, 3630, 17518, 29901, 30004, 13, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 30004, 13, 4...
festival/management/commands/export_artists.py
mykonosbiennale/mykonosbiennale.github.io
0
85845
<filename>festival/management/commands/export_artists.py # -*- coding: utf-8 -*- # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 import time, traceback import collections import re import os import sys import csv import pprint, json import optparse from django.core.files.base import ContentFile from nameparser im...
[ 1, 529, 9507, 29958, 29888, 6074, 29914, 21895, 29914, 26381, 29914, 15843, 29918, 442, 2879, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 325, 326, 29901, 4434, 9847, 29922, 29...
htdfsdk/web3/_utils/threads.py
youngqqcn/htdfsdk
2
193473
""" A minimal implementation of the various gevent APIs used within this codebase. """ import threading import time from types import ( TracebackType, ) from typing import ( Any, Callable, Generic, Type, ) from htdfsdk.web3._utils.compat import ( Literal, ) from htdfsdk.web3.types import ( ...
[ 1, 9995, 13, 29909, 13114, 5314, 310, 278, 5164, 1737, 794, 23649, 1304, 2629, 445, 775, 3188, 29889, 13, 15945, 29908, 13, 5215, 3244, 292, 13, 5215, 931, 13, 3166, 4072, 1053, 313, 13, 1678, 29243, 1542, 29892, 13, 29897, 13, 3166, ...
qalqulus/test.py
FlyOrBoom/QuintessentialQuackbotsWithQuestionableQueryingQualifications
0
128861
<filename>qalqulus/test.py import argparse, cv2 # image recognition stuff # load the input image and convert it to grayscale image = cv2.cvtColor(cv2.imread('resources/leithold-11.jpg'), cv2.COLOR_BGR2GRAY) template = cv2.cvtColor(cv2.imread('resources/leithold-n-8.png'), cv2.COLOR_BGR2GRAY) img = image.copy() metho...
[ 1, 529, 9507, 29958, 29939, 284, 339, 12160, 29914, 1688, 29889, 2272, 13, 13, 5215, 1852, 5510, 29892, 13850, 29906, 396, 1967, 19679, 6433, 13, 13, 29937, 2254, 278, 1881, 1967, 322, 3588, 372, 304, 16749, 7052, 13, 3027, 353, 13850, ...
scripts/prediction_and_evaluting.py
pradeepsuyal/classifying_disease_with-chest_xray
0
179637
# EVALUATING TRAINED DEEP LEARNING MODEL # In[ ]: history.history.keys() # In[ ]: plt.plot(history.history['accuracy']) plt.plot(history.history['loss']) plt.title('Model Loss and Accuracy Progress During Training') plt.xlabel('Epoch') plt.ylabel('Training Accuracy and Loss') plt.legend(['Train...
[ 1, 396, 382, 8932, 29965, 1299, 4214, 323, 4717, 1177, 3352, 5012, 15488, 11060, 25614, 16999, 2287, 29931, 30004, 13, 30004, 13, 29937, 512, 29961, 4514, 29901, 30004, 13, 30004, 13, 30004, 13, 18434, 29889, 18434, 29889, 8149, 26471, 13...
pype/plugins/maya/publish/collect_mayaascii.py
kalisp/pype
0
54595
from maya import cmds import pyblish.api class CollectMayaAscii(pyblish.api.InstancePlugin): """Collect May Ascii Data """ order = pyblish.api.CollectorOrder + 0.2 label = 'Collect Model Data' families = ["mayaAscii"] def process(self, instance): # Extract only current frame (overr...
[ 1, 515, 1122, 29874, 1053, 9920, 29879, 13, 13, 5215, 11451, 29890, 1674, 29889, 2754, 13, 13, 13, 1990, 24930, 29924, 9010, 2887, 18869, 29898, 2272, 29890, 1674, 29889, 2754, 29889, 4998, 16288, 1125, 13, 1678, 9995, 28916, 2610, 1094, ...
Stock_Analysis/pivot_points.py
vhn0912/Finance
441
192956
import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import warnings warnings.filterwarnings("ignore") import yfinance as yf yf.pdr_override() import datetime as dt symbol = 'AMD' market = 'SPY' num_of_years = 1 start = dt.date.today() - dt.timedelta(days=365*num_of_years) end...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 409, 370, 1398, 408, 269, 1983, 13, 5215, 11701, 408, 10518, 13, 5215, 18116, 13, 25442, 886, 29889, 4572, 25442, 886, 703, 17281, 1159, 29871, 13, 5...
scripts/mgear/synoptic/utils.py
marza-animation-planet/mgear_synoptic
72
91401
import traceback import pymel.core as pm import mgear from mgear.vendor.Qt import QtCore from mgear.core.anim_utils import * # ============================================================================= # constants # ============================================================================= SYNOPTIC_WIDGET_...
[ 1, 1053, 9637, 1627, 13, 13, 13, 5215, 282, 962, 295, 29889, 3221, 408, 26354, 13, 13, 5215, 286, 479, 279, 13, 13, 3166, 286, 479, 279, 29889, 19167, 29889, 17303, 1053, 14705, 9203, 13, 13, 3166, 286, 479, 279, 29889, 3221, 29889,...
firebaseClient/gpioTest.py
tabris2015/personCounter
0
99758
<gh_stars>0 from gpiozero import Button from time import sleep ##### pin definitions IN1 = 6 OUT1 = 13 IN2 = 19 OUT2 = 26 def in1(): print("in1!") def out1(): print("out1!") def in2(): print("in2!") def out2(): print("out2!") in1_button = Button(IN1, pull_up=False) out1_button = Button(OUT1, pu...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 3166, 330, 16168, 9171, 1053, 11025, 13, 3166, 931, 1053, 8709, 13, 13, 4136, 29937, 12534, 15848, 13, 13, 1177, 29896, 353, 29871, 29953, 13, 12015, 29896, 353, 29871, 29896, 29941...
mirari/TCS/migrations/0032_auto_20190308_1454.py
gcastellan0s/mirariapp
0
140919
# Generated by Django 2.0.5 on 2019-03-08 20:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('TCS', '0031_auto_20190228_1417'), ] operations = [ migrations.AddField( model_name='orderservice', name='brandName',...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29900, 29889, 29945, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29900, 29941, 29899, 29900, 29947, 29871, 29906, 29900, 29901, 29945, 29946, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, ...
chapter-6/holdings/holdings/clients.py
wallacei/microservices-in-action-copy
115
66568
import logging import requests from tenacity import before_log, retry, stop_after_attempt class MarketDataClient(object): logger = logging.getLogger(__name__) base_url = 'http://market-data:8000' def _make_request(self, url): response = requests.get( f"{self.base_url}/{url}", header...
[ 1, 1053, 12183, 13, 13, 5215, 7274, 13, 3166, 3006, 5946, 1053, 1434, 29918, 1188, 29892, 337, 2202, 29892, 5040, 29918, 7045, 29918, 1131, 3456, 13, 13, 13, 1990, 28794, 1469, 4032, 29898, 3318, 1125, 13, 1678, 17927, 353, 12183, 29889...
sourcecode/Lab02_1/main.py
anhquannguyen21/Knowledge-Based
0
81445
import sys, getopt import knowledgeBase import sentence def addNegativeAlphaToKb(kb, alpha): for s in alpha: kb.append(sentence.Sentence([-s])) def pl_resolution(kb, alpha): # store existed sentences hashes hashSet = set() # store existed sentences base = knowledgeBase.KnowledgeBase([]) # new store new sen...
[ 1, 1053, 10876, 29892, 679, 3670, 13, 13, 5215, 7134, 5160, 13, 5215, 10541, 13, 13, 13, 1753, 788, 29940, 387, 1230, 28630, 1762, 29968, 29890, 29898, 21066, 29892, 15595, 1125, 13, 12, 1454, 269, 297, 15595, 29901, 13, 12, 12, 21066...
palor/tests.py
Kizito-Alberrt/gallery-palor
0
122869
<reponame>Kizito-Alberrt/gallery-palor<filename>palor/tests.py from django.forms.fields import ImageField from django.test import TestCase from .models import Editor, Article,tags # Create your tests here. class imageTestClass(TestCase): def setUp(self): self.gallery= ImageField(first_name = 'James', last...
[ 1, 529, 276, 1112, 420, 29958, 29968, 466, 2049, 29899, 2499, 495, 2273, 29914, 29887, 23365, 29899, 7830, 272, 29966, 9507, 29958, 7830, 272, 29914, 21150, 29889, 2272, 13, 3166, 9557, 29889, 9514, 29889, 9621, 1053, 7084, 3073, 13, 3166...
tests/test_kafka_integration.py
W1ckedS1ck/website-metric-producer
0
69486
import unittest from tests import app_factory from config import integration_mode from datetime import datetime, timezone class MyKafkaConsumerTest(unittest.TestCase): my_kafka_p = None my_kafka_c = None def setUp(self): if integration_mode is False: self.assertTrue(True) ...
[ 1, 1053, 443, 27958, 13, 3166, 6987, 1053, 623, 29918, 14399, 13, 3166, 2295, 1053, 13465, 29918, 8513, 13, 3166, 12865, 1053, 12865, 29892, 29431, 13, 13, 13, 1990, 1619, 29968, 20817, 13696, 4680, 3057, 29898, 348, 27958, 29889, 3057, ...
googledataprocauthenticator/tests/test_dataprocmagic.py
mollypi/dataprocmagic
2
36665
<filename>googledataprocauthenticator/tests/test_dataprocmagic.py # 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 # # https://www.apache.org/licenses/LICENSE-2...
[ 1, 529, 9507, 29958, 1484, 468, 839, 271, 481, 307, 1113, 2806, 4173, 1061, 29914, 21150, 29914, 1688, 29918, 4130, 481, 307, 4912, 351, 293, 29889, 2272, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 5087, 365, 12182, 13, ...
CIM14/ENTSOE/Dynamics/IEC61970/Dynamics/ExcitationSystems/ExcitationSystemsExcST4B.py
MaximeBaudette/PyCIM
58
180601
<reponame>MaximeBaudette/PyCIM # Copyright (C) 2010-2011 <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, ...
[ 1, 529, 276, 1112, 420, 29958, 7976, 603, 29933, 15052, 2353, 29914, 19737, 29907, 7833, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29900, 29899, 29906, 29900, 29896, 29896, 529, 5813, 29958, 13, 29937, 13, 29937...
pyMIDICapSense.py
midilab/pyMIDICapSense
2
26610
<filename>pyMIDICapSense.py import wiringpi2 import rtmidi from defines import * from config import * #import config # config.TIMEOUT def Setup(outPin, inPin, ledPin): # set Send Pin Register wiringpi2.pinMode(outPin, OUTPUT) # set receivePin Register low to make sure pullups are off wiringpi2.pinMode(inPin, O...
[ 1, 529, 9507, 29958, 2272, 29924, 1367, 2965, 481, 29903, 1947, 29889, 2272, 13, 5215, 281, 8491, 1631, 29906, 13, 5215, 364, 29873, 6563, 29875, 13, 13, 3166, 17645, 1053, 334, 13, 13, 13, 3166, 2295, 1053, 334, 13, 29937, 5215, 2295...
openpype/hosts/houdini/vendor/husdoutputprocessors/stagingdir_processor.py
jonclothcat/OpenPype
87
45073
import hou import husdoutputprocessors.base as base import os class StagingDirOutputProcessor(base.OutputProcessorBase): """Output all USD Rop file nodes into the Staging Directory Ignore any folders and paths set in the Configured Layers and USD Rop node, just take the filename and save into a singl...
[ 1, 1053, 298, 283, 13, 5215, 8646, 29881, 4905, 5014, 943, 29889, 3188, 408, 2967, 13, 5215, 2897, 13, 13, 13, 1990, 624, 6751, 9170, 6466, 18689, 29898, 3188, 29889, 6466, 18689, 5160, 1125, 13, 1678, 9995, 6466, 599, 3148, 29928, 39...
ufora/FORA/python/PurePython/FunctionTestCases.py
ufora/ufora
571
1615394
<filename>ufora/FORA/python/PurePython/FunctionTestCases.py # Copyright 2015 Ufora 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/LICENS...
[ 1, 529, 9507, 29958, 1137, 2207, 29914, 22051, 29909, 29914, 4691, 29914, 29925, 545, 11980, 29914, 6678, 3057, 29907, 2129, 29889, 2272, 13, 29937, 259, 14187, 1266, 29871, 29906, 29900, 29896, 29945, 501, 1454, 29874, 9266, 29889, 13, 299...
tests/test_cmake_parser.py
RichardRohac/bdemeta
0
134003
# tests.test_cmake_parser from io import StringIO from unittest import TestCase from tests.cmake_parser import lex, find_command, parse_if, parse def mk_cmd(command, *args): return (command, list(args)) def call_parse_if(predicate, *cmds): return parse_if(predicate, iter(cmds)) def call_parse(*cmds):...
[ 1, 396, 6987, 29889, 1688, 29918, 29883, 5675, 29918, 16680, 13, 13, 3166, 12013, 539, 1053, 1714, 5971, 13, 3166, 443, 27958, 1053, 4321, 8259, 13, 13, 3166, 6987, 29889, 29883, 5675, 29918, 16680, 1053, 19566, 29892, 1284, 29918, 6519, ...
Programmers/Lv.1/Lotto_best_worst.py
kangjunseo/C-
2
69655
def solution(lottos, win_nums): answer = [] zeros=0 for i in lottos: if(i==0) : zeros+=1 correct = list(set(lottos).intersection(set(win_nums))) _dict = {6:1,5:2,4:3,3:4,2:5,1:6,0:6} answer.append(_dict[len(correct)+zeros]) answer.append(_dict[len(correct)]) return answer
[ 1, 822, 1650, 29898, 29880, 1501, 359, 29892, 5401, 29918, 1949, 29879, 1125, 13, 1678, 1234, 353, 5159, 13, 1678, 24786, 29922, 29900, 13, 1678, 363, 474, 297, 301, 1501, 359, 29901, 13, 4706, 565, 29898, 29875, 1360, 29900, 29897, 584...
NoChannelBot/core/models/user.py
tolbiluha/NoChannelBot
7
196654
from typing import Optional from pydantic import BaseModel class UserModel(BaseModel): id: int first_name: str last_name: Optional[str] username: Optional[str] language_code: Optional[str]
[ 1, 515, 19229, 1053, 28379, 13, 13, 3166, 282, 2941, 7716, 1053, 7399, 3195, 13, 13, 13, 1990, 4911, 3195, 29898, 5160, 3195, 1125, 13, 1678, 1178, 29901, 938, 13, 1678, 937, 29918, 978, 29901, 851, 13, 1678, 1833, 29918, 978, 29901, ...
0063.unqiue_paths_II/solution.py
WZMJ/Algorithms
5
163074
from typing import List class Solution: def unique_paths_with_obstacle(self, obstacle_grid: List[List[int]]) -> int: """ 二维数组 关键点在于 obstacle_grid[i][j] = obstacle_grid[i-1][j] + obstacle_grid[i][j-1] 如果遇到障碍1,后续都为0 """ if obstacle_grid[0][0]: # 出发点是障碍 return 0 ...
[ 1, 515, 19229, 1053, 2391, 13, 13, 13, 1990, 24380, 29901, 13, 1678, 822, 5412, 29918, 24772, 29918, 2541, 29918, 711, 303, 6436, 29898, 1311, 29892, 14979, 6436, 29918, 7720, 29901, 2391, 29961, 1293, 29961, 524, 24960, 1599, 938, 29901,...
blog/migrations/0007_articlephotoreport_main.py
gda2048/thefirst
5
69947
# Generated by Django 2.2.3 on 2019-07-24 10:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0006_auto_20190723_1502'), ] operations = [ migrations.AddField( model_name='articlephotoreport', name='main'...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29941, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29900, 29955, 29899, 29906, 29946, 29871, 29896, 29900, 29901, 29896, 29906, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, ...
examples/evaluate_sequence_labelling.py
CLARIN-PL/embeddings
33
61697
import pprint from pathlib import Path from typing import Optional import typer from embeddings.defaults import RESULTS_PATH from embeddings.evaluator.sequence_labeling_evaluator import SequenceLabelingEvaluator from embeddings.pipeline.flair_sequence_labeling import FlairSequenceLabelingPipeline app = typer.Typer()...
[ 1, 1053, 282, 2158, 13, 3166, 2224, 1982, 1053, 10802, 13, 3166, 19229, 1053, 28379, 13, 13, 5215, 7911, 546, 13, 13, 3166, 8297, 29881, 886, 29889, 4381, 29879, 1053, 390, 2890, 8647, 29903, 29918, 10145, 13, 3166, 8297, 29881, 886, ...
src/bot.py
Teazane/NewCthulhuBot
0
1603570
<reponame>Teazane/NewCthulhuBot<filename>src/bot.py import discord, random, time from src.reactions import Reactions class Bot(discord.Client): # Explication du mécanisme asynchrone Python : https://stackabuse.com/python-async-await-tutorial/ async def on_ready(self): """ Log un message qu...
[ 1, 529, 276, 1112, 420, 29958, 7141, 834, 1662, 29914, 4373, 29907, 386, 352, 6905, 29933, 327, 29966, 9507, 29958, 4351, 29914, 7451, 29889, 2272, 13, 5215, 2313, 536, 29892, 4036, 29892, 931, 13, 3166, 4765, 29889, 5638, 1953, 1053, 8...
neko3/pagination/factory/basefactory.py
Natsurii/nicabot-monkee
0
179867
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Nekozilla is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Nekozilla is distributed...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 405, 1416, 2112, 2911, 338, 3889, 7047, 29901, 366, 508, 2654, 391, 2666, 372, 322, 2991...
interface.py
MichaelWilly15/OrganizadorDeProjetos
0
78157
from time import sleep def lin(tam=42): print('-' * tam) def cabecalho(msg): lin() print(msg) lin() def limpa_tela(): from sys import platform from os import system if platform == 'win32': system('cls') else: system('clear') def leiaint(txt): try: ...
[ 1, 515, 931, 1053, 8709, 13, 13, 13, 1753, 6276, 29898, 29873, 314, 29922, 29946, 29906, 1125, 13, 1678, 1596, 877, 29899, 29915, 334, 21308, 29897, 13, 13, 13, 1753, 7776, 687, 284, 1251, 29898, 7645, 1125, 13, 1678, 6276, 580, 13, ...
sample_problems/problems_with_solution21.py
adi01trip01/adi_workspace
0
138034
<gh_stars>0 # Write a Python program to find whether a given number (accept from the user) is even or odd, # prints True if its even and False if its odd. n = int(input("Enter a number: ")) print(n % 2 == 0)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14350, 263, 5132, 1824, 304, 1284, 3692, 263, 2183, 1353, 313, 16044, 515, 278, 1404, 29897, 338, 1584, 470, 7736, 29892, 13, 29937, 14677, 5852, 565, 967, 1584, 322, 7700, 565, ...
resume/api/urls.py
jamedadi/jobnet
3
50780
<reponame>jamedadi/jobnet from django.urls import path, include from rest_framework import routers from resume.api.views import ResumeModelViewSetApi app_name = 'resume' router = routers.SimpleRouter() router.register('', ResumeModelViewSetApi) urlpatterns = [ path('', include(router.urls)), ]
[ 1, 529, 276, 1112, 420, 29958, 29926, 2795, 10129, 29914, 9057, 1212, 13, 3166, 9557, 29889, 26045, 1053, 2224, 29892, 3160, 13, 13, 3166, 1791, 29918, 4468, 1053, 16053, 2153, 13, 13, 3166, 620, 2017, 29889, 2754, 29889, 7406, 1053, 25...
gui/capture.py
mokojm/townshell
34
114011
<gh_stars>10-100 from os import getcwd from kivy.app import App from kivy.factory import Factory from kivy.lang import Builder from kivy.uix.screenmanager import Screen Builder.load_file(r"gui\capture.kv") class CaptureScreen(Screen): def __init__(self, **kwargs): self.util = App.get_running_app().util...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 2897, 1053, 679, 29883, 9970, 13, 13, 3166, 413, 440, 29891, 29889, 932, 1053, 2401, 13, 3166, 413, 440, 29891, 29889, 14399, 1053, 27561, 13, 3...
openmdao.lib/src/openmdao/lib/drivers/cobyladriver.py
mjfwest/OpenMDAO-Framework
69
75752
""" cobyladriver.py - Contains a driver that wraps the cobyla optimizer as used in pyOpt: Minimize a function using the Constrained Optimization BY Linear Approximation (COBYLA) method. COBYLA is gradient-free and can handle inequality constraints. """ from math import isnan from numpy import zeros, array, hstack ...
[ 1, 9995, 13, 29883, 711, 2904, 328, 3511, 29889, 2272, 448, 2866, 2708, 263, 7156, 393, 11463, 567, 278, 274, 18711, 433, 13, 20640, 3950, 408, 1304, 297, 11451, 20624, 29901, 13, 13, 8140, 326, 675, 263, 740, 773, 278, 1281, 4151, ...
main.py
basakstuff/PI_Works
0
173264
<filename>main.py def isPrime(number): if number > 1: for i in range(2, number): if (number % i) == 0: return False else: return True else: return False inputFile = open('test.txt') lines = inputFile.readlines() inputFile.close() pyramid = [] for ...
[ 1, 529, 9507, 29958, 3396, 29889, 2272, 13, 1753, 338, 4040, 603, 29898, 4537, 1125, 13, 1678, 565, 1353, 1405, 29871, 29896, 29901, 13, 4706, 363, 474, 297, 3464, 29898, 29906, 29892, 1353, 1125, 13, 9651, 565, 313, 4537, 1273, 474, ...
ppr-api/tests/unit/api/test_change.py
thorwolpert/ppr
0
173228
# Copyright © 2019 Province of British Columbia # # 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 agr...
[ 1, 396, 14187, 1266, 29871, 30211, 29871, 29906, 29900, 29896, 29929, 17325, 310, 4908, 15411, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13...
swappingFiles.py
anudhatgithub/Functions
0
59100
<gh_stars>0 def changecode(): file1=input("Enter your file name1") file2=input("Enter your file name2") with open(file1,"r") as a: data_a = a.read() with open(file2,"r") as b: data_b = b.read() with open(file1,"w") as a: a.write(data_b) with open(file2,"w") as b...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 1753, 1735, 401, 7295, 13, 268, 13, 1678, 934, 29896, 29922, 2080, 703, 10399, 596, 934, 1024, 29896, 1159, 13, 1678, 934, 29906, 29922, 2080, 703, 10399, 596, 934, 1024, 29906, 1159, ...
plotly/validators/scatter/_mode.py
faezs/plotly.py
2
136891
import _plotly_utils.basevalidators class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): def __init__(self, plotly_name='mode', parent_name='scatter', **kwargs): super(ModeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit...
[ 1, 1053, 903, 5317, 368, 29918, 13239, 29889, 3188, 3084, 4097, 13, 13, 13, 1990, 21864, 24204, 7373, 5317, 368, 29918, 13239, 29889, 3188, 3084, 4097, 29889, 21979, 1761, 24204, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, ...
eden/cli/doctor/test/disk_usage_test.py
jmswen/eden
0
178628
#!/usr/bin/env python3 # # Copyright (c) 2019-present, Facebook, Inc. # 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. An additional grant # of patent rights can be found in the PATENTS file in the same directory. ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29929, 29899, 6338, 29892, 13327, 29892, 9266, 29889, 13, 29937, 2178, 10462, 21676, 29889, 13, 29937, ...
providers/brewerslab.py
allena29/brewerslabng
1
170620
#!/usr/bin/python3 import dataprovider class brewerslab(dataprovider.DataProvider): MODULE_NAME = "brewerslab" DEBUG = True def process_path(self, dry_run, xpath, oper, old_val, new_val): print(xpath) dp = brewerslab() dp.connect()
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 13, 13, 5215, 1418, 481, 307, 5489, 13, 13, 1990, 2078, 17538, 8205, 29898, 4130, 481, 307, 5489, 29889, 1469, 6980, 1125, 13, 13, 1678, 341, 13668, 29965, 1307, 29918, 5813, 353, 376, ...
flaskr/services/file_to_db_service.py
baloo1379/db_aspell
0
147808
<reponame>baloo1379/db_aspell<filename>flaskr/services/file_to_db_service.py import os import re from flaskr.models.file import createFile from flaskr.models.word import createOrUpdateWord class FileToDBService: file_name = None file_content = None word_list = [] def setFileName(self, file_name): ...
[ 1, 529, 276, 1112, 420, 29958, 5521, 3634, 29896, 29941, 29955, 29929, 29914, 2585, 29918, 4692, 514, 29966, 9507, 29958, 1579, 1278, 29878, 29914, 9916, 29914, 1445, 29918, 517, 29918, 2585, 29918, 5509, 29889, 2272, 13, 5215, 2897, 13, ...
pdfreader/types/objects.py
tmcclintock/pdfreader
0
38535
<gh_stars>0 from ..utils import cached_property from ..pillow import PILImageMixin from .native import Stream, Dictionary, Array, Name class StartXRef(object): """ startxref 123 Pseudo object. Can be between indirect objects if any incremental updates. """ def __init__(self, offset): ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 6317, 13239, 1053, 22152, 29918, 6799, 13, 3166, 6317, 29886, 453, 340, 1053, 349, 6227, 2940, 29924, 861, 262, 13, 3166, 869, 11487, 1053, 13763, 29892, 13343, 29892, 4398, 29892, ...