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
global_variables.py
akshatsh49/InfoGan
0
6628551
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation import torch import torchvision from torch import optim from torch import nn import torch.nn.functional as F import time import math import os import pickle g_l_file='gen_loss.sav' d_l_file='dis_loss.sav' sample_folder='samples' si_folder=...
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation import torch import torchvision from torch import optim from torch import nn import torch.nn.functional as F import time import math import os import pickle g_l_file='gen_loss.sav' d_l_file='dis_loss.sav' sample_folder='samples' si_folder=...
none
1
2.309663
2
utils/datasets.py
holanlan/pipcook-plugin-pytorch-yolov5-model
0
6628552
<reponame>holanlan/pipcook-plugin-pytorch-yolov5-model import cv2 import numpy as np def letterbox(img, new_shape=(640, 640), color=(114, 114, 114), auto=True, scaleFill=False, scaleup=True): # Resize image to a 32-pixel-multiple rectangle https://github.com/ultralytics/yolov3/issues/232 shape = img.shape[:2] ...
import cv2 import numpy as np def letterbox(img, new_shape=(640, 640), color=(114, 114, 114), auto=True, scaleFill=False, scaleup=True): # Resize image to a 32-pixel-multiple rectangle https://github.com/ultralytics/yolov3/issues/232 shape = img.shape[:2] # current shape [height, width] if isinstance(new_...
en
0.519601
# Resize image to a 32-pixel-multiple rectangle https://github.com/ultralytics/yolov3/issues/232 # current shape [height, width] # Scale ratio (new / old) # only scale down, do not scale up (for better test mAP) # Compute padding # width, height ratios # wh padding # minimum rectangle # wh padding # stretch # width, he...
2.54427
3
app/profile/__init__.py
Ken-mbira/BLOG_SPOT
0
6628553
<reponame>Ken-mbira/BLOG_SPOT<filename>app/profile/__init__.py from flask import Blueprint profile = Blueprint('profile',__name__,url_prefix='/profile') from . import views,forms
from flask import Blueprint profile = Blueprint('profile',__name__,url_prefix='/profile') from . import views,forms
none
1
1.542016
2
ds/chunk_2/intro.py
quydau35/quydau35.github.io
0
6628554
""" Scala Type\n 1. Booleans\n 2. Numbers\n 3. Casting\n 4. String\n 5. Operators\n # Booleans\n Booleans represent one of two values: ```True``` or ```False```.\n When you compare two values, the expression is evaluated and Python returns the Boolean answer:\n ``` print(10 > 9) print(10 >= 9) print(10 == 9) print(10 ...
""" Scala Type\n 1. Booleans\n 2. Numbers\n 3. Casting\n 4. String\n 5. Operators\n # Booleans\n Booleans represent one of two values: ```True``` or ```False```.\n When you compare two values, the expression is evaluated and Python returns the Boolean answer:\n ``` print(10 > 9) print(10 >= 9) print(10 == 9) print(10 ...
en
0.767197
Scala Type\n 1. Booleans\n 2. Numbers\n 3. Casting\n 4. String\n 5. Operators\n # Booleans\n Booleans represent one of two values: ```True``` or ```False```.\n When you compare two values, the expression is evaluated and Python returns the Boolean answer:\n ``` print(10 > 9) print(10 >= 9) print(10 == 9) print(10 < 9)...
4.367694
4
setup.py
Edsger-dev/Edsger
0
6628555
from setuptools import setup, find_packages, Extension from codecs import open # To use a consistent encoding from Cython.Build import cythonize import numpy import os import re requirements = ["cython", "numpy", "pandas", "scipy", "psutil"] setup_requirements = ["cython", "numpy"] test_requirements = ["pytest"] her...
from setuptools import setup, find_packages, Extension from codecs import open # To use a consistent encoding from Cython.Build import cythonize import numpy import os import re requirements = ["cython", "numpy", "pandas", "scipy", "psutil"] setup_requirements = ["cython", "numpy"] test_requirements = ["pytest"] her...
en
0.502471
# To use a consistent encoding # Get the licence
1.972603
2
tools/setup_hall_as_index.py
deafloo/ODrive
1,068
6628556
import odrive from odrive.utils import dump_errors from odrive.enums import * import time print("Finding an odrive...") odrv = odrive.find_any() # axes = [odrv.axis0, odrv.axis1]; axes = [odrv.axis0]; flip_index_search_direction = False save_and_reboot = True print("Setting config...") # Settings to protect batter...
import odrive from odrive.utils import dump_errors from odrive.enums import * import time print("Finding an odrive...") odrv = odrive.find_any() # axes = [odrv.axis0, odrv.axis1]; axes = [odrv.axis0]; flip_index_search_direction = False save_and_reboot = True print("Setting config...") # Settings to protect batter...
en
0.750558
# axes = [odrv.axis0, odrv.axis1]; # Settings to protect battery # If we get here there were no errors, so let's commit the values # Uncomment this if you wish to automatically run index search and closed loop control on boot # ax.config.startup_encoder_index_search = True # ax.config.startup_closed_loop_control = True...
2.336888
2
kitsune/sumo/tests/test_parser.py
The-smooth-operator/kitsune
929
6628557
<reponame>The-smooth-operator/kitsune from functools import partial from django.conf import settings from nose.tools import eq_ from pyquery import PyQuery as pq from kitsune.gallery.tests import ImageFactory from kitsune.sumo.parser import ( WikiParser, build_hook_params, _get_wiki_link, get_object_...
from functools import partial from django.conf import settings from nose.tools import eq_ from pyquery import PyQuery as pq from kitsune.gallery.tests import ImageFactory from kitsune.sumo.parser import ( WikiParser, build_hook_params, _get_wiki_link, get_object_fallback, IMAGE_PARAMS, IMAGE_...
en
0.704033
get_object_fallback returns message when no objects. # English does not exist # Create the English document # Now it exists # Create the English document # Returns English document for French # Create English parent document # Create the French document # Also works when English exists If a localization of the English ...
2.156659
2
CursoEmVideo/pythonProject/ex109/testing.py
cassio645/Aprendendo-python
0
6628558
<reponame>cassio645/Aprendendo-python from ex109 import moeda preco = float(input('Digite o preço: R$ ')) while True: condicao = str(input('Deseja formatado como moeda?[S/N]: ')).upper().strip()[0] if condicao in 'SN': if condicao == 'S': formatar = True break else: ...
from ex109 import moeda preco = float(input('Digite o preço: R$ ')) while True: condicao = str(input('Deseja formatado como moeda?[S/N]: ')).upper().strip()[0] if condicao in 'SN': if condicao == 'S': formatar = True break else: formatar = False b...
none
1
3.491388
3
Deliverables/network_2.py
ScottGKirkpatrick/466PA5
0
6628559
import queue import threading from link_2 import LinkFrame class MPLSlabel: labelLength = 5 ## initialize the frame and label def __init__(self, frame, label): self.frame = frame self.label = label ## called when printing the object def __str__(self): return self.to_byte...
import queue import threading from link_2 import LinkFrame class MPLSlabel: labelLength = 5 ## initialize the frame and label def __init__(self, frame, label): self.frame = frame self.label = label ## called when printing the object def __str__(self): return self.to_byte...
en
0.724708
## initialize the frame and label ## called when printing the object ## Sets the back of it with the label and fills the rest with zeros, then appends this to the packet ##decode our label from byte_S ## wrapper class for a queue of packets ## @param maxsize - the maximum size of the queue storing packets # @param cap...
3.249307
3
resources/library/pycontrol/src/soccer_pycontrol/footpath.py
utra-robosoccer/Bez_IsaacGym
0
6628560
<filename>resources/library/pycontrol/src/soccer_pycontrol/footpath.py import numpy as np import math import enum from resources.library.pycontrol.src.soccer_pycontrol.path import Path from resources.library.geometry.src.soccer_geometry.transformation import Transformation as tr import matplotlib.pyplot as plt from cop...
<filename>resources/library/pycontrol/src/soccer_pycontrol/footpath.py import numpy as np import math import enum from resources.library.pycontrol.src.soccer_pycontrol.path import Path from resources.library.geometry.src.soccer_geometry.transformation import Transformation as tr import matplotlib.pyplot as plt from cop...
en
0.711564
# TODO: where is first_step_left???? # Duration difference between half and full step # seperation between feet and center # height of step # First foot # fix in matlab function rounds to nearest integer towards 0 # fix function in matlab # fix function in matlab # Second foot # fix in matlab function rounds to nearest...
2.312612
2
probez/file_handling/recording_io.py
Sepidak/spikeGUI
0
6628561
import math import os import struct from itertools import compress import numpy as np from file_handling import binary_classes from util import detrending class RecordingIo: def __init__(self, path, n_chan): self.path = path self.root = os.path.split(path)[0] self.file_n...
import math import os import struct from itertools import compress import numpy as np from file_handling import binary_classes from util import detrending class RecordingIo: def __init__(self, path, n_chan): self.path = path self.root = os.path.split(path)[0] self.file_n...
en
0.77702
# define normal chunk # this is a problem if the last chunk is very small # define final chunk :param file f_in: :param struct.Struct chunk_struct: :return: :param data: :param chunk_struct: :return: # reshape into packable format # pack # TODO: make this work for both chunk and data...
2.541854
3
visan/plot/axispropertypanel.py
ercumentaksoy/visan
7
6628562
# Copyright (C) 2002-2021 S[&]T, The Netherlands. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of condi...
# Copyright (C) 2002-2021 S[&]T, The Netherlands. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of condi...
en
0.728187
# Copyright (C) 2002-2021 S[&]T, The Netherlands. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of condi...
1.288332
1
venv/lib/python2.7/site-packages/pyramid/scaffolds/__init__.py
bhavul/GIDS-Endurance-Hacker-Puzzle
0
6628563
import binascii import os from textwrap import dedent from pyramid.compat import native_ from pyramid.scaffolds.template import Template # API class PyramidTemplate(Template): """ A class that can be used as a base class for Pyramid scaffolding templates. """ def pre(self, command, output_dir,...
import binascii import os from textwrap import dedent from pyramid.compat import native_ from pyramid.scaffolds.template import Template # API class PyramidTemplate(Template): """ A class that can be used as a base class for Pyramid scaffolding templates. """ def pre(self, command, output_dir,...
en
0.679873
# API A class that can be used as a base class for Pyramid scaffolding templates. Overrides :meth:`pyramid.scaffolds.template.Template.pre`, adding several variables to the default variables list (including ``random_string``, and ``package_logger``). It also prevents common misnamings (suc...
2.583869
3
ML_CW1/assgn_1_part_1/3_regularized_linear_regression/compute_cost.py
ShellySrivastava/Machine-Learning
0
6628564
<reponame>ShellySrivastava/Machine-Learning from calculate_hypothesis import * def compute_cost(X, y, theta): """ :param X : 2D array of our dataset :param y : 1D array of the groundtruth labels of the dataset :param theta : 1D array of the trainable parameters ...
from calculate_hypothesis import * def compute_cost(X, y, theta): """ :param X : 2D array of our dataset :param y : 1D array of the groundtruth labels of the dataset :param theta : 1D array of the trainable parameters """ # initialize cost J = 0...
en
0.392899
:param X : 2D array of our dataset :param y : 1D array of the groundtruth labels of the dataset :param theta : 1D array of the trainable parameters # initialize cost # get number of training examples
3.463728
3
outputs/apps.py
jayvdb/django-outputs
0
6628565
<filename>outputs/apps.py from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from django.db.utils import ProgrammingError class OutputsConfig(AppConfig): name = 'outputs' verbose_name = _('Outputs') def ready(self): try: self.schedule_jobs() ...
<filename>outputs/apps.py from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from django.db.utils import ProgrammingError class OutputsConfig(AppConfig): name = 'outputs' verbose_name = _('Outputs') def ready(self): try: self.schedule_jobs() ...
none
1
2.023039
2
setup.py
whn09/fastmoe
0
6628566
import setuptools from torch.utils.cpp_extension import BuildExtension, CUDAExtension import os cxx_flags = [] ext_libs = [] if os.environ.get('USE_NCCL', '0') == '1': cxx_flags.append('-DMOE_USE_NCCL') ext_libs.append('nccl') if __name__ == '__main__': setuptools.setup( name='fastmoe', ...
import setuptools from torch.utils.cpp_extension import BuildExtension, CUDAExtension import os cxx_flags = [] ext_libs = [] if os.environ.get('USE_NCCL', '0') == '1': cxx_flags.append('-DMOE_USE_NCCL') ext_libs.append('nccl') if __name__ == '__main__': setuptools.setup( name='fastmoe', ...
none
1
1.567172
2
python/trezorlib/tests/device_tests/test_msg_signtx.py
Kayuii/trezor-crypto
0
6628567
# This file is part of the Trezor project. # # Copyright (C) 2012-2018 SatoshiLabs and contributors # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # This library is distrib...
# This file is part of the Trezor project. # # Copyright (C) 2012-2018 SatoshiLabs and contributors # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # This library is distrib...
en
0.616248
# This file is part of the Trezor project. # # Copyright (C) 2012-2018 SatoshiLabs and contributors # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # This library is distrib...
1.633751
2
src/profiles/migrations/0006_alter_relationship_managers.py
OmarYehia/django-social_network
0
6628568
# Generated by Django 3.2 on 2021-05-03 01:57 from django.db import migrations import django.db.models.manager class Migration(migrations.Migration): dependencies = [ ('profiles', '0005_profile_slug'), ] operations = [ migrations.AlterModelManagers( name='relationship', ...
# Generated by Django 3.2 on 2021-05-03 01:57 from django.db import migrations import django.db.models.manager class Migration(migrations.Migration): dependencies = [ ('profiles', '0005_profile_slug'), ] operations = [ migrations.AlterModelManagers( name='relationship', ...
en
0.89182
# Generated by Django 3.2 on 2021-05-03 01:57
1.648315
2
jupyterlab_code_formatter/handlers.py
edrogersamfam/jupyterlab_code_formatter
0
6628569
<gh_stars>0 import json from notebook.notebookapp import NotebookWebApplication from notebook.utils import url_path_join from notebook.base.handlers import APIHandler from jupyterlab_code_formatter.formatters import SERVER_FORMATTERS def setup_handlers(web_app: NotebookWebApplication) -> None: host_pattern = "....
import json from notebook.notebookapp import NotebookWebApplication from notebook.utils import url_path_join from notebook.base.handlers import APIHandler from jupyterlab_code_formatter.formatters import SERVER_FORMATTERS def setup_handlers(web_app: NotebookWebApplication) -> None: host_pattern = ".*$" web_...
en
0.945489
Show what formatters are installed and avaliable.
2.413022
2
aula20/aula20.py
jessicsous/Curso_Python
1
6628570
<reponame>jessicsous/Curso_Python # índices # 0123456789.......................33 frase = 'o rato roeu a roupa do rei de roma' tamanho_frase = len(frase) contador = 0 # iteração while contador < tamanho_frase: print(frase[contador], contador) contador += 1
# índices # 0123456789.......................33 frase = 'o rato roeu a roupa do rei de roma' tamanho_frase = len(frase) contador = 0 # iteração while contador < tamanho_frase: print(frase[contador], contador) contador += 1
pt
0.799449
# índices # 0123456789.......................33 # iteração
3.559556
4
var/spack/repos/builtin/packages/r-testthat/package.py
xiki-tempula/spack
1
6628571
<gh_stars>1-10 # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RTestthat(RPackage): """A unit testing system designed to be fun, flexible ...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RTestthat(RPackage): """A unit testing system designed to be fun, flexible and easy to set...
en
0.793905
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) A unit testing system designed to be fun, flexible and easy to set up.
1.731004
2
tests/api/server/test_locations.py
FlorianRhiem/sampledb
0
6628572
<filename>tests/api/server/test_locations.py # coding: utf-8 """ """ import requests import pytest import json import sampledb import sampledb.logic import sampledb.models from tests.test_utils import flask_server, app, app_context @pytest.fixture def auth_user(flask_server): with flask_server.app.app_contex...
<filename>tests/api/server/test_locations.py # coding: utf-8 """ """ import requests import pytest import json import sampledb import sampledb.logic import sampledb.models from tests.test_utils import flask_server, app, app_context @pytest.fixture def auth_user(flask_server): with flask_server.app.app_contex...
en
0.833554
# coding: utf-8
2.353326
2
versions/version_names.bzl
actions-on-google/gactions
49
6628573
<reponame>actions-on-google/gactions<filename>versions/version_names.bzl """Contains the version of the app.""" # The app version consists follows semantic versioning. # # We need to manually update this version after we make a new release. Generally, # APP_VERSION points to the next immedtiate version successor. # # ...
"""Contains the version of the app.""" # The app version consists follows semantic versioning. # # We need to manually update this version after we make a new release. Generally, # APP_VERSION points to the next immedtiate version successor. # # The process for updating this should be: # 1. Spin off a new release. # 2...
en
0.851494
Contains the version of the app. # The app version consists follows semantic versioning. # # We need to manually update this version after we make a new release. Generally, # APP_VERSION points to the next immedtiate version successor. # # The process for updating this should be: # 1. Spin off a new release. # 2. Deplo...
1.145538
1
src/roles/succubus.py
ThijsEigenwijs/lykos
0
6628574
<filename>src/roles/succubus.py import re import random import itertools import math from collections import defaultdict from src.utilities import * from src import channels, users, debuglog, errlog, plog from src.functions import get_players, get_all_players, get_main_role, get_reveal_role, get_target from src.decora...
<filename>src/roles/succubus.py import re import random import itertools import math from collections import defaultdict from src.utilities import * from src import channels, users, debuglog, errlog, plog from src.functions import get_players, get_all_players, get_main_role, get_reveal_role, get_target from src.decora...
en
0.892886
# type: Set[users.User] # type: Dict[users.User, users.User] # type: Set[users.User] Entrance a player, converting them to your team. Do not entrance someone tonight. # entranced logic should run after team wins have already been determined (aka run last) # if it's night, also unentrance the person they visited # if al...
2.186222
2
src/mtenv/tests/wrappers/ntasks_test.py
NagisaZj/ac-teach
56
6628575
<filename>src/mtenv/tests/wrappers/ntasks_test.py # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import List import pytest from mtenv.envs.control.cartpole import MTCartPole from mtenv.wrappers.ntasks import NTasks as NTasksWrapper from tests.utils.utils import validate_mtenv d...
<filename>src/mtenv/tests/wrappers/ntasks_test.py # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import List import pytest from mtenv.envs.control.cartpole import MTCartPole from mtenv.wrappers.ntasks import NTasks as NTasksWrapper from tests.utils.utils import validate_mtenv d...
en
0.928377
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
2.317034
2
rally-jobs/plugins/vpn_utils.py
swordboy/neutron-vpnaas-7.0.0-vpnenhance
2
6628576
<reponame>swordboy/neutron-vpnaas-7.0.0-vpnenhance # Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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/li...
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
en
0.710367
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
1.766095
2
slam.py
Noob-can-Compile/Crap_SLAM
0
6628577
import time import cv2 import numpy as np from display import Display from extractor import Extractor width = 1280//2 #1920//2 height = 720//2 #1080//2 disp = Display(width, height) fe = Extractor() def frames_per_motion(img): img = cv2.resize(img, (width, height)) matches = fe.extract(img) pri...
import time import cv2 import numpy as np from display import Display from extractor import Extractor width = 1280//2 #1920//2 height = 720//2 #1080//2 disp = Display(width, height) fe = Extractor() def frames_per_motion(img): img = cv2.resize(img, (width, height)) matches = fe.extract(img) pri...
en
0.564681
#1920//2 #1080//2
2.694841
3
tests/base_tests/test_view_base_view.py
fy0/mapi
50
6628578
<reponame>fy0/mapi import json import pytest from slim.base._view.base_view import BaseView from slim.base.web import FileField from slim import Application, ALL_PERMISSION from slim.exception import PermissionDenied, InvalidPostData from slim.retcode import RETCODE from slim.tools.test import invoke_interface, make_m...
import json import pytest from slim.base._view.base_view import BaseView from slim.base.web import FileField from slim import Application, ALL_PERMISSION from slim.exception import PermissionDenied, InvalidPostData from slim.retcode import RETCODE from slim.tools.test import invoke_interface, make_mocked_request pyte...
none
1
1.956408
2
backend/api/serializers/model_year_report.py
bcgov/zeva
3
6628579
<reponame>bcgov/zeva from enumfields.drf import EnumField, EnumSupportSerializerMixin from rest_framework.serializers import ModelSerializer, \ SerializerMethodField, SlugRelatedField, CharField, \ ListField from api.models.model_year import ModelYear from api.models.model_year_report_confirmation import \ ...
from enumfields.drf import EnumField, EnumSupportSerializerMixin from rest_framework.serializers import ModelSerializer, \ SerializerMethodField, SlugRelatedField, CharField, \ ListField from api.models.model_year import ModelYear from api.models.model_year_report_confirmation import \ ModelYearReportConfi...
en
0.972627
# validation_status = EnumField(ModelYearReportStatuses) # get information on who created the record # this record was created by idir but # should show up as supplementary returned # bceid and idir can see just 'reassessed' as status # created by idir and viewed by idir, they can see # draft or recommended status # if...
1.955661
2
dbfread/exceptions.py
neurohn/dbfread
3
6628580
<filename>dbfread/exceptions.py class DBFNotFound(IOError): """Raised if the DBF file was not found.""" pass class MissingMemoFile(IOError): """Raised if the corresponding memo file was not found.""" __all__ = ['DBFNotFound', 'MissingMemoFile']
<filename>dbfread/exceptions.py class DBFNotFound(IOError): """Raised if the DBF file was not found.""" pass class MissingMemoFile(IOError): """Raised if the corresponding memo file was not found.""" __all__ = ['DBFNotFound', 'MissingMemoFile']
en
0.970595
Raised if the DBF file was not found. Raised if the corresponding memo file was not found.
2.456555
2
normalization.py
cadurosar/graph_filter
0
6628581
#from https://github.com/Tiiiger/SGC import numpy as np import scipy.sparse as sp import torch def normalized_laplacian(adj): adj = sp.coo_matrix(adj) row_sum = np.array(adj.sum(1)) d_inv_sqrt = np.power(row_sum, -0.5).flatten() d_inv_sqrt[np.isinf(d_inv_sqrt)] = 0. d_mat_inv_sqrt = sp.diags(d_inv_sqrt...
#from https://github.com/Tiiiger/SGC import numpy as np import scipy.sparse as sp import torch def normalized_laplacian(adj): adj = sp.coo_matrix(adj) row_sum = np.array(adj.sum(1)) d_inv_sqrt = np.power(row_sum, -0.5).flatten() d_inv_sqrt[np.isinf(d_inv_sqrt)] = 0. d_mat_inv_sqrt = sp.diags(d_inv_sqrt...
en
0.641594
#from https://github.com/Tiiiger/SGC # A' = I - D^-1/2 * A * D^-1/2 # A' = D - A # A' = I - D^-1 * A # A' = I + D^-1/2 * A * D^-1/2 # A' = (D + I)^-1/2 * ( A + I ) * (D + I)^-1/2 # D^-1/2 * A * D^-1/2 # A' = D^-1*A # A' = (D + I)^-1*(A + I) # A' = A # A' = A Row-normalize sparse matrix
2.186975
2
src/oci/healthchecks/models/ping_probe_result_summary.py
Manny27nyc/oci-python-sdk
249
6628582
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
en
0.787965
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
1.705123
2
dev/08_01_2018/Relay_Controller_Test.py
npwebste/UPS_Controller
0
6628583
<gh_stars>0 # ©2018 The Arizona Board of Regents for and on behalf of Arizona State University and the Laboratory for Energy And Power Solutions, All Rights Reserved. # # Universal Power System Controller # USAID Middle East Water Security Initiative # # Developed by: <NAME> # Primary Investigator: <NAME> # # Version H...
# ©2018 The Arizona Board of Regents for and on behalf of Arizona State University and the Laboratory for Energy And Power Solutions, All Rights Reserved. # # Universal Power System Controller # USAID Middle East Water Security Initiative # # Developed by: <NAME> # Primary Investigator: <NAME> # # Version History (mm_d...
en
0.65363
# ©2018 The Arizona Board of Regents for and on behalf of Arizona State University and the Laboratory for Energy And Power Solutions, All Rights Reserved. # # Universal Power System Controller # USAID Middle East Water Security Initiative # # Developed by: <NAME> # Primary Investigator: <NAME> # # Version History (mm_d...
1.603212
2
src/HelloWorld_On_BAMS.py
rsoscia/BAMS-to-NeuroLex
1
6628584
<gh_stars>1-10 #import os #import zipfile #fh = open('BAMMMMMM.xml.zip','rb') #print("the ZIP is of length: %s " %size(fh)) import rdflib import os import zipfile #Get a Graph object g = rdflib.Graph() # pull in an RDF document from NeuroLex, parse, and store. zip = zipfile.ZipFile("/Users/ryansoscia/BAMS-to-Neuro...
#import os #import zipfile #fh = open('BAMMMMMM.xml.zip','rb') #print("the ZIP is of length: %s " %size(fh)) import rdflib import os import zipfile #Get a Graph object g = rdflib.Graph() # pull in an RDF document from NeuroLex, parse, and store. zip = zipfile.ZipFile("/Users/ryansoscia/BAMS-to-NeuroLex/src/BAMMMMM...
en
0.479228
#import os #import zipfile #fh = open('BAMMMMMM.xml.zip','rb') #print("the ZIP is of length: %s " %size(fh)) #Get a Graph object # pull in an RDF document from NeuroLex, parse, and store. #result = g.parse("http://neurolex.org/wiki/Special:ExportRDF/birnlex_1489", format="application/rdf+xml") #def extract('BAMMMMMM.xm...
2.758848
3
dev_db_example/core/models.py
tschellenbach/dev_db
5
6628585
<reponame>tschellenbach/dev_db from django.db import models from django.contrib.auth.models import User # Create your models here. ''' Some example models to demo the dev_db script ''' class SiteCategory(models.Model): name = models.CharField(max_length=255) class Site(models.Model): category = model...
from django.db import models from django.contrib.auth.models import User # Create your models here. ''' Some example models to demo the dev_db script ''' class SiteCategory(models.Model): name = models.CharField(max_length=255) class Site(models.Model): category = models.ForeignKey(SiteCategory) ...
en
0.836543
# Create your models here. Some example models to demo the dev_db script #url = models.TextField() # these two models are here to test if things break # when relations go two ways (infinite loops etcs)
2.68271
3
Python/Subtract the Product and Sum of Digits of an Integer.py
gbrough/LeetCode
0
6628586
class Solution: def subtractProductAndSum(self, n: int) -> int: prodTotal = 1 sumTotal = 0 numbers = str(n) #loop through numbers and multiple each i and set to prodTotal, and sum of each i set to sumTotal for i in numbers: prodTotal *= int(i) ...
class Solution: def subtractProductAndSum(self, n: int) -> int: prodTotal = 1 sumTotal = 0 numbers = str(n) #loop through numbers and multiple each i and set to prodTotal, and sum of each i set to sumTotal for i in numbers: prodTotal *= int(i) ...
en
0.824806
#loop through numbers and multiple each i and set to prodTotal, and sum of each i set to sumTotal #subtract result of prodTotal from result of sumTotal
3.673888
4
style/styled_string.py
codacy-badger/style
0
6628587
<filename>style/styled_string.py import style class _StyledString(str): def __new__(cls, style_list, sep, *objects): return super(_StyledString, cls).__new__(cls, sep.join([str(obj) for obj in objects])) def __init__(self, style_list, sep, *objects): self._style_start = ';'.join([str(s[0]) f...
<filename>style/styled_string.py import style class _StyledString(str): def __new__(cls, style_list, sep, *objects): return super(_StyledString, cls).__new__(cls, sep.join([str(obj) for obj in objects])) def __init__(self, style_list, sep, *objects): self._style_start = ';'.join([str(s[0]) f...
none
1
2.75571
3
example/example.py
kyrias/flask-kerberos
31
6628588
#!/usr/bin/env python from flask import Flask from flask import render_template from flask_kerberos import init_kerberos from flask_kerberos import requires_authentication DEBUG=True app = Flask(__name__) app.config.from_object(__name__) @app.route("/") @requires_authentication def index(user): return render_t...
#!/usr/bin/env python from flask import Flask from flask import render_template from flask_kerberos import init_kerberos from flask_kerberos import requires_authentication DEBUG=True app = Flask(__name__) app.config.from_object(__name__) @app.route("/") @requires_authentication def index(user): return render_t...
ru
0.26433
#!/usr/bin/env python
2.131829
2
src/xrootiface.py
LovisaLugnegard/wopiserver
0
6628589
''' xrootiface.py XRootD interface for the WOPI server for CERNBox Author: Gi<EMAIL>ppe.<EMAIL>, CERN/IT-ST Contributions: <EMAIL> ''' import time from XRootD import client as XrdClient from XRootD.client.flags import OpenFlags, QueryCode # module-wide state config = None log = None xrdfs = {} # this is to map e...
''' xrootiface.py XRootD interface for the WOPI server for CERNBox Author: Gi<EMAIL>ppe.<EMAIL>, CERN/IT-ST Contributions: <EMAIL> ''' import time from XRootD import client as XrdClient from XRootD.client.flags import OpenFlags, QueryCode # module-wide state config = None log = None xrdfs = {} # this is to map e...
en
0.771543
xrootiface.py XRootD interface for the WOPI server for CERNBox Author: Gi<EMAIL>ppe.<EMAIL>, CERN/IT-ST Contributions: <EMAIL> # module-wide state # this is to map each endpoint [string] to its XrdClient Look up the xrootd client for the given endpoint, create it if missing. Supports "default" for the defaultstorage ...
2.553645
3
agro_site/sales_backend/migrations/0004_auto_20220424_1054.py
LukoninDmitryPy/agro_site-2
0
6628590
# Generated by Django 2.2.16 on 2022-04-24 07:54 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('sales_backend', '0003_auto_20220423_1218'), ] operations = [ migrations.CreateModel( name='Rat...
# Generated by Django 2.2.16 on 2022-04-24 07:54 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('sales_backend', '0003_auto_20220423_1218'), ] operations = [ migrations.CreateModel( name='Rat...
en
0.81084
# Generated by Django 2.2.16 on 2022-04-24 07:54
1.542182
2
battlefield_rcon/connection.py
Eegras/python-battlefield-rcon
3
6628591
import binascii import socket from battlefield_rcon.utils import ( generate_password_hash, create_packet, contains_complete_packet, decode_packet, encode_packet, ) from battlefield_rcon.exceptions import RCONLoginRequiredException, RCONAuthException class RCONConnection(object): def __init__...
import binascii import socket from battlefield_rcon.utils import ( generate_password_hash, create_packet, contains_complete_packet, decode_packet, encode_packet, ) from battlefield_rcon.exceptions import RCONLoginRequiredException, RCONAuthException class RCONConnection(object): def __init__...
none
1
2.657784
3
pybite5.py
mladuke/Algorithms
0
6628592
NAMES = ['<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>'] def dedup_and_title_case_names(names): """Should return a list of title cased names, each name appears only once""" return [x.title() for...
NAMES = ['<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>'] def dedup_and_title_case_names(names): """Should return a list of title cased names, each name appears only once""" return [x.title() for...
en
0.824854
Should return a list of title cased names, each name appears only once Returns names list sorted desc by surname Returns the shortest first name (str). You can assume there is only one shortest name.
4.185545
4
auto-test/tapplet/acl/acl_rest_test.py
asterfusion/Tapplet
1
6628593
from tools.conftest_tools import * from tools.rest_tools import * from tools.tcpreplay_tools import * import json from pytest_main import port1_config from pytest_main import port2_config from pytest_main import sf_helper from pytest_main import global_verbose import time mod_name = "acl" rule_tuple6_model = { "g...
from tools.conftest_tools import * from tools.rest_tools import * from tools.tcpreplay_tools import * import json from pytest_main import port1_config from pytest_main import port2_config from pytest_main import sf_helper from pytest_main import global_verbose import time mod_name = "acl" rule_tuple6_model = { "g...
en
0.489111
创建未创建规则 # clean up all config 创建已创建规则,失败 # clean up all config 更新已/未创建规则 # clean up all config 删除规则 # clean up all config # create rule # delete rule # create rule # delete rule ( url with group ) # create rule # delete rule ( url with group and index ) 获取单条/多条计数 # clean up all config # create rule 获取过多计数 # clean up al...
1.837273
2
ajax_upload/tests/tests.py
ixc/django-ajax-upload-widget
47
6628594
import json import os import unittest from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase from django.utils.translation import ugettext as _ from ajax_upload.models import UploadedFile from ajax_upload.widgets import AjaxUploadException TEST_FILEPATH = os.p...
import json import os import unittest from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase from django.utils.translation import ugettext as _ from ajax_upload.models import UploadedFile from ajax_upload.widgets import AjaxUploadException TEST_FILEPATH = os.p...
en
0.94889
# Delete all uploaded files created during testing # This is a not-so-good test to verify that the filename name is modified # First ajax upload the file to the uploader # Now submit the original form with the path of the uploaded file # We're testing both AjaxFileField and AjaxImageField # In this scenario, we're simu...
2.416498
2
entry.py
RyderTheCoder/gui-learning
0
6628595
from Tkinter import * top = Tk() L1 = Label(top, text="User Name") L1.pack( side = LEFT) E1 = Entry(top, bd =5) E1.pack(side = RIGHT) L2 = Label(top, text="And Password") L2.pack( side = LEFT) E2 = Entry(top, bd =5) E2.pack(side = RIGHT) top.mainloop()
from Tkinter import * top = Tk() L1 = Label(top, text="User Name") L1.pack( side = LEFT) E1 = Entry(top, bd =5) E1.pack(side = RIGHT) L2 = Label(top, text="And Password") L2.pack( side = LEFT) E2 = Entry(top, bd =5) E2.pack(side = RIGHT) top.mainloop()
none
1
3.33076
3
appinit_backend/app/lib/permissions/apis/edit.py
app-init/backend
1
6628596
from appinit_backend.lib.imports import * import appinit_backend.app.lib.permissions.apis.get as get_api def call(**kwargs): manager = Manager() db = manager.db("appinit") if "id" in kwargs: if "safe_name" in kwargs: del kwargs["safe_name"] cursor = db.permissions.find_one({"module": k...
from appinit_backend.lib.imports import * import appinit_backend.app.lib.permissions.apis.get as get_api def call(**kwargs): manager = Manager() db = manager.db("appinit") if "id" in kwargs: if "safe_name" in kwargs: del kwargs["safe_name"] cursor = db.permissions.find_one({"module": k...
en
0.910906
# every api has this added as an attribute # it reinitializes the change # Modules.reinit()
2.277888
2
Raif/pyspark/run_calc_05.py
musicnova/7a_task
0
6628597
<reponame>musicnova/7a_task<filename>Raif/pyspark/run_calc_05.py # -*- coding: utf-8 -*- import os from datetime import datetime, timedelta from airflow import DAG from airflow.models import Variable from airflow.operators.bash_operator import BashOperator from airflow.operators.dummy_operator import DummyOpera...
# -*- coding: utf-8 -*- import os from datetime import datetime, timedelta from airflow import DAG from airflow.models import Variable from airflow.operators.bash_operator import BashOperator from airflow.operators.dummy_operator import DummyOperator u""" Airflow script for calc_05 """ ALERT_MAILS = Var...
en
0.160199
# -*- coding: utf-8 -*- Airflow script for calc_05 # setting default arguments of dag # Creating DAG with parameters kinit airflow/airflow@HOME.LOCAL -kt /opt/airflow/airflow_home/kt/airflow.keytab spark-submit --master yarn \ --num-executors {{ params.partitions }} \ --executor-cores 3 \ --executor-memory 6G \ --...
2.033567
2
03-urls/pylons/app.py
sanogotech/benchmarchpythonweb
0
6628598
import os import sys from samples import features from samples import sections conf_dir = os.path.dirname(os.path.abspath(__file__)) conf_dir = os.path.join(conf_dir, 'helloworld') sys.path.insert(0, conf_dir) from helloworld.config.middleware import make_app main = make_app({}, full_stack=False, static_files=False,...
import os import sys from samples import features from samples import sections conf_dir = os.path.dirname(os.path.abspath(__file__)) conf_dir = os.path.join(conf_dir, 'helloworld') sys.path.insert(0, conf_dir) from helloworld.config.middleware import make_app main = make_app({}, full_stack=False, static_files=False,...
none
1
2.306
2
tensorflow_probability/python/experimental/mcmc/particle_filter_test.py
brianwa84/probability
1
6628599
# Copyright 2020 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the _License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
# Copyright 2020 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the _License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
en
0.83261
# Copyright 2020 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the _License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
2.290103
2
froide/foirequestfollower/views.py
okko/tietopyynto
3
6628600
from django.shortcuts import get_object_or_404, redirect from django.views.decorators.http import require_POST from django.utils.translation import ugettext_lazy as _ from django.contrib import messages from froide.foirequest.models import FoiRequest from froide.foirequest.views import show from .models import FoiReq...
from django.shortcuts import get_object_or_404, redirect from django.views.decorators.http import require_POST from django.utils.translation import ugettext_lazy as _ from django.contrib import messages from froide.foirequest.models import FoiRequest from froide.foirequest.views import show from .models import FoiReq...
none
1
2.256151
2
pymaginopolis/chunkyfile/chunkxml.py
benstone/pymaginopolis
9
6628601
import base64 import logging import pathlib from xml.etree import ElementTree from xml.dom import minidom from pymaginopolis.chunkyfile import model as model, codecs as codecs EMPTY_FILE = "EmpT" def chunky_file_to_xml(this_file, chunk_data_dir=None): """ Generate an XML representation of a chunky file ...
import base64 import logging import pathlib from xml.etree import ElementTree from xml.dom import minidom from pymaginopolis.chunkyfile import model as model, codecs as codecs EMPTY_FILE = "EmpT" def chunky_file_to_xml(this_file, chunk_data_dir=None): """ Generate an XML representation of a chunky file ...
en
0.680926
Generate an XML representation of a chunky file :param this_file: chunky file object :param chunk_data_dir: optional, directory to write chunk data files to :return: string containing XML representation of a chunky file # Generate XML document # Add children # Add data # HACK # Create element for data # Pre...
2.711871
3
moclo/moclo/kits/__init__.py
althonos/automoclo
10
6628602
<filename>moclo/moclo/kits/__init__.py # coding: utf-8 # noqa: D104 """Namespace package for concrete MoClo implementations. """ __path__ = __import__("pkgutil").extend_path(__path__, __name__)
<filename>moclo/moclo/kits/__init__.py # coding: utf-8 # noqa: D104 """Namespace package for concrete MoClo implementations. """ __path__ = __import__("pkgutil").extend_path(__path__, __name__)
en
0.594517
# coding: utf-8 # noqa: D104 Namespace package for concrete MoClo implementations.
1.419588
1
proxyclient/find_sprr_regs.py
jannau/m1n1
0
6628603
from setup import * from find_regs import find_regs, static_regs import asm p.iodev_set_usage(IODEV.FB, 0) if u.mrs(SPRR_CONFIG_EL1): u.msr(GXF_CONFIG_EL12, 0) u.msr(SPRR_CONFIG_EL12, 0) u.msr(GXF_CONFIG_EL1, 0) u.msr(SPRR_CONFIG_EL1, 0) # Set up HCR_EL2 for EL1, since we can't do it after enabling G...
from setup import * from find_regs import find_regs, static_regs import asm p.iodev_set_usage(IODEV.FB, 0) if u.mrs(SPRR_CONFIG_EL1): u.msr(GXF_CONFIG_EL12, 0) u.msr(SPRR_CONFIG_EL12, 0) u.msr(GXF_CONFIG_EL1, 0) u.msr(SPRR_CONFIG_EL1, 0) # Set up HCR_EL2 for EL1, since we can't do it after enabling G...
en
0.963906
# Set up HCR_EL2 for EL1, since we can't do it after enabling GXF
2.058378
2
create_rainbow.py
gnu-user/cryptography-course
0
6628604
<gh_stars>0 #!/usr/bin/env python2 ############################################################################## # # Script which creates a SHA-1 rainbow table of the passwords provided # # Copyright (C) 2014, <NAME> (100437638) # All rights reserved. # #################################################################...
#!/usr/bin/env python2 ############################################################################## # # Script which creates a SHA-1 rainbow table of the passwords provided # # Copyright (C) 2014, <NAME> (100437638) # All rights reserved. # #############################################################################...
de
0.354315
#!/usr/bin/env python2 ############################################################################## # # Script which creates a SHA-1 rainbow table of the passwords provided # # Copyright (C) 2014, <NAME> (100437638) # All rights reserved. # #############################################################################...
3.134814
3
luna/wrappers/cif.py
keiserlab/LUNA
2
6628605
import re def get_atom_names_by_id(cif_file): """Read a single-molecule CIF file and return the molecule's atom names. In the current version, if applied on multi-molecular CIF files, only the first molecule's atom names are returned. Returns ------- : dict """ regex = re.compile('...
import re def get_atom_names_by_id(cif_file): """Read a single-molecule CIF file and return the molecule's atom names. In the current version, if applied on multi-molecular CIF files, only the first molecule's atom names are returned. Returns ------- : dict """ regex = re.compile('...
en
0.739804
Read a single-molecule CIF file and return the molecule's atom names. In the current version, if applied on multi-molecular CIF files, only the first molecule's atom names are returned. Returns ------- : dict
3.246595
3
mutagen/id3/_file.py
lucienimmink/scanner.py
2
6628606
# -*- coding: utf-8 -*- # Copyright (C) 2005 <NAME> # 2006 <NAME> # 2013 <NAME> # # 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 2 of the License, ...
# -*- coding: utf-8 -*- # Copyright (C) 2005 <NAME> # 2006 <NAME> # 2013 <NAME> # # 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 2 of the License, ...
en
0.680822
# -*- coding: utf-8 -*- # Copyright (C) 2005 <NAME> # 2006 <NAME> # 2013 <NAME> # # 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 2 of the License, ...
2.521629
3
kernel_tuner/runners/sequential.py
mfkiwl/kernel_tuner
0
6628607
""" The default runner for sequentially tuning the parameter space """ from collections import OrderedDict import logging from time import perf_counter from kernel_tuner.util import get_config_string, store_cache, process_metrics, print_config_output, ErrorConfig from kernel_tuner.core import DeviceInterface class S...
""" The default runner for sequentially tuning the parameter space """ from collections import OrderedDict import logging from time import perf_counter from kernel_tuner.util import get_config_string, store_cache, process_metrics, print_config_output, ErrorConfig from kernel_tuner.core import DeviceInterface class S...
en
0.694078
The default runner for sequentially tuning the parameter space SequentialRunner is used for tuning with a single process/thread Instantiate the SequentialRunner :param kernel_source: The kernel source :type kernel_source: kernel_tuner.core.KernelSource :param kernel_options: A dictionary with ...
2.736756
3
src/sentry/api/endpoints/project_ownership.py
hieast/sentry
1
6628608
from __future__ import absolute_import import six from rest_framework import serializers from rest_framework.response import Response from django.utils import timezone from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import ProjectOwnership, resolve...
from __future__ import absolute_import import six from rest_framework import serializers from rest_framework.response import Response from django.utils import timezone from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import ProjectOwnership, resolve...
en
0.906033
Retrieve a Project's Ownership configuration ```````````````````````````````````````````` Return details on a project's ownership configuration. :auth: required Update a Project's Ownership configuration `````````````````````````````````````````` Updates a project's ownership ...
2.072564
2
setup.py
snario/bakthat
144
6628609
<reponame>snario/bakthat import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="bakthat", version="0.6.0", author="<NAME>", author_email="<EMAIL>", description="Bakthat is a MIT licensed backup fra...
import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="bakthat", version="0.6.0", author="<NAME>", author_email="<EMAIL>", description="Bakthat is a MIT licensed backup framework written in Python,...
none
1
1.530257
2
selenium_automation/upcoming-events(python.org).py
amgad01/web-scraping-and-automation
1
6628610
import os from selenium import webdriver CHROME_DRIVER = os.environ.get('CHROME_DRIVER') driver = webdriver.Chrome(executable_path=CHROME_DRIVER) url = "https://www.python.org" driver.get(url) # locate the dates of upcoming events class using css selector # get time element in the event-widget class events_dates = dr...
import os from selenium import webdriver CHROME_DRIVER = os.environ.get('CHROME_DRIVER') driver = webdriver.Chrome(executable_path=CHROME_DRIVER) url = "https://www.python.org" driver.get(url) # locate the dates of upcoming events class using css selector # get time element in the event-widget class events_dates = dr...
en
0.925644
# locate the dates of upcoming events class using css selector # get time element in the event-widget class # get the texts which hold the upcoming events which are located as texts of the anchor tags that are in lists # inside the event-widget class # for name in events_names: # print(name.text)
3.424298
3
2dmodels/CrossConv.py
zenanz/ChemTables
4
6628611
<filename>2dmodels/CrossConv.py import torch import torch.nn as nn import torch.nn.functional as F class CrossConv2d(nn.Conv2d): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros'): super(C...
<filename>2dmodels/CrossConv.py import torch import torch.nn as nn import torch.nn.functional as F class CrossConv2d(nn.Conv2d): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros'): super(C...
uk
0.115302
# kernel_h // 2 # kernel_w // 2 # mask top left # mask bottom left # mask top right # mask bottom right
2.718116
3
src/sims4communitylib/classes/math/common_location.py
velocist/TS4CheatsInfo
0
6628612
""" The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0). https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/legalcode Copyright (c) COLONOLNUTTY """ from typing import Any, Union from sims4.math import Locati...
""" The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0). https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/legalcode Copyright (c) COLONOLNUTTY """ from typing import Any, Union from sims4.math import Locati...
en
0.85574
The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0). https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/legalcode Copyright (c) COLONOLNUTTY A class that contains locational data. The translation and orientat...
2.060099
2
webcrawler.py
EthanC2/broken-link-finder
0
6628613
# Native Modules import requests # For making HTTP requests # External Modules from bs4 import BeautifulSoup # BeautifulSoup is a webscraping module # Classes import cmd_args # Global commandline arguments from link import Link ...
# Native Modules import requests # For making HTTP requests # External Modules from bs4 import BeautifulSoup # BeautifulSoup is a webscraping module # Classes import cmd_args # Global commandline arguments from link import Link ...
en
0.617606
# Native Modules # For making HTTP requests # External Modules # BeautifulSoup is a webscraping module # Classes # Global commandline arguments # 'Link' class # Wrapper for HTTP errors (fatal and non) ## Webcrawler class ## # Parse a website for HTML # Return the raw HTML of the website as text # Reconstruct the URL of...
3.52099
4
AA/heap_algorithm.py
zzvsjs1/MyPyScripts
0
6628614
def __parent(index: int) -> int: return (index + 1) * 2 def make_heap(ll: list): pass
def __parent(index: int) -> int: return (index + 1) * 2 def make_heap(ll: list): pass
none
1
2.310146
2
git_stacktrace/cmd.py
ryan953/git-stacktrace
0
6628615
from __future__ import print_function import argparse import logging import os import select import sys import git_stacktrace from git_stacktrace import api def main(): usage = "git stacktrace [<options>] [<RANGE>] < stacktrace from stdin" description = "Lookup commits related to a given stacktrace." pa...
from __future__ import print_function import argparse import logging import os import select import sys import git_stacktrace from git_stacktrace import api def main(): usage = "git stacktrace [<options>] [<RANGE>] < stacktrace from stdin" description = "Lookup commits related to a given stacktrace." pa...
none
1
2.578758
3
tests/test_pex_builder.py
pantsbuild/pex
2,160
6628616
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import filecmp import os import stat import subprocess import zipfile import pytest from pex.common import open_zip, safe_open, temporary_dir, touch from pex.compatibility import WINDOWS...
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import filecmp import os import stat import subprocess import zipfile import pytest from pex.common import open_zip, safe_open, temporary_dir, touch from pex.compatibility import WINDOWS...
en
0.668725
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import sys from p1.my_module import do_something do_something() with open(sys.argv[1], 'w') as fp: fp.write('success') import sys from pyparsing import * from p1.my_module import do_some...
2.191669
2
custom/icds_reports/tests/agg_tests/reports/test_service_delivery_data.py
tobiasmcnulty/commcare-hq
1
6628617
<gh_stars>1-10 from django.test import TestCase from custom.icds_reports.reports.service_delivery_dashboard_data import get_service_delivery_report_data class TestServiceDeliveryData(TestCase): def test_get_service_delivery_report_data_0_3(self): get_service_delivery_report_data.clear('icds-cas', 0, 10,...
from django.test import TestCase from custom.icds_reports.reports.service_delivery_dashboard_data import get_service_delivery_report_data class TestServiceDeliveryData(TestCase): def test_get_service_delivery_report_data_0_3(self): get_service_delivery_report_data.clear('icds-cas', 0, 10, None, False, ...
none
1
2.043995
2
leetcode/python/problem23/merge_k_lists_test.py
angelusualle/algorithms
0
6628618
<gh_stars>0 import unittest from merge_k_lists import merge_k_lists, ListNode class Test_Case_Merge_K_Lists(unittest.TestCase): def test_merge_k_lists(self): lists = [ListNode(1, ListNode(2, ListNode(2))), ListNode(1, ListNode(1, ListNode(2)))] answer = merge_k_lists(lists) answer_collector...
import unittest from merge_k_lists import merge_k_lists, ListNode class Test_Case_Merge_K_Lists(unittest.TestCase): def test_merge_k_lists(self): lists = [ListNode(1, ListNode(2, ListNode(2))), ListNode(1, ListNode(1, ListNode(2)))] answer = merge_k_lists(lists) answer_collector = [] ...
none
1
3.290256
3
indico/queries/datasets.py
IndicoDataSolutions/indico-client-python
2
6628619
<filename>indico/queries/datasets.py # -*- coding: utf-8 -*- import json import tempfile from pathlib import Path from typing import List import pandas as pd from indico.client.request import ( Debouncer, GraphQLRequest, HTTPMethod, HTTPRequest, RequestChain, ) from indico.errors import IndicoNotF...
<filename>indico/queries/datasets.py # -*- coding: utf-8 -*- import json import tempfile from pathlib import Path from typing import List import pandas as pd from indico.client.request import ( Debouncer, GraphQLRequest, HTTPMethod, HTTPRequest, RequestChain, ) from indico.errors import IndicoNotF...
en
0.442165
# -*- coding: utf-8 -*- List all of your datasets Options: limit (int, default=100): Max number of datasets to retrieve Returns: List[Dataset] Raises: query ListDatasets($limit: Int){ datasetsPage(limit: $limit) { datasets { id ...
2.383606
2
EvoMusicCompanion/ea/mutation.py
Jerryhu1/MasterThesis
0
6628620
from random import Random from music21 import pitch from music21.interval import Interval from ea import initialisation, simulation, constants, duration from ea.individual import Individual, Measure import copy rng = Random() def applyMutation(individual: Individual, elitist_population: [Individual]): mutation...
from random import Random from music21 import pitch from music21.interval import Interval from ea import initialisation, simulation, constants, duration from ea.individual import Individual, Measure import copy rng = Random() def applyMutation(individual: Individual, elitist_population: [Individual]): mutation...
en
0.874744
# If this is a sixteenth note, we remove it # Else we go one step back in duration # If we find the first pitch, we transpose this first # If the new scale degree is not in range, we set it to the minimum or maximum # The remaining notes will be transposed with the same intervals as previously # If the note goes out of...
2.580096
3
emodelrunner/configuration/configparser.py
BlueBrain/EModelRunner
3
6628621
<gh_stars>1-10 """Configuration parsing.""" # Copyright 2020-2022 Blue Brain Project / EPFL # 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 ...
"""Configuration parsing.""" # Copyright 2020-2022 Blue Brain Project / EPFL # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless requir...
en
0.834159
Configuration parsing. # Copyright 2020-2022 Blue Brain Project / EPFL # 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...
2.352501
2
pygame3D/fpc.py
loicgirard/pygame-3D
0
6628622
<gh_stars>0 import numpy as np import pygame from pygame.locals import * import math class FirstPersonController: def __init__(self, camera, velocity=3.0, sensitivity=0.01): """ First Person Controller that can be attached to a camera :param camera: the camera that the controller is attach...
import numpy as np import pygame from pygame.locals import * import math class FirstPersonController: def __init__(self, camera, velocity=3.0, sensitivity=0.01): """ First Person Controller that can be attached to a camera :param camera: the camera that the controller is attached to ...
en
0.857512
First Person Controller that can be attached to a camera :param camera: the camera that the controller is attached to :param velocity: velocity of the controller (world units per second) :param sensitivity: how sensitive it responds to mouse movements (radian per pixel) # make the cursor invisib...
3.74668
4
app/config.py
Saberlion/docker-webssh
664
6628623
<reponame>Saberlion/docker-webssh __author__ = 'xsank' from tornado.options import define def init_config(): define('port', default=9527, type=int, help='server listening port')
__author__ = 'xsank' from tornado.options import define def init_config(): define('port', default=9527, type=int, help='server listening port')
none
1
1.642688
2
volttron/drivers/smap_logging.py
kruthikarshankar/bemoss_os
3
6628624
# # Copyright (c) 2013, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list o...
# # Copyright (c) 2013, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list o...
en
0.803697
# # Copyright (c) 2013, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of ...
0.789596
1
patterns.py
frica/blink1
0
6628625
#!/usr/bin/env python """ Load blinking patterns defined in BlinkControl """ import json import time from blink1.blink1 import Blink1 def hex_to_rgb(value): """ Useful convert method from http://stackoverflow.com/a/214657 """ value = value.lstrip('#') lv = len(value) return tuple(int(value[i:i + lv...
#!/usr/bin/env python """ Load blinking patterns defined in BlinkControl """ import json import time from blink1.blink1 import Blink1 def hex_to_rgb(value): """ Useful convert method from http://stackoverflow.com/a/214657 """ value = value.lstrip('#') lv = len(value) return tuple(int(value[i:i + lv...
en
0.387035
#!/usr/bin/env python Load blinking patterns defined in BlinkControl Useful convert method from http://stackoverflow.com/a/214657 play a pattern with multiple colors Example: ['6', '#ff0000', '0.3', '1', '#0000ff', '0.3', '2', '#000000', '0.1', '0', '#ff0000', '0.3', '2', '#0000ff', '0.3', '1', '#000000', '0.1', '0...
3.284093
3
mcc/providers/python.py
long2ice/CyclomaticComplexity
0
6628626
<gh_stars>0 from mcc.languages import Lang from mcc.providers import Mccabe class MccabePy(Mccabe): suffix = ".py" language = Lang.py judge_nodes = [ "if_statement", "elif_clause", "while_statement", "for_statement", "except_clause", "boolean_operator", ...
from mcc.languages import Lang from mcc.providers import Mccabe class MccabePy(Mccabe): suffix = ".py" language = Lang.py judge_nodes = [ "if_statement", "elif_clause", "while_statement", "for_statement", "except_clause", "boolean_operator", "with_st...
none
1
2.22148
2
src/main/mad_api_call_util.py
akshayub/mad-chat-bot
0
6628627
<filename>src/main/mad_api_call_util.py # Import this class and use the necessary methods based on response by chat bot import json import requests BASE_URL = 'http://testing.makeadiff.in/api/v1' auth = ('username', 'password') def get_credits(userid): resource = '/users/{}/credit'.format(userid) return req...
<filename>src/main/mad_api_call_util.py # Import this class and use the necessary methods based on response by chat bot import json import requests BASE_URL = 'http://testing.makeadiff.in/api/v1' auth = ('username', 'password') def get_credits(userid): resource = '/users/{}/credit'.format(userid) return req...
en
0.899148
# Import this class and use the necessary methods based on response by chat bot
2.701589
3
src/sagemaker_algorithm_toolkit/channel_validation.py
Chick-star/sagemaker-xgboost-container
1
6628628
<gh_stars>1-10 # Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'li...
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file acc...
en
0.81849
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file acc...
1.675465
2
koku/masu/test/processor/azure/test_azure_report_parquet_processor.py
rubik-ai/koku
157
6628629
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # """Test the AzureReportParquetProcessor.""" from tenant_schemas.utils import schema_context from api.utils import DateHelper from masu.processor.azure.azure_report_parquet_processor import AzureReportParquetProcessor from masu.test import MasuTest...
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # """Test the AzureReportParquetProcessor.""" from tenant_schemas.utils import schema_context from api.utils import DateHelper from masu.processor.azure.azure_report_parquet_processor import AzureReportParquetProcessor from masu.test import MasuTest...
en
0.715965
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # Test the AzureReportParquetProcessor. Test cases for the AzureReportParquetProcessor. Setup up shared variables. Test the Azure table name generation. Test that the correct table is returned. Test that a bill is created in the Postgres database. Te...
2.091052
2
sources/atomipython/test.py
kantel/python-schulung
0
6628630
import numpy as np import matplotlib.pyplot as plt x = np.linspace(-10., 10., 1000) plt.plot(x, np.sin(x), "-r", label="Sinus") plt.plot(x, np.cos(x), "-b", label="Cosinus") plt.legend() plt.ylim(-3., 3.) plt.grid() plt.show()
import numpy as np import matplotlib.pyplot as plt x = np.linspace(-10., 10., 1000) plt.plot(x, np.sin(x), "-r", label="Sinus") plt.plot(x, np.cos(x), "-b", label="Cosinus") plt.legend() plt.ylim(-3., 3.) plt.grid() plt.show()
none
1
3.301977
3
officials/ranking_statistics.py
Fabrice-64/advocacy_project
0
6628631
""" This module calculates the ranking of the officials on the basis of the calculations operated in the module calculations.py. The data transit from the views : def officials_ranking def officials_to_engage the module calculations computes the data and they are send to this module ...
""" This module calculates the ranking of the officials on the basis of the calculations operated in the module calculations.py. The data transit from the views : def officials_ranking def officials_to_engage the module calculations computes the data and they are send to this module ...
en
0.851431
This module calculates the ranking of the officials on the basis of the calculations operated in the module calculations.py. The data transit from the views : def officials_ranking def officials_to_engage the module calculations computes the data and they are send to this module to sort ...
3.074474
3
thirdparty/src/gazebo_plugins/__init__.py
hsr-project/hsrb_gazebo_plugins
0
6628632
## flake8: noqa
## flake8: noqa
it
0.170067
## flake8: noqa
0.894175
1
DATA/workflow/PTM/databases/ELMpred/pred_new.py
korcsmarosgroup/ARN2DataBase
0
6628633
''' Maps ELMs to their protein IDs and the interacting domain's protein ID and inserts the two into an SQL database. :argument: EXPORT_DB_LOCATION: saving location of the final database :argument: ELMS_FILE: all ELM classes of the four used species in a .tsv files: http://elm.eu.org/classes/ :argument: INT_DOMAINS_F...
''' Maps ELMs to their protein IDs and the interacting domain's protein ID and inserts the two into an SQL database. :argument: EXPORT_DB_LOCATION: saving location of the final database :argument: ELMS_FILE: all ELM classes of the four used species in a .tsv files: http://elm.eu.org/classes/ :argument: INT_DOMAINS_F...
en
0.684012
Maps ELMs to their protein IDs and the interacting domain's protein ID and inserts the two into an SQL database. :argument: EXPORT_DB_LOCATION: saving location of the final database :argument: ELMS_FILE: all ELM classes of the four used species in a .tsv files: http://elm.eu.org/classes/ :argument: INT_DOMAINS_FILE:...
2.567978
3
src/split_multiple_demlimiters.py
famavott/codewars-katas
0
6628634
<reponame>famavott/codewars-katas """Split string by multiple delimiters.""" def multiple_split(string, delimiters=[]): """.""" if delimiters == []: return [string] for x in delimiters: string = string.replace(x, ' ') return string.split()
"""Split string by multiple delimiters.""" def multiple_split(string, delimiters=[]): """.""" if delimiters == []: return [string] for x in delimiters: string = string.replace(x, ' ') return string.split()
en
0.709072
Split string by multiple delimiters. .
3.98365
4
util/util.py
caixin1998/pl-template
1
6628635
"""This module contains simple helper functions """ from __future__ import print_function import torch import numpy as np from PIL import Image import os import pytorch_lightning as pl import numpy as np import torch import torch.nn.functional as F def tensor2im(input_image, imtype=np.uint8): """"Converts a Tensor ...
"""This module contains simple helper functions """ from __future__ import print_function import torch import numpy as np from PIL import Image import os import pytorch_lightning as pl import numpy as np import torch import torch.nn.functional as F def tensor2im(input_image, imtype=np.uint8): """"Converts a Tensor ...
en
0.572605
This module contains simple helper functions "Converts a Tensor array into a numpy image array. Parameters: input_image (tensor) -- the input image tensor array imtype (type) -- the desired type of the converted numpy array # get the data from a variable # convert it into a numpy array # g...
3.081297
3
tests/scripts/thread-cert/node_api.py
ltaoti/openthread
1
6628636
<gh_stars>1-10 #!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above ...
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
en
0.709851
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
1.440752
1
ATM-project/functions/utils.py
omzi/zuri-tasks
1
6628637
<reponame>omzi/zuri-tasks import os import re from time import sleep from rich import print import simplejson as json from rich.console import Console console = Console() def ordinal(n): # Add ordinal suffix for the day of the month; i.e. 'st', 'nd', 'rd' or 'th' return str(n) + ('th' if 4 <= n % 100 <= 20 el...
import os import re from time import sleep from rich import print import simplejson as json from rich.console import Console console = Console() def ordinal(n): # Add ordinal suffix for the day of the month; i.e. 'st', 'nd', 'rd' or 'th' return str(n) + ('th' if 4 <= n % 100 <= 20 else {1: 'st', 2: 'nd', 3: '...
en
0.552677
# Add ordinal suffix for the day of the month; i.e. 'st', 'nd', 'rd' or 'th' # Saves a user's bank details to a JSON file # Prints a message and styles it based on a specified state
3.15528
3
minos/utils.py
RobertClay/Paper1
0
6628638
<gh_stars>0 """ utility functions. A lot borrowed from vivarium population spenser to avoid importing that package. """ import argparse import glob import yaml import numpy as np import os import pandas as pd #import humanleague as hl from scipy.sparse import coo_matrix import scipy from vivarium.config_tree import ...
""" utility functions. A lot borrowed from vivarium population spenser to avoid importing that package. """ import argparse import glob import yaml import numpy as np import os import pandas as pd #import humanleague as hl from scipy.sparse import coo_matrix import scipy from vivarium.config_tree import ConfigTree ...
en
0.776668
utility functions. A lot borrowed from vivarium population spenser to avoid importing that package. #import humanleague as hl # Open the vivarium config yaml. # TODO Investigate the mock artifact manager. Not sure if this is what we should be using. Simple test for relative equality of floating point within tolerance ...
2.703597
3
lorator/connectors/__init__.py
fenestron/lorator
0
6628639
# -*- coding: utf-8 -*- from .connector import Connector from .mysql_connector import MySQLConnector from .postgres_connector import PostgresConnector from .sqlite_connector import SQLiteConnector from .empty_connector import EmptyConnector from .rds_postgres_connector import RdsPostgresConnector
# -*- coding: utf-8 -*- from .connector import Connector from .mysql_connector import MySQLConnector from .postgres_connector import PostgresConnector from .sqlite_connector import SQLiteConnector from .empty_connector import EmptyConnector from .rds_postgres_connector import RdsPostgresConnector
en
0.769321
# -*- coding: utf-8 -*-
1.136328
1
import_3dm/read3dm.py
jesterKing/import_3dm
167
6628640
<reponame>jesterKing/import_3dm # MIT License # Copyright (c) 2018-2020 <NAME>, <NAME>, <NAME>, <NAME> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without...
# MIT License # Copyright (c) 2018-2020 <NAME>, <NAME>, <NAME>, <NAME> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use,...
en
0.765376
# MIT License # Copyright (c) 2018-2020 <NAME>, <NAME>, <NAME>, <NAME> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, c...
1.835646
2
parser/tests/test_properties.py
spzala/tosca-parser
0
6628641
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
en
0.810434
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
2.358655
2
examples/pyemu.py
ScottHMcKean/pyfracman
0
6628642
import pyemu import os os.chdir("C:\\Users\\scott.mckean\\Desktop\\exp1_onep32_seismiclength") pst = pyemu.Pst("test1.pst") pst.add_parameters("test1.ptf") pst.write("test1.pst") # this does an okay job, but lacks some functionality psthelp = pyemu.helpers.pst_from_io_files( tpl_files=['test1.ptf'], in_files=...
import pyemu import os os.chdir("C:\\Users\\scott.mckean\\Desktop\\exp1_onep32_seismiclength") pst = pyemu.Pst("test1.pst") pst.add_parameters("test1.ptf") pst.write("test1.pst") # this does an okay job, but lacks some functionality psthelp = pyemu.helpers.pst_from_io_files( tpl_files=['test1.ptf'], in_files=...
en
0.564945
# this does an okay job, but lacks some functionality # make new pst file RSTFLE PESTMODE NPAR NOBS NPARGP NPRIOR NOBSGP [MAXCOMPDIM] NTPLFLE NINSFLE PRECIS DPOINT [NUMCOM] [JACFILE] [MESSFILE] [OBSREREF] RLAMBDA1 RLAMFAC PHIRATSUF PHIREDLAM NUMLAM [JACUPDATE] [LAMFORGIVE] [DERFORGIVE] RELPARMAX FACPARMAX FACORIG [IBOU...
2.188625
2
packages/amuse-aarsethzare/setup.py
Allyn69/amuse
1
6628643
import sys import os from setuptools import setup import support support.use("system") from support.setup_codes import setup_commands name = 'amuse-aarsethzare' version = "12.0.0rc3" author = 'The AMUSE team' author_email = '<EMAIL>' license_ = "Apache License 2.0" url = 'http://www.amusecode.org/' install_requires ...
import sys import os from setuptools import setup import support support.use("system") from support.setup_codes import setup_commands name = 'amuse-aarsethzare' version = "12.0.0rc3" author = 'The AMUSE team' author_email = '<EMAIL>' license_ = "Apache License 2.0" url = 'http://www.amusecode.org/' install_requires ...
none
1
1.553323
2
evap/evaluation/migrations/0002_initial_data.py
JenniferStamm/EvaP
0
6628644
<filename>evap/evaluation/migrations/0002_initial_data.py<gh_stars>0 # -*- coding: utf-8 -*- from django.db import models, migrations from django.contrib.auth.models import Group def insert_emailtemplates(apps, schema_editor): emailtemplates = [ ("Lecturer Review Notice", "[EvaP] New Course ready for app...
<filename>evap/evaluation/migrations/0002_initial_data.py<gh_stars>0 # -*- coding: utf-8 -*- from django.db import models, migrations from django.contrib.auth.models import Group def insert_emailtemplates(apps, schema_editor): emailtemplates = [ ("Lecturer Review Notice", "[EvaP] New Course ready for app...
en
0.769321
# -*- coding: utf-8 -*-
2.005589
2
dashboard/migrations/0001_initial.py
open-legal-tech/open-decision-prototype
6
6628645
<reponame>open-legal-tech/open-decision-prototype # Generated by Django 3.0.3 on 2020-02-29 02:46 import dashboard.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ...
# Generated by Django 3.0.3 on 2020-02-29 02:46 import dashboard.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USE...
en
0.81792
# Generated by Django 3.0.3 on 2020-02-29 02:46
1.787863
2
tensor2tensor/data_generators/gym_utils.py
spacegoing/t2t_caps
0
6628646
<filename>tensor2tensor/data_generators/gym_utils.py # coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/l...
<filename>tensor2tensor/data_generators/gym_utils.py # coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/l...
en
0.796144
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
2.192693
2
Concrete.py
TJ-Machine-Learning-Group/LAB1-Regression
3
6628647
<reponame>TJ-Machine-Learning-Group/LAB1-Regression from sklearn.metrics import mean_squared_error,mean_absolute_error,max_error from sklearn.linear_model import LinearRegression, Lasso, Ridge,ElasticNet from sklearn.tree import DecisionTreeRegressor from sklearn.ensemble import RandomForestRegressor from sklearn.neura...
from sklearn.metrics import mean_squared_error,mean_absolute_error,max_error from sklearn.linear_model import LinearRegression, Lasso, Ridge,ElasticNet from sklearn.tree import DecisionTreeRegressor from sklearn.ensemble import RandomForestRegressor from sklearn.neural_network import MLPRegressor from DecisionTreeRegre...
zh
0.346736
#import numpy as np #实例化回归模型 # Linear Regression # Lasso Regression # Ridge Regression #ElasticNet Regression # Decision Trees # Random Forest Regressor # Multi-Layer Perceptron #参数为5折验证,测试集占20% #手写的多层感知机没有训练,而是直接加载了模型(因为训练速度太慢) # times[-1]=">1e6"
2.371965
2
opennem/crawlers/schema.py
paulculmsee/opennem
0
6628648
<filename>opennem/crawlers/schema.py """OpenNEM Crawler Definitions""" from datetime import datetime from enum import Enum from typing import Callable, List, Optional from opennem.schema.core import BaseConfig class CrawlerPriority(Enum): high = 1 medium = 5 low = 10 class CrawlerSchedule(Enum): li...
<filename>opennem/crawlers/schema.py """OpenNEM Crawler Definitions""" from datetime import datetime from enum import Enum from typing import Callable, List, Optional from opennem.schema.core import BaseConfig class CrawlerPriority(Enum): high = 1 medium = 5 low = 10 class CrawlerSchedule(Enum): li...
en
0.776938
OpenNEM Crawler Definitions Defines a crawler # crawl metadata Defines a set of crawlers Get a crawler by name Get crawlers by match
2.749972
3
pycomicvine/tests/powers.py
jbbandos/pycomicvine
12
6628649
import pycomicvine import datetime from pycomicvine.tests.utils import * pycomicvine.api_key = "476302e62d7e8f8f140182e36aebff2fe935514b" class TestPowersList(ListResourceTestCase): def test_get_id_and_name(self): self.get_id_and_name_test( pycomicvine.Powers, pycomicvine.P...
import pycomicvine import datetime from pycomicvine.tests.utils import * pycomicvine.api_key = "476302e62d7e8f8f140182e36aebff2fe935514b" class TestPowersList(ListResourceTestCase): def test_get_id_and_name(self): self.get_id_and_name_test( pycomicvine.Powers, pycomicvine.P...
none
1
2.117638
2
recording/utils/common_utils.py
chrelli/3DDD_social_mouse_tracker
1
6628650
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Jan 30 15:54:04 2018 @author: chrelli """ #%% Import the nescessary stuff # basic OS stuff import time, os, sys, shutil # for math and plotting import pandas as pd import numpy as np import scipy as sp import matplotlib.pyplot as plt # small utilitie...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Jan 30 15:54:04 2018 @author: chrelli """ #%% Import the nescessary stuff # basic OS stuff import time, os, sys, shutil # for math and plotting import pandas as pd import numpy as np import scipy as sp import matplotlib.pyplot as plt # small utilitie...
en
0.789842
#!/usr/bin/env python2 # -*- coding: utf-8 -*- Created on Tue Jan 30 15:54:04 2018 @author: chrelli #%% Import the nescessary stuff # basic OS stuff # for math and plotting # small utilities # for list selection with logical # for image manipulation # for recording and connecting to the intel realsense librar #import ...
2.352435
2