max_stars_repo_path
stringlengths
4
286
max_stars_repo_name
stringlengths
5
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.03M
content_cleaned
stringlengths
6
1.03M
language
stringclasses
111 values
language_score
float64
0.03
1
comments
stringlengths
0
556k
edu_score
float64
0.32
5.03
edu_int_score
int64
0
5
ida_export/lib/shovel/ida/decode.py
RUB-SysSec/VPS
7
6624751
<filename>ida_export/lib/shovel/ida/decode.py<gh_stars>1-10 from idc import NextNotTail, PrevHead, NextHead, GetMnem, isCode, GetFlags, GetOpnd, BADADDR from idaapi import FlowChart, get_func, o_void, is_ret_insn from idautils import CodeRefsFrom, DecodeInstruction from copy import deepcopy from .. import block, ope...
<filename>ida_export/lib/shovel/ida/decode.py<gh_stars>1-10 from idc import NextNotTail, PrevHead, NextHead, GetMnem, isCode, GetFlags, GetOpnd, BADADDR from idaapi import FlowChart, get_func, o_void, is_ret_insn from idautils import CodeRefsFrom, DecodeInstruction from copy import deepcopy from .. import block, ope...
en
0.680721
# DEBUG #print("Decoding instruction: 0x%x" % address) # uses floating point register "st" which has # overlapping index with "rax" and so on # NOTE: for x64 we only consider 64 bit granularity at the moment. # Some instructions like "stosq" do not have string operands # => ignore for now. # DEBUG #print(ida_operand_st...
2.098245
2
filer/admin/imageadmin.py
vstoykov/django-filer
1
6624752
#-*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext as _ from filer import settings as filer_settings from filer.admin.fileadmin import FileAdmin from filer.models import Image class ImageAdminForm(forms.ModelForm): subject_location = forms.CharField( max_length=6...
#-*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext as _ from filer import settings as filer_settings from filer.admin.fileadmin import FileAdmin from filer.models import Image class ImageAdminForm(forms.ModelForm): subject_location = forms.CharField( max_length=6...
en
0.895428
#-*- coding: utf-8 -*- # this is very important. It forces the value to be returned as a # string and always with a "." as seperator. If the conversion # from float to string is done in the template, the locale will # be used and in some cases there would be a "," instead of ".". # javascript would parse that to an int...
1.909762
2
yocto/poky/scripts/lib/wic/3rdparty/pykickstart/version.py
jxtxinbing/ops-build
2
6624753
# # <NAME> <<EMAIL>> # # Copyright 2006, 2007, 2008, 2009, 2010 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will ...
# # <NAME> <<EMAIL>> # # Copyright 2006, 2007, 2008, 2009, 2010 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will ...
en
0.809495
# # <NAME> <<EMAIL>> # # Copyright 2006, 2007, 2008, 2009, 2010 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will ...
1.979695
2
algo.py
VRaviTheja/SDN-policy
0
6624754
#!/usr/bin/python import time import pytricia import python3_reading_file_to_dict import sys import pprint import csv import p_trie import excluding_ip import excluding_port import add_all_rules_after_excluding import ipaddress import copy import os from operator import itemgetter final_device_values = [] se_number ...
#!/usr/bin/python import time import pytricia import python3_reading_file_to_dict import sys import pprint import csv import p_trie import excluding_ip import excluding_port import add_all_rules_after_excluding import ipaddress import copy import os from operator import itemgetter final_device_values = [] se_number ...
en
0.645634
#!/usr/bin/python # Calls the csv_dict_list function, passing the named csv # device_values = sorted(device_values, key=itemgetter('priority')) # pprint.pprint(device_values) # Prints the results nice and pretty like for x in device_values: temp.append(int(x['priority'])) print(temp) # Finding list of all parents # ...
3.202468
3
source code and resource files/open_circuit_window.py
SongyanLiCS/Solar-Panel-Equivalent-Circuit-Parameters-Extractor
0
6624755
<filename>source code and resource files/open_circuit_window.py # Define the window class for approximating the slope di/dv near the open circuit condition # using a graphical approximation method. from short_circuit_window import ShortCircuitWindow import tkinter as tk class OpenCircuitWindow(ShortCircuitWindo...
<filename>source code and resource files/open_circuit_window.py # Define the window class for approximating the slope di/dv near the open circuit condition # using a graphical approximation method. from short_circuit_window import ShortCircuitWindow import tkinter as tk class OpenCircuitWindow(ShortCircuitWindo...
en
0.851181
# Define the window class for approximating the slope di/dv near the open circuit condition # using a graphical approximation method. # Just inherit from the short circuit window class and make appropriate modifications.
3.210062
3
tests/isolateserver_smoke_test.py
webrtc-lizp/infra-luci-client-py
0
6624756
#!/usr/bin/env vpython # Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import hashlib import os import subprocess import sys import tempfile import time import unittest # Mutates sys.path. impo...
#!/usr/bin/env vpython # Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import hashlib import os import subprocess import sys import tempfile import time import unittest # Mutates sys.path. impo...
en
0.864428
#!/usr/bin/env vpython # Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. # Mutates sys.path. # Ensure that the testing machine has access to this server. # TODO(maruel): symlinks. # This test is to...
2.176495
2
recsys/mf/bpr.py
Danielto1404/ML-ALGO
1
6624757
import numpy as np import scipy.sparse as sp from tqdm import tqdm from recsys.mf.core import CoreMF class BPR(CoreMF): def __init__(self, iterations, factors, learning_rate, alpha, seed): super().__init__(iterations, factors, learning_rate, alpha, seed=seed, beta=0, calculate_loss=False) self.po...
import numpy as np import scipy.sparse as sp from tqdm import tqdm from recsys.mf.core import CoreMF class BPR(CoreMF): def __init__(self, iterations, factors, learning_rate, alpha, seed): super().__init__(iterations, factors, learning_rate, alpha, seed=seed, beta=0, calculate_loss=False) self.po...
none
1
2.130399
2
lingvo/core/learner.py
xsppp/gpipe_with_Mnist
1
6624758
<filename>lingvo/core/learner.py # Lint as: python3 # Copyright 2018 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...
<filename>lingvo/core/learner.py # Lint as: python3 # Copyright 2018 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...
en
0.71105
# Lint as: python3 # Copyright 2018 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 ...
2.656918
3
src/eon_service/pipelines/data_science/__init__.py
InnovativeDigitalSolution/NASA_ML-airport-estimated-ON
1
6624759
from .pipeline import create_pipelines # NOQA
from .pipeline import create_pipelines # NOQA
none
1
1.027917
1
maskrcnn_benchmark/layers/sigmoid_dr_loss.py
banben/maskrcnn-benchmark
114
6624760
<gh_stars>100-1000 import torch from torch import nn import torch.nn.functional as F import math """ PyTorch Implementation for DR Loss Reference CVPR'20: "DR Loss: Improving Object Detection by Distributional Ranking" Copyright@Alibaba Group Holding Limited """ class SigmoidDRLoss(nn.Module): def...
import torch from torch import nn import torch.nn.functional as F import math """ PyTorch Implementation for DR Loss Reference CVPR'20: "DR Loss: Improving Object Detection by Distributional Ranking" Copyright@Alibaba Group Holding Limited """ class SigmoidDRLoss(nn.Module): def __init__(self, pos...
en
0.687481
PyTorch Implementation for DR Loss Reference CVPR'20: "DR Loss: Improving Object Detection by Distributional Ranking" Copyright@Alibaba Group Holding Limited
2.827134
3
mainapp/admin.py
singlasahil221/developers
0
6624761
<gh_stars>0 from django.contrib import admin from .models import code_model # Register your models here. admin.site.register(code_model)
from django.contrib import admin from .models import code_model # Register your models here. admin.site.register(code_model)
en
0.968259
# Register your models here.
1.298661
1
BSSN/BSSN_RHSs.py
leowerneck/NRPyIGM
0
6624762
# As documented in the NRPy+ tutorial module # Tutorial-BSSN_time_evolution-BSSN_RHSs.ipynb, # this module will construct the right-hand sides (RHSs) # expressions of the BSSN time evolution equations. # # Time-evolution equations for the BSSN gauge conditions are # specified in the BSSN_gauge_RHSs module and d...
# As documented in the NRPy+ tutorial module # Tutorial-BSSN_time_evolution-BSSN_RHSs.ipynb, # this module will construct the right-hand sides (RHSs) # expressions of the BSSN time evolution equations. # # Time-evolution equations for the BSSN gauge conditions are # specified in the BSSN_gauge_RHSs module and d...
en
0.519525
# As documented in the NRPy+ tutorial module # Tutorial-BSSN_time_evolution-BSSN_RHSs.ipynb, # this module will construct the right-hand sides (RHSs) # expressions of the BSSN time evolution equations. # # Time-evolution equations for the BSSN gauge conditions are # specified in the BSSN_gauge_RHSs module and d...
2.362935
2
src/prefect/tasks/snowflake/snowflake.py
jhemmingsson/prefect
0
6624763
import snowflake.connector as sf from prefect import Task from prefect.utilities.tasks import defaults_from_attrs class SnowflakeQuery(Task): """ Task for executing a query against a snowflake database. Args: - account (str): snowflake account name, see snowflake connector package d...
import snowflake.connector as sf from prefect import Task from prefect.utilities.tasks import defaults_from_attrs class SnowflakeQuery(Task): """ Task for executing a query against a snowflake database. Args: - account (str): snowflake account name, see snowflake connector package d...
en
0.625884
Task for executing a query against a snowflake database. Args: - account (str): snowflake account name, see snowflake connector package documentation for details - user (str): user name used to authenticate - password (str, optional): password used to authenticate. ...
2.904329
3
silx/gui/dialog/SafeFileSystemModel.py
payno/silx
1
6624764
<filename>silx/gui/dialog/SafeFileSystemModel.py # coding: utf-8 # /*########################################################################## # # Copyright (c) 2016 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associate...
<filename>silx/gui/dialog/SafeFileSystemModel.py # coding: utf-8 # /*########################################################################## # # Copyright (c) 2016 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associate...
en
0.752588
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2016 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
1.519853
2
data.py
mackstann/schedule_exercise
0
6624765
<reponame>mackstann/schedule_exercise<gh_stars>0 employer_schedules = [ {"id": 2, "start_time": "2019-02-28T16:00:00.000Z"}, {"id": 6, "start_time": "2019-02-28T21:00:00.000Z"}, {"id": 9, "start_time": "2019-02-28T14:00:00.000Z"}, ]
employer_schedules = [ {"id": 2, "start_time": "2019-02-28T16:00:00.000Z"}, {"id": 6, "start_time": "2019-02-28T21:00:00.000Z"}, {"id": 9, "start_time": "2019-02-28T14:00:00.000Z"}, ]
none
1
1.440876
1
pixel_table/key_handler.py
Spooner/pixel-table
0
6624766
from __future__ import absolute_import, division, print_function, unicode_literals from twisted.protocols import basic from .sprites.touch_button import TouchButton # https://stackoverflow.com/questions/23714006/twisted-queue-a-function-interactively class KeyHandler(basic.LineReceiver): MODE_BUTTON = b'1' ...
from __future__ import absolute_import, division, print_function, unicode_literals from twisted.protocols import basic from .sprites.touch_button import TouchButton # https://stackoverflow.com/questions/23714006/twisted-queue-a-function-interactively class KeyHandler(basic.LineReceiver): MODE_BUTTON = b'1' ...
en
0.891269
# https://stackoverflow.com/questions/23714006/twisted-queue-a-function-interactively # Bottom side, player 0 # Top side, player 1 # Left side, player 2 # Right side, player 3 # Switch from line mode to "however much I got" mode
2.857758
3
code/st_gcn/graph/hdm05.py
nvski/ST-TR
0
6624767
import numpy as np from . import tools # Edge format: (origin, neighbor) num_node = 31 self_link = [(i, i) for i in range(num_node)] inward = [ ( 3, 2), ( 4, 3), ( 5, 4), ( 8, 7), ( 9, 8), (10, 9), (13,12), (14,13), (15,14), (17,16), ( 0,17), (18,14), (19,18), (20,19), (22,21), (25,14), (26,25), (27,26...
import numpy as np from . import tools # Edge format: (origin, neighbor) num_node = 31 self_link = [(i, i) for i in range(num_node)] inward = [ ( 3, 2), ( 4, 3), ( 5, 4), ( 8, 7), ( 9, 8), (10, 9), (13,12), (14,13), (15,14), (17,16), ( 0,17), (18,14), (19,18), (20,19), (22,21), (25,14), (26,25), (27,26...
en
0.785232
# Edge format: (origin, neighbor) # legs The Graph to model the skeletons extracted by the openpose Arguments: labeling_mode: must be one of the follow candidates uniform: Uniform Labeling dastance*: Distance Partitioning* dastance: Distance Partitioning spati...
2.756573
3
setup_build.py
cklb/odes
95
6624768
<reponame>cklb/odes import io import os from os.path import join from distutils.log import info import sys from numpy.distutils.command.build_ext import build_ext as _build_ext PKGCONFIG_CVODE = 'sundials-cvode-serial' PKGCONFIG_IDA = 'sundials-ida-serial' PKGCONFIG_CVODES = 'sundials-cvodes-serial' PKGCONFIG_IDAS =...
import io import os from os.path import join from distutils.log import info import sys from numpy.distutils.command.build_ext import build_ext as _build_ext PKGCONFIG_CVODE = 'sundials-cvode-serial' PKGCONFIG_IDA = 'sundials-ida-serial' PKGCONFIG_CVODES = 'sundials-cvodes-serial' PKGCONFIG_IDAS = 'sundials-idas-seria...
en
0.696236
Write a cython include file (.pxi), `filename`, with the definitions in the `definitions` mapping. Based on numpy.distutils.command.config:config.check_macro_true, checks if macro is defined or not int main(void) { #ifdef %s #else #error undefined macro #endif ; return 0; } Create pxi file containing so...
1.993512
2
Lib/test/test_socket.py
praleena/newpython
0
6624769
import unittest from test import support import errno import io import itertools import socket import select import tempfile import time import traceback import queue import sys import os import platform import array import contextlib from weakref import proxy import signal import math import pickle import struct impo...
import unittest from test import support import errno import io import itertools import socket import select import tempfile import time import traceback import queue import sys import os import platform import array import contextlib from weakref import proxy import signal import math import pickle import struct impo...
en
0.855463
# test unicode string and carriage return Check whether CAN sockets are supported on this host. Check whether CAN ISOTP sockets are supported on this host. Check whether RDS sockets are supported on this host. Check whether AF_ALG sockets are supported on this host. Check whether AF_QIPCRTR sockets are supported on thi...
2.104001
2
boilr/data.py
addtt/boiler
3
6624770
<gh_stars>1-10 import argparse from typing import Tuple from torch.utils.data import Dataset, DataLoader class BaseDatasetManager: """Wrapper for DataLoaders. This is meant to be subclassed for specific experiments and datasets. The method _make_datasets() must be implemented. A basic implementation of ...
import argparse from typing import Tuple from torch.utils.data import Dataset, DataLoader class BaseDatasetManager: """Wrapper for DataLoaders. This is meant to be subclassed for specific experiments and datasets. The method _make_datasets() must be implemented. A basic implementation of the method ...
en
0.667339
Wrapper for DataLoaders. This is meant to be subclassed for specific experiments and datasets. The method _make_datasets() must be implemented. A basic implementation of the method _make_dataloaders() is provided in this class, but can be overridden for custom behavior. Args: cfg (argparse...
2.863831
3
experiments/simulations/two_dimensional_mle.py
giovp/spatial-alignment
14
6624771
<gh_stars>10-100 import torch import numpy as np import matplotlib.pyplot as plt import seaborn as sns import sys sys.path.append("../..") from models.gpsa_mle import WarpGPMLE sys.path.append("../../data") from simulated.generate_twod_data import generate_twod_data from plotting.callbacks import callback_twod from ...
import torch import numpy as np import matplotlib.pyplot as plt import seaborn as sns import sys sys.path.append("../..") from models.gpsa_mle import WarpGPMLE sys.path.append("../../data") from simulated.generate_twod_data import generate_twod_data from plotting.callbacks import callback_twod from util import Conve...
en
0.41746
# n_outputs = 10 ## Fit GP on one view to get initial estimates of data kernel parameters # n_latent_gps=None, # fixed_data_kernel_lengthscales=np.exp(gpr.kernel_.k1.theta.astype(np.float32)), # fixed_data_kernel_lengthscales=np.exp(data_lengthscales_est), # mean_function="identity_initialized", # Forward pass # Comput...
2.354436
2
src/sage/categories/filtered_modules.py
bopopescu/sage
3
6624772
r""" Filtered Modules A *filtered module* over a ring `R` with a totally ordered indexing set `I` (typically `I = \NN`) is an `R`-module `M` equipped with a family `(F_i)_{i \in I}` of `R`-submodules satisfying `F_i \subseteq F_j` for all `i,j \in I` having `i \leq j`, and `M = \bigcup_{i \in I} F_i`. This family is c...
r""" Filtered Modules A *filtered module* over a ring `R` with a totally ordered indexing set `I` (typically `I = \NN`) is an `R`-module `M` equipped with a family `(F_i)_{i \in I}` of `R`-submodules satisfying `F_i \subseteq F_j` for all `i,j \in I` having `i \leq j`, and `M = \bigcup_{i \in I} F_i`. This family is c...
en
0.582589
Filtered Modules A *filtered module* over a ring `R` with a totally ordered indexing set `I` (typically `I = \NN`) is an `R`-module `M` equipped with a family `(F_i)_{i \in I}` of `R`-submodules satisfying `F_i \subseteq F_j` for all `i,j \in I` having `i \leq j`, and `M = \bigcup_{i \in I} F_i`. This family is called...
1.353308
1
secret_santa/response/success_response.py
jacobboesch/secret_santa_program
0
6624773
from secret_santa.response import Response class SuccessResponse(Response): def __init__(self, message, status_code=200, success=True): data = {"success": success, "message": message} super().__init__(status_code, data)
from secret_santa.response import Response class SuccessResponse(Response): def __init__(self, message, status_code=200, success=True): data = {"success": success, "message": message} super().__init__(status_code, data)
none
1
2.478913
2
data_steward/cdr_cleaner/cleaning_rules/drop_multiple_measurements.py
dcampbell-vumc/curation
0
6624774
""" Background It is possible for a participant to have multiple records of Physical Measurements. This typically occurs when earlier entries are incorrect. Data quality would improve if these earlier entries were removed. Scope: Develop a cleaning rule to remove all but the most recent of each Physical Measurement f...
""" Background It is possible for a participant to have multiple records of Physical Measurements. This typically occurs when earlier entries are incorrect. Data quality would improve if these earlier entries were removed. Scope: Develop a cleaning rule to remove all but the most recent of each Physical Measurement f...
en
0.691488
Background It is possible for a participant to have multiple records of Physical Measurements. This typically occurs when earlier entries are incorrect. Data quality would improve if these earlier entries were removed. Scope: Develop a cleaning rule to remove all but the most recent of each Physical Measurement for a...
1.997577
2
tap_list_providers/test/test_parse_example_data.py
danroberts728/hsvdotbeer
18
6624775
<gh_stars>10-100 """Test the parsing of example data""" from decimal import Decimal from django.core.management import call_command from django.test import TestCase from beers.models import Beer, Manufacturer from beers.test.factories import StyleFactory, StyleAlternateNameFactory from venues.test.factories import Ve...
"""Test the parsing of example data""" from decimal import Decimal from django.core.management import call_command from django.test import TestCase from beers.models import Beer, Manufacturer from beers.test.factories import StyleFactory, StyleAlternateNameFactory from venues.test.factories import VenueFactory from v...
en
0.8083
Test the parsing of example data Test parsing the JSON data # running twice to make sure we're not double-creating
2.648229
3
superset/datasets/api.py
razzius/superset
18,621
6624776
# 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 u...
# 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 u...
en
0.686348
# 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 u...
1.307307
1
vathos/utils/logger.py
satyajitghana/ProjektDepth
2
6624777
<filename>vathos/utils/logger.py import logging import sys LOG_LEVEL = logging.INFO def setup_logger(name): logger = logging.getLogger(f'vathos.{name}') if not logger.hasHandlers(): logger.setLevel(LOG_LEVEL) # set the logging level # logging format logger_format = logging.Formatter...
<filename>vathos/utils/logger.py import logging import sys LOG_LEVEL = logging.INFO def setup_logger(name): logger = logging.getLogger(f'vathos.{name}') if not logger.hasHandlers(): logger.setLevel(LOG_LEVEL) # set the logging level # logging format logger_format = logging.Formatter...
en
0.50234
# set the logging level # logging format # return the logger
2.61767
3
napari/_qt/_tests/test_qt_viewer.py
kolibril13/napari
0
6624778
import gc import os import weakref from dataclasses import dataclass from typing import List from unittest import mock import numpy as np import pytest from qtpy.QtGui import QGuiApplication from qtpy.QtWidgets import QMessageBox from napari._tests.utils import ( add_layer_by_type, check_viewer_functioning, ...
import gc import os import weakref from dataclasses import dataclass from typing import List from unittest import mock import numpy as np import pytest from qtpy.QtGui import QGuiApplication from qtpy.QtWidgets import QMessageBox from napari._tests.utils import ( add_layer_by_type, check_viewer_functioning, ...
en
0.884438
Test instantiating viewer. Test instantiating console from viewer. # Check console is created when requested Test instantiating console from viewer. # Check console has been created when it is supposed to be shown Test adding new labels layer. # Add labels to empty viewer # Add labels with image already present Test ad...
1.925135
2
mindsdb/api/mongo/server.py
mindsdb/main
261
6624779
import socketserver as SocketServer import socket import struct import bson from bson import codec_options from collections import OrderedDict from abc import abstractmethod import mindsdb.api.mongo.functions as helpers from mindsdb.api.mongo.classes import RespondersCollection, Session from mindsdb.api.mongo.responde...
import socketserver as SocketServer import socket import struct import bson from bson import codec_options from collections import OrderedDict from abc import abstractmethod import mindsdb.api.mongo.functions as helpers from mindsdb.api.mongo.classes import RespondersCollection, Session from mindsdb.api.mongo.responde...
en
0.136612
# NOTE probably, it need only for mongo version < 3.6 # NOTE used in mongo version > 3.6 # sections # body # Document # TODO read and check checksum # TODO # TODO # TODO add seq here # NOTE used in any mongo shell version # https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/#wire-op-query # docs = [query, ...
1.970497
2
imfit_modules/Execution/execution_start.py
Akerdogmus/imfit
0
6624780
from execution_main import ExecutionModule class StartExecution(ExecutionModule): def startExecutionBtn(self): #This button runs the execution plan on Dockers pass def createDocker(self): #This function creates Dockers for execution pass...
from execution_main import ExecutionModule class StartExecution(ExecutionModule): def startExecutionBtn(self): #This button runs the execution plan on Dockers pass def createDocker(self): #This function creates Dockers for execution pass...
en
0.702534
#This button runs the execution plan on Dockers #This function creates Dockers for execution #The function executes OS for Docker #The function executes Python for Docker #The function executes ROS for Docker #The function executes Gazebo for Docker #These functions take the datas from Dockers for analyzing and monitor...
2.56854
3
hello_googoo/googoo.py
Florents-Tselai/hellog-googoo
0
6624781
<filename>hello_googoo/googoo.py #!/usr/bin/env python # coding: utf-8 from argparse import ArgumentParser from bs4 import BeautifulSoup from selenium.webdriver import Chrome from selenium.webdriver import ChromeOptions def main(): arg_parser = ArgumentParser(description='Search Google & Print URLs in the Comm...
<filename>hello_googoo/googoo.py #!/usr/bin/env python # coding: utf-8 from argparse import ArgumentParser from bs4 import BeautifulSoup from selenium.webdriver import Chrome from selenium.webdriver import ChromeOptions def main(): arg_parser = ArgumentParser(description='Search Google & Print URLs in the Comm...
en
0.325294
#!/usr/bin/env python # coding: utf-8
2.871978
3
redis/kyasshu_redis/__init__.py
AlexFence/kyasshu
0
6624782
<reponame>AlexFence/kyasshu<filename>redis/kyasshu_redis/__init__.py from .redis_cache import RedisCache __all__ = ["RedisCache"]
from .redis_cache import RedisCache __all__ = ["RedisCache"]
none
1
1.196676
1
python/testData/resolve/OverloadsAndImplementationInImportedModule.py
jnthn/intellij-community
2
6624783
<filename>python/testData/resolve/OverloadsAndImplementationInImportedModule.py from OverloadsAndImplementationInImportedModuleDep import foo foo("abc") <ref>
<filename>python/testData/resolve/OverloadsAndImplementationInImportedModule.py from OverloadsAndImplementationInImportedModuleDep import foo foo("abc") <ref>
none
1
1.314662
1
Tracer/infer_RoadTracer_M_line_merge.py
astro-ck/Road-Extraction
25
6624784
<gh_stars>10-100 import sys sys.path.append("./discoverlib") import os from discoverlib import geom, graph from rtree import index import math def generate_search_box(bounds,padding): if bounds.start.x + padding < bounds.end.x - padding: min_x = bounds.start.x + padding max_x = bounds.end.x - padd...
import sys sys.path.append("./discoverlib") import os from discoverlib import geom, graph from rtree import index import math def generate_search_box(bounds,padding): if bounds.start.x + padding < bounds.end.x - padding: min_x = bounds.start.x + padding max_x = bounds.end.x - padding elif boun...
en
0.518413
# choose the largest as base graph # # choose the first one as base graph # graph1 = graph.read_graph(graph_dir + file_name[0]) # print("base on {}".format(file_name[0])) # print(edge1.id) # reccord th # except for base graph # graphs to be merged # edge_ids=list(edge_ids) # if dislinked_edge == 0: # # link the dis...
2.772696
3
paper/causalimpact_xgboost.py
kjappelbaum/aeml
0
6624785
<reponame>kjappelbaum/aeml<gh_stars>0 from aeml.causalimpact.utils import get_timestep_tuples, get_causalimpact_splits import pickle from aeml.causalimpact.utils import _select_unrelated_x from aeml.models.gbdt.gbmquantile import LightGBMQuantileRegressor from aeml.models.gbdt.run import run_ci_model from aeml.models.g...
from aeml.causalimpact.utils import get_timestep_tuples, get_causalimpact_splits import pickle from aeml.causalimpact.utils import _select_unrelated_x from aeml.models.gbdt.gbmquantile import LightGBMQuantileRegressor from aeml.models.gbdt.run import run_ci_model from aeml.models.gbdt.settings import * from darts.data...
en
0.485653
# "FI-16", # "TI-33", # "FI-2", # "FI-151", # "TI-8", # "FI-241", # "valve-position-12", # dry-bed # "FI-38", # strippera # "PI-28", # stripper # "TI-28", # stripper # "FI-20", # "FI-30", # "FI-211", # "TI-30", # "PI-30", # "TI-4", # "FI-23", # "F...
1.722378
2
tests/integration_tests/test_zn_nodes2.py
zincware/ZnTrack
16
6624786
import dataclasses import os import shutil import subprocess import pytest import znjson from zntrack import zn from zntrack.core.base import Node @pytest.fixture def proj_path(tmp_path): shutil.copy(__file__, tmp_path) os.chdir(tmp_path) subprocess.check_call(["git", "init"]) subprocess.check_call(...
import dataclasses import os import shutil import subprocess import pytest import znjson from zntrack import zn from zntrack.core.base import Node @pytest.fixture def proj_path(tmp_path): shutil.copy(__file__, tmp_path) os.chdir(tmp_path) subprocess.check_call(["git", "init"]) subprocess.check_call(...
en
0.96769
# defined as dependency, so it must run first.
2.20441
2
op_robot_tests/tests_files/brokers/openprocurement_client_helper.py
iovzt/robot_tests
0
6624787
from openprocurement_client.client import Client, EDRClient from openprocurement_client.dasu_client import DasuClient from openprocurement_client.document_service_client \ import DocumentServiceClient from openprocurement_client.plan import PlansClient from openprocurement_client.contract import ContractingClient f...
from openprocurement_client.client import Client, EDRClient from openprocurement_client.dasu_client import DasuClient from openprocurement_client.document_service_client \ import DocumentServiceClient from openprocurement_client.plan import PlansClient from openprocurement_client.contract import ContractingClient f...
en
0.916506
# In case we are looking for a specific funder
2.092193
2
lib/galaxy/datatypes/interval.py
lesperry/Metagenomics
0
6624788
<filename>lib/galaxy/datatypes/interval.py """ Interval datatypes """ import logging import math import sys import tempfile from bx.intervals.io import GenomicIntervalReader, ParseError from six.moves.urllib.parse import quote_plus from galaxy import util from galaxy.datatypes import metadata from galaxy.datatypes.da...
<filename>lib/galaxy/datatypes/interval.py """ Interval datatypes """ import logging import math import sys import tempfile from bx.intervals.io import GenomicIntervalReader, ParseError from six.moves.urllib.parse import quote_plus from galaxy import util from galaxy.datatypes import metadata from galaxy.datatypes.da...
en
0.770108
Interval datatypes # Contains the meta columns and the words that map to it; list aliases on the # right side of the : in decreasing order of priority # a little faster lookup # Constants for configuring viewport generation: If a line is greater than # VIEWPORT_MAX_READS_PER_LINE * VIEWPORT_READLINE_BUFFER_SIZE bytes i...
2.361309
2
setup.py
kuhy/pyAPDUFuzzer
0
6624789
<reponame>kuhy/pyAPDUFuzzer<filename>setup.py #!/usr/bin/env python import io from setuptools import setup from setuptools import find_packages version = '0.0.3' install_requires = [ 'six', 'llsmartcard-ph4', 'psutil', 'pyhashxx', ] afl_extras = [ 'python-afl-ph4', ] dev_extras = [ 'pep8', ...
#!/usr/bin/env python import io from setuptools import setup from setuptools import find_packages version = '0.0.3' install_requires = [ 'six', 'llsmartcard-ph4', 'psutil', 'pyhashxx', ] afl_extras = [ 'python-afl-ph4', ] dev_extras = [ 'pep8', 'tox', 'pypandoc', 'jupyter', ] ...
en
0.207962
#!/usr/bin/env python # (IOError, ImportError):
1.606765
2
LineSync/filters.py
l-mda/AsyncLine
2
6624790
import re from .lib.Gen.f_LineService import Operation class Filter: def __call__(self, message): raise NotImplementedError def __invert__(self): return InvertFilter(self) def __and__(self, other): return AndFilter(self, other) def __or__(self, other): return OrFilter...
import re from .lib.Gen.f_LineService import Operation class Filter: def __call__(self, message): raise NotImplementedError def __invert__(self): return InvertFilter(self) def __and__(self, other): return AndFilter(self, other) def __or__(self, other): return OrFilter...
en
0.596521
#Messages Filter text messages. Filter message that contain object Image Filter message that contain object Video Filter message that contain object Audio Filter message that contain object HTML Filter message that contain object PDF Filter calling from other Filter message that contain object Sticker Filter message th...
2.612748
3
base.py
fujita/bgperf
12
6624791
# Copyright (C) 2016 Nippon Telegraph and Telephone 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 appli...
# Copyright (C) 2016 Nippon Telegraph and Telephone 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 appli...
en
0.891995
# Copyright (C) 2016 Nippon Telegraph and Telephone 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 appli...
2.026186
2
lcfeats/ioutils.py
rbiswas4/LightCurveFeatures
0
6624792
<reponame>rbiswas4/LightCurveFeatures """ """ from __future__ import division, absolute_import, print_function __all__ = ['get_rootfile', 'get_photTable', 'process_fname'] from sndata import SNANASims import glob import os import pandas as pd def process_fname(fname, location, filter_query="SNID%50==0", outDir='./',...
""" """ from __future__ import division, absolute_import, print_function __all__ = ['get_rootfile', 'get_photTable', 'process_fname'] from sndata import SNANASims import glob import os import pandas as pd def process_fname(fname, location, filter_query="SNID%50==0", outDir='./', write=False, format...
en
0.709229
fname : string, mandatory the name of a head file. location : string, mandatory directory in which the files are filter_query: string, defaults to "SNID%50 == 0" query to be run selecting the objects from both the head and phot file. outDir : string, defaults to './' directory where stuff will be ...
2.372275
2
plugins/advanced_regex/icon_advanced_regex/actions/data_extraction/schema.py
lukaszlaszuk/insightconnect-plugins
46
6624793
<reponame>lukaszlaszuk/insightconnect-plugins # GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json class Component: DESCRIPTION = "Extract data via regex from a string" class Input: ASCII = "ascii" DOTALL = "dotall" IGNORECASE = "ignorecase" IN_REGEX = "in_reg...
# GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json class Component: DESCRIPTION = "Extract data via regex from a string" class Input: ASCII = "ascii" DOTALL = "dotall" IGNORECASE = "ignorecase" IN_REGEX = "in_regex" IN_STRING = "in_string" MULTILINE ...
en
0.211776
# GENERATED BY KOMAND SDK - DO NOT EDIT { "type": "object", "title": "Variables", "properties": { "ascii": { "type": "boolean", "title": "ASCII", "description": "Make \\\\w \\\\W \\\\b \\\\B follow ASCII rules", "default": false, "order": 6 }, "dotall": { "type": "b...
2.555781
3
componentstore/cli.py
ludeeus/custom-installer
14
6624794
<reponame>ludeeus/custom-installer """Enable CLI.""" import click @click.command() @click.option('--port', '-P', default=9999, help='port number.') @click.option('--redishost', '-RH', default=None, help='Redis host.') @click.option('--redisport', '-RP', default=None, help='Redis port.') @click.option('--nocache', is_...
"""Enable CLI.""" import click @click.command() @click.option('--port', '-P', default=9999, help='port number.') @click.option('--redishost', '-RH', default=None, help='Redis host.') @click.option('--redisport', '-RP', default=None, help='Redis port.') @click.option('--nocache', is_flag=True, help='Redis port.') @cli...
en
0.592526
Enable CLI. CLI for this package. # pylint: disable=E1120
2.06354
2
PDFWaterMark.py
santhipriya13/PracticeCode
0
6624795
<filename>PDFWaterMark.py import PyPDF2 template=PyPDF2.PdfFileReader(open("super.pdf", 'rb')) template.numPages
<filename>PDFWaterMark.py import PyPDF2 template=PyPDF2.PdfFileReader(open("super.pdf", 'rb')) template.numPages
none
1
2.276587
2
model.py
bicsi/StarGAN
0
6624796
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from torchvision import transforms class ResidualBlock(nn.Module): """Residual Block.""" def __init__(self, dim_in, dim_out): super(ResidualBlock, self).__init__() self.main = nn.Sequential( nn.Co...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from torchvision import transforms class ResidualBlock(nn.Module): """Residual Block.""" def __init__(self, dim_in, dim_out): super(ResidualBlock, self).__init__() self.main = nn.Sequential( nn.Co...
en
0.613431
Residual Block. Generator. Encoder-Decoder Architecture. # Down-Sampling # Bottleneck # Up-Sampling # replicate spatially and concatenate domain information Discriminator. PatchGAN.
2.93772
3
docs/examples_src/raw_query_usage/extract_from_raw.py
sanders41/odmantic
0
6624797
<gh_stars>0 from bson import ObjectId from odmantic import Field, Model class User(Model): name: str = Field(key_name="username") document = {"username": "John", "_id": ObjectId("5f8352a87a733b8b18b0cb27")} user = User.parse_doc(document) print(user) #> id=ObjectId('5f8352a87a733b8b18b0cb27') name='John'
from bson import ObjectId from odmantic import Field, Model class User(Model): name: str = Field(key_name="username") document = {"username": "John", "_id": ObjectId("5f8352a87a733b8b18b0cb27")} user = User.parse_doc(document) print(user) #> id=ObjectId('5f8352a87a733b8b18b0cb27') name='John'
en
0.187066
#> id=ObjectId('5f8352a87a733b8b18b0cb27') name='John'
2.698868
3
pyss/mpi/util/separator.py
ibara1454/pyss
0
6624798
<reponame>ibara1454/pyss #!/usr/bin/env python # -*- coding: utf-8 -*- from abc import ABCMeta class Separator(metaclass=ABCMeta): def __call__(a, comm): """ Parameters ---------- a : (N, M) array_like comm : MPI communicator Returns ------- ws : n...
#!/usr/bin/env python # -*- coding: utf-8 -*- from abc import ABCMeta class Separator(metaclass=ABCMeta): def __call__(a, comm): """ Parameters ---------- a : (N, M) array_like comm : MPI communicator Returns ------- ws : ndarray """ ...
en
0.197825
#!/usr/bin/env python # -*- coding: utf-8 -*- Parameters ---------- a : (N, M) array_like comm : MPI communicator Returns ------- ws : ndarray A horizontal separator.
3.085516
3
celescope/celescope.py
frostmoure98/CeleScope
0
6624799
<reponame>frostmoure98/CeleScope #!/bin/env python # coding=utf8 import argparse from celescope.__init__ import __VERSION__, ASSAY_DICT def main(): parser = argparse.ArgumentParser(description='CeleScope') parser.add_argument( '-v', '--version', action='version', version=__VER...
#!/bin/env python # coding=utf8 import argparse from celescope.__init__ import __VERSION__, ASSAY_DICT def main(): parser = argparse.ArgumentParser(description='CeleScope') parser.add_argument( '-v', '--version', action='version', version=__VERSION__) subparsers = parser.a...
en
0.129809
#!/bin/env python # coding=utf8 # rna # rna_virus # capture_virus # fusion # smk # vdj # mut assay = 'mut' text = ASSAY_DICT[assay] subparsers_mut = subparsers.add_parser( assay, help=text, description=text) subparsers_mut_sub = subparsers_mut.add_subparsers() parser_sample = subparsers_mut...
2.311516
2
examples/tof-viewer/external/newton_host_driver/src/host_api/examples/python/tests/test_grouped.py
rick-yhchen1013/aditof-sdk-rework
5
6624800
<reponame>rick-yhchen1013/aditof-sdk-rework<filename>examples/tof-viewer/external/newton_host_driver/src/host_api/examples/python/tests/test_grouped.py #!/usr/bin/env python """ Script to test grouped command Usage: test_grouped.py [--count=<word_count>] Options: --help Shows this help message. """ from __f...
#!/usr/bin/env python """ Script to test grouped command Usage: test_grouped.py [--count=<word_count>] Options: --help Shows this help message. """ from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals from docopt import docopt import sys impor...
en
0.312504
#!/usr/bin/env python Script to test grouped command Usage: test_grouped.py [--count=<word_count>] Options: --help Shows this help message.
2.568339
3
handwriting_gen/tests/test_distributions.py
sinbycos/handwriting-generation
0
6624801
import numpy as np import tensorflow as tf from handwriting_gen.distributions import bivariate_normal_likelihood def test_bivariate_normal_likelihood(): from scipy.stats import multivariate_normal mu1, mu2 = -0.5, 0.22 sigma1, sigma2 = 0.3, 0.9 rho = -0.15 x1, x2 = -1.0, 2.3 cov_off_diag = rh...
import numpy as np import tensorflow as tf from handwriting_gen.distributions import bivariate_normal_likelihood def test_bivariate_normal_likelihood(): from scipy.stats import multivariate_normal mu1, mu2 = -0.5, 0.22 sigma1, sigma2 = 0.3, 0.9 rho = -0.15 x1, x2 = -1.0, 2.3 cov_off_diag = rh...
none
1
2.570834
3
denonavr/decorators.py
elad-bar/denonavr
0
6624802
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module implements the REST API to Denon AVR receivers. :copyright: (c) 2021 by <NAME>. :license: MIT, see LICENSE for more details. """ import asyncio import inspect import logging import time import xml.etree.ElementTree as ET from functools import wraps from ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module implements the REST API to Denon AVR receivers. :copyright: (c) 2021 by <NAME>. :license: MIT, see LICENSE for more details. """ import asyncio import inspect import logging import time import xml.etree.ElementTree as ET from functools import wraps from ...
en
0.770866
#!/usr/bin/env python3 # -*- coding: utf-8 -*- This module implements the REST API to Denon AVR receivers. :copyright: (c) 2021 by <NAME>. :license: MIT, see LICENSE for more details. Handle exceptions raised when calling an Denon AVR endpoint asynchronously. The decorated function must either have a string varia...
2.16932
2
server/src/repository/image/i_image_repository.py
konrad2508/picgal
4
6624803
<gh_stars>1-10 from repository.image.i_image_database_repository import IImageDatabaseRepository from repository.image.i_virtual_tag_database_repository import IVirtualTagDatabaseRepository class IImageRepository(IImageDatabaseRepository, IVirtualTagDatabaseRepository): ...
from repository.image.i_image_database_repository import IImageDatabaseRepository from repository.image.i_virtual_tag_database_repository import IVirtualTagDatabaseRepository class IImageRepository(IImageDatabaseRepository, IVirtualTagDatabaseRepository): ...
none
1
1.229701
1
netbox/utilities/utils.py
cocoon/netbox
0
6624804
<filename>netbox/utilities/utils.py import six def csv_format(data): """ Encapsulate any data which contains a comma within double quotes. """ csv = [] for value in data: # Represent None or False with empty string if value in [None, False]: csv.append(u'') ...
<filename>netbox/utilities/utils.py import six def csv_format(data): """ Encapsulate any data which contains a comma within double quotes. """ csv = [] for value in data: # Represent None or False with empty string if value in [None, False]: csv.append(u'') ...
en
0.762368
Encapsulate any data which contains a comma within double quotes. # Represent None or False with empty string # Force conversion to string first so we can check for any commas # Double-quote the value if it contains a comma
3.790975
4
Honey-badger-labs/orders.py
amanovishnu/Job-Assignments
0
6624805
<filename>Honey-badger-labs/orders.py def orders(): #function to calculate the received orders on website. print("\n") print("Total number of orders: ",end=" ") print(len(new_list))
<filename>Honey-badger-labs/orders.py def orders(): #function to calculate the received orders on website. print("\n") print("Total number of orders: ",end=" ") print(len(new_list))
en
0.974054
#function to calculate the received orders on website.
2.388094
2
test/counts_table/test_basic_xr.py
iosonofabio/singlet
11
6624806
<reponame>iosonofabio/singlet<gh_stars>10-100 #!/usr/bin/env python # vim: fdm=indent ''' author: <NAME> date: 15/08/17 content: Test CountsTableSparse class. ''' import numpy as np import pytest @pytest.fixture(scope="module") def ct(): print('Instantiating CountsTableXR') from singlet.counts_ta...
#!/usr/bin/env python # vim: fdm=indent ''' author: <NAME> date: 15/08/17 content: Test CountsTableSparse class. ''' import numpy as np import pytest @pytest.fixture(scope="module") def ct(): print('Instantiating CountsTableXR') from singlet.counts_table import CountsTableXR ctable = CountsTa...
en
0.372055
#!/usr/bin/env python # vim: fdm=indent author: <NAME> date: 15/08/17 content: Test CountsTableSparse class. # FIXME: how does this work? #def test_swap_dims(ct): # assert(ct.swap_dims( # {'gene name': 'sample name', # 'sample name': 'gene name'}).shape == (4, 60721)) # FIXME #def test_ge...
2.439337
2
Configuration/Geometry/python/GeometryExtended2023D36Reco_cff.py
bisnupriyasahu/cmssw
1
6624807
import FWCore.ParameterSet.Config as cms # This config was generated automatically using generate2023Geometry.py # If you notice a mistake, please update the generating script, not just this config from Configuration.Geometry.GeometryExtended2023D36_cff import * # tracker from Geometry.CommonDetUnit.globalTrackingGe...
import FWCore.ParameterSet.Config as cms # This config was generated automatically using generate2023Geometry.py # If you notice a mistake, please update the generating script, not just this config from Configuration.Geometry.GeometryExtended2023D36_cff import * # tracker from Geometry.CommonDetUnit.globalTrackingGe...
en
0.631989
# This config was generated automatically using generate2023Geometry.py # If you notice a mistake, please update the generating script, not just this config # tracker # calo # muon # forward
1.062324
1
homeassistant/components/repetier/sensor.py
andersop91/core
22,481
6624808
"""Support for monitoring Repetier Server Sensors.""" from datetime import datetime import logging import time from homeassistant.components.sensor import SensorDeviceClass, SensorEntity from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from . import REPETIE...
"""Support for monitoring Repetier Server Sensors.""" from datetime import datetime import logging import time from homeassistant.components.sensor import SensorDeviceClass, SensorEntity from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from . import REPETIE...
en
0.659083
Support for monitoring Repetier Server Sensors. Set up the available Repetier Server sensors. Class to create and populate a Repetier Sensor. Init new sensor. Return sensor attributes. Return sensor state. Get new data and update state. Connect update callbacks. Return new data from the api cache. Update the sensor. Re...
2.345178
2
plants/models.py
kermox/Plantation
1
6624809
from django.conf import settings from django.db import models class UserMixin(models.Model): user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.PROTECT, null=False, blank=False, verbose_name='User', help_text='', ) class Meta: ab...
from django.conf import settings from django.db import models class UserMixin(models.Model): user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.PROTECT, null=False, blank=False, verbose_name='User', help_text='', ) class Meta: ab...
none
1
2.10789
2
RunProject.py
BlindBMan/Facial-Recognition
0
6624810
<filename>RunProject.py from Parameters import * from FacialDetector import * import pdb from Visualize import * params: Parameters = Parameters() params.dim_window = 36 # exemplele pozitive (fete de oameni cropate) au 36x36 pixeli params.dim_hog_cell = 6 # dimensiunea celulei params.overlap = 0.3 params.number_pos...
<filename>RunProject.py from Parameters import * from FacialDetector import * import pdb from Visualize import * params: Parameters = Parameters() params.dim_window = 36 # exemplele pozitive (fete de oameni cropate) au 36x36 pixeli params.dim_hog_cell = 6 # dimensiunea celulei params.overlap = 0.3 params.number_pos...
ro
0.492228
# exemplele pozitive (fete de oameni cropate) au 36x36 pixeli # dimensiunea celulei # numarul exemplelor pozitive # numarul exemplelor negative # toate ferestrele cu scorul > threshold si maxime locale devin detectii # (optional)antrenare cu exemple puternic negative # adauga imaginile cu fete oglindite # Pasul 1. Inca...
2.466221
2
ind_1.py
GrishakV/Lab9
0
6624811
<reponame>GrishakV/Lab9 #!/usr/bin/env python3 # -*- config: utf-8 -*- # 2. Написать программу, которая считывает текст из файла и выводит на экран только # предложения, содержащие введенное с клавиатуры слово. if __name__ == '__main__': a = input("Введите слово для поиска") with open('ind1.txt', 'r') as f: ...
#!/usr/bin/env python3 # -*- config: utf-8 -*- # 2. Написать программу, которая считывает текст из файла и выводит на экран только # предложения, содержащие введенное с клавиатуры слово. if __name__ == '__main__': a = input("Введите слово для поиска") with open('ind1.txt', 'r') as f: text = f.read() ...
ru
0.98809
#!/usr/bin/env python3 # -*- config: utf-8 -*- # 2. Написать программу, которая считывает текст из файла и выводит на экран только # предложения, содержащие введенное с клавиатуры слово.
3.849034
4
app/content/content.py
Mandhiraj/codingblind
0
6624812
<gh_stars>0 from lesson1 import lesson1 from lesson2 import lesson2 from lesson3 import lesson3 from lesson4 import lesson4 lessons = [lesson1, lesson2, lesson3, lesson4]
from lesson1 import lesson1 from lesson2 import lesson2 from lesson3 import lesson3 from lesson4 import lesson4 lessons = [lesson1, lesson2, lesson3, lesson4]
none
1
1.943702
2
ITP2/ITP2_7_C.py
yu8ikmnbgt6y/MyAOJ
1
6624813
<reponame>yu8ikmnbgt6y/MyAOJ import sys import io import time import pprint input_txt = """ 9 0 1 0 2 0 3 2 2 1 1 1 2 1 3 0 4 3 2 4 """ sys.stdin = io.StringIO(input_txt);input() #sys.stdin = open('ITP2_7_B_in10.test') start = time.time() # copy the below part and paste to the submission form. #...
import sys import io import time import pprint input_txt = """ 9 0 1 0 2 0 3 2 2 1 1 1 2 1 3 0 4 3 2 4 """ sys.stdin = io.StringIO(input_txt);input() #sys.stdin = open('ITP2_7_B_in10.test') start = time.time() # copy the below part and paste to the submission form. # ---------function-----------...
en
0.469508
9 0 1 0 2 0 3 2 2 1 1 1 2 1 3 0 4 3 2 4 #sys.stdin = open('ITP2_7_B_in10.test') # copy the below part and paste to the submission form. # ---------function------------ # insert x # find x # delete x # dump L R #print(q, *arg, '\t', arr) # -----------------------------
2.757406
3
examples/pylab_examples/custom_cmap.py
takluyver/matplotlib
3
6624814
<reponame>takluyver/matplotlib #!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap """ Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then yo...
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap """ Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use: cdict = {'red': ...
en
0.868562
#!/usr/bin/env python Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use: cdict = {'red': ((0.0, 0.0, 0.0), (0.5, 1.0, 1.0), (1.0, 1.0, 1.0)), 'green'...
3.929317
4
aerforge/prefabs/gun.py
Aermoss/AerForge
2
6624815
<gh_stars>1-10 from aerforge import * from aerforge.math import * import math import time class Gun: def __init__(self, window, x = 0, y = 0, bullet_speed = 50, shoot_cooldown = 0.1, magazine_size = 20, selected = True, automatic = False, reload_time = 2.4): self.window = window self.x ...
from aerforge import * from aerforge.math import * import math import time class Gun: def __init__(self, window, x = 0, y = 0, bullet_speed = 50, shoot_cooldown = 0.1, magazine_size = 20, selected = True, automatic = False, reload_time = 2.4): self.window = window self.x = x se...
none
1
2.822924
3
spyder/plugins/onlinehelp/tests/test_pydocgui.py
mwtoews/spyder
1
6624816
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # """ Tests for pydocgui.py """ # Standard library imports import os from unittest.mock import MagicMock # Test library imports import numpy as np from numpy.lib import NumpyVersion import pytest from fla...
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # """ Tests for pydocgui.py """ # Standard library imports import os from unittest.mock import MagicMock # Test library imports import numpy as np from numpy.lib import NumpyVersion import pytest from fla...
en
0.687047
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # Tests for pydocgui.py # Standard library imports # Test library imports # Local imports Set up pydocbrowser. Go to the documentation by url. Regression test for spyder-ide/spyder#10740
2.16751
2
reinforcement_learning/rl_deepracer_robomaker_coach_gazebo/src/markov/boto/sqs/constants.py
jerrypeng7773/amazon-sagemaker-examples
2,610
6624817
<gh_stars>1000+ """This module houses the constants for the sqs client""" from enum import Enum class StatusIndicator(Enum): """Enum containing the integers signifing the the return status code for error accumulation. """ SUCCESS = 0 CLIENT_ERROR = 1 SYSTEM_ERROR = 2
"""This module houses the constants for the sqs client""" from enum import Enum class StatusIndicator(Enum): """Enum containing the integers signifing the the return status code for error accumulation. """ SUCCESS = 0 CLIENT_ERROR = 1 SYSTEM_ERROR = 2
en
0.620965
This module houses the constants for the sqs client Enum containing the integers signifing the the return status code for error accumulation.
2.740455
3
src/TF/_04Transformation_Broadcaster.py
PiyushMahamuni/roslearning
1
6624818
<filename>src/TF/_04Transformation_Broadcaster.py #!/usr/bin/env python import rospy import tf # CONSTANTS NODE_NAME = "frame_a_frame_b_broadcaster" PARENT_FRAME = "frame_a" CHILD_FRAME = "frame_b" transform_broadcaster = None # SETTING UP THE NODE def setup(): rospy.init_node(NODE_NAME) global transform_b...
<filename>src/TF/_04Transformation_Broadcaster.py #!/usr/bin/env python import rospy import tf # CONSTANTS NODE_NAME = "frame_a_frame_b_broadcaster" PARENT_FRAME = "frame_a" CHILD_FRAME = "frame_b" transform_broadcaster = None # SETTING UP THE NODE def setup(): rospy.init_node(NODE_NAME) global transform_b...
en
0.686803
#!/usr/bin/env python # CONSTANTS # SETTING UP THE NODE # create a quaternion # create translation vector # current time # each transformation needs to be stamped with appropriate time, here the time # just before broadcasting it is used. # the last two arguments are strings - frame_id(s) of parent and then child frame...
2.475362
2
app/tests/studies_tests/factories.py
njmhendrix/grand-challenge.org
0
6624819
import datetime import factory.fuzzy import pytz from grandchallenge.studies.models import Study from tests.patients_tests.factories import PatientFactory class StudyFactory(factory.DjangoModelFactory): class Meta: model = Study name = factory.Sequence(lambda n: f"Study {n}") patient = factory....
import datetime import factory.fuzzy import pytz from grandchallenge.studies.models import Study from tests.patients_tests.factories import PatientFactory class StudyFactory(factory.DjangoModelFactory): class Meta: model = Study name = factory.Sequence(lambda n: f"Study {n}") patient = factory....
none
1
2.076725
2
openerp/report/render/render.py
ntiufalara/openerp7
3
6624820
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
en
0.724452
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
1.342458
1
Alfred.alfredpreferences/workflows/user.workflow.73C16A76-E7DC-4A21-AE3B-32FD533AB1FF/src/args.py
Puritanic/Dotfiles
34
6624821
<gh_stars>10-100 #!/usr/bin/python # encoding: utf-8 START_ARG = 'start' STOP_ARG = 'stop' BREAK_ARG = 'break'
#!/usr/bin/python # encoding: utf-8 START_ARG = 'start' STOP_ARG = 'stop' BREAK_ARG = 'break'
en
0.45155
#!/usr/bin/python # encoding: utf-8
1.313423
1
test.py
DLwbm123/LBAM_inpainting
7
6624822
import os import math import argparse import torch import torch.backends.cudnn as cudnn from PIL import Image from torchvision.utils import save_image from torchvision import datasets from models.LBAMModel import LBAMModel from PIL import Image from torchvision.transforms import Compose, ToTensor, Resize, ToPILImage fr...
import os import math import argparse import torch import torch.backends.cudnn as cudnn from PIL import Image from torchvision.utils import save_image from torchvision import datasets from models.LBAMModel import LBAMModel from PIL import Image from torchvision.transforms import Compose, ToTensor, Resize, ToPILImage fr...
none
1
2.391628
2
Machine Learning/Sklearn Implementations/Dimensionality Reduction/Principal Component Analysis.py
adityamanglik/Algorithm-Implementations
0
6624823
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Apr 10 18:15:29 2020 @author: admangli """ import numpy as np import pandas as pd import matplotlib.pyplot as plt dataset = pd.read_csv('Wine.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, -1].values #%% # Scale dataset from sklearn.prepro...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Apr 10 18:15:29 2020 @author: admangli """ import numpy as np import pandas as pd import matplotlib.pyplot as plt dataset = pd.read_csv('Wine.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, -1].values #%% # Scale dataset from sklearn.prepro...
en
0.724295
#!/usr/bin/env python3 # -*- coding: utf-8 -*- Created on Fri Apr 10 18:15:29 2020 @author: admangli #%% # Scale dataset # Split the dataset #%% # Applying dimensionality reduction # First set n_components to 'mle', check explained_variance vector to # determine how many attributes are actually contributing to results...
2.958164
3
BackgroundSubtraction/test_files/exponentialFilter.py
JanuszJSzturo/ImageAnalysis2020
0
6624824
import numpy as np import cv2 cap = cv2.VideoCapture('project.avi') kernel = np.ones((2,2),np.uint8) init_frames = 20 alpha = 0.05 #learning rate [0,1] background = np.zeros(shape=(240,320)) for i in range(init_frames): ret, frame = cap.read() frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) background =...
import numpy as np import cv2 cap = cv2.VideoCapture('project.avi') kernel = np.ones((2,2),np.uint8) init_frames = 20 alpha = 0.05 #learning rate [0,1] background = np.zeros(shape=(240,320)) for i in range(init_frames): ret, frame = cap.read() frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) background =...
en
0.666348
#learning rate [0,1]
2.544658
3
tudo/ex082.py
Ramon-Erik/Exercicios-Python
1
6624825
lista1, par, imp = [], [], [] temp = 0 while True: print('='*46) lista1.append(int(input('Digite um valor: '))) keep = str(input('Deseja continuar? [S/N] ')) if lista1[temp] % 2 == 0: par.append(lista1[temp]) else: imp.append(lista1[temp]) if keep.upper() in 'N': break temp += 1 print('='*46) print('Sua li...
lista1, par, imp = [], [], [] temp = 0 while True: print('='*46) lista1.append(int(input('Digite um valor: '))) keep = str(input('Deseja continuar? [S/N] ')) if lista1[temp] % 2 == 0: par.append(lista1[temp]) else: imp.append(lista1[temp]) if keep.upper() in 'N': break temp += 1 print('='*46) print('Sua li...
none
1
3.637619
4
node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/web.py
Kanishkparganiha/Portfolio-website-using-NextJs-and-Vercel
0
6624826
# -*- coding: utf-8 -*- """ pygments.lexers.web ~~~~~~~~~~~~~~~~~~~ Lexers for web-related languages and markup. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import copy from pygments.lexer import RegexLexer, ExtendedReg...
# -*- coding: utf-8 -*- """ pygments.lexers.web ~~~~~~~~~~~~~~~~~~~ Lexers for web-related languages and markup. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import copy from pygments.lexer import RegexLexer, ExtendedReg...
en
0.324131
# -*- coding: utf-8 -*- pygments.lexers.web ~~~~~~~~~~~~~~~~~~~ Lexers for web-related languages and markup. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. For JavaScript source code. For JSON data structures. *New in Pygments 1.5.* # in...
1.374229
1
iometrics/example.py
sayadi/iometrics
0
6624827
<filename>iometrics/example.py #!/usr/bin/env python3 """ ## Show example usage and example output. ```py from iometrics.example import usage usage() ``` Example output ```markdown | Network (MBytes/s) | Disk Util | Disk MBytes | Disk I/O | | Received | ...
<filename>iometrics/example.py #!/usr/bin/env python3 """ ## Show example usage and example output. ```py from iometrics.example import usage usage() ``` Example output ```markdown | Network (MBytes/s) | Disk Util | Disk MBytes | Disk I/O | | Received | ...
en
0.521031
#!/usr/bin/env python3 ## Show example usage and example output. ```py from iometrics.example import usage usage() ``` Example output ```markdown | Network (MBytes/s) | Disk Util | Disk MBytes | Disk I/O | | Received | Sent | % | MB/s Rea...
2.144371
2
controllers/__init__.py
rfukui/orign
0
6624828
<reponame>rfukui/orign from .insurance_sugestion import insurance_sugestion
from .insurance_sugestion import insurance_sugestion
none
1
1.076089
1
doc/source/cookbook/amrkdtree_downsampling.py
cevans216/yt
0
6624829
<gh_stars>0 # Using AMRKDTree Homogenized Volumes to examine large datasets # at lower resolution. # In this example we will show how to use the AMRKDTree to take a simulation # with 8 levels of refinement and only use levels 0-3 to render the dataset. # Currently this cookbook is flawed in that the data that is cove...
# Using AMRKDTree Homogenized Volumes to examine large datasets # at lower resolution. # In this example we will show how to use the AMRKDTree to take a simulation # with 8 levels of refinement and only use levels 0-3 to render the dataset. # Currently this cookbook is flawed in that the data that is covered by the #...
en
0.923787
# Using AMRKDTree Homogenized Volumes to examine large datasets # at lower resolution. # In this example we will show how to use the AMRKDTree to take a simulation # with 8 levels of refinement and only use levels 0-3 to render the dataset. # Currently this cookbook is flawed in that the data that is covered by the # h...
2.231601
2
test/functional/api/cas/cli.py
mraveendrababu/open-cas-linux
0
6624830
<filename>test/functional/api/cas/cli.py # # Copyright(c) 2019 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause-Clear # import logging LOGGER = logging.getLogger(__name__) casadm_bin = "casadm" casctl = "casctl" def add_core_cmd(cache_id: str, core_dev: str, core_id: str = None, shortcut: bool = False): ...
<filename>test/functional/api/cas/cli.py # # Copyright(c) 2019 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause-Clear # import logging LOGGER = logging.getLogger(__name__) casadm_bin = "casadm" casctl = "casctl" def add_core_cmd(cache_id: str, core_dev: str, core_id: str = None, shortcut: bool = False): ...
en
0.304614
# # Copyright(c) 2019 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause-Clear #
1.928998
2
src/olympia/stats/management/commands/update_counts_from_file.py
Osmose/olympia
0
6624831
<reponame>Osmose/olympia import codecs import json import re from datetime import datetime, timedelta from os import path, unlink from django.conf import settings from django.core.management.base import BaseCommand, CommandError import olympia.core.logger from olympia import amo from olympia.addons.models import Addo...
import codecs import json import re from datetime import datetime, timedelta from os import path, unlink from django.conf import settings from django.core.management.base import BaseCommand, CommandError import olympia.core.logger from olympia import amo from olympia.addons.models import Addon from olympia.stats.mode...
en
0.826584
# Validate a locale: must be like 'fr', 'en-us', 'zap-MX-diiste', ... ^[a-z]{2,3} # General: fr, en, dsb,... (-[A-Z]{2,3})? # Region: -US, -GB, ... (-[a-z]{2,12})?$ # Locality: -valencia, -diiste ^[0-9]{1,3} # Major version: 2, 35 ...
1.834346
2
tests/functional/gtcs/test_sql_join_03.py
reevespaul/firebird-qa
0
6624832
#coding:utf-8 # # id: functional.gtcs.sql_join_03 # title: GTCS/tests/C_SQL_JOIN_3. Ability to run query: ( A LEFT JOIN B ) INER JOIN C, plus ORDER BY with fields not from SELECT list. # decription: # Original test see in: # https://github.com/FirebirdSQL/fbtcs/b...
#coding:utf-8 # # id: functional.gtcs.sql_join_03 # title: GTCS/tests/C_SQL_JOIN_3. Ability to run query: ( A LEFT JOIN B ) INER JOIN C, plus ORDER BY with fields not from SELECT list. # decription: # Original test see in: # https://github.com/FirebirdSQL/fbtcs/b...
en
0.630471
#coding:utf-8 # # id: functional.gtcs.sql_join_03 # title: GTCS/tests/C_SQL_JOIN_3. Ability to run query: ( A LEFT JOIN B ) INER JOIN C, plus ORDER BY with fields not from SELECT list. # decription: # Original test see in: # https://github.com/FirebirdSQL/fbtcs/blob...
1.905919
2
unk_replacer/bin/sort_vocab.py
hitochan777/unk-replacer
3
6624833
import json import argparse from collections import Counter from operator import itemgetter import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) def main(args=None): parser = argparse.ArgumentParser(description='Get sorted vocab') parser.add_argument("vocab", type=str, ...
import json import argparse from collections import Counter from operator import itemgetter import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) def main(args=None): parser = argparse.ArgumentParser(description='Get sorted vocab') parser.add_argument("vocab", type=str, ...
none
1
2.949509
3
toolchain/riscv/MSYS/python/Tools/scripts/fixdiv.py
zhiqiang-hu/bl_iot_sdk
207
6624834
<filename>toolchain/riscv/MSYS/python/Tools/scripts/fixdiv.py #! /usr/bin/env python3 """fixdiv - tool to fix division operators. To use this tool, first run `python -Qwarnall yourscript.py 2>warnings'. This runs the script `yourscript.py' while writing warning messages about all uses of the classic division op...
<filename>toolchain/riscv/MSYS/python/Tools/scripts/fixdiv.py #! /usr/bin/env python3 """fixdiv - tool to fix division operators. To use this tool, first run `python -Qwarnall yourscript.py 2>warnings'. This runs the script `yourscript.py' while writing warning messages about all uses of the classic division op...
en
0.94327
#! /usr/bin/env python3 fixdiv - tool to fix division operators. To use this tool, first run `python -Qwarnall yourscript.py 2>warnings'. This runs the script `yourscript.py' while writing warning messages about all uses of the classic division operator to the file `warnings'. The warnings look like this: <...
2.863456
3
piny/validators.py
jochenparm/piny
0
6624835
from abc import ABC, abstractmethod from typing import Any, Dict, List, Union from .errors import ValidationError LoadedData = Union[Dict[str, Any], List[Any]] class Validator(ABC): """ Abstract base class for optional validator classes Use only to derive new child classes, implement all abstract metho...
from abc import ABC, abstractmethod from typing import Any, Dict, List, Union from .errors import ValidationError LoadedData = Union[Dict[str, Any], List[Any]] class Validator(ABC): """ Abstract base class for optional validator classes Use only to derive new child classes, implement all abstract metho...
en
0.500269
Abstract base class for optional validator classes Use only to derive new child classes, implement all abstract methods Load data, return validated data or raise en error # pragma: no cover Validator class for Pydantic library Validator class for Marshmallow library Validator class for Trafaret library
3.355861
3
ci_output_parser/log_file_parsers/firebase_log_file_parser.py
lzbrooks/ci_output_parser
0
6624836
<filename>ci_output_parser/log_file_parsers/firebase_log_file_parser.py<gh_stars>0 import re from ci_output_parser.log_file_parsers.regex_log_file_parser import RegexLogFileParser class FirebaseLogFileParser(RegexLogFileParser): def __init__(self, log_file_path=None, parser_name="Firebase Lint", output_file_name...
<filename>ci_output_parser/log_file_parsers/firebase_log_file_parser.py<gh_stars>0 import re from ci_output_parser.log_file_parsers.regex_log_file_parser import RegexLogFileParser class FirebaseLogFileParser(RegexLogFileParser): def __init__(self, log_file_path=None, parser_name="Firebase Lint", output_file_name...
none
1
2.651474
3
configs/selfsup/_base_/schedules/adamw_coslr-300e_in1k.py
mitming/mmselfsup
355
6624837
<gh_stars>100-1000 # optimizer optimizer = dict(type='AdamW', lr=6e-4, weight_decay=0.1) optimizer_config = dict() # grad_clip, coalesce, bucket_size_mb # learning policy lr_config = dict( policy='CosineAnnealing', by_epoch=False, min_lr=0., warmup='linear', warmup_iters=40, warmup_ratio=1e-4,...
# optimizer optimizer = dict(type='AdamW', lr=6e-4, weight_decay=0.1) optimizer_config = dict() # grad_clip, coalesce, bucket_size_mb # learning policy lr_config = dict( policy='CosineAnnealing', by_epoch=False, min_lr=0., warmup='linear', warmup_iters=40, warmup_ratio=1e-4, # cannot be 0 ...
en
0.683427
# optimizer # grad_clip, coalesce, bucket_size_mb # learning policy # cannot be 0 # runtime settings
1.730932
2
textx/cli/version.py
hlouzada/textX
346
6624838
try: import click except ImportError: raise Exception('textX must be installed with CLI dependencies to use ' 'textx command.\npip install textX[cli]') def version(textx): @textx.command() def version(): """ Print version info. """ import textx ...
try: import click except ImportError: raise Exception('textX must be installed with CLI dependencies to use ' 'textx command.\npip install textX[cli]') def version(textx): @textx.command() def version(): """ Print version info. """ import textx ...
en
0.426635
Print version info.
2.385669
2
ticdat/testing/run_tests_for_many.py
adampkehoe/ticdat
15
6624839
<reponame>adampkehoe/ticdat<gh_stars>10-100 #useful helper testing script import ticdat.testing.ticdattestutils run_suite = ticdat.testing.ticdattestutils._runSuite from ticdat.testing.testcsv import TestCsv from ticdat.testing.testxls import TestXls from ticdat.testing.testpandas import TestPandas from ticdat.testin...
#useful helper testing script import ticdat.testing.ticdattestutils run_suite = ticdat.testing.ticdattestutils._runSuite from ticdat.testing.testcsv import TestCsv from ticdat.testing.testxls import TestXls from ticdat.testing.testpandas import TestPandas from ticdat.testing.testutils import TestUtils from ticdat.tes...
en
0.369754
#useful helper testing script
2.133072
2
vision/cloud-client/product_search/product_search_test.py
spitfire55/python-docs-samples
1
6624840
<gh_stars>1-10 # Copyright 2016 Google Inc. 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...
# Copyright 2016 Google Inc. 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 applicable law or a...
en
0.848975
# Copyright 2016 Google Inc. 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 applicable law or a...
2.188151
2
OpenGLCffi/GL/EXT/ARB/color_buffer_float.py
cydenix/OpenGLCffi
0
6624841
<reponame>cydenix/OpenGLCffi from OpenGLCffi.GL import params @params(api='gl', prms=['target', 'clamp']) def glClampColorARB(target, clamp): pass
from OpenGLCffi.GL import params @params(api='gl', prms=['target', 'clamp']) def glClampColorARB(target, clamp): pass
none
1
1.705262
2
pypostalwin/src/pypostalwin.py
selva221724/pypostalwin
9
6624842
<filename>pypostalwin/src/pypostalwin.py from subprocess import Popen, PIPE import subprocess def stringToJSON(string): if not string in ['{}']: string = string.replace('{ ', '') string = string.replace('}', '') string = string.replace('"', '') string = string.split(", ") ...
<filename>pypostalwin/src/pypostalwin.py from subprocess import Popen, PIPE import subprocess def stringToJSON(string): if not string in ['{}']: string = string.replace('{ ', '') string = string.replace('}', '') string = string.replace('"', '') string = string.split(", ") ...
none
1
2.855714
3
templates/controller-template.py
yangdanny97/p4-stacklang
0
6624843
#!/usr/bin/env python2 import argparse import grpc import os import sys from time import sleep from headers import * from stitch import * sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'utils/')) import run_exercise import p4runtime_lib.bmv2 from p4runtime_lib.switch import ShutdownAllSwitchC...
#!/usr/bin/env python2 import argparse import grpc import os import sys from time import sleep from headers import * from stitch import * sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'utils/')) import run_exercise import p4runtime_lib.bmv2 from p4runtime_lib.switch import ShutdownAllSwitchC...
en
0.680937
#!/usr/bin/env python2 # Helper function to install forwarding rules # Helper function to install forwarding rules # Instantiate a P4Runtime helper from the p4info file # Establish a P4 Runtime connection to each switch
2.153847
2
places/migrations/0004_auto_20200710_2304.py
huangsam/chowist
11
6624844
# Generated by Django 3.0.8 on 2020-07-10 23:04 from django.conf import settings from django.db import migrations class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("places", "0003_auto_20200708_0719"), ] operations = [ ...
# Generated by Django 3.0.8 on 2020-07-10 23:04 from django.conf import settings from django.db import migrations class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("places", "0003_auto_20200708_0719"), ] operations = [ ...
en
0.810378
# Generated by Django 3.0.8 on 2020-07-10 23:04
1.597487
2
xml2txt.py
kly1997/head_shoulder-detection-by-yolov3
27
6624845
#!/usr/bin/env python # -*- coding:utf-8 -*- # author : kly time:2019/4/15 # coding=utf-8 import os import sys import xml.etree.ElementTree as ET import glob def xml_to_txt(indir): os.chdir(indir) annotations = os.listdir('.') annotations = glob.glob(str(annotations) + '*.xml') for i, file in enumera...
#!/usr/bin/env python # -*- coding:utf-8 -*- # author : kly time:2019/4/15 # coding=utf-8 import os import sys import xml.etree.ElementTree as ET import glob def xml_to_txt(indir): os.chdir(indir) annotations = os.listdir('.') annotations = glob.glob(str(annotations) + '*.xml') for i, file in enumera...
en
0.322645
#!/usr/bin/env python # -*- coding:utf-8 -*- # author : kly time:2019/4/15 # coding=utf-8 # actual parsing # print xn # xml目录
3.097667
3
Task2B.py
HSCam/Flood-Warning-Sytem
0
6624846
<reponame>HSCam/Flood-Warning-Sytem from distutils.command.build import build from floodsystem.stationdata import build_station_list, update_water_levels from floodsystem.flood import stations_level_over_threshold def run(): """Task 2B: Assessing flood risk by relative water level""" stations = build_station_l...
from distutils.command.build import build from floodsystem.stationdata import build_station_list, update_water_levels from floodsystem.flood import stations_level_over_threshold def run(): """Task 2B: Assessing flood risk by relative water level""" stations = build_station_list() update_water_levels(statio...
en
0.881539
Task 2B: Assessing flood risk by relative water level
2.511211
3
requests_cache/backends/gridfs.py
rrosajp/requests-cache
2
6624847
from gridfs import GridFS from pymongo import MongoClient from . import get_valid_kwargs from .base import BaseCache, BaseStorage from .mongo import MongoDict class GridFSCache(BaseCache): """GridFS cache backend. Use this backend to store documents greater than 16MB. Example: >>> requests_cach...
from gridfs import GridFS from pymongo import MongoClient from . import get_valid_kwargs from .base import BaseCache, BaseStorage from .mongo import MongoDict class GridFSCache(BaseCache): """GridFS cache backend. Use this backend to store documents greater than 16MB. Example: >>> requests_cach...
en
0.53584
GridFS cache backend. Use this backend to store documents greater than 16MB. Example: >>> requests_cache.install_cache(backend='gridfs') >>> >>> # Or, to provide custom connection settings: >>> from pymongo import MongoClient >>> requests_cache.install_cache(backend='gr...
2.784301
3
PythonAPI/examples/Tests/countgpu.py
Ayaanfaraz/carla
0
6624848
<gh_stars>0 # #from keras import backend as K # #K.tensorflow_backend._get_available_gpus() # from torchvision import datasets, transforms, models # import torch # from torch import nn # from torch import optim # import torch.nn.functional as F # device = torch.device("cuda" if torch.cuda.is_available() else "cpu") #...
# #from keras import backend as K # #K.tensorflow_backend._get_available_gpus() # from torchvision import datasets, transforms, models # import torch # from torch import nn # from torch import optim # import torch.nn.functional as F # device = torch.device("cuda" if torch.cuda.is_available() else "cpu") # model = mod...
en
0.496978
# #from keras import backend as K # #K.tensorflow_backend._get_available_gpus() # from torchvision import datasets, transforms, models # import torch # from torch import nn # from torch import optim # import torch.nn.functional as F # device = torch.device("cuda" if torch.cuda.is_available() else "cpu") # model = model...
2.296238
2
ArduCAM_Mini_OV2640_Capture_MQTT/mqtt_client_v2.py
ivanshilo/arduino
0
6624849
import paho.mqtt.publish as publish import paho.mqtt.subscribe as subscribe import paho.mqtt.client as mqtt import time import base64 meta = True file_close = False filename = "" local_feed_name = 'camPIC' local_feed_name_command = 'snapPIC' local_feed_name_log = 'camLOG' local_mqtt_server_name = 'asus-lap' usernam...
import paho.mqtt.publish as publish import paho.mqtt.subscribe as subscribe import paho.mqtt.client as mqtt import time import base64 meta = True file_close = False filename = "" local_feed_name = 'camPIC' local_feed_name_command = 'snapPIC' local_feed_name_log = 'camLOG' local_mqtt_server_name = 'asus-lap' usernam...
en
0.887282
# The callback for when the client receives a CONNACK response from the server. # Subscribing in on_connect() means that if we lose the connection and # reconnect then subscriptions will be renewed. # The callback for when a PUBLISH message is received from the server. # we expect for metadata to be sent now # we have ...
2.739947
3
bot/exts/info/pep.py
laundmo/bot
2
6624850
<reponame>laundmo/bot import logging from datetime import datetime, timedelta from email.parser import HeaderParser from io import StringIO from typing import Dict, Optional, Tuple from discord import Colour, Embed from discord.ext.commands import Cog, Context, command from bot.bot import Bot from bot.constants impor...
import logging from datetime import datetime, timedelta from email.parser import HeaderParser from io import StringIO from typing import Dict, Optional, Tuple from discord import Colour, Embed from discord.ext.commands import Cog, Context, command from bot.bot import Bot from bot.constants import Keys from bot.utils....
en
0.87031
Cog for displaying information about PEPs. # To avoid situations where we don't have last datetime, set this to now. Refresh PEP URLs listing in every 3 hours. # Wait until HTTP client is available Get information embed about PEP 0. Validate is PEP number valid. When it isn't, return error embed, otherwise None. Genera...
2.471011
2