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
Nelson_Alvarez/Assignments/flask_fund/ninja_turtle/turtle.py
webguru001/Python-Django-Web
5
10800
<reponame>webguru001/Python-Django-Web<gh_stars>1-10 from flask import Flask from flask import render_template, redirect, session, request app = Flask(__name__) app.secret_key = 'ThisIsSecret' @app.route('/') def nothing(): return render_template('index.html') @app.route('/ninja') def ninja(): x = 'tmnt' r...
from flask import Flask from flask import render_template, redirect, session, request app = Flask(__name__) app.secret_key = 'ThisIsSecret' @app.route('/') def nothing(): return render_template('index.html') @app.route('/ninja') def ninja(): x = 'tmnt' return render_template('ninjas.html', x=x) @app.route...
none
1
2.676536
3
neo/Network/Inventory.py
BSathvik/neo-python
15
10801
# -*- coding:utf-8 -*- """ Description: Inventory Class Usage: from neo.Network.Inventory import Inventory """ from neo.IO.MemoryStream import MemoryStream from neocore.IO.BinaryWriter import BinaryWriter class Inventory(object): """docstring for Inventory""" def __init__(self): """ ...
# -*- coding:utf-8 -*- """ Description: Inventory Class Usage: from neo.Network.Inventory import Inventory """ from neo.IO.MemoryStream import MemoryStream from neocore.IO.BinaryWriter import BinaryWriter class Inventory(object): """docstring for Inventory""" def __init__(self): """ ...
en
0.546615
# -*- coding:utf-8 -*- Description: Inventory Class Usage: from neo.Network.Inventory import Inventory docstring for Inventory Create an instance Get the hashable data. Returns: bytes:
2.764318
3
tests/test_api_gateway/test_common/test_exceptions.py
Clariteia/api_gateway_common
3
10802
<filename>tests/test_api_gateway/test_common/test_exceptions.py<gh_stars>1-10 """ Copyright (C) 2021 Clariteia SL This file is part of minos framework. Minos framework can not be copied and/or distributed without the express permission of Clariteia SL. """ import unittest from minos.api_gateway.common import ( E...
<filename>tests/test_api_gateway/test_common/test_exceptions.py<gh_stars>1-10 """ Copyright (C) 2021 Clariteia SL This file is part of minos framework. Minos framework can not be copied and/or distributed without the express permission of Clariteia SL. """ import unittest from minos.api_gateway.common import ( E...
en
0.731581
Copyright (C) 2021 Clariteia SL This file is part of minos framework. Minos framework can not be copied and/or distributed without the express permission of Clariteia SL.
1.927718
2
native_prophet.py
1143048123/cddh
177
10803
<gh_stars>100-1000 # coding: utf-8 # quote from kmaiya/HQAutomator # 谷歌搜索部分原版搬运,未做修改 import time import json import requests import webbrowser questions = [] def get_answer(): resp = requests.get('http://htpmsg.jiecaojingxuan.com/msg/current',timeout=4).text resp_dict = json.loads(resp) ...
# coding: utf-8 # quote from kmaiya/HQAutomator # 谷歌搜索部分原版搬运,未做修改 import time import json import requests import webbrowser questions = [] def get_answer(): resp = requests.get('http://htpmsg.jiecaojingxuan.com/msg/current',timeout=4).text resp_dict = json.loads(resp) if resp_dict['msg']...
en
0.417276
# coding: utf-8 # quote from kmaiya/HQAutomator # 谷歌搜索部分原版搬运,未做修改
2.914008
3
python/ht/nodes/styles/styles.py
Hengle/Houdini-Toolbox
136
10804
"""Classes representing color entries and mappings.""" # ============================================================================= # IMPORTS # ============================================================================= from __future__ import annotations # Standard Library import re from typing import TYPE_CHEC...
"""Classes representing color entries and mappings.""" # ============================================================================= # IMPORTS # ============================================================================= from __future__ import annotations # Standard Library import re from typing import TYPE_CHEC...
en
0.423723
Classes representing color entries and mappings. # ============================================================================= # IMPORTS # ============================================================================= # Standard Library # ============================================================================= # ...
3.442447
3
src/sntk/kernels/ntk.py
gear/s-ntk
0
10805
<reponame>gear/s-ntk<gh_stars>0 import math import numpy as np # return an array K of size (d_max, d_max, N, N), K[i][j] is kernel value of depth i + 1 with first j layers fixed def kernel_value_batch(X, d_max): K = np.zeros((d_max, d_max, X.shape[0], X.shape[0])) for fix_dep in range(d_max): S = np....
import math import numpy as np # return an array K of size (d_max, d_max, N, N), K[i][j] is kernel value of depth i + 1 with first j layers fixed def kernel_value_batch(X, d_max): K = np.zeros((d_max, d_max, X.shape[0], X.shape[0])) for fix_dep in range(d_max): S = np.matmul(X, X.T) H = np.ze...
en
0.600614
# return an array K of size (d_max, d_max, N, N), K[i][j] is kernel value of depth i + 1 with first j layers fixed # return an array K of size (N, N), depth d_max, first fix_dep layers fixed
1.995313
2
nlpproject/main/words.py
Hrishi2312/IR-reimagined
0
10806
<filename>nlpproject/main/words.py import nltk from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer, PorterStemmer from nltk.tokenize import sent_tokenize , word_tokenize import glob import re import os import numpy as np import sys nltk.download('stopwords') nltk.download('punkt') Stopwords = set...
<filename>nlpproject/main/words.py import nltk from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer, PorterStemmer from nltk.tokenize import sent_tokenize , word_tokenize import glob import re import os import numpy as np import sys nltk.download('stopwords') nltk.download('punkt') Stopwords = set...
none
1
3.175538
3
oseoserver/operations/describeresultaccess.py
pyoseo/oseoserver
0
10807
# Copyright 2017 <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 in writin...
# Copyright 2017 <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 in writin...
en
0.775216
# Copyright 2017 <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 in writin...
2.211968
2
utils/decorator/dasyncio.py
masonsxu/red-flask
0
10808
<reponame>masonsxu/red-flask # -*- coding: utf-8 -*- # 基于python Threading模块封装的异步函数装饰器 import time from functools import wraps from threading import Thread def async_call(fn): """一次简单的异步处理操作,装饰在要异步执行的函数前,再调用该函数即可执行单次异步操作(开辟一条新的线程) Args: :fn(function):需要异步处理的方法 Return: :wrapper(function): ...
# -*- coding: utf-8 -*- # 基于python Threading模块封装的异步函数装饰器 import time from functools import wraps from threading import Thread def async_call(fn): """一次简单的异步处理操作,装饰在要异步执行的函数前,再调用该函数即可执行单次异步操作(开辟一条新的线程) Args: :fn(function):需要异步处理的方法 Return: :wrapper(function): """ @wraps(fn) # 解决...
zh
0.375846
# -*- coding: utf-8 -*- # 基于python Threading模块封装的异步函数装饰器 一次简单的异步处理操作,装饰在要异步执行的函数前,再调用该函数即可执行单次异步操作(开辟一条新的线程) Args: :fn(function):需要异步处理的方法 Return: :wrapper(function): # 解决被装饰的函数的名字会变成装饰器函数,并还原函数名称 可定义链接数的线程池装饰器,可用于并发执行多次任务 Args: :pool_links(int):进程的数量 Returns: :su...
3.620879
4
oo/pessoa.py
wfs18/pythonbirds
0
10809
class Person: olhos = 2 def __init__(self, *children, name=None, year=0): self.year = year self.name = name self.children = list(children) def cumprimentar(self): return 'Hello' @staticmethod def metodo_estatico(): return 123 @classmethod def metod...
class Person: olhos = 2 def __init__(self, *children, name=None, year=0): self.year = year self.name = name self.children = list(children) def cumprimentar(self): return 'Hello' @staticmethod def metodo_estatico(): return 123 @classmethod def metod...
pt
0.559921
# Atributo de instancia # Atributo de dados
3.825246
4
tests/integration/test_combined.py
jonathan-winn-geo/new-repo-example
0
10810
"""Test combined function.""" from cmatools.combine.combine import combined def test_combined(): """Test of combined function""" assert combined() == "this hello cma"
"""Test combined function.""" from cmatools.combine.combine import combined def test_combined(): """Test of combined function""" assert combined() == "this hello cma"
en
0.814356
Test combined function. Test of combined function
1.906586
2
elastalert_modules/top_count_keys_enhancement.py
OpenCoreCH/elastalert
0
10811
"""Enhancement to reformat `top_events_X` from match in order to reformat and put it back to be able to use in alert message. New format: top_events_keys_XXX -- contains array of corresponding key values defined in `top_count_keys`, where `XXX` key from `top_count_keys` array. top_events_values_XXX -- contains arra...
"""Enhancement to reformat `top_events_X` from match in order to reformat and put it back to be able to use in alert message. New format: top_events_keys_XXX -- contains array of corresponding key values defined in `top_count_keys`, where `XXX` key from `top_count_keys` array. top_events_values_XXX -- contains arra...
en
0.474115
Enhancement to reformat `top_events_X` from match in order to reformat and put it back to be able to use in alert message. New format: top_events_keys_XXX -- contains array of corresponding key values defined in `top_count_keys`, where `XXX` key from `top_count_keys` array. top_events_values_XXX -- contains array o...
2.907019
3
nets.py
koreyou/SWEM-chainer
0
10812
<reponame>koreyou/SWEM-chainer<gh_stars>0 import numpy import chainer import chainer.functions as F import chainer.links as L from chainer import reporter embed_init = chainer.initializers.Uniform(.25) def block_embed(embed, x, dropout=0.): """Embedding function followed by convolution Args: embed ...
import numpy import chainer import chainer.functions as F import chainer.links as L from chainer import reporter embed_init = chainer.initializers.Uniform(.25) def block_embed(embed, x, dropout=0.): """Embedding function followed by convolution Args: embed (callable): A :func:`~chainer.functions.em...
en
0.686498
Embedding function followed by convolution Args: embed (callable): A :func:`~chainer.functions.embed_id` function or :class:`~chainer.links.EmbedID` link. x (:class:`~chainer.Variable` or :class:`numpy.ndarray` or \ :class:`cupy.ndarray`): Input variable, which is a ...
2.920918
3
src/entities/users.py
MillaKelhu/ohtu-lukuvinkkikirjasto
0
10813
from flask_login import UserMixin class Users(UserMixin): # Luodaan näennäinen tietokanta käyttäjistä user_database = {"kayttaja": ("kayttaja", "salasana"), "tunnus": ("tunnus", "passu")} def __init__(self, id, username, password): self.id = id self.username = username self.pas...
from flask_login import UserMixin class Users(UserMixin): # Luodaan näennäinen tietokanta käyttäjistä user_database = {"kayttaja": ("kayttaja", "salasana"), "tunnus": ("tunnus", "passu")} def __init__(self, id, username, password): self.id = id self.username = username self.pas...
fi
1.000039
# Luodaan näennäinen tietokanta käyttäjistä
2.840325
3
artifacts/kernel_db/autotvm_scripts/tune_tilling_dense_select_codegen.py
LittleQili/nnfusion
0
10814
""" matmul autotvm [batch,in_dim] x [in_dim,out_dim] search_matmul_config(batch,in_dim,out_dim,num_trials): input: batch,in_dim,out_dim,num_trials [batch,in_dim] x [in_dim,out_dim] num_trials: num of trials, default: 1000 output: log (json format) use autotvm to search configs for the matm...
""" matmul autotvm [batch,in_dim] x [in_dim,out_dim] search_matmul_config(batch,in_dim,out_dim,num_trials): input: batch,in_dim,out_dim,num_trials [batch,in_dim] x [in_dim,out_dim] num_trials: num of trials, default: 1000 output: log (json format) use autotvm to search configs for the matm...
en
0.492757
matmul autotvm [batch,in_dim] x [in_dim,out_dim] search_matmul_config(batch,in_dim,out_dim,num_trials): input: batch,in_dim,out_dim,num_trials [batch,in_dim] x [in_dim,out_dim] num_trials: num of trials, default: 1000 output: log (json format) use autotvm to search configs for the matmul ...
2.688832
3
src/olympia/activity/admin.py
dante381/addons-server
0
10815
<filename>src/olympia/activity/admin.py<gh_stars>0 from django.contrib import admin from .models import ActivityLog, ReviewActionReasonLog from olympia.reviewers.models import ReviewActionReason class ActivityLogAdmin(admin.ModelAdmin): list_display = ( 'created', 'user', '__str__', )...
<filename>src/olympia/activity/admin.py<gh_stars>0 from django.contrib import admin from .models import ActivityLog, ReviewActionReasonLog from olympia.reviewers.models import ReviewActionReason class ActivityLogAdmin(admin.ModelAdmin): list_display = ( 'created', 'user', '__str__', )...
none
1
1.932002
2
modules/nmap_script/address_info.py
naimkowshik/reyna-eye
4
10816
import subprocess import sys import time import os ############################# # COLORING YOUR SHELL # ############################# R = "\033[1;31m" # B = "\033[1;34m" # Y = "\033[1;33m" # G = "\033[1;32m" # RS = "\033[0m" # W = "\033[1;37m" ...
import subprocess import sys import time import os ############################# # COLORING YOUR SHELL # ############################# R = "\033[1;31m" # B = "\033[1;34m" # Y = "\033[1;33m" # G = "\033[1;32m" # RS = "\033[0m" # W = "\033[1;37m" ...
en
0.558324
############################# # COLORING YOUR SHELL # ############################# # # # # # # ############################# Shows extra information about IPv6 addresses, such as embedded MAC or IPv4 addresses when available. Some IP address formats encode extra information; for example some IPv6 addresses enc...
3.277294
3
tests/utilities/test_upgrade_checkpoint.py
cuent/pytorch-lightning
0
10817
# Copyright The PyTorch Lightning team. # # 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 i...
# Copyright The PyTorch Lightning team. # # 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 i...
en
0.856613
# Copyright The PyTorch Lightning team. # # 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 i...
1.802448
2
rnn/train_rnn_oneflow.py
XinYangDong/models
0
10818
<reponame>XinYangDong/models<gh_stars>0 import oneflow.experimental as flow from oneflow.experimental import optim import oneflow.experimental.nn as nn from utils.dataset import * from utils.tensor_utils import * from models.rnn_model import RNN import argparse import time import math import numpy as np flow.env.ini...
import oneflow.experimental as flow from oneflow.experimental import optim import oneflow.experimental.nn as nn from utils.dataset import * from utils.tensor_utils import * from models.rnn_model import RNN import argparse import time import math import numpy as np flow.env.init() flow.enable_eager_execution() def ...
en
0.894787
# refer to: https://blog.csdn.net/Nin7a/article/details/107631078 # If you set this too high, it might explode. If too low, it might not learn # decrease learning rate if loss goes to NaN, increase learnig rate if it learns too slow # Keep track of losses for plotting # Print iter number, loss, name and guess # Add cur...
2.377098
2
metaflow/datastore/local_storage.py
RobBlumberg/metaflow
2
10819
import json import os from ..metaflow_config import DATASTORE_LOCAL_DIR, DATASTORE_SYSROOT_LOCAL from .datastore_storage import CloseAfterUse, DataStoreStorage from .exceptions import DataException class LocalStorage(DataStoreStorage): TYPE = "local" METADATA_DIR = "_meta" @classmethod def get_datas...
import json import os from ..metaflow_config import DATASTORE_LOCAL_DIR, DATASTORE_SYSROOT_LOCAL from .datastore_storage import CloseAfterUse, DataStoreStorage from .exceptions import DataException class LocalStorage(DataStoreStorage): TYPE = "local" METADATA_DIR = "_meta" @classmethod def get_datas...
en
0.772586
# Python2 # noqa E722 # We are no longer making upward progress # Could not find any directory to use so create a new one
2.241493
2
src/Models/tools/quality.py
rahlk/MOOSE
0
10820
<filename>src/Models/tools/quality.py from __future__ import division, print_function from scipy.spatial.distance import euclidean from numpy import mean from pdb import set_trace class measure: def __init__(self,model): self.mdl = model def convergence(self, obtained): """ Calculate the convergence m...
<filename>src/Models/tools/quality.py from __future__ import division, print_function from scipy.spatial.distance import euclidean from numpy import mean from pdb import set_trace class measure: def __init__(self,model): self.mdl = model def convergence(self, obtained): """ Calculate the convergence m...
en
0.644619
Calculate the convergence metric with respect to ideal solutions # dist = euclidean(a, sorted(lst, key=lambda x:euclidean(x,a))[0]) # set_trace()
2.87943
3
script/spider/www_chinapoesy_com.py
gitter-badger/poetry-1
1
10821
<filename>script/spider/www_chinapoesy_com.py ''' pip3 install BeautifulSoup4 pip3 install pypinyin ''' import requests import re import os import shutil from bs4 import BeautifulSoup from util import Profile, write_poem def parse_poem_profile_td(td): container = td.find('div') if container is None:...
<filename>script/spider/www_chinapoesy_com.py ''' pip3 install BeautifulSoup4 pip3 install pypinyin ''' import requests import re import os import shutil from bs4 import BeautifulSoup from util import Profile, write_poem def parse_poem_profile_td(td): container = td.find('div') if container is None:...
en
0.707264
pip3 install BeautifulSoup4 pip3 install pypinyin # maybe appears on the last page # Wrong name 席慕蓉 Read poem list @param page:int @return (poem_list:Profile[], has_next_page:Boolean) # profiles # delete the temp directory
2.969643
3
design-patterns-101/Animal.py
stealthanthrax/python-design-patterns
0
10822
class Animal: def __init__(self): self.name = "" self.weight = 0 self.sound = "" def setName(self, name): self.name = name def getName(self): return self.name def setWeight(self, weight): self.weight = weight def getWeight(self): return sel...
class Animal: def __init__(self): self.name = "" self.weight = 0 self.sound = "" def setName(self, name): self.name = name def getName(self): return self.name def setWeight(self, weight): self.weight = weight def getWeight(self): return sel...
none
1
3.534198
4
tests/test_events.py
hhtong/dwave-cloud-client
0
10823
<reponame>hhtong/dwave-cloud-client # Copyright 2020 D-Wave Systems 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 b...
# Copyright 2020 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
en
0.817306
# Copyright 2020 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
1.855371
2
ex3_nn_TF2.py
Melykuti/Ng_Machine_learning_exercises
3
10824
<reponame>Melykuti/Ng_Machine_learning_exercises<gh_stars>1-10 ''' Neural networks. Forward propagation in an already trained network in TensorFlow 2.0-2.1 (to use the network for classification). TF 2.0: Option 0 takes 0.08 sec. Option 1 takes 0.08 sec. Option 6 takes 0.08 sec. Option 2 takes 4.7 sec. Option 3 takes ...
''' Neural networks. Forward propagation in an already trained network in TensorFlow 2.0-2.1 (to use the network for classification). TF 2.0: Option 0 takes 0.08 sec. Option 1 takes 0.08 sec. Option 6 takes 0.08 sec. Option 2 takes 4.7 sec. Option 3 takes 1.6 sec. Option 4 takes 5.2 sec. Option 5 takes 0.08 sec. Optio...
en
0.718615
Neural networks. Forward propagation in an already trained network in TensorFlow 2.0-2.1 (to use the network for classification). TF 2.0: Option 0 takes 0.08 sec. Option 1 takes 0.08 sec. Option 6 takes 0.08 sec. Option 2 takes 4.7 sec. Option 3 takes 1.6 sec. Option 4 takes 5.2 sec. Option 5 takes 0.08 sec. Option 7 ...
2.887928
3
instagram/models.py
kilonzijnr/instagram-clone
0
10825
<gh_stars>0 from django.db import models from django.db.models.deletion import CASCADE from django.contrib.auth.models import User from cloudinary.models import CloudinaryField # Create your models here. class Profile(models.Model): """Model for handling User Profile""" user = models.OneToOneField(User, on_del...
from django.db import models from django.db.models.deletion import CASCADE from django.contrib.auth.models import User from cloudinary.models import CloudinaryField # Create your models here. class Profile(models.Model): """Model for handling User Profile""" user = models.OneToOneField(User, on_delete= models....
en
0.868659
# Create your models here. Model for handling User Profile Method to return total numberof followers Method to save profile to the database Method to delete profile from the database Method to update user profile Args: new([type]): [description] Method to return all users a specific user is...
2.621177
3
addons/purchase_request/migrations/13.0.4.0.0/post-migration.py
jerryxu4j/odoo-docker-build
0
10826
<filename>addons/purchase_request/migrations/13.0.4.0.0/post-migration.py from odoo import SUPERUSER_ID, api from odoo.tools.sql import column_exists def migrate(cr, version=None): env = api.Environment(cr, SUPERUSER_ID, {}) if column_exists(cr, "product_template", "purchase_request"): _migrate_purcha...
<filename>addons/purchase_request/migrations/13.0.4.0.0/post-migration.py from odoo import SUPERUSER_ID, api from odoo.tools.sql import column_exists def migrate(cr, version=None): env = api.Environment(cr, SUPERUSER_ID, {}) if column_exists(cr, "product_template", "purchase_request"): _migrate_purcha...
en
0.90818
Create properties for all products with the flag set on all companies
2.001968
2
cfy/server.py
buhanec/cloudify-flexiant-plugin
0
10827
# coding=UTF-8 """Server stuff.""" from __future__ import print_function from cfy import (create_server, create_ssh_key, attach_ssh_key, wait_for_state, wait_for_cond, create_nic, attach_nic, get_res...
# coding=UTF-8 """Server stuff.""" from __future__ import print_function from cfy import (create_server, create_ssh_key, attach_ssh_key, wait_for_state, wait_for_cond, create_nic, attach_nic, get_res...
en
0.43472
# coding=UTF-8 Server stuff. # Ease of access # Check if existing server is to be used # Get configuration # Verify existence of private keys # Generate missing configuration # TODO: better way of determining suitable disk # Create server # key_obj = get_resource(fco_api, key_uuid, RT.SSHKEY) # keys = SSHKey.REQUIRED_A...
1.889577
2
markdown2dita.py
mattcarabine/markdown2dita
6
10828
# coding: utf-8 """ markdown2dita ~~~~~~~~~~~~~ A markdown to dita-ot conversion tool written in pure python. Uses mistune to parse the markdown. """ from __future__ import print_function import argparse import sys import mistune __version__ = '0.3' __author__ = '<NAME> <<EMAIL>>' __all__ = ['Render...
# coding: utf-8 """ markdown2dita ~~~~~~~~~~~~~ A markdown to dita-ot conversion tool written in pure python. Uses mistune to parse the markdown. """ from __future__ import print_function import argparse import sys import mistune __version__ = '0.3' __author__ = '<NAME> <<EMAIL>>' __all__ = ['Render...
en
0.720234
# coding: utf-8 markdown2dita ~~~~~~~~~~~~~ A markdown to dita-ot conversion tool written in pure python. Uses mistune to parse the markdown. # Dita only supports one title per section # Dita has no horizontal rule, ignore it # could maybe divide sections? # Dita does not support inline html, just pass it ...
2.958369
3
tests/integration/test_reload_certificate/test.py
roanhe-ts/ClickHouse
1
10829
<gh_stars>1-10 import pytest import os from helpers.cluster import ClickHouseCluster SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) cluster = ClickHouseCluster(__file__) node = cluster.add_instance('node', main_configs=["configs/first.crt", "configs/first.key", ...
import pytest import os from helpers.cluster import ClickHouseCluster SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) cluster = ClickHouseCluster(__file__) node = cluster.add_instance('node', main_configs=["configs/first.crt", "configs/first.key", "configs/sec...
en
0.695904
* Generate config with certificate/key name from args. * Reload config. cat > /etc/clickhouse-server/config.d/cert.xml << EOF <?xml version="1.0"?> <clickhouse> <https_port>8443</https_port> <openSSL> <server> <certificateFile>/etc/clickhouse-server/config.d/{cur_name}.crt</certificate...
2.033465
2
examples/python/fling.py
arminfriedl/fling
0
10830
<filename>examples/python/fling.py import flingclient as fc from flingclient.rest import ApiException from datetime import datetime # Per default the dockerized fling service runs on localhost:3000 In case you # run your own instance, change the base url configuration = fc.Configuration(host="http://localhost:3000") ...
<filename>examples/python/fling.py import flingclient as fc from flingclient.rest import ApiException from datetime import datetime # Per default the dockerized fling service runs on localhost:3000 In case you # run your own instance, change the base url configuration = fc.Configuration(host="http://localhost:3000") ...
en
0.874584
# Per default the dockerized fling service runs on localhost:3000 In case you # run your own instance, change the base url # Every call, with the exception of `/api/auth`, is has to be authorized by a # bearer token. Get a token by authenticating as admin and set it into the # configuration. All subsequent calls will s...
2.91749
3
pretraining/python/download_tensorboard_logs.py
dl4nlp-rg/PTT5
51
10831
<filename>pretraining/python/download_tensorboard_logs.py import tensorflow.compat.v1 as tf import os import tqdm GCS_BUCKET = 'gs://ptt5-1' TENSORBOARD_LOGS_LOCAL = '../logs_tensorboard' os.makedirs(TENSORBOARD_LOGS_LOCAL, exist_ok=True) # where to look for events files - experiment names base_paths = [ # Main ...
<filename>pretraining/python/download_tensorboard_logs.py import tensorflow.compat.v1 as tf import os import tqdm GCS_BUCKET = 'gs://ptt5-1' TENSORBOARD_LOGS_LOCAL = '../logs_tensorboard' os.makedirs(TENSORBOARD_LOGS_LOCAL, exist_ok=True) # where to look for events files - experiment names base_paths = [ # Main ...
en
0.872614
# where to look for events files - experiment names # Main initial experiments - all weights are updated # Only embeddings are updated # Double batch size for large (128 = 64 * 2) # all paths have the scructure
2.271588
2
tests/TestPythonLibDir/RemotePkcs1Signer/__init__.py
q351941406/isign-1
83
10832
import base64 import requests class RemotePkcs1Signer(object): """ Client-side Signer subclass, that calls the Signing Service over HTTP to sign things """ # standard headers for request headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } def __init__(s...
import base64 import requests class RemotePkcs1Signer(object): """ Client-side Signer subclass, that calls the Signing Service over HTTP to sign things """ # standard headers for request headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } def __init__(s...
en
0.786989
Client-side Signer subclass, that calls the Signing Service over HTTP to sign things # standard headers for request :param host: host of the remote HTTP service :param port: port of the remote HTTP service :param key: see signing_service.py, in our case we use the hash of the related cert to identify the key :pa...
3.129833
3
architecture_tool_django/nodes/tasks.py
goldginkgo/architecture_tool_django
1
10833
import logging import re from celery import shared_task from django.conf import settings from django.db.models import Q from django.shortcuts import get_object_or_404 from django.template.loader import get_template from django.urls import reverse from django.utils import timezone from architecture_tool_django.utils.c...
import logging import re from celery import shared_task from django.conf import settings from django.db.models import Q from django.shortcuts import get_object_or_404 from django.template.loader import get_template from django.urls import reverse from django.utils import timezone from architecture_tool_django.utils.c...
en
0.382017
# page = confluence.get_page_by_id(page_id, expand="version,body.storage") # version = int(re.sub(r".*\/", "", r.json()["version"]["_links"]["self"]))
1.864381
2
crosswalk/views/alias_or_create.py
cofin/django-crosswalk
4
10834
<filename>crosswalk/views/alias_or_create.py from crosswalk.authentication import AuthenticatedView from crosswalk.models import Domain, Entity from crosswalk.serializers import EntitySerializer from crosswalk.utils import import_class from django.core.exceptions import ObjectDoesNotExist from rest_framework import sta...
<filename>crosswalk/views/alias_or_create.py from crosswalk.authentication import AuthenticatedView from crosswalk.models import Domain, Entity from crosswalk.serializers import EntitySerializer from crosswalk.utils import import_class from django.core.exceptions import ObjectDoesNotExist from rest_framework import sta...
en
0.68861
Create an alias if an entity is found above a certain match threshold or create a new entity. # Find the best match for a query
2.482328
2
hoist/fastapi_wrapper.py
ZeroIntensity/Hoist
0
10835
from fastapi import FastAPI, Response, WebSocket, WebSocketDisconnect from threading import Thread from .server import Server from .errors import HoistExistsError from .error import Error from .version import __version__ from .flask_wrapper import HTML import uvicorn from typing import List, Callable from fastapi.respo...
from fastapi import FastAPI, Response, WebSocket, WebSocketDisconnect from threading import Thread from .server import Server from .errors import HoistExistsError from .error import Error from .version import __version__ from .flask_wrapper import HTML import uvicorn from typing import List, Callable from fastapi.respo...
en
0.800437
Wrapper for FastAPI. Generate a FastAPI server. Function for setting up hoist on an app. # to stop collisions Function for running a FastAPI server. Function for running a flask app with a thread. Function for adding a socket to a FastAPI server.
2.537312
3
network/mqtt_client/main_mqtt_publisher.py
flashypepo/myMicropython-Examples
3
10836
# This file is executed on every boot (including wake-boot from deepsleep) # 2017-1210 PePo send timestamp and temperature (Celsius) to MQTT-server on BBB # 2017-1105 PePo add _isLocal: sensor data to serial port (False) of stored in file (True) # 2017-0819 PePo add sensor, led and print to serial port # 2017-0811 ...
# This file is executed on every boot (including wake-boot from deepsleep) # 2017-1210 PePo send timestamp and temperature (Celsius) to MQTT-server on BBB # 2017-1105 PePo add _isLocal: sensor data to serial port (False) of stored in file (True) # 2017-0819 PePo add sensor, led and print to serial port # 2017-0811 ...
en
0.540125
# This file is executed on every boot (including wake-boot from deepsleep) # 2017-1210 PePo send timestamp and temperature (Celsius) to MQTT-server on BBB # 2017-1105 PePo add _isLocal: sensor data to serial port (False) of stored in file (True) # 2017-0819 PePo add sensor, led and print to serial port # 2017-0811 PePo...
2.78662
3
2015/07.py
Valokoodari/advent-of-code
2
10837
<filename>2015/07.py #!/usr/bin/python3 lines = open("inputs/07.in", "r").readlines() for i,line in enumerate(lines): lines[i] = line.split("\n")[0] l = lines.copy(); wires = {} def func_set(p, i): if p[0].isdigit(): wires[p[2]] = int(p[0]) lines.pop(i) elif p[0] in wires.keys(): ...
<filename>2015/07.py #!/usr/bin/python3 lines = open("inputs/07.in", "r").readlines() for i,line in enumerate(lines): lines[i] = line.split("\n")[0] l = lines.copy(); wires = {} def func_set(p, i): if p[0].isdigit(): wires[p[2]] = int(p[0]) lines.pop(i) elif p[0] in wires.keys(): ...
fr
0.386793
#!/usr/bin/python3
2.819075
3
soccer_embedded/Development/Ethernet/lwip-rtos-config/test_udp_echo.py
ghsecuritylab/soccer_ws
56
10838
<reponame>ghsecuritylab/soccer_ws import socket import time import numpy # This script sends a message to the board, at IP address and port given by # server_address, using User Datagram Protocol (UDP). The board should be # programmed to echo back UDP packets sent to it. The time taken for num_samples # echoes is mea...
import socket import time import numpy # This script sends a message to the board, at IP address and port given by # server_address, using User Datagram Protocol (UDP). The board should be # programmed to echo back UDP packets sent to it. The time taken for num_samples # echoes is measured. # Create a UDP socket sock...
en
0.860149
# This script sends a message to the board, at IP address and port given by # server_address, using User Datagram Protocol (UDP). The board should be # programmed to echo back UDP packets sent to it. The time taken for num_samples # echoes is measured. # Create a UDP socket # Send data # Receive response #print('receiv...
3.040095
3
test.py
keke185321/emotions
58
10839
#!/usr/bin/env python # # This file is part of the Emotions project. The complete source code is # available at https://github.com/luigivieira/emotions. # # Copyright (c) 2016-2017, <NAME> (http://www.luiz.vieira.nom.br) # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # ...
#!/usr/bin/env python # # This file is part of the Emotions project. The complete source code is # available at https://github.com/luigivieira/emotions. # # Copyright (c) 2016-2017, <NAME> (http://www.luiz.vieira.nom.br) # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # ...
en
0.666635
#!/usr/bin/env python # # This file is part of the Emotions project. The complete source code is # available at https://github.com/luigivieira/emotions. # # Copyright (c) 2016-2017, <NAME> (http://www.luiz.vieira.nom.br) # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # ...
1.612773
2
konform/cmd.py
openanalytics/konform
7
10840
from . import Konform def main(): Konform().run()
from . import Konform def main(): Konform().run()
none
1
1.098335
1
ichnaea/taskapp/app.py
mikiec84/ichnaea
348
10841
""" Holds global celery application state and startup / shutdown handlers. """ from celery import Celery from celery.app import app_or_default from celery.signals import ( beat_init, worker_process_init, worker_process_shutdown, setup_logging, ) from ichnaea.log import configure_logging from ichnaea.ta...
""" Holds global celery application state and startup / shutdown handlers. """ from celery import Celery from celery.app import app_or_default from celery.signals import ( beat_init, worker_process_init, worker_process_shutdown, setup_logging, ) from ichnaea.log import configure_logging from ichnaea.ta...
en
0.755571
Holds global celery application state and startup / shutdown handlers. Called at scheduler and worker setup. Configures logging using the same configuration as the webapp. Called automatically when `celery beat` is started. Calls :func:`ichnaea.taskapp.config.init_beat`. Called automatically when `celery work...
2.391955
2
gmqtt/storage.py
sabuhish/gmqtt
0
10842
import asyncio from typing import Tuple import heapq class BasePersistentStorage(object): async def push_message(self, mid, raw_package): raise NotImplementedError def push_message_nowait(self, mid, raw_package) -> asyncio.Future: try: asyncio.get_event_loop() except Runt...
import asyncio from typing import Tuple import heapq class BasePersistentStorage(object): async def push_message(self, mid, raw_package): raise NotImplementedError def push_message_nowait(self, mid, raw_package) -> asyncio.Future: try: asyncio.get_event_loop() except Runt...
none
1
2.621195
3
test/testframework/runner.py
5GExchange/escape
10
10843
# Copyright 2017 <NAME>, <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 in writing, ...
# Copyright 2017 <NAME>, <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 in writing, ...
en
0.812675
# Copyright 2017 <NAME>, <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 in writing, ...
2.278091
2
Calliope/13 Clock/Clock.py
frankyhub/Python
0
10844
from microbit import * hands = Image.ALL_CLOCKS #A centre dot of brightness 2. ticker_image = Image("2\n").crop(-2,-2,5,5) #Adjust these to taste MINUTE_BRIGHT = 0.1111 HOUR_BRIGHT = 0.55555 #Generate hands for 5 minute intervals def fiveticks(): fivemins = 0 hours = 0 while True: yield hands[f...
from microbit import * hands = Image.ALL_CLOCKS #A centre dot of brightness 2. ticker_image = Image("2\n").crop(-2,-2,5,5) #Adjust these to taste MINUTE_BRIGHT = 0.1111 HOUR_BRIGHT = 0.55555 #Generate hands for 5 minute intervals def fiveticks(): fivemins = 0 hours = 0 while True: yield hands[f...
en
0.847984
#A centre dot of brightness 2. #Adjust these to taste #Generate hands for 5 minute intervals #Generate hands with ticker superimposed for 1 minute intervals. #Run a clock speeded up 60 times, so we can watch the animation.
3.258029
3
home/kakadu31/sabertooth.py
rv8flyboy/pyrobotlab
63
10845
#Variables #Working with build 2234 saberPort = "/dev/ttyUSB0" #Initializing Motorcontroller saber = Runtime.start("saber", "Sabertooth") saber.connect(saberPort) sleep(1) #Initializing Joystick joystick = Runtime.start("joystick","Joystick") print(joystick.getControllers()) python.subscribe("joystick","publishJoysti...
#Variables #Working with build 2234 saberPort = "/dev/ttyUSB0" #Initializing Motorcontroller saber = Runtime.start("saber", "Sabertooth") saber.connect(saberPort) sleep(1) #Initializing Joystick joystick = Runtime.start("joystick","Joystick") print(joystick.getControllers()) python.subscribe("joystick","publishJoysti...
en
0.683389
#Variables #Working with build 2234 #Initializing Motorcontroller #Initializing Joystick
2.573902
3
Dangerous/Weevely/core/backdoor.py
JeyZeta/Dangerous-
0
10846
<filename>Dangerous/Weevely/core/backdoor.py<gh_stars>0 # -*- coding: utf-8 -*- # This file is part of Weevely NG. # # Copyright(c) 2011-2012 Weevely Developers # http://code.google.com/p/weevely/ # # This file may be licensed under the terms of of the # GNU General Public License Version 2 (the ``GPL''). # # Software ...
<filename>Dangerous/Weevely/core/backdoor.py<gh_stars>0 # -*- coding: utf-8 -*- # This file is part of Weevely NG. # # Copyright(c) 2011-2012 Weevely Developers # http://code.google.com/p/weevely/ # # This file may be licensed under the terms of of the # GNU General Public License Version 2 (the ``GPL''). # # Software ...
en
0.647656
# -*- coding: utf-8 -*- # This file is part of Weevely NG. # # Copyright(c) 2011-2012 Weevely Developers # http://code.google.com/p/weevely/ # # This file may be licensed under the terms of of the # GNU General Public License Version 2 (the ``GPL''). # # Software distributed under the License is distributed # on an ``A...
2.110539
2
musicscore/musicxml/types/complextypes/notations.py
alexgorji/music_score
2
10847
<filename>musicscore/musicxml/types/complextypes/notations.py from musicscore.dtd.dtd import Sequence, GroupReference, Choice, Element from musicscore.musicxml.attributes.optional_unique_id import OptionalUniqueId from musicscore.musicxml.attributes.printobject import PrintObject from musicscore.musicxml.groups.common ...
<filename>musicscore/musicxml/types/complextypes/notations.py from musicscore.dtd.dtd import Sequence, GroupReference, Choice, Element from musicscore.musicxml.attributes.optional_unique_id import OptionalUniqueId from musicscore.musicxml.attributes.printobject import PrintObject from musicscore.musicxml.groups.common ...
en
0.926777
Notations refer to musical notations, not XML notations. Multiple notations are allowed in order to represent multiple editorial levels. The print-object attribute, added in Version 3.0, allows notations to represent details of performance technique, such as fingerings, without having them appear in the score.
2.055213
2
src/constants.py
MitraSeifari/pystackoverflow
0
10848
<gh_stars>0 from types import SimpleNamespace from src.utils.keyboard import create_keyboard keys = SimpleNamespace( settings=':gear: Settings', cancel=':cross_mark: Cancel', back=':arrow_left: Back', next=':arrow_right: Next', add=':heavy_plus_sign: Add', edit=':pencil: Edit', save=':che...
from types import SimpleNamespace from src.utils.keyboard import create_keyboard keys = SimpleNamespace( settings=':gear: Settings', cancel=':cross_mark: Cancel', back=':arrow_left: Back', next=':arrow_right: Next', add=':heavy_plus_sign: Add', edit=':pencil: Edit', save=':check_mark_butt...
none
1
2.833542
3
iirsBenchmark/exceptions.py
gAldeia/iirsBenchmark
0
10849
<reponame>gAldeia/iirsBenchmark # Author: <NAME> # Contact: <EMAIL> # Version: 1.0.0 # Last modified: 08-20-2021 by <NAME> """ Simple exception that is raised by explainers when they don't support local or global explanations, or when they are not model agnostic. This should be catched and handled in the expe...
# Author: <NAME> # Contact: <EMAIL> # Version: 1.0.0 # Last modified: 08-20-2021 by <NAME> """ Simple exception that is raised by explainers when they don't support local or global explanations, or when they are not model agnostic. This should be catched and handled in the experiments. """ class NotApplic...
en
0.910106
# Author: <NAME> # Contact: <EMAIL> # Version: 1.0.0 # Last modified: 08-20-2021 by <NAME> Simple exception that is raised by explainers when they don't support local or global explanations, or when they are not model agnostic. This should be catched and handled in the experiments.
2.604024
3
covid_data_tracker/util.py
granularai/gh5050_covid_data_tracker
0
10850
import click from covid_data_tracker.registry import PluginRegistry def plugin_selector(selected_country: str): """plugin selector uses COUNTRY_MAP to find the appropriate plugin for a given country. Parameters ---------- selected_country : str specify the country of interest. Ret...
import click from covid_data_tracker.registry import PluginRegistry def plugin_selector(selected_country: str): """plugin selector uses COUNTRY_MAP to find the appropriate plugin for a given country. Parameters ---------- selected_country : str specify the country of interest. Ret...
en
0.498537
plugin selector uses COUNTRY_MAP to find the appropriate plugin for a given country. Parameters ---------- selected_country : str specify the country of interest. Returns ------- covid_data_tracker.plugins.BasePlugin More appropriately, returns an instance of a country-s...
3.114337
3
dev/libs.py
karimwitani/webscraping
0
10851
<filename>dev/libs.py import selenium from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException def browser_init(): o...
<filename>dev/libs.py import selenium from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException def browser_init(): o...
en
0.280165
#Find username/pass fields #input username and pass #Login #Skip buttons
2.900698
3
setup.py
dwastberg/osmuf
0
10852
from setuptools import setup setup(name='osmuf', version='0.1', install_requires=[ "seaborn", ], description='Urban Form analysis from OpenStreetMap', url='http://github.com/atelierlibre/osmuf', author='AtelierLibre', author_email='<EMAIL>', license='MIT', ...
from setuptools import setup setup(name='osmuf', version='0.1', install_requires=[ "seaborn", ], description='Urban Form analysis from OpenStreetMap', url='http://github.com/atelierlibre/osmuf', author='AtelierLibre', author_email='<EMAIL>', license='MIT', ...
none
1
1.068513
1
tests/test_model.py
artemudovyk/django-updown
41
10853
<filename>tests/test_model.py # -*- coding: utf-8 -*- """ tests.test_model ~~~~~~~~~~~~~~~~ Tests the models provided by the updown rating app :copyright: 2016, weluse (https://weluse.de) :author: 2016, <NAME> <<EMAIL>> :license: BSD, see LICENSE for more details. """ from __future__ import unicode_literals import ra...
<filename>tests/test_model.py # -*- coding: utf-8 -*- """ tests.test_model ~~~~~~~~~~~~~~~~ Tests the models provided by the updown rating app :copyright: 2016, weluse (https://weluse.de) :author: 2016, <NAME> <<EMAIL>> :license: BSD, see LICENSE for more details. """ from __future__ import unicode_literals import ra...
en
0.682278
# -*- coding: utf-8 -*- tests.test_model ~~~~~~~~~~~~~~~~ Tests the models provided by the updown rating app :copyright: 2016, weluse (https://weluse.de) :author: 2016, <NAME> <<EMAIL>> :license: BSD, see LICENSE for more details. Test case for the generic rating app Test a simple vote
2.561258
3
nlptk/ratings/rake/rake.py
GarryGaller/nlp_toolkit
0
10854
<reponame>GarryGaller/nlp_toolkit import sys,os from typing import List from collections import defaultdict, Counter from itertools import groupby, chain, product import heapq from pprint import pprint import string class Rake(): def __init__( self, text:List[List[str]], stopw...
import sys,os from typing import List from collections import defaultdict, Counter from itertools import groupby, chain, product import heapq from pprint import pprint import string class Rake(): def __init__( self, text:List[List[str]], stopwords=[], max_words=100...
ru
0.704982
# Частота (freq(w)) определяется как количество фраз, # в которые входит рассматриваемое слово # Степень (deg(w)) определяется как суммарное количество слов, # из которых состоят фразы, в которых оно содержится. # Вес слова определим как отношение степени слова к его частоте: # s(w) = deg(w)/freq(w) Create contender ph...
2.860104
3
depimpact/tests/test_functions.py
NazBen/dep-impact
0
10855
<gh_stars>0 import numpy as np import openturns as ot def func_overflow(X, model=1, h_power=0.6): """Overflow model function. Parameters ---------- X : np.ndarray, shape : N x 8 Input variables - x1 : Flow, - x2 : Krisler Coefficient, - x3 : Zv, etc... model : ...
import numpy as np import openturns as ot def func_overflow(X, model=1, h_power=0.6): """Overflow model function. Parameters ---------- X : np.ndarray, shape : N x 8 Input variables - x1 : Flow, - x2 : Krisler Coefficient, - x3 : Zv, etc... model : bool, option...
en
0.259303
Overflow model function. Parameters ---------- X : np.ndarray, shape : N x 8 Input variables - x1 : Flow, - x2 : Krisler Coefficient, - x3 : Zv, etc... model : bool, optional(default=1) If 1, the classical model. If 2, the economic model. Returns...
2.83118
3
app/main/forms.py
ingabire1/blog
0
10856
<filename>app/main/forms.py from flask_wtf import FlaskForm from wtforms import StringField,TextAreaField,SubmitField from wtforms.validators import Required class ReviewForm(FlaskForm): title = StringField('Review title',validators=[Required()]) review = TextAreaField('Movie review', validators=[Required()]...
<filename>app/main/forms.py from flask_wtf import FlaskForm from wtforms import StringField,TextAreaField,SubmitField from wtforms.validators import Required class ReviewForm(FlaskForm): title = StringField('Review title',validators=[Required()]) review = TextAreaField('Movie review', validators=[Required()]...
en
0.257812
# class LoginForm(FlaskForm): # email = StringField('Your Email Address',validators=[Required(),Email()]) # password = PasswordField('Password',validators =[Required()]) # remember = BooleanField('Remember me') # submit = SubmitField('Sign In') # my_category = StringField('Category', validators=[Require...
2.759545
3
SEPHIRA/FastAPI/main.py
dman926/Flask-API
4
10857
<filename>SEPHIRA/FastAPI/main.py from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from starlette import status from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint from starlette.requests import Request from starlette.responses import Response from starlette....
<filename>SEPHIRA/FastAPI/main.py from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from starlette import status from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint from starlette.requests import Request from starlette.responses import Response from starlette....
de
0.43702
#### # Custom Middlewares # #### #### # # ####
2.023208
2
bio_rtd/uo/sc_uo.py
open-biotech/bio-rtd
5
10858
"""Semi continuous unit operations. Unit operations that accept constant or box-shaped flow rate profile and provide periodic flow rate profile. """ __all__ = ['AlternatingChromatography', 'ACC', 'PCC', 'PCCWithWashDesorption'] __version__ = '0.7.1' __author__ = '<NAME>' import typing as _typing import numpy as _np ...
"""Semi continuous unit operations. Unit operations that accept constant or box-shaped flow rate profile and provide periodic flow rate profile. """ __all__ = ['AlternatingChromatography', 'ACC', 'PCC', 'PCCWithWashDesorption'] __version__ = '0.7.1' __author__ = '<NAME>' import typing as _typing import numpy as _np ...
en
0.776925
Semi continuous unit operations. Unit operations that accept constant or box-shaped flow rate profile and provide periodic flow rate profile. Simulation of alternating chromatography. This class implements logic common to various types of alternating chromatography. It has a role of a base class for speci...
2.822476
3
src/tools/create_graphs_log.py
KatiaJDL/CenterPoly
0
10859
import matplotlib.pyplot as plt def main(): with open('log.txt') as f: lines = f.readlines() glob_loss = [] hm_l = [] off_l = [] poly_l = [] depth_l = [] glob_loss_val = [] hm_l_val = [] off_l_val = [] poly_l_val = [] depth_l_val = [] for epoch in lines: m = epoch.split("|") if ...
import matplotlib.pyplot as plt def main(): with open('log.txt') as f: lines = f.readlines() glob_loss = [] hm_l = [] off_l = [] poly_l = [] depth_l = [] glob_loss_val = [] hm_l_val = [] off_l_val = [] poly_l_val = [] depth_l_val = [] for epoch in lines: m = epoch.split("|") if ...
none
1
2.590014
3
fluree/query-generate.py
ivankoster/aioflureedb
4
10860
<filename>fluree/query-generate.py #!/usr/bin/python3 import json from aioflureedb.signing import DbSigner def free_test(signer): data = {"foo": 42, "bar": "appelvlaai"} body, headers, uri = signer.sign_query(data) rval = dict() rval["body"] = body rval["headers"] = headers rval["uri"] = uri ...
<filename>fluree/query-generate.py #!/usr/bin/python3 import json from aioflureedb.signing import DbSigner def free_test(signer): data = {"foo": 42, "bar": "appelvlaai"} body, headers, uri = signer.sign_query(data) rval = dict() rval["body"] = body rval["headers"] = headers rval["uri"] = uri ...
fr
0.386793
#!/usr/bin/python3
2.408243
2
actions/delete_bridge_domain.py
StackStorm-Exchange/network_essentials
5
10861
<filename>actions/delete_bridge_domain.py # Copyright 2016 Brocade Communications Systems, 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....
<filename>actions/delete_bridge_domain.py # Copyright 2016 Brocade Communications Systems, 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....
en
0.845587
# Copyright 2016 Brocade Communications Systems, 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 agr...
2.643448
3
python/signature.py
IUIDSL/kgap_lincs-idg
4
10862
#!/usr/bin/env python3 ### # Based on signature.R ### import sys,os,logging import numpy as np import pandas as pd if __name__=="__main__": logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) if (len(sys.argv) < 3): logging.error("3 file args required, LINCS sig info for GSE70138 and...
#!/usr/bin/env python3 ### # Based on signature.R ### import sys,os,logging import numpy as np import pandas as pd if __name__=="__main__": logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) if (len(sys.argv) < 3): logging.error("3 file args required, LINCS sig info for GSE70138 and...
en
0.203805
#!/usr/bin/env python3 ### # Based on signature.R ### #GSE70138_Broad_LINCS_sig_info_2017-03-06.txt.gz #GSE92742_Broad_LINCS_sig_info.txt.gz #signature.tsv # # #
2.401153
2
HW3 - Contest Data Base/main.py
916-Maria-Popescu/Fundamental-of-Programming
0
10863
<reponame>916-Maria-Popescu/Fundamental-of-Programming # ASSIGNMENT 3 """ During a programming contest, each contestant had to solve 3 problems (named P1, P2 and P3). Afterwards, an evaluation committee graded the solutions to each of the problems using integers between 0 and 10. The committee needs a progr...
# ASSIGNMENT 3 """ During a programming contest, each contestant had to solve 3 problems (named P1, P2 and P3). Afterwards, an evaluation committee graded the solutions to each of the problems using integers between 0 and 10. The committee needs a program that will allow managing the list of scores and esta...
en
0.789924
# ASSIGNMENT 3 During a programming contest, each contestant had to solve 3 problems (named P1, P2 and P3). Afterwards, an evaluation committee graded the solutions to each of the problems using integers between 0 and 10. The committee needs a program that will allow managing the list of scores and establishing...
4.429696
4
surface/ex_surface02.py
orbingol/NURBS-Python_Examples
48
10864
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Examples for the NURBS-Python Package Released under MIT License Developed by <NAME> (c) 2016-2017 """ import os from geomdl import BSpline from geomdl import utilities from geomdl import exchange from geomdl import operations from geomdl.visualization imp...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Examples for the NURBS-Python Package Released under MIT License Developed by <NAME> (c) 2016-2017 """ import os from geomdl import BSpline from geomdl import utilities from geomdl import exchange from geomdl import operations from geomdl.visualization imp...
en
0.822261
#!/usr/bin/env python # -*- coding: utf-8 -*- Examples for the NURBS-Python Package Released under MIT License Developed by <NAME> (c) 2016-2017 # Fix file path # Create a BSpline surface instance # Set degrees # Set control points # Set knot vectors # Set evaluation delta # Evaluate surface # Plot the control ...
2.74734
3
dev/bazel/deps/micromkl.bzl
cmsxbc/oneDAL
169
10865
<filename>dev/bazel/deps/micromkl.bzl<gh_stars>100-1000 #=============================================================================== # Copyright 2020-2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
<filename>dev/bazel/deps/micromkl.bzl<gh_stars>100-1000 #=============================================================================== # Copyright 2020-2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
en
0.749105
#=============================================================================== # Copyright 2020-2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
1.492769
1
opennsa/protocols/nsi2/bindings/p2pservices.py
jmacauley/opennsa
0
10866
## Generated by pyxsdgen from xml.etree import ElementTree as ET # types class OrderedStpType(object): def __init__(self, order, stp): self.order = order # int self.stp = stp # StpIdType -> string @classmethod def build(self, element): return OrderedStpType( ele...
## Generated by pyxsdgen from xml.etree import ElementTree as ET # types class OrderedStpType(object): def __init__(self, order, stp): self.order = order # int self.stp = stp # StpIdType -> string @classmethod def build(self, element): return OrderedStpType( ele...
en
0.416737
## Generated by pyxsdgen # types # int # StpIdType -> string # long # DirectionalityType -> string # boolean # StpIdType -> string # StpIdType -> string # [ OrderedStpType ] # [ TypeValueType ]
2.51244
3
Scripts/PyLecTest.py
DVecchione/DVEC
0
10867
import matplotlib.pyplot as plt import numpy as np x=20 y=1 plt.plot(x,y) plt.show()
import matplotlib.pyplot as plt import numpy as np x=20 y=1 plt.plot(x,y) plt.show()
none
1
3.017336
3
examples/nested/mog4_fast.py
ivandebono/nnest
0
10868
import os import sys import argparse import copy import numpy as np import scipy.special sys.path.append(os.getcwd()) def log_gaussian_pdf(theta, sigma=1, mu=0, ndim=None): if ndim is None: try: ndim = len(theta) except TypeError: assert isinstance(theta, (float, int)), t...
import os import sys import argparse import copy import numpy as np import scipy.special sys.path.append(os.getcwd()) def log_gaussian_pdf(theta, sigma=1, mu=0, ndim=None): if ndim is None: try: ndim = len(theta) except TypeError: assert isinstance(theta, (float, int)), t...
none
1
2.604398
3
sendria/message.py
scottcove/sendria
85
10869
<gh_stars>10-100 __all__ = ['Message'] import uuid from email.header import decode_header as _decode_header from email.message import Message as EmailMessage from email.utils import getaddresses from typing import Union, List, Dict, Any class Message: __slots__ = ( 'id', 'sender_envelope', 'sende...
__all__ = ['Message'] import uuid from email.header import decode_header as _decode_header from email.message import Message as EmailMessage from email.utils import getaddresses from typing import Union, List, Dict, Any class Message: __slots__ = ( 'id', 'sender_envelope', 'sender_message', ...
none
1
2.555563
3
myApps/test_web.py
Rocket-hodgepodge/NewsWeb
0
10870
<reponame>Rocket-hodgepodge/NewsWeb from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import unittest class NewVisitorTest(unittest.TestCase): def setUp(self): self.t...
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import unittest class NewVisitorTest(unittest.TestCase): def setUp(self): self.timeout = 40 self.browser = webdriv...
en
0.147045
# user_login_link = self.browser.find_element_by_id('TANGRAM__PSP_10__footerULoginBtn') # user_login_link.click()
2.705218
3
nce_glue/run_glue.py
salesforce/ebm_calibration_nlu
7
10871
<filename>nce_glue/run_glue.py<gh_stars>1-10 # coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
<filename>nce_glue/run_glue.py<gh_stars>1-10 # coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
en
0.426073
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
1.778469
2
tools/python/myriad/__init__.py
TU-Berlin-DIMA/myriad-toolkit
15
10872
<filename>tools/python/myriad/__init__.py __all__ = [ "assistant", "event", "error" ]
<filename>tools/python/myriad/__init__.py __all__ = [ "assistant", "event", "error" ]
none
1
1.05488
1
Python/Advanced/Tuples And Sets/Lab/SoftUni Party.py
EduardV777/Softuni-Python-Exercises
0
10873
guests=int(input()) reservations=set([]) while guests!=0: reservationCode=input() reservations.add(reservationCode) guests-=1 while True: r=input() if r!="END": reservations.discard(r) else: print(len(reservations)) VIPS=[]; Regulars=[] for e in reservations: ...
guests=int(input()) reservations=set([]) while guests!=0: reservationCode=input() reservations.add(reservationCode) guests-=1 while True: r=input() if r!="END": reservations.discard(r) else: print(len(reservations)) VIPS=[]; Regulars=[] for e in reservations: ...
none
1
3.614653
4
locale/pot/api/plotting/_autosummary/pyvista-Plotter-remove_all_lights-1.py
tkoyama010/pyvista-doc-translations
4
10874
<filename>locale/pot/api/plotting/_autosummary/pyvista-Plotter-remove_all_lights-1.py # Create a plotter and remove all lights after initialization. # Note how the mesh rendered is completely flat # import pyvista as pv plotter = pv.Plotter() plotter.remove_all_lights() plotter.renderer.lights # Expected: ## [] _ = plo...
<filename>locale/pot/api/plotting/_autosummary/pyvista-Plotter-remove_all_lights-1.py # Create a plotter and remove all lights after initialization. # Note how the mesh rendered is completely flat # import pyvista as pv plotter = pv.Plotter() plotter.remove_all_lights() plotter.renderer.lights # Expected: ## [] _ = plo...
en
0.85878
# Create a plotter and remove all lights after initialization. # Note how the mesh rendered is completely flat # # Expected: ## [] # # Note how this differs from a plot with default lighting #
2.100463
2
einsum.py
odiak/einsum
0
10875
from typing import Dict, Tuple import numpy as np def einsum(expr: str, *args: Tuple[np.ndarray, ...], **kwargs) -> np.ndarray: (a, b) = map(str.strip, expr.split("->")) a_ = list( map(lambda s: list(map(str.strip, s.split(","))), map(str.strip, a.split(";"))) ) b_ = list(map(str.strip, b.spli...
from typing import Dict, Tuple import numpy as np def einsum(expr: str, *args: Tuple[np.ndarray, ...], **kwargs) -> np.ndarray: (a, b) = map(str.strip, expr.split("->")) a_ = list( map(lambda s: list(map(str.strip, s.split(","))), map(str.strip, a.split(";"))) ) b_ = list(map(str.strip, b.spli...
none
1
2.885591
3
aarhus/get_roots.py
mikedelong/aarhus
0
10876
<reponame>mikedelong/aarhus import json import logging import os import pickle import sys import time import pyzmail # http://mypy.pythonblogs.com/12_mypy/archive/1253_workaround_for_python_bug_ascii_codec_cant_encode_character_uxa0_in_position_111_ordinal_not_in_range128.html reload(sys) sys.setdefaultencoding("utf8...
import json import logging import os import pickle import sys import time import pyzmail # http://mypy.pythonblogs.com/12_mypy/archive/1253_workaround_for_python_bug_ascii_codec_cant_encode_character_uxa0_in_position_111_ordinal_not_in_range128.html reload(sys) sys.setdefaultencoding("utf8") logging.basicConfig(form...
en
0.568609
# http://mypy.pythonblogs.com/12_mypy/archive/1253_workaround_for_python_bug_ascii_codec_cant_encode_character_uxa0_in_position_111_ordinal_not_in_range128.html # first get the references node # if references.has_key('references'): # our internal keys are always lowercase, so we want to be sure # to use a lowercase ref...
2.13222
2
python/760.find-anagram-mappings.py
stavanmehta/leetcode
0
10877
<filename>python/760.find-anagram-mappings.py<gh_stars>0 class Solution: def anagramMappings(self, A: List[int], B: List[int]) -> List[int]:
<filename>python/760.find-anagram-mappings.py<gh_stars>0 class Solution: def anagramMappings(self, A: List[int], B: List[int]) -> List[int]:
none
1
2.02639
2
src/jdk.internal.vm.compiler/.mx.graal/mx_graal.py
siweilxy/openjdkstudy
2
10878
<filename>src/jdk.internal.vm.compiler/.mx.graal/mx_graal.py # # ---------------------------------------------------------------------------------------------------- # # Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This ...
<filename>src/jdk.internal.vm.compiler/.mx.graal/mx_graal.py # # ---------------------------------------------------------------------------------------------------- # # Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This ...
en
0.770417
# # ---------------------------------------------------------------------------------------------------- # # Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify ...
1.95706
2
linear_regression.py
wail007/ml_playground
0
10879
import pandas as pd import numpy as np import matplotlib.pyplot as plt from scipy.stats import multivariate_normal class _LinearModel(object): def __init__(self): self.w = None def fit(self, x, y): pass def predict(self, x): return np.dot(x, self.w) def cost(self, x...
import pandas as pd import numpy as np import matplotlib.pyplot as plt from scipy.stats import multivariate_normal class _LinearModel(object): def __init__(self): self.w = None def fit(self, x, y): pass def predict(self, x): return np.dot(x, self.w) def cost(self, x...
en
0.27472
Residual Sum of Squares #print("cost: %f, alpha: %f" % (best_cost, best_alpha))
2.954859
3
pygments_lexer_solidity/__init__.py
veox/pygments-lexer-solidity
2
10880
from .lexer import SolidityLexer, YulLexer __all__ = ['SolidityLexer', 'YulLexer']
from .lexer import SolidityLexer, YulLexer __all__ = ['SolidityLexer', 'YulLexer']
none
1
1.02961
1
optimal_buy_gdax/history.py
coulterj/optimal-buy-gdax
0
10881
#!/usr/bin/env python3 from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, String, Float, DateTime, Integer from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker Base = declarative_base() class Order(Base): __tablename__ = 'orders' id = Column(Intege...
#!/usr/bin/env python3 from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, String, Float, DateTime, Integer from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker Base = declarative_base() class Order(Base): __tablename__ = 'orders' id = Column(Intege...
fr
0.221828
#!/usr/bin/env python3
2.738778
3
vmtkScripts/vmtkmeshboundaryinspector.py
ramtingh/vmtk
0
10882
<filename>vmtkScripts/vmtkmeshboundaryinspector.py #!/usr/bin/env python ## Program: VMTK ## Module: $RCSfile: vmtkmeshboundaryinspector.py,v $ ## Language: Python ## Date: $Date: 2006/05/26 12:35:13 $ ## Version: $Revision: 1.3 $ ## Copyright (c) <NAME>, <NAME>. All rights reserved. ## See LICENSE f...
<filename>vmtkScripts/vmtkmeshboundaryinspector.py #!/usr/bin/env python ## Program: VMTK ## Module: $RCSfile: vmtkmeshboundaryinspector.py,v $ ## Language: Python ## Date: $Date: 2006/05/26 12:35:13 $ ## Version: $Revision: 1.3 $ ## Copyright (c) <NAME>, <NAME>. All rights reserved. ## See LICENSE f...
en
0.554025
#!/usr/bin/env python ## Program: VMTK ## Module: $RCSfile: vmtkmeshboundaryinspector.py,v $ ## Language: Python ## Date: $Date: 2006/05/26 12:35:13 $ ## Version: $Revision: 1.3 $ ## Copyright (c) <NAME>, <NAME>. All rights reserved. ## See LICENSE file for details. ## This software is distributed...
2.182687
2
setup.py
sriz1/mudslide
4
10883
<filename>setup.py from setuptools import setup from distutils.util import convert_path main_ns = {} ver_path = convert_path('mudslide/version.py') with open(ver_path) as ver_file: exec(ver_file.read(), main_ns) def readme(): with open("README.md") as f: return f.read() setup( name='mudslide', ...
<filename>setup.py from setuptools import setup from distutils.util import convert_path main_ns = {} ver_path = convert_path('mudslide/version.py') with open(ver_path) as ver_file: exec(ver_file.read(), main_ns) def readme(): with open("README.md") as f: return f.read() setup( name='mudslide', ...
none
1
1.392586
1
src/sklearn/sklearn_random_forest_test.py
monkeychen/python-tutorial
0
10884
import csv import joblib from sklearn.metrics import accuracy_score data = [] features = [] targets = [] feature_names = [] users = [] with open('satisfaction_feature_names.csv') as name_file: column_name_file = csv.reader(name_file) feature_names = next(column_name_file)[2:394] with open('cza_satisfaction_tr...
import csv import joblib from sklearn.metrics import accuracy_score data = [] features = [] targets = [] feature_names = [] users = [] with open('satisfaction_feature_names.csv') as name_file: column_name_file = csv.reader(name_file) feature_names = next(column_name_file)[2:394] with open('cza_satisfaction_tr...
none
1
2.832717
3
py/test.py
BEARUBC/grasp-kernel
1
10885
class TestClass: def __init__(self, list, name): self.list = list self.name = name def func1(): print("func1 print something") def func2(): print("func2 print something") integer = 8 return integer def func3(): print("func3 print something") s = "func3" return s def f...
class TestClass: def __init__(self, list, name): self.list = list self.name = name def func1(): print("func1 print something") def func2(): print("func2 print something") integer = 8 return integer def func3(): print("func3 print something") s = "func3" return s def f...
ru
0.125152
# test = TestClass()
3.606929
4
tests/utils/_process_nonwin.py
chrahunt/quicken
3
10886
<reponame>chrahunt/quicken """Utilities for managing child processes within a scope - this ensures tests run cleanly even on failure and also gives us a mechanism to get debug info for our children. """ import logging import os import sys from contextlib import contextmanager from typing import ContextManager, List i...
"""Utilities for managing child processes within a scope - this ensures tests run cleanly even on failure and also gives us a mechanism to get debug info for our children. """ import logging import os import sys from contextlib import contextmanager from typing import ContextManager, List import psutil import process...
en
0.922648
Utilities for managing child processes within a scope - this ensures tests run cleanly even on failure and also gives us a mechanism to get debug info for our children. Given basic process create time, return one that would match psutil. Returns the active child processes. Automatically kill any Python processes fo...
2.457956
2
data/meneame/parse_meneame.py
segurac/DeepQA
0
10887
<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2016 <NAME>. 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/licens...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2016 <NAME>. 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...
en
0.783534
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2016 <NAME>. 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...
2.62405
3
dfstools/tests/test_relationship_tools.py
orekunrin/comp410_summer2020
0
10888
import unittest import pandas as pd import git import os from dfstools import get_dataset_dtypes from dfstools import find_related_cols_by_name from dfstools import find_related_cols_by_content from dfstools import find_parent_child_relationships from dfstools import pecan_cookies_load_data class RelationshipTools(un...
import unittest import pandas as pd import git import os from dfstools import get_dataset_dtypes from dfstools import find_related_cols_by_name from dfstools import find_related_cols_by_content from dfstools import find_parent_child_relationships from dfstools import pecan_cookies_load_data class RelationshipTools(un...
en
0.203986
# 'key_candidate': True, # 'key_candidate': True, # 'key_candidate': False, # 'key_candidate': False, # 'key_candidate': True, # 'key_candidate': False, # ---pecan cookies sprint one test case--- #result = find_parent_child_relationships(None, result) #self.assertEqual(expected, result)
2.684558
3
Calculator.py
KunalKatiyar/Calculator
0
10889
import sys from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QHBoxLayout, QGroupBox, QDialog, QVBoxLayout, QGridLayout,QMainWindow, QApplication, QWidget, QPushButton, QAction, QLineEdit, QMessageBox from PyQt5.QtGui import QIcon from PyQt5.QtCore import pyqtSlot class App(QDialog): def __ini...
import sys from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QHBoxLayout, QGroupBox, QDialog, QVBoxLayout, QGridLayout,QMainWindow, QApplication, QWidget, QPushButton, QAction, QLineEdit, QMessageBox from PyQt5.QtGui import QIcon from PyQt5.QtCore import pyqtSlot class App(QDialog): def __ini...
en
0.211667
# Original Approach # buttonp = QPushButton('+', self) # buttonp.setToolTip('Addition Operator') # buttonp.move(100,70) # buttonp.clicked.connect(self.on_click) # buttonm = QPushButton('-', self) # buttonm.setToolTip('Subtraction Operator') # buttonm.move(100,100) # buttonm.clicked.connect(self.on_click) # layout.setCo...
2.850538
3
analysis/src/util/_concepts.py
Domiii/code-dbgs
95
10890
<filename>analysis/src/util/_concepts.py # // ########################################################################### # // Queries # // ########################################################################### # -> get a single cell of a df (use `iloc` with `row` + `col` as arguments) df.iloc[0]['staticContextId...
<filename>analysis/src/util/_concepts.py # // ########################################################################### # // Queries # // ########################################################################### # -> get a single cell of a df (use `iloc` with `row` + `col` as arguments) df.iloc[0]['staticContextId...
de
0.352982
# // ########################################################################### # // Queries # // ########################################################################### # -> get a single cell of a df (use `iloc` with `row` + `col` as arguments) # -> get one column as a list # -> get all rows that match a conditio...
2.283078
2
src/py/proto/v3/diff/UniversalDiff_pb2.py
zifter/conf_protobuf
0
10891
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: v3/diff/UniversalDiff.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflec...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: v3/diff/UniversalDiff.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflec...
en
0.543932
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: v3/diff/UniversalDiff.proto # @@protoc_insertion_point(imports) # @@protoc_insertion_point(class_scope:v3.diff.UniversalDiff) # @@protoc_insertion_point(module_scope)
1.257514
1
src/onevision/data/augment/image_box_augment.py
phlong3105/onevision
2
10892
#!/usr/bin/env python # -*- coding: utf-8 -*- """ """ from __future__ import annotations import numpy as np import torch from torch import Tensor from onevision.data.augment.base import BaseAugment from onevision.data.augment.utils import apply_transform_op from onevision.data.data_class import ObjectAnnotation fro...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ """ from __future__ import annotations import numpy as np import torch from torch import Tensor from onevision.data.augment.base import BaseAugment from onevision.data.augment.utils import apply_transform_op from onevision.data.data_class import ObjectAnnotation fro...
en
0.319952
#!/usr/bin/env python # -*- coding: utf-8 -*- # MARK: - Modules Args: policy (str): Augmentation policy. One of: [`scratch`, `finetune`]. Default: `scratch`. # (op_name, p, magnitude) # MARK: Magic Functions # MARK: Configure # MARK: Forward Pass Args: input (np.ndarray): Image...
1.940787
2
dataviz/euvotes.py
Udzu/pudzu
119
10893
from pudzu.charts import * from pudzu.sandbox.bamboo import * import seaborn as sns # generate map df = pd.read_csv("datasets/euvotes.csv").set_index('country') palette = tmap(RGBA, sns.cubehelix_palette(11, start=0.2, rot=-0.75)) ranges = [20000000,10000000,5000000,2000000,1000000,500000,200000,100000,0] def voteco...
from pudzu.charts import * from pudzu.sandbox.bamboo import * import seaborn as sns # generate map df = pd.read_csv("datasets/euvotes.csv").set_index('country') palette = tmap(RGBA, sns.cubehelix_palette(11, start=0.2, rot=-0.75)) ranges = [20000000,10000000,5000000,2000000,1000000,500000,200000,100000,0] def voteco...
en
0.142302
# generate map # legend
2.577456
3
WarmUpSTE.py
jrolf/jse-api
1
10894
import pandas as pd import numpy as np from copy import * from bisect import * from scipy.optimize import curve_fit from sklearn.metrics import * from collections import defaultdict as defd import datetime,pickle from DemandHelper import * import warnings warnings.filterwarnings("ignore") ####################...
import pandas as pd import numpy as np from copy import * from bisect import * from scipy.optimize import curve_fit from sklearn.metrics import * from collections import defaultdict as defd import datetime,pickle from DemandHelper import * import warnings warnings.filterwarnings("ignore") ####################...
de
0.616087
################################################################# ################################################################# ################################################################# ################################################################# ########################################################...
2.353916
2
Section 3/cnn3.py
PacktPublishing/Python-Deep-Learning-for-Beginners-
7
10895
<gh_stars>1-10 import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Flatten from keras.layers import Conv2D, MaxPooling2D model = Sequential() model.add(Conv2D(32, kernel_size=(3, 3), activation='relu', input_shape=(128, 128...
import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Flatten from keras.layers import Conv2D, MaxPooling2D model = Sequential() model.add(Conv2D(32, kernel_size=(3, 3), activation='relu', input_shape=(128, 128, 1))) model.ad...
none
1
3.17341
3
k1lib/selector.py
157239n/k1lib
1
10896
<filename>k1lib/selector.py # AUTOGENERATED FILE! PLEASE DON'T EDIT """ This module is for selecting a subnetwork using CSS so that you can do special things to them. Checkout the tutorial section for a walkthrough. This is exposed automatically with:: from k1lib.imports import * selector.select # exposed """ fr...
<filename>k1lib/selector.py # AUTOGENERATED FILE! PLEASE DON'T EDIT """ This module is for selecting a subnetwork using CSS so that you can do special things to them. Checkout the tutorial section for a walkthrough. This is exposed automatically with:: from k1lib.imports import * selector.select # exposed """ fr...
en
0.580058
# AUTOGENERATED FILE! PLEASE DON'T EDIT This module is for selecting a subnetwork using CSS so that you can do special things to them. Checkout the tutorial section for a walkthrough. This is exposed automatically with:: from k1lib.imports import * selector.select # exposed Removes all quirkly features allowed b...
2.970267
3
plugins/General/wxRaven_WebBrowser.py
sLiinuX/wxRaven
11
10897
<reponame>sLiinuX/wxRaven<gh_stars>10-100 ''' Created on 22 févr. 2022 @author: slinux ''' from .wxRavenGeneralDesign import wxRavenWebBrowser from wxRavenGUI.application.wxcustom.CustomLoading import * from wxRavenGUI.application.wxcustom import * import wx.html2 as webview import sys import logging from wxRavenGUI...
''' Created on 22 févr. 2022 @author: slinux ''' from .wxRavenGeneralDesign import wxRavenWebBrowser from wxRavenGUI.application.wxcustom.CustomLoading import * from wxRavenGUI.application.wxcustom import * import wx.html2 as webview import sys import logging from wxRavenGUI.application.wxcustom.CustomUserIO import ...
en
0.472859
Created on 22 févr. 2022 @author: slinux classdocs # # Datas for the plugin display style # # Constructor # # Your constructor here # #This is to add the view in the appropriate place using the mainapp to do so # #The only exception is when the pannel itself is called by the plugin or another view #In this case the...
2.227543
2
backend/pollr-eb2/lib/python3.5/site-packages/ebcli/operations/upgradeops.py
saarthak24/Pollr
2
10898
# Copyright 2017 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 accompa...
# Copyright 2017 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 accompa...
en
0.884055
# Copyright 2017 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 accompa...
1.774294
2
src/perimeterator/enumerator/elb.py
vvondra/perimeterator
0
10899
''' Perimeterator - Enumerator for AWS ELBs (Public IPs). ''' import logging import boto3 from perimeterator.helper import aws_elb_arn from perimeterator.helper import dns_lookup class Enumerator(object): ''' Perimeterator - Enumerator for AWS ELBs (Public IPs). ''' # Required for Boto and reporting. SE...
''' Perimeterator - Enumerator for AWS ELBs (Public IPs). ''' import logging import boto3 from perimeterator.helper import aws_elb_arn from perimeterator.helper import dns_lookup class Enumerator(object): ''' Perimeterator - Enumerator for AWS ELBs (Public IPs). ''' # Required for Boto and reporting. SE...
en
0.942094
Perimeterator - Enumerator for AWS ELBs (Public IPs). Perimeterator - Enumerator for AWS ELBs (Public IPs). # Required for Boto and reporting. Attempt to get all Public IPs from ELBs. # Iterate over results until AWS no longer returns a 'NextMarker' in # order to ensure all results are retrieved. # Unfortunately, Marke...
2.630162
3