text
string
size
int64
token_count
int64
# This file was automatically generated by SWIG (http://www.swig.org). # Version 4.0.0 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info as _swig_python_version_info if _swig_python_version_info < (2, 7, 0): raise Runtime...
16,352
5,665
""" Final Project EDA """ import pandas as pd import matplotlib.pyplot as plt from mlxtend.plotting import scatterplotmatrix import numpy as np import seaborn as sns from imblearn.over_sampling import SMOTE from sklearn.utils import resample from mlxtend.plotting import heatmap from sklearn.ensemble import RandomFore...
3,912
1,459
import numpy as np def gauss_points(el_type, n): """Returns the Gaussian weights and locations for *n* point Gaussian integration of a finite element. Refer to xxx for a list of the element types. :param string el_type: String describing the element type :param int n: Number of Gauss points :retu...
3,771
1,439
import requests import time import argparse import sys import os from bs4 import BeautifulSoup from urllib.parse import urlparse def is_url(url): try: result = urlparse(url) return all([result.scheme, result.netloc]) except ValueError: return False def fetch_urls(page): r = requests.get(page) soup =...
1,447
532
from shift_oelint_parser.cls_item import Variable from shift_oelint_adv.cls_rule import Rule from shift_oelint_parser.helper_files import get_scr_components from shift_oelint_parser.parser import INLINE_BLOCK class VarSRCUriOptions(Rule): def __init__(self): super(VarSRCUriOptions, self).__init__(id="oeli...
3,035
885
from github import User as GitHubUser from github.auth import get_token from github.exceptions import AuthValidationError from . import get_user_model class VerbaBackend(object): """ Django authentication backend which authenticates against the GitHub API. """ def authenticate(self, code=None): ...
1,084
297
import time import board import busio import digitalio from adafruit_apds9960.apds9960 import APDS9960 from adafruit_apds9960 import colorutility i2c = busio.I2C(board.SCL, board.SDA) int_pin = digitalio.DigitalInOut(board.A2) apds = APDS9960(i2c) apds.enable_color = True while True: #create some variables to st...
798
305
N, *A = map(int, open(0).read().split()) A.sort() for i in range(N): if i == A[i] - 1: continue print('No') break else: print('Yes')
158
67
from behave import * from hamcrest import assert_that, is_not, greater_than import numpy as np import nibabel as nib import rpy2.robjects as robjects from rpy2.robjects.numpy2ri import numpy2ri from rpy2.robjects.packages import importr robjects.conversion.py2ri = numpy2ri from os import path as op import sys curfile...
1,114
413
import sys sys.path.append('..') from Analyzer.TransitionProperties import ProcessTransitionProperties from tkinter import * from tkinter import messagebox, ttk, filedialog # from tkFileDialog import * import uniaxanalysis.getproperties as getprops from uniaxanalysis.plotdata import DataPlotter from uniaxanalysis.sav...
15,109
4,398
import click import aiohttp import asyncio import re import json from typing import Optional, Tuple, Iterable, Union, List from blspy import G2Element, AugSchemeMPL from chia.cmds.wallet_funcs import get_wallet from chia.rpc.wallet_rpc_client import WalletRpcClient from chia.util.default_root import DEFAULT_ROOT_PATH...
8,028
2,646
# -*- coding: utf-8 -*- # Author: Haoran Chen # Date: 2019-4-28 import tensorflow as tf from tensorflow import placeholder, glorot_normal_initializer, zeros_initializer from tensorflow.nn import dropout import numpy as np n_z = 3584 n_y = 300 MSVD_PATH = None MSRVTT_PATH = None MSVD_GT_PATH = None MSRVTT_GT_PATH = No...
1,997
817
import pandas as pd from cloudmesh import mongo from flask import request from flask_pymongo import PyMongo from sklearn.feature_selection import SelectKBest, chi2 from sklearn.linear_model import LogisticRegression from sklearn.metrics import accuracy_score from .file import upload def fit(body): # Put input file...
1,625
653
""" Explore raw composites based on indices from predicted testing data and showing all the difference OHC levels for OBSERVATIONS Author : Zachary M. Labe Date : 21 September 2021 Version : 2 (mostly for testing) """ ### Import packages import sys import matplotlib.pyplot as plt import numpy as np impor...
18,450
6,258
# Copyright 2016 OSNEXUS Corporation """ 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, softwa...
3,807
1,171
#! /usr/bin/python3 from configparser import ConfigParser, NoSectionError, NoOptionError from electrumpersonalserver.jsonrpc import JsonRpc, JsonRpcError from datetime import datetime import server def search_for_block_height_of_date(datestr, rpc): target_time = datetime.strptime(datestr, "%d/%m/%Y") bestbloc...
2,629
870
from bs4 import BeautifulSoup from flask import url_for from application.utils import generate_token from application.auth.models import TypeOfUser from tests.models import UserFactory def test_confirm_account_rejects_easy_password(app, test_app_client): rdu_user = UserFactory(user_type=TypeOfUser.RDU_USER, ac...
1,082
333
from setuptools import setup, find_packages from os import path from time import time here = path.abspath(path.dirname(__file__)) if path.exists("VERSION.txt"): # this file can be written by CI tools (e.g. Travis) with open("VERSION.txt") as version_file: version = version_file.read().strip().strip("v...
1,205
423
import os import os.path def activate(ipython, venv): """ Shortcut to run execfile() on `venv`/bin/activate_this.py """ venv = os.path.abspath(venv) venv_activate = os.path.join(venv, 'bin', 'activate_this.py') if not os.path.exists(venv_activate): print('Not a virtualenv: {}'.format(...
652
255
import base64 import os import threading from pathlib import Path #from sqlitedict import SqliteDict from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, scoped_session from daqbrokerServer.web.utils import hash_password from daqbrokerServer.storage.server_schema import ServerBase, User, Conn...
4,201
1,375
# Copyright (c) 2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
1,786
572
from django.test import TestCase from django_hosts import reverse from util.test_utils import Get, assert_requesting_paths_succeeds class UrlTests(TestCase): def test_all_get_request_paths_succeed(self): path_predicates = [ Get(reverse('skills_present_list'), public=True), Get(re...
478
146
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
10,757
3,489
from django.contrib import admin # Register your models here. from .models import WorkOrder admin.site.register(WorkOrder)
125
34
class status(Exception): def __init__(self, code=200, response=None): super().__init__("season.core.CLASS.RESPONSE.STATUS") self.code = code self.response = response def get_response(self): return self.response, self.code
262
80
import torch import numpy as np import torch.nn.functional as F from torch.nn.utils.clip_grad import clip_grad_norm_ from mpi_utils.mpi_utils import sync_grads def update_entropy(alpha, log_alpha, target_entropy, log_pi, alpha_optim, cfg): if cfg.automatic_entropy_tuning: alpha_loss = -(log_alpha * (log_p...
6,030
2,122
from collections import defaultdict, OrderedDict from itertools import islice import copy, os, pickle, warnings import esda import numpy from .analysis import GlobalAutoK from . import util from libpysal import cg, examples, weights from libpysal.common import requires try: from libpysal import open except Impor...
125,107
34,730
from mlflow.tracking.default_experiment.abstract_context import DefaultExperimentProvider class PluginDefaultExperimentProvider(DefaultExperimentProvider): """DefaultExperimentProvider provided through plugin system""" def in_context(self): return False def get_experiment_id(self): retur...
340
90
# -*- coding: utf-8 -*- """ plot acc loss @author: atpandey """ #%% import matplotlib.pyplot as plt #%% ff='./to_laptop/trg_file.txt' with open(ff,'r') as trgf: listidx=[] listloss=[] listacc=[] ctr=0 for line in trgf: if(ctr>0): ll=line.split(',') listidx.append...
1,097
477
##--------------------------------Main file------------------------------------ ## ## Copyright (C) 2020 by Belinda Brown Ramírez (belindabrownr04@gmail.com) ## June, 2020 ## timna.brown@ucr.ac.cr ##----------------------------------------------------------------------------- # Variables aleatorias mú...
8,611
3,249
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
7,527
2,541
#!/usr/bin/env python3 def calculate(): ans = sum(1 for i in range(1, 10000000) if get_terminal(i) == 89) return str(ans) TERMINALS = (1, 89) def get_terminal(n): while n not in TERMINALS: n = square_digit_sum(n) return n def square_digit_sum(n): result = 0 ...
523
223
from PyQt5.QtCore import * class ConstrainedOpt(QThread): signal_update_voxels = pyqtSignal(str) def __init__(self, model,index): QThread.__init__(self) self.model = model['model'] # self.model = model self.name = model['name'] self.index = index def run(self): # ...
467
156
# -*- coding:UTF-8 -*- import pandas as pd from minepy import MINE import seaborn as sns import matplotlib.pyplot as plt from sklearn.ensemble import ExtraTreesClassifier import xgboost as xgb import operator from sklearn.utils import shuffle from Common.ModelCommon import ModelCV from sklearn import svm import numpy a...
7,813
2,957
def gen_doc_html(version, api_list): doc_html = f''' <!DOCTYPE html> <html> <head><meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style type="text/css"> body{{margin:40px auto; max-width:650px; line-height:1.6; font...
1,537
460
import xml.etree.ElementTree as ET import pytest from .helpers import utils @pytest.fixture(scope="session") def playready_pssh_cpd_response(spekev2_url): test_request_data = utils.read_xml_file_contents("test_case_1_p_v_1_a_1", utils.PRESETS_PLAYREADY) response = utils.speke_v2_request(spekev2_url, test_requ...
11,166
3,805
from enum import Enum class Power(Enum): OFF = 0 ON = 1 def map_to_state(data: int): return Power(data) class PowerCommands(object): _command = "ka" def __init__(self, send_command): self._send_command = send_command async def get_state(self): return map_to_state(await se...
606
208
# -*- coding: utf-8 -*- """ Perform Bluetooth LE Scan. Based on https://github.com/hbldh/bleak/blob/master/bleak/backends/dotnet/discovery.py by Created by hbldh <henrik.blidh@nedomkull.com> """ import logging logger = logging.getLogger('bleak_scanner') import asyncio import queue from bleak.backends.device import ...
3,661
1,104
import tkinter as tk from PIL import Image, ImageTk import numpy as np import os import time class MyAPP(): def __init__(self): self.window = tk.Tk() self.window.title('Classification Results') self.window.geometry('1000x800') self.window.attributes('-topmost',1) #self.windo...
2,354
794
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
1,568
480
countries = {'Russia' : 'Europe', 'Germany' : 'Europe', 'Australia' : 'Australia'} sqrs = {} sqrs[1] = 1 sqrs[2] = 4 sqrs[10] = 100 print(sqrs) myDict = dict([['key1', 'value1'], ('key2', 'value2')]) print(myDict) phones = {'police' : 102, 'ambulance' : 103, 'firefighters' : 101} print(phones['police']) phones = {'...
1,350
550
""" Runtime: 47 ms, faster than 89.57% of Python3 online submissions for Regular Expression Matching. Memory Usage: 15.2 MB, less than 6.45% of Python3 online submissions for Regular Expression Matching. """ from typing import List from typing import Optional class Solution: cache = {} def isMatch(self, s: s...
1,203
394
#Desafio019 ( aplicação randomica para determinar que aluno vai no quadro. import random al01 = str('joao'),('maria'),('pédro'),('paula') print(random.choice(al01))
166
64
#!/usr/bin/python from ansible.module_utils.basic import * from jdll import API ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'version': '1.0'} DOCUMENTATION = ''' --- module: book author: "Yanis Guenane (@Spredzy)" version_added: "2.3" short_descript...
3,807
1,062
from menu_design import * from PySide6.QtWidgets import QApplication, QMainWindow from PySide6.QtCore import Qt, QEasingCurve # Local files from reologicalOne.reological import RModel from reologicalTwo.reologicalDB import RModelDB from density.density import Density import sys # class for menu class MiApp(QMainWi...
2,679
836
#!/usr/bin/env python # -*- coding:utf-8 -*- import os import sys reload(sys) sys.setdefaultencoding('utf-8') import ExcelUtil from jinja2 import Template import re def get_table_list(): column_headers = ExcelUtil.generate_columns('A', 'F') data_grid = ExcelUtil.read_excel_with_head(u"财务账务表.xlsx", u"表", col...
360
137
from keras.preprocessing import image import keras.applications.resnet50 as resnet50 import numpy as np app = None def initialize_dog_detector(the_app): global app app = the_app app.config['RESNET_50_MODEL'] = resnet50.ResNet50(weights='imagenet') def path_to_tensor(img_path): # loads RGB image as ...
1,024
385
import re from camp_real_engine.abstract.abc_subst_realizer import ABC_subst_realizer from camp_real_engine.model.realization import RegExpFileSubstNode from camp_real_engine.dao.daos import FileContentCommiter from camp_real_engine.abstract.abc_real_data_model import ABCSubstitutionNode class RegExp(ABC_subst_real...
1,124
374
#!/usr/bin/env python2 ''' Created on Sep 21, 2016 @author: David Zwicker <dzwicker@seas.harvard.edu> ''' from __future__ import division import argparse import sys import os # add the root of the video-analysis project to the path script_path = os.path.split(os.path.realpath(__file__))[0] package_path = os.path.ab...
2,131
623
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
25,729
6,356
from django.urls import path from rest_framework import viewsets from rest_framework import routers from . import views from django.urls import include from rest_framework.routers import DefaultRouter router=DefaultRouter() router.register('hello-viewset',views.HelloViewSet,basename='hello-viewset') router.register('p...
563
160
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI class DistributedPlantBaseAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPlantBaseAI')
257
66
import os print(os.curdir)
27
12
from setuptools import setup from pathlib import Path from typing import Dict HERE = Path(__file__).parent version: Dict[str, str] = {} version_file = HERE / "src" / "thermostate" / "_version.py" exec(version_file.read_text(), version) setup(version=version["__version__"], package_dir={"": "src"})
302
101
''' _ _._ _..._ .-', _.._(`)) '-. ` ' /-._.-' ',/ ) \ '. / _ _ | \ | a a / | \ .-. ; '-('' ).-' ,' ; '-; | .' \ \ / | 7 .__ _...
78,627
26,405
# (c) 2018, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. # from __future__ import (absolute_import, division, p...
2,462
700
from Redy.Opt import feature, constexpr import timeit class Closure(tuple): def __call__(self, a): c, f = self return f(c, a) def f1(x): def g(y): return x + y return g def fc(c, y): return c + y @feature(constexpr) def f2(x): return constexpr[Closure]((x, constexpr[...
748
384
def f(x): '''Does nothing. :type x: a.C ''' pass
66
29
# this should accept a command as a string, and raturn a string detailing the issue # if <command> is not a valid vanilla minecraft command. None otherwise. def check(command): return None
195
52
print("One") print("Two") print("Three")
44
19
"""AI is creating summary for """ from frontend import main_window from PyQt5 import QtWidgets from frontend import input_system from PyQt5.QtWidgets import QInputDialog, qApp from qt_material import apply_stylesheet style_sheets = ['dark_amber.xml', 'dark_blue.xml', 'dark_cyan.xml', ...
4,220
1,299
import mss import numpy as np from PIL import Image from config import BOARD_HEIGHT, BOARD_WIDTH CELL_SIZE = 22 BOARD_X = 14 BOARD_Y = 111 COLOR_CODES = { (0, 0, 255): 1, (0, 123, 0): 2, (255, 0, 0): 3, (0, 0, 123): 4, (123, 0, 0): 5, (0, 123, 123): 6, (0, 0, 0): 7, (123, 123, 123): 8, (189, 189, 189): 0 #uno...
1,525
778
import pytest from stack_and_queue_brackets.stack_and_queue_brackets import validate_brackets def test_a_valid(): actual = validate_brackets("[text]") expected = True assert actual == expected def test_another_valid(): actual = validate_brackets("(1)[2](3)") expected = True assert actual == ...
963
297
""" from https://github.com/keithito/tacotron """ _pad = '_' #_punctuation = '!\'(),.:;? ' _punctuation = '!",.:;? ' _special = '-' #_letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' _letters = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя" symbols = [_pad] + list(_special...
360
193
"""Hello from the abyss."""
28
10
# The MIT License (MIT) # # Copyright (c) 2015 by Teradata # # 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, modif...
5,719
1,699
import sys input = sys.stdin.readline w, h = map(int, input().split()) if w / h == 4 / 3: ans = '4:3' else: ans = '16:9' print(ans)
143
69
import setuptools long_description = "" with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( author='Josiah Bradley', author_email='JosiahBradley@gmail.com', name="mod2win", url="https://github.com/JosiahBradley/mod2win", version="0.0.1", entry_points={ ...
1,029
342
# encoding: utf-8 # module Autodesk.Revit.UI.Plumbing calls itself Plumbing # from RevitAPIUI,Version=17.0.0.0,Culture=neutral,PublicKeyToken=null # by generator 1.145 # no doc # no imports # no functions # classes class IPipeFittingAndAccessoryPressureDropUIServer(IExternalServer): """ Interface for exte...
4,914
1,644
from django.apps import AppConfig from django.db.models.signals import post_migrate from django.utils.translation import gettext_lazy as _ class SitesConfig(AppConfig): name = 'src.base' verbose_name = _("Modulo de Frontend")
240
75
from sqlalchemy import MetaData, Table, Index, Column, Integer meta = MetaData() def upgrade(migrate_engine): meta = MetaData(bind=migrate_engine) upload = Table("upload", meta, autoload=True) uploader_id = Column("uploader_id", Integer) uploader_id.create(upload) idx_upload_uploader_id = Index...
708
250
#!/usr/bin/env python """ Subrequests to do things like range requests, content negotiation checks, and validation. This is the base class for all subrequests. """ from abc import ABCMeta, abstractmethod from configparser import SectionProxy from typing import List, Tuple, Type, Union, TYPE_CHECKING from redbot.res...
3,380
988
import getopt a = "asdf asdf" option,args = getopt.getopt(a,"","") print(option,type(args))
92
38
"""Additional GitHub specific tools. """
41
12
""" # -------------------------------------------------------------------------------------------------- # Page APIs # -------------------------------------------------------------------------------------------------- """ import os import tempfile import re import json import collections import mimetypes import urllib...
13,674
4,018
from copy import deepcopy import pytest from quartical.data_handling.predict import (parse_sky_models, daskify_sky_model_dict, get_support_tables) import dask.array as da import numpy as np from numpy.testing import assert_array_a...
5,918
1,919
import numpy N,M,P = map(int,input().split()) p_cols1 =numpy.array([input().split() for _ in range(N)],int) p_cols1.shape = (N,P) p_cols2 =numpy.array([input().split() for _ in range(M)],int) p_cols2.shape = (M,P) concatenated = numpy.concatenate((p_cols1, p_cols2), axis = 0) print(concatenated)
300
132
from colorama import Fore, init, Style import requests import random import ctypes import time import os ctypes.windll.kernel32.SetConsoleTitleW('Discord Status Changer') init(convert=True, autoreset=True) SuccessCounter = 0 ErrorCounter = 0 os.system('cls') print(Fore.RED + '\n[' + Fore.WHITE + Style.BR...
4,171
1,491
# GCT634 (2018) HW1 # # Mar-18-2018: initial version # # Juhan Nam # import sys import os import numpy as np import matplotlib.pyplot as plt data_path = './dataset/' mfcc_path = './mfcc/' MFCC_DIM = 20 def mean_mfcc(dataset='train'): f = open(data_path + dataset + '_list.txt','r') if dataset == 'tra...
1,269
537
# Copyright 2021 QuantumBlack Visual Analytics Limited # # 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 # # THE SOFTWARE IS PROVIDED "AS IS",...
6,685
1,847
#!/usr/bin/python # importing libraries import json from copy import deepcopy from decimal import Decimal import time class FixedWidth: def get_config(self, config_file): """ reads the json specification file and returns a dictionary :param config_file: json :retur...
6,941
2,112
#!/usr/bin/env python3 # 52digest.py import re import sys # Write a program that performs an EcoRI digest on the SARS-COV2 genome # The program should have 2 arguments # 1. The genome file # 2. The restriction pattern # The output should be the sizes of the restriction fragments originseen = False seq = '' dige...
855
365
# coding: utf-8 from ..utils import ExtractorError from .common import InfoExtractor class WillowIE(InfoExtractor): _VALID_URL = r'https?://(www\.)?willow\.tv/videos/(?P<id>[0-9a-z-_]+)' _GEO_COUNTRIES = ['US'] _TESTS = [{ 'url': 'http://willow.tv/videos/d5winning-moment-eng-vs-ind-streaming-onli...
2,394
841
""" Entry point defined here """
32
7
import folium from folium.plugins import MarkerCluster import pandas as pd import datetime from pathlib import Path # pd.options.display.max_columns = 50 def main(dir): # Loading Data Set print("Loading dataset") RentalData = pd.read_csv(dir + r'\data\processed\RentalData2015.csv') # Changind the Sta...
4,044
1,288
#! /usr/bin/python import sys """ This script accepts the final annotation file and the lineage marker SNPs file """ """ and infers the lineage and possible sublineage classification of the isolate """ """ it requires a sample ID name (string) and an output file name(string) """ """ Author: Matthew Ezewudo CPTR ReS...
5,470
1,984
from rdr_service import clock, config from rdr_service.code_constants import EHR_CONSENT_QUESTION_CODE, PPI_SYSTEM, RACE_QUESTION_CODE, UNMAPPED from rdr_service.dao.code_dao import CodeDao from rdr_service.dao.database_utils import get_sql_and_params_for_array, replace_isodate from rdr_service.dao.hpo_dao import HPODa...
10,038
3,471
# -*- coding: utf-8 -*- from ...client import get_api_client def get_player_detail_stats(player_id): """玩家常规统计数据 参数player_id,玩家ID, int 返回dict格式 """ if get_player_data_status(player_id)==2: client=get_api_client() uri="/fundata-dota2-free/v2/player/"+str(player_id)+"/detail_stats" return client.api(uri,{})...
701
349
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
2,454
773
''' Created on Jul 19, 2012 @author: Chris ''' class Command(object): def validate(self, game): pass def execute(self, game): pass
166
58
from PyQt5 import QtGui, QtWidgets import seaborn as sns from gui import trimming as tri from gui import boxes as BOX import matplotlib.image as mpimg from math import floor, ceil class TrimDialog(QtWidgets.QDialog, tri.Ui_Dialog): def __init__(self, data=None): super(TrimDialog, self).__init__() ...
8,039
2,835
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings def _defaultdict(_dict, key): if key not in _dict: _dict[key] = {} return _dict[key] def update_logging(log_config): if not isinstance(log_config, dict): raise TypeError('set...
1,178
392
# 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, software # distributed under the Li...
6,697
2,196
import unittest from count_anagram_substrings import count_anagram_substrings tests = ( ( ( 'esleastealaslatet', ('tesla',), ), (3,), ), ( ( 'lrldrrrllddrrlllrddd', ('ldl', 'rld'), ), (1, 3), ), ( ...
1,421
587
""" System Identification (SI) https://arxiv.org/abs/1702.02453 Examples of two types: 1. Off-line SI: in sim2real_policies.sys_id.common.utils 2. On-line SI """ from sim2real_policies.sys_id.common.operations import * from sim2real_policies.sys_id.common.utils import * from sim2real_policies.utils.rl_utils import lo...
9,387
2,941
import picamera from time import sleep IMG_WIDTH = 800 IMG_HEIGHT = 600 IMAGE_DIR = "/home/pi/Desktop/" IMG = "snap.jpg" def vid(): camera = picamera.PiCamera() camera.vflip = True camera.hflip = True camera.brightness = 60 #camera.resolution = (IMG_WIDTH, IMG_HEIGHT) camera.start_prev...
2,099
682
#!/usr/bin/env python # Copyright 2017 ARC Centre of Excellence for Climate Systems Science # author: Scott Wales <scott.wales@unimelb.edu.au> # # 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...
4,720
1,523
# Mikoo - UserBot # Copyright (c) 2022 Mikoo-Userbot # Credits: @divarvian || https://github.com/divarvian # # This file is a part of < https://github.com/divarvian/Mikoo-Userbot/ > # t.me/MikooUserbot & t.me/MikooUserbot from pytgcalls.types.input_stream import AudioPiped, AudioVideoPiped from pytgcalls.types.input_...
1,823
665
""" Copyright 2021 Novartis Institutes for BioMedical Research Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law...
5,614
1,977
# coding: utf-8 """ NetBox API API to access NetBox # noqa: E501 OpenAPI spec version: 2.8 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import netbox_client from netbox_client.models.vlan_group import VLANGroup ...
805
283