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 |
|---|---|---|---|---|---|---|---|---|---|---|
wemake_python_styleguide/logic/variables.py | cmppoon/wemake-python-styleguide | 1 | 6625151 | <filename>wemake_python_styleguide/logic/variables.py
# -*- coding: utf-8 -*-
import ast
from typing import Union
VarDefinition = Union[ast.AST, ast.expr]
def _is_valid_single(node: VarDefinition) -> bool:
if isinstance(node, ast.Name):
return True
if isinstance(node, ast.Starred) and isinstance(nod... | <filename>wemake_python_styleguide/logic/variables.py
# -*- coding: utf-8 -*-
import ast
from typing import Union
VarDefinition = Union[ast.AST, ast.expr]
def _is_valid_single(node: VarDefinition) -> bool:
if isinstance(node, ast.Name):
return True
if isinstance(node, ast.Starred) and isinstance(nod... | en | 0.813389 | # -*- coding: utf-8 -*- Is used to check either block variables are correctly defined. | 3.271555 | 3 |
sklearn_pandas/dataframe_mapper.py | govorunov/sklearn-pandas | 0 | 6625152 | import contextlib
from datetime import datetime
import pandas as pd
import numpy as np
from scipy import sparse
from sklearn.base import BaseEstimator, TransformerMixin
from .cross_validation import DataWrapper
from .pipeline import make_transformer_pipeline, _call_fit, TransformerPipeline
from . import logger
string_... | import contextlib
from datetime import datetime
import pandas as pd
import numpy as np
from scipy import sparse
from sklearn.base import BaseEstimator, TransformerMixin
from .cross_validation import DataWrapper
from .pipeline import make_transformer_pipeline, _call_fit, TransformerPipeline
from . import logger
string_... | en | 0.817855 | Convert 1-dimensional arrays to 2-dimensional column vectors. Attempt to extract feature names based on a given estimator # Stolen from https://stackoverflow.com/a/17677938/356729 Map Pandas data frame column subsets to their own sklearn transformation. Params: features a list of tuples with features de... | 2.419929 | 2 |
src/trydjango/product/models.py | nickk2002/django-web-site | 0 | 6625153 | from django.db import models
# Create your models here.
class Product(models.Model):
title = models.CharField(max_length = 10)
description = models.TextField(blank = False,null=True)
| from django.db import models
# Create your models here.
class Product(models.Model):
title = models.CharField(max_length = 10)
description = models.TextField(blank = False,null=True)
| en | 0.963489 | # Create your models here. | 2.232291 | 2 |
fastapi_users/router/auth.py | eltociear/fastapi-users | 0 | 6625154 | from fastapi import APIRouter, Depends, HTTPException, Response, status
from fastapi.security import OAuth2PasswordRequestForm
from fastapi_users import models
from fastapi_users.authentication import Authenticator, BaseAuthentication
from fastapi_users.manager import BaseUserManager, UserManagerDependency
from fastap... | from fastapi import APIRouter, Depends, HTTPException, Response, status
from fastapi.security import OAuth2PasswordRequestForm
from fastapi_users import models
from fastapi_users.authentication import Authenticator, BaseAuthentication
from fastapi_users.manager import BaseUserManager, UserManagerDependency
from fastap... | en | 0.751958 | Generate a router with login/logout routes for an authentication backend. | 2.582062 | 3 |
Classy.Classifier/Classy.Classifier.ClassifierWrapper/classifier/views.py | undeadspez/classy | 0 | 6625155 | from django.http import HttpResponse, HttpResponseBadRequest, JsonResponse
from rest_framework.decorators import api_view
from classifier.logic import process_and_classify, IMAGE_SIZE
@api_view(['GET'])
def test5(request):
"""
# Endpoint description:
## Params:
`arg0::int`
## Returns:
`arg... | from django.http import HttpResponse, HttpResponseBadRequest, JsonResponse
from rest_framework.decorators import api_view
from classifier.logic import process_and_classify, IMAGE_SIZE
@api_view(['GET'])
def test5(request):
"""
# Endpoint description:
## Params:
`arg0::int`
## Returns:
`arg... | en | 0.63829 | # Endpoint description: ## Params: `arg0::int` ## Returns: `arg0 + 5::int` # Endpoint description: ## Params: ## Returns: JSON containing image spatial characteristics. Only important for `classify_multiple` with `scale == false(0)`. **content-type**: application/json **example*... | 2.40412 | 2 |
airac/__init__.py | scls19fr/python-airac | 1 | 6625156 | <filename>airac/__init__.py
import datetime
AIRAC_DELAY = {
"publication_date_major_changes": datetime.timedelta(days=56),
"publication_date_normal": datetime.timedelta(days=42),
"latest_delivery_date": datetime.timedelta(days=28),
"cut_off_date": datetime.timedelta(days=20),
"fms_data_production"... | <filename>airac/__init__.py
import datetime
AIRAC_DELAY = {
"publication_date_major_changes": datetime.timedelta(days=56),
"publication_date_normal": datetime.timedelta(days=42),
"latest_delivery_date": datetime.timedelta(days=28),
"cut_off_date": datetime.timedelta(days=20),
"fms_data_production"... | none | 1 | 2.654766 | 3 | |
functions/signs_and_figures.py | EUFAR/asmm-eufar | 0 | 6625157 | from reportlab.platypus import Flowable
class tick(Flowable):
def __init__(self, w1, h1, s, t, w, color='black'):
Flowable.__init__(self)
self.w1 = w1
self.h1 = h1
self.s = s
self.t = t
self.w = w
self.color = color
def draw(self):
s = f... | from reportlab.platypus import Flowable
class tick(Flowable):
def __init__(self, w1, h1, s, t, w, color='black'):
Flowable.__init__(self)
self.w1 = w1
self.h1 = h1
self.s = s
self.t = t
self.w = w
self.color = color
def draw(self):
s = f... | none | 1 | 2.981061 | 3 | |
www/sitemaps.py | eyolfson/eyolfson.com | 0 | 6625158 | <reponame>eyolfson/eyolfson.com
from django.contrib import sitemaps
from django.urls import reverse
class StaticViewSitemap(sitemaps.Sitemap):
protocol = 'https'
def items(self):
return ['index']
def location(self, item):
return reverse(item)
| from django.contrib import sitemaps
from django.urls import reverse
class StaticViewSitemap(sitemaps.Sitemap):
protocol = 'https'
def items(self):
return ['index']
def location(self, item):
return reverse(item) | none | 1 | 1.999149 | 2 | |
src/darknet53.py | Tshzzz/jinnan_yolo_baseline | 24 | 6625159 | <gh_stars>10-100
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: tshzzz
"""
import torch
import torch.nn as nn
import numpy as np
from src.layers import conv_block,residual_block
from src.utils import load_conv_bn
class darknet53(nn.Module):
def __init__(self, in_planes=3):
super(darknet53, sel... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: tshzzz
"""
import torch
import torch.nn as nn
import numpy as np
from src.layers import conv_block,residual_block
from src.utils import load_conv_bn
class darknet53(nn.Module):
def __init__(self, in_planes=3):
super(darknet53, self).__init__()
... | en | 0.300401 | #!/usr/bin/env python # -*- coding: utf-8 -*- @author: tshzzz | 2.25335 | 2 |
models.py | dogeplusplus/haiku-transformer | 0 | 6625160 | <filename>models.py
import jax
import typing as t
import haiku as hk
import numpy as np
import jax.numpy as jnp
from einops import rearrange, repeat, reduce
class SelfAttention(hk.Module):
def __init__(self, k: int, heads: int):
super().__init__()
self.k = k
self.heads = heads
se... | <filename>models.py
import jax
import typing as t
import haiku as hk
import numpy as np
import jax.numpy as jnp
from einops import rearrange, repeat, reduce
class SelfAttention(hk.Module):
def __init__(self, k: int, heads: int):
super().__init__()
self.k = k
self.heads = heads
se... | en | 0.792177 | # send attention heads as additional output # Patch embedding is just a dense layer mapping a flattened patch to another array # Multiply attention in each block together # Take the top percentile across the last axis # Mask to keep the class token # Keep values that are in the top percentile or are the cls indices # C... | 2.248858 | 2 |
GAN.py | rberezdivin/DCGAN-CIFAR10 | 20 | 6625161 | #-*- coding: utf-8 -*-
from __future__ import division
import os
import time
import tensorflow as tf
import numpy as np
from ops import *
from utils import *
#from datetime import datetime
#import matplotlib.pyplot as plt
class GAN(object):
def __init__(self, sess, epoch, batch_size, dataset_name, checkpoint_di... | #-*- coding: utf-8 -*-
from __future__ import division
import os
import time
import tensorflow as tf
import numpy as np
from ops import *
from utils import *
#from datetime import datetime
#import matplotlib.pyplot as plt
class GAN(object):
def __init__(self, sess, epoch, batch_size, dataset_name, checkpoint_di... | en | 0.483444 | #-*- coding: utf-8 -*- #from datetime import datetime #import matplotlib.pyplot as plt # name for checkpoint # fix # parameters # dimension of noise-vector # train # test # number of generated images to be saved # load mnist # get number of batches for a single epoch # 700 = 70000 / 100 # parameters # dimension of nois... | 2.627783 | 3 |
examples/gradient_magnitude.py | rqssouza/opencv-gui-parameter-tuner | 1 | 6625162 | <reponame>rqssouza/opencv-gui-parameter-tuner<gh_stars>1-10
#!/bin/env python3
import cv2 as cv
import numpy as np
import argparse
import tuner.tuner as tuner
def mag(gradient_x, gradient_y):
gradient_mag = np.sqrt(np.square(gradient_x) + np.square(gradient_y))
return np.uint8(255 * (gradient_mag / np.max(gr... | #!/bin/env python3
import cv2 as cv
import numpy as np
import argparse
import tuner.tuner as tuner
def mag(gradient_x, gradient_y):
gradient_mag = np.sqrt(np.square(gradient_x) + np.square(gradient_y))
return np.uint8(255 * (gradient_mag / np.max(gradient_mag)))
def ths(img, ths_min, ths_max):
ret = np... | ru | 0.167759 | #!/bin/env python3 | 2.303523 | 2 |
pygbe/compute_boundary_force.py | barbagroup/pygbe | 36 | 6625163 | <filename>pygbe/compute_boundary_force.py<gh_stars>10-100
"""
This function reads in a phi.txt resulting from the linear system
in a regular pygbe run, and computing the reaction field
"""
import os
import re
import sys
import time
import glob
import numpy
import pickle
import subprocess
from datetime import datetime
... | <filename>pygbe/compute_boundary_force.py<gh_stars>10-100
"""
This function reads in a phi.txt resulting from the linear system
in a regular pygbe run, and computing the reaction field
"""
import os
import re
import sys
import time
import glob
import numpy
import pickle
import subprocess
from datetime import datetime
... | en | 0.713093 | This function reads in a phi.txt resulting from the linear system in a regular pygbe run, and computing the reaction field # Import self made modules #courtesy of http://stackoverflow.com/a/5916874 Allow writing both to STDOUT on screen and sending text to file in conjunction with the command `sys.stdout = Log... | 2.851232 | 3 |
proselint/checks/misc/greylist.py | ankita240796/proselint | 4,163 | 6625164 | <reponame>ankita240796/proselint
"""Use of greylisted words.
---
layout: post
source: Strunk & White
source_url: ???
title: Use of greylisted words
date: 2014-06-10 12:31:19
categories: writing
---
Strunk & White say:
"""
import re
from proselint.tools import memoize
@memoize
def check(text):
... | """Use of greylisted words.
---
layout: post
source: Strunk & White
source_url: ???
title: Use of greylisted words
date: 2014-06-10 12:31:19
categories: writing
---
Strunk & White say:
"""
import re
from proselint.tools import memoize
@memoize
def check(text):
"""Check the text."""
err... | en | 0.695155 | Use of greylisted words. --- layout: post source: Strunk & White source_url: ??? title: Use of greylisted words date: 2014-06-10 12:31:19 categories: writing --- Strunk & White say: Check the text. | 2.808532 | 3 |
youtube_dl_gui/downloaders.py | oleksis/youtube-dl-gui | 527 | 6625165 | # type: ignore[misc]
"""Python module to download videos.
This module contains the actual downloaders responsible
for downloading the video files.
"""
# -*- coding: future_annotations -*-
import os
import signal
import subprocess
from pathlib import Path
from queue import Queue
from threading import Thread
from time... | # type: ignore[misc]
"""Python module to download videos.
This module contains the actual downloaders responsible
for downloading the video files.
"""
# -*- coding: future_annotations -*-
import os
import signal
import subprocess
from pathlib import Path
from queue import Queue
from threading import Thread
from time... | en | 0.748058 | # type: ignore[misc] Python module to download videos. This module contains the actual downloaders responsible for downloading the video files. # -*- coding: future_annotations -*- # noinspection PyUnresolvedReferences Helper class to avoid deadlocks when reading from subprocess pipes. This class uses python thre... | 2.734824 | 3 |
Assignments/Assignment 2/DS_Assignment2_201911189/A4-4.py | h0han/SE274_2020_spring | 0 | 6625166 | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
#A4-4(1 point)
from positional_list import PositionalList
class personal_PL_4(PositionalList):
def max(self):
k = 0
iterator = iter(self)
for i in iterator:
if type(i) != int or type(i) != float:
raise TypeError('C... | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
#A4-4(1 point)
from positional_list import PositionalList
class personal_PL_4(PositionalList):
def max(self):
k = 0
iterator = iter(self)
for i in iterator:
if type(i) != int or type(i) != float:
raise TypeError('C... | en | 0.48048 | #!/usr/bin/env python # coding: utf-8 # In[ ]: #A4-4(1 point) | 3.250236 | 3 |
setup.py | jwrichardson/dtt2hdf | 0 | 6625167 | <reponame>jwrichardson/dtt2hdf
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
import os
import sys
from distutils.sysconfig import get_python_lib
import setup_helper
from setuptools import find_packages, setup
version = '1.0.1'
cmdclass = setup_helper... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
import os
import sys
from distutils.sysconfig import get_python_lib
import setup_helper
from setuptools import find_packages, setup
version = '1.0.1'
cmdclass = setup_helper.version_checker(version, 'dtt2... | en | 0.223788 | #!/usr/bin/env python # -*- coding: utf-8 -*- #include_package_data=True, #scripts=[''], | 1.522532 | 2 |
examples/lof_example.py | marcelflygare/pyod | 2 | 6625168 | <filename>examples/lof_example.py
# -*- coding: utf-8 -*-
"""Example of using LOF for outlier detection
"""
# Author: <NAME> <<EMAIL>>
# License: BSD 2 clause
from __future__ import division
from __future__ import print_function
import os
import sys
# temporary solution for relative imports in case pyod is not insta... | <filename>examples/lof_example.py
# -*- coding: utf-8 -*-
"""Example of using LOF for outlier detection
"""
# Author: <NAME> <<EMAIL>>
# License: BSD 2 clause
from __future__ import division
from __future__ import print_function
import os
import sys
# temporary solution for relative imports in case pyod is not insta... | en | 0.629902 | # -*- coding: utf-8 -*- Example of using LOF for outlier detection # Author: <NAME> <<EMAIL>> # License: BSD 2 clause # temporary solution for relative imports in case pyod is not installed # if pyod is installed, no need to use the following line Utility function for visualizing the results in examples. Internal u... | 3.115832 | 3 |
donation/forms.py | 9sneha-n/pari | 0 | 6625169 | from django import forms
from django.utils.translation import ugettext_lazy as _
from .fields import AmountField
from .helpers import DonationOptions
class DonateForm(forms.Form):
name = forms.CharField(
label=_("NAME"),
max_length=100,
widget=forms.TextInput(attrs={"class": "form-control... | from django import forms
from django.utils.translation import ugettext_lazy as _
from .fields import AmountField
from .helpers import DonationOptions
class DonateForm(forms.Form):
name = forms.CharField(
label=_("NAME"),
max_length=100,
widget=forms.TextInput(attrs={"class": "form-control... | none | 1 | 2.199996 | 2 | |
classify.py | bosecodes/cautious-spork | 1 | 6625170 | <reponame>bosecodes/cautious-spork
import tensorflow as tf
import sys
import os
import urllib
import final
# Disable tensorflow compilation warnings
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import tensorflow as tf
def prediction(image_path):
final.done()
# Read the image_data
image_data = tf.compat.v1.... | import tensorflow as tf
import sys
import os
import urllib
import final
# Disable tensorflow compilation warnings
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import tensorflow as tf
def prediction(image_path):
final.done()
# Read the image_data
image_data = tf.compat.v1.gfile.FastGFile(image_path, 'rb').r... | en | 0.773543 | # Disable tensorflow compilation warnings # Read the image_data # Loads label file, strips off carriage return # Unpersists graph from file # Feed the image_data as input to the graph and get first prediction # Sort to show labels of first prediction in order of confidence | 2.535514 | 3 |
graphics_editor/editor/gui_rectangles.py | foobar167/junkyard | 60 | 6625171 | <reponame>foobar167/junkyard
# -*- coding: utf-8 -*-
import operator
import tkinter as tk
from .gui_canvas import CanvasImage
class Rectangles(CanvasImage):
""" Class of Rectangles. Inherit CanvasImage class """
def __init__(self, placeholder, path):
""" Initialize the Rectangles """
CanvasIma... | # -*- coding: utf-8 -*-
import operator
import tkinter as tk
from .gui_canvas import CanvasImage
class Rectangles(CanvasImage):
""" Class of Rectangles. Inherit CanvasImage class """
def __init__(self, placeholder, path):
""" Initialize the Rectangles """
CanvasImage.__init__(self, placeholder... | en | 0.785774 | # -*- coding: utf-8 -*- Class of Rectangles. Inherit CanvasImage class Initialize the Rectangles # call __init__ of the CanvasImage class # start new rectangle # finish new rectangle # call popup menu # handle mouse motion # delete selected rectangle # Create a popup menu for Rectangles # popup menu is closed # Rectang... | 3.315573 | 3 |
app/request.py | mukjos30/News_Articles | 0 | 6625172 | import urllib.request,json
from .models import Source,Article
api_key = None
base_url = None
base_url_articles=None
def config_request(app):
global api_key,base_url,articleUrl
api_key=app.config['NEWS_API_KEY']
base_url=app.config['NEWS_API_WEB_URL']
articleUrl=app.config['ARTICLES_URL']
print(b... | import urllib.request,json
from .models import Source,Article
api_key = None
base_url = None
base_url_articles=None
def config_request(app):
global api_key,base_url,articleUrl
api_key=app.config['NEWS_API_KEY']
base_url=app.config['NEWS_API_WEB_URL']
articleUrl=app.config['ARTICLES_URL']
print(b... | en | 0.744253 | Function that gets the json response to our url request Function that proceeses that the sources result and transform them to a list of Objects Args: source_list:A list of dictionaries that contain source details Returns: source_results:A list of source Objects # print(source_list) Function that gets ... | 2.947476 | 3 |
tensorforce/agents/dqfd_agent.py | youlei202/tensorforce-lei | 0 | 6625173 | # Copyright 2017 reinforce.io. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | # Copyright 2017 reinforce.io. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | en | 0.775466 | # Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or... | 1.599075 | 2 |
test/unit/mysql_class/gtidset_or.py | deepcoder42/mysql-lib | 1 | 6625174 | #!/usr/bin/python
# Classification (U)
"""Program: gtidset_or.py
Description: Unit testing of GTIDSet.__or__ method in mysql_class.py.
Usage:
test/unit/mysql_class/gtidset_or.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
... | #!/usr/bin/python
# Classification (U)
"""Program: gtidset_or.py
Description: Unit testing of GTIDSet.__or__ method in mysql_class.py.
Usage:
test/unit/mysql_class/gtidset_or.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
... | en | 0.720285 | #!/usr/bin/python # Classification (U) Program: gtidset_or.py Description: Unit testing of GTIDSet.__or__ method in mysql_class.py. Usage: test/unit/mysql_class/gtidset_or.py Arguments: # Libraries and Global Variables # Standard # Third-party # Local Class: UnitTest Description: Class w... | 2.830177 | 3 |
tests/components/sonarr/__init__.py | pszafer/core | 3 | 6625175 | """Tests for the Sonarr component."""
from socket import gaierror as SocketGIAError
from homeassistant.components.sonarr.const import (
CONF_BASE_PATH,
CONF_UPCOMING_DAYS,
CONF_WANTED_MAX_ITEMS,
DEFAULT_UPCOMING_DAYS,
DEFAULT_WANTED_MAX_ITEMS,
DOMAIN,
)
from homeassistant.const import (
CON... | """Tests for the Sonarr component."""
from socket import gaierror as SocketGIAError
from homeassistant.components.sonarr.const import (
CONF_BASE_PATH,
CONF_UPCOMING_DAYS,
CONF_WANTED_MAX_ITEMS,
DEFAULT_UPCOMING_DAYS,
DEFAULT_WANTED_MAX_ITEMS,
DOMAIN,
)
from homeassistant.const import (
CON... | en | 0.686574 | Tests for the Sonarr component. Mock Sonarr connection. Mock Sonarr connection errors. Mock Sonarr invalid auth errors. Mock Sonarr server errors. Set up the Sonarr integration in Home Assistant. Patch the async setup of sonarr. Patch the async entry setup of sonarr. | 2.103566 | 2 |
supriya/nonrealtime/bases.py | josiah-wolf-oberholtzer/supriya | 191 | 6625176 | import abc
import functools
from uqbar.objects import get_repr
from supriya.system import SupriyaObject
class SessionObject(SupriyaObject):
"""
A non-realtime session object, analogous to ServerObject.
"""
### CLASS VARIABLES ###
__documentation_section__ = "Session Internals"
__slots__ =... | import abc
import functools
from uqbar.objects import get_repr
from supriya.system import SupriyaObject
class SessionObject(SupriyaObject):
"""
A non-realtime session object, analogous to ServerObject.
"""
### CLASS VARIABLES ###
__documentation_section__ = "Session Internals"
__slots__ =... | en | 0.259807 | A non-realtime session object, analogous to ServerObject. ### CLASS VARIABLES ### ### INITIALIZER ### ### SPECIAL METHODS ### ### PUBLIC METHODS ### ### PUBLIC PROPERTIES ### | 2.443412 | 2 |
PyChanter/_models/directoryTreeModel.py | hariharan849/PyChanter | 3 | 6625177 | <reponame>hariharan849/PyChanter<filename>PyChanter/_models/directoryTreeModel.py
"""
Directory tree model to display directory Information
"""
from . import genericTreeModel as _genericTreeModel
class DirectoryTreeModel(_genericTreeModel.GenericTreeModel):
def headerData(self, section, orientation, role):
... | """
Directory tree model to display directory Information
"""
from . import genericTreeModel as _genericTreeModel
class DirectoryTreeModel(_genericTreeModel.GenericTreeModel):
def headerData(self, section, orientation, role):
"""
Returns Header data to display in column
"""
if rol... | en | 0.482658 | Directory tree model to display directory Information Returns Header data to display in column Returns Flags for the data | 2.562515 | 3 |
setup.py | liordanon/dsbasic | 0 | 6625178 | <filename>setup.py
from distutils.core import setup
setup(
name='dsbasic',
version='0.1',
packages=['dsbasic'],
license='MIT'
)
| <filename>setup.py
from distutils.core import setup
setup(
name='dsbasic',
version='0.1',
packages=['dsbasic'],
license='MIT'
)
| none | 1 | 0.940619 | 1 | |
PCONV_operator/Mtimer.py | limuhit/pseudocylindrical_convolution | 6 | 6625179 | <reponame>limuhit/pseudocylindrical_convolution
import torch
class Timer():
def __init__(self, flag=False):
self.start_t = torch.cuda.Event(enable_timing=True)
self.end_t = torch.cuda.Event(enable_timing=True)
self.flag = flag
def start(self):
if self.flag:
self.sta... | import torch
class Timer():
def __init__(self, flag=False):
self.start_t = torch.cuda.Event(enable_timing=True)
self.end_t = torch.cuda.Event(enable_timing=True)
self.flag = flag
def start(self):
if self.flag:
self.start_t.record()
def end(self, out_string=''):... | none | 1 | 2.72647 | 3 | |
venv/lib/python3.8/site-packages/numpy/distutils/intelccompiler.py | Retraces/UkraineBot | 2 | 6625180 | <reponame>Retraces/UkraineBot
/home/runner/.cache/pip/pool/37/fa/6f/5a394b3917651f7e1cb3dee85382c136bfecf6be5d76c9a67bb5c4bece | /home/runner/.cache/pip/pool/37/fa/6f/5a394b3917651f7e1cb3dee85382c136bfecf6be5d76c9a67bb5c4bece | none | 1 | 0.892406 | 1 | |
python3/help/apihelper1.py | jtraver/dev | 0 | 6625181 | #!/usr/bin/env python3
#!/usr/bin/python
import apihelper
apihelper.info(apihelper)
| #!/usr/bin/env python3
#!/usr/bin/python
import apihelper
apihelper.info(apihelper)
| ru | 0.236488 | #!/usr/bin/env python3 #!/usr/bin/python | 1.136986 | 1 |
ML_Chinahadoop/04/code/test/test2.py | lsieun/learn-AI | 1 | 6625182 | #coding:utf-8
print('This is in test1.py')
print(__name__)
print(__file__) | #coding:utf-8
print('This is in test1.py')
print(__name__)
print(__file__) | en | 0.795494 | #coding:utf-8 | 1.385595 | 1 |
client/bahub/bahubapp/mapping/handlers.py | FeatureToggleStudy/file-repository | 0 | 6625183 |
from ..handler.dockervolumebackup import DockerVolumeHotBackup, DockerVolumeBackup
from ..handler.localfilebackup import LocalFileBackup
from ..handler.commandoutputbackup import CommandOutputBackup
from ..handler.dockeroutputbackup import DockerCommandOutputBackup
from ..handler.mysqlbackup import MySQLBackup
class... |
from ..handler.dockervolumebackup import DockerVolumeHotBackup, DockerVolumeBackup
from ..handler.localfilebackup import LocalFileBackup
from ..handler.commandoutputbackup import CommandOutputBackup
from ..handler.dockeroutputbackup import DockerCommandOutputBackup
from ..handler.mysqlbackup import MySQLBackup
class... | en | 0.856264 | Resolves "type" configuration key into object, on error throws KeyError | 2.131655 | 2 |
tools/importers/common/converters.py | shawncal/ELL | 2,094 | 6625184 | ####################################################################################################
#
# Project: Embedded Learning Library (ELL)
# File: converters.py (importers)
# Authors: <NAME>
#
# Requires: Python 3.x
#
#########################################################################################... | ####################################################################################################
#
# Project: Embedded Learning Library (ELL)
# File: converters.py (importers)
# Authors: <NAME>
#
# Requires: Python 3.x
#
#########################################################################################... | en | 0.74958 | #################################################################################################### # # Project: Embedded Learning Library (ELL) # File: converters.py (importers) # Authors: <NAME> # # Requires: Python 3.x # #########################################################################################... | 2.528478 | 3 |
malaya_speech/model/__init__.py | techthiyanes/malaya-speech | 0 | 6625185 | <gh_stars>0
# Malaya-Speech, Speech-Toolkit library for bahasa Malaysia
#
# Copyright (C) 2019 Malaya Project
# Licensed under the MIT License
# Author: huseinzol05 <<EMAIL>>
# URL: <https://malaya-speech.readthedocs.io/>
# For license information, see https://github.com/huseinzol05/malaya-speech/blob/master/LICENSE
| # Malaya-Speech, Speech-Toolkit library for bahasa Malaysia
#
# Copyright (C) 2019 Malaya Project
# Licensed under the MIT License
# Author: huseinzol05 <<EMAIL>>
# URL: <https://malaya-speech.readthedocs.io/>
# For license information, see https://github.com/huseinzol05/malaya-speech/blob/master/LICENSE | en | 0.463462 | # Malaya-Speech, Speech-Toolkit library for bahasa Malaysia # # Copyright (C) 2019 Malaya Project # Licensed under the MIT License # Author: huseinzol05 <<EMAIL>> # URL: <https://malaya-speech.readthedocs.io/> # For license information, see https://github.com/huseinzol05/malaya-speech/blob/master/LICENSE | 0.513157 | 1 |
duoquest/query.py | umich-dbgroup/duoquest | 4 | 6625186 | from numbers import Number
from .proto.duoquest_pb2 import *
from .schema import JoinEdge
from .external.process_sql import AGG_OPS, WHERE_OPS
def to_str_tribool(proto_tribool):
if proto_tribool == UNKNOWN:
return None
elif proto_tribool == TRUE:
return True
else:
return False
de... | from numbers import Number
from .proto.duoquest_pb2 import *
from .schema import JoinEdge
from .external.process_sql import AGG_OPS, WHERE_OPS
def to_str_tribool(proto_tribool):
if proto_tribool == UNKNOWN:
return None
elif proto_tribool == TRUE:
return True
else:
return False
de... | en | 0.624019 | # single table case, no aliases # range constraint # exact constraint # range constraint # exact constraint # if not set, default to 1 # escape apostrophes # tuples: (agg_col, tsq constraint) # tuples: (agg_col, tsq constraint) # nothing to verify! # Special Case: all aggregates and no group by, because SQLite does not... | 2.422475 | 2 |
astra/writers.py | hhslepicka/lume-astra | 0 | 6625187 | import numpy as np
from numbers import Number
import os
def namelist_lines(namelist_dict, name):
"""
Converts namelist dict to output lines, for writing to file.
Only allow scalars or lists.
Do not allow np arrays or any other types from simplicity.
"""
lines = []
lines.append('... | import numpy as np
from numbers import Number
import os
def namelist_lines(namelist_dict, name):
"""
Converts namelist dict to output lines, for writing to file.
Only allow scalars or lists.
Do not allow np arrays or any other types from simplicity.
"""
lines = []
lines.append('... | en | 0.717049 | Converts namelist dict to output lines, for writing to file. Only allow scalars or lists. Do not allow np arrays or any other types from simplicity. # parse #if type(value) == type(1) or type(value) == type(1.): # numbers # numbers # lists or np arrays # strings # input may need apostrophes #print 's... | 3.134382 | 3 |
michelanglo_protein/generate/__init__.py | matteoferla/protein-module-for-VENUS | 1 | 6625188 | <reponame>matteoferla/protein-module-for-VENUS
from ._protein_gatherer import ProteinGatherer
from ._proteome_gatherer import ProteomeGatherer
# | from ._protein_gatherer import ProteinGatherer
from ._proteome_gatherer import ProteomeGatherer
# | none | 1 | 1.034849 | 1 | |
ecomm/addresses/forms.py | aruntnp/MYPROJECTS | 0 | 6625189 | <filename>ecomm/addresses/forms.py
from django import forms
from .models import Address
class AddressForm(forms.ModelForm):
class Meta:
model = Address
fields = [
# 'billing_profile', # It should NOT display to user
# 'address_type', #This also come with logic
... | <filename>ecomm/addresses/forms.py
from django import forms
from .models import Address
class AddressForm(forms.ModelForm):
class Meta:
model = Address
fields = [
# 'billing_profile', # It should NOT display to user
# 'address_type', #This also come with logic
... | en | 0.79389 | # 'billing_profile', # It should NOT display to user # 'address_type', #This also come with logic | 2.27596 | 2 |
slack_bolt/middleware/message_listener_matches/async_message_listener_matches.py | Exhorder6/bolt-python | 0 | 6625190 | import re
from typing import Callable, Awaitable, Union, Pattern
from slack_bolt.request.async_request import AsyncBoltRequest
from slack_bolt.response import BoltResponse
from slack_bolt.middleware.async_middleware import AsyncMiddleware
class AsyncMessageListenerMatches(AsyncMiddleware):
def __init__(self, key... | import re
from typing import Callable, Awaitable, Union, Pattern
from slack_bolt.request.async_request import AsyncBoltRequest
from slack_bolt.response import BoltResponse
from slack_bolt.middleware.async_middleware import AsyncMiddleware
class AsyncMessageListenerMatches(AsyncMiddleware):
def __init__(self, key... | en | 0.744257 | Captures matched keywords and saves the values in context. # tuple or list # As the text doesn't match, skip running the listener | 2.37782 | 2 |
alipay/aop/api/domain/AlipayUserAgreementAuthApplyModel.py | snowxmas/alipay-sdk-python-all | 213 | 6625191 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayUserAgreementAuthApplyModel(object):
def __init__(self):
self._agreement_no = None
self._auth_confirm_type = None
self._auth_scene = None
@property
def agre... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayUserAgreementAuthApplyModel(object):
def __init__(self):
self._agreement_no = None
self._auth_confirm_type = None
self._auth_scene = None
@property
def agre... | en | 0.352855 | #!/usr/bin/env python # -*- coding: utf-8 -*- | 2.040171 | 2 |
makahiki/apps/widgets/home/tests.py | justinslee/Wai-Not-Makahiki | 1 | 6625192 | <reponame>justinslee/Wai-Not-Makahiki
"""
home page tests
"""
import json
import datetime
from django.test import TransactionTestCase
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from apps.managers.challenge_mgr import challenge_mgr
from apps.managers.challenge_mgr.models i... | """
home page tests
"""
import json
import datetime
from django.test import TransactionTestCase
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from apps.managers.challenge_mgr import challenge_mgr
from apps.managers.challenge_mgr.models import RoundSetting
from apps.managers... | en | 0.904426 | home page tests Home Test Case. Check that we can load the index. competition middleware test. Check that the user is redirected before the competition starts. Check that the user is redirected after the competition ends. setup widzard test cases. setup. # create the term help-topic # create the setup activity Check th... | 2.220437 | 2 |
loop-example.py | eltechno/python_course | 4 | 6625193 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 11 11:03:16 2019
@author: techno
"""
number = 0
result = 0
i = 0
while i < 4:
number = int (input ("Please type a number then i will add :"))
result += number
i += 1
# ====================================================================... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 11 11:03:16 2019
@author: techno
"""
number = 0
result = 0
i = 0
while i < 4:
number = int (input ("Please type a number then i will add :"))
result += number
i += 1
# ====================================================================... | en | 0.473555 | #!/usr/bin/env python3 # -*- coding: utf-8 -*- Created on Mon Feb 11 11:03:16 2019 @author: techno # ============================================================================= # loop while # ============================================================================= | 4.126171 | 4 |
djangocms_personlist/admin.py | kohout/djangocms-getaweb-personlist | 0 | 6625194 | from django.contrib import admin
from django.utils.translation import ugettext as _
from mptt.admin import MPTTModelAdmin
from .models import Team, Person, Membership, PersonImage
from easy_thumbnails.exceptions import InvalidImageFormatError
from adminsortable.admin import SortableInlineAdminMixin
class PreviewMixin... | from django.contrib import admin
from django.utils.translation import ugettext as _
from mptt.admin import MPTTModelAdmin
from .models import Team, Person, Membership, PersonImage
from easy_thumbnails.exceptions import InvalidImageFormatError
from adminsortable.admin import SortableInlineAdminMixin
class PreviewMixin... | none | 1 | 1.929153 | 2 | |
plurkenv.py | chickenzord/plurk-cli | 6 | 6625195 | import os
from plurk_oauth.PlurkAPI import PlurkAPI
from os.path import join, dirname
from dotenv import load_dotenv
dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dotenv_path)
CONSUMER_KEY = os.environ.get("CONSUMER_KEY")
CONSUMER_SECRET = os.environ.get("CONSUMER_SECRET")
APP_TOKEN = os.environ.get("APP_... | import os
from plurk_oauth.PlurkAPI import PlurkAPI
from os.path import join, dirname
from dotenv import load_dotenv
dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dotenv_path)
CONSUMER_KEY = os.environ.get("CONSUMER_KEY")
CONSUMER_SECRET = os.environ.get("CONSUMER_SECRET")
APP_TOKEN = os.environ.get("APP_... | none | 1 | 2.111176 | 2 | |
deepstream/app/utils/misc.py | ml6team/deepstream-python | 21 | 6625196 | <reponame>ml6team/deepstream-python<filename>deepstream/app/utils/misc.py
import ctypes
import sys
sys.path.append('/opt/nvidia/deepstream/deepstream/lib')
def long_to_int(long):
value = ctypes.c_int(long & 0xffffffff).value
return value
| import ctypes
import sys
sys.path.append('/opt/nvidia/deepstream/deepstream/lib')
def long_to_int(long):
value = ctypes.c_int(long & 0xffffffff).value
return value | none | 1 | 2.007619 | 2 | |
deploy_nltk.py | wolfsinem/product-tagging | 0 | 6625197 | <filename>deploy_nltk.py
"""
This file is only for the deployment of the tags generator based on the input
text given by the user. We will use the NLTK library for this http://www.nltk.org/howto/
"""
from collections import Counter
from nltk.corpus import stopwords
import nltk
# First we import the tokenize_string ... | <filename>deploy_nltk.py
"""
This file is only for the deployment of the tags generator based on the input
text given by the user. We will use the NLTK library for this http://www.nltk.org/howto/
"""
from collections import Counter
from nltk.corpus import stopwords
import nltk
# First we import the tokenize_string ... | en | 0.84611 | This file is only for the deployment of the tags generator based on the input text given by the user. We will use the NLTK library for this http://www.nltk.org/howto/ # First we import the tokenize_string function we made in the tags_generator.py # file and use this to split the given input string into substrings usin... | 3.635355 | 4 |
bootstrapeg.py | lessen/src | 0 | 6625198 | from eg import eg
from random import random as r
from bootstrap import bootstrap as bst
from time import process_time as now
import random
def base0(n):
return [r() for _ in range(n)]
@eg
def _b0(n=30,div=100, boo=bst,same=None,f=base0):
print(boo.__name__)
base = f(n)
same0 = None
t0 = None
... | from eg import eg
from random import random as r
from bootstrap import bootstrap as bst
from time import process_time as now
import random
def base0(n):
return [r() for _ in range(n)]
@eg
def _b0(n=30,div=100, boo=bst,same=None,f=base0):
print(boo.__name__)
base = f(n)
same0 = None
t0 = None
... | none | 1 | 2.517369 | 3 | |
net/migrations/0012_auto_20170701_1535.py | dehu4ka/lna | 0 | 6625199 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-01 10:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('net', '0011_credentials_equipment'),
]
operations = [
migrations.AlterField... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-01 10:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('net', '0011_credentials_equipment'),
]
operations = [
migrations.AlterField... | en | 0.727278 | # -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-01 10:35 | 1.533723 | 2 |
fragbuilder/bio_pdb/Model.py | larsbratholm/fragbuilder | 0 | 6625200 | <filename>fragbuilder/bio_pdb/Model.py
# Copyright (C) 2002, <NAME> (<EMAIL>)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Model class, used in Structure objects."""
from .Entity import Enti... | <filename>fragbuilder/bio_pdb/Model.py
# Copyright (C) 2002, <NAME> (<EMAIL>)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Model class, used in Structure objects."""
from .Entity import Enti... | en | 0.93612 | # Copyright (C) 2002, <NAME> (<EMAIL>) # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. Model class, used in Structure objects. The object representing a model in a structure. In a structure derive... | 3.035362 | 3 |
src/BehaviorTaskMaster/emotionTasks/emotionStim/emotionstimtask.py | FongAnthonyM/BehaviorTaskMaster | 0 | 6625201 | <reponame>FongAnthonyM/BehaviorTaskMaster
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" emotionstimtask.py
Description:
"""
__author__ = "<NAME>"
__copyright__ = "Copyright 2019, <NAME>"
__credits__ = ["<NAME>"]
__license__ = ""
__version__ = "1.0.0"
__maintainer__ = "<NAME>"
__email__ = ""
__status__ = "Prototype"... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" emotionstimtask.py
Description:
"""
__author__ = "<NAME>"
__copyright__ = "Copyright 2019, <NAME>"
__credits__ = ["<NAME>"]
__license__ = ""
__version__ = "1.0.0"
__maintainer__ = "<NAME>"
__email__ = ""
__status__ = "Prototype"
# Default Libraries #
import sys
import ... | en | 0.319973 | #!/usr/bin/env python # -*- coding: utf-8 -*- emotionstimtask.py Description: # Default Libraries # # Downloaded Libraries # # Local Libraries # # Definitions # # Constants # # Classes # # Make Row Objects # Row Settings # self.ui.completedBlocks.setDragDropMode(QAbstractItemView.InternalMove) # self.ui.completedBlocks... | 1.902498 | 2 |
application/workprogramsapp/files_export/views.py | ValeriyaArt/analytics_backend | 1 | 6625202 | <filename>application/workprogramsapp/files_export/views.py
import datetime
from docxtpl import DocxTemplate
from django.http import HttpResponse
from collections import OrderedDict
from rest_framework import generics
from rest_framework.permissions import IsAuthenticated
import html2text
from ..models import Ac... | <filename>application/workprogramsapp/files_export/views.py
import datetime
from docxtpl import DocxTemplate
from django.http import HttpResponse
from collections import OrderedDict
from rest_framework import generics
from rest_framework.permissions import IsAuthenticated
import html2text
from ..models import Ac... | ru | 0.949792 | Скачивание рпд в формате docx/pdf Функция, которая возвращает context с параметрами для шаблона Данные для таблицы планирования результатов обучения по дисциплине (БаРС) Контроллер для выгрузки docx-файла РПД Возвращает РПД в формате docx в браузере # tpl.save('/application/'+str(filename)) #-- сохранение в папку локал... | 2.188554 | 2 |
4-3-2.py | MasazI/python-r-stan-bayesian-model | 2 | 6625203 | ###############
#
# Transform R to Python Copyright (c) 2019 <NAME> Released under the MIT license
#
###############
import os
import numpy as np
import pystan
import pandas
import pickle
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.preprocessing import LabelEncoder
fish_num_climate_4 = pandas.... | ###############
#
# Transform R to Python Copyright (c) 2019 <NAME> Released under the MIT license
#
###############
import os
import numpy as np
import pystan
import pandas
import pickle
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.preprocessing import LabelEncoder
fish_num_climate_4 = pandas.... | en | 0.580876 | ############### # # Transform R to Python Copyright (c) 2019 <NAME> Released under the MIT license # ############### # creating teamID # sm = pystan.StanModel(file='4-3-1-poisson-glmm.stan') # a model using prior for mu and sigma. # saving compiled model # visualization | 3.099433 | 3 |
app/migrations/versions/097d6eedce34.py | UWA-CITS3200-18-2021/ReSQ | 1 | 6625204 | """empty message
Revision ID: 097d6eedce34
Revises:
Create Date: 2021-09-18 07:55:41.307362
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '097d6eed<PASSWORD>4'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands au... | """empty message
Revision ID: 097d6eedce34
Revises:
Create Date: 2021-09-18 07:55:41.307362
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '097d6eed<PASSWORD>4'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands au... | en | 0.480807 | empty message Revision ID: 097d6eedce34 Revises: Create Date: 2021-09-18 07:55:41.307362 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### | 1.85467 | 2 |
johnny/transaction.py | bennylope/johnny-cache | 124 | 6625205 | <filename>johnny/transaction.py
from django.db import transaction, connection, DEFAULT_DB_ALIAS
from johnny import settings as johnny_settings
from johnny.compat import is_managed
from johnny.decorators import wraps, available_attrs
class TransactionManager(object):
"""
TransactionManager is a wrapper around... | <filename>johnny/transaction.py
from django.db import transaction, connection, DEFAULT_DB_ALIAS
from johnny import settings as johnny_settings
from johnny.compat import is_managed
from johnny.decorators import wraps, available_attrs
class TransactionManager(object):
"""
TransactionManager is a wrapper around... | en | 0.872179 | TransactionManager is a wrapper around a cache_backend that is transaction aware. If we are in a transaction, it will return the locally cached version. * On rollback, it will flush all local caches * On commit, it will push them up to the real shared cache backend (ex. memcached). Set wil... | 2.314808 | 2 |
pyelliptic/openssl.py | sharpbitmessage/PyBitmessage | 1 | 6625206 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 <NAME> <<EMAIL>>
# See LICENSE for details.
#
# Software slightly changed by <NAME> <bitmessage at-symbol jonwarren.org>
import sys
import ctypes
OpenSSL = None
class CipherName:
def __init__(self, name, pointer, blocksize):
self._na... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 <NAME> <<EMAIL>>
# See LICENSE for details.
#
# Software slightly changed by <NAME> <bitmessage at-symbol jonwarren.org>
import sys
import ctypes
OpenSSL = None
class CipherName:
def __init__(self, name, pointer, blocksize):
self._na... | en | 0.571502 | #!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 <NAME> <<EMAIL>> # See LICENSE for details. # # Software slightly changed by <NAME> <bitmessage at-symbol jonwarren.org> Wrapper for OpenSSL using ctypes Build the wrapper # Cipher #self.EVP_aes_128_ctr = self._lib.EVP_aes_128_ctr #self.EVP_aes_128_c... | 2.812258 | 3 |
python/input2.py | pawankakani/coding | 0 | 6625207 | <gh_stars>0
age = int(input("Enter your age :")) ## <1>
temperature = float(input("Enter today's temperature :")) ## <2>
print("Your age is :", age)
print("Today's temperature is :", temperature)
| age = int(input("Enter your age :")) ## <1>
temperature = float(input("Enter today's temperature :")) ## <2>
print("Your age is :", age)
print("Today's temperature is :", temperature) | eu | 0.164461 | ## <1> ## <2> | 4.284155 | 4 |
braindecode/datasets/sensor_positions.py | gemeinl/braindecode | 3 | 6625208 | <gh_stars>1-10
import numpy as np
import math
CHANNEL_10_20_APPROX = ('angle',
('Fpz',(0.000, 4.000)),
('Fp1',(-3.500, 3.500)),
('Fp2',(3.500, 3.500)),
('AFp3h',(-1.000, 3.500)),
('AFp4h',(1.000, 3.500)),
('AF7',(-4.000, 3.000)),
('AF3',(-2.000, 3.000)),
('AFz',(0.000, 3.000)),
('A... | import numpy as np
import math
CHANNEL_10_20_APPROX = ('angle',
('Fpz',(0.000, 4.000)),
('Fp1',(-3.500, 3.500)),
('Fp2',(3.500, 3.500)),
('AFp3h',(-1.000, 3.500)),
('AFp4h',(1.000, 3.500)),
('AF7',(-4.000, 3.000)),
('AF3',(-2.000, 3.000)),
('AFz',(0.000, 3.000)),
('AF4',(2.000, 3.0... | en | 0.647482 | # notsure if correct: Return the x/y position of a channel. This method calculates the stereographic projection of a channel from ``CHANNEL_10_20``, suitable for a scalp plot. Parameters ---------- channame : str Name of the channel, the search is case insensitive. chan_pos_list=CHANN... | 1.721162 | 2 |
setup.py | daanknoope/pgmpy | 0 | 6625209 | <filename>setup.py
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="pgmpy",
version="0.1.7",
description="A library for Probabilistic Graphical Models",
packages=find_packages(exclude=['tests']),
author="<NAME>",
author_email="<EMAIL>",
url="https://github.co... | <filename>setup.py
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="pgmpy",
version="0.1.7",
description="A library for Probabilistic Graphical Models",
packages=find_packages(exclude=['tests']),
author="<NAME>",
author_email="<EMAIL>",
url="https://github.co... | fr | 0.221828 | #!/usr/bin/env python3 | 1.473954 | 1 |
src/ggrc_basic_permissions/migrations/versions/20130920154201_5b33357784a_assign_user_role_to_.py | Killswitchz/ggrc-core | 1 | 6625210 | <reponame>Killswitchz/ggrc-core<gh_stars>1-10
# Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Assign User role to all existing users.
Revision ID: 5b33357784a
Revises: <KEY>
Create Date: 2013-09-20 15:42:01.558543
"""
# revision identifiers, used by... | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Assign User role to all existing users.
Revision ID: 5b33357784a
Revises: <KEY>
Create Date: 2013-09-20 15:42:01.558543
"""
# revision identifiers, used by Alembic.
revision = '5b33357784a'
down_revisi... | en | 0.703553 | # Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> Assign User role to all existing users. Revision ID: 5b33357784a Revises: <KEY> Create Date: 2013-09-20 15:42:01.558543 # revision identifiers, used by Alembic. #FIXME this could be done better in a more rec... | 1.969402 | 2 |
tensorflow_probability/python/bijectors/hypothesis_testlib.py | axch/probability | 0 | 6625211 | <reponame>axch/probability
# Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | en | 0.787911 | # Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o... | 2.066301 | 2 |
dataset_loading/load_datasets.py | matthewbehrend/BNC | 4 | 6625212 | <reponame>matthewbehrend/BNC
import os
from dataset_loading.officehome import OfficeHomeArt, OfficeHomeClipart, OfficeHomeProduct, OfficeHomeReal
from dataset_loading.dataset import DatasetGroup
import numpy as np
from mxnet import gluon
from mxnet.gluon.data import ArrayDataset
class OfficeHomeDatasets(object):
... | import os
from dataset_loading.officehome import OfficeHomeArt, OfficeHomeClipart, OfficeHomeProduct, OfficeHomeReal
from dataset_loading.dataset import DatasetGroup
import numpy as np
from mxnet import gluon
from mxnet.gluon.data import ArrayDataset
class OfficeHomeDatasets(object):
def __init__(self, useRes... | none | 1 | 2.310858 | 2 | |
HelloWorld/Python01/Core Python Applications Programming 3rd/ch10/friendsC.py | grtlinux/KieaPython | 1 | 6625213 | #!/usr/bin/env python
import cgi
from urllib import quote_plus
header = 'Content-Type: text/html\n\n'
url = '/cgi-bin/friendsC.py'
errhtml = '''<HTML><HEAD><TITLE>
Friends CGI Demo</TITLE></HEAD>
<BODY><H3>ERROR</H3>
<B>%s</B><P>
<FORM><INPUT TYPE=button VALUE=Back
ONCLICK="window.history.back()"></FORM... | #!/usr/bin/env python
import cgi
from urllib import quote_plus
header = 'Content-Type: text/html\n\n'
url = '/cgi-bin/friendsC.py'
errhtml = '''<HTML><HEAD><TITLE>
Friends CGI Demo</TITLE></HEAD>
<BODY><H3>ERROR</H3>
<B>%s</B><P>
<FORM><INPUT TYPE=button VALUE=Back
ONCLICK="window.history.back()"></FORM... | en | 0.32823 | #!/usr/bin/env python <HTML><HEAD><TITLE>
Friends CGI Demo</TITLE></HEAD>
<BODY><H3>ERROR</H3>
<B>%s</B><P>
<FORM><INPUT TYPE=button VALUE=Back
ONCLICK="window.history.back()"></FORM>
</BODY></HTML> <HTML><HEAD><TITLE>
Friends CGI Demo</TITLE></HEAD>
<BODY><H3>Friends list for: <I>%s</I></H3>
<FORM ACTION="%s"... | 3.491135 | 3 |
domonic/constants/entities.py | Jordan-Cottle/domonic | 1 | 6625214 | """
domonic.constants.entities
====================================
"""
class Entity():
def __init__(self, entity: str):
self.entity = entity
def __str__(self):
import html
return html.unescape(self.character)
class Char():
def __init__(self, character: str):
... | """
domonic.constants.entities
====================================
"""
class Entity():
def __init__(self, entity: str):
self.entity = entity
def __str__(self):
import html
return html.unescape(self.character)
class Char():
def __init__(self, character: str):
... | ja | 0.398194 | domonic.constants.entities ==================================== # def __repr__(self): # return self.character # web # ASCII Characters (Printable) #32;' #33;' #: ! #34;' #: " #35;' #: # #36;' #: $ #37;' #: % #: & #39;' #: ' #40;' #: ( #40;' #: ( #41;' #: ) #41;' #: ) #42;' #: * #43;' #: + #44;' #: ... | 2.963118 | 3 |
scripts/postprocess_midas_data.py | sarahbald/BIG_2021_microbiome_evolution | 0 | 6625215 | <reponame>sarahbald/BIG_2021_microbiome_evolution<filename>scripts/postprocess_midas_data.py
#!/usr/bin/env python
### This script runs the necessary post-processing of the MIDAS output so that we can start analyzing
import os
import sys
import parse_midas_data
#########################################################... | #!/usr/bin/env python
### This script runs the necessary post-processing of the MIDAS output so that we can start analyzing
import os
import sys
import parse_midas_data
########################################################################################
#
# Standard header to read in argument information
#
#######... | en | 0.469975 | #!/usr/bin/env python ### This script runs the necessary post-processing of the MIDAS output so that we can start analyzing ######################################################################################## # # Standard header to read in argument information # #####################################################... | 2.644365 | 3 |
src/VioNet/models/anomaly_detector.py | davidGCR/VioDenseDuplication | 3 | 6625216 | import torch
from torch import nn
class AnomalyDetector(nn.Module):
def __init__(self, input_dim=4096):
super(AnomalyDetector, self).__init__()
self.fc1 = nn.Linear(input_dim, 128) #original was 512
self.relu1 = nn.ReLU()
self.dropout1 = nn.Dropout(0.6)
self.fc2 = nn.Linea... | import torch
from torch import nn
class AnomalyDetector(nn.Module):
def __init__(self, input_dim=4096):
super(AnomalyDetector, self).__init__()
self.fc1 = nn.Linear(input_dim, 128) #original was 512
self.relu1 = nn.ReLU()
self.dropout1 = nn.Dropout(0.6)
self.fc2 = nn.Linea... | en | 0.794814 | #original was 512 # In the original keras code they use "glorot_normal" # As I understand, this is the same as xavier normal in Pytorch # x = self.dropout1(x) # x = self.dropout1(self.relu1(self.fc1(x))) # loss # Our loss is defined with respect to l2 regularization, as used in the original keras code # print("y_true:"... | 3.024478 | 3 |
src/sfctl/helps/cluster_upgrade.py | mrdakj/service-fabric-cli | 17 | 6625217 | # -----------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
""... | # -----------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
""... | en | 0.854071 | # ----------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- Hel... | 1.520553 | 2 |
src/smach_actionlib.py | josuearaujo/sistema-alocador-para-robos | 2 | 6625218 | <filename>src/smach_actionlib.py<gh_stars>1-10
#!/usr/bin/env python
import roslib; roslib.load_manifest('smach_ros')
import rospy
import rostest
import unittest
from actionlib import *
from actionlib.msg import *
from smach import *
from smach_ros import *
from smach_msgs.msg import *
# Static goals
g1 = TestGoa... | <filename>src/smach_actionlib.py<gh_stars>1-10
#!/usr/bin/env python
import roslib; roslib.load_manifest('smach_ros')
import rospy
import rostest
import unittest
from actionlib import *
from actionlib.msg import *
from smach import *
from smach_ros import *
from smach_msgs.msg import *
# Static goals
g1 = TestGoa... | en | 0.687828 | #!/usr/bin/env python # Static goals # This goal should succeed # This goal should abort # This goal should be rejected # ## Test harness Test simple action states # Test single goal policy # Test goal callback # Test overriding goal policies # Test result policies Test action server wrapper. Test action preemption Tes... | 2.037288 | 2 |
upcloud_api/cloud_manager/ip_address_mixin.py | akx/upcloud-python-api | 0 | 6625219 | <filename>upcloud_api/cloud_manager/ip_address_mixin.py
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import six
from upcloud_api import IPAddress
class IPManager(object):
"""
Functions for managing IP-add... | <filename>upcloud_api/cloud_manager/ip_address_mixin.py
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import six
from upcloud_api import IPAddress
class IPManager(object):
"""
Functions for managing IP-add... | en | 0.790552 | Functions for managing IP-addresses. Intended to be used as a mixin for CloudManager. Get an IPAddress object with the IP address (string) from the API. e.g manager.get_ip('192.168.3.11') Get all IPAddress objects from the API. Attach a new (random) IPAddress to the given server (object or UUID). Modify an IP ... | 2.720425 | 3 |
python/rgz.py | willettk/rgz-analysis | 3 | 6625220 | <reponame>willettk/rgz-analysis<gh_stars>1-10
# import necessary python packages
import numpy as np
import pandas as pd
import datetime
import os
from scipy.ndimage.filters import maximum_filter
from scipy.ndimage.morphology import generate_binary_structure, binary_erosion
from collections import Counter
from matplotl... | # import necessary python packages
import numpy as np
import pandas as pd
import datetime
import os
from scipy.ndimage.filters import maximum_filter
from scipy.ndimage.morphology import generate_binary_structure, binary_erosion
from collections import Counter
from matplotlib import pyplot as plt
from pymongo import Mo... | en | 0.734163 | # import necessary python packages #from astropy import coordinates as coord #from astropy.io import votable #------------------------------------------------------------------------------------------------------------ # Setup path locations # Set constants # date of beta release (YYY,MM,DD,HH,MM,SS,MS) # number of pix... | 2.144907 | 2 |
libs/mediafile.py | magne4000/festival | 14 | 6625221 | # This file is part of beets.
# Copyright 2015, <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, ... | # This file is part of beets.
# Copyright 2015, <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, ... | en | 0.8037 | # This file is part of beets. # Copyright 2015, <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, ... | 2.221781 | 2 |
test/container.py | fjudith/microservices-demo-orders | 1 | 6625222 | <reponame>fjudith/microservices-demo-orders
import argparse
import sys
import unittest
import os
import urllib
from util.Api import Api
from time import sleep
from util.Docker import Docker
from util.Dredd import Dredd
class ServiceMock:
container_name = ''
hostname = ''
def start_container(self):
... | import argparse
import sys
import unittest
import os
import urllib
from util.Api import Api
from time import sleep
from util.Docker import Docker
from util.Dredd import Dredd
class ServiceMock:
container_name = ''
hostname = ''
def start_container(self):
command = ['docker', 'run', '-d',
... | en | 0.44491 | # Now set the sys.argv to the unittest_args (leaving sys.argv[0] alone) | 2.19538 | 2 |
webapp/api/api/forms.py | susheel/MedCATtrainer | 0 | 6625223 | from django.db.models.signals import post_save
from django.dispatch import receiver
from .data_utils import *
# Extract text from the uploaded dataset
@receiver(post_save, sender=Dataset)
def save_dataset(sender, instance, **kwargs):
text_from_csv(instance)
| from django.db.models.signals import post_save
from django.dispatch import receiver
from .data_utils import *
# Extract text from the uploaded dataset
@receiver(post_save, sender=Dataset)
def save_dataset(sender, instance, **kwargs):
text_from_csv(instance)
| en | 0.985072 | # Extract text from the uploaded dataset | 1.877985 | 2 |
evogtk/gui/shortcuts.py | R3v1L/evogtk | 0 | 6625224 | # -*- coding: utf-8 -*-
###############################################################################
# Copyright (C) 2008 EVO Sistemas Libres <<EMAIL>>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fou... | # -*- coding: utf-8 -*-
###############################################################################
# Copyright (C) 2008 EVO Sistemas Libres <<EMAIL>>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fou... | en | 0.540113 | # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2008 EVO Sistemas Libres <<EMAIL>> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Fou... | 1.598224 | 2 |
sdk/python/pulumi_aws/ec2/network_acl_rule.py | dixler/pulumi-aws | 0 | 6625225 | <gh_stars>0
# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
... | # 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Networ... | en | 0.680281 | # 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! *** The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ). Indicates whether this is an egress rule (rule is app... | 1.857607 | 2 |
app/email.py | itsuprun/db_coursework | 0 | 6625226 | <gh_stars>0
from flask_mail import Message
from app import app,mail
from threading import Thread
from flask import render_template, flash, redirect, url_for, request
from flask_login import current_user, login_user, logout_user, login_required
def send_async_email(app, msg):
with app.app_context():
mail.s... | from flask_mail import Message
from app import app,mail
from threading import Thread
from flask import render_template, flash, redirect, url_for, request
from flask_login import current_user, login_user, logout_user, login_required
def send_async_email(app, msg):
with app.app_context():
mail.send(msg)
d... | none | 1 | 2.606474 | 3 | |
pyscripts/preprocess/stanford_scenes_down_sample.py | Twofyw/Adversarial_Structure_Matching | 11 | 6625227 | """Helper scripts to down-sample Stanford 2D3DS dataset.
"""
import os
import argparse
import PIL.Image as Image
import numpy as np
import cv2
def parse_args():
"""Parsse Command Line Arguments.
"""
parser = argparse.ArgumentParser(
description='Helper scripts to down-sample Stanford 2D3DS')
parser.add... | """Helper scripts to down-sample Stanford 2D3DS dataset.
"""
import os
import argparse
import PIL.Image as Image
import numpy as np
import cv2
def parse_args():
"""Parsse Command Line Arguments.
"""
parser = argparse.ArgumentParser(
description='Helper scripts to down-sample Stanford 2D3DS')
parser.add... | en | 0.615878 | Helper scripts to down-sample Stanford 2D3DS dataset. Parsse Command Line Arguments. Down-sample RGB and Surface Normal. | 2.784556 | 3 |
Incident-Response/Tools/cyphon/cyphon/contexts/serializers.py | sn0b4ll/Incident-Playbook | 1 | 6625228 | <reponame>sn0b4ll/Incident-Playbook<gh_stars>1-10
# -*- coding: utf-8 -*-
# Copyright 2017-2019 ControlScan, Inc.
#
# This file is part of Cyphon Engine.
#
# Cyphon Engine is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software F... | # -*- coding: utf-8 -*-
# Copyright 2017-2019 ControlScan, Inc.
#
# This file is part of Cyphon Engine.
#
# Cyphon Engine is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# Cyphon En... | en | 0.830032 | # -*- coding: utf-8 -*- # Copyright 2017-2019 ControlScan, Inc. # # This file is part of Cyphon Engine. # # Cyphon Engine is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # Cyphon En... | 1.85911 | 2 |
authentik/core/tests/test_applications_views.py | BeryJu/passbook | 15 | 6625229 | <reponame>BeryJu/passbook
"""Test Applications API"""
from unittest.mock import MagicMock, patch
from django.urls import reverse
from authentik.core.models import Application
from authentik.core.tests.utils import create_test_admin_user, create_test_tenant
from authentik.flows.models import Flow, FlowDesignation
from... | """Test Applications API"""
from unittest.mock import MagicMock, patch
from django.urls import reverse
from authentik.core.models import Application
from authentik.core.tests.utils import create_test_admin_user, create_test_tenant
from authentik.flows.models import Flow, FlowDesignation
from authentik.flows.tests imp... | en | 0.668988 | Test Applications API Test applications Views Test redirect Test redirect | 2.257434 | 2 |
bin/cpu_monitor.py | lavarock1234/ros-system-monitor | 0 | 6625230 | #!/usr/bin/env python3
############################################################################
# Copyright (C) 2009, <NAME>, Inc. #
# Copyright (C) 2013 by <NAME> #
# <EMAIL> #
# Copyright (C) ... | #!/usr/bin/env python3
############################################################################
# Copyright (C) 2009, <NAME>, Inc. #
# Copyright (C) 2013 by <NAME> #
# <EMAIL> #
# Copyright (C) ... | en | 0.672495 | #!/usr/bin/env python3 ############################################################################ # Copyright (C) 2009, <NAME>, Inc. # # Copyright (C) 2013 by <NAME> # # <EMAIL> # # Copyright (C) ... | 1.11579 | 1 |
notebooks/_solutions/pandas_03_selecting_data49.py | rprops/Python_DS-WS | 65 | 6625231 | len(titles[(titles['year'] >= 1950) & (titles['year'] <= 1959)]) | len(titles[(titles['year'] >= 1950) & (titles['year'] <= 1959)]) | none | 1 | 2.118747 | 2 | |
setup.py | helmholtz-analytics/heat | 105 | 6625232 | from setuptools import setup, find_packages
import codecs
with codecs.open("README.md", "r", "utf-8") as handle:
long_description = handle.read()
__version__ = None # appeases flake, assignment in exec() below
with open("./heat/core/version.py") as handle:
exec(handle.read())
setup(
name="heat",
pa... | from setuptools import setup, find_packages
import codecs
with codecs.open("README.md", "r", "utf-8") as handle:
long_description = handle.read()
__version__ = None # appeases flake, assignment in exec() below
with open("./heat/core/version.py") as handle:
exec(handle.read())
setup(
name="heat",
pa... | en | 0.855119 | # appeases flake, assignment in exec() below | 1.556808 | 2 |
python_raster_functions/PyTorch/FeatureClassifier.py | ArcGIS/raster-deep-learning | 154 | 6625233 | <filename>python_raster_functions/PyTorch/FeatureClassifier.py
from __future__ import division
import os
import sys
import json
import warnings
from fastai.vision import *
from torchvision import models as torchvision_models
import arcgis
from arcgis.learn import FeatureClassifier
import arcpy
import torch
f... | <filename>python_raster_functions/PyTorch/FeatureClassifier.py
from __future__ import division
import os
import sys
import json
import warnings
from fastai.vision import *
from torchvision import models as torchvision_models
import arcgis
from arcgis.learn import FeatureClassifier
import arcpy
import torch
f... | en | 0.77833 | # Using arcgis.learn FeatureClassifer from_model function. # CropSizeFixed is a boolean value parameter (1 or 0) in the emd file, representing whether the size of # tile cropped around the feature is fixed or not. # 1 -- fixed tile size, crop fixed size tiles centered on the feature. The tile can be bigger or smaller #... | 2.579615 | 3 |
vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_state_input_model.py | kenkuo/azure-devops-python-api | 0 | 6625234 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | en | 0.439933 | # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------... | 1.926133 | 2 |
PyTrinamic/referencedesigns/TMC4671_LEV/TMC4671_LEV_REF.py | bmoneke/PyTrinamic | 37 | 6625235 | <reponame>bmoneke/PyTrinamic
'''
Created on 08.01.2021
@author: ED
'''
import PyTrinamic
" interfaces "
from PyTrinamic.modules.tmcl_module_interface import tmcl_module_interface
from PyTrinamic.modules.tmcl_motor_interface import tmcl_motor_interface
" features "
from PyTrinamic.modules.features.open_loop_ap_featu... | '''
Created on 08.01.2021
@author: ED
'''
import PyTrinamic
" interfaces "
from PyTrinamic.modules.tmcl_module_interface import tmcl_module_interface
from PyTrinamic.modules.tmcl_motor_interface import tmcl_motor_interface
" features "
from PyTrinamic.modules.features.open_loop_ap_feature import open_loop_ap_featur... | en | 0.394564 | Created on 08.01.2021 @author: ED | 2.440171 | 2 |
idb/common/types.py | isabella232/idb | 0 | 6625236 | <gh_stars>0
#!/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 asyncio
import json
from abc import ABC, abstractmethod, abstractproperty
from dataclasses import as... | #!/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 asyncio
import json
from abc import ABC, abstractmethod, abstractproperty
from dataclasses import asdict, datacl... | en | 0.860955 | #!/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. # pyre-fixme # pyre-fixme # Exposes the resource-specific commands that imply a connected companion | 1.891842 | 2 |
lando_util/organize_project/tests/test_organizer.py | Duke-GCB/lando-util | 0 | 6625237 | from unittest import TestCase
from unittest.mock import patch, Mock, call, mock_open, create_autospec
from lando_util.organize_project.organizer import write_data_to_file, Settings, ProjectData, Organizer
import json
import os
class TestOrganizerFuncs(TestCase):
def test_write_data_to_file(self):
mocked_o... | from unittest import TestCase
from unittest.mock import patch, Mock, call, mock_open, create_autospec
from lando_util.organize_project.organizer import write_data_to_file, Settings, ProjectData, Organizer
import json
import os
class TestOrganizerFuncs(TestCase):
def test_write_data_to_file(self):
mocked_o... | none | 1 | 2.589783 | 3 | |
drl/agents/heads/action_value_heads.py | lucaslingle/pytorch_drl | 0 | 6625238 | <filename>drl/agents/heads/action_value_heads.py<gh_stars>0
"""
Action-value prediction heads.
"""
from typing import Mapping, Any, Type, Callable, Optional
import abc
import torch as tc
from drl.agents.heads.abstract import Head
from drl.agents.architectures.stateless.abstract import HeadEligibleArchitecture
clas... | <filename>drl/agents/heads/action_value_heads.py<gh_stars>0
"""
Action-value prediction heads.
"""
from typing import Mapping, Any, Type, Callable, Optional
import abc
import torch as tc
from drl.agents.heads.abstract import Head
from drl.agents.architectures.stateless.abstract import HeadEligibleArchitecture
clas... | en | 0.66272 | Action-value prediction heads. Abstract class for action-value prediction heads. Abstract class for simple action-value prediction heads (as opposed to distributional). Abstract class for distributional action-value prediction heads. Reference: <NAME> et al., 2017 - 'A Distributional Perspe... | 2.411965 | 2 |
appCore/apps/replica/contrib/micro/serializers.py | jadedgamer/alifewellplayed.com | 4 | 6625239 | from rest_framework import serializers
from .models import Timeline, Note
class TimelineSerializer(serializers.ModelSerializer):
user = serializers.ReadOnlyField(source='user.username')
api_url = serializers.HyperlinkedIdentityField(view_name='rest_replica:micro-timeline-note-list', lookup_field='slug')
c... | from rest_framework import serializers
from .models import Timeline, Note
class TimelineSerializer(serializers.ModelSerializer):
user = serializers.ReadOnlyField(source='user.username')
api_url = serializers.HyperlinkedIdentityField(view_name='rest_replica:micro-timeline-note-list', lookup_field='slug')
c... | en | 0.360055 | #timeline = TimelineSerializer(many=False, required=False) | 2.048605 | 2 |
cm/chef_api.py | tombh/deis | 1 | 6625240 | <reponame>tombh/deis
"""
Classes and functions for interacting with OpsCode Chef.
This file derives from pyChef: https://github.com/coderanger/pychef
"""
import base64
import datetime
import hashlib
import httplib
import json
import re
import time
import urlparse
from chef_rsa import Key
def ruby_b64encode(value):... | """
Classes and functions for interacting with OpsCode Chef.
This file derives from pyChef: https://github.com/coderanger/pychef
"""
import base64
import datetime
import hashlib
import httplib
import json
import re
import time
import urlparse
from chef_rsa import Key
def ruby_b64encode(value):
"""The Ruby func... | en | 0.585471 | Classes and functions for interacting with OpsCode Chef. This file derives from pyChef: https://github.com/coderanger/pychef The Ruby function Base64.encode64 automatically breaks things up into 60-character chunks. UTC timezone stub. # Canonicalize request parameters \ Method:{} Hashed Path:{} X-Ops-Content-Hash:... | 2.512526 | 3 |
packages/python/plotly/plotly/validators/layout/slider/transition/_easing.py | mastermind88/plotly.py | 0 | 6625241 | <filename>packages/python/plotly/plotly/validators/layout/slider/transition/_easing.py
import _plotly_utils.basevalidators
class EasingValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="easing", parent_name="layout.slider.transition", **kwargs
):
supe... | <filename>packages/python/plotly/plotly/validators/layout/slider/transition/_easing.py
import _plotly_utils.basevalidators
class EasingValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="easing", parent_name="layout.slider.transition", **kwargs
):
supe... | none | 1 | 2.390076 | 2 | |
tests/test_app.py | krish-adi/streamlit-barfi | 6 | 6625242 | import sys
sys.path.append('../')
from matplotlib import pyplot as plt
from barfi import st_barfi, barfi_schemas
import streamlit as st
from test_blocks import base_blocks
barfi_schema_name = st.selectbox(
'Select a saved schema to load:', barfi_schemas())
compute_engine = st.checkbox('Activate barfi compute engi... | import sys
sys.path.append('../')
from matplotlib import pyplot as plt
from barfi import st_barfi, barfi_schemas
import streamlit as st
from test_blocks import base_blocks
barfi_schema_name = st.selectbox(
'Select a saved schema to load:', barfi_schemas())
compute_engine = st.checkbox('Activate barfi compute engi... | none | 1 | 2.262938 | 2 | |
examples/snippets/data_io/df_connect/export_complex.py | nguyentr17/tamr-toolbox | 6 | 6625243 | """
An example script to demonstrate how to export datasets from Tamr using df_connect
sending multiple datasets to multiple different databases with multiple different
parameters/behaviors
"""
import tamr_toolbox as tbox
# load example multi config
my_config = tbox.utils.config.from_yaml("examples/resources/conf/conn... | """
An example script to demonstrate how to export datasets from Tamr using df_connect
sending multiple datasets to multiple different databases with multiple different
parameters/behaviors
"""
import tamr_toolbox as tbox
# load example multi config
my_config = tbox.utils.config.from_yaml("examples/resources/conf/conn... | en | 0.656404 | An example script to demonstrate how to export datasets from Tamr using df_connect sending multiple datasets to multiple different databases with multiple different parameters/behaviors # load example multi config # stream dataset A to Oracle with default export values from config file # stream dataset A to Oracle targ... | 2.609313 | 3 |
rubikscube_solver/normalizer.py | sonalimahajan12/Automation-scripts | 496 | 6625244 | """Normalizer module."""
# !/usr/bin/env python3
# -*- coding: utf-8 -*-
from sys import exit as Die
try:
import json
except ImportError as err:
Die(err)
class Normalizer:
"""Normalizer class."""
def algorithm(self, alg, language):
"""Normalize an algorithm from the json-written manual.
... | """Normalizer module."""
# !/usr/bin/env python3
# -*- coding: utf-8 -*-
from sys import exit as Die
try:
import json
except ImportError as err:
Die(err)
class Normalizer:
"""Normalizer class."""
def algorithm(self, alg, language):
"""Normalize an algorithm from the json-written manual.
... | en | 0.573652 | Normalizer module. # !/usr/bin/env python3 # -*- coding: utf-8 -*- Normalizer class. Normalize an algorithm from the json-written manual. :param alg: The algorithm itself :returns: list | 3.202833 | 3 |
nn_dataflow/tools/nn_dataflow_search.py | Jrebort/nn_dataflow | 0 | 6625245 | <gh_stars>0
""" $lic$
Copyright (C) 2016-2020 by Tsinghua University and The Board of Trustees of
Stanford University
This program is free software: you can redistribute it and/or modify it under
the terms of the Modified BSD-3 License as published by the Open Source
Initiative.
This program is distributed in the hop... | """ $lic$
Copyright (C) 2016-2020 by Tsinghua University and The Board of Trustees of
Stanford University
This program is free software: you can redistribute it and/or modify it under
the terms of the Modified BSD-3 License as published by the Open Source
Initiative.
This program is distributed in the hope that it wi... | en | 0.752276 | $lic$ Copyright (C) 2016-2020 by Tsinghua University and The Board of Trustees of Stanford University This program is free software: you can redistribute it and/or modify it under the terms of the Modified BSD-3 License as published by the Open Source Initiative. This program is distributed in the hope that it will b... | 1.705099 | 2 |
script.py | OsiriX-Foundation/DockerEnvironmentVariable | 0 | 6625246 | import dockerfile
import requests
dockerfile_url = {}
dockerfile_url["KheopsAuthorization"] = "https://raw.githubusercontent.com/OsiriX-Foundation/KheopsAuthorization/dev_env_var/docker/Dockerfile"
dockerfile_url["KheopsNginx"] = "https://raw.githubusercontent.com/OsiriX-Foundation/KheopsNginx/master/Dockerfile"
dock... | import dockerfile
import requests
dockerfile_url = {}
dockerfile_url["KheopsAuthorization"] = "https://raw.githubusercontent.com/OsiriX-Foundation/KheopsAuthorization/dev_env_var/docker/Dockerfile"
dockerfile_url["KheopsNginx"] = "https://raw.githubusercontent.com/OsiriX-Foundation/KheopsNginx/master/Dockerfile"
dock... | it | 0.622076 | # "+repo+"\n\n") | 2.363677 | 2 |
Source/boost_1_33_1/libs/python/pyste/tests/smart_ptrUT.py | spxuw/RFIM | 0 | 6625247 | # Copyright <NAME> 2003. Use, modification and
# distribution is subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http:#www.boost.org/LICENSE_1_0.txt)
import unittest
from _smart_ptr import *
class BasicExampleTest(unittest.TestCase):
def testIt(self):
... | # Copyright <NAME> 2003. Use, modification and
# distribution is subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http:#www.boost.org/LICENSE_1_0.txt)
import unittest
from _smart_ptr import *
class BasicExampleTest(unittest.TestCase):
def testIt(self):
... | en | 0.750315 | # Copyright <NAME> 2003. Use, modification and # distribution is subject to the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http:#www.boost.org/LICENSE_1_0.txt) | 2.4069 | 2 |
azext_iot/sdk/digitaltwins/controlplane/models/group_id_information_properties_py3.py | v-andreaco/azure-iot-cli-extension | 0 | 6625248 | <reponame>v-andreaco/azure-iot-cli-extension
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Micr... | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | en | 0.589551 | # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ... | 2.113503 | 2 |
tests/location_factory.py | eddieantonio/ad-hoc-miner | 17 | 6625249 | from sensibility.lexical_analysis import Position, Location
class LocationFactory:
"""
Creates locations, incrementally.
"""
def __init__(self, start: Position) -> None:
self.current = start
def across(self, width: int) -> Location:
start = self.current
self.current = Posi... | from sensibility.lexical_analysis import Position, Location
class LocationFactory:
"""
Creates locations, incrementally.
"""
def __init__(self, start: Position) -> None:
self.current = start
def across(self, width: int) -> Location:
start = self.current
self.current = Posi... | en | 0.871115 | Creates locations, incrementally. | 3.548568 | 4 |
mergify_engine/tests/functional/test_attributes.py | Divine-D/mergify-engine | 1 | 6625250 | <gh_stars>1-10
# -*- encoding: utf-8 -*-
#
# Copyright © 2020 <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 r... | # -*- encoding: utf-8 -*-
#
# Copyright © 2020 <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 required by appl... | en | 0.826129 | # -*- encoding: utf-8 -*- # # Copyright © 2020 <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 required by appl... | 2.002074 | 2 |