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
mlrun/api/schemas/frontend_spec.py
rpatil524/mlrun
0
6628251
<filename>mlrun/api/schemas/frontend_spec.py import typing import pydantic class FrontendSpec(pydantic.BaseModel): jobs_dashboard_url: typing.Optional[str]
<filename>mlrun/api/schemas/frontend_spec.py import typing import pydantic class FrontendSpec(pydantic.BaseModel): jobs_dashboard_url: typing.Optional[str]
none
1
1.616083
2
login/casLogin.py
illusion2018/fuckTodayStudy
0
6628252
<gh_stars>0 import json import re import requests from bs4 import BeautifulSoup from urllib3.exceptions import InsecureRequestWarning from login.Utils import Utils requests.packages.urllib3.disable_warnings(InsecureRequestWarning) class casLogin: # 初始化cas登陆模块 def __init__(self, username, password, login_url,...
import json import re import requests from bs4 import BeautifulSoup from urllib3.exceptions import InsecureRequestWarning from login.Utils import Utils requests.packages.urllib3.disable_warnings(InsecureRequestWarning) class casLogin: # 初始化cas登陆模块 def __init__(self, username, password, login_url, host, sessi...
zh
0.898292
# 初始化cas登陆模块 # 判断是否需要验证码 # 填充数据 # 如果等于302强制跳转,代表登陆成功
2.80834
3
game/urls.py
claudiordgz/tictactoe-django
0
6628253
<reponame>claudiordgz/tictactoe-django from django.conf.urls import patterns, url urlpatterns = patterns( 'game.views', url(r'^$', 'index', name='index'), url(r'^(?P<pk>\d+)/$', 'game', name='detail') )
from django.conf.urls import patterns, url urlpatterns = patterns( 'game.views', url(r'^$', 'index', name='index'), url(r'^(?P<pk>\d+)/$', 'game', name='detail') )
none
1
1.808033
2
project/newsfeed/models.py
beijbom/coralnet
31
6628254
from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from images.models import Source from django.contrib.auth.models import User # Create your models here. def log_item(source, user, category, message): """ Convenience method for creating a new NewsIt...
from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from images.models import Source from django.contrib.auth.models import User # Create your models here. def log_item(source, user, category, message): """ Convenience method for creating a new NewsIt...
en
0.916354
# Create your models here. Convenience method for creating a new NewsItem. Convenience method for creating a new NewsSubItem. These are main news-items to be displayed in the source main pages as well on an aggregate listings. # Not using foreign keys since we don't want to delete a news-item if a # source or user ...
2.414139
2
mobile/features/pages/base_page.py
mauriciochaves/minicursopythonnordeste
1
6628255
from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from appium import webdriver class BasePage: def __init__(self, driver): self.driver = driver def get_title(self): return self.driver.title def click(self, locator): ...
from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from appium import webdriver class BasePage: def __init__(self, driver): self.driver = driver def get_title(self): return self.driver.title def click(self, locator): ...
none
1
2.753959
3
src/the_tale/the_tale/common/utils/resources.py
devapromix/the-tale
1
6628256
<gh_stars>1-10 import smart_imports smart_imports.all() class Resource(dext_old_views.BaseResource): ERROR_TEMPLATE = 'error.html' DIALOG_ERROR_TEMPLATE = 'dialog_error.html' def __init__(self, request, *args, **kwargs): super(Resource, self).__init__(request, *args, **kwargs) self.ac...
import smart_imports smart_imports.all() class Resource(dext_old_views.BaseResource): ERROR_TEMPLATE = 'error.html' DIALOG_ERROR_TEMPLATE = 'dialog_error.html' def __init__(self, request, *args, **kwargs): super(Resource, self).__init__(request, *args, **kwargs) self.account = self.req...
none
1
1.835801
2
eulerangles/math/rotation_matrix_to_eulers.py
alisterburt/eulerangles
13
6628257
import numpy as np from .constants import valid_axes def matrix2xyx_extrinsic(rotation_matrices: np.ndarray) -> np.ndarray: """ Rx(k3) @ Ry(k2) @ Rx(k1) = [[c2, s1s2, c1s2], [s2s3, -s1c2s3+c1c3, -c1c2s3-s1c3], [-s2c3, s1c2c3+c1s3, c1c2c3-s1s3]] ...
import numpy as np from .constants import valid_axes def matrix2xyx_extrinsic(rotation_matrices: np.ndarray) -> np.ndarray: """ Rx(k3) @ Ry(k2) @ Rx(k1) = [[c2, s1s2, c1s2], [s2s3, -s1c2s3+c1c3, -c1c2s3-s1c3], [-s2c3, s1c2c3+c1s3, c1c2c3-s1s3]] ...
en
0.730567
Rx(k3) @ Ry(k2) @ Rx(k1) = [[c2, s1s2, c1s2], [s2s3, -s1c2s3+c1c3, -c1c2s3-s1c3], [-s2c3, s1c2c3+c1s3, c1c2c3-s1s3]] # Angle 2 can be taken directly from matrices # Gimbal lock case (s2 = 0) # Find indices where this is the case # Calculate angle 1 and set...
2.610132
3
polecat/utils/singledict.py
furious-luke/polecat
4
6628258
<reponame>furious-luke/polecat from collections import OrderedDict class SingleDict(OrderedDict): def __setitem__(self, key, value): if key in self: raise KeyError(f'Duplicate key "{key}"') super().__setitem__(key, value)
from collections import OrderedDict class SingleDict(OrderedDict): def __setitem__(self, key, value): if key in self: raise KeyError(f'Duplicate key "{key}"') super().__setitem__(key, value)
none
1
3.11196
3
code/fig_6b_example_waveform_shape.py
ryanhammonds/ieeg-spatial-filters-ssd
14
6628259
""" Shows example of close-by rhythms with different waveform. """ import mne import numpy as np import matplotlib.pyplot as plt import helper import ssd import matplotlib.gridspec as gridspec import pandas as pd import matplotlib.image as mpimg plt.ion() # -- load continuous data participant_id = "jc_fixation_pwrlaw...
""" Shows example of close-by rhythms with different waveform. """ import mne import numpy as np import matplotlib.pyplot as plt import helper import ssd import matplotlib.gridspec as gridspec import pandas as pd import matplotlib.image as mpimg plt.ion() # -- load continuous data participant_id = "jc_fixation_pwrlaw...
en
0.722796
Shows example of close-by rhythms with different waveform. # -- load continuous data # -- pick the channels contributing most to the spatial patterns for comparison # -- compute spectrum # -- plot time domain # -- plot spectrum # -- plot peak frequency markers # -- plot participant summary # -- asymmetries across 3d br...
2.229877
2
pypelines/tasks/task_script.py
Yash-Amin/pypelines
0
6628260
"""Task to run scripts.""" import re import os import stat import tempfile import subprocess from typing import Any, Dict, List from pypelines.utils import string_to_bool from pypelines.config import SCRIPTS_DIRECTORY from pypelines.pipeline_options import PipelineOptions from pypelines.task import PipelineTask, TaskI...
"""Task to run scripts.""" import re import os import stat import tempfile import subprocess from typing import Any, Dict, List from pypelines.utils import string_to_bool from pypelines.config import SCRIPTS_DIRECTORY from pypelines.pipeline_options import PipelineOptions from pypelines.task import PipelineTask, TaskI...
en
0.661361
Task to run scripts. # Task input keys Script task. Validate inputs Sets task inputs # if use_snapshots is not set, then set it to pipeline_options.use_snapshots # use_snapshot will be true only if it is set to true and # pipeline-options.use_snapshots is true as well Run script task. # TODO: snapshot check # Gives RWX...
2.551656
3
part4/Folium/Folium_Choropleth.py
tls1403/PythonTest
0
6628261
<reponame>tls1403/PythonTest<gh_stars>0 import pandas as pd import folium import json file_path = 'D:/5674-833_4th/part4/경기도인구데이터.xlsx' df =pd.read_excel(file_path,index_col='구분',engine= 'openpyxl') #열(2007,2008,,,)을 string 으로 바꿔줌 df.columns = df.columns.map(str) #경기도 시군구 경계 정보를 가진 geo-json 파일 불러오기 geo_path = 'D:/56...
import pandas as pd import folium import json file_path = 'D:/5674-833_4th/part4/경기도인구데이터.xlsx' df =pd.read_excel(file_path,index_col='구분',engine= 'openpyxl') #열(2007,2008,,,)을 string 으로 바꿔줌 df.columns = df.columns.map(str) #경기도 시군구 경계 정보를 가진 geo-json 파일 불러오기 geo_path = 'D:/5674-833_4th/part4/경기도행정구역경계.json' try: ...
ko
1.000066
#열(2007,2008,,,)을 string 으로 바꿔줌 #경기도 시군구 경계 정보를 가진 geo-json 파일 불러오기 # 경기도 지도 만들기 #출력할 연도 선택 #Choropleth 클래스로 단계구분도 표시하기
2.638541
3
sympyosis/ext/processes/__init__.py
ZechCodes/sympyosis
0
6628262
<filename>sympyosis/ext/processes/__init__.py from sympyosis.ext.processes.supervisor import SupervisorManager
<filename>sympyosis/ext/processes/__init__.py from sympyosis.ext.processes.supervisor import SupervisorManager
none
1
1.107185
1
awards_app/forms.py
jakesIII/awwwards
0
6628263
from django import forms from .models import Profile,Project,Review SCORES = [ (1,1),(2,2), (3,3),(4,4), (5,5),(6,6), (7,7),(8,8), (9,9),(10,10), ] class ProfileUpdateForm(forms.ModelForm): class Meta: model=Profile exclude=['user'] class ProjectUploadForm(forms.ModelForm): ...
from django import forms from .models import Profile,Project,Review SCORES = [ (1,1),(2,2), (3,3),(4,4), (5,5),(6,6), (7,7),(8,8), (9,9),(10,10), ] class ProfileUpdateForm(forms.ModelForm): class Meta: model=Profile exclude=['user'] class ProjectUploadForm(forms.ModelForm): ...
none
1
2.084364
2
riseide/pconsole.py
yxdragon/riseide
0
6628264
<filename>riseide/pconsole.py from code import InteractiveConsole from multiprocessing import Pipe, Process import threading, time from pdb import Pdb import numpy as np import pandas as pd import sys def pretty_str(obj, l=10): if isinstance(obj, int): return str(obj) elif isinstance(obj, float): ...
<filename>riseide/pconsole.py from code import InteractiveConsole from multiprocessing import Pipe, Process import threading, time from pdb import Pdb import numpy as np import pandas as pd import sys def pretty_str(obj, l=10): if isinstance(obj, int): return str(obj) elif isinstance(obj, float): ...
en
0.355525
#if isinstance(data, str): data += end #f = lambda x: x+'\n' if isinstance(x, str) else x #db.message = lambda x: self.write(f(x)) # list field # send binary object # write binary object # dot means document #threading.Thread(target=cs.interact, args=()) #time.sleep(100) #self.recv('[Debug Completed...]\n')
2.596628
3
tweedle/core.py
sourcery-ai-bot/tweedle
2
6628265
<reponame>sourcery-ai-bot/tweedle __all__ = ["cli"] from importlib import import_module import click from tweedle import PROJECT_SRC, __version__ from tweedle.util import clickx SUBCMDS_FOLDER = PROJECT_SRC / 'cmd' class TweedleSubCommandsCLI(click.MultiCommand): def list_commands(self, ctx): # return...
__all__ = ["cli"] from importlib import import_module import click from tweedle import PROJECT_SRC, __version__ from tweedle.util import clickx SUBCMDS_FOLDER = PROJECT_SRC / 'cmd' class TweedleSubCommandsCLI(click.MultiCommand): def list_commands(self, ctx): # return [ # str(x.name)[:-3] ...
en
0.583722
# return [ # str(x.name)[:-3] for x in SUBCMDS_FOLDER.glob('*.py') # if not x.name.startswith('__init__') # ] Welcome to use tweedle, enjoy it and be efficient :P\n Please use "tweedle COMMAND --help" to get more detail of usages
2.294221
2
tests/test.py
lostblackknight/wordmarker
2
6628266
from wordmarker.loaders.default_resource_loader import DefaultResourceLoader if __name__ == '__main__': loader = DefaultResourceLoader() resource = loader.get_resource("E:\PycharmProjects\wordmarker\data\hh") print(resource.get_file()) print(resource.get_file_name()) print(loader.load(resource))
from wordmarker.loaders.default_resource_loader import DefaultResourceLoader if __name__ == '__main__': loader = DefaultResourceLoader() resource = loader.get_resource("E:\PycharmProjects\wordmarker\data\hh") print(resource.get_file()) print(resource.get_file_name()) print(loader.load(resource))
none
1
2.27606
2
sdk/python/pulumi_azure_native/operationalinsights/v20190801preview/__init__.py
sebtelko/pulumi-azure-native
0
6628267
<gh_stars>0 # coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from ... import _utilities import typing # Export this package's modules as members: from ._enums import * from .data_export import * from ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from ... import _utilities import typing # Export this package's modules as members: from ._enums import * from .data_export import * from .get_data_ex...
en
0.955671
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members:
0.924093
1
test/syscalls/build_defs.bzl
kimmkumsook/gvisor
1
6628268
<gh_stars>1-10 """Defines a rule for syscall test targets.""" # syscall_test is a macro that will create targets to run the given test target # on the host (native) and runsc. def syscall_test(test, shard_count = 1, size = "small", use_tmpfs = False): _syscall_test(test, shard_count, size, "native", False) _sy...
"""Defines a rule for syscall test targets.""" # syscall_test is a macro that will create targets to run the given test target # on the host (native) and runsc. def syscall_test(test, shard_count = 1, size = "small", use_tmpfs = False): _syscall_test(test, shard_count, size, "native", False) _syscall_test(test...
en
0.810307
Defines a rule for syscall test targets. # syscall_test is a macro that will create targets to run the given test target # on the host (native) and runsc. # Prepend "runsc" to non-native platform names. # Add the full_platform and file access in a tag to make it easier to run # all the tests on a specific flavor. Use -...
2.65639
3
heat/tests/test_auth_password.py
citrix-openstack-build/heat
0
6628269
<gh_stars>0 # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack Foundation # # 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....
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack Foundation # # 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...
en
0.814479
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack Foundation # # 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 ...
1.307761
1
completion/olivetti.py
carpeanon/input_convex
258
6628270
# local image = require 'image' # local H = require 'icnn.helper' # function f(inputFile, hidden, nTraining) # local data = {} # data.all = H.loadtxt(inputFile) # :t():clone() # :view(400, 1, 64, 64) # :transpose(3, 4):clone() # :div(255) # local topI = {{}, {}, {1, 32}, {1, 64}} # ...
# local image = require 'image' # local H = require 'icnn.helper' # function f(inputFile, hidden, nTraining) # local data = {} # data.all = H.loadtxt(inputFile) # :t():clone() # :view(400, 1, 64, 64) # :transpose(3, 4):clone() # :div(255) # local topI = {{}, {}, {1, 32}, {1, 64}} # ...
en
0.252955
# local image = require 'image' # local H = require 'icnn.helper' # function f(inputFile, hidden, nTraining) # local data = {} # data.all = H.loadtxt(inputFile) # :t():clone() # :view(400, 1, 64, 64) # :transpose(3, 4):clone() # :div(255) # local topI = {{}, {}, {1, 32}, {1, 64}} # l...
2.058031
2
examples/juniper/delete-config-jnpr.py
sebastianw/ncclient
1
6628271
#!/usr/bin/env python from ncclient import manager from ncclient.xml_ import * def connect(host, port, user, password, source): conn = manager.connect(host=host, port=port, username=user, password=password, timeout=10, hostkey_verify=False) template...
#!/usr/bin/env python from ncclient import manager from ncclient.xml_ import * def connect(host, port, user, password, source): conn = manager.connect(host=host, port=port, username=user, password=password, timeout=10, hostkey_verify=False) template...
en
0.270589
#!/usr/bin/env python <system><scripts><commit><file delete="delete"><name>test.slax</name></file></commit></scripts></system>
2.063141
2
tests/test_hlr.py
Notificore/notificore-python
0
6628272
#!/usr/bin/env python3 # pylint: disable=import-error import pytest import notificore_restapi as api @pytest.fixture def requester(): # noinspection PyPackageRequirements from tests.settings import API_KEY return api.HLRAPI(config=dict(api_key=API_KEY)) # noinspection PyShadowingNames ...
#!/usr/bin/env python3 # pylint: disable=import-error import pytest import notificore_restapi as api @pytest.fixture def requester(): # noinspection PyPackageRequirements from tests.settings import API_KEY return api.HLRAPI(config=dict(api_key=API_KEY)) # noinspection PyShadowingNames ...
en
0.34441
#!/usr/bin/env python3 # pylint: disable=import-error # noinspection PyPackageRequirements # noinspection PyShadowingNames # noinspection PyShadowingNames # noinspection PyShadowingNames # assertion if empty list # noinspection PyShadowingNames # '64': Invalid request payload # noinspection PyShadowingNames # noinspect...
1.97061
2
splunk_sdk/auth/auth_manager.py
splunk/splunk-cloud-sdk-python
12
6628273
<reponame>splunk/splunk-cloud-sdk-python # coding: utf-8 # Copyright © 2019 Splunk, Inc. # Licensed under the Apache License, Version 2.0 (the "License"): you may # not use this file except in compliance with the License. You may obtain # a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # Unless req...
# coding: utf-8 # Copyright © 2019 Splunk, Inc. # Licensed under the Apache License, Version 2.0 (the "License"): you may # not use this file except in compliance with the License. You may obtain # a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in w...
en
0.813178
# coding: utf-8 # Copyright © 2019 Splunk, Inc. # Licensed under the Apache License, Version 2.0 (the "License"): you may # not use this file except in compliance with the License. You may obtain # a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wr...
2.186488
2
app/config.py
LeandroBarone/WeCanTweetTogether
3
6628274
<gh_stars>1-10 import tweepy import logging import os logger = logging.getLogger() def create_api(): # Cargamos los datos secretos desde las variables de entorno consumer_key = os.getenv("CONSUMER_KEY") consumer_secret = os.getenv("CONSUMER_SECRET") access_token = os.getenv("ACCESS_TOKEN") access_token_secret = ...
import tweepy import logging import os logger = logging.getLogger() def create_api(): # Cargamos los datos secretos desde las variables de entorno consumer_key = os.getenv("CONSUMER_KEY") consumer_secret = os.getenv("CONSUMER_SECRET") access_token = os.getenv("ACCESS_TOKEN") access_token_secret = os.getenv("ACCE...
es
0.943736
# Cargamos los datos secretos desde las variables de entorno # Nos autenticamos con los datos secretos # Creamos el objeto para interactuar con la API # Verificamos si las credenciales son válidas
2.697683
3
tests/columns/test_reference.py
knguyen5/piccolo
0
6628275
<filename>tests/columns/test_reference.py """ Most of the tests for piccolo/columns/reference.py are covered in piccolo/columns/test_foreignkey.py """ from unittest import TestCase from piccolo.columns.reference import LazyTableReference class TestLazyTableReference(TestCase): def test_init(self): """ ...
<filename>tests/columns/test_reference.py """ Most of the tests for piccolo/columns/reference.py are covered in piccolo/columns/test_foreignkey.py """ from unittest import TestCase from piccolo.columns.reference import LazyTableReference class TestLazyTableReference(TestCase): def test_init(self): """ ...
en
0.569794
Most of the tests for piccolo/columns/reference.py are covered in piccolo/columns/test_foreignkey.py A ``LazyTableReference`` must be passed either an ``app_name`` or ``module_path`` argument. # Shouldn't raise exceptions:
2.703704
3
run.py
zeochoy/DeepSAC
0
6628276
<reponame>zeochoy/DeepSAC # -*- encoding: utf-8 -*- from sacapp import app #from skinapp.cocomodel import * if __name__ == "__main__": app.run(host="0.0.0.0", debug=app.config['DEBUG'], port=app.config['PORT'])
# -*- encoding: utf-8 -*- from sacapp import app #from skinapp.cocomodel import * if __name__ == "__main__": app.run(host="0.0.0.0", debug=app.config['DEBUG'], port=app.config['PORT'])
en
0.475226
# -*- encoding: utf-8 -*- #from skinapp.cocomodel import *
1.275808
1
stylee/cloth/migrations/0016_auto_20170926_1028.py
jbaek7023/Stylee-API
1
6628277
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-09-26 10:28 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cloth', '0015_cloth_big_cloth_type'), ] operations = [ migrations.AlterFiel...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-09-26 10:28 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cloth', '0015_cloth_big_cloth_type'), ] operations = [ migrations.AlterFiel...
en
0.727333
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-09-26 10:28
1.788457
2
pathos_being.py
andsteing/being
2
6628278
<gh_stars>1-10 #!/usr/local/python3 """Pathos being for linear motors.""" import logging from being.awakening import awake from being.backends import CanBackend from being.behavior import Behavior from being.logging import setup_logging, suppress_other_loggers from being.motion_player import MotionPlayer from being.mo...
#!/usr/local/python3 """Pathos being for linear motors.""" import logging from being.awakening import awake from being.backends import CanBackend from being.behavior import Behavior from being.logging import setup_logging, suppress_other_loggers from being.motion_player import MotionPlayer from being.motors import Lin...
en
0.813992
#!/usr/local/python3 Pathos being for linear motors. # Params Motor name. #setup_logging() # Scan for motors # Initialize remaining being blocks # Make block connections
2.328226
2
webStorm-APICloud/python_tools/Lib/xml/etree/ElementTree.py
zzr925028429/androidyianyan
81
6628279
# # ElementTree # $Id: ElementTree.py 2326 2005-03-17 07:45:21Z fredrik $ # # light-weight XML support for Python 1.5.2 and later. # # history: # 2001-10-20 fl created (from various sources) # 2001-11-01 fl return root from parse method # 2002-02-16 fl sort attributes in lexical order # 2002-04-06 fl ...
# # ElementTree # $Id: ElementTree.py 2326 2005-03-17 07:45:21Z fredrik $ # # light-weight XML support for Python 1.5.2 and later. # # history: # 2001-10-20 fl created (from various sources) # 2001-11-01 fl return root from parse method # 2002-02-16 fl sort attributes in lexical order # 2002-04-06 fl ...
en
0.611865
# # ElementTree # $Id: ElementTree.py 2326 2005-03-17 07:45:21Z fredrik $ # # light-weight XML support for Python 1.5.2 and later. # # history: # 2001-10-20 fl created (from various sources) # 2001-11-01 fl return root from parse method # 2002-02-16 fl sort attributes in lexical order # 2002-04-06 fl TreeBuilde...
1.870949
2
main.py
gwthomas/IQL-PyTorch
6
6628280
from pathlib import Path import gym import d4rl import numpy as np import torch from tqdm import trange from src.iql import ImplicitQLearning from src.policy import GaussianPolicy, DeterministicPolicy from src.value_functions import TwinQ, ValueFunction from src.util import return_range, set_seed, Log, sample_batch, ...
from pathlib import Path import gym import d4rl import numpy as np import torch from tqdm import trange from src.iql import ImplicitQLearning from src.policy import GaussianPolicy, DeterministicPolicy from src.value_functions import TwinQ, ValueFunction from src.util import return_range, set_seed, Log, sample_batch, ...
en
0.917702
# this assume continuous actions
2.086552
2
tests/modules/projects/test_models.py
karenc/houston
0
6628281
# -*- coding: utf-8 -*- # pylint: disable=invalid-name,missing-docstring import sqlalchemy import logging def test_project_add_members( db, temp_user, researcher_1, researcher_2 ): # pylint: disable=unused-argument from app.modules.projects.models import ( Project, ProjectUserMembershipEnro...
# -*- coding: utf-8 -*- # pylint: disable=invalid-name,missing-docstring import sqlalchemy import logging def test_project_add_members( db, temp_user, researcher_1, researcher_2 ): # pylint: disable=unused-argument from app.modules.projects.models import ( Project, ProjectUserMembershipEnro...
en
0.794796
# -*- coding: utf-8 -*- # pylint: disable=invalid-name,missing-docstring # pylint: disable=unused-argument # Doing this multiple times should not have an effect # try removing a user that's not in the project
2.27419
2
tests/utils.py
reidab/csvkit
0
6628282
#!/usr/bin/env python """ To test standard input (without piped data), run each of: * csvclean * csvcut -c 1 * csvformat * csvgrep -c 1 -m d * csvjson --no-inference --stream --snifflimit 0 * csvstack * in2csv --format csv --no-inference --snifflimit 0 And paste: "a","b","c" "g","h","i" "d","e","f" """ import sys...
#!/usr/bin/env python """ To test standard input (without piped data), run each of: * csvclean * csvcut -c 1 * csvformat * csvgrep -c 1 -m d * csvjson --no-inference --stream --snifflimit 0 * csvstack * in2csv --format csv --no-inference --snifflimit 0 And paste: "a","b","c" "g","h","i" "d","e","f" """ import sys...
en
0.315903
#!/usr/bin/env python To test standard input (without piped data), run each of: * csvclean * csvcut -c 1 * csvformat * csvgrep -c 1 -m d * csvjson --no-inference --stream --snifflimit 0 * csvstack * in2csv --format csv --no-inference --snifflimit 0 And paste: "a","b","c" "g","h","i" "d","e","f"
2.967879
3
hassio-google-drive-backup/dev/http_exception.py
voxipbx/hassio-addons
1
6628283
from aiohttp.web import HTTPClientError class HttpMultiException(HTTPClientError): def __init__(self, code): self.status_code = code
from aiohttp.web import HTTPClientError class HttpMultiException(HTTPClientError): def __init__(self, code): self.status_code = code
none
1
2.154283
2
displayio_labels/display_temperature_color.py
Neradoc/circuitpython-sample-scripts
3
6628284
<filename>displayio_labels/display_temperature_color.py import board import displayio import microcontroller import terminalio import time from adafruit_display_text.bitmap_label import Label import adafruit_fancyled.adafruit_fancyled as fancy blue = fancy.CRGB(0, 0, 1.0) red = fancy.CRGB(1.0, 0, 0) yellow = fancy.CR...
<filename>displayio_labels/display_temperature_color.py import board import displayio import microcontroller import terminalio import time from adafruit_display_text.bitmap_label import Label import adafruit_fancyled.adafruit_fancyled as fancy blue = fancy.CRGB(0, 0, 1.0) red = fancy.CRGB(1.0, 0, 0) yellow = fancy.CR...
en
0.633805
# test code showing the thing
3.064233
3
bardhub/playlist/migrations/0001_initial.py
migdotcom/music-library
0
6628285
# Generated by Django 3.0.5 on 2020-04-18 16:53 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Playlist', fields=[ ('id', models.AutoField...
# Generated by Django 3.0.5 on 2020-04-18 16:53 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Playlist', fields=[ ('id', models.AutoField...
en
0.812688
# Generated by Django 3.0.5 on 2020-04-18 16:53
1.790314
2
src/cli/create_service.py
Forcepoint/fp-bd-azure-casb
0
6628286
# # Author: <NAME> # created Date: 03-12-2019 import subprocess import yaml from subprocess import Popen from os import system, path class CreateService: def __init__(self, parser): self._parser = parser self._args = None self._settings = None def __call__(self, args): self....
# # Author: <NAME> # created Date: 03-12-2019 import subprocess import yaml from subprocess import Popen from os import system, path class CreateService: def __init__(self, parser): self._parser = parser self._args = None self._settings = None def __call__(self, args): self....
en
0.352675
# # Author: <NAME> # created Date: 03-12-2019 [Unit] Description= run azure_casb.service Requires=syslog-ng.service After=syslog-ng.service [Service] ExecStart={}/scripts/azure_casb.sh run -c {} [Install] WantedBy=multi-user.target
2.745373
3
holoviews/tests/core/testdecollation.py
goanpeca/holoviews
0
6628287
<gh_stars>0 from holoviews.core import HoloMap, NdOverlay, Overlay, GridSpace, DynamicMap from holoviews.element import Points from holoviews.element.comparison import ComparisonTestCase from holoviews.streams import Stream, PlotSize, RangeXY from holoviews.operation.datashader import spread, datashade import param c...
from holoviews.core import HoloMap, NdOverlay, Overlay, GridSpace, DynamicMap from holoviews.element import Points from holoviews.element.comparison import ComparisonTestCase from holoviews.streams import Stream, PlotSize, RangeXY from holoviews.operation.datashader import spread, datashade import param class XY(Stre...
en
0.737547
# kdims: a and b # kdims: b # no kdims, XY stream # no kdims, Z stream # dmap produced by chained datashade and shade # data shaded with kdims: a, b # DynamicMap of a derived stream # Update streams # Update streams # Check top-level stream types # Get expected # Call decollated callback function # Check kdims # Check ...
2.168075
2
ronald_bdl/models/squeezenet_dropout.py
ronaldseoh/ronald_bdl
2
6628288
<reponame>ronaldseoh/ronald_bdl import torch import torch.nn as nn import torch.nn.init as init from .utils import create_dropout_layer class FireDropout(nn.Module): def __init__(self, inplanes, squeeze_planes, expand1x1_planes, expand3x3_planes, **kwargs): super(FireDropout, self).__in...
import torch import torch.nn as nn import torch.nn.init as init from .utils import create_dropout_layer class FireDropout(nn.Module): def __init__(self, inplanes, squeeze_planes, expand1x1_planes, expand3x3_planes, **kwargs): super(FireDropout, self).__init__() self.inplanes = ...
en
0.845996
# Dropout related settings # Additional dropout layer # Additional dropout layer # Additional dropout layer # Dropout related settings # Additional dropout layer added here # Final convolution is initialized differently from the rest # SqueezeNet (and many other known CNNs) originally # do have dropout layers here, rig...
2.543046
3
bot.py
py1h0n-h4xer/instagram_bot
0
6628289
from selenium import webdriver from selenium.webdriver.common.keys import Keys from webdriver_manager.chrome import ChromeDriverManager import time from selenium.webdriver.common.action_chains import ActionChains from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer chatbot = Cha...
from selenium import webdriver from selenium.webdriver.common.keys import Keys from webdriver_manager.chrome import ChromeDriverManager import time from selenium.webdriver.common.action_chains import ActionChains from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer chatbot = Cha...
en
0.736399
#get to 1st user #get text #get response #send text #del conversation
2.656182
3
Lib/site-packages/elasticsearch5/client/tasks.py
Nibraz15/FullTextSearch
46
6628290
from .utils import NamespacedClient, query_params, _make_path class TasksClient(NamespacedClient): @query_params('actions', 'detailed', 'group_by', 'nodes', 'parent_node', 'parent_task_id', 'wait_for_completion') def list(self, params=None): """ `<http://www.elastic.co/guide/en/elastics...
from .utils import NamespacedClient, query_params, _make_path class TasksClient(NamespacedClient): @query_params('actions', 'detailed', 'group_by', 'nodes', 'parent_node', 'parent_task_id', 'wait_for_completion') def list(self, params=None): """ `<http://www.elastic.co/guide/en/elastics...
en
0.676703
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html>`_ :arg actions: A comma-separated list of actions that should be returned. Leave empty to return all. :arg detailed: Return detailed task information (default: false) :arg group_by: Group tasks by nodes or ...
2.499073
2
jeremy/ref/HappyNewYear.py
sin3000x/manim
0
6628291
<gh_stars>0 from manimlib.imports import * class HappyNewYear(Scene): def construct(self): text = TexMobject( r'''\int\frac{\mathrm{d}x}{a\sin x+b\cos x}=\begin{cases} \displaystyle\frac{1}{\sqrt{a^2+b^2}}\ln\left|\csc\left(x+\arctan\displaystyle\frac{b}{a}\right)-\cot\left(x+\arct...
from manimlib.imports import * class HappyNewYear(Scene): def construct(self): text = TexMobject( r'''\int\frac{\mathrm{d}x}{a\sin x+b\cos x}=\begin{cases} \displaystyle\frac{1}{\sqrt{a^2+b^2}}\ln\left|\csc\left(x+\arctan\displaystyle\frac{b}{a}\right)-\cot\left(x+\arctan\displayst...
en
0.154779
\int\frac{\mathrm{d}x}{a\sin x+b\cos x}=\begin{cases} \displaystyle\frac{1}{\sqrt{a^2+b^2}}\ln\left|\csc\left(x+\arctan\displaystyle\frac{b}{a}\right)-\cot\left(x+\arctan\displaystyle\frac{b}{a}\right) \right|+C&a\ne0\\ \displaystyle\frac{1}{b}\ln\left|\sec x+\tan x\right|+C&a=0\\ \e...
2.602148
3
examples/ex_pyqt.py
joeleong/idapython
0
6628292
<filename>examples/ex_pyqt.py from idaapi import PluginForm from PyQt5 import QtCore, QtGui, QtWidgets import sip class MyPluginFormClass(PluginForm): def OnCreate(self, form): """ Called when the plugin form is created """ # Get parent widget self.parent = self.FormToPyQt...
<filename>examples/ex_pyqt.py from idaapi import PluginForm from PyQt5 import QtCore, QtGui, QtWidgets import sip class MyPluginFormClass(PluginForm): def OnCreate(self, form): """ Called when the plugin form is created """ # Get parent widget self.parent = self.FormToPyQt...
en
0.936785
Called when the plugin form is created # Get parent widget # Create layout Called when the plugin form is closed
2.907231
3
midfield_direction_matrix.py
pwcberry/footy-simulator-python
0
6628293
<reponame>pwcberry/footy-simulator-python<filename>midfield_direction_matrix.py from status import BallDirection, FieldZone, Possession from matrix import normalise, prob from direction_matrix import DirectionMatrix class MidfieldDirectionMatrix(DirectionMatrix): def __init__(self, home_team_skill, away_team_skill...
from status import BallDirection, FieldZone, Possession from matrix import normalise, prob from direction_matrix import DirectionMatrix class MidfieldDirectionMatrix(DirectionMatrix): def __init__(self, home_team_skill, away_team_skill): super().__init__(FieldZone.MID_FIELD) hst = home_team_skill....
none
1
2.585996
3
unitorch/cli/models/clip/processing.py
fuliucansheng/UniTorch
2
6628294
# Copyright (c) FULIUCANSHENG. # Licensed under the MIT License. from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union from PIL import Image from unitorch.models.clip import CLIPProcessor as _CLIPProcessor from unitorch.cli import ( add_default_section_for_init, add_default_section_for_func...
# Copyright (c) FULIUCANSHENG. # Licensed under the MIT License. from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union from PIL import Image from unitorch.models.clip import CLIPProcessor as _CLIPProcessor from unitorch.cli import ( add_default_section_for_init, add_default_section_for_func...
en
0.801694
# Copyright (c) FULIUCANSHENG. # Licensed under the MIT License.
2.05563
2
prop_management/migrations/0001_initial.py
lichong012245/cornerstone
0
6628295
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Property' db.create_table('prop_management_properties', ( (u'id', self.gf('djang...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Property' db.create_table('prop_management_properties', ( (u'id', self.gf('djang...
en
0.815704
# -*- coding: utf-8 -*- # Adding model 'Property' # Adding model 'Apartment' # Adding model 'Tenant' # Adding model 'RentIncome' # Adding model 'ExpenseType' # Adding model 'Vendor' # Adding model 'Expense' # Deleting model 'Property' # Deleting model 'Apartment' # Deleting model 'Tenant' # Deleting model 'RentIncome' ...
2.24862
2
loader.py
zhangkezhong/ResNet
1
6628296
<reponame>zhangkezhong/ResNet<filename>loader.py import os import torch import torch.utils.data as data from PIL import Image from torchvision import transforms def default_loader(path): return Image.open(path).convert('RGB') mytransform = transforms.Compose([ transforms.Resize(224), transforms.CenterCro...
import os import torch import torch.utils.data as data from PIL import Image from torchvision import transforms def default_loader(path): return Image.open(path).convert('RGB') mytransform = transforms.Compose([ transforms.Resize(224), transforms.CenterCrop(224), transforms.ToTensor() ] ) class ...
en
0.166607
#print ('training dataloader.getName', dataloader.getName()) #for index, (img, label) in enumerate(dataloader): #img.show() #print('img->', img.size(), ' label->', label) #print ('test dataloader.getName', dataloader.getName()) #for index, (img, label) in enumerate(dataloader): #img.show() #print('img->', img.size(), '...
2.61589
3
mitmproxy-20210516/page/__init__.py
ti132520/pytest-vlog
0
6628297
# -*- coding: utf-8 -*- # Author : 怕你呀 # Time : 2021/5/16 # File : __init__.py # IDE : PyCharm
# -*- coding: utf-8 -*- # Author : 怕你呀 # Time : 2021/5/16 # File : __init__.py # IDE : PyCharm
ja
0.730468
# -*- coding: utf-8 -*- # Author : 怕你呀 # Time : 2021/5/16 # File : __init__.py # IDE : PyCharm
1.194082
1
shop_sendcloud/__init__.py
markusmo/djangoshop-sendcloud
6
6628298
<reponame>markusmo/djangoshop-sendcloud<filename>shop_sendcloud/__init__.py """ See PEP 386 (https://www.python.org/dev/peps/pep-0386/) Release logic: 1. Increase version number (change __version__ below). 2. Check that all changes have been documented in CHANGELOG.md. 3. In setup.py, assure that `classifiers` and ...
""" See PEP 386 (https://www.python.org/dev/peps/pep-0386/) Release logic: 1. Increase version number (change __version__ below). 2. Check that all changes have been documented in CHANGELOG.md. 3. In setup.py, assure that `classifiers` and `install_requires` reflect the latest versions. 4. git add shop_sendcloud/_...
en
0.516456
See PEP 386 (https://www.python.org/dev/peps/pep-0386/) Release logic: 1. Increase version number (change __version__ below). 2. Check that all changes have been documented in CHANGELOG.md. 3. In setup.py, assure that `classifiers` and `install_requires` reflect the latest versions. 4. git add shop_sendcloud/__ini...
1.523685
2
Corrfunc/io.py
manodeep/Corrfunc
139
6628299
<filename>Corrfunc/io.py #!/usr/bin/env python # -*- coding: utf-8 -*- """ Routines to read galaxy catalogs from disk. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from os.path import dirname, abspath, splitext, exists as file_exists,\ join as pj...
<filename>Corrfunc/io.py #!/usr/bin/env python # -*- coding: utf-8 -*- """ Routines to read galaxy catalogs from disk. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from os.path import dirname, abspath, splitext, exists as file_exists,\ join as pj...
en
0.535291
#!/usr/bin/env python # -*- coding: utf-8 -*- Routines to read galaxy catalogs from disk. Read a galaxy catalog from a fast-food binary file. Parameters ----------- filename: string Filename containing the galaxy positions return_dtype: numpy dtype for returned arrays. Default ``numpy.float`` ...
2.989721
3
Python Practice Programs/p5.py
deb991/TopGear__Projects_n_Assignments
0
6628300
#!/usr/bin/python import sys arg1 = 10 arg2 = 20 arg3 = 30 print("First number is", arg1) print("Second number is", arg2) print("Third number is", arg3) print("The biggest of three numbers is", max(arg1, arg2, arg3))
#!/usr/bin/python import sys arg1 = 10 arg2 = 20 arg3 = 30 print("First number is", arg1) print("Second number is", arg2) print("Third number is", arg3) print("The biggest of three numbers is", max(arg1, arg2, arg3))
ru
0.258958
#!/usr/bin/python
3.811941
4
downloader_day.py
vlddev/news_downloader
0
6628301
<reponame>vlddev/news_downloader<gh_stars>0 import pdb import sys, traceback import datetime import subprocess import json import re import logging import os.path from bs4 import BeautifulSoup import stats import downloader_common def run(): downloader = Downloader() logging.basicConfig(filename='downloader_d...
import pdb import sys, traceback import datetime import subprocess import json import re import logging import os.path from bs4 import BeautifulSoup import stats import downloader_common def run(): downloader = Downloader() logging.basicConfig(filename='downloader_day.log',level=logging.INFO, form...
en
0.309494
# get last downloaded number # get current issue number #for num in strNumList #253 #2017 96 154 #year = int(sys.argv[1]) #num = int(sys.argv[2]) #lastNum = int(sys.argv[3])+1 #while (num < lastNum): #253 # strNumList.append(str(num)) # num += 1 #strNumList = ['238-240','235-236','230-231','225-226','220-221','21...
2.689279
3
line.py
Mec-iS/linear-algebra
0
6628302
from vector import Vector class Line2D(object): """ Parametrization of a line. ~~~~~~~~~~~~~~~~~~~~~~~~~~ Definition: Ax = By = k Operation: find a basepoint and a direction vector to define a line """ __ROUNDING = 9 def __init__(self, normal_vector=None, const_term=None): ...
from vector import Vector class Line2D(object): """ Parametrization of a line. ~~~~~~~~~~~~~~~~~~~~~~~~~~ Definition: Ax = By = k Operation: find a basepoint and a direction vector to define a line """ __ROUNDING = 9 def __init__(self, normal_vector=None, const_term=None): ...
en
0.916137
Parametrization of a line. ~~~~~~~~~~~~~~~~~~~~~~~~~~ Definition: Ax = By = k Operation: find a basepoint and a direction vector to define a line # normal vector = [A, B] Two lines are the same line if a vector created by picking two random points from both is orthogonal to the normal v...
3.920096
4
code/Q891.py
cbgclecode/clebear
0
6628303
<reponame>cbgclecode/clebear """ # description 有一个二维矩阵 A 其中每个元素的值为 0 或 1 。 移动是指选择任一行或列,并转换该行或列中的每一个值:将所有 0 都更改为 1,将所有 1 都更改为 0。 在做出任意次数的移动后,将该矩阵的每一行都按照二进制数来解释,矩阵的得分就是这些数字的总和。 返回尽可能高的分数。   示例: 输入:[[0,0,1,1],[1,0,1,0],[1,1,0,0]] 输出:39 解释: 转换为 [[1,1,1,1],[1,0,0,1],[1,1,1,1]] 0b1111 + 0b1001 + 0b1111 = 15 + 9...
""" # description 有一个二维矩阵 A 其中每个元素的值为 0 或 1 。 移动是指选择任一行或列,并转换该行或列中的每一个值:将所有 0 都更改为 1,将所有 1 都更改为 0。 在做出任意次数的移动后,将该矩阵的每一行都按照二进制数来解释,矩阵的得分就是这些数字的总和。 返回尽可能高的分数。   示例: 输入:[[0,0,1,1],[1,0,1,0],[1,1,0,0]] 输出:39 解释: 转换为 [[1,1,1,1],[1,0,0,1],[1,1,1,1]] 0b1111 + 0b1001 + 0b1111 = 15 + 9 + 15 = 39   提示: 1 <= A....
zh
0.848434
# description 有一个二维矩阵 A 其中每个元素的值为 0 或 1 。 移动是指选择任一行或列,并转换该行或列中的每一个值:将所有 0 都更改为 1,将所有 1 都更改为 0。 在做出任意次数的移动后,将该矩阵的每一行都按照二进制数来解释,矩阵的得分就是这些数字的总和。 返回尽可能高的分数。   示例: 输入:[[0,0,1,1],[1,0,1,0],[1,1,0,0]] 输出:39 解释: 转换为 [[1,1,1,1],[1,0,0,1],[1,1,1,1]] 0b1111 + 0b1001 + 0b1111 = 15 + 9 + 15 = 39   提示: 1 <= A.leng...
3.841196
4
src/app/voltdb/voltdb_src/lib/python/voltcli/voltadmin.d/save.py
OpenMPDK/SMDK
44
6628304
<reponame>OpenMPDK/SMDK # This file is part of VoltDB. # Copyright (C) 2008-2021 VoltDB Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at yo...
# This file is part of VoltDB. # Copyright (C) 2008-2021 VoltDB Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later ver...
en
0.878466
# This file is part of VoltDB. # Copyright (C) 2008-2021 VoltDB Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later ver...
2.090425
2
api/tests/opentrons/protocols/fixtures/bundled_protocols/simple_bundle/protocol.py
felipesanches/opentrons
0
6628305
<filename>api/tests/opentrons/protocols/fixtures/bundled_protocols/simple_bundle/protocol.py metadata = {'author': '<NAME>'} def run(protocol_context): tip_rack = protocol_context.load_labware('opentrons_96_tiprack_10ul', '3') plate = protocol_context.load_labware( 'custom_labware', '1', namespace='cu...
<filename>api/tests/opentrons/protocols/fixtures/bundled_protocols/simple_bundle/protocol.py metadata = {'author': '<NAME>'} def run(protocol_context): tip_rack = protocol_context.load_labware('opentrons_96_tiprack_10ul', '3') plate = protocol_context.load_labware( 'custom_labware', '1', namespace='cu...
none
1
1.780281
2
tests/python/server.py
kicsyromy/libremotetransmission
1
6628306
<filename>tests/python/server.py import os import json from switch import Switch session_id = 'dGVzdGhlZHNnZGpraGtkamhha2ZjZ3dlODN3aXVkc2hhZm4n' stats = None torrents = None recently_active = None with open(os.path.join(os.path.dirname(__file__), 'json/stats.json')) as stats_json: stats = json.load(stats_json) ...
<filename>tests/python/server.py import os import json from switch import Switch session_id = 'dGVzdGhlZHNnZGpraGtkamhha2ZjZ3dlODN3aXVkc2hhZm4n' stats = None torrents = None recently_active = None with open(os.path.join(os.path.dirname(__file__), 'json/stats.json')) as stats_json: stats = json.load(stats_json) ...
none
1
2.331024
2
data/envLibrary/photocell_lib.py
ulnic/weatherSensor_rpi
1
6628307
#!/usr/bin/env python """ Example for RC timing reading for Raspberry Pi Must be used with GPIO 0.3.1a or later - earlier version are not fast enough! """ import RPi.GPIO as GPIO import time import math GPIO.setmode(GPIO.BCM) def read_photocell(_gpio_pin): """ Read the photocell value from the RPI Board, us...
#!/usr/bin/env python """ Example for RC timing reading for Raspberry Pi Must be used with GPIO 0.3.1a or later - earlier version are not fast enough! """ import RPi.GPIO as GPIO import time import math GPIO.setmode(GPIO.BCM) def read_photocell(_gpio_pin): """ Read the photocell value from the RPI Board, us...
en
0.690153
#!/usr/bin/env python Example for RC timing reading for Raspberry Pi Must be used with GPIO 0.3.1a or later - earlier version are not fast enough! Read the photocell value from the RPI Board, using the specified GPIO Pin. :param _gpio_pin: GPIO Pin to read from RPI board :return: Read value # This takes about 1...
3.52381
4
money/money.py
scompo/money
0
6628308
from time import localtime, gmtime, strftime, strptime from os.path import expanduser, join from pprint import pprint from decimal import * def scrivi_movimento(path, m): with open(path, 'a') as f: f.write(m['tipo'] + m['valore']) f.write(';') f.write(m['data']) f.write(';') ...
from time import localtime, gmtime, strftime, strptime from os.path import expanduser, join from pprint import pprint from decimal import * def scrivi_movimento(path, m): with open(path, 'a') as f: f.write(m['tipo'] + m['valore']) f.write(';') f.write(m['data']) f.write(';') ...
fa
0.842916
#####.##) []: ')
3.004961
3
tests/python/relay/test_op_qnn_subtract.py
mwillsey/incubator-tvm
2
6628309
<gh_stars>1-10 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License")...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
en
0.843184
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
1.971747
2
btree.py
JiananYuan/Learned-Indexes
0
6628310
<gh_stars>0 # BTree Index with Python import pandas as pd # Node in BTree class BTreeNode: def __init__(self, degree=2, number_of_keys=0, is_leaf=True, items=None, children=None, index=None): self.isLeaf = is_leaf self.numberOfKeys = number_of_keys self.index = i...
# BTree Index with Python import pandas as pd # Node in BTree class BTreeNode: def __init__(self, degree=2, number_of_keys=0, is_leaf=True, items=None, children=None, index=None): self.isLeaf = is_leaf self.numberOfKeys = number_of_keys self.index = index ...
en
0.694707
# BTree Index with Python # Node in BTree # BTree Class # Value in Node # For Test
3.243913
3
mep/people/tests/test_people_migrations.py
making-books-ren-today/test_eval_3_shxco
0
6628311
import pytest from mep.accounts.tests.test_accounts_migrations import TestMigrations @pytest.mark.last class TestPersonGenerateSlugs(TestMigrations): app = 'people' migrate_from = '0015_add_person_optional_slug' migrate_to = '0017_person_require_unique_slugs' def setUpBeforeMigration(self, apps): ...
import pytest from mep.accounts.tests.test_accounts_migrations import TestMigrations @pytest.mark.last class TestPersonGenerateSlugs(TestMigrations): app = 'people' migrate_from = '0015_add_person_optional_slug' migrate_to = '0017_person_require_unique_slugs' def setUpBeforeMigration(self, apps): ...
en
0.641263
# create people to test slug logic # - unique last name # variants in special characters # variants in case # multiples with no last name # slugs should be unique - guaranteed by 0017 # get fresh copies of records to see changes # lastname only if sufficient # group Dö/Dö properly # group upper/lowercase properly # mu...
2.336693
2
fffw/types.py
tumb1er/fffw
4
6628312
<reponame>tumb1er/fffw try: from typing import Literal except ImportError: # pragma: no cover from typing_extensions import Literal # type: ignore __all__ = ['Literal']
try: from typing import Literal except ImportError: # pragma: no cover from typing_extensions import Literal # type: ignore __all__ = ['Literal']
en
0.333062
# pragma: no cover # type: ignore
1.169085
1
cynetworkx/algorithms/community/tests/test_kernighan_lin.py
Viech/cynetworkx
12
6628313
# -*- encoding: utf-8 -*- # test_kernighan_lin.py - unit tests for Kernighan–Lin bipartition algorithm # # Copyright 2011 <NAME> <<EMAIL>>. # Copyright 2011 <NAME> <<EMAIL>>. # Copyright 2015 NetworkX developers. # # This file is part of NetworkX. # # NetworkX is distributed under a BSD license; see LICENSE.txt for mor...
# -*- encoding: utf-8 -*- # test_kernighan_lin.py - unit tests for Kernighan–Lin bipartition algorithm # # Copyright 2011 <NAME> <<EMAIL>>. # Copyright 2011 <NAME> <<EMAIL>>. # Copyright 2015 NetworkX developers. # # This file is part of NetworkX. # # NetworkX is distributed under a BSD license; see LICENSE.txt for mor...
en
0.652312
# -*- encoding: utf-8 -*- # test_kernighan_lin.py - unit tests for Kernighan–Lin bipartition algorithm # # Copyright 2011 <NAME> <<EMAIL>>. # Copyright 2011 <NAME> <<EMAIL>>. # Copyright 2015 NetworkX developers. # # This file is part of NetworkX. # # NetworkX is distributed under a BSD license; see LICENSE.txt for mor...
2.350918
2
tests/app/guild_helper_bot/test_guild.py
ricardochaves/chat-wars-database
1
6628314
<filename>tests/app/guild_helper_bot/test_guild.py<gh_stars>1-10 import uuid from django.db import IntegrityError from django.test import TestCase from chat_wars_database.app.guild_helper_bot.business.guild import create_guild from chat_wars_database.app.guild_helper_bot.business.guild import create_invite_member_lin...
<filename>tests/app/guild_helper_bot/test_guild.py<gh_stars>1-10 import uuid from django.db import IntegrityError from django.test import TestCase from chat_wars_database.app.guild_helper_bot.business.guild import create_guild from chat_wars_database.app.guild_helper_bot.business.guild import create_invite_member_lin...
en
0.678375
# def test_should_(self): # pass # # def test_should_(self): # pass
2.325888
2
todoapp/admin.py
Bridgit-wairimu/Brii-to-do
0
6628315
from django.contrib import admin from .models import Tasks,Profile # Register your models here. admin.site.register(Tasks) admin.site.register(Profile)
from django.contrib import admin from .models import Tasks,Profile # Register your models here. admin.site.register(Tasks) admin.site.register(Profile)
en
0.968259
# Register your models here.
1.340332
1
tests/training/test_replay.py
Mathieu4141/avalanche
3
6628316
<filename>tests/training/test_replay.py import unittest from typing import List, Dict from unittest.mock import MagicMock import torch from torch import tensor, Tensor, zeros from torch.nn import CrossEntropyLoss, Module, Identity from torch.optim import SGD from avalanche.benchmarks.utils import AvalancheDataset, Av...
<filename>tests/training/test_replay.py import unittest from typing import List, Dict from unittest.mock import MagicMock import torch from torch import tensor, Tensor, zeros from torch.nn import CrossEntropyLoss, Module, Identity from torch.optim import SGD from avalanche.benchmarks.utils import AvalancheDataset, Av...
en
0.875681
# Always fully filled # CREATE THE STRATEGY INSTANCE (NAIVE) # buffer size should equal self.mem_size if data is large enough # 1st observation # 2nd observation # Given # When # Features are [[0], [4], [5]] # Center is [3] # Then # Herding: # 1. At first pass, we select the -4 (at index 1) # because it is the closest...
2.146023
2
labdevices/applied_motion_products.py
jkrauth/labdevices
0
6628317
""" For communication with devices from Applied Motion Products. The IP can be set via a small wheel (S1) on the device itself. We used the windows software 'STF Configurator' from Applied Motion Products for the first configuration of the controller and to give it its IP address in our local subnet. File name: appli...
""" For communication with devices from Applied Motion Products. The IP can be set via a small wheel (S1) on the device itself. We used the windows software 'STF Configurator' from Applied Motion Products for the first configuration of the controller and to give it its IP address in our local subnet. File name: appli...
en
0.763543
For communication with devices from Applied Motion Products. The IP can be set via a small wheel (S1) on the device itself. We used the windows software 'STF Configurator' from Applied Motion Products for the first configuration of the controller and to give it its IP address in our local subnet. File name: applied_m...
2.678813
3
python/mlad/cli/context.py
onetop21/MLAppDeploy
0
6628318
import sys import os import omegaconf from typing import Optional, Dict, Callable, List from pathlib import Path from omegaconf import OmegaConf from mlad.cli.libs import utils from mlad.cli.exceptions import ( NotExistContextError, CannotDeleteContextError, InvalidPropertyError, ContextAlreadyExistError ) M...
import sys import os import omegaconf from typing import Optional, Dict, Callable, List from pathlib import Path from omegaconf import OmegaConf from mlad.cli.libs import utils from mlad.cli.exceptions import ( NotExistContextError, CannotDeleteContextError, InvalidPropertyError, ContextAlreadyExistError ) M...
none
1
2.061291
2
Scripts/speed_test_Tavernini.py
vitesempl/RK-IDE-Python
0
6628319
from RK.ide import ide_solve from math import * import numpy as np import time def OutputSolution(): nz = np.size(history(tspan[0])) if nz == 1: print("y(", tspan[1], ") = ", sol[1][-1], sep='') else: for i in range(nz): print("y", i + 1, "(", tspan[1], ") = ", sol[1][i, -1], ...
from RK.ide import ide_solve from math import * import numpy as np import time def OutputSolution(): nz = np.size(history(tspan[0])) if nz == 1: print("y(", tspan[1], ") = ", sol[1][-1], sep='') else: for i in range(nz): print("y", i + 1, "(", tspan[1], ") = ", sol[1][i, -1], ...
en
0.273342
# Test 2 # Test 3 # Test 4
3.03837
3
predictor/api/custom_api.py
acumos/model-runner-rds-model-runner
0
6628320
<filename>predictor/api/custom_api.py #!/usr/bin/env python3 # ===============LICENSE_START======================================================= # Acumos Apache-2.0 # =================================================================================== # Copyright (C) 2018 AT&T Intellectual Property. All rights reserve...
<filename>predictor/api/custom_api.py #!/usr/bin/env python3 # ===============LICENSE_START======================================================= # Acumos Apache-2.0 # =================================================================================== # Copyright (C) 2018 AT&T Intellectual Property. All rights reserve...
en
0.690005
#!/usr/bin/env python3 # ===============LICENSE_START======================================================= # Acumos Apache-2.0 # =================================================================================== # Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. # =================================...
1.422749
1
cogs/haruyuki.py
haruyuki/CS-Pound
4
6628321
<reponame>haruyuki/CS-Pound import discord from discord.ext import commands class Haruyuki(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(aliases=['haru']) @commands.guild_only() async def haruyuki(self, ctx): await ctx.send("Use it!") def setup(bot): b...
import discord from discord.ext import commands class Haruyuki(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(aliases=['haru']) @commands.guild_only() async def haruyuki(self, ctx): await ctx.send("Use it!") def setup(bot): bot.add_cog(Haruyuki(bot))
none
1
2.334171
2
core/events/floor.py
ChrisLR/BasicDungeonRL
3
6628322
<gh_stars>1-10 from core.events.base import Event class WalkedOn(Event): name = "WalkedOn" __slots__ = "actor" def __init__(self, actor): self.actor = actor
from core.events.base import Event class WalkedOn(Event): name = "WalkedOn" __slots__ = "actor" def __init__(self, actor): self.actor = actor
none
1
2.374248
2
PaddleRec/multiview_simnet/nets.py
danleifeng/models
2
6628323
<filename>PaddleRec/multiview_simnet/nets.py<gh_stars>1-10 # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.ap...
<filename>PaddleRec/multiview_simnet/nets.py<gh_stars>1-10 # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.ap...
en
0.73809
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
2.278508
2
pmca/usb/driver/__init__.py
kratz00/Sony-PMCA-RE
2
6628324
<reponame>kratz00/Sony-PMCA-RE from collections import namedtuple from ...util import * USB_CLASS_PTP = 6 USB_CLASS_MSC = 8 UsbDevice = namedtuple('UsbDevice', 'handle, idVendor, idProduct') MSC_SENSE_OK = (0, 0, 0) MSC_SENSE_ERROR_UNKNOWN = (0x2, 0xff, 0xff) def parseMscSense(buffer): return parse8(buffer[2:3]) ...
from collections import namedtuple from ...util import * USB_CLASS_PTP = 6 USB_CLASS_MSC = 8 UsbDevice = namedtuple('UsbDevice', 'handle, idVendor, idProduct') MSC_SENSE_OK = (0, 0, 0) MSC_SENSE_ERROR_UNKNOWN = (0x2, 0xff, 0xff) def parseMscSense(buffer): return parse8(buffer[2:3]) & 0xf, parse8(buffer[12:13]), p...
none
1
2.636216
3
test/wcm/helper.py
jonrbates/turing
1
6628325
<filename>test/wcm/helper.py import unittest import torch from turing.wcm.simulator import Simulator class TestCase(unittest.TestCase): def setUp(self) -> None: self.tx = Simulator(T=17) def assertTensorsEqual(self, expected, actual, msg=""): if not torch.equal(expected, actual): ...
<filename>test/wcm/helper.py import unittest import torch from turing.wcm.simulator import Simulator class TestCase(unittest.TestCase): def setUp(self) -> None: self.tx = Simulator(T=17) def assertTensorsEqual(self, expected, actual, msg=""): if not torch.equal(expected, actual): ...
none
1
2.783755
3
recent.py
AlessandroSpallina/LBRYnomics2
0
6628326
<filename>recent.py import config import datetime from daemon_command import daemon_command import json import math import sqlite3 def count_recent_all(now): print("Counting recent activity.", flush=True) count_recent("channels", now) count_recent("streams", now) # Gets called claims for ease for Electr...
<filename>recent.py import config import datetime from daemon_command import daemon_command import json import math import sqlite3 def count_recent_all(now): print("Counting recent activity.", flush=True) count_recent("channels", now) count_recent("streams", now) # Gets called claims for ease for Electr...
en
0.674485
# Gets called claims for ease for Electron Count recent things. Output JSON. # Claim type # Backwards compatibility # Time cutoffs # Result dictionary # Connect to the wallet server DB SELECT COUNT(*) FROM claim WHERE creation_timestamp >= ? AND creation_timestamp <= ? AND cl...
2.669941
3
webapp/templatetags/webapp_tags.py
ziebisty/Django_Face_Detector
1
6628327
<reponame>ziebisty/Django_Face_Detector from django import template register = template.Library() @register.filter(name='split') def split(str, key): return str.split(key) @register.filter def get_by_index(a, i): return a[i]
from django import template register = template.Library() @register.filter(name='split') def split(str, key): return str.split(key) @register.filter def get_by_index(a, i): return a[i]
none
1
2.074757
2
test/python/old_aer_integration_test/test_simulator_interfaces.py
xkwei1119/qiskit-terra
0
6628328
# -*- coding: utf-8 -*- # Copyright 2018, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. # pylint: disable=unused-import """Tests for checking qiskit interfaces to simulators.""" import unittest import qiskit imp...
# -*- coding: utf-8 -*- # Copyright 2018, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. # pylint: disable=unused-import """Tests for checking qiskit interfaces to simulators.""" import unittest import qiskit imp...
en
0.890423
# -*- coding: utf-8 -*- # Copyright 2018, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. # pylint: disable=unused-import Tests for checking qiskit interfaces to simulators. Test output consistency across simulators (...
2.036805
2
pajbot/web/routes/api/pleblist.py
UVClay/SkookumBot
1
6628329
import logging from flask import abort from flask import url_for from flask_restful import Resource from flask_restful import reqparse from sqlalchemy import and_ from sqlalchemy import func from sqlalchemy.orm import noload import pajbot.web.utils from pajbot import utils from pajbot.managers.db import DBManager fro...
import logging from flask import abort from flask import url_for from flask_restful import Resource from flask_restful import reqparse from sqlalchemy import and_ from sqlalchemy import func from sqlalchemy.orm import noload import pajbot.web.utils from pajbot import utils from pajbot.managers.db import DBManager fro...
en
0.310099
# TODO: Add more data. # Was this song forcefully skipped? Or did it end naturally. # TODO: implement this # return jsonify({'success': True}) # songs = session.query(PleblistSong, func.count(PleblistSong.song_info).label('total')).group_by(PleblistSong.youtube_id).order_by('total DESC')
2.156266
2
7_Sarven_Desert/285-Chase_Them/chase_them.py
katitek/Code-Combat
0
6628330
def onSpawn(e): while True: enemy = pet.findNearestByType("munchkin") if enemy && pet.isReady("chase"): pet.chase(enemy) potion = pet.findNearestByType("potion") if potion: pet.fetch(potion) pet.on("spawn", onSpawn)
def onSpawn(e): while True: enemy = pet.findNearestByType("munchkin") if enemy && pet.isReady("chase"): pet.chase(enemy) potion = pet.findNearestByType("potion") if potion: pet.fetch(potion) pet.on("spawn", onSpawn)
none
1
2.660079
3
main.py
samuel-tsegaye/youtube_downloader
1
6628331
<gh_stars>1-10 import tkinter as tk from tkinter.ttk import Progressbar from tkinter import * from PIL import ImageTk import ttk splash_root = Tk() splash_root.title("Downloader") splash_root.geometry("800x300") progress = Progressbar(splash_root, style="red.Horizontal.TProgressbar", orient=HORIZONTAL, length=500, m...
import tkinter as tk from tkinter.ttk import Progressbar from tkinter import * from PIL import ImageTk import ttk splash_root = Tk() splash_root.title("Downloader") splash_root.geometry("800x300") progress = Progressbar(splash_root, style="red.Horizontal.TProgressbar", orient=HORIZONTAL, length=500, mode='determinate...
en
0.19484
#sa = ImageTk.PhotoImage(file="image/211.jpg") #label1 = Label(splash_root, image=sa) #label1.place(x=0, y=0) # 249794
3.306717
3
tests/tests.py
LukasKlement/python-marketman
0
6628332
<reponame>LukasKlement/python-marketman import os import unittest import xmlrunner from python_marketman.api import Marketman from python_marketman.exceptions import MarketmanAuthenticationFailed class AuthenticationTestCase(unittest.TestCase): def test_connect(self): with self.assertRaises(MarketmanAut...
import os import unittest import xmlrunner from python_marketman.api import Marketman from python_marketman.exceptions import MarketmanAuthenticationFailed class AuthenticationTestCase(unittest.TestCase): def test_connect(self): with self.assertRaises(MarketmanAuthenticationFailed): faulty_c...
none
1
2.672842
3
goalboost/model/mongomint.py
JohnLockwood/Goalboost
0
6628333
<filename>goalboost/model/mongomint.py """ MongoMintDocument is a wafer thin wrapper around a PyMongo collection """ from bson import ObjectId class MongoMintDocument(object): """Create a MongoMintDocument object. pymongo_client_object - a MongoClient instance collection_name - a name for the collection ...
<filename>goalboost/model/mongomint.py """ MongoMintDocument is a wafer thin wrapper around a PyMongo collection """ from bson import ObjectId class MongoMintDocument(object): """Create a MongoMintDocument object. pymongo_client_object - a MongoClient instance collection_name - a name for the collection ...
en
0.610457
MongoMintDocument is a wafer thin wrapper around a PyMongo collection Create a MongoMintDocument object. pymongo_client_object - a MongoClient instance collection_name - a name for the collection we want to validate on / operate against database (optional, default="goalboost"), a name for the database wher...
2.990527
3
neuralmonkey/server.py
hoangcuong2011/LDNMT
15
6628334
import argparse import json import datetime import flask from flask import Flask, request from neuralmonkey.dataset import Dataset from neuralmonkey.learning_utils import run_on_dataset from neuralmonkey.run import CONFIG, initialize_for_running APP = Flask(__name__) APP.config.from_object(__name__) APP.config['arg...
import argparse import json import datetime import flask from flask import Flask, request from neuralmonkey.dataset import Dataset from neuralmonkey.learning_utils import run_on_dataset from neuralmonkey.run import CONFIG, initialize_for_running APP = Flask(__name__) APP.config.from_object(__name__) APP.config['arg...
en
0.355478
# TODO check the dataset # check_dataset_and_coders(dataset, args.encoders) # pylint: disable=broad-except # pylint: disable=no-member
2.558361
3
test/sql/test_compare.py
pasenor/sqlalchemy
0
6628335
import importlib import itertools import random from sqlalchemy import and_ from sqlalchemy import Boolean from sqlalchemy import case from sqlalchemy import cast from sqlalchemy import Column from sqlalchemy import column from sqlalchemy import dialects from sqlalchemy import exists from sqlalchemy import extract fro...
import importlib import itertools import random from sqlalchemy import and_ from sqlalchemy import Boolean from sqlalchemy import case from sqlalchemy import cast from sqlalchemy import Column from sqlalchemy import column from sqlalchemy import dialects from sqlalchemy import exists from sqlalchemy import extract fro...
en
0.919876
# lambdas which return a tuple of ColumnElement objects. # must return at least two objects that should compare differently. # to test more varieties of "difference" additional objects can be added. # note these two are mathematically equivalent but for now they # are considered to be different # same number of params ...
1.936092
2
api/response.py
tomenjerry/mangaadv
0
6628336
<filename>api/response.py """Convenience classes and functions for API responses.""" from functools import wraps from typing import TYPE_CHECKING, Tuple from django.http import JsonResponse from django.utils.log import log_response from django.views.decorators.vary import vary_on_headers if TYPE_CHECKING: # pragma:...
<filename>api/response.py """Convenience classes and functions for API responses.""" from functools import wraps from typing import TYPE_CHECKING, Tuple from django.http import JsonResponse from django.utils.log import log_response from django.views.decorators.vary import vary_on_headers if TYPE_CHECKING: # pragma:...
en
0.589395
Convenience classes and functions for API responses. # pragma: no cover A JSON-formatted error response. :param message: The error message of the response. :param status: The HTTP status of the response. | Decorator to make an API view only accept particular request methods. | Based on :func:`django.views....
2.798621
3
bbclib/libs/bbclib_binary.py
ks91/py-bbclib
0
6628337
<gh_stars>0 # -*- coding: utf-8 -*- """ Copyright (c) 2019 beyond-blockchain.org. 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 ...
# -*- coding: utf-8 -*- """ Copyright (c) 2019 beyond-blockchain.org. 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 l...
en
0.815658
# -*- coding: utf-8 -*- Copyright (c) 2019 beyond-blockchain.org. 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.000247
2
avmess/django_settings.py
Raduionutz/Monster-Clearer-GOTY
2
6628338
from avmess.settings import CONF DEBUG = CONF.debug TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': CONF.db_name, 'USER': CONF.db_user, 'PASSWORD': CONF.db_pass, 'HOST': CONF.db_host, 'PORT': CONF.db_port, } } IN...
from avmess.settings import CONF DEBUG = CONF.debug TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': CONF.db_name, 'USER': CONF.db_user, 'PASSWORD': CONF.db_pass, 'HOST': CONF.db_host, 'PORT': CONF.db_port, } } IN...
none
1
1.330069
1
gesund_projekt/steps/models.py
asis2016/gesund-projekt
0
6628339
from django.conf import settings from django.urls import reverse from django.db import models class Steps(models.Model): """ Steps model. """ id = models.AutoField(primary_key=True, editable=False) datestamp = models.DateField(blank=True) step_count = models.IntegerField(blank=True) author = model...
from django.conf import settings from django.urls import reverse from django.db import models class Steps(models.Model): """ Steps model. """ id = models.AutoField(primary_key=True, editable=False) datestamp = models.DateField(blank=True) step_count = models.IntegerField(blank=True) author = model...
en
0.598184
Steps model.
2.197448
2
base/templatetags/base.py
Rizalgente/upkoding
0
6628340
from django.utils.safestring import mark_safe from django import template from django.shortcuts import reverse from django.conf import settings from account.models import User from projects.models import Project register = template.Library() @register.simple_tag(takes_context=True) def active_class(context, namespa...
from django.utils.safestring import mark_safe from django import template from django.shortcuts import reverse from django.conf import settings from account.models import User from projects.models import Project register = template.Library() @register.simple_tag(takes_context=True) def active_class(context, namespa...
en
0.295526
Detect whether we're in a page described by `namespace_or_path` and return `classname` if we are. Param `namespace_or_path` could be: - A path eg. `/about/`, it will return `classname` if request.path == `/about/` - A path with wildcard eg. `/about/*`, it will return `classname` if request.path starts with...
2.345397
2
ucscsdk/mometa/org/OrgDomainFirmwareInfo.py
CiscoUcs/ucscsdk
9
6628341
<reponame>CiscoUcs/ucscsdk """This module contains the general information for OrgDomainFirmwareInfo ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class OrgDomainFirmwareInfoConsts(): CONNECTION_STATE_CONN...
"""This module contains the general information for OrgDomainFirmwareInfo ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class OrgDomainFirmwareInfoConsts(): CONNECTION_STATE_CONNECTED = "connected" CON...
en
0.543029
This module contains the general information for OrgDomainFirmwareInfo ManagedObject. This is OrgDomainFirmwareInfo class. ((deleteAll|ignore|deleteNonPresent),){0,2}(deleteAll|ignore|deleteNonPresent){0,1} ((([0-9]){1,3}\.){3}[0-9]{1,3}) ((removed|created|modified|deleted),){0,3}(removed|created|modified|deleted){0,1}
1.918847
2
tests/test_ext_graphviz.py
bz2/sphinx
1
6628342
""" test_ext_graphviz ~~~~~~~~~~~~~~~~~ Test sphinx.ext.graphviz extension. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import pytest from sphinx.ext.graphviz import ClickableMapDefinition @pytest.mark.sphinx('html', t...
""" test_ext_graphviz ~~~~~~~~~~~~~~~~~ Test sphinx.ext.graphviz extension. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import pytest from sphinx.ext.graphviz import ClickableMapDefinition @pytest.mark.sphinx('html', t...
en
0.54296
test_ext_graphviz ~~~~~~~~~~~~~~~~~ Test sphinx.ext.graphviz extension. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. # empty graph # normal graph # inheritance-diagram:: sphinx.builders.html
2.093257
2
Chest X-Ray Multilabel Image classification using CNN - Pytorch/train_model_transferLearning.py
farzanaaswin0708/CNN-for-Visual-recognition
0
6628343
<filename>Chest X-Ray Multilabel Image classification using CNN - Pytorch/train_model_transferLearning.py<gh_stars>0 #!/usr/bin/env python # coding: utf-8 # In[1]: #from Arch1 import * #from transferLearning import Arch1CNN import torch from torch.autograd import Variable import torch.nn as nn import torch.nn.functi...
<filename>Chest X-Ray Multilabel Image classification using CNN - Pytorch/train_model_transferLearning.py<gh_stars>0 #!/usr/bin/env python # coding: utf-8 # In[1]: #from Arch1 import * #from transferLearning import Arch1CNN import torch from torch.autograd import Variable import torch.nn as nn import torch.nn.functi...
en
0.602761
#!/usr/bin/env python # coding: utf-8 # In[1]: #from Arch1 import * #from transferLearning import Arch1CNN # Setup: initialize the hyperparameters/variables # Number of full passes through the dataset #<<<<<<< HEAD # Number of samples in each minibatch #======= #batch_size = 64 # Number of samples in each mini...
2.690849
3
main.py
sfchronicle/jailed
0
6628344
import os from app import app, db from admin import admin from models import * from views import * if __name__ == '__main__': BASE_DIR = os.path.realpath(os.path.dirname(__file__)) DB_PATH = os.path.join(BASE_DIR, app.config['DATABASE_FILE']) if not os.path.exists(DB_PATH): db.create_all() #...
import os from app import app, db from admin import admin from models import * from views import * if __name__ == '__main__': BASE_DIR = os.path.realpath(os.path.dirname(__file__)) DB_PATH = os.path.join(BASE_DIR, app.config['DATABASE_FILE']) if not os.path.exists(DB_PATH): db.create_all() #...
en
0.69348
# Start app
1.741277
2
setup.py
ThatXliner/pypmeasy
1
6628345
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """To setup.""" from pathlib import Path from setuptools import setup, find_packages from pyjim import __version__, __author__ # The directory containing this file HERE = Path(Path(__file__).parent) # The text of the README file README = Path(HERE / "README.md").read_tex...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """To setup.""" from pathlib import Path from setuptools import setup, find_packages from pyjim import __version__, __author__ # The directory containing this file HERE = Path(Path(__file__).parent) # The text of the README file README = Path(HERE / "README.md").read_tex...
en
0.526887
#!/usr/bin/env python3 # -*- coding: utf-8 -*- To setup. # The directory containing this file # The text of the README file # Replace with your own username # url="https://github.com/ThatXliner/pyjim", # "Documentation": "https://pyjim.readthedocs.io/en/latest/index.html", # scripts=["scripts/pyjim"], # keywords="api s...
1.540185
2
arviz/plots/backends/bokeh/loopitplot.py
mortonjt/arviz
1
6628346
<reponame>mortonjt/arviz """Bokeh loopitplot.""" import numpy as np from bokeh.models import BoxAnnotation from matplotlib.colors import hsv_to_rgb, rgb_to_hsv, to_hex, to_rgb from xarray import DataArray from ....stats.density_utils import kde from ...plot_utils import _scale_fig_size from .. import show_layout from ...
"""Bokeh loopitplot.""" import numpy as np from bokeh.models import BoxAnnotation from matplotlib.colors import hsv_to_rgb, rgb_to_hsv, to_hex, to_rgb from xarray import DataArray from ....stats.density_utils import kde from ...plot_utils import _scale_fig_size from .. import show_layout from . import backend_kwarg_de...
en
0.586724
Bokeh loopitplot. # pylint: disable=unused-argument Bokeh loo pit plot. # pylint: disable=unsupported-assignment-operation # pylint: disable=unsupported-assignment-operation # use step patch when you find out how to do that # Adds horizontal reference line # Sets xlim(0, 1)
2.195458
2
eden/integration/snapshot/test_snapshots.py
jmswen/eden
0
6628347
#!/usr/bin/env python3 # # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. ...
#!/usr/bin/env python3 # # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. ...
en
0.920306
#!/usr/bin/env python3 # # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. ...
2.399328
2
batch_overlap_test.py
caslab-vt/DeepPaSTL
0
6628348
<reponame>caslab-vt/DeepPaSTL import torch import torch.nn as nn import warnings import numpy as np import matplotlib import pandas as pd import scipy.io import pickle import multiprocessing as mp from os import listdir from torchviz import make_dot from data_utils.data_preprocess import process_testing_data warni...
import torch import torch.nn as nn import warnings import numpy as np import matplotlib import pandas as pd import scipy.io import pickle import multiprocessing as mp from os import listdir from torchviz import make_dot from data_utils.data_preprocess import process_testing_data warnings.filterwarnings('ignore') m...
en
0.521797
# Parse arguments and load data #with mp.Pool(args.data_proc_workers) as pool: # result = pool.map(process_testing_data, [args])[0] # Loading all data in to numpy arrays # This is already scaled # Add mirror padding to the images # h_aggr_list = prep_overlap(args, h_aggr_list) # h_aggr_list: (1, len, h+p, w+p) D...
1.99919
2
server/comondata/admin.py
Beakjiyeon/English_Planet
0
6628349
<reponame>Beakjiyeon/English_Planet<filename>server/comondata/admin.py<gh_stars>0 from django.contrib import admin from .models import * admin.site.register(Book) admin.site.register(Bookword) admin.site.register(Camera) admin.site.register(Myword) admin.site.register(Planet) admin.site.register(Quiz) admin.site.regis...
from django.contrib import admin from .models import * admin.site.register(Book) admin.site.register(Bookword) admin.site.register(Camera) admin.site.register(Myword) admin.site.register(Planet) admin.site.register(Quiz) admin.site.register(User) # Register your models here.
en
0.968259
# Register your models here.
1.511141
2
Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/python/tvm/rpc/__init__.py
mengkai94/training_results_v0.6
64
6628350
"""Lightweight TVM RPC module. RPC enables connect to a remote server, upload and launch functions. This is useful to for cross-compile and remote testing, The compiler stack runs on local server, while we use RPC server to run on remote runtime which don't have a compiler available. The test program compiles the pro...
"""Lightweight TVM RPC module. RPC enables connect to a remote server, upload and launch functions. This is useful to for cross-compile and remote testing, The compiler stack runs on local server, while we use RPC server to run on remote runtime which don't have a compiler available. The test program compiles the pro...
en
0.864358
Lightweight TVM RPC module. RPC enables connect to a remote server, upload and launch functions. This is useful to for cross-compile and remote testing, The compiler stack runs on local server, while we use RPC server to run on remote runtime which don't have a compiler available. The test program compiles the progra...
1.966663
2