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
verteste/ui/ui_about.py
Chum4k3r/Verteste
0
7200
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'aboutdialog.ui' ## ## Created by: Qt User Interface Compiler version 6.1.1 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ###############...
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'aboutdialog.ui' ## ## Created by: Qt User Interface Compiler version 6.1.1 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ###############...
en
0.279541
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'aboutdialog.ui' ## ## Created by: Qt User Interface Compiler version 6.1.1 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ################...
2.152337
2
tests/test_base_protocol.py
Qix-/aiohttp
3
7201
import asyncio from contextlib import suppress from unittest import mock import pytest from aiohttp.base_protocol import BaseProtocol async def test_loop() -> None: loop = asyncio.get_event_loop() asyncio.set_event_loop(None) pr = BaseProtocol(loop) assert pr._loop is loop async def test_pause_wri...
import asyncio from contextlib import suppress from unittest import mock import pytest from aiohttp.base_protocol import BaseProtocol async def test_loop() -> None: loop = asyncio.get_event_loop() asyncio.set_event_loop(None) pr = BaseProtocol(loop) assert pr._loop is loop async def test_pause_wri...
none
1
2.198604
2
main.py
marcusviniciusteixeira/RPAPython
1
7202
<gh_stars>1-10 import PySimpleGUI as sg import os import time import pyautogui class TelaPython: def __init__(self): layout = [ [sg.Text('Usuário',size=(10,0)), sg.Input(size=(20,0),key='usuario')], [sg.Text('Senha',size=(10,0)), sg.Input(size=(20,0),key='senha')], [sg.T...
import PySimpleGUI as sg import os import time import pyautogui class TelaPython: def __init__(self): layout = [ [sg.Text('Usuário',size=(10,0)), sg.Input(size=(20,0),key='usuario')], [sg.Text('Senha',size=(10,0)), sg.Input(size=(20,0),key='senha')], [sg.Text('Número',si...
en
0.233904
#USUÁRIO #SENHA #Pjfa#412 #NUM
2.776406
3
logistic-regression/plot_binary_losses.py
eliben/deep-learning-samples
183
7203
# Helper code to plot binary losses. # # <NAME> (http://eli.thegreenplace.net) # This code is in the public domain from __future__ import print_function import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': fig, ax = plt.subplots() fig.set_tight_layout(True) xs = np.linspace(-2, 2...
# Helper code to plot binary losses. # # <NAME> (http://eli.thegreenplace.net) # This code is in the public domain from __future__ import print_function import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': fig, ax = plt.subplots() fig.set_tight_layout(True) xs = np.linspace(-2, 2...
en
0.796606
# Helper code to plot binary losses. # # <NAME> (http://eli.thegreenplace.net) # This code is in the public domain # plot L0/1 loss # plot square loss # plot hinge loss
2.985397
3
utils/watch-less.py
K-Fitzpatrick/crop_planner
91
7204
#!/usr/bin/env python3 ################################ # Development tool # Auto-compiles style.less to style.css # # Requires lessc and less clean css to be installed: # npm install -g less # npm install -g less-plugin-clean-css ################################ import os, time from os import path from math import fl...
#!/usr/bin/env python3 ################################ # Development tool # Auto-compiles style.less to style.css # # Requires lessc and less clean css to be installed: # npm install -g less # npm install -g less-plugin-clean-css ################################ import os, time from os import path from math import fl...
en
0.282863
#!/usr/bin/env python3 ################################ # Development tool # Auto-compiles style.less to style.css # # Requires lessc and less clean css to be installed: # npm install -g less # npm install -g less-plugin-clean-css ################################ # Main application # Run application
2.947761
3
testapp/app/app/tests/test_export_action.py
instituciones-abiertas/django-admin-export-action
5
7205
# -- encoding: UTF-8 -- import json import uuid from admin_export_action import report from admin_export_action.admin import export_selected_objects from admin_export_action.config import default_config, get_config from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from djang...
# -- encoding: UTF-8 -- import json import uuid from admin_export_action import report from admin_export_action.admin import export_selected_objects from admin_export_action.config import default_config, get_config from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from djang...
sr
0.08662
# -- encoding: UTF-8 --
2.09882
2
shapeshifter/tests/conftest.py
martinogden/django-shapeshifter
164
7206
<filename>shapeshifter/tests/conftest.py from pytest_djangoapp import configure_djangoapp_plugin pytest_plugins = configure_djangoapp_plugin( extend_INSTALLED_APPS=[ 'django.contrib.sessions', 'django.contrib.messages', ], extend_MIDDLEWARE=[ 'django.contrib.sessions.middleware.Sess...
<filename>shapeshifter/tests/conftest.py from pytest_djangoapp import configure_djangoapp_plugin pytest_plugins = configure_djangoapp_plugin( extend_INSTALLED_APPS=[ 'django.contrib.sessions', 'django.contrib.messages', ], extend_MIDDLEWARE=[ 'django.contrib.sessions.middleware.Sess...
none
1
1.286945
1
face_attribute_verification.py
seymayucer/FacialPhenotypes
2
7207
<filename>face_attribute_verification.py import argparse import numpy as np from sklearn.model_selection import StratifiedKFold import sklearn import cv2 import datetime import mxnet as mx from mxnet import ndarray as nd import pandas as pd from numpy import linalg as line import logging logging.basicConfig( forma...
<filename>face_attribute_verification.py import argparse import numpy as np from sklearn.model_selection import StratifiedKFold import sklearn import cv2 import datetime import mxnet as mx from mxnet import ndarray as nd import pandas as pd from numpy import linalg as line import logging logging.basicConfig( forma...
en
0.399407
# data_list = list( # np.empty((2, pairs.shape[0] * 2, 3, self.image_size, self.image_size)) # ) # 3*112*112, RGB # 3*112*112, RGB # data_list[flip][i][:] = img # bins shape should be 2,12000,3,112,112 # data = np.asarray(data_list) # Calculate evaluation metrics # k_fold = LFold(n_splits=nrof_folds, shuffle=False)...
2.362802
2
pkgs/applications/virtualization/virt-manager/custom_runner.py
mornfall/nixpkgs
1
7208
#!/usr/bin/python -t # this script was written to use /etc/nixos/nixpkgs/pkgs/development/python-modules/generic/wrap.sh # which already automates python executable wrapping by extending the PATH/pythonPath # from http://docs.python.org/library/subprocess.html # Warning Invoking the system shell with shell=True can be...
#!/usr/bin/python -t # this script was written to use /etc/nixos/nixpkgs/pkgs/development/python-modules/generic/wrap.sh # which already automates python executable wrapping by extending the PATH/pythonPath # from http://docs.python.org/library/subprocess.html # Warning Invoking the system shell with shell=True can be...
en
0.742894
#!/usr/bin/python -t # this script was written to use /etc/nixos/nixpkgs/pkgs/development/python-modules/generic/wrap.sh # which already automates python executable wrapping by extending the PATH/pythonPath # from http://docs.python.org/library/subprocess.html # Warning Invoking the system shell with shell=True can be ...
1.887988
2
jsonform/fields.py
Pix-00/jsonform
0
7209
import base64 import datetime from abc import ABC, abstractmethod from .conditions import AnyValue from .errors import FieldError, FormError __all__ = [ 'Field', 'StringField', 'IntegerField', 'FloatField', 'BooleanField', 'DateTimeField', 'DateField', 'TimeField', 'ListField','SetField', 'EnumField', 'BytesF...
import base64 import datetime from abc import ABC, abstractmethod from .conditions import AnyValue from .errors import FieldError, FormError __all__ = [ 'Field', 'StringField', 'IntegerField', 'FloatField', 'BooleanField', 'DateTimeField', 'DateField', 'TimeField', 'ListField','SetField', 'EnumField', 'BytesF...
none
1
2.825849
3
napari/layers/_source.py
napari/napari-gui
7
7210
<gh_stars>1-10 from __future__ import annotations from contextlib import contextmanager from contextvars import ContextVar from typing import Optional, Tuple from magicgui.widgets import FunctionGui from pydantic import BaseModel class Source(BaseModel): """An object to store the provenance of a layer. Par...
from __future__ import annotations from contextlib import contextmanager from contextvars import ContextVar from typing import Optional, Tuple from magicgui.widgets import FunctionGui from pydantic import BaseModel class Source(BaseModel): """An object to store the provenance of a layer. Parameters ---...
en
0.743738
An object to store the provenance of a layer. Parameters ---------- path: str, optional filpath/url associated with layer reader_plugin: str, optional name of reader plugin that loaded the file (if applicable) sample: Tuple[str, str], optional Tuple of (sample_plugin, sample...
2.584825
3
tests/unit/test_BaseDirection.py
vpalex999/project-mars
0
7211
<filename>tests/unit/test_BaseDirection.py import pytest import src.constants as cnst from src.directions import BaseDirection @pytest.fixture def base_direction(): return BaseDirection() def test_init_BaseDirection(base_direction): assert isinstance(base_direction, BaseDirection) def test_current_direct...
<filename>tests/unit/test_BaseDirection.py import pytest import src.constants as cnst from src.directions import BaseDirection @pytest.fixture def base_direction(): return BaseDirection() def test_init_BaseDirection(base_direction): assert isinstance(base_direction, BaseDirection) def test_current_direct...
en
0.435331
# turn_left # turn_right() # any combinations
2.9378
3
OpenCV-Computer-Vision-Examples-with-Python-A-Complete-Guide-for-Dummies-master/Source Code/opencv_operations/draw-circles.py
Payal197bhadra/ComputerVision
6
7212
import numpy as np import cv2 #define a canvas of size 300x300 px, with 3 channels (R,G,B) and data type as 8 bit unsigned integer canvas = np.zeros((300,300,3), dtype ="uint8") #define color #draw a circle #arguments are canvas/image, midpoint, radius, color, thickness(optional) #display in cv2 window green = (0,255...
import numpy as np import cv2 #define a canvas of size 300x300 px, with 3 channels (R,G,B) and data type as 8 bit unsigned integer canvas = np.zeros((300,300,3), dtype ="uint8") #define color #draw a circle #arguments are canvas/image, midpoint, radius, color, thickness(optional) #display in cv2 window green = (0,255...
en
0.726366
#define a canvas of size 300x300 px, with 3 channels (R,G,B) and data type as 8 bit unsigned integer #define color #draw a circle #arguments are canvas/image, midpoint, radius, color, thickness(optional) #display in cv2 window # draw concentric white circles # calculate the center point of canvas # generate circles usi...
3.455918
3
tmux_cssh/main.py
cscutcher/tmux_cssh
0
7213
<gh_stars>0 # -*- coding: utf-8 -*- """ Main Script """ import logging import argh import sarge import tmuxp DEV_LOGGER = logging.getLogger(__name__) def get_current_session(server=None): ''' Seems to be no easy way to grab current attached session in tmuxp so this provides a simple alternative. '''...
# -*- coding: utf-8 -*- """ Main Script """ import logging import argh import sarge import tmuxp DEV_LOGGER = logging.getLogger(__name__) def get_current_session(server=None): ''' Seems to be no easy way to grab current attached session in tmuxp so this provides a simple alternative. ''' server ...
en
0.870642
# -*- coding: utf-8 -*- Main Script Seems to be no easy way to grab current attached session in tmuxp so this provides a simple alternative. Creates new clustered window on session with commands. A clustered session is one where you operate on all panes/commands at once using the synchronized-panes option....
2.91569
3
nautobot_capacity_metrics/management/commands/__init__.py
david-kn/nautobot-plugin-capacity-metrics
6
7214
"""Additional Django management commands added by nautobot_capacity_metrics plugin."""
"""Additional Django management commands added by nautobot_capacity_metrics plugin."""
en
0.884734
Additional Django management commands added by nautobot_capacity_metrics plugin.
1.075403
1
nptweak/__init__.py
kmedian/nptweak
0
7215
<reponame>kmedian/nptweak<filename>nptweak/__init__.py<gh_stars>0 from .to_2darray import to_2darray
from .to_2darray import to_2darray
none
1
1.127293
1
resources/models/Image.py
sphildreth/roadie-python
0
7216
import io from PIL import Image as PILImage from sqlalchemy import Column, ForeignKey, LargeBinary, Index, Integer, String from resources.models.ModelBase import Base class Image(Base): # If this is used then the image is stored in the database image = Column(LargeBinary(length=16777215), default=None) #...
import io from PIL import Image as PILImage from sqlalchemy import Column, ForeignKey, LargeBinary, Index, Integer, String from resources.models.ModelBase import Base class Image(Base): # If this is used then the image is stored in the database image = Column(LargeBinary(length=16777215), default=None) #...
en
0.907458
# If this is used then the image is stored in the database # If this is used then the image is remote and this is the url # This is a PhotoHash of the image for assistance in deduping # Open the image, resize it and convert it to black & white. # Compute the hash based on each pixels value compared to the average.
2.643023
3
arch2vec/search_methods/reinforce_darts.py
gabrielasuchopar/arch2vec
0
7217
import os import sys import argparse import json import random import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from arch2vec.models.pretraining_nasbench101 import configs from arch2vec.utils import load_json, preprocessing, one_hot_darts from arch2vec.preprocessing.gen_is...
import os import sys import argparse import json import random import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from arch2vec.models.pretraining_nasbench101 import configs from arch2vec.utils import load_json, preprocessing, one_hot_darts from arch2vec.preprocessing.gen_is...
en
0.718478
:return: 1 x dim action: 1 x dim self.features. N x dim MVN based action selection. :param state: 1 x dim :param policy: policy network :return: selected action: 1 x dim implementation of arch2vec-RL on DARTS Search Space
2.337109
2
setup.py
mentaal/r_map
0
7218
<reponame>mentaal/r_map """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspa...
en
0.840554
A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject # Always prefer setuptools over distutils # To use a consistent encoding # Get the long description from the README file # Arguments marked as "Required" below must be included for upload...
1.506317
2
dont_worry.py
karianjahi/fahrer_minijob
0
7219
class Hey: def __init__(jose, name="mours"): jose.name = name def get_name(jose): return jose.name class Person(object): def __init__(self, name, phone): self.name = name self.phone = phone class Teenager(Person): def __init__(self, *args, **kwargs): self.website...
class Hey: def __init__(jose, name="mours"): jose.name = name def get_name(jose): return jose.name class Person(object): def __init__(self, name, phone): self.name = name self.phone = phone class Teenager(Person): def __init__(self, *args, **kwargs): self.website...
ru
0.142554
#print(Hey().get_name())
3.495329
3
tests/zoo/tree.py
dynalz/odmantic
486
7220
<reponame>dynalz/odmantic import enum from typing import Dict, List from odmantic.field import Field from odmantic.model import Model class TreeKind(str, enum.Enum): BIG = "big" SMALL = "small" class TreeModel(Model): name: str = Field(primary_key=True, default="<NAME> montagnes") average_size: flo...
import enum from typing import Dict, List from odmantic.field import Field from odmantic.model import Model class TreeKind(str, enum.Enum): BIG = "big" SMALL = "small" class TreeModel(Model): name: str = Field(primary_key=True, default="<NAME> montagnes") average_size: float = Field(mongo_name="siz...
none
1
2.8313
3
adanet/core/estimator_test.py
eustomaqua/adanet
0
7221
"""Test AdaNet estimator single graph implementation. Copyright 2018 The AdaNet Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LI...
"""Test AdaNet estimator single graph implementation. Copyright 2018 The AdaNet Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LI...
en
0.787318
Test AdaNet estimator single graph implementation. Copyright 2018 The AdaNet Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICEN...
1.414014
1
ua_roomseeker/uploader.py
nyg1/classroom-finder
1
7222
<gh_stars>1-10 from seeker.models import Building, Classroom, Time import json import os os.chdir('../data') fileList = os.listdir() #loops through each json file for jsonfile in fileList: #opens the jsonfile and loads the data f = open(jsonfile, 'r') data = f.read() jsondata = json.loads(data) #c...
from seeker.models import Building, Classroom, Time import json import os os.chdir('../data') fileList = os.listdir() #loops through each json file for jsonfile in fileList: #opens the jsonfile and loads the data f = open(jsonfile, 'r') data = f.read() jsondata = json.loads(data) #create the build...
en
0.880664
#loops through each json file #opens the jsonfile and loads the data #create the building #creates each classroom, adding one only if one doesn't exist #creates each time #IMPORTANT!!!!!!! # This program must be run inside a python manage.py shell for it to work, in the future a fix may be found, # but for the time bei...
2.748854
3
dash_daq/Slider.py
luiztauffer/dash-daq
0
7223
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Slider(Component): """A Slider component. A slider component with support for a target value. Keyword arguments: - id (string; optional): The ID used to identify this component in Dash callbac...
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Slider(Component): """A Slider component. A slider component with support for a target value. Keyword arguments: - id (string; optional): The ID used to identify this component in Dash callbac...
en
0.762609
# AUTO GENERATED FILE - DO NOT EDIT A Slider component. A slider component with support for a target value. Keyword arguments: - id (string; optional): The ID used to identify this component in Dash callbacks. - className (string; optional): Additional CSS class for the root DOM node. - color (dict; default...
2.560076
3
src/util/__init__.py
ooshyun/filterdesign
1
7224
<reponame>ooshyun/filterdesign """Utility function for process to raw data """ from .util import ( cvt_pcm2wav, cvt_float2fixed, cvt_char2num, plot_frequency_response, plot_pole_zero_analysis, ) from .fi import fi __all__ = [ "fi", "cvt_pcm2wav", "cvt_float2fixed", "cvt_char2num", ...
"""Utility function for process to raw data """ from .util import ( cvt_pcm2wav, cvt_float2fixed, cvt_char2num, plot_frequency_response, plot_pole_zero_analysis, ) from .fi import fi __all__ = [ "fi", "cvt_pcm2wav", "cvt_float2fixed", "cvt_char2num", "plot_frequency_response", ...
en
0.70134
Utility function for process to raw data
1.476269
1
infra/apps/catalog/tests/views/distribution_upload_tests.py
datosgobar/infra.datos.gob.ar
1
7225
<gh_stars>1-10 import pytest from django.core.files import File from django.urls import reverse from freezegun import freeze_time from infra.apps.catalog.tests.helpers.open_catalog import open_catalog pytestmark = pytest.mark.django_db @pytest.fixture(autouse=True) def give_user_edit_rights(user, node): node.ad...
import pytest from django.core.files import File from django.urls import reverse from freezegun import freeze_time from infra.apps.catalog.tests.helpers.open_catalog import open_catalog pytestmark = pytest.mark.django_db @pytest.fixture(autouse=True) def give_user_edit_rights(user, node): node.admins.add(user) ...
none
1
2.180732
2
examples/model_zoo/build_binaries.py
Embracing/unrealcv
1,617
7226
import subprocess, os ue4_win = r"C:\Program Files\Epic Games\UE_4.16" ue4_linux = "/home/qiuwch/workspace/UE416" ue4_mac = '/Users/Shared/Epic Games/UE_4.16' win_uprojects = [ r'C:\qiuwch\workspace\uprojects\UE4RealisticRendering\RealisticRendering.uproject', r'C:\qiuwch\workspace\uprojects\UE4ArchinteriorsV...
import subprocess, os ue4_win = r"C:\Program Files\Epic Games\UE_4.16" ue4_linux = "/home/qiuwch/workspace/UE416" ue4_mac = '/Users/Shared/Epic Games/UE_4.16' win_uprojects = [ r'C:\qiuwch\workspace\uprojects\UE4RealisticRendering\RealisticRendering.uproject', r'C:\qiuwch\workspace\uprojects\UE4ArchinteriorsV...
en
0.517026
# '--output', uproject['output_folder'], # Print the last few lines
1.4644
1
__init__.py
NeonJarbas/skill-ddg
0
7227
<gh_stars>0 # 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 # distribut...
# 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 # distributed under the...
en
0.81778
# 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 # distributed under the...
2.200797
2
openstack_lease_it/openstack_lease_it/settings.py
LAL/openstack-lease-it
0
7228
""" Django settings for openstack_lease_it project. Generated by 'django-admin startproject' using Django 1.8.7. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ #...
""" Django settings for openstack_lease_it project. Generated by 'django-admin startproject' using Django 1.8.7. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ #...
en
0.691892
Django settings for openstack_lease_it project. Generated by 'django-admin startproject' using Django 1.8.7. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ # Build pa...
1.77098
2
rigl/experimental/jax/pruning/pruning.py
vishalbelsare/rigl
276
7229
<filename>rigl/experimental/jax/pruning/pruning.py # coding=utf-8 # Copyright 2021 RigL 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...
<filename>rigl/experimental/jax/pruning/pruning.py # coding=utf-8 # Copyright 2021 RigL 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...
en
0.821687
# coding=utf-8 # Copyright 2021 RigL 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 or agree...
2.242973
2
venv/Lib/site-packages/dash_bootstrap_components/_components/CardLink.py
hanzzhu/chadle
0
7230
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class CardLink(Component): """A CardLink component. Use card link to add consistently styled links to your cards. Links can be used like buttons, external links, or internal Dash style links. Keyword arg...
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class CardLink(Component): """A CardLink component. Use card link to add consistently styled links to your cards. Links can be used like buttons, external links, or internal Dash style links. Keyword arg...
en
0.787135
# AUTO GENERATED FILE - DO NOT EDIT A CardLink component. Use card link to add consistently styled links to your cards. Links can be used like buttons, external links, or internal Dash style links. Keyword arguments: - children (a list of or a singular dash component, string or number; optional): The children of ...
2.834252
3
plugins/hanlp_demo/hanlp_demo/zh/tf/train/train_ctb9_pos_electra.py
antfootAlex/HanLP
3
7231
<reponame>antfootAlex/HanLP<filename>plugins/hanlp_demo/hanlp_demo/zh/tf/train/train_ctb9_pos_electra.py # -*- coding:utf-8 -*- # Author: hankcs # Date: 2019-12-28 23:15 from hanlp.components.taggers.transformers.transformer_tagger_tf import TransformerTaggerTF from tests import cdroot cdroot() tagger = TransformerTag...
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2019-12-28 23:15 from hanlp.components.taggers.transformers.transformer_tagger_tf import TransformerTaggerTF from tests import cdroot cdroot() tagger = TransformerTaggerTF() save_dir = 'data/model/pos/ctb9_electra_small_zh_epoch_20' tagger.fit('data/pos/ctb9/train.tsv', ...
en
0.65666
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2019-12-28 23:15
2.027055
2
src/app/main.py
Wedding-APIs-System/Backend-APi
0
7232
<filename>src/app/main.py from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.api import landing, login, attendance_confirmation from sql_app.database import orm_connection app = FastAPI(title="Sergio's wedding backend API", description="REST API which serves login, attendance ...
<filename>src/app/main.py from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.api import landing, login, attendance_confirmation from sql_app.database import orm_connection app = FastAPI(title="Sergio's wedding backend API", description="REST API which serves login, attendance ...
en
0.568161
# "http://172.16.17.32:5500", # "192.168.3.11"
2.433177
2
tests/test_pydora/test_utils.py
NextGenTechBar/twandora
0
7233
from unittest import TestCase from pandora.client import APIClient from pandora.errors import InvalidAuthToken, ParameterMissing from pandora.models.pandora import Station, AdItem, PlaylistItem from pandora.py2compat import Mock, patch from pydora.utils import iterate_forever class TestIterateForever(TestCase): ...
from unittest import TestCase from pandora.client import APIClient from pandora.errors import InvalidAuthToken, ParameterMissing from pandora.models.pandora import Station, AdItem, PlaylistItem from pandora.py2compat import Mock, patch from pydora.utils import iterate_forever class TestIterateForever(TestCase): ...
none
1
2.368594
2
PyDSTool/PyCont/BifPoint.py
mdlama/pydstool
2
7234
""" Bifurcation point classes. Each class locates and processes bifurcation points. * _BranchPointFold is a version based on BranchPoint location algorithms * BranchPoint: Branch process is broken (can't find alternate branch -- see MATCONT notes) <NAME>, March 2006 """ from __future__ import absolute_i...
""" Bifurcation point classes. Each class locates and processes bifurcation points. * _BranchPointFold is a version based on BranchPoint location algorithms * BranchPoint: Branch process is broken (can't find alternate branch -- see MATCONT notes) <NAME>, March 2006 """ from __future__ import absolute_i...
en
0.572338
Bifurcation point classes. Each class locates and processes bifurcation points. * _BranchPointFold is a version based on BranchPoint location algorithms * BranchPoint: Branch process is broken (can't find alternate branch -- see MATCONT notes) <NAME>, March 2006 ##### ##### Special point that represents ...
2.496577
2
src/marion/marion/urls/__init__.py
OmenApps/marion
7
7235
<filename>src/marion/marion/urls/__init__.py """Urls for the marion application""" from django.urls import include, path from rest_framework import routers from .. import views router = routers.DefaultRouter() router.register(r"requests", views.DocumentRequestViewSet) urlpatterns = [ path("", include(router.ur...
<filename>src/marion/marion/urls/__init__.py """Urls for the marion application""" from django.urls import include, path from rest_framework import routers from .. import views router = routers.DefaultRouter() router.register(r"requests", views.DocumentRequestViewSet) urlpatterns = [ path("", include(router.ur...
en
0.844426
Urls for the marion application
1.93784
2
setup.py
TanKingsley/pyxll-jupyter
1
7236
""" PyXLL-Jupyter This package integrated Jupyter notebooks into Microsoft Excel. To install it, first install PyXLL (see https://www.pyxll.com). Briefly, to install PyXLL do the following:: pip install pyxll pyxll install Once PyXLL is installed then installing this package will add a button to the PyXLL ...
""" PyXLL-Jupyter This package integrated Jupyter notebooks into Microsoft Excel. To install it, first install PyXLL (see https://www.pyxll.com). Briefly, to install PyXLL do the following:: pip install pyxll pyxll install Once PyXLL is installed then installing this package will add a button to the PyXLL ...
en
0.743034
PyXLL-Jupyter This package integrated Jupyter notebooks into Microsoft Excel. To install it, first install PyXLL (see https://www.pyxll.com). Briefly, to install PyXLL do the following:: pip install pyxll pyxll install Once PyXLL is installed then installing this package will add a button to the PyXLL ribb...
3.114629
3
board/views.py
albi23/Pyra
0
7237
from typing import List from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import JsonResponse from django.shortcuts import render from django.urls import reverse_lazy from django.views import generic, View from board.forms import SignUpForm from .co...
from typing import List from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import JsonResponse from django.shortcuts import render from django.urls import reverse_lazy from django.views import generic, View from board.forms import SignUpForm from .co...
none
1
2.046574
2
setup.py
lazmond3/pylib-instagram-type
0
7238
<reponame>lazmond3/pylib-instagram-type # -*- coding: utf-8 -*- # Learn more: https://github.com/kennethreitz/setup.py from setuptools import setup, find_packages import os with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() def take_package_name(name): if nam...
# -*- coding: utf-8 -*- # Learn more: https://github.com/kennethreitz/setup.py from setuptools import setup, find_packages import os with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() def take_package_name(name): if name.startswith("-e"): return name[...
en
0.697148
# -*- coding: utf-8 -*- # Learn more: https://github.com/kennethreitz/setup.py
1.628773
2
tbx/core/migrations/0111_move_sign_up_form_into_new_app.py
arush15june/wagtail-torchbox
0
7239
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-01-15 22:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('wagtailsearchpromotions', '0002_capitalizeverbose'), ('wagtailcore', '0040_page_draft_title...
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-01-15 22:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('wagtailsearchpromotions', '0002_capitalizeverbose'), ('wagtailcore', '0040_page_draft_title...
en
0.748887
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-01-15 22:49
1.590396
2
tests/test_webframe.py
zsolt-beringer/osm-gimmisn
0
7240
#!/usr/bin/env python3 # # Copyright (c) 2019 <NAME> and contributors. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """The test_webframe module covers the webframe module.""" from typing import List from typing import TYPE_CHECKING from typing import Tuple from...
#!/usr/bin/env python3 # # Copyright (c) 2019 <NAME> and contributors. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """The test_webframe module covers the webframe module.""" from typing import List from typing import TYPE_CHECKING from typing import Tuple from...
en
0.6296
#!/usr/bin/env python3 # # Copyright (c) 2019 <NAME> and contributors. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. The test_webframe module covers the webframe module. # pylint: disable=unused-import # pylint: disable=no-name-in-module,import-error,unused-import...
2.13836
2
spotify.py
nimatest1234/telegram_spotify_downloader_bot
0
7241
from __future__ import unicode_literals import spotipy from spotipy.oauth2 import SpotifyClientCredentials import requests from youtube_search import YoutubeSearch import youtube_dl import eyed3.id3 import eyed3 import lyricsgenius import telepot spotifyy = spotipy.Spotify( client_credentials_manager=SpotifyClient...
from __future__ import unicode_literals import spotipy from spotipy.oauth2 import SpotifyClientCredentials import requests from youtube_search import YoutubeSearch import youtube_dl import eyed3.id3 import eyed3 import lyricsgenius import telepot spotifyy = spotipy.Spotify( client_credentials_manager=SpotifyClient...
en
0.506832
#Get MetaData #Download Cover #search for music on youtube #Donwload Music from youtube # PERMANENT options
2.620703
3
tests/test_atomdict.py
Tillsten/atom
0
7242
#------------------------------------------------------------------------------ # Copyright (c) 2018-2019, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #------------------------------------------------...
#------------------------------------------------------------------------------ # Copyright (c) 2018-2019, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #------------------------------------------------...
en
0.511608
#------------------------------------------------------------------------------ # Copyright (c) 2018-2019, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #------------------------------------------------...
2.457141
2
dippy/core/timestamp.py
eggveloper/dippy.core
4
7243
<gh_stars>1-10 from datetime import datetime class Timestamp(float): def __new__(cls, value=None): return super().__new__( cls, datetime.utcnow().timestamp() if value is None else value ) def to_date(self) -> datetime: return datetime.utcfromtimestamp(self) def __repr...
from datetime import datetime class Timestamp(float): def __new__(cls, value=None): return super().__new__( cls, datetime.utcnow().timestamp() if value is None else value ) def to_date(self) -> datetime: return datetime.utcfromtimestamp(self) def __repr__(self): ...
none
1
3.365518
3
bible/admin.py
tushortz/biblelover
0
7244
from django.contrib import admin from bible.models import Bible, VerseOfTheDay @admin.register(Bible) class BibleAdmin(admin.ModelAdmin): list_display = ['__str__', 'text'] readonly_fields = ['book', 'chapter', 'verse', 'text', 'category'] search_fields = ['text', 'book', 'chapter'] list_filter = ['ca...
from django.contrib import admin from bible.models import Bible, VerseOfTheDay @admin.register(Bible) class BibleAdmin(admin.ModelAdmin): list_display = ['__str__', 'text'] readonly_fields = ['book', 'chapter', 'verse', 'text', 'category'] search_fields = ['text', 'book', 'chapter'] list_filter = ['ca...
none
1
2.214834
2
typy/nodes.py
Procrat/typy
3
7245
<reponame>Procrat/typy<filename>typy/nodes.py """ Our own implementation of an abstract syntax tree (AST). The convert function recursively converts a Python AST (from the module `ast`) to our own AST (of the class `Node`). """ import ast from logging import debug from typy.builtin import data_types from typy.except...
""" Our own implementation of an abstract syntax tree (AST). The convert function recursively converts a Python AST (from the module `ast`) to our own AST (of the class `Node`). """ import ast from logging import debug from typy.builtin import data_types from typy.exceptions import NotYetSupported, NoSuchAttribute, ...
en
0.627263
Our own implementation of an abstract syntax tree (AST). The convert function recursively converts a Python AST (from the module `ast`) to our own AST (of the class `Node`). Must be overriden in subtype. # TODO implement for Del, AugLoad, AugStore, Param # TODO implement for Del, AugLoad, AugStore, Param # TODO handle...
2.921637
3
anonlink-entity-service/backend/entityservice/integrationtests/objectstoretests/test_objectstore.py
Sam-Gresh/linkage-agent-tools
1
7246
<reponame>Sam-Gresh/linkage-agent-tools """ Testing: - uploading over existing files - using deleted credentials - using expired credentials """ import io import minio from minio import Minio import pytest from minio.credentials import AssumeRoleProvider, Credentials from entityservice.object_store import connect...
""" Testing: - uploading over existing files - using deleted credentials - using expired credentials """ import io import minio from minio import Minio import pytest from minio.credentials import AssumeRoleProvider, Credentials from entityservice.object_store import connect_to_object_store, connect_to_upload_obje...
en
0.815471
Testing: - uploading over existing files - using deleted credentials - using expired credentials { "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:PutObject" ], "Effect": "Allow", "Resource": [ "arn:aws:s3:::uploads/2020/*" ], "Sid": "Upload-acces...
2.138209
2
soil/build/lib/soil/db/sqlalchemy/api.py
JackDan9/soil
1
7247
# Copyright 2020 Soil, Inc. # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); yo...
# Copyright 2020 Soil, Inc. # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); yo...
en
0.856415
# Copyright 2020 Soil, Inc. # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); yo...
1.795926
2
tests/test_models.py
kykrueger/redash
1
7248
<reponame>kykrueger/redash import calendar import datetime from unittest import TestCase import pytz from dateutil.parser import parse as date_parse from tests import BaseTestCase from redash import models, redis_connection from redash.models import db, types from redash.utils import gen_query_hash, utcnow class Da...
import calendar import datetime from unittest import TestCase import pytz from dateutil.parser import parse as date_parse from tests import BaseTestCase from redash import models, redis_connection from redash.models import db, types from redash.utils import gen_query_hash, utcnow class DashboardTest(BaseTestCase): ...
en
0.953502
# Setup: # # 1) The query should run every 3 weeks on Tuesday # 2) The last time it ran was 3 weeks ago from this week's Thursday # 3) It is now Wednesday of this week # # Expectation: Even though less than 3 weeks have passed since the # last run 3 weeks ago on Thursday, it's overdue since # ...
2.571789
3
.history/List of Capstone Projects/FibonacciSequence_20200516134123.py
EvanthiosPapadopoulos/Python3
1
7249
''' Fibonacci Sequence ''' import HeaderOfFiles def fibonacciSeq(number): ''' Generate Fibonacci Sequence to the given number. ''' a = 1 b = 1 for i in range(number): yield a a,b = b,a+b while True: try: f = int(input("Enter a number for Fibonacci: "...
''' Fibonacci Sequence ''' import HeaderOfFiles def fibonacciSeq(number): ''' Generate Fibonacci Sequence to the given number. ''' a = 1 b = 1 for i in range(number): yield a a,b = b,a+b while True: try: f = int(input("Enter a number for Fibonacci: "...
en
0.664954
Fibonacci Sequence Generate Fibonacci Sequence to the given number.
4.486499
4
composer/algorithms/mixup/__init__.py
jacobfulano/composer
2
7250
<reponame>jacobfulano/composer # Copyright 2021 MosaicML. All Rights Reserved. from composer.algorithms.mixup.mixup import MixUp as MixUp from composer.algorithms.mixup.mixup import MixUpHparams as MixUpHparams from composer.algorithms.mixup.mixup import mixup_batch as mixup_batch _name = 'MixUp' _class_name = 'MixUp...
# Copyright 2021 MosaicML. All Rights Reserved. from composer.algorithms.mixup.mixup import MixUp as MixUp from composer.algorithms.mixup.mixup import MixUpHparams as MixUpHparams from composer.algorithms.mixup.mixup import mixup_batch as mixup_batch _name = 'MixUp' _class_name = 'MixUp' _functional = 'mixup_batch' _...
en
0.738586
# Copyright 2021 MosaicML. All Rights Reserved.
0.956662
1
tests/simple_gan_test.py
alanpeixinho/NiftyNet
0
7251
from __future__ import absolute_import, print_function import unittest import os import tensorflow as tf from tensorflow.keras import regularizers from niftynet.network.simple_gan import SimpleGAN from tests.niftynet_testcase import NiftyNetTestCase class SimpleGANTest(NiftyNetTestCase): def test_3d_reg_shape(s...
from __future__ import absolute_import, print_function import unittest import os import tensorflow as tf from tensorflow.keras import regularizers from niftynet.network.simple_gan import SimpleGAN from tests.niftynet_testcase import NiftyNetTestCase class SimpleGANTest(NiftyNetTestCase): def test_3d_reg_shape(s...
none
1
2.442247
2
tests/test.py
N4S4/thingspeak_wrapper
0
7252
import time import thingspeak_wrapper as tsw # Initiate the class ThingWrapper with (CHANNEL_ID, WRITE_API__KEY, READ_API_KEY) # if is a public channel just pass the CHANNEL_ID argument, api_key defaults are None my_channel = tsw.wrapper.ThingWrapper(501309, '6TQDNWJQ44FA0GAQ', '10EVD2N6YIHI5O7Z') # all set of func...
import time import thingspeak_wrapper as tsw # Initiate the class ThingWrapper with (CHANNEL_ID, WRITE_API__KEY, READ_API_KEY) # if is a public channel just pass the CHANNEL_ID argument, api_key defaults are None my_channel = tsw.wrapper.ThingWrapper(501309, '6TQDNWJQ44FA0GAQ', '10EVD2N6YIHI5O7Z') # all set of func...
en
0.622289
# Initiate the class ThingWrapper with (CHANNEL_ID, WRITE_API__KEY, READ_API_KEY) # if is a public channel just pass the CHANNEL_ID argument, api_key defaults are None # all set of functions are: # my_channel.sender() # my_channel.multiple_sender() # my_channel.get_json_feeds() # my_channel.get_json_feeds_from() # my_c...
2.838909
3
neptunecontrib/monitoring/skopt.py
neptune-ai/neptune-contrib
22
7253
# # Copyright (c) 2019, Neptune Labs Sp. z o.o. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# # Copyright (c) 2019, Neptune Labs Sp. z o.o. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
en
0.638906
# # Copyright (c) 2019, Neptune Labs Sp. z o.o. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
2.248891
2
snoopy/server/transforms/Maltego.py
aiddenkeli/Snoopy
432
7254
#!/usr/bin/python # # This might be horrible code... # ...but it works # Feel free to re-write in a better way # And if you want to - send it to us, we'll update ;) # <EMAIL> (2010/10/18) # import sys from xml.dom import minidom class MaltegoEntity(object): value = ""; weight = 100; displayInformation = ""; addit...
#!/usr/bin/python # # This might be horrible code... # ...but it works # Feel free to re-write in a better way # And if you want to - send it to us, we'll update ;) # <EMAIL> (2010/10/18) # import sys from xml.dom import minidom class MaltegoEntity(object): value = ""; weight = 100; displayInformation = ""; addit...
en
0.691297
#!/usr/bin/python # # This might be horrible code... # ...but it works # Feel free to re-write in a better way # And if you want to - send it to us, we'll update ;) # <EMAIL> (2010/10/18) # #def __init__(self): #empty. #read the easy stuff like value, limits etc #read additional fields #sure this is not the right way.....
2.255449
2
metadeploy/api/migrations/0050_add_clickthrough_agreement.py
sfdc-qbranch/MetaDeploy
33
7255
# Generated by Django 2.1.5 on 2019-02-12 21:18 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("api", "0049_add_all_other_translations")] operations = [ migrations.CreateModel( name="ClickThroughAgreement...
# Generated by Django 2.1.5 on 2019-02-12 21:18 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("api", "0049_add_all_other_translations")] operations = [ migrations.CreateModel( name="ClickThroughAgreement...
en
0.727542
# Generated by Django 2.1.5 on 2019-02-12 21:18
1.640568
2
invenio_iiif/config.py
dfdan/invenio-iiif
3
7256
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """IIIF API for Invenio.""" IIIF_API_PREFIX = '/iiif/' """URL prefix to IIIF API.""" III...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """IIIF API for Invenio.""" IIIF_API_PREFIX = '/iiif/' """URL prefix to IIIF API.""" III...
en
0.72181
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. IIIF API for Invenio. URL prefix to IIIF API. URL to IIIF API endpoint (allow hostname). Pa...
1.344496
1
pub_ingest.py
mconlon17/vivo-pub-ingest
0
7257
#!/user/bin/env/python """ pub_ingest.py -- Read a bibtex file and make VIVO RDF The following objects will be made as needed: -- publisher -- journal -- information resource -- timestamp for the information resource -- people -- authorships -- concepts The result...
#!/user/bin/env/python """ pub_ingest.py -- Read a bibtex file and make VIVO RDF The following objects will be made as needed: -- publisher -- journal -- information resource -- timestamp for the information resource -- people -- authorships -- concepts The result...
en
0.833422
#!/user/bin/env/python pub_ingest.py -- Read a bibtex file and make VIVO RDF The following objects will be made as needed: -- publisher -- journal -- information resource -- timestamp for the information resource -- people -- authorships -- concepts The resulting ADD ...
2.72833
3
port/platform/common/automation/u_utils.py
u-blox/ubxlib
91
7258
#!/usr/bin/env python '''Generally useful bits and bobs.''' import queue # For PrintThread and exe_run from time import sleep, time, gmtime, strftime # For lock timeout, exe_run timeout and logging from multiprocessing import RLock from copy import copy import threading # For Print...
#!/usr/bin/env python '''Generally useful bits and bobs.''' import queue # For PrintThread and exe_run from time import sleep, time, gmtime, strftime # For lock timeout, exe_run timeout and logging from multiprocessing import RLock from copy import copy import threading # For Print...
en
0.875757
#!/usr/bin/env python Generally useful bits and bobs. # For PrintThread and exe_run # For lock timeout, exe_run timeout and logging # For PrintThread # For ChangeDir, has_admin # To help deltree out # For storing a window of debug # For talking to JLink server # To delete a directory tree # For CTRL_C_EVENT # Figure ou...
2.467456
2
faigler_mazeh.py
tcjansen/beer
0
7259
import numpy as np import astropy.modeling.blackbody as bb import astropy.constants as const from astropy.io import fits from scipy.interpolate import interp2d class FaiglerMazehFit(): def __init__(self, P_orb, inc, R_star, M_star, T_star, A_ellip=False, A_beam=False, R_p=False, a=False, u=False, g=0.65, logg=...
import numpy as np import astropy.modeling.blackbody as bb import astropy.constants as const from astropy.io import fits from scipy.interpolate import interp2d class FaiglerMazehFit(): def __init__(self, P_orb, inc, R_star, M_star, T_star, A_ellip=False, A_beam=False, R_p=False, a=False, u=False, g=0.65, logg=...
en
0.71178
# orbital period in days # inclination converted to radians # radius of the star in solar units # mass of the star in solar units # temperature of the star [K] # ellipsoidal amplitude in ppm # beaming amplitude in ppm # gravity-darkening coefficient, expected range is 0.3-1.0 # log surface gravity of the star [cm s^-2]...
2.463871
2
src/vanilla_pytorch/prune_model.py
f2010126/LTH_Master
0
7260
<gh_stars>0 import torch.nn.utils.prune as prune import torch from src.vanilla_pytorch.utils import count_rem_weights from src.vanilla_pytorch.models.linearnets import LeNet, init_weights from src.vanilla_pytorch.models.resnets import Resnets def remove_pruning(model): for i, (name, module) in enumerate(model.nam...
import torch.nn.utils.prune as prune import torch from src.vanilla_pytorch.utils import count_rem_weights from src.vanilla_pytorch.models.linearnets import LeNet, init_weights from src.vanilla_pytorch.models.resnets import Resnets def remove_pruning(model): for i, (name, module) in enumerate(model.named_modules()...
en
0.796223
# name and val prune the lowest p% weights by magnitude per layer :param model: model to prune :param p_rate: prune rate = 0.2 as per paper :param prune_amts: dictionary :return: the created mask. model has served it's purpose. # TODO: Adjust pruning with output layer # ie dict is empty, use the defaul...
2.555509
3
Grid-neighbor-search/GNS/read_instance_2layer_2LMM_L.py
CitrusAqua/mol-infer
0
7261
<reponame>CitrusAqua/mol-infer<filename>Grid-neighbor-search/GNS/read_instance_2layer_2LMM_L.py """ read_instance_BH-cyclic.py """ ''' [seed graph] V_C : "V_C" E_C : "E_C" [core specification] ell_LB : "\ell_{\rm LB}" ell_UB : "\ell_{\rm UB}" cs_LB : "\textsc{cs}_{\rm LB}" ...
""" read_instance_BH-cyclic.py """ ''' [seed graph] V_C : "V_C" E_C : "E_C" [core specification] ell_LB : "\ell_{\rm LB}" ell_UB : "\ell_{\rm UB}" cs_LB : "\textsc{cs}_{\rm LB}" cs_UB : "\textsc{cs}_{\rm UB}" ''' import sys def read_pmax_file(filename): with ope...
en
0.580201
read_instance_BH-cyclic.py [seed graph] V_C : "V_C" E_C : "E_C" [core specification] ell_LB : "\ell_{\rm LB}" ell_UB : "\ell_{\rm UB}" cs_LB : "\textsc{cs}_{\rm LB}" cs_UB : "\textsc{cs}_{\rm UB}" ### read V_C ### ### read E_C ### # Add arr[0] to distinguish two edges ...
2.517013
3
gamma/system_input.py
ArtBIT/gamma
15
7262
from .system import * from .colours import * class InputSystem(System): def init(self): self.key = 'input' def setRequirements(self): self.requiredComponents = ['input'] def updateEntity(self, entity, scene): # don't allow input during a cutscene if scene.cutscene is...
from .system import * from .colours import * class InputSystem(System): def init(self): self.key = 'input' def setRequirements(self): self.requiredComponents = ['input'] def updateEntity(self, entity, scene): # don't allow input during a cutscene if scene.cutscene is...
en
0.880983
# don't allow input during a cutscene # run the stored input context
2.685054
3
tensorflow_federated/python/research/utils/checkpoint_utils_test.py
mcognetta/federated
0
7263
# Lint as: python3 # Copyright 2019, The TensorFlow Federated 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 ...
# Lint as: python3 # Copyright 2019, The TensorFlow Federated 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 ...
en
0.807898
# Lint as: python3 # Copyright 2019, The TensorFlow Federated 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 ...
1.962978
2
website/models/user.py
alexli0707/pyforum
4
7264
#!/usr/bin/env python # -*- coding: utf-8 -*- import peewee from flask import current_app,abort from flask.ext.login import AnonymousUserMixin, UserMixin from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from peewee import Model, IntegerField, CharField,PrimaryKeyField from website.app import db_wr...
#!/usr/bin/env python # -*- coding: utf-8 -*- import peewee from flask import current_app,abort from flask.ext.login import AnonymousUserMixin, UserMixin from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from peewee import Model, IntegerField, CharField,PrimaryKeyField from website.app import db_wr...
zh
0.717006
#!/usr/bin/env python # -*- coding: utf-8 -*- 生成验证邮箱的token 验证邮箱 # 验证成功,写入数据库 生成重置密码的token 重置密码 # 验证成功,写入数据库 匿名用户
2.499303
2
FlaskApp/__init__.py
robertavram/project5
7
7265
# application import application
# application import application
en
0.869101
# application
1.099974
1
sim2net/speed/constant.py
harikuts/dsr_optimization
12
7266
<reponame>harikuts/dsr_optimization #!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2012 <NAME> <mkalewski at cs.put.poznan.pl> # # This file is a part of the Simple Network Simulator (sim2net) project. # USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO # THE TERMS AND CONDITIONS OF THE...
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2012 <NAME> <mkalewski at cs.put.poznan.pl> # # This file is a part of the Simple Network Simulator (sim2net) project. # USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO # THE TERMS AND CONDITIONS OF THE MIT LICENSE. YOU SHOULD HAVE RECEI...
en
0.591348
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2012 <NAME> <mkalewski at cs.put.poznan.pl> # # This file is a part of the Simple Network Simulator (sim2net) project. # USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO # THE TERMS AND CONDITIONS OF THE MIT LICENSE. YOU SHOULD HAVE RECEIVE...
3.260507
3
nexula/nexula_utility/utility_extract_func.py
haryoa/nexula
3
7267
<reponame>haryoa/nexula from nexula.nexula_utility.utility_import_var import import_class class NexusFunctionModuleExtractor(): """ Used for constructing pipeline data preporcessing and feature representer """ def __init__(self, module_class_list, args_dict, **kwargs): """ Instantiate...
from nexula.nexula_utility.utility_import_var import import_class class NexusFunctionModuleExtractor(): """ Used for constructing pipeline data preporcessing and feature representer """ def __init__(self, module_class_list, args_dict, **kwargs): """ Instantiate class(es) object in pip...
en
0.339729
Used for constructing pipeline data preporcessing and feature representer Instantiate class(es) object in pipeline Parameters ---------- module_class_list args_dict kwargs # self.list_of_cls = self._search_module_function(module_class_list) # Extract call Instantiate object of al...
2.383852
2
marbas/preprocessing.py
MJ-Jang/Marbas
0
7268
<filename>marbas/preprocessing.py import os from configparser import ConfigParser cfg = ConfigParser() #PATH_CUR = os.getcwd() + '/pynori' PATH_CUR = os.path.dirname(__file__) cfg.read(PATH_CUR+'/config.ini') # PREPROCESSING ENG_LOWER = cfg.getboolean('PREPROCESSING', 'ENG_LOWER') class Preprocessing(object): """Pr...
<filename>marbas/preprocessing.py import os from configparser import ConfigParser cfg = ConfigParser() #PATH_CUR = os.getcwd() + '/pynori' PATH_CUR = os.path.dirname(__file__) cfg.read(PATH_CUR+'/config.ini') # PREPROCESSING ENG_LOWER = cfg.getboolean('PREPROCESSING', 'ENG_LOWER') class Preprocessing(object): """Pr...
en
0.673871
#PATH_CUR = os.getcwd() + '/pynori' # PREPROCESSING Preprocessing modules before tokenizing It doesn't need to be initialized. To correct typing errors To correct spacing errors
2.807861
3
pravash/servicenowplugin/xlr-servicenow-plugin-master/src/main/resources/servicenow/ServiceNowQueryTile.py
amvasudeva/rapidata
0
7269
# # THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS # FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. # import com.xhaus.jyson.JysonCodec...
# # THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS # FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. # import com.xhaus.jyson.JysonCodec...
en
0.58321
# # THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS # FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. #
2.058003
2
bc/recruitment/migrations/0022_merge_20200331_1633.py
Buckinghamshire-Digital-Service/buckinghamshire-council
1
7270
<reponame>Buckinghamshire-Digital-Service/buckinghamshire-council<filename>bc/recruitment/migrations/0022_merge_20200331_1633.py # Generated by Django 2.2.10 on 2020-03-31 15:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("recruitment", "0021_merge_20200331_...
# Generated by Django 2.2.10 on 2020-03-31 15:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("recruitment", "0021_merge_20200331_1503"), ("recruitment", "0013_button_block"), ] operations = []
en
0.741943
# Generated by Django 2.2.10 on 2020-03-31 15:33
1.254366
1
Stage_3/Task11_Graph/depth_first_search.py
Pyabecedarian/Algorithms-and-Data-Structures-using-Python
0
7271
""" The Depth First Search (DFS) The goal of a dfs is to search as deeply as possible, connecting as many nodes in the graph as possible and branching where necessary. Think of the BFS that builds a search tree one level at a time, whereas the DFS creates a search tree by exploring one branch of the tree a...
""" The Depth First Search (DFS) The goal of a dfs is to search as deeply as possible, connecting as many nodes in the graph as possible and branching where necessary. Think of the BFS that builds a search tree one level at a time, whereas the DFS creates a search tree by exploring one branch of the tree a...
en
0.950015
The Depth First Search (DFS) The goal of a dfs is to search as deeply as possible, connecting as many nodes in the graph as possible and branching where necessary. Think of the BFS that builds a search tree one level at a time, whereas the DFS creates a search tree by exploring one branch of the tree as de...
4.118445
4
salt/_modules/freebsd_common.py
rbtcollins/rusty_rail
16
7272
def sysrc(value): """Call sysrc. CLI Example: .. code-block:: bash salt '*' freebsd_common.sysrc sshd_enable=YES salt '*' freebsd_common.sysrc static_routes """ return __salt__['cmd.run_all']("sysrc %s" % value)
def sysrc(value): """Call sysrc. CLI Example: .. code-block:: bash salt '*' freebsd_common.sysrc sshd_enable=YES salt '*' freebsd_common.sysrc static_routes """ return __salt__['cmd.run_all']("sysrc %s" % value)
en
0.131479
Call sysrc. CLI Example: .. code-block:: bash salt '*' freebsd_common.sysrc sshd_enable=YES salt '*' freebsd_common.sysrc static_routes
1.778231
2
auth0/v3/management/blacklists.py
jhunken/auth0-python
0
7273
from .rest import RestClient class Blacklists(object): """Auth0 blacklists endpoints Args: domain (str): Your Auth0 domain, e.g: 'username.auth0.com' token (str): Management API v2 Token telemetry (bool, optional): Enable or disable Telemetry (defaults to True) """ ...
from .rest import RestClient class Blacklists(object): """Auth0 blacklists endpoints Args: domain (str): Your Auth0 domain, e.g: 'username.auth0.com' token (str): Management API v2 Token telemetry (bool, optional): Enable or disable Telemetry (defaults to True) """ ...
en
0.790385
Auth0 blacklists endpoints Args: domain (str): Your Auth0 domain, e.g: 'username.auth0.com' token (str): Management API v2 Token telemetry (bool, optional): Enable or disable Telemetry (defaults to True) Retrieves the jti and aud of all tokens in the blacklist. Args: ...
2.730898
3
test_backtest/simplebacktest.py
qzm/QUANTAXIS
1
7274
<gh_stars>1-10 # coding=utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2018 yutiansut/QUANTAXIS # # 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 withou...
# coding=utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2018 yutiansut/QUANTAXIS # # 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 th...
en
0.594631
# coding=utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2018 yutiansut/QUANTAXIS # # 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 th...
1.572949
2
artview/components/field.py
jjhelmus/artview
0
7275
""" field.py Class instance used for modifying field via Display window. """ # Load the needed packages from functools import partial from ..core import Variable, Component, QtGui, QtCore class FieldButtonWindow(Component): '''Class to display a Window with Field name radio buttons.''' Vradar = None #: s...
""" field.py Class instance used for modifying field via Display window. """ # Load the needed packages from functools import partial from ..core import Variable, Component, QtGui, QtCore class FieldButtonWindow(Component): '''Class to display a Window with Field name radio buttons.''' Vradar = None #: s...
en
0.644291
field.py Class instance used for modifying field via Display window. # Load the needed packages Class to display a Window with Field name radio buttons. #: see :ref:`shared_variable` #: see :ref:`shared_variable` Initialize the class to create the interface. Parameters ---------- [Optional] ...
2.965497
3
rest_framework_mongoengine/fields.py
Careerleaf/django-rest-framework-mongoengine
0
7276
from bson.errors import InvalidId from django.core.exceptions import ValidationError from django.utils.encoding import smart_str from mongoengine import dereference from mongoengine.base.document import BaseDocument from mongoengine.document import Document from rest_framework import serializers from mongoengine.fields...
from bson.errors import InvalidId from django.core.exceptions import ValidationError from django.utils.encoding import smart_str from mongoengine import dereference from mongoengine.base.document import BaseDocument from mongoengine.document import Document from rest_framework import serializers from mongoengine.fields...
en
0.657781
# default value of depth # serialize each required field # finally check for an attribute 'field' on the instance Models to natives Recursion for (embedded) objects # Return primary key if exists, else return default text # Document, EmbeddedDocument # Dictionaries # List # Check if dereference was successful
2.124874
2
tests/conftest.py
bbhunter/fuzz-lightyear
169
7277
import pytest from fuzz_lightyear.datastore import _ALL_POST_FUZZ_HOOKS_BY_OPERATION from fuzz_lightyear.datastore import _ALL_POST_FUZZ_HOOKS_BY_TAG from fuzz_lightyear.datastore import _RERUN_POST_FUZZ_HOOKS_BY_OPERATION from fuzz_lightyear.datastore import _RERUN_POST_FUZZ_HOOKS_BY_TAG from fuzz_lightyear.datastore...
import pytest from fuzz_lightyear.datastore import _ALL_POST_FUZZ_HOOKS_BY_OPERATION from fuzz_lightyear.datastore import _ALL_POST_FUZZ_HOOKS_BY_TAG from fuzz_lightyear.datastore import _RERUN_POST_FUZZ_HOOKS_BY_OPERATION from fuzz_lightyear.datastore import _RERUN_POST_FUZZ_HOOKS_BY_TAG from fuzz_lightyear.datastore...
en
0.944249
In theory we're not supposed to use hypothesis' strategy.example(), but fuzz-lightyear isn't using hypothesis in a normal way.
1.795887
2
src/diepvries/field.py
michael-the1/diepvries
67
7278
"""Module for a Data Vault field.""" from typing import Optional from . import ( FIELD_PREFIX, FIELD_SUFFIX, METADATA_FIELDS, TABLE_PREFIXES, UNKNOWN, FieldDataType, FieldRole, TableType, ) class Field: """A field in a Data Vault model.""" def __init__( self, ...
"""Module for a Data Vault field.""" from typing import Optional from . import ( FIELD_PREFIX, FIELD_SUFFIX, METADATA_FIELDS, TABLE_PREFIXES, UNKNOWN, FieldDataType, FieldRole, TableType, ) class Field: """A field in a Data Vault model.""" def __init__( self, ...
en
0.724669
Module for a Data Vault field. A field in a Data Vault model. Instantiate a Field. Convert both name and parent_table_name to lower case. Args: parent_table_name: Name of parent table in the database. name: Column name in the database. data_type: Column data type in...
3.056426
3
mmdet/datasets/deepscoresV2.py
tuggeluk/mmdetection
1
7279
<reponame>tuggeluk/mmdetection """DEEPSCORESV2 Provides access to the DEEPSCORESV2 database with a COCO-like interface. The only changes made compared to the coco.py file are the class labels. Author: <NAME> <<EMAIL>> <NAME> <<EMAIL>> Created on: November 23, 2019 """ from .coco import * import os import...
"""DEEPSCORESV2 Provides access to the DEEPSCORESV2 database with a COCO-like interface. The only changes made compared to the coco.py file are the class labels. Author: <NAME> <<EMAIL>> <NAME> <<EMAIL>> Created on: November 23, 2019 """ from .coco import * import os import json from obb_anns import OBBA...
en
0.764122
DEEPSCORESV2 Provides access to the DEEPSCORESV2 database with a COCO-like interface. The only changes made compared to the coco.py file are the class labels. Author: <NAME> <<EMAIL>> <NAME> <<EMAIL>> Created on: November 23, 2019 # we have no ignore feature Evaluation in COCO protocol. Args: ...
2.432298
2
tests/go_cd_configurator_test.py
agsmorodin/gomatic
0
7280
#!/usr/bin/env python import unittest from xml.dom.minidom import parseString import xml.etree.ElementTree as ET from decimal import Decimal from gomatic import GoCdConfigurator, FetchArtifactDir, RakeTask, ExecTask, ScriptExecutorTask, FetchArtifactTask, \ FetchArtifactFile, Tab, GitMaterial, PipelineMaterial,...
#!/usr/bin/env python import unittest from xml.dom.minidom import parseString import xml.etree.ElementTree as ET from decimal import Decimal from gomatic import GoCdConfigurator, FetchArtifactDir, RakeTask, ExecTask, ScriptExecutorTask, FetchArtifactTask, \ FetchArtifactFile, Tab, GitMaterial, PipelineMaterial,...
en
0.479275
#!/usr/bin/env python echo This is script echo 'This is a string in single quotes' echo "This is a string in double quotes" # TODO: maybe None could be avoided # attributes that are missing are returned as empty # not secure # TODO swap label with typical # exec reverse_engineered_python.replace("from g...
2.03067
2
gui/wellplot/settings/style/wellplotstylehandler.py
adriangrepo/qreservoir
2
7281
import logging from qrutilities.imageutils import ImageUtils from PyQt4.QtGui import QColor logger = logging.getLogger('console') class WellPlotStyleHandler(object): ''' classdocs ''' def saveDataState(self, wellPlotData, wellPlotStyleWidget): if wellPlotStyleWidget.plotTitleOnCheckBox.isC...
import logging from qrutilities.imageutils import ImageUtils from PyQt4.QtGui import QColor logger = logging.getLogger('console') class WellPlotStyleHandler(object): ''' classdocs ''' def saveDataState(self, wellPlotData, wellPlotStyleWidget): if wellPlotStyleWidget.plotTitleOnCheckBox.isC...
none
1
2.309356
2
utm_messages/urls.py
geoffreynyaga/ANGA-UTM
7
7282
from django.conf.urls import url from . import views app_name = "messages" urlpatterns = [ url(r'^$', views.InboxListView.as_view(), name='inbox'), url(r'^sent/$', views.SentMessagesListView.as_view(), name='sent'), url(r'^compose/$', views.MessagesCreateView.as_view(), name='compo...
from django.conf.urls import url from . import views app_name = "messages" urlpatterns = [ url(r'^$', views.InboxListView.as_view(), name='inbox'), url(r'^sent/$', views.SentMessagesListView.as_view(), name='sent'), url(r'^compose/$', views.MessagesCreateView.as_view(), name='compo...
en
0.505098
# url(r'^compose-all/$', views.SendToAll.as_view(), name='compose_to_all'),
1.822607
2
server/apps/datablock/tests/test_create_worker.py
iotile/iotile_cloud
0
7283
import datetime import json import dateutil.parser from django.contrib.auth import get_user_model from django.test import Client, TestCase from django.utils import timezone from apps.devicelocation.models import DeviceLocation from apps.physicaldevice.models import Device from apps.property.models import GenericProp...
import datetime import json import dateutil.parser from django.contrib.auth import get_user_model from django.test import Client, TestCase from django.utils import timezone from apps.devicelocation.models import DeviceLocation from apps.physicaldevice.models import Device from apps.property.models import GenericProp...
none
1
1.911104
2
nova/policies/servers.py
maya2250/nova
0
7284
<reponame>maya2250/nova<gh_stars>0 # 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 ag...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
en
0.845488
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
1.598939
2
set-env.py
sajaldebnath/vrops-custom-group-creation
1
7285
<gh_stars>1-10 # !/usr/bin python """ # # set-env - a small python program to setup the configuration environment for data-push.py # data-push.py contains the python program to push attribute values to vROps # Author <NAME> <<EMAIL>> # """ # Importing the required modules import json import base64 impor...
# !/usr/bin python """ # # set-env - a small python program to setup the configuration environment for data-push.py # data-push.py contains the python program to push attribute values to vROps # Author <NAME> <<EMAIL>> # """ # Importing the required modules import json import base64 import os,sys #...
en
0.741992
# !/usr/bin python # # set-env - a small python program to setup the configuration environment for data-push.py # data-push.py contains the python program to push attribute values to vROps # Author <NAME> <<EMAIL>> # # Importing the required modules # Getting the absolute path from where the script is being run # ...
2.528517
3
week02/day08.py
gtadeus/LeetCodeChallenge2009
0
7286
<filename>week02/day08.py import unittest # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def sumRootToLeaf(self, root: TreeNode) -> int: m = self.c(root) ...
<filename>week02/day08.py import unittest # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def sumRootToLeaf(self, root: TreeNode) -> int: m = self.c(root) ...
en
0.547993
# Definition for a binary tree node. #v = l.val << 1
3.826759
4
config.py
tiuD/cross-prom
0
7287
<filename>config.py TOKEN = "<KEY>" CHAT_ID = [957539786] # e.g. [1234567, 2233445, 3466123...]
<filename>config.py TOKEN = "<KEY>" CHAT_ID = [957539786] # e.g. [1234567, 2233445, 3466123...]
en
0.164294
# e.g. [1234567, 2233445, 3466123...]
1.116735
1
buchschloss/gui2/__init__.py
mik2k2/buchschloss
1
7288
"""entry point""" from . import main start = main.app.launch
"""entry point""" from . import main start = main.app.launch
en
0.628459
entry point
1.102467
1
src/tests/test_stop_at_task.py
francesco-p/FACIL
243
7289
<filename>src/tests/test_stop_at_task.py from tests import run_main_and_assert FAST_LOCAL_TEST_ARGS = "--exp-name local_test --datasets mnist" \ " --network LeNet --num-tasks 5 --seed 1 --batch-size 32" \ " --nepochs 2 --num-workers 0 --stop-at-task 3" def test_finetunin...
<filename>src/tests/test_stop_at_task.py from tests import run_main_and_assert FAST_LOCAL_TEST_ARGS = "--exp-name local_test --datasets mnist" \ " --network LeNet --num-tasks 5 --seed 1 --batch-size 32" \ " --nepochs 2 --num-workers 0 --stop-at-task 3" def test_finetunin...
none
1
1.940825
2
Python/contains-duplicate.py
shreyventure/LeetCode-Solutions
388
7290
<gh_stars>100-1000 # Autor: <NAME> (@optider) # Github Profile: https://github.com/Optider/ # Problem Link: https://leetcode.com/problems/contains-duplicate/ class Solution: def containsDuplicate(self, nums: List[int]) -> bool: count = {} for n in nums : if count.get(n) != None : ...
# Autor: <NAME> (@optider) # Github Profile: https://github.com/Optider/ # Problem Link: https://leetcode.com/problems/contains-duplicate/ class Solution: def containsDuplicate(self, nums: List[int]) -> bool: count = {} for n in nums : if count.get(n) != None : return T...
en
0.803932
# Autor: <NAME> (@optider) # Github Profile: https://github.com/Optider/ # Problem Link: https://leetcode.com/problems/contains-duplicate/
3.031
3
build/android/gyp/dex.py
google-ar/chromium
2,151
7291
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import optparse import os import sys import tempfile import zipfile from util import build_utils def _C...
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import optparse import os import sys import tempfile import zipfile from util import build_utils def _C...
en
0.881707
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # dx ignores non .jar files. # We've seen dx --incremental fail for small libraries. It's unlikely a # speed-up anyways in this case. ...
2.142809
2
apps/views.py
Edwardhgj/meiduo
0
7292
<reponame>Edwardhgj/meiduo from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth.hashers import check_password, make_password from django.views import View from utils.response_code import RET, error_map from rest_framework.views import APIView from rest_framework.response im...
from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth.hashers import check_password, make_password from django.views import View from utils.response_code import RET, error_map from rest_framework.views import APIView from rest_framework.response import Response from apps.ser...
zh
0.942344
# Create your views here. # 展示登陆页 # 提交登陆 #反射 # print(name,passwd) # 查询name # 比较密码 # 登陆成功 # 注册 # 展示首页 # 展示分类页面 # 展示新闻页面 #展示焦点图页面 #展示标签页面 #展示商品页面 #展示商品页面 #展示焦点图页面 # 分类列表 #标签列表 # 商品列表 #新闻列表 #焦点图列表 # 添加分类页面 # 获取一级分类 #修改 # 添加标签页面 # print('sdf') #修改 # 添加商品页面 # print('ceshi') # 获取所有商品 # print(one_goods) # 添加商品页面 # print('cesh...
2.138686
2
learnedevolution/targets/covariance/amalgam_covariance.py
realtwister/LearnedEvolution
0
7293
<filename>learnedevolution/targets/covariance/amalgam_covariance.py import numpy as np; from .covariance_target import CovarianceTarget; class AMaLGaMCovariance(CovarianceTarget): _API=2. def __init__(self, theta_SDR = 1., eta_DEC = 0.9, alpha_Sigma = [-1.1,1.2,1.6], NIS_MAX = ...
<filename>learnedevolution/targets/covariance/amalgam_covariance.py import numpy as np; from .covariance_target import CovarianceTarget; class AMaLGaMCovariance(CovarianceTarget): _API=2. def __init__(self, theta_SDR = 1., eta_DEC = 0.9, alpha_Sigma = [-1.1,1.2,1.6], NIS_MAX = ...
en
0.864118
# We need to ensure the condition number is OK to avoid singular matrix.
2.319334
2
binding.gyp
terrorizer1980/fs-admin
25
7294
<reponame>terrorizer1980/fs-admin { 'target_defaults': { 'win_delay_load_hook': 'false', 'conditions': [ ['OS=="win"', { 'msvs_disabled_warnings': [ 4530, # C++ exception handler used, but unwind semantics are not enabled 4506, # no definition for inline function ],...
{ 'target_defaults': { 'win_delay_load_hook': 'false', 'conditions': [ ['OS=="win"', { 'msvs_disabled_warnings': [ 4530, # C++ exception handler used, but unwind semantics are not enabled 4506, # no definition for inline function ], }], ], }, 'targets'...
en
0.390758
# C++ exception handler used, but unwind semantics are not enabled # no definition for inline function
1.100657
1
src/botwtracker/settings.py
emoritzx/botw-tracker
7
7295
"""Django settings for botwtracker project. Copyright (c) 2017, <NAME>. botw-tracker is an open source software project released under the MIT License. See the accompanying LICENSE file for terms. """ import os from .config_local import * # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_...
"""Django settings for botwtracker project. Copyright (c) 2017, <NAME>. botw-tracker is an open source software project released under the MIT License. See the accompanying LICENSE file for terms. """ import os from .config_local import * # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_...
en
0.591237
Django settings for botwtracker project. Copyright (c) 2017, <NAME>. botw-tracker is an open source software project released under the MIT License. See the accompanying LICENSE file for terms. # Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Application definition # Database # https://docs.d...
1.553986
2
app/domains/users/views.py
Geo-Gabriel/eccomerce_nestle_mongodb
3
7296
<gh_stars>1-10 from flask import Blueprint, request, jsonify from app.domains.users.actions import get_all_users, insert_user, get_user_by_id, update_user, delete_user app_users = Blueprint('app.users', __name__) @app_users.route('/users', methods=['GET']) def get_users(): return jsonify([user.serialize() for u...
from flask import Blueprint, request, jsonify from app.domains.users.actions import get_all_users, insert_user, get_user_by_id, update_user, delete_user app_users = Blueprint('app.users', __name__) @app_users.route('/users', methods=['GET']) def get_users(): return jsonify([user.serialize() for user in get_all_...
none
1
2.627367
3
legacy_code/tf_cnn_siamese/model.py
PerryXDeng/project_punyslayer
2
7297
import legacy_code.tf_cnn_siamese.configurations as conf import tensorflow as tf import numpy as np def construct_cnn(x, conv_weights, conv_biases, fc_weights, fc_biases, dropout = False): """ constructs the convolution graph for one image :param x: input node :param conv_weights: convolutio...
import legacy_code.tf_cnn_siamese.configurations as conf import tensorflow as tf import numpy as np def construct_cnn(x, conv_weights, conv_biases, fc_weights, fc_biases, dropout = False): """ constructs the convolution graph for one image :param x: input node :param conv_weights: convolutio...
en
0.739996
constructs the convolution graph for one image :param x: input node :param conv_weights: convolution weights :param conv_biases: relu biases for each convolution :param fc_weights: fully connected weights, only one set should be used here :param fc_biases: fully connected biases, only one set should be used h...
3.066107
3
tests/test_utils_log.py
FingerCrunch/scrapy
41,267
7298
import sys import logging import unittest from testfixtures import LogCapture from twisted.python.failure import Failure from scrapy.utils.log import (failure_to_exc_info, TopLevelFormatter, LogCounterHandler, StreamLogger) from scrapy.utils.test import get_crawler from scrapy.extensions...
import sys import logging import unittest from testfixtures import LogCapture from twisted.python.failure import Failure from scrapy.utils.log import (failure_to_exc_info, TopLevelFormatter, LogCounterHandler, StreamLogger) from scrapy.utils.test import get_crawler from scrapy.extensions...
en
0.748808
# disable it to avoid the extra warning
2.389423
2
astar.py
jeff012345/clue-part-duo
0
7299
<reponame>jeff012345/clue-part-duo import heapq from typing import List from definitions import RoomPosition, Position import random import sys class PriorityQueue: def __init__(self): self.elements: Array = [] def empty(self) -> bool: return len(self.elements) == 0 def put(self, ...
import heapq from typing import List from definitions import RoomPosition, Position import random import sys class PriorityQueue: def __init__(self): self.elements: Array = [] def empty(self) -> bool: return len(self.elements) == 0 def put(self, item, priority: float): hea...
en
0.902974
# (1^2 + 0^2) # (1^2 + 0^2) # both are Space # once you enter a room, it's a dead end
3.842534
4