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
galaxy/api/views/search.py
ironfroggy/galaxy
0
6629851
# (c) 2012-2018, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # ...
# (c) 2012-2018, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # ...
en
0.843186
# (c) 2012-2018, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # ...
1.791056
2
PlotFun/logHist.py
MatthewPeterKelly/miscpy
1
6629852
<reponame>MatthewPeterKelly/miscpy<filename>PlotFun/logHist.py import matplotlib.pyplot as plt import numpy as np def logHist(X, N=30,fig=None, noclear=False, pdf=False, **kywds): ''' Plot logarithmic histogram or probability density function from sampled data. Args: X (numpy.ndarray): 1-D arr...
import matplotlib.pyplot as plt import numpy as np def logHist(X, N=30,fig=None, noclear=False, pdf=False, **kywds): ''' Plot logarithmic histogram or probability density function from sampled data. Args: X (numpy.ndarray): 1-D array of sampled values N (Optional[int]): Number of bins ...
en
0.535085
Plot logarithmic histogram or probability density function from sampled data. Args: X (numpy.ndarray): 1-D array of sampled values N (Optional[int]): Number of bins (default 30) fig (Optional[int]): Figure number (default None) noclear (Optioanl[bool]): Clear figure (default Fal...
3.425909
3
konst/json.py
albertoconnor/django-konst
10
6629853
# -*- coding: utf-8 -*- from __future__ import absolute_import import json from django.core.serializers.json import DjangoJSONEncoder from konst import Constant class ExtendedJSONEncoder(DjangoJSONEncoder): """Add support for serializing our class Constant.""" def default(self, obj): if isinstance...
# -*- coding: utf-8 -*- from __future__ import absolute_import import json from django.core.serializers.json import DjangoJSONEncoder from konst import Constant class ExtendedJSONEncoder(DjangoJSONEncoder): """Add support for serializing our class Constant.""" def default(self, obj): if isinstance...
en
0.776151
# -*- coding: utf-8 -*- Add support for serializing our class Constant.
2.313372
2
src/event_handler.py
andy-c-jones/verify-event-recorder-service
0
6629854
<gh_stars>0 import boto3 import logging import os from src.database import create_db_connection, write_to_database from src.decryption import decrypt_message from src.event_mapper import event_from_json from src.s3 import fetch_decryption_key from src.sqs import fetch_single_message, delete_message logging.basicConfi...
import boto3 import logging import os from src.database import create_db_connection, write_to_database from src.decryption import decrypt_message from src.event_mapper import event_from_json from src.s3 import fetch_decryption_key from src.sqs import fetch_single_message, delete_message logging.basicConfig(level=logg...
en
0.625768
# noinspection PyUnusedLocal # noinspection PyBroadException # catch all errors and log them - we never want a single failing message to kill the process.
1.978056
2
05 - Modules/04 - imports - import key - usage summary/mainfile.py
python-demo-codes/basics
2
6629855
<gh_stars>1-10 # HEAD # Modules - Understanding and using import key with directory module # DESCRIPTION # Describes usage of import statements and using a # directory module for import # import statement, variations of import # RESOURCES # # __name__ # |----- /mod ----- # | | # | ...
# HEAD # Modules - Understanding and using import key with directory module # DESCRIPTION # Describes usage of import statements and using a # directory module for import # import statement, variations of import # RESOURCES # # __name__ # |----- /mod ----- # | | # | |----- print...
en
0.741557
# HEAD # Modules - Understanding and using import key with directory module # DESCRIPTION # Describes usage of import statements and using a # directory module for import # import statement, variations of import # RESOURCES # # __name__ # |----- /mod ----- # | | # | |----- printfile....
3.432123
3
consumer_example.py
moonsense/python-sdk
6
6629856
""" Copyright 2021 Moonsense, 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 writing, softwar...
""" Copyright 2021 Moonsense, 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 writing, softwar...
en
0.843038
Copyright 2021 Moonsense, 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 writing, software di...
2.06596
2
clustering_system/clustering/igmm/CrpClustering.py
vanam/clustering
5
6629857
<filename>clustering_system/clustering/igmm/CrpClustering.py import math import numpy as np import scipy.misc from clustering_system.clustering.ClusteringABC import CovarianceType from clustering_system.clustering.GibbsClusteringABC import GibbsClusteringABC from clustering_system.clustering.mixture.GaussianMixtureAB...
<filename>clustering_system/clustering/igmm/CrpClustering.py import math import numpy as np import scipy.misc from clustering_system.clustering.ClusteringABC import CovarianceType from clustering_system.clustering.GibbsClusteringABC import GibbsClusteringABC from clustering_system.clustering.mixture.GaussianMixtureAB...
en
0.741033
Clustering based on the Chinese Restaurant Process :param K: Init number of clusters :param D: The length of a feature vector :param alpha: Hyperparameter of sitting alone :param prior: Prior :param n_iterations: The number of iterations to perform each update :param visualizer: ...
2.620925
3
test/test_cli.py
laundmo/tidypy
33
6629858
import subprocess import pytest from click.testing import CliRunner from six import text_type from tidypy.cli import main def test_default(): runner = CliRunner() result = runner.invoke(main, ['--version']) assert result.exit_code == 0 assert result.output != '' result = runner.invoke(main, ...
import subprocess import pytest from click.testing import CliRunner from six import text_type from tidypy.cli import main def test_default(): runner = CliRunner() result = runner.invoke(main, ['--version']) assert result.exit_code == 0 assert result.output != '' result = runner.invoke(main, ...
none
1
1.930803
2
Python/Facebook_Auto_Post/facebook_auto_post.py
ShubhamGupta577/Rotten-Scripts
4
6629859
<filename>Python/Facebook_Auto_Post/facebook_auto_post.py from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.ui import Select from selenium.webdriver.common.by import By from selenium.webdriver.support im...
<filename>Python/Facebook_Auto_Post/facebook_auto_post.py from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.ui import Select from selenium.webdriver.common.by import By from selenium.webdriver.support im...
en
0.737642
# Facebook Email # Facebook Password # Submit Button # Trying to Post the Content on Facebook.
3.014894
3
models/tests/test_node.py
MaferMazu/blockchain-network-simulator
0
6629860
"""Test Identity Class and Functions.""" from faker import Faker from cryptos import Bitcoin from models.identity import Identity, Identities from models.node import Node, Network faker = Faker() def test_node(): """Test creation of node.""" node = Node(1,9000) assert node.name == "nodo1" assert str(n...
"""Test Identity Class and Functions.""" from faker import Faker from cryptos import Bitcoin from models.identity import Identity, Identities from models.node import Node, Network faker = Faker() def test_node(): """Test creation of node.""" node = Node(1,9000) assert node.name == "nodo1" assert str(n...
en
0.853355
Test Identity Class and Functions. Test creation of node. Test creation of empty network. Test creation of network.
3.122393
3
tests/emulated_modules/sample_1.py
olasd/hiro
0
6629861
""" """ from . import sub_module_1
""" """ from . import sub_module_1
none
1
0.980241
1
fomo_social_harvester/twitter_pipe.py
dgnsrekt/fomo-social-harvester
0
6629862
# STANDARDLIB import csv from csv import DictWriter from datetime import date import logging from multiprocessing import Pool, cpu_count from pathlib import Path from time import sleep import json # THIRD-PARTY import luigi import luigi.contrib.postgres import pandas as pd import schedule import structlog from structl...
# STANDARDLIB import csv from csv import DictWriter from datetime import date import logging from multiprocessing import Pool, cpu_count from pathlib import Path from time import sleep import json # THIRD-PARTY import luigi import luigi.contrib.postgres import pandas as pd import schedule import structlog from structl...
en
0.30303
# STANDARDLIB # THIRD-PARTY # LOCAL-APP # IDEA: tuple # NOTE: SUPER DANGEROUS WILL SCRUB DATABASE # TODO: Twitter LINKS, RAW DATA. rename csv files # TODO: Add task to create a DB/Table or # IDEA: Add an except for no table - create table then check databsse for complete # DEBUG: REMOVE # TODO: Logging # TODO: Logging ...
2.411936
2
services/traction/api/endpoints/models/v1/admin.py
bcgov/traction
12
6629863
from enum import Enum from typing import Optional from uuid import UUID from datetime import datetime from pydantic import BaseModel class PublicDIDStateType(str, Enum): private = "private" requested = "requested" endorsed = "endorsed" published = "published" public = "public" class AdminTenan...
from enum import Enum from typing import Optional from uuid import UUID from datetime import datetime from pydantic import BaseModel class PublicDIDStateType(str, Enum): private = "private" requested = "requested" endorsed = "endorsed" published = "published" public = "public" class AdminTenan...
en
0.871921
AdminTenantIssueRead. ResponseModel for Traction Tenant details related to issuance Attributes: tenant_id: traction's tenant id wallet_id: the acapy wallet id public_did: uuid, the wallet's public did public_did_state: str, state of tenant's public did created_at: datetime, tenan...
2.67614
3
mergify_engine/queue/__init__.py
v1v/mergify-engine
0
6629864
# -*- encoding: utf-8 -*- # # 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, so...
# -*- encoding: utf-8 -*- # # 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, so...
en
0.822654
# -*- encoding: utf-8 -*- # # 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, so...
1.778286
2
tripleoclient/constants.py
mail2nsrajesh/python-tripleoclient
0
6629865
<reponame>mail2nsrajesh/python-tripleoclient # Copyright 2015 Red Hat, 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 # # ...
# Copyright 2015 Red Hat, 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 ...
en
0.86587
# Copyright 2015 Red Hat, 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 ...
1.054324
1
tensorflow/depth_estimator/utils.py
muchemwal/models
2
6629866
import os import io import cv2 import base64 import urllib import numpy as np from PIL import Image from imageio import imread def url_to_image(url): """ Download the image, convert it to a NumPy array, and then read it into OpenCV format. """ resp = urllib.request.urlopen(url) image = np.asarray(bytea...
import os import io import cv2 import base64 import urllib import numpy as np from PIL import Image from imageio import imread def url_to_image(url): """ Download the image, convert it to a NumPy array, and then read it into OpenCV format. """ resp = urllib.request.urlopen(url) image = np.asarray(bytea...
en
0.629829
Download the image, convert it to a NumPy array, and then read it into OpenCV format. Convert base64 imge to a NumPy array, and then read it into OpenCV format. Convert image from OpenCV format to base64 format.
3.462587
3
buildscripts/resmokelib/testing/executor.py
tychoish/mongo
3
6629867
<reponame>tychoish/mongo """ Driver of the test execution framework. """ from __future__ import absolute_import import threading from . import fixtures from . import hooks as _hooks from . import job as _job from . import report as _report from . import testcases from .. import config as _config from .. import error...
""" Driver of the test execution framework. """ from __future__ import absolute_import import threading from . import fixtures from . import hooks as _hooks from . import job as _job from . import report as _report from . import testcases from .. import config as _config from .. import errors from .. import logging ...
en
0.88754
Driver of the test execution framework. Executes a test group. Responsible for setting up and tearing down the fixtures that the tests execute against. # =1 day (a long time to have tests run) Initializes the TestGroupExecutor with the test group to run. # Build a logger for executing this group of tests. # Mu...
2.347607
2
o365_sharepoint_connector/tests/test_o365_sharepoint_connector.py
Bystroushaak/Office365SharepointConnector
0
6629868
<reponame>Bystroushaak/Office365SharepointConnector<filename>o365_sharepoint_connector/tests/test_o365_sharepoint_connector.py #! /usr/bin/env python3 import os.path import unittest from o365_sharepoint_connector import SharePointConnector from o365_sharepoint_connector import CantCreateNewListException class TestSh...
#! /usr/bin/env python3 import os.path import unittest from o365_sharepoint_connector import SharePointConnector from o365_sharepoint_connector import CantCreateNewListException class TestSharePointConnector(unittest.TestCase): TEST_DIR = os.path.dirname(os.path.abspath(__file__)) LOGIN_FILE = os.path.join(T...
fr
0.20845
#! /usr/bin/env python3
2.524588
3
unet/model/manager.py
SyPRX/u-net
1
6629869
<gh_stars>1-10 import tensorflow as tf from tensorflow.keras.layers import MaxPooling2D, \ Conv2D, Add, concatenate, Cropping2D, UpSampling2D, Activation, BatchNormalization, Input, Dropout from tensorflow.keras.optimizers import Adam from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint from tensorfl...
import tensorflow as tf from tensorflow.keras.layers import MaxPooling2D, \ Conv2D, Add, concatenate, Cropping2D, UpSampling2D, Activation, BatchNormalization, Input, Dropout from tensorflow.keras.optimizers import Adam from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint from tensorflow.keras.models...
en
0.596078
The Model manager provided methods and attributes to manage a tf.keras.models.Model Define the block as described in the original U-net paper :param input: input layer :param feature_map: number of feature map :param conv_nb: number of convolution :param bn: Boolean for batch normalisati...
2.828245
3
array/40.py
MingfeiPan/leetcode
0
6629870
<gh_stars>0 class Solution: def combinationSum2(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ ret = [] candidates.sort() self.backtrack(ret, [], candidates, target, 0) return ret ...
class Solution: def combinationSum2(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ ret = [] candidates.sort() self.backtrack(ret, [], candidates, target, 0) return ret def b...
en
0.224647
:type candidates: List[int] :type target: int :rtype: List[List[int]]
3.253594
3
genlabels.py
KevSed/OpenData_PhotonStream_Analysis
0
6629871
from features_from_phs import cluster_labels, is_simulation_file from fact.io import to_h5py import click from tqdm import tqdm from multiprocessing import Pool, cpu_count @click.command() @click.argument('output_file', type=click.Path(exists=False)) @click.argument('input_file', nargs=-1, required=True, type=click.P...
from features_from_phs import cluster_labels, is_simulation_file from fact.io import to_h5py import click from tqdm import tqdm from multiprocessing import Pool, cpu_count @click.command() @click.argument('output_file', type=click.Path(exists=False)) @click.argument('input_file', nargs=-1, required=True, type=click.P...
none
1
2.389841
2
src/openapi_dataclasses/types/openapi/tag.py
cal-pratt/openapi-dataclasses
0
6629872
<reponame>cal-pratt/openapi-dataclasses from dataclasses import dataclass, field from typing import Optional from ...meta import metadata from .extdoc import OpenApiExternalDocumentation @dataclass class OpenApiTag: """ Adds metadata to a single tag that is used by the Operation Object. It is not mandatory t...
from dataclasses import dataclass, field from typing import Optional from ...meta import metadata from .extdoc import OpenApiExternalDocumentation @dataclass class OpenApiTag: """ Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined ...
en
0.774122
Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. The name of the tag. A short description for the tag. CommonMark syntax MAY be used for rich text representation. Additional external documentation for this...
2.528309
3
scripts/Legacy/deprecated/loader.py
rhong3/Neutrophil
2
6629873
''' Separate samples into 5000 each. txt RH 0717 ''' import pandas as pd import numpy as np from PIL import Image dat = np.empty((0, int(299 ** 2 * 3)), dtype='uint8') tile_lab = [] totlist = pd.read_csv('../Neutrophil/79_Tiles_final/tot_sample.csv', header = 0) f = 1 for index, row in totlist.iterrows(): image =...
''' Separate samples into 5000 each. txt RH 0717 ''' import pandas as pd import numpy as np from PIL import Image dat = np.empty((0, int(299 ** 2 * 3)), dtype='uint8') tile_lab = [] totlist = pd.read_csv('../Neutrophil/79_Tiles_final/tot_sample.csv', header = 0) f = 1 for index, row in totlist.iterrows(): image =...
en
0.816549
Separate samples into 5000 each. txt RH 0717
2.48737
2
backend/server/app/models.py
jacksonmoji/workfinder_test
0
6629874
from django.db import models class Building(models.Model): ''' The Building object. Attributes: id: The id of the building, name: The string with building name, ''' id = models.PositiveSmallIntegerField(primary_key=True) name = models.CharField(max_length=128) def __str_...
from django.db import models class Building(models.Model): ''' The Building object. Attributes: id: The id of the building, name: The string with building name, ''' id = models.PositiveSmallIntegerField(primary_key=True) name = models.CharField(max_length=128) def __str_...
en
0.768638
The Building object. Attributes: id: The id of the building, name: The string with building name, The Meter represent the fuel, energy measuring unit. Attributes: id: The identification number of meter fuel: source of energy unit: energy measuring unit building_...
2.609274
3
sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/automl_job.py
dubiety/azure-sdk-for-python
1
6629875
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- import logging from abc import ABC from typing import Any, Dict, Union from azure.ai.ml.constants import AssetTypes, AutoMLConstants, TYPE...
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- import logging from abc import ABC from typing import Any, Dict, Union from azure.ai.ml.constants import AssetTypes, AutoMLConstants, TYPE...
en
0.661687
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- AutoML job entity. Initialize an AutoML job entity. :param task_details: The task configuration of the job. This can be Classificat...
1.924613
2
sme_financing/main/service/sme_service.py
BuildForSDG/team-214-backend
1
6629876
from datetime import datetime from sqlalchemy.exc import SQLAlchemyError from .. import db from ..models.sme import SME from .client_service import get_client_by_email # from .document_service import get_all_sme_documents def update(): db.session.commit() def commit_changes(data): db.session.add(data) ...
from datetime import datetime from sqlalchemy.exc import SQLAlchemyError from .. import db from ..models.sme import SME from .client_service import get_client_by_email # from .document_service import get_all_sme_documents def update(): db.session.commit() def commit_changes(data): db.session.add(data) ...
en
0.370609
# from .document_service import get_all_sme_documents # sme.delete()
2.647714
3
library/pyjamas/ui/CellPanel.py
certik/pyjamas
1
6629877
<gh_stars>1-10 # Copyright 2006 <NAME> and contributors # Copyright (C) 2009 <NAME> <<EMAIL>> # # 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....
# Copyright 2006 <NAME> and contributors # Copyright (C) 2009 <NAME> <<EMAIL>> # # 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 re...
en
0.831264
# Copyright 2006 <NAME> and contributors # Copyright (C) 2009 <NAME> <<EMAIL>> # # 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 re...
2.348116
2
vim/plugins/vim-orgmode/tests/test_plugin_mappings.py
Raymond-yn/dotfiles
11
6629878
<gh_stars>10-100 # -*- coding: utf-8 -*- from __future__ import print_function import sys sys.path.append(u'../ftplugin') import unittest import orgmode.settings from orgmode.exceptions import PluginError from orgmode._vim import ORGMODE from orgmode.keybinding import MODE_ALL, Plug import vim from orgmode.py3comp...
# -*- coding: utf-8 -*- from __future__ import print_function import sys sys.path.append(u'../ftplugin') import unittest import orgmode.settings from orgmode.exceptions import PluginError from orgmode._vim import ORGMODE from orgmode.keybinding import MODE_ALL, Plug import vim from orgmode.py3compat.encode_compati...
en
0.836969
# -*- coding: utf-8 -*- Tests all plugins for overlapping mappings. #set()")': 0, # vi: noexpandtab
2.143433
2
1009.py
gabrielsilvadev/URI-python-3
5
6629879
<filename>1009.py a = (input()) b = float(input()) c = float(input()) T = float(b + c*0.15) print('TOTAL = R$ {:.2f}'.format(T))
<filename>1009.py a = (input()) b = float(input()) c = float(input()) T = float(b + c*0.15) print('TOTAL = R$ {:.2f}'.format(T))
none
1
2.800629
3
contractor/tasks.py
krmax44/django-contractor
0
6629880
from django.core.files.base import ContentFile from django.core.files.storage import default_storage from django.db.models import F from django.utils import timezone from celery import shared_task import requests from .models import Contract @shared_task(name='fetch_contract_result') def fetch_contract_result(contr...
from django.core.files.base import ContentFile from django.core.files.storage import default_storage from django.db.models import F from django.utils import timezone from celery import shared_task import requests from .models import Contract @shared_task(name='fetch_contract_result') def fetch_contract_result(contr...
en
0.924917
# FIXME: returned path is not stored, assumed to be the same
2.191984
2
src/tools/nuscenes-devkit/tests/test_nuscenes.py
jie311/TraDeS
1,284
6629881
<reponame>jie311/TraDeS # nuScenes dev-kit. # Code written by <NAME>, 2019. import os import unittest from nuscenes import NuScenes class TestNuScenes(unittest.TestCase): def test_load(self): """ Loads up NuScenes. This is intended to simply run the NuScenes class to check for import er...
# nuScenes dev-kit. # Code written by <NAME>, 2019. import os import unittest from nuscenes import NuScenes class TestNuScenes(unittest.TestCase): def test_load(self): """ Loads up NuScenes. This is intended to simply run the NuScenes class to check for import errors, typos, etc. ...
en
0.746783
# nuScenes dev-kit. # Code written by <NAME>, 2019. Loads up NuScenes. This is intended to simply run the NuScenes class to check for import errors, typos, etc. # Trivial assert statement
2.709771
3
slingen/src/algogen/BackEnd/trsm2lgen.py
danielesgit/slingen
23
6629882
<filename>slingen/src/algogen/BackEnd/trsm2lgen.py from core.expression import Equal, Times, Minus, Inverse, Transpose, NList, Predicate, PatternDot import core.properties as props from core.functional import RewriteRule, Constraint, Replacement import Config import PredicateMetadata as pm pm.DB["ldiv_lni"] = pm.Pred...
<filename>slingen/src/algogen/BackEnd/trsm2lgen.py from core.expression import Equal, Times, Minus, Inverse, Transpose, NList, Predicate, PatternDot import core.properties as props from core.functional import RewriteRule, Constraint, Replacement import Config import PredicateMetadata as pm pm.DB["ldiv_lni"] = pm.Pred...
en
0.318693
# X = i(t(A)) B -> ldiv_lni # X = i(t(A)) B -> ldiv_lni_ow # X = i(t(A)) B -> ldiv_lnu # X = i(t(A)) B -> ldiv_lnu_ow # X = i(t(A)) B -> ldiv_lnn # X = i(t(A)) B -> ldiv_lnn_ow # X = i(t(A)) B -> ldiv_lti # X = i(t(A)) B -> ldiv_lti_ow # X = i(t(A)) B -> ldiv_ltu # X = i(t(A)) B -> ldiv_ltu_ow # X = i(t(A)) B -> ldiv_l...
1.906787
2
pdf4me/Pdf4mePythonClientApi/pdf4me/model/job_config.py
pdf4me/pdf4me-clientapi-python
1
6629883
<filename>pdf4me/Pdf4mePythonClientApi/pdf4me/model/job_config.py # coding: utf-8 """ Pdf4me No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.g...
<filename>pdf4me/Pdf4mePythonClientApi/pdf4me/model/job_config.py # coding: utf-8 """ Pdf4me No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.g...
en
0.436588
# coding: utf-8 Pdf4me No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.git # noqa: F401 NOTE: This class is auto generated by the swagger code gene...
1.300243
1
plugins/modules/truenas_api_group.py
nkiraly/ansible-collection-spatiumcepa-truenas
1
6629884
<reponame>nkiraly/ansible-collection-spatiumcepa-truenas<gh_stars>1-10 from __future__ import absolute_import, division, print_function from ansible_collections.spatiumcepa.truenas.plugins.module_utils.common import HTTPCode, HTTPResponse, \ TruenasServerError, TruenasModelError, TruenasUnexpectedResponse, strip_nu...
from __future__ import absolute_import, division, print_function from ansible_collections.spatiumcepa.truenas.plugins.module_utils.common import HTTPCode, HTTPResponse, \ TruenasServerError, TruenasModelError, TruenasUnexpectedResponse, strip_null_module_params from ansible_collections.spatiumcepa.truenas.plugins.m...
en
0.574865
module: truenas_api_group short_description: Manage TrueNAS Groups description: - Manage TrueNAS Groups via REST API version_added: "0.1" author: <NAME> (@nkiraly) options: state: type: str description: Desired state of the group default: present choices: [ absent, present ] model: type: ...
1.809191
2
sdk/python/pulumi_aws/dms/event_subscription.py
Otanikotani/pulumi-aws
0
6629885
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilitie...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilitie...
en
0.59814
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** Provides a DMS (Data Migration Service) event subscription resource. ## Example Usage ```python import pulumi ...
1.594429
2
Algorithm/main.py
Falcon9XTech/Aircraft-intent-prediction-ADS-B-data-streams
0
6629886
<reponame>Falcon9XTech/Aircraft-intent-prediction-ADS-B-data-streams<filename>Algorithm/main.py #!/usr/bin/env python """ Name: Main program for AID system Author: <NAME> Copyright: University of Liverpool © 2021 License: MIT Version: 1.0 Status: Development Description: The source code calls all functions and metho...
#!/usr/bin/env python """ Name: Main program for AID system Author: <NAME> Copyright: University of Liverpool © 2021 License: MIT Version: 1.0 Status: Development Description: The source code calls all functions and methods derived from other python files to run as one. """ from fetch_data import * from filter impo...
en
0.758675
#!/usr/bin/env python Name: Main program for AID system Author: <NAME> Copyright: University of Liverpool © 2021 License: MIT Version: 1.0 Status: Development Description: The source code calls all functions and methods derived from other python files to run as one. # Project Logo # Load credentials to log in OpenSky...
2.061873
2
Crypto Viewer.py
HenriqueSoriano/Crypto-Viewer
2
6629887
<filename>Crypto Viewer.py from tkinter import * from tkinter import Tk # LOGIN CHECK def entrar(): email = txtboxemail_log.get() senha = txtboxpass_log.get() if (email=="" or senha==""): erro_blank = Label(LoginFrame, text="Preencha os campos obrigatórios.", background='#111111', f...
<filename>Crypto Viewer.py from tkinter import * from tkinter import Tk # LOGIN CHECK def entrar(): email = txtboxemail_log.get() senha = txtboxpass_log.get() if (email=="" or senha==""): erro_blank = Label(LoginFrame, text="Preencha os campos obrigatórios.", background='#111111', f...
en
0.485631
# LOGIN CHECK # MAIN FRAME # HEADER # SELECT CRYPTO # HEADER # INFO SOL # RUN WS # RUN SOL # HEADER # INFO BTC # RUN WS # RUN BTC # HEADER # INFO ETH # RUN WS # RUN ETH # RUN MAIN # DEF EXIT # INFO PAGE # INFO FRAME # HEADER # INFO # MAIN INITIAL FRAME # HEADER # LOGIN # RUN ROOT
3.154282
3
tools/c_mode.py
Melab/gvmt
0
6629888
import common _exception = common.UnlocatedException import sys import itertools, re import builtin, gtypes, operators from stacks import Stack, CachingStack def default_name(index): return "gvmt_t%s" % index _uid = 0 _return_type_codes = { gtypes.i1 : 'RETURN_TYPE_I4', gtypes.i2 : 'RETURN_TYPE_I...
import common _exception = common.UnlocatedException import sys import itertools, re import builtin, gtypes, operators from stacks import Stack, CachingStack def default_name(index): return "gvmt_t%s" % index _uid = 0 _return_type_codes = { gtypes.i1 : 'RETURN_TYPE_I4', gtypes.i2 : 'RETURN_TYPE_I...
en
0.523795
#Is offset a build-time constant? #If debug is on, insert extra checking code. #Turn off return type checking, need to implement in CC as well. #fmt = ' if(gvmt_last_return_type && gvmt_last_return_type != %s)' #self.out << fmt % _return_type_codes[tipe] #fmt = (' __gvmt_fatal("%%s:%%d:Incorrect return type, ' # ...
1.996856
2
slides/code/interlude_03_1.py
letstrythat/scientificpython
0
6629889
"""Specifications and unit tests for the exercice. >>> e = Container() >>> for v in [1, 2, 'a', 3.14]: ... e.extend(v) >>> e.add(3.14) >>> e.add(2) >>> e.add(2) >>> e Container({2, 3.14}) >>> e.add(5) Traceback (most recent call last): ... ValueError: Value '5' is not allowed. >>> e.extend(5) >>> e.add(5) >...
"""Specifications and unit tests for the exercice. >>> e = Container() >>> for v in [1, 2, 'a', 3.14]: ... e.extend(v) >>> e.add(3.14) >>> e.add(2) >>> e.add(2) >>> e Container({2, 3.14}) >>> e.add(5) Traceback (most recent call last): ... ValueError: Value '5' is not allowed. >>> e.extend(5) >>> e.add(5) >...
en
0.459223
Specifications and unit tests for the exercice. >>> e = Container() >>> for v in [1, 2, 'a', 3.14]: ... e.extend(v) >>> e.add(3.14) >>> e.add(2) >>> e.add(2) >>> e Container({2, 3.14}) >>> e.add(5) Traceback (most recent call last): ... ValueError: Value '5' is not allowed. >>> e.extend(5) >>> e.add(5) >>> ...
3.580853
4
search_engine_parser/core/engines/duckduckgo.py
Iamdavidonuh/search-engine-parser
0
6629890
"""@desc Parser for DuckDuckGo search results """ import re from search_engine_parser.core.base import BaseSearch from search_engine_parser.core.exceptions import NoResultsOrTrafficError class DuckDuckGoSearch(BaseSearch): """ Searches DuckDuckGo for string """ name = "DuckDuckGo" search_url = "...
"""@desc Parser for DuckDuckGo search results """ import re from search_engine_parser.core.base import BaseSearch from search_engine_parser.core.exceptions import NoResultsOrTrafficError class DuckDuckGoSearch(BaseSearch): """ Searches DuckDuckGo for string """ name = "DuckDuckGo" search_url = "...
en
0.518514
@desc Parser for DuckDuckGo search results Searches DuckDuckGo for string Parses DuckDuckGo Search Soup for a query results # find all div tags Parses the source code to return :param single_result: single result found in <div id="r1-{id}"> :type single_result: `bs4.element.ResultSet` :retur...
3.079227
3
openmdao/utils/options_dictionary.py
toddrme2178/OpenMDAO
0
6629891
<reponame>toddrme2178/OpenMDAO """Define the OptionsDictionary class.""" from __future__ import division, print_function from six import iteritems, string_types from openmdao.utils.general_utils import warn_deprecation # unique object to check if default is given _undefined = object() class OptionsDictionary(objec...
"""Define the OptionsDictionary class.""" from __future__ import division, print_function from six import iteritems, string_types from openmdao.utils.general_utils import warn_deprecation # unique object to check if default is given _undefined = object() class OptionsDictionary(object): """ Dictionary with...
en
0.622727
Define the OptionsDictionary class. # unique object to check if default is given Dictionary with pre-declaration of keys for value-checking and default values. This class is instantiated for: 1. the options attribute in solvers, drivers, and processor allocators 2. the supports attribute in drivers...
2.863156
3
pkgs/conda-4.0.5-py27_0/lib/python2.7/site-packages/conda/cli/main_remove.py
wangyum/anaconda
0
6629892
<reponame>wangyum/anaconda # (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io # All Rights Reserved # # conda is distributed under the terms of the BSD 3-clause license. # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause. from __future__ import print_function, division, absolute_import ...
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io # All Rights Reserved # # conda is distributed under the terms of the BSD 3-clause license. # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause. from __future__ import print_function, division, absolute_import from os.path import join, e...
en
0.797832
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io # All Rights Reserved # # conda is distributed under the terms of the BSD 3-clause license. # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause. This command will also remove any package that depends on any of the specified packages as wel...
1.983698
2
regret_wrt_alpha.py
yinglunz/on-regret-with-multiple-best-arms
0
6629893
<reponame>yinglunz/on-regret-with-multiple-best-arms import numpy as np import time import multiprocessing import copy from functools import partial from datetime import date import matplotlib import matplotlib.pyplot as plt matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 from regret_c...
import numpy as np import time import multiprocessing import copy from functools import partial from datetime import date import matplotlib import matplotlib.pyplot as plt matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 from regret_class import MOSS, Quantile, MOSSPLUS, Parallel from r...
en
0.87929
# vanilla version of MOSS++ # the order of the following sequences matters!! # orders need to match the previous one! # note here measures[0] # we devide the std by k in the plot, k=4 means the shaded area represent 0.5 std # we only create 6 different line style as following. requires len(algs)=6
2.204331
2
demos/demo_cpu_regularisers3D.py
ElsevierSoftwareX/SOFTX_2018_161
1
6629894
<filename>demos/demo_cpu_regularisers3D.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 22 11:39:43 2018 Demonstration of 3D CPU regularisers @authors: <NAME>, <NAME> """ import matplotlib.pyplot as plt import numpy as np import os import timeit from ccpi.filters.regularisers import ROF_TV,...
<filename>demos/demo_cpu_regularisers3D.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 22 11:39:43 2018 Demonstration of 3D CPU regularisers @authors: <NAME>, <NAME> """ import matplotlib.pyplot as plt import numpy as np import os import timeit from ccpi.filters.regularisers import ROF_TV,...
en
0.299605
#!/usr/bin/env python3 # -*- coding: utf-8 -*- Created on Thu Feb 22 11:39:43 2018 Demonstration of 3D CPU regularisers @authors: <NAME>, <NAME> ############################################################################### ############################################################################### # filename =...
2.238075
2
uncertainties/test_uncertainties.py
juliotux/uncertainties
0
6629895
<reponame>juliotux/uncertainties<gh_stars>0 # coding=utf-8 """ Tests of the code in uncertainties/__init__.py. These tests can be run through the Nose testing framework. (c) 2010-2016 by <NAME> (EOL). """ from __future__ import division from __future__ import print_function # Standard modules from builtins import...
# coding=utf-8 """ Tests of the code in uncertainties/__init__.py. These tests can be run through the Nose testing framework. (c) 2010-2016 by <NAME> (EOL). """ from __future__ import division from __future__ import print_function # Standard modules from builtins import str from builtins import zip from builtins ...
en
0.786069
# coding=utf-8 Tests of the code in uncertainties/__init__.py. These tests can be run through the Nose testing framework. (c) 2010-2016 by <NAME> (EOL). # Standard modules # 3rd-party modules # import nose.tools # Local modules # The following information is useful for making sure that the right # version of Python i...
2.774126
3
52digest.py
shaheen-k/homework
0
6629896
#!/usr/bin/env python3 # 52digest.py import re import sys # Write a program that performs an EcoRI digest on the SARS-COV2 genome # The program should have 2 arguments # 1. The genome file # 2. The restriction pattern # The output should be the sizes of the restriction fragments #File Import seq = "" found_ori...
#!/usr/bin/env python3 # 52digest.py import re import sys # Write a program that performs an EcoRI digest on the SARS-COV2 genome # The program should have 2 arguments # 1. The genome file # 2. The restriction pattern # The output should be the sizes of the restriction fragments #File Import seq = "" found_ori...
en
0.473859
#!/usr/bin/env python3 # 52digest.py # Write a program that performs an EcoRI digest on the SARS-COV2 genome # The program should have 2 arguments # 1. The genome file # 2. The restriction pattern # The output should be the sizes of the restriction fragments #File Import #convert to words #join w/ no characters b...
3.466179
3
core/src/zeit/workflow/browser/metadata.py
rickdg/vivi
5
6629897
<filename>core/src/zeit/workflow/browser/metadata.py import zope.cachedescriptors.property import zope.component import zope.viewlet.viewlet import zeit.workflow.interfaces class WorkflowPreview(zope.viewlet.viewlet.ViewletBase): fields = zope.formlib.form.FormFields( zeit.workflow.interfaces.IContentWo...
<filename>core/src/zeit/workflow/browser/metadata.py import zope.cachedescriptors.property import zope.component import zope.viewlet.viewlet import zeit.workflow.interfaces class WorkflowPreview(zope.viewlet.viewlet.ViewletBase): fields = zope.formlib.form.FormFields( zeit.workflow.interfaces.IContentWo...
none
1
1.719259
2
orb_simulator/tools.py
dmguezjaviersnet/IA-Sim-Comp-Project
1
6629898
EPSILON = '' import pickle from os import path, mkdir from typing import Any, Tuple from PIL import Image import math # COLORS SELECT_BLUE_COLOR = (44, 176, 218) WHITE_COLOR = (255, 255, 255) GREEN_COLOR = (0, 255, 0) BLACK_COLOR = (0, 0, 0) RED_COLOR= (255, 0, 0) SOLID_BLUE_COLOR = (0, 0, 255) PLUM_COLOR = (221,160,2...
EPSILON = '' import pickle from os import path, mkdir from typing import Any, Tuple from PIL import Image import math # COLORS SELECT_BLUE_COLOR = (44, 176, 218) WHITE_COLOR = (255, 255, 255) GREEN_COLOR = (0, 255, 0) BLACK_COLOR = (0, 0, 0) RED_COLOR= (255, 0, 0) SOLID_BLUE_COLOR = (0, 0, 255) PLUM_COLOR = (221,160,2...
en
0.433914
# COLORS #rotate image
2.747617
3
users/views.py
DavidBarcenas/django-photosgram
0
6629899
<filename>users/views.py from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import redirect, render from django.views.generic import DetailView, FormView from django.urls im...
<filename>users/views.py from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import redirect, render from django.views.generic import DetailView, FormView from django.urls im...
en
0.842549
Add user's posts to context # Create your views here. Users signup view Save form data Update user profile Return user's profile Return to user's profile
2.357182
2
openstack_dashboard/contrib/trove/content/database_clusters/cluster_manager.py
Tesora-Release/tesora-horizon
0
6629900
<reponame>Tesora-Release/tesora-horizon # Copyright 2015 Tesora 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 # # Unl...
# Copyright 2015 Tesora 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...
en
0.845182
# Copyright 2015 Tesora 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...
1.782043
2
output/models/nist_data/atomic/decimal/schema_instance/nistschema_sv_iv_atomic_decimal_max_exclusive_2_xsd/__init__.py
tefra/xsdata-w3c-tests
1
6629901
from output.models.nist_data.atomic.decimal.schema_instance.nistschema_sv_iv_atomic_decimal_max_exclusive_2_xsd.nistschema_sv_iv_atomic_decimal_max_exclusive_2 import NistschemaSvIvAtomicDecimalMaxExclusive2 __all__ = [ "NistschemaSvIvAtomicDecimalMaxExclusive2", ]
from output.models.nist_data.atomic.decimal.schema_instance.nistschema_sv_iv_atomic_decimal_max_exclusive_2_xsd.nistschema_sv_iv_atomic_decimal_max_exclusive_2 import NistschemaSvIvAtomicDecimalMaxExclusive2 __all__ = [ "NistschemaSvIvAtomicDecimalMaxExclusive2", ]
none
1
1.06494
1
pycopula/main.py
merz9b/pycopula
71
6629902
<reponame>merz9b/pycopula<gh_stars>10-100 import sys sys.path.insert(0, '..') from pycopula.copula import * import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import pandas as pd from matplotlib import cm from pycopula.visualization import pdf_2d, cdf_2d, concentrationFunction...
import sys sys.path.insert(0, '..') from pycopula.copula import * import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import pandas as pd from matplotlib import cm from pycopula.visualization import pdf_2d, cdf_2d, concentrationFunction from pycopula.simulation import simulate ...
en
0.163439
#plt.figure() #plt.scatter(data[:,0], data[:,1], marker="x") #plt.show() #print(data.shape[1]) #print(data) #gaussian.fit(data) #print(params) #opti, params = clayton.fit(data, method='ifm', marginals=[ scipy.stats.gamma, scipy.stats.expon ], hyper_param=[ { 'a': None, 'scale': 1.2 }, { 'scale': None } ], hyper_param_b...
2.627425
3
locomotion_analysis/src/levy.py
sciple/neurobau
2
6629903
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Dec 14 10:45:00 2017 @author: lex Levy distribution """ import numpy as np from Path import Path from load_excel_data import read_xls_data def compute_distances(list_of_coordinates): # stores curvatures for every sheet in xls file list...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Dec 14 10:45:00 2017 @author: lex Levy distribution """ import numpy as np from Path import Path from load_excel_data import read_xls_data def compute_distances(list_of_coordinates): # stores curvatures for every sheet in xls file list...
en
0.606437
#!/usr/bin/env python3 # -*- coding: utf-8 -*- Created on Thu Dec 14 10:45:00 2017 @author: lex Levy distribution # stores curvatures for every sheet in xls file # read in coordinates and convert to path object #p = Path(xls_data[0]) From the Harris Nature paper. # uniform distribution, in range [-0.5pi, 0.5pi] # y h...
2.984054
3
command_line/merge.py
ndevenish/dials-fork
0
6629904
<filename>command_line/merge.py # coding: utf-8 """ Command line script to allow merging and truncating of a dials dataset. """ from __future__ import absolute_import, division, print_function import logging import sys from six.moves import cStringIO as StringIO from libtbx import phil from dials.algorithms.merging...
<filename>command_line/merge.py # coding: utf-8 """ Command line script to allow merging and truncating of a dials dataset. """ from __future__ import absolute_import, division, print_function import logging import sys from six.moves import cStringIO as StringIO from libtbx import phil from dials.algorithms.merging...
en
0.776621
# coding: utf-8 Command line script to allow merging and truncating of a dials dataset. Merge scaled dials data. Examples:: dials.merge scaled.expt scaled.refl dials.merge scaled.expt scaled.refl truncate=False assess_space_group = True .type = bool .help = "Option to assess space group by testing presen...
2.294281
2
server/apis/sale.py
AAULAN/kiosk
0
6629905
<filename>server/apis/sale.py from flask import request from flask_restplus import Namespace, Resource, fields from core.database import get_db_products, update_db_product, get_db_sales, add_db_sales, delete_db_sales from datetime import datetime api = Namespace('sales', description='Sale related operations') sale_in...
<filename>server/apis/sale.py from flask import request from flask_restplus import Namespace, Resource, fields from core.database import get_db_products, update_db_product, get_db_sales, add_db_sales, delete_db_sales from datetime import datetime api = Namespace('sales', description='Sale related operations') sale_in...
none
1
2.603843
3
docs/gallery/plot_hs.py
wavespectra/wavespectra
19
6629906
""" Calculate and plot Hs ===================== Plots Hs calculated from spectra dataset """ import matplotlib.pyplot as plt from wavespectra import read_ww3 dset = read_ww3("../_static/ww3file.nc") fig = plt.figure(figsize=(8, 4)) hs = dset.spec.hs() p = hs.plot.line(x="time")
""" Calculate and plot Hs ===================== Plots Hs calculated from spectra dataset """ import matplotlib.pyplot as plt from wavespectra import read_ww3 dset = read_ww3("../_static/ww3file.nc") fig = plt.figure(figsize=(8, 4)) hs = dset.spec.hs() p = hs.plot.line(x="time")
en
0.829223
Calculate and plot Hs ===================== Plots Hs calculated from spectra dataset
2.74844
3
internet_speed_test.py
JoeThomas-git/JTpython
0
6629907
#This script tests your internet speed (download/upload/ping). import speedtest st = speedtest.Speedtest() option = int(input('''What speed do you want to test? 1) Download 2) Upload 3) Ping Your Choice: ''')) if option == 1: dl = (st.download()/1000000) print('Your download speed is %.2f mb/s' % dl) if...
#This script tests your internet speed (download/upload/ping). import speedtest st = speedtest.Speedtest() option = int(input('''What speed do you want to test? 1) Download 2) Upload 3) Ping Your Choice: ''')) if option == 1: dl = (st.download()/1000000) print('Your download speed is %.2f mb/s' % dl) if...
en
0.687044
#This script tests your internet speed (download/upload/ping). What speed do you want to test? 1) Download 2) Upload 3) Ping Your Choice:
3.74365
4
framework/__init__.py
wbqhb/SEPC
2
6629908
<gh_stars>1-10 from .framework import Framework
from .framework import Framework
none
1
1.120122
1
scribbler/src/libs/parseurl.py
yellowheroes/scribbler
0
6629909
<reponame>yellowheroes/scribbler<gh_stars>0 ''' Created on 27 May 2019 @author: Robert ''' ''' invoke: UrlParse(environ) instance variables: script_name = name of currently executing python script path_info = path up to ? path = a list of seperate path strings without /'s query_string = the query string ...
''' Created on 27 May 2019 @author: Robert ''' ''' invoke: UrlParse(environ) instance variables: script_name = name of currently executing python script path_info = path up to ? path = a list of seperate path strings without /'s query_string = the query string NOT YET AVAILABLE: params = the key-value pa...
en
0.576506
Created on 27 May 2019 @author: Robert invoke: UrlParse(environ) instance variables: script_name = name of currently executing python script path_info = path up to ? path = a list of seperate path strings without /'s query_string = the query string NOT YET AVAILABLE: params = the key-value pairs of the query s...
3.316803
3
utils/make_per_run_histograms.py
BlackHershey/asl-scripts
0
6629910
import argparse import re import matplotlib matplotlib.use('Qt4Agg') # must be set prior to pyplot import from cycler import cycler from image_utils import get_num_frames from matplotlib import pyplot import numpy as np from os import chdir, getcwd, listdir, remove from os.path import join, exists from subp...
import argparse import re import matplotlib matplotlib.use('Qt4Agg') # must be set prior to pyplot import from cycler import cycler from image_utils import get_num_frames from matplotlib import pyplot import numpy as np from os import chdir, getcwd, listdir, remove from os.path import join, exists from subp...
en
0.245666
# must be set prior to pyplot import # if exists(hist_img): # chdir('..') # continue # remove axis padding # remove axis padding #pyplot.savefig('_'.join([patid, run, 'per-frame_histogram_shifted.png']))
2.03688
2
tests/functional/test_management_user.py
bcgov/nr-optimize-objstor-admin-
0
6629911
<gh_stars>0 import time from ecsclient import schemas from ecsclient.common.exceptions import ECSClientException from tests import functional class TestManagementUser(functional.BaseTestCase): def __init__(self, *args, **kwargs): super(TestManagementUser, self).__init__(*args, **kwargs) self.mana...
import time from ecsclient import schemas from ecsclient.common.exceptions import ECSClientException from tests import functional class TestManagementUser(functional.BaseTestCase): def __init__(self, *args, **kwargs): super(TestManagementUser, self).__init__(*args, **kwargs) self.management_user_...
none
1
2.414539
2
model/ops_test.py
rdh1115/cog
38
6629912
# Copyright 2018 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2018 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
en
0.817396
# Copyright 2018 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
2.190769
2
dataset/convert_tfrecords.py
simenvg/SSD.TensorFlow
1
6629913
# Copyright 2018 <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, software...
# Copyright 2018 <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, software...
en
0.761366
# Copyright 2018 <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, software # ...
1.910257
2
django_chat/apps/web/urls.py
ipeternella/django-chat
7
6629914
""" Module with urls for the web app. """ from django.urls import re_path from django_chat.apps.web import views app_name = "web" urlpatterns = [ re_path(r"^chat/(?P<chat_room>\w+)/(?P<chat_user>\w+)/$", views.index, name="index"), ]
""" Module with urls for the web app. """ from django.urls import re_path from django_chat.apps.web import views app_name = "web" urlpatterns = [ re_path(r"^chat/(?P<chat_room>\w+)/(?P<chat_user>\w+)/$", views.index, name="index"), ]
en
0.840864
Module with urls for the web app.
2.036558
2
py/test/utils/media_utils_unittest.py
arccode/factory
3
6629915
<gh_stars>1-10 #!/usr/bin/env python3 # Copyright 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ##### # # NOTE: This test is currently broken and is blocklisted in the top-level # Makefile. # ##### import loggi...
#!/usr/bin/env python3 # Copyright 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ##### # # NOTE: This test is currently broken and is blocklisted in the top-level # Makefile. # ##### import logging import os im...
en
0.855817
#!/usr/bin/env python3 # Copyright 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ##### # # NOTE: This test is currently broken and is blocklisted in the top-level # Makefile. # ##### # udev constants Creates a tem...
2.03079
2
antlir/tests/test_unshare.py
zeroxoneb/antlir
28
6629916
<filename>antlir/tests/test_unshare.py #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import re import signal import subprocess import tempfile import time ...
<filename>antlir/tests/test_unshare.py #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import re import signal import subprocess import tempfile import time ...
en
0.870552
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # `user` omitted for reasons described in Unshare's docblock # We need the ready signal to know when we've actually exec...
1.938626
2
scionlab/tasks.py
ManuelMeinen/scionlab
0
6629917
<reponame>ManuelMeinen/scionlab<gh_stars>0 # Copyright 2018 ETH Zurich # # 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 ...
# Copyright 2018 ETH Zurich # # 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, sof...
en
0.885637
# Copyright 2018 ETH Zurich # # 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, sof...
1.856988
2
pyleecan/Methods/Simulation/MagFEMM/comp_flux_airgap.py
tobsen2code/pyleecan
0
6629918
from os.path import isfile from shutil import copyfile from numpy import zeros from SciDataTool import Data1D from ....Classes._FEMMHandler import _FEMMHandler from ....Classes.OutMagFEMM import OutMagFEMM from ....Functions.labels import STATOR_LAB from ....Functions.FEMM.draw_FEMM import draw_FEMM from ....Functi...
from os.path import isfile from shutil import copyfile from numpy import zeros from SciDataTool import Data1D from ....Classes._FEMMHandler import _FEMMHandler from ....Classes.OutMagFEMM import OutMagFEMM from ....Functions.labels import STATOR_LAB from ....Functions.FEMM.draw_FEMM import draw_FEMM from ....Functi...
en
0.731271
Build and solve FEMM model to calculate and store magnetic quantities Parameters ---------- self : MagFEMM a MagFEMM object output : Output an Output object axes_dict: {Data} Dict of axes used for magnetic calculation Returns ------- out_dict: dict Dict ...
2.357188
2
compressor/management/commands/compress.py
ikatson/django_compressor
0
6629919
# flake8: noqa import os import sys from types import MethodType from fnmatch import fnmatch from optparse import make_option try: from cStringIO import StringIO except ImportError: from StringIO import StringIO # noqa from django.core.management.base import NoArgsCommand, CommandError from django.template ...
# flake8: noqa import os import sys from types import MethodType from fnmatch import fnmatch from optparse import make_option try: from cStringIO import StringIO except ImportError: from StringIO import StringIO # noqa from django.core.management.base import NoArgsCommand, CommandError from django.template ...
en
0.81914
# flake8: noqa # noqa # noqa Leave this in to preload template locations # noqa # 'Fake' _render method that just returns the context instead of # rendering. It also checks whether the first node is an extend node or # not, to be able to handle complex inheritance chain. # Cleanup, uninstall our _render monkeypatch now...
1.898593
2
binding.gyp
Ali-Amir/ssvm-napi
0
6629920
{ "targets": [ { "target_name": "<(module_name)", "cflags_cc": [ "-std=c++17" ], "cflags!": [ "-fno-exceptions", "-fno-rtti" ], "cflags_cc!": [ "-fno-exceptions", "-fno-rtti" ], "xcode_settings": { "OTHER_CFLAGS": [ "-std=c++17"], }, "link_settings": { "...
{ "targets": [ { "target_name": "<(module_name)", "cflags_cc": [ "-std=c++17" ], "cflags!": [ "-fno-exceptions", "-fno-rtti" ], "cflags_cc!": [ "-fno-exceptions", "-fno-rtti" ], "xcode_settings": { "OTHER_CFLAGS": [ "-std=c++17"], }, "link_settings": { "...
none
1
1.270547
1
OneByteLdr.py
rakion99/OneByteLdr
0
6629921
<reponame>rakion99/OneByteLdr<gh_stars>0 import pymem import re pm = pymem.Pymem('csgo.exe') # bypass NtOpenFile hook in csgo.exe csgo = pymem.process.module_from_name(pm.process_handle, 'csgo.exe') csgoModule = pm.read_bytes(csgo.lpBaseOfDll, csgo.SizeOfImage) address = csgo.l...
import pymem import re pm = pymem.Pymem('csgo.exe') # bypass NtOpenFile hook in csgo.exe csgo = pymem.process.module_from_name(pm.process_handle, 'csgo.exe') csgoModule = pm.read_bytes(csgo.lpBaseOfDll, csgo.SizeOfImage) address = csgo.lpBaseOfDll + re.search(rb'.\x1A\xF6\x45\x...
en
0.91532
# bypass NtOpenFile hook in csgo.exe # bypass thread creation detection in DllMain of client.dll
1.906331
2
social_network/urls.py
eidelmanj/volunteer_app
0
6629922
<reponame>eidelmanj/volunteer_app<filename>social_network/urls.py from django.conf.urls import patterns, url from social_network import views urlpatterns = patterns('', # Main page URLS url(r'^$', views.index, name='index'), url(r'login/', views.log_in, name='log_in'), url(r'authenticate/', views.aut...
from django.conf.urls import patterns, url from social_network import views urlpatterns = patterns('', # Main page URLS url(r'^$', views.index, name='index'), url(r'login/', views.log_in, name='log_in'), url(r'authenticate/', views.authentication, name='authentication'), url(r'create_account/', v...
en
0.459698
# Main page URLS
1.906921
2
settings_test.py
srijyothsna/django-turtle-shell
1
6629923
from pathlib import Path ROOT_DIR = Path(__file__).parent DEBUG = True DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", } } SECRET_KEY = "whatever" INSTALLED_APPS = ( "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions...
from pathlib import Path ROOT_DIR = Path(__file__).parent DEBUG = True DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", } } SECRET_KEY = "whatever" INSTALLED_APPS = ( "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions...
none
1
1.589453
2
pyronear/models/mobilenet.py
JoaoFdC/PyroNear
0
6629924
#!usr/bin/python # -*- coding: utf-8 -*- from torchvision.models.mobilenet import MobileNetV2, model_urls as imagenet_urls from torchvision.models.utils import load_state_dict_from_url from .utils import cnn_model __all__ = ['mobilenet_v2'] model_urls = { 'mobilenet_v2': 'https://srv-file7.gofile.io/download/RK...
#!usr/bin/python # -*- coding: utf-8 -*- from torchvision.models.mobilenet import MobileNetV2, model_urls as imagenet_urls from torchvision.models.utils import load_state_dict_from_url from .utils import cnn_model __all__ = ['mobilenet_v2'] model_urls = { 'mobilenet_v2': 'https://srv-file7.gofile.io/download/RK...
en
0.603811
#!usr/bin/python # -*- coding: utf-8 -*- MobileNetV2 model from `"MobileNetV2: Inverted Residuals and Linear Bottlenecks" <https://arxiv.org/abs/1801.04381>`_. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet progress (bool): If True, displays a progress bar of the down...
2.61992
3
app.py
lmateus/API_perfil
0
6629925
<filename>app.py from flask import Flask, jsonify, request from flask_cors import CORS app = Flask(__name__) CORS(app) from products import profile_data from profile_gdal_t import pruebaPerfil from Perfil import Perfil @app.route('/ping') def ping(): return jsonify({"message":"pong"}) @app.route('/products') de...
<filename>app.py from flask import Flask, jsonify, request from flask_cors import CORS app = Flask(__name__) CORS(app) from products import profile_data from profile_gdal_t import pruebaPerfil from Perfil import Perfil @app.route('/ping') def ping(): return jsonify({"message":"pong"}) @app.route('/products') de...
none
1
2.396137
2
game2048/models.py
JJHAirylin/2048-api
0
6629926
import keras from keras.layers import Input, Dense, Conv2D, concatenate, Flatten, BatchNormalization, Activation from keras.models import Model import numpy as np import sys sys.path.append("./") from game2048.getdata import read_data_all # define model inputs = Input((4,4,11)) conv = inputs FILTERS = 128...
import keras from keras.layers import Input, Dense, Conv2D, concatenate, Flatten, BatchNormalization, Activation from keras.models import Model import numpy as np import sys sys.path.append("./") from game2048.getdata import read_data_all # define model inputs = Input((4,4,11)) conv = inputs FILTERS = 128...
en
0.807843
# define model # get training data
2.906037
3
config.py
AndreaEdwards/dna_assembly_tools
0
6629927
<filename>config.py #!/usr/bin/env python __author__ = "<NAME>" __copyright__ = "Copyright 2015, The LASER Project" __credits__ = ["<NAME>"] __license__ = "BSD" __version__ = "0.1.0-dev" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Development" class ConfigurationManager(object): """""" def ...
<filename>config.py #!/usr/bin/env python __author__ = "<NAME>" __copyright__ = "Copyright 2015, The LASER Project" __credits__ = ["<NAME>"] __license__ = "BSD" __version__ = "0.1.0-dev" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Development" class ConfigurationManager(object): """""" def ...
ru
0.26433
#!/usr/bin/env python
1.807519
2
blog_api-project/posts/serializers.py
Muntasir-Mahmud/Blog-Api
0
6629928
from django.contrib.auth import get_user_model from rest_framework import serializers from . models import Post class PostSerializer(serializers.ModelSerializer): class Meta: model = Post fields = '__all__' class UserSerializer(serializers.ModelSerializer): class Meta: model = get_us...
from django.contrib.auth import get_user_model from rest_framework import serializers from . models import Post class PostSerializer(serializers.ModelSerializer): class Meta: model = Post fields = '__all__' class UserSerializer(serializers.ModelSerializer): class Meta: model = get_us...
none
1
2.11577
2
backend/auth0login/templatetags/poll_extras.py
UTMIST/WallStreetBots
4
6629929
<reponame>UTMIST/WallStreetBots<filename>backend/auth0login/templatetags/poll_extras.py from django import template register = template.Library() @register.filter def subtract(value, arg): return float(value) - float(arg) @register.filter def multiply(value, arg): return float(value) * float(arg) @regist...
from django import template register = template.Library() @register.filter def subtract(value, arg): return float(value) - float(arg) @register.filter def multiply(value, arg): return float(value) * float(arg) @register.filter def find_percent(change_today): return round(float(change_today)*100, 2) ...
none
1
2.502308
3
py/instalog/plugins/input_archive.py
arccode/factory
3
6629930
#!/usr/bin/env python3 # # Copyright 2016 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Input archive plugin. Import all events from archives which are made by output_archive. The archive name: 'InstalogEvents_...
#!/usr/bin/env python3 # # Copyright 2016 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Input archive plugin. Import all events from archives which are made by output_archive. The archive name: 'InstalogEvents_...
en
0.806461
#!/usr/bin/env python3 # # Copyright 2016 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. Input archive plugin. Import all events from archives which are made by output_archive. The archive name: 'InstalogEvents_' + ...
2.307864
2
project/2222.py
louay-rouabeh/Energy-Management-Live-Dashboard
0
6629931
import base64 import datetime import io import plotly.graph_objs as go import dash from dash.dependencies import Input, Output, State import dash_core_components as dcc import dash_html_components as html import dash_table import pandas as pd from sqlalchemy import create_engine # INSERT INTO "data1....
import base64 import datetime import io import plotly.graph_objs as go import dash from dash.dependencies import Input, Output, State import dash_core_components as dcc import dash_html_components as html import dash_table import pandas as pd from sqlalchemy import create_engine # INSERT INTO "data1....
en
0.594935
# INSERT INTO "data1.db" (data, month, meter) VALUES (6666,'11-UU',844) # Dash # Header # Body # Allow multiple files to be uploaded # hidden store element
2.692648
3
candycrush/candycrush.py
dzhou22/candykart-complexity
0
6629932
<reponame>dzhou22/candykart-complexity from big_ol_pile_of_manim_imports import * class Reduction(Scene): def construct(self): title=TextMobject("The Reduction").scale(2) self.play(Write(title)) self.wait(2) title2=TextMobject("The Reduction").to_corner(UL) self.play(Transfo...
from big_ol_pile_of_manim_imports import * class Reduction(Scene): def construct(self): title=TextMobject("The Reduction").scale(2) self.play(Write(title)) self.wait(2) title2=TextMobject("The Reduction").to_corner(UL) self.play(Transform(title,title2)) suppose=TextM...
de
0.351608
#variable rectangle #self.falsegadget() \begin{matrix} R & O & R & O & R\\ B & P & B & P & B\\ R & O & R & O & R\\ B & P & B & P & B\\ R & O & R & O & R \end{matrix} \begin{matrix} R & O & R & O & R\\ B & P & & & B\\ R & & B & P & R\\ ...
2.694425
3
testpy/test_repr.py
goolor/testpy
0
6629933
<filename>testpy/test_repr.py #!/usr/bin/env python3 #-*- coding: utf-8 -*- str1=r"'test string' new line" print("Original is:"+str1) print() print("After repr is:"+repr(str1)) print() #print("After eval is:"+eval(str1)) print() #print("After repr(eval is:"+repr(eval(str1))) print() print("After eval(repr is:"+eval(re...
<filename>testpy/test_repr.py #!/usr/bin/env python3 #-*- coding: utf-8 -*- str1=r"'test string' new line" print("Original is:"+str1) print() print("After repr is:"+repr(str1)) print() #print("After eval is:"+eval(str1)) print() #print("After repr(eval is:"+repr(eval(str1))) print() print("After eval(repr is:"+eval(re...
en
0.094816
#!/usr/bin/env python3 #-*- coding: utf-8 -*- #print("After eval is:"+eval(str1)) #print("After repr(eval is:"+repr(eval(str1)))
3.076
3
vanquisher/network/__init__.py
Gustavo6046/vanquisher-old
0
6629934
<reponame>Gustavo6046/vanquisher-old<gh_stars>0 """ The Python implementation of the networking protocol that Vanquisher uses to communicate the playsim state between server and clients. """
""" The Python implementation of the networking protocol that Vanquisher uses to communicate the playsim state between server and clients. """
en
0.898511
The Python implementation of the networking protocol that Vanquisher uses to communicate the playsim state between server and clients.
1.58745
2
DummyNews/generator.py
videah/dummynews
0
6629935
import random from datetime import datetime from DummyNews.models import User, Role, Post, Comment, JobListing, BanAppeal, Ban, GDPRRequest, DMCATakeDown, Report from faker import Factory from faker.providers import lorem, internet fake = Factory.create() fake.add_provider(lorem) fake.add_provider(internet) rnd = l...
import random from datetime import datetime from DummyNews.models import User, Role, Post, Comment, JobListing, BanAppeal, Ban, GDPRRequest, DMCATakeDown, Report from faker import Factory from faker.providers import lorem, internet fake = Factory.create() fake.add_provider(lorem) fake.add_provider(internet) rnd = l...
none
1
2.475774
2
stubs.min/System/ComponentModel/__init___parts/NestedContainer.py
ricardyn/ironpython-stubs
1
6629936
<reponame>ricardyn/ironpython-stubs<gh_stars>1-10 class NestedContainer(Container,IContainer,IDisposable,INestedContainer): """ Provides the base implementation for the System.ComponentModel.INestedContainer interface,which enables containers to have an owning component. NestedContainer(owner: IComponent) ...
class NestedContainer(Container,IContainer,IDisposable,INestedContainer): """ Provides the base implementation for the System.ComponentModel.INestedContainer interface,which enables containers to have an owning component. NestedContainer(owner: IComponent) """ def CreateSite(self,*args): """ Create...
en
0.618441
Provides the base implementation for the System.ComponentModel.INestedContainer interface,which enables containers to have an owning component. NestedContainer(owner: IComponent) CreateSite(self: NestedContainer,component: IComponent,name: str) -> ISite Creates a site for the component within the conta...
2.518811
3
doc_summarizer/input_handler/read_txt.py
tufengxu/DocumentSummarizer
0
6629937
<filename>doc_summarizer/input_handler/read_txt.py # ignore all empty lines def read_txt(txt): lines = list() for line in txt: lines.append(line.strip("\n")) return lines if __name__ == '__main__': with open("example.txt", "r") as my_txt: stored = read_txt(my_txt) idx = 0 ...
<filename>doc_summarizer/input_handler/read_txt.py # ignore all empty lines def read_txt(txt): lines = list() for line in txt: lines.append(line.strip("\n")) return lines if __name__ == '__main__': with open("example.txt", "r") as my_txt: stored = read_txt(my_txt) idx = 0 ...
en
0.356686
# ignore all empty lines
3.835516
4
shamiko/proc_utils.py
bonprosoft/shamiko
12
6629938
import os from typing import Optional import psutil def _get_proc(pid): # type: (int) -> Optional[psutil.Process] try: return psutil.Process(pid) except psutil.NoSuchProcess: return None def pid_exists(pid): # type: (int) -> bool return psutil.pid_exists(pid) def guess_executa...
import os from typing import Optional import psutil def _get_proc(pid): # type: (int) -> Optional[psutil.Process] try: return psutil.Process(pid) except psutil.NoSuchProcess: return None def pid_exists(pid): # type: (int) -> bool return psutil.pid_exists(pid) def guess_executa...
en
0.508718
# type: (int) -> Optional[psutil.Process] # type: (int) -> bool # type: (int) -> Optional[str] # type: (int) -> Optional[str]
2.508101
3
dbt_sugar/core/task/base.py
jessica-ol/dbt-sugar
94
6629939
<gh_stars>10-100 """API definition for Task-like objects.""" import abc import os import re from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union from dbt_sugar.core.clients.dbt import DbtProfile from dbt_sugar.core.clients.yaml_helpers import open_yaml, save_yaml from dbt_sugar.core.conf...
"""API definition for Task-like objects.""" import abc import os import re from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union from dbt_sugar.core.clients.dbt import DbtProfile from dbt_sugar.core.clients.yaml_helpers import open_yaml, save_yaml from dbt_sugar.core.config.config import ...
en
0.694786
API definition for Task-like objects. Sets up basic API for task-like classes. # Populated by class methods Appends excluded_folders to the default folder exclusion patten. Searches for the description of a column in all the descriptions in DBT. Args: column_name (str): column name to get the descr...
2.09981
2
src/read_enem/read_enem.py
changing-official/enem-reader
0
6629940
class ReaderCSV(): def read(self, file): return True def output(self): # install pandas #call pandas reading csv file #return csvfile in string[] format return ""
class ReaderCSV(): def read(self, file): return True def output(self): # install pandas #call pandas reading csv file #return csvfile in string[] format return ""
en
0.486492
# install pandas #call pandas reading csv file #return csvfile in string[] format
3.186335
3
experiments/buffers/buffers.py
mukerjee/sdrt
7
6629941
#!/usr/bin/env python import sys sys.path.insert(0, '/etalon/experiments') import buffer_common import click_common import common def main(): cnfs = buffer_common.gen_static_sweep(2, 7) + buffer_common.gen_resize_sweep(0, 8000, 500) # Use the first experiment's CC mode, or "reno" if no CC mode is specified....
#!/usr/bin/env python import sys sys.path.insert(0, '/etalon/experiments') import buffer_common import click_common import common def main(): cnfs = buffer_common.gen_static_sweep(2, 7) + buffer_common.gen_resize_sweep(0, 8000, 500) # Use the first experiment's CC mode, or "reno" if no CC mode is specified....
en
0.812862
#!/usr/bin/env python # Use the first experiment's CC mode, or "reno" if no CC mode is specified. # This avoid unnecessarily restarting the cluster. # For every configuration, add a copy that uses reTCP as the CC mode. Put # the new configurations at the end so that the CC mode needs to be changed # only once.
1.871264
2
find_attitude/tests/test_find_attitude.py
sot/find_attitude
0
6629942
<reponame>sot/find_attitude # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function, division from pprint import pprint import numpy as np import agasc from Ska.quatutil import radec2yagzag from Quaternion import Quat from astropy.io import ascii from find_attitude.find_a...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function, division from pprint import pprint import numpy as np import agasc from Ska.quatutil import radec2yagzag from Quaternion import Quat from astropy.io import ascii from find_attitude.find_attitude import (get_dists_ya...
en
0.269963
# Licensed under a 3-clause BSD style license - see LICENSE.rst Test a case where distance 5-7 = 864.35 and 5-1 is 865.808 # 3 overlaps, 3.0 tol AGASC_ID RA DEC YAG YAG_ERR ZAG ZAG_ERR MAG_ACA MAG_ERROR 260863544 189.758890214 22.6594185253 567.401869049 0...
2.018033
2
gated_linear_networks/examples/bernoulli_mnist.py
kawa-work/deepmind-research
10,110
6629943
# Lint as: python3 # Copyright 2020 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# Lint as: python3 # Copyright 2020 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
en
0.678061
# Lint as: python3 # Copyright 2020 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
2.300989
2
src/asymmetric_jwt_auth/repos/django.py
crgwbr/asymmetric-jwt-auth
18
6629944
from typing import Union from django.contrib.auth import get_user_model from django.contrib.auth.models import User from jwt.exceptions import PyJWKClientError from .base import BaseUserRepository, BasePublicKeyRepository from ..tokens import UntrustedToken, Token from .. import models class DjangoUserRepository(Base...
from typing import Union from django.contrib.auth import get_user_model from django.contrib.auth.models import User from jwt.exceptions import PyJWKClientError from .base import BaseUserRepository, BasePublicKeyRepository from ..tokens import UntrustedToken, Token from .. import models class DjangoUserRepository(Base...
en
0.826863
Get a Django user by username Attempt to verify a JWT for the given user using public keys from the PublicKey model. Attempt to verify a JWT for the given user using public keys the user's JWKS endpoint.
2.396127
2
mai/cli.py
zalando-stups/mia
9
6629945
<filename>mai/cli.py import click import os import keyring import yaml import aws_saml_login.saml import time import mai from aws_saml_login import authenticate, assume_role, write_aws_credentials from clickclick import Action, choice, error, AliasedGroup, info, print_table, OutputFormat CONFIG_DIR_PATH = click.get_...
<filename>mai/cli.py import click import os import keyring import yaml import aws_saml_login.saml import time import mai from aws_saml_login import authenticate, assume_role, write_aws_credentials from clickclick import Action, choice, error, AliasedGroup, info, print_table, OutputFormat CONFIG_DIR_PATH = click.get_...
en
0.555732
List profiles >>> get_role_label(('arn:aws:iam::123:saml-provider/Shibboleth',\ 'arn:aws:iam::123:role/Shibboleth-PowerUser', 'zalando-stups')) 'AWS Account 123 (zalando-stups): Shibboleth-PowerUser' Create a new profile Create for all roles a new own profile # name is sometimes missing Set default profile ...
1.868457
2
labelbox/data/serialization/ndjson/converter.py
Cyniikal/labelbox-python
0
6629946
<gh_stars>0 import logging from typing import Any, Dict, Generator, Iterable from ...annotation_types.collection import LabelCollection, LabelGenerator from .label import NDLabel logger = logging.getLogger(__name__) class NDJsonConverter: @staticmethod def deserialize(json_data: Iterable[Dict[str, Any]]) -...
import logging from typing import Any, Dict, Generator, Iterable from ...annotation_types.collection import LabelCollection, LabelGenerator from .label import NDLabel logger = logging.getLogger(__name__) class NDJsonConverter: @staticmethod def deserialize(json_data: Iterable[Dict[str, Any]]) -> LabelGener...
en
0.699081
Converts ndjson data (prediction import format) into the common labelbox format. Args: json_data: An iterable representing the ndjson data Returns: LabelGenerator containing the ndjson data. Converts a labelbox common object to the labelbox ndjson format (prediction import forma...
2.369802
2
client-programs/contrib/metagenscope/metagenscope/autometa.py
LongTailBio/pangea-django
0
6629947
import pandas as pd import logging from pandas.api.types import is_string_dtype from pandas.api.types import is_numeric_dtype from sklearn.cluster import dbscan from requests.exceptions import HTTPError from .modules.constants import FASTKRAKEN2_NAMES from .modules.parse_utils import ( proportions, run_pca, ...
import pandas as pd import logging from pandas.api.types import is_string_dtype from pandas.api.types import is_numeric_dtype from sklearn.cluster import dbscan from requests.exceptions import HTTPError from .modules.constants import FASTKRAKEN2_NAMES from .modules.parse_utils import ( proportions, run_pca, ...
none
1
2.367307
2
GPGPY/config/config.py
caweinshenker/GPGPY
0
6629948
#MIT License # #Copyright (c) 2016 <NAME> # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, di...
#MIT License # #Copyright (c) 2016 <NAME> # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, di...
en
0.689462
#MIT License # #Copyright (c) 2016 <NAME> # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, di...
2.140841
2
anndata/tests/test_io_conversion.py
chris-rands/anndata
0
6629949
""" This file contains tests for conversion made during io. """ import h5py import numpy as np import pytest from scipy import sparse import anndata as ad from anndata.tests.helpers import gen_adata, assert_equal @pytest.fixture( params=[sparse.csr_matrix, sparse.csc_matrix, np.array], ids=["scipy-csr", "sci...
""" This file contains tests for conversion made during io. """ import h5py import numpy as np import pytest from scipy import sparse import anndata as ad from anndata.tests.helpers import gen_adata, assert_equal @pytest.fixture( params=[sparse.csr_matrix, sparse.csc_matrix, np.array], ids=["scipy-csr", "sci...
en
0.983252
This file contains tests for conversion made during io.
2.113482
2
Simple Chatty Bot/Part1.py
seakun/Python-Projects
6
6629950
print('Hello! My name is Aid.') print('I was created in 2020.') print('Please, remind me your name.') # reading a name print('What a great name you have, {yourName}!')
print('Hello! My name is Aid.') print('I was created in 2020.') print('Please, remind me your name.') # reading a name print('What a great name you have, {yourName}!')
en
0.725912
# reading a name
2.852493
3