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
notification/migrations/0003_auto_20210329_0459.py
Ariesgal2017/twitterclonez
0
6630751
<reponame>Ariesgal2017/twitterclonez # Generated by Django 3.1.7 on 2021-03-29 04:59 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL...
# Generated by Django 3.1.7 on 2021-03-29 04:59 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('notification', '0002_aut...
en
0.793428
# Generated by Django 3.1.7 on 2021-03-29 04:59
1.707644
2
Client_Windows/reset.py
peeesspee/BitOJ
30
6630752
from database_management import manage_database rabbitmq_username = 'client' rabbitmq_password = '<PASSWORD>' host = 'localhost' conn, cur = manage_database.initialize_table() manage_database.reset_database(conn)
from database_management import manage_database rabbitmq_username = 'client' rabbitmq_password = '<PASSWORD>' host = 'localhost' conn, cur = manage_database.initialize_table() manage_database.reset_database(conn)
none
1
1.790886
2
crypto_sign_challenge.py
kumarnalinaksh21/Intel-Crypto-Challenge
0
6630753
<gh_stars>0 import sys import os import platform import base64 import json import logging from OpenSSL import crypto #---------------------- Initialising Logger------------------------# logging.basicConfig(filename='crypto-sign-challenge.log', filemode='a', format='%(asctime)s - %(name)s - %(message)s') logger=logging...
import sys import os import platform import base64 import json import logging from OpenSSL import crypto #---------------------- Initialising Logger------------------------# logging.basicConfig(filename='crypto-sign-challenge.log', filemode='a', format='%(asctime)s - %(name)s - %(message)s') logger=logging.getLogger()...
en
0.654046
#---------------------- Initialising Logger------------------------# #---------------------- Initialising Global Variables------------------------# #initialising empty message #initialising empty count for number of characters in the message #initialising key type to RSA, modify to TYPE_DSA for DSA #initialising bit si...
2.917424
3
tests/test_structure.py
loyada/typedpy
14
6630754
<reponame>loyada/typedpy import enum import sys import typing from dataclasses import dataclass import pytest from pytest import raises from typedpy import ( Structure, DecimalNumber, PositiveInt, String, Enum, Field, Integer, Map, Array, AnyOf, NoneField, DateField, ...
import enum import sys import typing from dataclasses import dataclass import pytest from pytest import raises from typedpy import ( Structure, DecimalNumber, PositiveInt, String, Enum, Field, Integer, Map, Array, AnyOf, NoneField, DateField, DateTime, ) from typedp...
none
1
2.318874
2
apps/puistot.py
SanttuVP/streamlit_test_app
0
6630755
import streamlit as st import leafmap.kepler as leafmap import geopandas as gpd def app(): st.title("Puistoihin liittyvät kaavamääräykset vuodelta 2021") st.markdown( """ Väritä, visualisoi ja filtteröi aineistoa kartan vasemmasta yläkulmasta avautuvan työkalupakin avulla. """ ) m =...
import streamlit as st import leafmap.kepler as leafmap import geopandas as gpd def app(): st.title("Puistoihin liittyvät kaavamääräykset vuodelta 2021") st.markdown( """ Väritä, visualisoi ja filtteröi aineistoa kartan vasemmasta yläkulmasta avautuvan työkalupakin avulla. """ ) m =...
fi
0.979323
Väritä, visualisoi ja filtteröi aineistoa kartan vasemmasta yläkulmasta avautuvan työkalupakin avulla.
2.743249
3
mediately/tools/admin.py
lifelonglearner127/mediately
0
6630756
<reponame>lifelonglearner127/mediately from django.contrib import admin from mediately.tools.models import Tool, Log @admin.register(Tool) class ToolAdmin(admin.ModelAdmin): pass @admin.register(Log) class LogAdmin(admin.ModelAdmin): pass
from django.contrib import admin from mediately.tools.models import Tool, Log @admin.register(Tool) class ToolAdmin(admin.ModelAdmin): pass @admin.register(Log) class LogAdmin(admin.ModelAdmin): pass
none
1
1.595163
2
universal/algos/mpt.py
paulorodriguesxv/universal-portfolios
1
6630757
<gh_stars>1-10 from ..algo import Algo import numpy as np import pandas as pd from sklearn import covariance from sklearn.base import BaseEstimator from scipy import optimize from cvxopt import solvers, matrix from six import string_types import logging from .. import tools from .estimators import * solvers.options['sh...
from ..algo import Algo import numpy as np import pandas as pd from sklearn import covariance from sklearn.base import BaseEstimator from scipy import optimize from cvxopt import solvers, matrix from six import string_types import logging from .. import tools from .estimators import * solvers.options['show_progress'] =...
en
0.671207
Modern portfolio theory approach. See https://en.wikipedia.org/wiki/Modern_portfolio_theory. :param window: Window for calculating mean and variance. Use None for entire history. :param mu_estimator: TODO :param cov_estimator: TODO :param min_history: Use zero weights for first min_periods. Defa...
2.451277
2
ip/ip2geo.py
BlueRhino/small-toys
0
6630758
<reponame>BlueRhino/small-toys<filename>ip/ip2geo.py # encoding='utf-8' """ use api from https://www.ipvigilante.com/ """ import time import requests def ip2geo(ip_: str, format_='json'): url = f'https://ipvigilante.com/{format_}/{ip_}' headers = { 'accept': f'application/{format_}', 'content...
# encoding='utf-8' """ use api from https://www.ipvigilante.com/ """ import time import requests def ip2geo(ip_: str, format_='json'): url = f'https://ipvigilante.com/{format_}/{ip_}' headers = { 'accept': f'application/{format_}', 'content-type': f'application/{format_}', } response ...
en
0.375502
# encoding='utf-8' use api from https://www.ipvigilante.com/ # aa = ip2geo('192.168.3.11', 'csv')
3.02527
3
Basic python/problem/ScrollView_withFloatLayout.py
Shourov1702040/hpylearners_Python
7
6630759
<gh_stars>1-10 from kivymd.app import MDApp from kivy.lang import Builder KV = """ Screen: MDToolbar: title:'Contacts jbsidis' pos_hint:{'top':1} md_bg_color: [.2,0,1,.9] left_action_items : [["menu", lambda x:print(23)]] right_action_items : [["dots-vertical",lambda x:prin...
from kivymd.app import MDApp from kivy.lang import Builder KV = """ Screen: MDToolbar: title:'Contacts jbsidis' pos_hint:{'top':1} md_bg_color: [.2,0,1,.9] left_action_items : [["menu", lambda x:print(23)]] right_action_items : [["dots-vertical",lambda x:print(234)]] ...
en
0.431503
Screen: MDToolbar: title:'Contacts jbsidis' pos_hint:{'top':1} md_bg_color: [.2,0,1,.9] left_action_items : [["menu", lambda x:print(23)]] right_action_items : [["dots-vertical",lambda x:print(234)]] elevation:0 FloatLayout: BoxLayout: pos_hin...
2.247373
2
pythonteste/desafio71.py
dangiotto/Python
1
6630760
print('='*30) print ('{:^30}'.format('BANCO CEV')) print('='*30) cedula = 0 resto = 0 while True: saque =int(input('Qual valor quer sacar ? R$')) if saque >= 50: cedula = int(saque/50) saque -= (cedula*50) print(f'{cedula} cédulas de R$ 50.') if saque >= 20: cedula = int(saqu...
print('='*30) print ('{:^30}'.format('BANCO CEV')) print('='*30) cedula = 0 resto = 0 while True: saque =int(input('Qual valor quer sacar ? R$')) if saque >= 50: cedula = int(saque/50) saque -= (cedula*50) print(f'{cedula} cédulas de R$ 50.') if saque >= 20: cedula = int(saqu...
none
1
3.703275
4
var/spack/repos/builtin/packages/py-nc-time-axis/package.py
xiki-tempula/spack
9
6630761
# 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 PyNcTimeAxis(PythonPackage): """cftime support for matplotlib axis.""" homepage = "ht...
# 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 PyNcTimeAxis(PythonPackage): """cftime support for matplotlib axis.""" homepage = "ht...
en
0.650545
# 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) cftime support for matplotlib axis.
1.482361
1
tests/orm/test_authinfos.py
azadoks/aiida-core
180
6630762
<gh_stars>100-1000 # -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
en
0.53866
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
2.303665
2
examples/src/dbnd_examples/tutorial_syntax/T31_same_tasks_in_pipeline.py
ipattarapong/dbnd
0
6630763
import logging from dbnd import config, new_dbnd_context, pipeline, task logger = logging.getLogger(__name__) @task def operation_A(x_input="x"): logger.info("Running %s -> operation_x", x_input) if x_input == "ha": raise Exception() return "{} -> operation_x".format(x_input) @pipeline def p...
import logging from dbnd import config, new_dbnd_context, pipeline, task logger = logging.getLogger(__name__) @task def operation_A(x_input="x"): logger.info("Running %s -> operation_x", x_input) if x_input == "ha": raise Exception() return "{} -> operation_x".format(x_input) @pipeline def p...
en
0.806128
# this operation is not wired to any outputs or return values # but we need it to run, so it will be "related" to pipe_operations automatically # you will see y outputs as pipe_argument output in UI
2.532282
3
deepchem/splits/tests/test_splitter.py
weiwang2330/deepchem
1
6630764
<reponame>weiwang2330/deepchem """ Tests for splitter objects. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals from rdkit.Chem.Fingerprints import FingerprintMols __author__ = "<NAME>, <NAME>" __copyright__ = "Copyright 2016, Stanford University" __lic...
""" Tests for splitter objects. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals from rdkit.Chem.Fingerprints import FingerprintMols __author__ = "<NAME>, <NAME>" __copyright__ = "Copyright 2016, Stanford University" __license__ = "MIT" import tempfile...
en
0.850426
Tests for splitter objects. Test some basic splitters. # 0 1 2 3 4 5 6 7 8 9 Test singletask RandomSplitter class. Test singletask IndexSplitter class. # TODO(rbharath): The IndexSplitter() had a bug with splitting sharded # data. Make a test for properly splitting of sharded data. Perhaps using # reshard() to handle t...
2.600178
3
ci.py
karl-zh/packages
0
6630765
# coding=utf-8 import sys import os import stat import time import datetime import subprocess import shlex import shutil import json import requests def execute_command(cmdstring, cwd=None, shell=True): """Execute the system command at the specified address.""" if shell: cmdstring_list = cmdstring ...
# coding=utf-8 import sys import os import stat import time import datetime import subprocess import shlex import shutil import json import requests def execute_command(cmdstring, cwd=None, shell=True): """Execute the system command at the specified address.""" if shell: cmdstring_list = cmdstring ...
en
0.640092
# coding=utf-8 Execute the system command at the specified address. Check the validity of urls. # print('e.message:%s\t' % e.message) Check the json file. Check the content of json file. The entry point of the script.
2.813652
3
ricecooker/utils/downloader.py
richard-dinh/ricecooker
0
6630766
<filename>ricecooker/utils/downloader.py import concurrent.futures import copy import os import re import requests import time from urllib.parse import urlparse, urljoin import uuid from bs4 import BeautifulSoup from selenium import webdriver import selenium.webdriver.support.ui as selenium_ui from requests_file impor...
<filename>ricecooker/utils/downloader.py import concurrent.futures import copy import os import re import requests import time from urllib.parse import urlparse, urljoin import uuid from bs4 import BeautifulSoup from selenium import webdriver import selenium.webdriver.support.ui as selenium_ui from requests_file impor...
en
0.76907
# Session for downloading content from urls # use_dir_lock works with all filesystems and OSes # some sites have API calls running regularly, so the timeout may be that there's never any true # network idle time. Try 'networkidle2' option instead before determining we can't scrape. # get the entire rendered page, inclu...
2.586643
3
services/buttoninputservice/ButtonInputService.py
CydrickT/HomeAutomation
0
6630767
<reponame>CydrickT/HomeAutomation<filename>services/buttoninputservice/ButtonInputService.py<gh_stars>0 import configparser import json import time from datetime import datetime, timedelta import RPi.GPIO as GPIO from core.Service import Service from topics.buttoninput.ButtonInputCommand import ButtonInputCommand from...
import configparser import json import time from datetime import datetime, timedelta import RPi.GPIO as GPIO from core.Service import Service from topics.buttoninput.ButtonInputCommand import ButtonInputCommand from topics.buttoninput.ButtonInputType import ButtonInputType class ButtonInputService(Service): def...
en
0.987642
# We have crossed the short to long threshold. It's now considered a long press. # Up was recently released, but was less than threshold. Considered a short button press. # Down was recently released, but was less than threshold. Considered a short button press. # Was a short 2-button input # Was a short 2-button input...
2.52845
3
src/common/model/numerical_integrator.py
GirZ0n/Methods-of-Computation
2
6630768
from abc import ABC, abstractmethod from typing import Callable from src.common.model.line_segment import LineSegment class NumericalIntegrator(ABC): @property @abstractmethod def accuracy_degree(self) -> int: raise NotImplementedError @abstractmethod def integrate(self, *, f: Callable, ...
from abc import ABC, abstractmethod from typing import Callable from src.common.model.line_segment import LineSegment class NumericalIntegrator(ABC): @property @abstractmethod def accuracy_degree(self) -> int: raise NotImplementedError @abstractmethod def integrate(self, *, f: Callable, ...
none
1
2.915836
3
CORES.py
Joaongm/Projeto-RunAway
0
6630769
<reponame>Joaongm/Projeto-RunAway cores = {'limpa': '\033[m', 'azul': '\033[34;40m', 'fundoazul': '\033[7;36m', 'red': '\033[4;31m', 'amarelo':'\033[33m'} # print(cores) '''print('\033[4;31;40m-*-\033[m'*30) num=float(input('\033[7;30;44mDigite o num:' )) print('{}O valor {}digitado{} foi: {}{}{} e sua porção...
cores = {'limpa': '\033[m', 'azul': '\033[34;40m', 'fundoazul': '\033[7;36m', 'red': '\033[4;31m', 'amarelo':'\033[33m'} # print(cores) '''print('\033[4;31;40m-*-\033[m'*30) num=float(input('\033[7;30;44mDigite o num:' )) print('{}O valor {}digitado{} foi: {}{}{} e sua porção inteira é: {}'.format(cores['limp...
pt
0.393014
# print(cores) print('\033[4;31;40m-*-\033[m'*30) num=float(input('\033[7;30;44mDigite o num:' )) print('{}O valor {}digitado{} foi: {}{}{} e sua porção inteira é: {}'.format(cores['limpa'],cores['azul'], cores['limpa'],cores['red'],num,cores['limpa'], int(num))) 30 black preto 40 31 red ...
3.727666
4
rurusetto/users/migrations/0016_auto_20210811_0523.py
siddhantdixit/rurusetto
19
6630770
# Generated by Django 3.2.5 on 2021-08-11 05:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0015_alter_profile_osu_id'), ] operations = [ migrations.AlterField( model_name='profile', name='discord', ...
# Generated by Django 3.2.5 on 2021-08-11 05:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0015_alter_profile_osu_id'), ] operations = [ migrations.AlterField( model_name='profile', name='discord', ...
en
0.850649
# Generated by Django 3.2.5 on 2021-08-11 05:23
1.711098
2
futuquant/common/__init__.py
jarryji/futuquant
1
6630771
<gh_stars>1-10 # -*- coding: utf-8 -*- class RspHandlerBase(object): """callback function base class""" def __init__(self): pass def on_recv_rsp(self, rsp_pb): """receive response callback function""" return 0, None
# -*- coding: utf-8 -*- class RspHandlerBase(object): """callback function base class""" def __init__(self): pass def on_recv_rsp(self, rsp_pb): """receive response callback function""" return 0, None
en
0.702094
# -*- coding: utf-8 -*- callback function base class receive response callback function
2.197901
2
week_2/capitaliza_string_alternadamente.py
angelitabrg/lih_lab_python2
0
6630772
<filename>week_2/capitaliza_string_alternadamente.py ''' A função capitaliza letras alternadamente: ''' def fazAlgo(string): pos = 0 string1 = "" string = string.lower() stringMa = string.upper() while pos < len(string): if pos % 2 == 0: string1 = string1 + stringMa[pos] ...
<filename>week_2/capitaliza_string_alternadamente.py ''' A função capitaliza letras alternadamente: ''' def fazAlgo(string): pos = 0 string1 = "" string = string.lower() stringMa = string.upper() while pos < len(string): if pos % 2 == 0: string1 = string1 + stringMa[pos] ...
pt
0.830692
A função capitaliza letras alternadamente: # print(fazAlgo("paralelepipedo"))
4.171821
4
tools/c7n_azure/tests/test_policy.py
anthonybgale/cloud-custodian
2
6630773
# Copyright 2015-2018 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2015-2018 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
en
0.858767
# Copyright 2015-2018 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
1.57895
2
openml/extensions/extension_interface.py
Rong-Inspur/openml-python
0
6630774
# License: BSD 3-Clause from abc import ABC, abstractmethod from collections import OrderedDict # noqa: F401 from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union import numpy as np import scipy.sparse # Avoid import cycles: https://mypy.readthedocs.io/en/latest/common_issues.html#import-cycles ...
# License: BSD 3-Clause from abc import ABC, abstractmethod from collections import OrderedDict # noqa: F401 from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union import numpy as np import scipy.sparse # Avoid import cycles: https://mypy.readthedocs.io/en/latest/common_issues.html#import-cycles ...
en
0.616455
# License: BSD 3-Clause # noqa: F401 # Avoid import cycles: https://mypy.readthedocs.io/en/latest/common_issues.html#import-cycles # noqa F401 Defines the interface to connect machine learning libraries to OpenML-Python. See ``openml.extension.sklearn.extension`` for an implementation to bootstrap from. ##########...
2.326919
2
1-mouth01/day07/exe03.py
gary-gggggg/gary
4
6630775
"""乘法表""" list1=[1,2,3,4,5,6,7,8,9] list2=[1,2,3,4,5,6,7,8,9] for l1 in list1: for l2 in list2: print(l1*l2, end="\t") print()
"""乘法表""" list1=[1,2,3,4,5,6,7,8,9] list2=[1,2,3,4,5,6,7,8,9] for l1 in list1: for l2 in list2: print(l1*l2, end="\t") print()
none
1
3.871634
4
pyxcli/mirroring/tests/test_cg_recovery_manager.py
wegotthekeys/pyxcli
19
6630776
<reponame>wegotthekeys/pyxcli<gh_stars>10-100 ############################################################################## # Copyright 2016 IBM Corp. # # 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 t...
############################################################################## # Copyright 2016 IBM Corp. # # 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/lice...
en
0.599643
############################################################################## # Copyright 2016 IBM Corp. # # 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/LI...
1.747457
2
tests/test_basic.py
shawwn/defvar
0
6630777
import unittest import defvar class TestCase(unittest.TestCase): def test_basic(self): self.assertEqual(1, 1) if __name__ == '__main__': unittest.main()
import unittest import defvar class TestCase(unittest.TestCase): def test_basic(self): self.assertEqual(1, 1) if __name__ == '__main__': unittest.main()
none
1
2.362869
2
arc/materials.py
m-schleier/ARC-Alkali-Rydberg-Calculator
53
6630778
<reponame>m-schleier/ARC-Alkali-Rydberg-Calculator import numpy as np import os from .alkali_atom_functions import DPATH class OpticalMaterial(object): """ Abstract class implementing calculation of basic properties for optical materials. """ #: Human-friendly name of material name = "" #...
import numpy as np import os from .alkali_atom_functions import DPATH class OpticalMaterial(object): """ Abstract class implementing calculation of basic properties for optical materials. """ #: Human-friendly name of material name = "" #: List of .csv files listing refractive index measu...
en
0.787387
Abstract class implementing calculation of basic properties for optical materials. #: Human-friendly name of material #: List of .csv files listing refractive index measurements #: first column in these files is wavelength (in mu m), the second #: refractive index # This array is loaded automatically based on sourc...
3.117328
3
TestInterface/uploadFile.py
luoyefeiwu/learn_python
0
6630779
# coding=utf-8 # 保存 import requests import json headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36', 'Content-Type': 'multipart/form-data' } data = [ { "projectDeclare": { "id": "123" ...
# coding=utf-8 # 保存 import requests import json headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36', 'Content-Type': 'multipart/form-data' } data = [ { "projectDeclare": { "id": "123" ...
zh
0.313082
# coding=utf-8 # 保存
2.349675
2
filter_plugins/clean_config.py
aegiacometti/netconf-backup-gogs
3
6630780
<reponame>aegiacometti/netconf-backup-gogs # # Simple list append filter # from __future__ import (absolute_import, division, print_function) __metaclass__ = type from jinja2 import TemplateError import re def clean_config(l, *argv): for element in argv: if type(element) is list: for value in...
# # Simple list append filter # from __future__ import (absolute_import, division, print_function) __metaclass__ = type from jinja2 import TemplateError import re def clean_config(l, *argv): for element in argv: if type(element) is list: for value in element: l = clean_config(...
en
0.581569
# # Simple list append filter #
2.649754
3
examples/pandas_example.py
mdkhaledben/n-beats
1
6630781
<reponame>mdkhaledben/n-beats<gh_stars>1-10 import numpy as np import pandas as pd from nbeats_keras.model import NBeatsNet as NBeatsKeras # This is an example linked to this issue: https://github.com/philipperemy/n-beats/issues/60. # Here the target variable is no longer part of the inputs. # NOTE: it is also possi...
import numpy as np import pandas as pd from nbeats_keras.model import NBeatsNet as NBeatsKeras # This is an example linked to this issue: https://github.com/philipperemy/n-beats/issues/60. # Here the target variable is no longer part of the inputs. # NOTE: it is also possible to solve this problem with exogenous var...
en
0.681738
# This is an example linked to this issue: https://github.com/philipperemy/n-beats/issues/60. # Here the target variable is no longer part of the inputs. # NOTE: it is also possible to solve this problem with exogenous variables. # See example/exo_example.py. # Use <A, B, C> to predict D. # backcast length is timesteps...
2.990135
3
Choice_PriceBot/choice_price_commands.py
Samuellyworld/CHOICE_TinyMan_Wrapper
20
6630782
<filename>Choice_PriceBot/choice_price_commands.py # Imports import json, time from datetime import datetime from algosdk.v2client import algod from tinyman.v1.client import TinymanClient import discord from discord.ext import commands # Get bot tokens f = open('./keys.json',) keys = json.load(f) f.close() # Create a...
<filename>Choice_PriceBot/choice_price_commands.py # Imports import json, time from datetime import datetime from algosdk.v2client import algod from tinyman.v1.client import TinymanClient import discord from discord.ext import commands # Get bot tokens f = open('./keys.json',) keys = json.load(f) f.close() # Create a...
en
0.717566
# Imports # Get bot tokens # Create a discord client # Get Algo Client / Using purestake; supplement your own API key for the algod_token # Get TMan Client / 350338509 is the app ID for all TinymanClient implementations # Get Assets and Pools - ALGO, CHOICE, USDC # Retrieve price of choice # Command to show the price i...
2.812242
3
Lib/lib2to3/fixes/fix_tuple_params.py
sireliah/polish-python
1
6630783
<reponame>sireliah/polish-python<filename>Lib/lib2to3/fixes/fix_tuple_params.py """Fixer dla function definitions przy tuple parameters. def func(((a, b), c), d): ... -> def func(x, d): ((a, b), c) = x ... It will also support lambdas: lambda (x, y): x + y -> lambda t: t[0] + t[1] # The pa...
"""Fixer dla function definitions przy tuple parameters. def func(((a, b), c), d): ... -> def func(x, d): ((a, b), c) = x ... It will also support lambdas: lambda (x, y): x + y -> lambda t: t[0] + t[1] # The parens are a syntax error w Python 3 lambda (x): x + y -> lambda x: x + y """ ...
en
0.516455
Fixer dla function definitions przy tuple parameters. def func(((a, b), c), d): ... -> def func(x, d): ((a, b), c) = x ... It will also support lambdas: lambda (x, y): x + y -> lambda t: t[0] + t[1] # The parens are a syntax error w Python 3 lambda (x): x + y -> lambda x: x + y # Autho...
2.757215
3
python2/luis_sdk/luis_action.py
ParadoxBusinessGroup/Cognitive-LUIS-Python
100
6630784
''' Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services Microsoft Cognitive Services (formerly Project Oxford) GitHub: https://github.com/Microsoft/ProjectOxford-ClientSDK Copyright (c) Micr...
''' Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services Microsoft Cognitive Services (formerly Project Oxford) GitHub: https://github.com/Microsoft/ProjectOxford-ClientSDK Copyright (c) Micr...
en
0.761097
Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. Microsoft Cognitive Services (formerly Project Oxford): https://www.microsoft.com/cognitive-services Microsoft Cognitive Services (formerly Project Oxford) GitHub: https://github.com/Microsoft/ProjectOxford-ClientSDK Copyright (c) Microsof...
1.745115
2
diofant/sets/__init__.py
project-kotinos/diofant___diofant
1
6630785
<filename>diofant/sets/__init__.py """ Package for set theory. """ from ..core.singleton import S from .contains import Contains from .fancysets import ImageSet, Range from .sets import (Complement, EmptySet, FiniteSet, Intersection, Interval, ProductSet, Set, SymmetricDifference, Union, imageset) ...
<filename>diofant/sets/__init__.py """ Package for set theory. """ from ..core.singleton import S from .contains import Contains from .fancysets import ImageSet, Range from .sets import (Complement, EmptySet, FiniteSet, Intersection, Interval, ProductSet, Set, SymmetricDifference, Union, imageset) ...
en
0.906911
Package for set theory.
1.700583
2
experiments.py
umich-dbgroup/duoquest
4
6630786
<reponame>umich-dbgroup/duoquest<filename>experiments.py import argparse import configparser import json from duoquest.database import Database from duoquest.external.eval import build_foreign_key_map_from_json from duoquest.files import results_path from duoquest.verifier import DuoquestVerifier from duoquest.nlq_cli...
import argparse import configparser import json from duoquest.database import Database from duoquest.external.eval import build_foreign_key_map_from_json from duoquest.files import results_path from duoquest.verifier import DuoquestVerifier from duoquest.nlq_client import NLQClient from duoquest.schema import Schema f...
en
0.481945
# Disable pieces of the system # Debugging options # Load dataset # TODO
2.131908
2
advance/libFiles.py
shashidev091/learnToRockPython
1
6630787
<filename>advance/libFiles.py from time import ctime from pathlib import Path Path(r"C:\Program Files\Microsoft") Path("/usr/local/bin") Path() Path("ecommerce/__init__.py") Path.home() """ - important methods """ path = Path("ecommerce/__init__.py") path.exists() path.is_file() path.is_dir() print(path.name) print...
<filename>advance/libFiles.py from time import ctime from pathlib import Path Path(r"C:\Program Files\Microsoft") Path("/usr/local/bin") Path() Path("ecommerce/__init__.py") Path.home() """ - important methods """ path = Path("ecommerce/__init__.py") path.exists() path.is_file() path.is_dir() print(path.name) print...
en
0.862653
- important methods # it will give the suffix of the given extension of a file - more required methods remember to are # path.exists() # path.mkdir() # path.rmdir() # path.rename("rename_to") # - glob() - it gives an iterator to search recursively # this search recursively # to be able to search more recursively we...
3.320843
3
awx/main/tests/functional/test_ldap.py
acidburn0zzz/awx
1
6630788
<gh_stars>1-10 import ldap import ldif import pytest import os from mockldap import MockLdap from awx.api.versioning import reverse @pytest.fixture def ldap_generator(): def fn(fname, host='localhost'): fh = open(os.path.join(os.path.dirname(os.path.realpath(__file__)), fname), 'rb') ctrl = ldi...
import ldap import ldif import pytest import os from mockldap import MockLdap from awx.api.versioning import reverse @pytest.fixture def ldap_generator(): def fn(fname, host='localhost'): fh = open(os.path.join(os.path.dirname(os.path.realpath(__file__)), fname), 'rb') ctrl = ldif.LDIFRecordList...
en
0.913988
#mockldap.stop() # Note: mockldap isn't fully featured. Fancy queries aren't fully baked. # However, objects returned are solid so they should flow through django ldap middleware nicely. # Generate mock ldap servers and init with ldap data # eng_user1 exists in ansible and redhat but not example
2.268782
2
topics/topic_2/3_next_and_previous.py
VladBaryliuk/my_trainings
0
6630789
<reponame>VladBaryliuk/my_trainings<gh_stars>0 def next_and_previous(number): print("The next number for the number", number, "is", number + 1, end="") print(".") print("The previous number for the number", number, "is", number - 1, end="") print(".") next_and_previous(int(input()))
def next_and_previous(number): print("The next number for the number", number, "is", number + 1, end="") print(".") print("The previous number for the number", number, "is", number - 1, end="") print(".") next_and_previous(int(input()))
none
1
4.00892
4
tourist/models/attrib.py
TomGoBravo/tourist-with-flask
3
6630790
<gh_stars>1-10 from typing import Dict, Optional, List from datetime import date import attr import json from shapely.geometry.geo import shape from shapely.geometry.geo import mapping import geojson def is_date_or_none(self, _, value): if value is None: return date.fromisoformat(value) def date_han...
from typing import Dict, Optional, List from datetime import date import attr import json from shapely.geometry.geo import shape from shapely.geometry.geo import mapping import geojson def is_date_or_none(self, _, value): if value is None: return date.fromisoformat(value) def date_handler(obj): ...
en
0.908434
# There may be an extra round trip from geo to mapping but this works
2.305676
2
parfile.py
gdesvignes/python-tools
0
6630791
<filename>parfile.py<gh_stars>0 ## parfile.py taken from Presto by <NAME> (NRAO) ## https://github.com/scottransom/presto ## http://www.cv.nrao.edu/~sransom from types import StringType, FloatType import math import sys import psr_utils as pu import os import numpy as np try: from slalib import sla_ecleq, sla_eqe...
<filename>parfile.py<gh_stars>0 ## parfile.py taken from Presto by <NAME> (NRAO) ## https://github.com/scottransom/presto ## http://www.cv.nrao.edu/~sransom from types import StringType, FloatType import math import sys import psr_utils as pu import os import numpy as np try: from slalib import sla_ecleq, sla_eqe...
en
0.707142
## parfile.py taken from Presto by <NAME> (NRAO) ## https://github.com/scottransom/presto ## http://www.cv.nrao.edu/~sransom # # The following are the parameters that are accepted in a # par file when trying to determine a pulsar ephemeris. # # PEPOCH Epoch of period/frequency parameters and position (MJD) # F0 ...
2.26485
2
vedastr_cstr/vedastr/models/bodies/feature_extractors/encoders/backbones/__init__.py
bsm8734/formula-image-latex-recognition
13
6630792
<reponame>bsm8734/formula-image-latex-recognition from .builder import build_backbone # noqa 401 from .general_backbone import GBackbone # noqa 401 from .resnet import GResNet, ResNet # noqa 401
from .builder import build_backbone # noqa 401 from .general_backbone import GBackbone # noqa 401 from .resnet import GResNet, ResNet # noqa 401
uz
0.195003
# noqa 401 # noqa 401 # noqa 401
0.98733
1
3-storage.py
CityOfZion/python-smart-contract-workshop
82
6630793
<reponame>CityOfZion/python-smart-contract-workshop """ This example shows how to write, read and manipulate value in storage. It is also a good example of using neo-python's `debugstorage`, which allows you to test `Put` operations with `build .. test` commands. Debugstorage is enabled by default, you can disable it ...
""" This example shows how to write, read and manipulate value in storage. It is also a good example of using neo-python's `debugstorage`, which allows you to test `Put` operations with `build .. test` commands. Debugstorage is enabled by default, you can disable it with `sc debugstorage off` and, more importantly, re...
en
0.763665
This example shows how to write, read and manipulate value in storage. It is also a good example of using neo-python's `debugstorage`, which allows you to test `Put` operations with `build .. test` commands. Debugstorage is enabled by default, you can disable it with `sc debugstorage off` and, more importantly, reset ...
3.147688
3
ls_astropy_es.py
olgaborchevkina/ls_astropy_es
0
6630794
# -*- coding: utf-8 -*- """ Plot graph according to the DAT file @author: <NAME> """ import csv import glob import os import matplotlib.pyplot as plt import scipy.signal as signal import numpy as np import math from astropy.timeseries import LombScargle def read_raw_file_data(filepath): ''' Read data in list...
# -*- coding: utf-8 -*- """ Plot graph according to the DAT file @author: <NAME> """ import csv import glob import os import matplotlib.pyplot as plt import scipy.signal as signal import numpy as np import math from astropy.timeseries import LombScargle def read_raw_file_data(filepath): ''' Read data in list...
en
0.708057
# -*- coding: utf-8 -*- Plot graph according to the DAT file @author: <NAME> Read data in list # Get raw data Read data in [[val,time],[val, time]] format # Get raw data # Convert data to list. If data is absent set it to None Save data in format [[],[]] into DAT file - CSV - with \t delimeter - \n line...
2.711303
3
pypy/module/test_lib_pypy/test_cPickle.py
pypyjs/pypy
34
6630795
from __future__ import absolute_import import py from lib_pypy import cPickle def test_stack_underflow(): py.test.raises(cPickle.UnpicklingError, cPickle.loads, "a string")
from __future__ import absolute_import import py from lib_pypy import cPickle def test_stack_underflow(): py.test.raises(cPickle.UnpicklingError, cPickle.loads, "a string")
none
1
1.631378
2
rmepy/logger.py
233a344a455/RobomasterEPlib
3
6630796
<filename>rmepy/logger.py import traceback class Logger(): def __init__(self, name): if name.__class__.__name__ == 'str': self.name = name else: self.name = name.__class__.__name__ self.level = 'DEBUG' def info(self, msg): """Print infos. Args:...
<filename>rmepy/logger.py import traceback class Logger(): def __init__(self, name): if name.__class__.__name__ == 'str': self.name = name else: self.name = name.__class__.__name__ self.level = 'DEBUG' def info(self, msg): """Print infos. Args:...
zh
0.239143
Print infos. Args: msg: (str) 输出的info信息 Returns: None Print warnings. Args: msg: (str) 输出的警告信息 Returns: None Print errors. 输出错误并提供traceback或者强制继续 Args: msg: (str) 输出的错误信息 Returns: None ...
3.171183
3
hexagon/support/wax.py
redbeestudios/hexagon
8
6630797
<filename>hexagon/support/wax.py from typing import Union, List from InquirerPy import inquirer from hexagon.domain.env import Env from hexagon.domain.tool import Tool from hexagon.domain.wax import Selection, SelectionType from hexagon.support.hooks import HexagonHooks def __classifier(value: Union[Tool, Env]): ...
<filename>hexagon/support/wax.py from typing import Union, List from InquirerPy import inquirer from hexagon.domain.env import Env from hexagon.domain.tool import Tool from hexagon.domain.wax import Selection, SelectionType from hexagon.support.hooks import HexagonHooks def __classifier(value: Union[Tool, Env]): ...
none
1
2.225034
2
zk/check.py
chadharvey/integrations-core
2
6630798
<filename>zk/check.py # (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) ''' As of zookeeper 3.4.0, the `mntr` admin command is provided for easy parsing of zookeeper stats. This check first parses the `stat` admin command for a version number. If the zookeeper ve...
<filename>zk/check.py # (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) ''' As of zookeeper 3.4.0, the `mntr` admin command is provided for easy parsing of zookeeper stats. This check first parses the `stat` admin command for a version number. If the zookeeper ve...
en
0.756329
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) As of zookeeper 3.4.0, the `mntr` admin command is provided for easy parsing of zookeeper stats. This check first parses the `stat` admin command for a version number. If the zookeeper version supports `mntr`, it i...
1.598324
2
examples/hands.py
MPI-IS/reactive_pepper
0
6630799
import math,time,random import pepper_interface IP = "127.0.0.1" PORT = 36417 simulation = False with pepper_interface.get(IP,PORT,simulation) as pepper: # opening pepper.hands.set(True,1.0,velocity=0.5) # left pepper.hands.set(False,1.0,velocity=0.5) # right while pepper.hands.running(True) or pepp...
import math,time,random import pepper_interface IP = "127.0.0.1" PORT = 36417 simulation = False with pepper_interface.get(IP,PORT,simulation) as pepper: # opening pepper.hands.set(True,1.0,velocity=0.5) # left pepper.hands.set(False,1.0,velocity=0.5) # right while pepper.hands.running(True) or pepp...
en
0.554343
# opening # left # right # closing # left # right
2.713202
3
tests/test_tracing_map_parameters.py
rgstephens/opentracing-decorator
4
6630800
<filename>tests/test_tracing_map_parameters.py import unittest from typing import Dict from opentracing.mocktracer import MockTracer from opentracing_decorator.tracing import Tracing class TestTracing(unittest.TestCase): def setUp(self): self.tracer = MockTracer() self.tracing = Tracing(self.tra...
<filename>tests/test_tracing_map_parameters.py import unittest from typing import Dict from opentracing.mocktracer import MockTracer from opentracing_decorator.tracing import Tracing class TestTracing(unittest.TestCase): def setUp(self): self.tracer = MockTracer() self.tracing = Tracing(self.tra...
none
1
3.025034
3
radioapp.py
hecke-rs/radio
2
6630801
from flask.helpers import get_debug_flag from radio import create_app from radio.settings import DevConfig, ProdConfig config = DevConfig() if get_debug_flag() else ProdConfig() app = create_app(config)
from flask.helpers import get_debug_flag from radio import create_app from radio.settings import DevConfig, ProdConfig config = DevConfig() if get_debug_flag() else ProdConfig() app = create_app(config)
none
1
1.797075
2
tydal/quiz2.py
mguerrap/CurrentsDiscovery
2
6630802
<filename>tydal/quiz2.py def quiz(): """ Generates module 2 quiz outputs print statements user needs to type and line execute each answer before the next question shows up """ #Question 1 print("Module 2 Quiz (4 questions)") print() print("Question 1: A tide is _____?") print() ...
<filename>tydal/quiz2.py def quiz(): """ Generates module 2 quiz outputs print statements user needs to type and line execute each answer before the next question shows up """ #Question 1 print("Module 2 Quiz (4 questions)") print() print("Question 1: A tide is _____?") print() ...
en
0.872437
Generates module 2 quiz outputs print statements user needs to type and line execute each answer before the next question shows up #Question 1 #Question 2 #Question 3 #Question 4
3.96272
4
src/algoritmia/problems/textprocessing/wordsegmentation.py
DavidLlorens/algoritmia
6
6630803
#coding: latin1 class TextSegmenter: #[prob #[]seg def __init__(self, Pr: "IMap<str, Real>"): self.Pr = Pr def probability(self, t: "str") -> "Real": P = [1.0] + [None] * (len(t)) for j in range(1,len(t)+1): P[j] = max(P[i] * self.Pr[t[i:j]] for i in range(...
#coding: latin1 class TextSegmenter: #[prob #[]seg def __init__(self, Pr: "IMap<str, Real>"): self.Pr = Pr def probability(self, t: "str") -> "Real": P = [1.0] + [None] * (len(t)) for j in range(1,len(t)+1): P[j] = max(P[i] * self.Pr[t[i:j]] for i in range(...
pt
0.133927
#coding: latin1 #[prob #[]seg #]prob #[seg #]seg
2.986519
3
readthedocs/rtd_tests/tests/test_comments.py
ank-forked/readthedocs.org
1
6630804
import random from unittest.case import expectedFailure from django.contrib.auth.models import User from django.test import TestCase from django.test.client import RequestFactory from django_dynamic_fixture import fixture from django_dynamic_fixture import get from django_dynamic_fixture import new from rest_framework...
import random from unittest.case import expectedFailure from django.contrib.auth.models import User from django.test import TestCase from django.test.client import RequestFactory from django_dynamic_fixture import fixture from django_dynamic_fixture import get from django_dynamic_fixture import new from rest_framework...
en
0.931071
# This comment has never been approved... # ...until now! # We take a look at the visible comments and find that neither comment # is among them. # Approve the first comment... # ...and find that the first comment, but not the second one, is visible. # Approve the first comment... # ...but this time, change the node. #...
2.081314
2
Pix2Story/source/services/azureml_service.py
skumar911/ailab
4,537
6630805
import os, re, requests, json from azureml.core.model import Model from azureml.core.webservice import Webservice, AksWebservice from azureml.core.image import ContainerImage from azureml.core import Workspace, Run from azureml.core.conda_dependencies import CondaDependencies from azureml.core.authentication import Ser...
import os, re, requests, json from azureml.core.model import Model from azureml.core.webservice import Webservice, AksWebservice from azureml.core.image import ContainerImage from azureml.core import Workspace, Run from azureml.core.conda_dependencies import CondaDependencies from azureml.core.authentication import Ser...
none
1
2.044389
2
notifications/migrations/0003_auto_20161028_1749.py
kevinvargasp/my_proyecto
0
6630806
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-28 21:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('notifications', '0002_auto_20161028_1517'), ] operations = [ migrations.AlterModelO...
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-28 21:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('notifications', '0002_auto_20161028_1517'), ] operations = [ migrations.AlterModelO...
en
0.789179
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-28 21:49
1.548185
2
xlsx2html/__init__.py
waldobeest/xlsx2html
0
6630807
<reponame>waldobeest/xlsx2html # -*- coding: utf-8 -*- import warnings from .core import xlsx2html def xls2html(*args, **kwargs): warnings.warn("This func was renamed to xlsx2html.", DeprecationWarning) return xlsx2html(*args, **kwargs)
# -*- coding: utf-8 -*- import warnings from .core import xlsx2html def xls2html(*args, **kwargs): warnings.warn("This func was renamed to xlsx2html.", DeprecationWarning) return xlsx2html(*args, **kwargs)
en
0.769321
# -*- coding: utf-8 -*-
2.041602
2
osxphotos/utils.py
xwu64/osxphotos
0
6630808
""" Utility functions used in osxphotos """ import fnmatch import glob import importlib import inspect import logging import os import os.path import pathlib import platform import re import sqlite3 import subprocess import sys import unicodedata import urllib.parse from plistlib import load as plistload from typing i...
""" Utility functions used in osxphotos """ import fnmatch import glob import importlib import inspect import logging import os import os.path import pathlib import platform import re import sqlite3 import subprocess import sys import unicodedata import urllib.parse from plistlib import load as plistload from typing i...
en
0.743098
Utility functions used in osxphotos Used only for testing Returns: logging.Logger object -- logging.Logger object for osxphotos Enable or disable debug logging returns True if debugging turned on (via _set_debug), otherwise, false do nothing (no operation) Returns string with filename and current line numb...
2.285243
2
neon/transforms/linear.py
kashif/neon
3
6630809
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana 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.o...
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana 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.o...
en
0.656751
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana 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.o...
2.2837
2
lib/ui/Ui.py
mattermccrea/expensive-skeleton-free
0
6630810
from datetime import datetime t = datetime.now().strftime("\033[1;33m[\033[1;37m%H:%M\033[1;33m][") class Sec: info = t+"\033[1;32mINFO\033[1;33m]\033[1;37m " fail = t+"\033[1;31mFAIL\033[1;33m]\033[1;31m " warn = t+"\033[1;31mWARN\033[1;33m]\033[1;30m " def Banner(): print r""" ...
from datetime import datetime t = datetime.now().strftime("\033[1;33m[\033[1;37m%H:%M\033[1;33m][") class Sec: info = t+"\033[1;32mINFO\033[1;33m]\033[1;37m " fail = t+"\033[1;31mFAIL\033[1;33m]\033[1;31m " warn = t+"\033[1;31mWARN\033[1;33m]\033[1;30m " def Banner(): print r""" ...
de
0.211776
_____ _ _ _ | __| |_ ___| |___| |_ ___ ___ |__ | '_| -_| | -_| _| . | | |_____|_,_|___|_|___|_| |___|_|_| \033[1;31m+\033[1;33m--=[ \033[1;31me\033[1;30mxpensive \033[1;31ms\033[1;30mkeleton\033[1;32m free \033[1;31m+\033[1;33m--=[ \033[1;30mBy : 8 Ball, <NAME>\n\n
2.627232
3
Plugins/Robot1857v2.py
pompom2626/msbot
1
6630811
import os, sys sys.path.append('..') import uuid import pandas as pd import pandas.io.sql as pdsql from pandas import DataFrame, Series # from pandas.lib import Timestamp import sqlite3 import PyQt5 from PyQt5 import QtCore, QtGui, uic from PyQt5 import QAxContainer from PyQt5.QtGui import * from PyQt5.QtCore import...
import os, sys sys.path.append('..') import uuid import pandas as pd import pandas.io.sql as pdsql from pandas import DataFrame, Series # from pandas.lib import Timestamp import sqlite3 import PyQt5 from PyQt5 import QtCore, QtGui, uic from PyQt5 import QAxContainer from PyQt5.QtGui import * from PyQt5.QtCore import...
ko
0.984185
# from pandas.lib import Timestamp 09:00:00-11:00:00, 12:00:00-13:00:00, 14:00:00-15:20:00 09:00:00-11:00:00, 12:00:00-13:00:00, 14:00:00-15:20:00 # 체결 # 종목검색 # 현재 가지고 있는 포트폴리오의 실시간데이타를 받는다. # 체결 # 주문번호처리 # 내가 주문한 것이 체결된 경우 처리 # 매도 #TODO: 빠른거래시 화면의 응답속도도 영향을 주므로 일단은 커멘트처리 # self.parent.RobotView() # ToTelegram(__class_...
2.044594
2
p2ner/components/overlay/distributedclient/distributedclient/messages/peerlistmessage.py
schristakidis/p2ner
2
6630812
<reponame>schristakidis/p2ner # -*- coding: utf-8 -*- # Copyright 2012 <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-...
# -*- coding: utf-8 -*- # Copyright 2012 <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 a...
en
0.848736
# -*- coding: utf-8 -*- # Copyright 2012 <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 a...
2.01981
2
hs_access_control/management/commands/user.py
tommac7/hydroshare
0
6630813
<reponame>tommac7/hydroshare """ This prints the active permissions of an access control relationship between a user and a resource. This is invaluable for access control debugging. """ from django.core.management.base import BaseCommand from hs_access_control.models.privilege import PrivilegeCodes from hs_access_con...
""" This prints the active permissions of an access control relationship between a user and a resource. This is invaluable for access control debugging. """ from django.core.management.base import BaseCommand from hs_access_control.models.privilege import PrivilegeCodes from hs_access_control.management.utilities imp...
en
0.917588
This prints the active permissions of an access control relationship between a user and a resource. This is invaluable for access control debugging. Print access control provenance. # a command to execute
2.810711
3
simulation/utils/geometry/point.py
KITcar-Team/kitcar-gazebo-simulation
13
6630814
<reponame>KITcar-Team/kitcar-gazebo-simulation """Basic point class which is compatible with all needed formats.""" __copyright__ = "KITcar" # Compatible formats import geometry_msgs.msg as geometry_msgs from simulation.utils.geometry.transform import Transform from simulation.utils.geometry.vector import Vector # ...
"""Basic point class which is compatible with all needed formats.""" __copyright__ = "KITcar" # Compatible formats import geometry_msgs.msg as geometry_msgs from simulation.utils.geometry.transform import Transform from simulation.utils.geometry.vector import Vector # Base class from .frame import validate_and_mai...
en
0.806178
Basic point class which is compatible with all needed formats. # Compatible formats # Base class Point subclass of Vector which implements a point. Compared with its Superclass, this class imposes some restrictions to better fit the interpretation of a point in the mathematical sense. Uses vector's initia...
3.17577
3
mrf/evaluation/backward.py
fabianbalsiger/mrf-reconstruction-mlmir2020
4
6630815
import os import numpy as np import mrf.data.definition as defs import mrf.data.normalization as norm import mrf.evaluation.base as evalbase import mrf.evaluation.metric as metric import mrf.plot.labeling as pltlbl import mrf.plot.parameter as pltparam import mrf.plot.statistics as pltstat class BackwardEvaluator(e...
import os import numpy as np import mrf.data.definition as defs import mrf.data.normalization as norm import mrf.evaluation.base as evalbase import mrf.evaluation.metric as metric import mrf.plot.labeling as pltlbl import mrf.plot.parameter as pltparam import mrf.plot.statistics as pltstat class BackwardEvaluator(e...
en
0.394016
A backward evaluator, evaluating the goodness of the MR parameter estimation. Args: reference: The reference MR parameters (normalized). prediction: The predicted MR parameters (normalized). ranges: The original range of the MR parameters before normalization. metrics: A ...
2.721963
3
voxplex/config.py
metrasynth/voxplex
0
6630816
<filename>voxplex/config.py from os.path import expanduser import yaml def config_from_file(path): with open(expanduser(path), 'r') as f: return yaml.load(f)
<filename>voxplex/config.py from os.path import expanduser import yaml def config_from_file(path): with open(expanduser(path), 'r') as f: return yaml.load(f)
none
1
2.162198
2
app/training/migrations/0002_auto_20210413_1232.py
DmitryBovsunovskyi/workout-restfull-api
0
6630817
<reponame>DmitryBovsunovskyi/workout-restfull-api # Generated by Django 3.1.8 on 2021-04-13 12:32 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('training', '0001_initial'), ] operations = [ migrations.RenameField( model_name='exerc...
# Generated by Django 3.1.8 on 2021-04-13 12:32 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('training', '0001_initial'), ] operations = [ migrations.RenameField( model_name='exerciseset', old_name='workout_session_id'...
en
0.770804
# Generated by Django 3.1.8 on 2021-04-13 12:32
1.787987
2
api/src/repository/DocumentationRepository.py
thalesgelinger/truco-alpha
0
6630818
from python_framework import Repository, OpenApiDocumentationFile @Repository() class DocumentationRepository: def getSwaggerDocumentation(self): return OpenApiDocumentationFile.loadDocumentation(self.globals.api) def getApiTree(self): return self.globals.apiTree
from python_framework import Repository, OpenApiDocumentationFile @Repository() class DocumentationRepository: def getSwaggerDocumentation(self): return OpenApiDocumentationFile.loadDocumentation(self.globals.api) def getApiTree(self): return self.globals.apiTree
none
1
2.049082
2
objects/email_helper.py
lawrel/ArtificialWormBlast
3
6630819
"""email_helper.py creates and sends emails""" import smtplib import ssl from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart import uuid def send_email(r_email, subjectline, body): """Function checks the credentials of a user (login)""" # Create a secure SSL con...
"""email_helper.py creates and sends emails""" import smtplib import ssl from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart import uuid def send_email(r_email, subjectline, body): """Function checks the credentials of a user (login)""" # Create a secure SSL con...
en
0.917787
email_helper.py creates and sends emails Function checks the credentials of a user (login) # Create a secure SSL context # get emails to and from # Log into our account to send email # create message # send message Function checks the credentials of a user (login) Hi there! It looks like you forgot your password...
3.516718
4
0049.Group Anagrams/solution.py
zhlinh/leetcode
0
6630820
<reponame>zhlinh/leetcode<filename>0049.Group Anagrams/solution.py #!/usr/bin/env python # -*- coding: utf-8 -*- ''' ***************************************** Author: zhlinh Email: <EMAIL> Version: 0.0.1 Created Time: 2016-02-20 Last_modify: 2016-02-20 **************************************...
Anagrams/solution.py #!/usr/bin/env python # -*- coding: utf-8 -*- ''' ***************************************** Author: zhlinh Email: <EMAIL> Version: 0.0.1 Created Time: 2016-02-20 Last_modify: 2016-02-20 ****************************************** ''' ''' Given an array of strings, group...
en
0.477401
#!/usr/bin/env python # -*- coding: utf-8 -*- ***************************************** Author: zhlinh Email: <EMAIL> Version: 0.0.1 Created Time: 2016-02-20 Last_modify: 2016-02-20 ****************************************** Given an array of strings, group anagrams together. For example, ...
3.89673
4
tests/test_companies.py
exit107/gremlin-python
29
6630821
<filename>tests/test_companies.py import unittest from unittest.mock import patch import logging import requests from gremlinapi.companies import GremlinAPICompanies from .util import mock_json, mock_data, mock_identifier, hooli_id class TestCompanies(unittest.TestCase): @patch("requests.get") def test_get_c...
<filename>tests/test_companies.py import unittest from unittest.mock import patch import logging import requests from gremlinapi.companies import GremlinAPICompanies from .util import mock_json, mock_data, mock_identifier, hooli_id class TestCompanies(unittest.TestCase): @patch("requests.get") def test_get_c...
none
1
2.541172
3
tests/st/gradient/test_function_vjp_graph.py
httpsgithu/mindspore
1
6630822
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
en
0.759593
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
2.225777
2
backend/api/migrations/0001_initial.py
SamerElhamdo/tejruba-frontend
0
6630823
# Generated by Django 2.1.5 on 2019-07-28 13:38 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
# Generated by Django 2.1.5 on 2019-07-28 13:38 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
en
0.715505
# Generated by Django 2.1.5 on 2019-07-28 13:38
1.764826
2
tests/test_df.py
listuser/jc
0
6630824
<reponame>listuser/jc<filename>tests/test_df.py import os import json import unittest import jc.parsers.df THIS_DIR = os.path.dirname(os.path.abspath(__file__)) class MyTests(unittest.TestCase): def setUp(self): # input with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/df.ou...
import os import json import unittest import jc.parsers.df THIS_DIR = os.path.dirname(os.path.abspath(__file__)) class MyTests(unittest.TestCase): def setUp(self): # input with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/df.out'), 'r', encoding='utf-8') as f: se...
en
0.40378
# input # output Test plain 'df' with no data Test plain 'df' on Centos 7.7 Test plain 'df' on Ubuntu 18.4 Test plain 'df' on OSX 10.11.6 Test plain 'df' on OSX 10.14.6 Test 'df -h' on Centos 7.7 Test 'df -h' on Ubuntu 18.4 Test 'df -h' on OSX 10.11.6 Test 'df -h' on OSX 10.14.6 Test older version of 'df' with long fil...
2.564413
3
wemake_python_styleguide/formatter.py
Andrka/wemake-python-styleguide
1
6630825
""" Our very own ``flake8`` formatter for better error messages. That's how all ``flake8`` formatters work: .. mermaid:: :caption: ``flake8`` formatting API calls order. graph LR F2[start] --> F3[after_init] F3 --> F4[start] F4 --> F5[beggining] F5 --> ...
""" Our very own ``flake8`` formatter for better error messages. That's how all ``flake8`` formatters work: .. mermaid:: :caption: ``flake8`` formatting API calls order. graph LR F2[start] --> F3[after_init] F3 --> F4[start] F4 --> F5[beggining] F5 --> ...
en
0.710249
Our very own ``flake8`` formatter for better error messages. That's how all ``flake8`` formatters work: .. mermaid:: :caption: ``flake8`` formatting API calls order. graph LR F2[start] --> F3[after_init] F3 --> F4[start] F4 --> F5[beggining] F5 --> F6[h...
2.067964
2
tsv2json.py
spookyahell/covid19-impfung-de
0
6630826
'''by spookyahell''' import json class TSV2JSONConverter(object): def __init__(self, file_path): self.file = open(file_path) self.fpath = file_path #~ mode allows for a list and dict(ionary) version of the data def convert(self, mode = 'dict', needle = 2): if mode == 'dict': result = {} data = self.fi...
'''by spookyahell''' import json class TSV2JSONConverter(object): def __init__(self, file_path): self.file = open(file_path) self.fpath = file_path #~ mode allows for a list and dict(ionary) version of the data def convert(self, mode = 'dict', needle = 2): if mode == 'dict': result = {} data = self.fi...
en
0.742189
by spookyahell #~ mode allows for a list and dict(ionary) version of the data
2.899704
3
tests/interactive/font/test_font.py
whitestone8214/pyglet-1.3.0-mod
0
6630827
<gh_stars>0 """ Test font loading and rendering. """ import pytest import pyglet from pyglet import font from tests.annotations import Platform from .font_test_base import font_fixture @pytest.mark.parametrize('question,color', [ ('Default font should appear at 0.3 opacity (faint grey)', (0, 0, 0, 0.3)), ('T...
""" Test font loading and rendering. """ import pytest import pyglet from pyglet import font from tests.annotations import Platform from .font_test_base import font_fixture @pytest.mark.parametrize('question,color', [ ('Default font should appear at 0.3 opacity (faint grey)', (0, 0, 0, 0.3)), ('Text should n...
en
0.841238
Test font loading and rendering. Test that font colour is applied correctly. Test that a font with no name given still renders using some sort of default system font. Test that a font likely to be installed on the computer can be loaded and displayed correctly. One window will open, it should show "Quickly...
2.745565
3
superorm/session.py
lyoshur/superorm
0
6630828
<filename>superorm/session.py import threading from superorm.pool import ConnPool class SessionManager: # Database conn pool _conn_pool = None # conn Session cache _cache = None def __init__(self, conn_pool: ConnPool): """ Init the Thread cache for conn session """ ...
<filename>superorm/session.py import threading from superorm.pool import ConnPool class SessionManager: # Database conn pool _conn_pool = None # conn Session cache _cache = None def __init__(self, conn_pool: ConnPool): """ Init the Thread cache for conn session """ ...
en
0.480736
# Database conn pool # conn Session cache Init the Thread cache for conn session Get the cache session Destroy the cache # session pool # use index # session manager # auto commit Init SQLSession :param conn_pool: conn pool :param conn_index: The database connection index being used :param sessi...
2.979377
3
gym/frozen2a_policyiteration.py
randhawp/rl-gridworlds
0
6630829
<gh_stars>0 import gym import numpy as np ''' In froze2_policyiteration the result on convergence is not +-----+-----+-----+-----+ | 0 | -14 | -20 | -22 | +-----+-----+-----+-----+ | -14 | -18 | -20 | -20 | +-----+-----+-----+-----+ | -20 | -20 | -18 | -14 | +-----+-----+-----+-----+ | -22 | -20 | -14 | 0 | +-----...
import gym import numpy as np ''' In froze2_policyiteration the result on convergence is not +-----+-----+-----+-----+ | 0 | -14 | -20 | -22 | +-----+-----+-----+-----+ | -14 | -18 | -20 | -20 | +-----+-----+-----+-----+ | -20 | -20 | -18 | -14 | +-----+-----+-----+-----+ | -22 | -20 | -14 | 0 | +-----+-----+-----...
en
0.836106
In froze2_policyiteration the result on convergence is not +-----+-----+-----+-----+ | 0 | -14 | -20 | -22 | +-----+-----+-----+-----+ | -14 | -18 | -20 | -20 | +-----+-----+-----+-----+ | -20 | -20 | -18 | -14 | +-----+-----+-----+-----+ | -22 | -20 | -14 | 0 | +-----+-----+-----+-----+ as in <NAME> and <NAME> bi...
2.940612
3
src/configlookup/utils.py
tgedr/configlookup
0
6630830
<filename>src/configlookup/utils.py import logging import os from pathlib import Path from typing import Any, Dict, List, Optional, Tuple log = logging.getLogger(__name__) class ConfigurationUtils: @staticmethod def merge_dict( source: Dict[str, Any], target: Dict[str, Any], target_pr...
<filename>src/configlookup/utils.py import logging import os from pathlib import Path from typing import Any, Dict, List, Optional, Tuple log = logging.getLogger(__name__) class ConfigurationUtils: @staticmethod def merge_dict( source: Dict[str, Any], target: Dict[str, Any], target_pr...
en
0.674183
merges dictionary values recurrently Parameters ---------- source : Dict[str, Any] the source dictionary to merge target : Dict[str, Any] the destination dictionary target_property: Optional[str] target dict equivalent property if not in the r...
2.585934
3
moai/monads/distribution/prior/spatial_softmax.py
tzole1155/moai
10
6630831
<filename>moai/monads/distribution/prior/spatial_softmax.py from moai.monads.utils import flatten_spatial_dims import torch __all__ = ["SpatialSoftmax"] #NOTE: see "FlowCap: 2D Human Pose from Optical Flow" for sharpening #NOTE: see https://timvieira.github.io/blog/post/2014/02/11/exp-normalize-trick/ class Spatial...
<filename>moai/monads/distribution/prior/spatial_softmax.py from moai.monads.utils import flatten_spatial_dims import torch __all__ = ["SpatialSoftmax"] #NOTE: see "FlowCap: 2D Human Pose from Optical Flow" for sharpening #NOTE: see https://timvieira.github.io/blog/post/2014/02/11/exp-normalize-trick/ class Spatial...
en
0.56343
#NOTE: see "FlowCap: 2D Human Pose from Optical Flow" for sharpening #NOTE: see https://timvieira.github.io/blog/post/2014/02/11/exp-normalize-trick/ # smoothen out the output by premultiplying input # sharpen output # normalize output #TODO: add inplace version / flag
2.222785
2
grid/single.py
hposborn/isoclassify
0
6630832
#%matplotlib inline import numpy as np import matplotlib.pyplot as plt from .classify_grid import * import os, ebf from astropy.io import ascii import time #import mwdust if __name__ == '__main__': homedir=os.path.expanduser('~/') model=ebf.read(homedir+'science/models/MIST/mesa.ebf') model['rho']=np.log...
#%matplotlib inline import numpy as np import matplotlib.pyplot as plt from .classify_grid import * import os, ebf from astropy.io import ascii import time #import mwdust if __name__ == '__main__': homedir=os.path.expanduser('~/') model=ebf.read(homedir+'science/models/MIST/mesa.ebf') model['rho']=np.log...
en
0.273158
#%matplotlib inline #import mwdust # do this to turn off scaling relation corrections #x.addcoords(338.3683920,-9.0227690) #dustmodel = mwdust.Combined15() #x.addplx(2.71/1e3,0.08/1e3)
1.930307
2
modulo 1/d018/angulo.py
rafa-evangelista/PYTHON
0
6630833
<reponame>rafa-evangelista/PYTHON import math ang=float(input('Digite um ângulo: ')) seno=(math.sin(ang)) cosseno=(math.cos(ang)) tangente=(math.tan(ang)) print(' O seno é {}, o cosseno é {} e a tangente é {}'.format (seno, cosseno, tangente))
import math ang=float(input('Digite um ângulo: ')) seno=(math.sin(ang)) cosseno=(math.cos(ang)) tangente=(math.tan(ang)) print(' O seno é {}, o cosseno é {} e a tangente é {}'.format (seno, cosseno, tangente))
none
1
3.705699
4
mwa_trigger/VCS_test.py
MWATelescope/mwa_trigger
3
6630834
<reponame>MWATelescope/mwa_trigger #! python """ Library containing one or more functions to process incoming VOEvent XML strings. This library will be imported by a long running process, so you can load large data files, etc, at import time, rather than inside the processevent() function, to save time. This library ...
#! python """ Library containing one or more functions to process incoming VOEvent XML strings. This library will be imported by a long running process, so you can load large data files, etc, at import time, rather than inside the processevent() function, to save time. This library only handles SWIFT VOEvents, other ...
en
0.813603
#! python Library containing one or more functions to process incoming VOEvent XML strings. This library will be imported by a long running process, so you can load large data files, etc, at import time, rather than inside the processevent() function, to save time. This library only handles SWIFT VOEvents, other types...
2.38329
2
tests/pipelines/test_unflatten.py
bidhive/kingfisher-collect
0
6630835
import pytest from flattentool.input import BadXLSXZipFile from openpyxl import Workbook from openpyxl.writer.excel import save_virtual_workbook from kingfisher_scrapy.items import File from kingfisher_scrapy.pipelines import Unflatten from tests import spider_with_crawler def test_process_item_csv(): spider = s...
import pytest from flattentool.input import BadXLSXZipFile from openpyxl import Workbook from openpyxl.writer.excel import save_virtual_workbook from kingfisher_scrapy.items import File from kingfisher_scrapy.pipelines import Unflatten from tests import spider_with_crawler def test_process_item_csv(): spider = s...
none
1
2.270844
2
Pyrado/scripts/simulation/sim_policy_live_rand_env.py
jacarvalho/SimuRLacra
0
6630836
<filename>Pyrado/scripts/simulation/sim_policy_live_rand_env.py """ Simulate (with animation) a rollout in a live perturbed environment. """ import pyrado from pyrado.domain_randomization.domain_parameter import UniformDomainParam from pyrado.domain_randomization.utils import print_domain_params, get_default_randomizer...
<filename>Pyrado/scripts/simulation/sim_policy_live_rand_env.py """ Simulate (with animation) a rollout in a live perturbed environment. """ import pyrado from pyrado.domain_randomization.domain_parameter import UniformDomainParam from pyrado.domain_randomization.utils import print_domain_params, get_default_randomizer...
en
0.602717
Simulate (with animation) a rollout in a live perturbed environment. # Parse command line arguments # Get the experiment's directory to load from # Get the simulation environment # Override the time step size if specified # Add default domain randomization wrapper with action delay # Simulate # calls env.reset()
2.179733
2
blaseball_mike/models/statsheet.py
rgallo/blaseball-mike
14
6630837
<filename>blaseball_mike/models/statsheet.py from collections import OrderedDict from .base import Base from .. import database class PlayerStatsheet(Base): @classmethod def _get_fields(cls): id_ = "e80b9497-c604-456d-9bee-c860d4759b14" p = cls.load(id_).get(id_) return [cls._from_api...
<filename>blaseball_mike/models/statsheet.py from collections import OrderedDict from .base import Base from .. import database class PlayerStatsheet(Base): @classmethod def _get_fields(cls): id_ = "e80b9497-c604-456d-9bee-c860d4759b14" p = cls.load(id_).get(id_) return [cls._from_api...
en
0.990269
Season is 1 indexed.
2.49964
2
poky/meta/lib/oeqa/controllers/masterimage.py
buildlinux/unityos
0
6630838
# Copyright (C) 2014 Intel Corporation # # Released under the MIT license (see COPYING.MIT) # This module adds support to testimage.bbclass to deploy images and run # tests using a "master image" - this is a "known good" image that is # installed onto the device as part of initial setup and will be booted into # with ...
# Copyright (C) 2014 Intel Corporation # # Released under the MIT license (see COPYING.MIT) # This module adds support to testimage.bbclass to deploy images and run # tests using a "master image" - this is a "known good" image that is # installed onto the device as part of initial setup and will be booted into # with ...
en
0.865165
# Copyright (C) 2014 Intel Corporation # # Released under the MIT license (see COPYING.MIT) # This module adds support to testimage.bbclass to deploy images and run # tests using a "master image" - this is a "known good" image that is # installed onto the device as part of initial setup and will be booted into # with n...
2.062491
2
appionlib/apCtf/genctf.py
vossman/ctfeval
6
6630839
<gh_stars>1-10 #!/usr/bin/env python import time import math import numpy from appionlib import apDisplay from appionlib.apCtf import ctftools debug = False #=================== def generateCTF1d(radii=None, focus=1.0e-6, cs=2e-3, volts=120000, ampconst=0.07, failParams=False, overfocus=False): """ calculates a...
#!/usr/bin/env python import time import math import numpy from appionlib import apDisplay from appionlib.apCtf import ctftools debug = False #=================== def generateCTF1d(radii=None, focus=1.0e-6, cs=2e-3, volts=120000, ampconst=0.07, failParams=False, overfocus=False): """ calculates a CTF function b...
en
0.690402
#!/usr/bin/env python #=================== calculates a CTF function based on the input details Use SI units: meters, radians, volts Underfocus is postive (defocused) #=================== given Cs and kV, determine the initial resolution where the difference between overfocus and underfocus is clearly visible. va...
2.560795
3
app/helpers/json_encoder_helper.py
DataViva/dataviva-api
14
6630840
from decimal import Decimal from flask.json import JSONEncoder class ApiJSONEncoder(JSONEncoder): def default(self, obj): try: if isinstance(obj, Decimal): return str(obj) iterable = iter(obj) except TypeError: pass else: ret...
from decimal import Decimal from flask.json import JSONEncoder class ApiJSONEncoder(JSONEncoder): def default(self, obj): try: if isinstance(obj, Decimal): return str(obj) iterable = iter(obj) except TypeError: pass else: ret...
none
1
2.793395
3
amnesia/helpers/content.py
silenius/amnesia
4
6630841
# -*- coding: utf-8 -*- from sqlalchemy import orm from saexts import Serializer from amnesia.modules.content import Content def dump_obj(obj, format, **kwargs): return getattr(Serializer(obj), format)(**kwargs) def polymorphic_hierarchy(cls=Content): return list(orm.class_mapper(cls).base_mapper.polymorp...
# -*- coding: utf-8 -*- from sqlalchemy import orm from saexts import Serializer from amnesia.modules.content import Content def dump_obj(obj, format, **kwargs): return getattr(Serializer(obj), format)(**kwargs) def polymorphic_hierarchy(cls=Content): return list(orm.class_mapper(cls).base_mapper.polymorp...
en
0.769321
# -*- coding: utf-8 -*-
2.170848
2
tests/database_manager_tests.py
SakuraOneLove/LPM
0
6630842
"""Test for 'database_manager' functions.""" import sqlite3 import unittest from itertools import islice from src import database_manager DB_NAME = "tests/testdb.sqlite3" VAULT_TABLE_SQL = "create table if not exists vault (\ account_id integer primary key,\ name text not null,\ login text not null,\ password text no...
"""Test for 'database_manager' functions.""" import sqlite3 import unittest from itertools import islice from src import database_manager DB_NAME = "tests/testdb.sqlite3" VAULT_TABLE_SQL = "create table if not exists vault (\ account_id integer primary key,\ name text not null,\ login text not null,\ password text no...
en
0.801283
Test for 'database_manager' functions. Testing 'database_manager' functions. Creating new database with tables. Drop tables after tests. It method should be called in the last method. Checking the existence of a database file. Checking the existence of a table in database. Tables 'vault' and 'shop' were...
3.274818
3
test/test_thread.py
m-takeuchi/ilislife_wxp
0
6630843
<reponame>m-takeuchi/ilislife_wxp #!/usr/bin/env python # -*- coding: utf-8 -*- import time import threading import wx # ボタンIDの定義 ID_START = wx.NewId() ID_STOP = wx.NewId() # イベントIDの定義 EVT_UPDATE_ID = wx.NewId() class UpdateEvent(wx.PyEvent): """更新イベント""" def __init__(self, data): """初期化""" ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import threading import wx # ボタンIDの定義 ID_START = wx.NewId() ID_STOP = wx.NewId() # イベントIDの定義 EVT_UPDATE_ID = wx.NewId() class UpdateEvent(wx.PyEvent): """更新イベント""" def __init__(self, data): """初期化""" wx.PyEvent.__init__(self) ...
ja
0.998079
#!/usr/bin/env python # -*- coding: utf-8 -*- # ボタンIDの定義 # イベントIDの定義 更新イベント 初期化 カウンタスレッド コンストラクタ # 実行開始 スレッド実行 キャンセル Class MainFrame. Create the MainFrame. # コールバックの設定 開始 キャンセル 更新
2.970708
3
2020/utctf_2020/Cryptography/Random_ECB/server.py
r4k0nb4k0n/CTF-Writeups
2
6630844
from Crypto.Cipher import AES from Crypto.Util.Padding import pad from Crypto.Random import get_random_bytes from Crypto.Random.random import getrandbits from secret import flag KEY = get_random_bytes(16) def aes_ecb_encrypt(plaintext, key): cipher = AES.new(key, AES.MODE_ECB) return cipher.encrypt(plaintext...
from Crypto.Cipher import AES from Crypto.Util.Padding import pad from Crypto.Random import get_random_bytes from Crypto.Random.random import getrandbits from secret import flag KEY = get_random_bytes(16) def aes_ecb_encrypt(plaintext, key): cipher = AES.new(key, AES.MODE_ECB) return cipher.encrypt(plaintext...
none
1
3.485563
3
main.py
thecivilizedgamer/ayu-discord-bot
1
6630845
from client import Client from data_store import Data from db import save_task from events import alarm_task, timer_task def main(): client = Client.get_client() client.loop.create_task(timer_task()) client.loop.create_task(alarm_task()) client.loop.create_task(save_task()) client.run(Data.config....
from client import Client from data_store import Data from db import save_task from events import alarm_task, timer_task def main(): client = Client.get_client() client.loop.create_task(timer_task()) client.loop.create_task(alarm_task()) client.loop.create_task(save_task()) client.run(Data.config....
none
1
2.174227
2
ostap/core/config.py
TatianaOvsiannikova/ostap
14
6630846
<gh_stars>10-100 #!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= ## @file ostap/core/config.py # The basic configuration of ostap. # Ostap parses the following configuration files : # - <code>'~/.ostaprc'</code> # - <code>'~/.config/ost...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= ## @file ostap/core/config.py # The basic configuration of ostap. # Ostap parses the following configuration files : # - <code>'~/.ostaprc'</code> # - <code>'~/.config/ostap/.ostaprc'</cod...
en
0.321798
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= ## @file ostap/core/config.py # The basic configuration of ostap. # Ostap parses the following configuration files : # - <code>'~/.ostaprc'</code> # - <code>'~/.config/ostap/.ostaprc'</cod...
2.015672
2
api/namex/resources/name_requests/constants.py
riyazuddinsyed/namex
0
6630847
<reponame>riyazuddinsyed/namex from namex.models import State # Only allow editing if the request is in certain valid states request_editable_states = [ State.DRAFT, State.RESERVED, State.COND_RESERVE ] contact_editable_states = [ State.DRAFT, State.APPROVED, State.REJECTED, State.CONDITIO...
from namex.models import State # Only allow editing if the request is in certain valid states request_editable_states = [ State.DRAFT, State.RESERVED, State.COND_RESERVE ] contact_editable_states = [ State.DRAFT, State.APPROVED, State.REJECTED, State.CONDITIONAL ]
en
0.731132
# Only allow editing if the request is in certain valid states
1.386423
1
blueoil/cmd/init.py
Joeper214/blueoil
0
6630848
<gh_stars>0 # -*- coding: utf-8 -*- # Copyright 2018 The Blueoil Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
# -*- coding: utf-8 -*- # Copyright 2018 The Blueoil Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
en
0.75389
# -*- coding: utf-8 -*- # Copyright 2018 The Blueoil Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
1.92606
2
keras/backend/common.py
lukovkin/keras-temp
16
6630849
import numpy as np from collections import defaultdict # the type of float to use throughout the session. _FLOATX = 'float32' _EPSILON = 10e-8 _UID_PREFIXES = defaultdict(int) _IMAGE_DIM_ORDERING = 'th' def epsilon(): '''Returns the value of the fuzz factor used in numeric expressions. ''' return _E...
import numpy as np from collections import defaultdict # the type of float to use throughout the session. _FLOATX = 'float32' _EPSILON = 10e-8 _UID_PREFIXES = defaultdict(int) _IMAGE_DIM_ORDERING = 'th' def epsilon(): '''Returns the value of the fuzz factor used in numeric expressions. ''' return _E...
en
0.62889
# the type of float to use throughout the session. Returns the value of the fuzz factor used in numeric expressions. Sets the value of the fuzz factor used in numeric expressions. Returns the default float type, as a string (e.g. 'float16', 'float32', 'float64'). Cast a Numpy array to floatx. Returns the im...
2.930434
3
src/sensing/temp_and_light/recv.py
sakthivigneshr/homeauto
0
6630850
<filename>src/sensing/temp_and_light/recv.py<gh_stars>0 import time import socket from datetime import datetime import paho.mqtt.client as mqtt host = '' port = 5002 def bind_socket(s): while 1: try: s.bind((host,port)) print 'Bind to port ' + repr(port) + ' success' break except: print 'Failed to op...
<filename>src/sensing/temp_and_light/recv.py<gh_stars>0 import time import socket from datetime import datetime import paho.mqtt.client as mqtt host = '' port = 5002 def bind_socket(s): while 1: try: s.bind((host,port)) print 'Bind to port ' + repr(port) + ' success' break except: print 'Failed to op...
en
0.39231
# # Start action #
2.919327
3