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
setup.py
chadoneba/django-planfix
1
6622751
<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup setup( name='django-planfix', version='0.4', description='Add contanct and task to Planfix', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup setup( name='django-planfix', version='0.4', description='Add contanct and task to Planfix', author='<NA...
en
0.352855
#!/usr/bin/env python # -*- coding: utf-8 -*-
1.353011
1
tests/test_relative_strength_index.py
dibyajyotidash/https-github.com-kylejusticemagnuson-pyti
635
6622752
from __future__ import absolute_import import unittest import numpy as np from tests.sample_data import SampleData from pyti import relative_strength_index class TestRelativeStrengthIndex(unittest.TestCase): def setUp(self): """Create data to use for testing.""" self.data = SampleData().get_sampl...
from __future__ import absolute_import import unittest import numpy as np from tests.sample_data import SampleData from pyti import relative_strength_index class TestRelativeStrengthIndex(unittest.TestCase): def setUp(self): """Create data to use for testing.""" self.data = SampleData().get_sampl...
en
0.893735
Create data to use for testing.
2.303478
2
normal_map.py
thinhnguyenuit/sombra
10
6622753
import numpy as np # Local Modules from constants import MAX_COLOR_VALUE from texture import ImageTexture, SolidImageTexture import utils class NormalMap: def __init__(self, texture, obj): self.texture = texture self.obj = obj def get_normal(self, p): if isinstance(self.texture, Image...
import numpy as np # Local Modules from constants import MAX_COLOR_VALUE from texture import ImageTexture, SolidImageTexture import utils class NormalMap: def __init__(self, texture, obj): self.texture = texture self.obj = obj def get_normal(self, p): if isinstance(self.texture, Image...
en
0.954803
# Local Modules # x and y will be from [-1 to 1] and z from [0 to 1]
2.761683
3
dict/views.py
uglyboxer/slang
0
6622754
<reponame>uglyboxer/slang<filename>dict/views.py<gh_stars>0 import requests import json import urllib import logging import sys from lxml import html from django.shortcuts import render from django.db.models import Q from dict.models import Entry from dict.utils import get_translation def home_page(request): ...
import requests import json import urllib import logging import sys from lxml import html from django.shortcuts import render from django.db.models import Q from dict.models import Entry from dict.utils import get_translation def home_page(request): entries = Entry.objects.all().order_by('-queries')[:5] r...
en
0.203548
# logger.exception('Error in db lookup') # logger.exception('Error in urbandict call') # logger.exception('Error in asihablamos call')
2.23997
2
mocks/openedx/core/lib/api/__init__.py
appsembler/course-cccess-groups
4
6622755
<reponame>appsembler/course-cccess-groups<filename>mocks/openedx/core/lib/api/__init__.py """ Mocks for openedx.core.lib.api. """
""" Mocks for openedx.core.lib.api. """
en
0.57496
Mocks for openedx.core.lib.api.
1.046962
1
server/utils.py
cyy0523xc/openpose-server
0
6622756
# -*- coding: utf-8 -*- # # # Author: alex # Created Time: 2019年09月09日 星期一 15时51分40秒 import re import io import cv2 import base64 from PIL import Image import numpy as np def parse_input_image(image='', image_path='', image_type='jpg'): """人脸检测(输入的是base64编码的图像) :param image 图片对象使用base64编码 :param image_pat...
# -*- coding: utf-8 -*- # # # Author: alex # Created Time: 2019年09月09日 星期一 15时51分40秒 import re import io import cv2 import base64 from PIL import Image import numpy as np def parse_input_image(image='', image_path='', image_type='jpg'): """人脸检测(输入的是base64编码的图像) :param image 图片对象使用base64编码 :param image_pat...
zh
0.807897
# -*- coding: utf-8 -*- # # # Author: alex # Created Time: 2019年09月09日 星期一 15时51分40秒 人脸检测(输入的是base64编码的图像) :param image 图片对象使用base64编码 :param image_path 图片路径 :param image_type 输入图像类型, 取值jpg或者png :return image # 自动判断类型 # 先转化为jpg cv2转base64字符串
3.125835
3
Problem 27 - Quadratic primes/quadprim.py
kameranis/Project_Euler
0
6622757
""" Quadratic primes Finds a*b where n^2 + a*n + b yields the most primes <NAME> 21.11.2013 """ def quad(n, a, b): return n*n + b*n + a array=[0]*100000 array[0]=1 array[1]=1 for i in xrange(100000): if array[i]: continue for x in xrange(i, 100000/i): array[i*x]=1 maxi = 0 maxproduct = 0 f...
""" Quadratic primes Finds a*b where n^2 + a*n + b yields the most primes <NAME> 21.11.2013 """ def quad(n, a, b): return n*n + b*n + a array=[0]*100000 array[0]=1 array[1]=1 for i in xrange(100000): if array[i]: continue for x in xrange(i, 100000/i): array[i*x]=1 maxi = 0 maxproduct = 0 f...
en
0.36535
Quadratic primes Finds a*b where n^2 + a*n + b yields the most primes <NAME> 21.11.2013
3.740986
4
chapter2/intogen-arrays/lib/pubmed.py
chris-zen/phd-thesis
1
6622758
import urllib import urllib2 from lxml import etree class Pubmed(): def __init__(self): self.__url = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi" def find(self, pmid): if isinstance(pmid, basestring): pmid = [pmid] pmid = ",".join(pmid) data = urllib.urlencode({"db" : "pubmed", "id" : pmi...
import urllib import urllib2 from lxml import etree class Pubmed(): def __init__(self): self.__url = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi" def find(self, pmid): if isinstance(pmid, basestring): pmid = [pmid] pmid = ",".join(pmid) data = urllib.urlencode({"db" : "pubmed", "id" : pmi...
en
0.636004
#else: # article[k] = ""
3.311635
3
migrate_tool/services/url_list.py
zhengsunf/kitmanzheng
0
6622759
# -*- coding: utf-8 -*- from migrate_tool import storage_service from migrate_tool import task from logging import getLogger import requests import urlparse import hashlib logger = getLogger(__name__) class UrlListService(storage_service.StorageService): def __init__(self, *args, **kwargs): self._url_...
# -*- coding: utf-8 -*- from migrate_tool import storage_service from migrate_tool import task from logging import getLogger import requests import urlparse import hashlib logger = getLogger(__name__) class UrlListService(storage_service.StorageService): def __init__(self, *args, **kwargs): self._url_...
en
0.699443
# -*- coding: utf-8 -*- # size stores the sha1 or md5 of file # validate # print "task: ", task
2.297465
2
torchlite/data/fetcher.py
EKami/EzeeML
35
6622760
import urllib.request import os from kaggle_data.downloader import KaggleDataDownloader from tqdm import tqdm class KaggleDatasetFetcher: """ A tool used to automatically download datasets from Kaggle TODO: Use https://github.com/Kaggle/kaggle-api """ @staticmethod def download_datase...
import urllib.request import os from kaggle_data.downloader import KaggleDataDownloader from tqdm import tqdm class KaggleDatasetFetcher: """ A tool used to automatically download datasets from Kaggle TODO: Use https://github.com/Kaggle/kaggle-api """ @staticmethod def download_datase...
en
0.726472
A tool used to automatically download datasets from Kaggle TODO: Use https://github.com/Kaggle/kaggle-api Downloads the dataset and return the input paths. Do not download again if the data is already present. You need to define $KAGGLE_USER and $KAGGLE_PASSWD in your environment ...
2.914596
3
src/solutions/common/bizz/forms/statistics.py
goubertbrent/oca-backend
0
6622761
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
en
0.803268
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
1.784735
2
load_data.py
wheemyungshin/StockPrediction_CapstoneDA2021-1
1
6622762
<gh_stars>1-10 max_test_size = 11 simulation_size = 4 sample_step = 1 split_iter = 37 split_stride = 1 import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.preprocessing import MinMaxScaler from tqdm import tqdm import sys import warnings import torch import torch.nn as nn import torch...
max_test_size = 11 simulation_size = 4 sample_step = 1 split_iter = 37 split_stride = 1 import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.preprocessing import MinMaxScaler from tqdm import tqdm import sys import warnings import torch import torch.nn as nn import torch.nn.modules.con...
en
0.308986
# sample execution (requires torchvision)0 #나스닥 #코스닥 #달러/원 #코스피50 #코스피100 #코스피200 #천연가스 선물 #금 선물 #베트남무역은행 #9 : fdr.DataReader('KR1YT=RR', start_date, end_date),#한국채권1년수익률 #미국채권1개월수익률 df_dict = { 0 : fdr.DataReader('IXIC', start_date, end_date),#나스닥 1 : fdr.DataReader('USD/EUR', start_date, end_date),#달러/유로 ...
2.455578
2
test/test_seq_tools.py
wckdouglas/tgirt_seq_tools
7
6622763
<gh_stars>1-10 #!/usr/bin/env python import filecmp import logging import os from collections import defaultdict from sequencing_tools.fastq_tools import readfq logging.basicConfig(level=logging.INFO) logger = logging.getLogger(os.path.basename(__file__)) PROG_PREFIX = "" if os.environ["_"].endswith("poetry"): ...
#!/usr/bin/env python import filecmp import logging import os from collections import defaultdict from sequencing_tools.fastq_tools import readfq logging.basicConfig(level=logging.INFO) logger = logging.getLogger(os.path.basename(__file__)) PROG_PREFIX = "" if os.environ["_"].endswith("poetry"): PROG_PREFIX = "...
ru
0.26433
#!/usr/bin/env python
2.267389
2
project/migrations/0005_summary_datecompleted.py
mahdiieh/kholasesaz
0
6622764
<filename>project/migrations/0005_summary_datecompleted.py # Generated by Django 2.2.20 on 2022-02-05 15:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project', '0004_remove_summary_created'), ] operations = [ migrations.AddField( ...
<filename>project/migrations/0005_summary_datecompleted.py # Generated by Django 2.2.20 on 2022-02-05 15:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project', '0004_remove_summary_created'), ] operations = [ migrations.AddField( ...
en
0.793193
# Generated by Django 2.2.20 on 2022-02-05 15:57
1.318902
1
ObasiEmmanuel/Phase 1/Python Basic 1/Day 4 task/Question five.py
CodedLadiesInnovateTech/-python-challenge-solutions
6
6622765
def checker(): number=int(input("Enter number ")) a=[1,5,8,3] if number in a: return True else: return False print(checker())
def checker(): number=int(input("Enter number ")) a=[1,5,8,3] if number in a: return True else: return False print(checker())
none
1
3.726161
4
typetest/analyse/mistyped_words_pie_chart.py
MasterMedo/typetest
15
6622766
<gh_stars>10-100 import pandas as pd import matplotlib.pyplot as plt from typetest.utils import ( validate_input_file_path, damerau_levenshtein_distance, ) @validate_input_file_path def plot(input_file, filter_func=lambda c: True): """Plots a pie chart representing the shares of numbers of mistakes in ...
import pandas as pd import matplotlib.pyplot as plt from typetest.utils import ( validate_input_file_path, damerau_levenshtein_distance, ) @validate_input_file_path def plot(input_file, filter_func=lambda c: True): """Plots a pie chart representing the shares of numbers of mistakes in mistyped words....
en
0.813089
Plots a pie chart representing the shares of numbers of mistakes in mistyped words. # ax = sns.histplot(mistakes, stat="probability")
3.038887
3
update_rosters2.py
amoliski/swgoh_vis
0
6622767
import swgoh swgoh.update_rosters(True, part=2)
import swgoh swgoh.update_rosters(True, part=2)
none
1
1.086443
1
Models/get_model.py
LinusWu/TENET-Training
8
6622768
<gh_stars>1-10 import sys sys.path.append('./Models/') from resnext import ResneXt as Resnext29 from resnet import ResNet,BasicBlock,Bottleneck from torchvision_models import load_pretrained, pretrained_settings import torch import torch.nn.functional as F import numpy as np def Resnext29_init(config): if config.d...
import sys sys.path.append('./Models/') from resnext import ResneXt as Resnext29 from resnet import ResNet,BasicBlock,Bottleneck from torchvision_models import load_pretrained, pretrained_settings import torch import torch.nn.functional as F import numpy as np def Resnext29_init(config): if config.dataset.lower() ...
en
0.382881
#resnet = torch.nn.DataParallel(model) #resnet.cuda() #resnet.load_state_dict(torch.load(config.resume_model_path)) # remove `module.` # pylint: disable=g-long-lambda # lr_lambda computes multiplicative factor # lr_scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=config.epoch , eta_min=0) Compute...
2.327253
2
CODE/Scripts/schools/greatschoolsratings.py
jdills26/cse6242-project-code
0
6622769
import requests import pandas as pd from io import StringIO, BytesIO from lxml import etree as et API_KEY = '<GREATSCHOOLS.ORG API KEY GOES HERE>' def generate_file(name, response): d = {} df = pd.DataFrame() tree = et.fromstring(response.content) for child in tree: for children in child: ...
import requests import pandas as pd from io import StringIO, BytesIO from lxml import etree as et API_KEY = '<GREATSCHOOLS.ORG API KEY GOES HERE>' def generate_file(name, response): d = {} df = pd.DataFrame() tree = et.fromstring(response.content) for child in tree: for children in child: ...
none
1
3.084067
3
llorma_p/configs.py
JoonyoungYi/LLORMA-tensorflow
9
6622770
GPU_MEMORY_FRAC = 0.95 N_SHOT = 0 N_ANCHOR = 50 PRE_RANK = 5 PRE_LEARNING_RATE = 1e-4 PRE_LAMBDA = 10 LOCAL_RANK = 20 LOCAL_LEARNING_RATE = 1e-2 LOCAL_LAMBDA = 1e-3 BATCH_SIZE = 1000 USE_CACHE = True
GPU_MEMORY_FRAC = 0.95 N_SHOT = 0 N_ANCHOR = 50 PRE_RANK = 5 PRE_LEARNING_RATE = 1e-4 PRE_LAMBDA = 10 LOCAL_RANK = 20 LOCAL_LEARNING_RATE = 1e-2 LOCAL_LAMBDA = 1e-3 BATCH_SIZE = 1000 USE_CACHE = True
none
1
1.060787
1
slide/snippet/map_composition.py
TomohikoK/PyCat
0
6622771
<reponame>TomohikoK/PyCat<gh_stars>0 def double(arg: int) -> int: return arg * 2 x: List[str] = ['a', 'bb'] x1 = list(map(double @ length_of_str, x)) x2 = list(map(double, list(map(length_of_str, x)))) assert x1 == x2 # どちらの値も[2, 4]
def double(arg: int) -> int: return arg * 2 x: List[str] = ['a', 'bb'] x1 = list(map(double @ length_of_str, x)) x2 = list(map(double, list(map(length_of_str, x)))) assert x1 == x2 # どちらの値も[2, 4]
ja
0.407428
# どちらの値も[2, 4]
3.571981
4
ifttt/views.py
wikimedia/ifttt
33
6622772
# -*- coding: utf-8 -*- """ Wikipedia channel for IFTTT ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright 2015 <NAME> <<EMAIL>> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apa...
# -*- coding: utf-8 -*- """ Wikipedia channel for IFTTT ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright 2015 <NAME> <<EMAIL>> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apa...
en
0.832032
# -*- coding: utf-8 -*- Wikipedia channel for IFTTT ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright 2015 <NAME> <<EMAIL>> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.or...
2.406612
2
weather_api/weather_app/api_config/bar_chart.py
brian-duffy/yoyo-test
0
6622773
<reponame>brian-duffy/yoyo-test<filename>weather_api/weather_app/api_config/bar_chart.py # -*- coding: utf-8 -*- from graphos.sources.simple import SimpleDataSource from graphos.renderers.gchart import LineChart, BarChart def get_chart(data=None, chart='barchart'): """ Function to return a chart object for re...
# -*- coding: utf-8 -*- from graphos.sources.simple import SimpleDataSource from graphos.renderers.gchart import LineChart, BarChart def get_chart(data=None, chart='barchart'): """ Function to return a chart object for rendering in a view :param data: :return: """ all_temps = [x['main']['temp'...
en
0.62018
# -*- coding: utf-8 -*- Function to return a chart object for rendering in a view :param data: :return: # DataSource object # Chart object
3.188679
3
richkit/test/retrieve/test_whois.py
kidmose/richkit
12
6622774
import unittest from datetime import datetime from richkit.retrieve import whois class WhoisTestCase(unittest.TestCase): # .dk domains give unknownTld exception ! def test_get_whois_info(self): # last updated field skipped since it could be None d = "www.google.com" w = whois.get_who...
import unittest from datetime import datetime from richkit.retrieve import whois class WhoisTestCase(unittest.TestCase): # .dk domains give unknownTld exception ! def test_get_whois_info(self): # last updated field skipped since it could be None d = "www.google.com" w = whois.get_who...
en
0.87655
# .dk domains give unknownTld exception ! # last updated field skipped since it could be None # .com uses "thin" WHOIS, so we get expiry from both registry # and registrar; # .com uses "thin" WHOIS, so we get expiry from both registry # and registrar, but they are equal here, so only one is returned;
2.718499
3
src/upy_platform.py
abraha2d/pb4-firmware
0
6622775
<gh_stars>0 from os import uname # noinspection PyUnresolvedReferences from esp32 import NVS # noinspection PyUnresolvedReferences from machine import I2C, Pin, PWM, Signal, TouchPad # noinspection PyUnresolvedReferences from network import AP_IF, STA_IF, WLAN from uasyncio import sleep_ms class FakeSignal: pas...
from os import uname # noinspection PyUnresolvedReferences from esp32 import NVS # noinspection PyUnresolvedReferences from machine import I2C, Pin, PWM, Signal, TouchPad # noinspection PyUnresolvedReferences from network import AP_IF, STA_IF, WLAN from uasyncio import sleep_ms class FakeSignal: pass version ...
en
0.462762
# noinspection PyUnresolvedReferences # noinspection PyUnresolvedReferences # noinspection PyUnresolvedReferences
2.108531
2
tests/rules/test_category_coverage.py
gitter-badger/arche
0
6622776
from arche.rules.category_coverage import get_coverage_per_category from arche.rules.result import Level from conftest import create_result import pandas as pd import pytest @pytest.mark.parametrize( "data, tags, expected_messages", [ ( {"sex": ["male", "female", "male"], "country": ["uk",...
from arche.rules.category_coverage import get_coverage_per_category from arche.rules.result import Level from conftest import create_result import pandas as pd import pytest @pytest.mark.parametrize( "data, tags, expected_messages", [ ( {"sex": ["male", "female", "male"], "country": ["uk",...
none
1
2.706221
3
primary/amber/log.py
KarlTDebiec/MDclt
0
6622777
# -*- coding: utf-8 -*- # MDclt.primary.amber.log.py # # Copyright (C) 2012-2015 <NAME> # All rights reserved. # # This software may be modified and distributed under the terms of the # BSD license. See the LICENSE file for details. """ Classes for transfer of AMBER simulation logs to h5 """ #################...
# -*- coding: utf-8 -*- # MDclt.primary.amber.log.py # # Copyright (C) 2012-2015 <NAME> # All rights reserved. # # This software may be modified and distributed under the terms of the # BSD license. See the LICENSE file for details. """ Classes for transfer of AMBER simulation logs to h5 """ #################...
en
0.568547
# -*- coding: utf-8 -*- # MDclt.primary.amber.log.py # # Copyright (C) 2012-2015 <NAME> # All rights reserved. # # This software may be modified and distributed under the terms of the # BSD license. See the LICENSE file for details. Classes for transfer of AMBER simulation logs to h5 #########################...
2.219608
2
FutureScope/stylize_image.py
andrewstito/Image-Style-Transfer
0
6622778
<reponame>andrewstito/Image-Style-Transfer #imports import os import numpy as np from os.path import exists from sys import stdout import utils from argparse import ArgumentParser import tensorflow as tf import transform NETWORK_PATH='networks' def build_parser(): parser = ArgumentParser() parser.add_argument...
#imports import os import numpy as np from os.path import exists from sys import stdout import utils from argparse import ArgumentParser import tensorflow as tf import transform NETWORK_PATH='networks' def build_parser(): parser = ArgumentParser() parser.add_argument('--content', type=str, ...
en
0.86752
#imports # content and trained network path check #main # Checking if image size is div by 4. This is a pre-consdition in the model implemented
2.680131
3
mentors/mentors/models.py
mattfreire/mentors
1
6622779
import uuid from django.contrib.auth import get_user_model from django.db import models from django.db.models import Sum User = get_user_model() class Mentor(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) is_active = models.BooleanField(default=False) rate = models.IntegerFie...
import uuid from django.contrib.auth import get_user_model from django.db import models from django.db.models import Sum User = get_user_model() class Mentor(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) is_active = models.BooleanField(default=False) rate = models.IntegerFie...
en
0.653055
# cents # seconds # seconds
2.228348
2
main.py
junaidrahim/kiitwifi-speedtest
3
6622780
<reponame>junaidrahim/kiitwifi-speedtest #!/usr/bin/python3 # this is the main script to run the speedtest every 5 minutes import subprocess from datetime import datetime import time while True: timestamp = datetime.now() f = open("/home/junaid/code/other/kiitspeedtest/data.txt", "a") result = subpr...
#!/usr/bin/python3 # this is the main script to run the speedtest every 5 minutes import subprocess from datetime import datetime import time while True: timestamp = datetime.now() f = open("/home/junaid/code/other/kiitspeedtest/data.txt", "a") result = subprocess.run(['speedtest-cli'], stdout=subpr...
en
0.70281
#!/usr/bin/python3 # this is the main script to run the speedtest every 5 minutes
2.689626
3
common_configs/apps/imagekit.py
nigma/django-common-configs
5
6622781
#-*- coding: utf-8 -*- """ Settings for django-imagekit_ - automated image processing for Django .. _django-imagekit: https://github.com/matthewwithanm/django-imagekit """ from __future__ import absolute_import, division, print_function, unicode_literals from configurations import values from ..utils import merge_...
#-*- coding: utf-8 -*- """ Settings for django-imagekit_ - automated image processing for Django .. _django-imagekit: https://github.com/matthewwithanm/django-imagekit """ from __future__ import absolute_import, division, print_function, unicode_literals from configurations import values from ..utils import merge_...
en
0.439663
#-*- coding: utf-8 -*- Settings for django-imagekit_ - automated image processing for Django .. _django-imagekit: https://github.com/matthewwithanm/django-imagekit #: Use optimistic strategy #: #: http://django-imagekit.rtfd.org/latest/configuration.html#django.conf.settings.IMAGEKIT_DEFAULT_CACHEFILE_STRATEGY #: Defi...
1.773731
2
tests/test_03_id_token.py
IdentityPython/oicsrv
6
6622782
<reponame>IdentityPython/oicsrv import json import os from cryptojwt.jws import jws from cryptojwt.jwt import JWT from cryptojwt.key_jar import KeyJar from oidcmsg.oidc import AuthorizationRequest from oidcmsg.oidc import RegistrationResponse from oidcmsg.time_util import time_sans_frac import pytest from oidcendpoin...
import json import os from cryptojwt.jws import jws from cryptojwt.jwt import JWT from cryptojwt.key_jar import KeyJar from oidcmsg.oidc import AuthorizationRequest from oidcmsg.oidc import RegistrationResponse from oidcmsg.time_util import time_sans_frac import pytest from oidcendpoint.authn_event import create_auth...
en
0.661348
# Constructing an authorization code is now done # 5 minutes from now # 15 minutes from now # Means the token (tok) was used to mint this token # default signing alg # default signing alg # default signing alg # default signing alg # self.endpoint_context.cdb["client_1"]["id_token_claims"] = {"address": None} # self.en...
2.060839
2
abc229/abc229_a.py
Vermee81/practice-coding-contests
0
6622783
<gh_stars>0 # https://atcoder.jp/contests/abc229/tasks/abc229_a S, T, X = map(int, input().split()) if S == T: print("No") exit() if S > T: ans = "Yes" if X >= S or X < T else "No" print(ans) exit() ans = "Yes" if S <= X < T else "No" print(ans)
# https://atcoder.jp/contests/abc229/tasks/abc229_a S, T, X = map(int, input().split()) if S == T: print("No") exit() if S > T: ans = "Yes" if X >= S or X < T else "No" print(ans) exit() ans = "Yes" if S <= X < T else "No" print(ans)
en
0.425791
# https://atcoder.jp/contests/abc229/tasks/abc229_a
3.359666
3
vcfModifier/vcfIntersector.py
ccgenomics/somaticseq
2
6622784
#!/usr/bin/env python3 import sys, os, argparse, gzip, re, subprocess, uuid MY_DIR = os.path.dirname(os.path.realpath(__file__)) PRE_DIR = os.path.join(MY_DIR, os.pardir) sys.path.append( PRE_DIR ) import genomicFileHandler.genomic_file_handlers as genome def bed_include(infile, inclusion_region, outfile): ...
#!/usr/bin/env python3 import sys, os, argparse, gzip, re, subprocess, uuid MY_DIR = os.path.dirname(os.path.realpath(__file__)) PRE_DIR = os.path.join(MY_DIR, os.pardir) sys.path.append( PRE_DIR ) import genomicFileHandler.genomic_file_handlers as genome def bed_include(infile, inclusion_region, outfile): ...
en
0.446376
#!/usr/bin/env python3 # Get the input file name minus the extention, and also get the extension # Use utilities/vcfsorter.pl fa.dict unsorted.vcf > sorted.vcf #vcfsort = '{}/utilities/vcfsorter.pl'.format(PRE_DIR) #os.system( '{} {} {} > {}'.format(vcfsort, hg_dict, vcfin, vcfout ) )
2.279131
2
Test/LambOseenTest.py
gforsyth/pyfmm
11
6622785
<reponame>gforsyth/pyfmm<gh_stars>10-100 """ Fast Multipole Method test. Solving Vortex Blob Method for Lamb Oseen test case. The number of particles of the problem depends on the size of the computational domain Usage: -l <number> Number of levels for the FMM -p <number> Truncation Number for the ...
""" Fast Multipole Method test. Solving Vortex Blob Method for Lamb Oseen test case. The number of particles of the problem depends on the size of the computational domain Usage: -l <number> Number of levels for the FMM -p <number> Truncation Number for the FMM -n <number> Size of the comput...
en
0.448846
Fast Multipole Method test. Solving Vortex Blob Method for Lamb Oseen test case. The number of particles of the problem depends on the size of the computational domain Usage: -l <number> Number of levels for the FMM -p <number> Truncation Number for the FMM -n <number> Size of the computation...
2.675387
3
problem0385.py
kmarcini/Project-Euler-Python
0
6622786
<filename>problem0385.py ########################### # # #385 Ellipses inside triangles - Project Euler # https://projecteuler.net/problem=385 # # Code by <NAME> # ###########################
<filename>problem0385.py ########################### # # #385 Ellipses inside triangles - Project Euler # https://projecteuler.net/problem=385 # # Code by <NAME> # ###########################
de
0.34224
########################### # # #385 Ellipses inside triangles - Project Euler # https://projecteuler.net/problem=385 # # Code by <NAME> # ###########################
1.996838
2
gpio.py
Heych88/Intel_edision_rotor_control
0
6622787
<reponame>Heych88/Intel_edision_rotor_control # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE ...
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHET...
en
0.431682
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHET...
2.945903
3
plotting.py
harryturr/analysis
0
6622788
#!/usr/bin/env python2 # <NAME> 2019 # @harryturr import numpy as np import os from scipy.optimize import curve_fit import matplotlib.pyplot as plt import seaborn as sns import pandas as pd file_number = np.array([%s]) % #number of ifle label_list = np.array([%s]) % #label filename_prefix = 'prefix' filename_suff...
#!/usr/bin/env python2 # <NAME> 2019 # @harryturr import numpy as np import os from scipy.optimize import curve_fit import matplotlib.pyplot as plt import seaborn as sns import pandas as pd file_number = np.array([%s]) % #number of ifle label_list = np.array([%s]) % #label filename_prefix = 'prefix' filename_suff...
en
0.7306
#!/usr/bin/env python2 # <NAME> 2019 # @harryturr #number of ifle #label # moving average box by convolution # extracting data # scaling to Hz (50 hz/V) # determining where to split the data # splitting freq shift # calculating difference # splitting dissipation # define figure environment # plotting dissipation vs fre...
2.474503
2
pYadivForm.py
alanphys/pYadiv
1
6622789
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pYadivForm.ui', # licensing of 'pYadivForm.ui' applies. # # Created: Mon Jul 15 11:15:34 2019 # by: pyside2-uic running on PySide2 5.12.1 # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore, QtGui, QtWi...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pYadivForm.ui', # licensing of 'pYadivForm.ui' applies. # # Created: Mon Jul 15 11:15:34 2019 # by: pyside2-uic running on PySide2 5.12.1 # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore, QtGui, QtWi...
en
0.782074
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pYadivForm.ui', # licensing of 'pYadivForm.ui' applies. # # Created: Mon Jul 15 11:15:34 2019 # by: pyside2-uic running on PySide2 5.12.1 # # WARNING! All changes made in this file will be lost!
1.422722
1
topfarm/tests/test_files/xy3tb.py
DTUWindEnergy/TopFarm2
4
6622790
<filename>topfarm/tests/test_files/xy3tb.py import numpy as np from topfarm.cost_models.dummy import DummyCost, DummyCostPlotComp from topfarm.easy_drivers import EasyScipyOptimizeDriver from topfarm._topfarm import TopFarmProblem from topfarm.plotting import NoPlot from topfarm.constraint_components.spacing import Sp...
<filename>topfarm/tests/test_files/xy3tb.py import numpy as np from topfarm.cost_models.dummy import DummyCost, DummyCostPlotComp from topfarm.easy_drivers import EasyScipyOptimizeDriver from topfarm._topfarm import TopFarmProblem from topfarm.plotting import NoPlot from topfarm.constraint_components.spacing import Sp...
en
0.601439
# initial turbine layouts # optimal turbine layouts # turbine boundaries # desired turbine layouts
2.114615
2
tests/storage/cases/test_KT1TguwcxJYaEYSMhXJFjHzXmro8cP37K13N.py
juztin/pytezos-1
1
6622791
from unittest import TestCase from tests import get_data from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson class StorageTestKT1TguwcxJYaEYSMhXJFjHzXmro8cP37K13N(TestCase): @classmethod def setUpClass(cls): cls.maxDiff = None cls....
from unittest import TestCase from tests import get_data from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson class StorageTestKT1TguwcxJYaEYSMhXJFjHzXmro8cP37K13N(TestCase): @classmethod def setUpClass(cls): cls.maxDiff = None cls....
none
1
2.483882
2
properties/p.py
anandjoshi91/pythonpropertyfileloader
3
6622792
<gh_stars>1-10 import re from collections import OrderedDict class Property: """ A class similar to Properties class in Java Reads variables/properties defined in a file Allows cross referencing of variables """ def __init__(self, assign_token: str = '=', comment_token: str = '#...
import re from collections import OrderedDict class Property: """ A class similar to Properties class in Java Reads variables/properties defined in a file Allows cross referencing of variables """ def __init__(self, assign_token: str = '=', comment_token: str = '#', line_append_...
en
0.809609
A class similar to Properties class in Java Reads variables/properties defined in a file Allows cross referencing of variables optional parameters A standard property file follows the convention = is used to assign a variable or property # for comments in the pr...
3.939425
4
python/PyPedals.py
enok82/VLCPedals
0
6622793
''' Created on 11 apr. 2017 @author: stefan ''' from telnetlib import Telnet from serial import Serial from time import sleep class VlcControl: def __init__(self): self.telnetConnection = Telnet("localhost", 4212) telnetBuffer = "" while not telnetBuffer.endswith("Password: "): ...
''' Created on 11 apr. 2017 @author: stefan ''' from telnetlib import Telnet from serial import Serial from time import sleep class VlcControl: def __init__(self): self.telnetConnection = Telnet("localhost", 4212) telnetBuffer = "" while not telnetBuffer.endswith("Password: "): ...
en
0.442336
Created on 11 apr. 2017 @author: stefan
2.580562
3
Code/src/models/networks/AE_ResNet18_dual.py
antoine-spahr/X-ray-Anomaly-Detection
2
6622794
import torch import torch.nn as nn import torch.nn.functional as F import torchvision.models.utils from src.models.networks.ResNetBlocks import DownResBlock, UpResBlock class ResNet18_Encoder(nn.Module): """ Combine multiple Residual block to form a ResNet18 up to the Average poolong layer. The size of th...
import torch import torch.nn as nn import torch.nn.functional as F import torchvision.models.utils from src.models.networks.ResNetBlocks import DownResBlock, UpResBlock class ResNet18_Encoder(nn.Module): """ Combine multiple Residual block to form a ResNet18 up to the Average poolong layer. The size of th...
en
0.798081
Combine multiple Residual block to form a ResNet18 up to the Average poolong layer. The size of the embeding dimension can be different than the one from ResNet18. The ResNet18 part can be initialized with pretrained weights on ImageNet. Build the Encoder from the layer's specification. The encoder is composed ...
3.067917
3
core/tests/test_models.py
Pmtague/recipe-app-api
0
6622795
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): # Test method names must all start with test_ def test_create_user_with_email_successful(self): """Test creating a new user with an email is successful""" # Test user info email...
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): # Test method names must all start with test_ def test_create_user_with_email_successful(self): """Test creating a new user with an email is successful""" # Test user info email...
en
0.911789
# Test method names must all start with test_ Test creating a new user with an email is successful # Test user info # Create test user # Assert that email and password created match those above Test the email for a new user is normalized # Test user info # Create test user # Assert that the email address is stored in a...
3.034855
3
sigopt-beats-vegas/predictor/features.py
meghanaravikumar/sigopt-examples
213
6622796
<filename>sigopt-beats-vegas/predictor/features.py from collections import namedtuple FeatureSet = namedtuple( "FeatureSet", [ "PTSpm", # Points per minute "OREBpm", # Offensive rebounds per minute "DREBpm", # Defensive rebounds per minute "STLpm", # Steals per minute "BLKpm", # B...
<filename>sigopt-beats-vegas/predictor/features.py from collections import namedtuple FeatureSet = namedtuple( "FeatureSet", [ "PTSpm", # Points per minute "OREBpm", # Offensive rebounds per minute "DREBpm", # Defensive rebounds per minute "STLpm", # Steals per minute "BLKpm", # B...
en
0.726981
# Points per minute # Offensive rebounds per minute # Defensive rebounds per minute # Steals per minute # Blocks per minute # Assists per minute # Points in paint per minute # Second chance points per minute # Fast break points per minute # Lead changes per minute # Times tied per minute # Largest lead per game # Point...
2.551422
3
lldb/test/API/functionalities/dyld-exec-linux/TestDyldExecLinux.py
ornata/llvm-project
0
6622797
""" Test that LLDB can launch a linux executable and then execs into the dynamic loader into this program again. """ import lldb import os from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestLinux64ExecViaDynamicLoader(TestBase): mydir = Tes...
""" Test that LLDB can launch a linux executable and then execs into the dynamic loader into this program again. """ import lldb import os from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestLinux64ExecViaDynamicLoader(TestBase): mydir = Tes...
en
0.874424
Test that LLDB can launch a linux executable and then execs into the dynamic loader into this program again. # Extracts path of the interpreter. # Set a breakpoint in the main function that will get hit after the # program exec's via the dynamic loader. The breakpoint will only get # hit if we can successfully read the...
2.082911
2
learning/process/distributed/job.py
seasonfif/python
0
6622798
#!/usr/bin/env python # coding=utf-8 class Job: def __init__(self, job_id): self.job_id = job_id
#!/usr/bin/env python # coding=utf-8 class Job: def __init__(self, job_id): self.job_id = job_id
en
0.244401
#!/usr/bin/env python # coding=utf-8
2.410032
2
setup.py
kokokuo/pydomain
1
6622799
from setuptools import setup, find_packages setup( name='pydomain', version='0.1', author="kokokuo", author_email="<EMAIL>", description="This is a domain-driven design tatical building blocks package for python.", packages=find_packages(exclude=["docs", "tests*"]), install_requires=[ ...
from setuptools import setup, find_packages setup( name='pydomain', version='0.1', author="kokokuo", author_email="<EMAIL>", description="This is a domain-driven design tatical building blocks package for python.", packages=find_packages(exclude=["docs", "tests*"]), install_requires=[ ...
none
1
1.290903
1
pycrypto_tid_demo.py
nwinds/demoServer
0
6622800
from Crypto.Hash import SHA256 from Crypto.Hash import HMAC from binascii import b2a_hex from binascii import a2b_hex import base64 def hmac(key, data): if len(key) > 32: print("Warning") return HMAC.new(key, data, digestmod=SHA256).digest() cid = 'ClientId00000001' nonce = a2b_hex('0101010101010101')...
from Crypto.Hash import SHA256 from Crypto.Hash import HMAC from binascii import b2a_hex from binascii import a2b_hex import base64 def hmac(key, data): if len(key) > 32: print("Warning") return HMAC.new(key, data, digestmod=SHA256).digest() cid = 'ClientId00000001' nonce = a2b_hex('0101010101010101')...
none
1
2.982124
3
rasa_core/version.py
htonthat/rasa_core
1
6622801
__version__ = '0.13.0a5'
__version__ = '0.13.0a5'
none
1
1.056348
1
src/wp_cli/db_check.py
wpsmith/wp-cli-python
0
6622802
from wp.command import WPCommand class DBCheck(WPCommand): command = ['db', 'check'] # Extra arguments to pass to mysqldump. Refer to mysqldump docs. fields = [] # Loads the environment’s MySQL option files. # Default behavior is to skip loading them to avoid failures due to misconfiguration. ...
from wp.command import WPCommand class DBCheck(WPCommand): command = ['db', 'check'] # Extra arguments to pass to mysqldump. Refer to mysqldump docs. fields = [] # Loads the environment’s MySQL option files. # Default behavior is to skip loading them to avoid failures due to misconfiguration. ...
en
0.754352
# Extra arguments to pass to mysqldump. Refer to mysqldump docs. # Loads the environment’s MySQL option files. # Default behavior is to skip loading them to avoid failures due to misconfiguration.
2.280333
2
models.py
JJendryka/Chores
0
6622803
<reponame>JJendryka/Chores<filename>models.py from flask_sqlalchemy import SQLAlchemy from authlib.integrations.sqla_oauth2 import OAuth2ClientMixin, OAuth2TokenMixin, OAuth2AuthorizationCodeMixin from flask_bcrypt import generate_password_hash, check_password_hash db = SQLAlchemy() def init_app(app): db.init_app...
from flask_sqlalchemy import SQLAlchemy from authlib.integrations.sqla_oauth2 import OAuth2ClientMixin, OAuth2TokenMixin, OAuth2AuthorizationCodeMixin from flask_bcrypt import generate_password_hash, check_password_hash db = SQLAlchemy() def init_app(app): db.init_app(app) class User(db.Model): id = db.Colum...
none
1
2.606292
3
Lesson16_Classes/1-Types.py
StyvenSoft/degree-python
0
6622804
<filename>Lesson16_Classes/1-Types.py a_string = "<NAME>" an_int = 12 print(type(a_string)) # prints "<class 'str'>" print(type(an_int)) # prints "<class 'int'>" print(type(5)) #<class 'int'> my_dict = {} print(type(my_dict)) # <class 'dict'> my_list = [] print(type(my_list)) # <class 'list'>
<filename>Lesson16_Classes/1-Types.py a_string = "<NAME>" an_int = 12 print(type(a_string)) # prints "<class 'str'>" print(type(an_int)) # prints "<class 'int'>" print(type(5)) #<class 'int'> my_dict = {} print(type(my_dict)) # <class 'dict'> my_list = [] print(type(my_list)) # <class 'list'>
en
0.148824
# prints "<class 'str'>" # prints "<class 'int'>" #<class 'int'> # <class 'dict'> # <class 'list'>
3.475384
3
scripts/examples/ESTELA/ESTELA_PCA.py
teslakit/teslak
12
6622805
<reponame>teslakit/teslak<filename>scripts/examples/ESTELA/ESTELA_PCA.py #!/usr/bin/env python # -*- coding: utf-8 -*- # common  import os import os.path as op # pip import numpy as np import matplotlib.pyplot as plt import xarray as xr # DEV: override installed teslakit import sys sys.path.insert(0,'../../../') # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # common  import os import os.path as op # pip import numpy as np import matplotlib.pyplot as plt import xarray as xr # DEV: override installed teslakit import sys sys.path.insert(0,'../../../') # teslakit from teslakit.project_site import PathControl from teslakit.io.m...
en
0.301738
#!/usr/bin/env python # -*- coding: utf-8 -*- # common # pip # DEV: override installed teslakit # teslakit # -------------------------------------- # Test data storage # -------------------------------------- # use teslakit test data # Calculate PCA # Plot EOFs
2.290646
2
Python/Introduction/1HelloWorld.py
phillipemoreira/HackerRank
0
6622806
<reponame>phillipemoreira/HackerRank #Problem link: https://www.hackerrank.com/challenges/py-hello-world # Write your code on the next line. print("Hello, World!")
#Problem link: https://www.hackerrank.com/challenges/py-hello-world # Write your code on the next line. print("Hello, World!")
en
0.847457
#Problem link: https://www.hackerrank.com/challenges/py-hello-world # Write your code on the next line.
2.921839
3
cotk/_utils/unordered_hash.py
ishine/cotk
117
6622807
''' A module for hash unordered elements ''' from typing import Union from collections import OrderedDict import hashlib import json import warnings class UnorderedSha256: ''' Using SHA256 on unordered elements ''' def __init__(self): self.result = [0] * 32 def update_data(self, data: Union[bytes, bytearra...
''' A module for hash unordered elements ''' from typing import Union from collections import OrderedDict import hashlib import json import warnings class UnorderedSha256: ''' Using SHA256 on unordered elements ''' def __init__(self): self.result = [0] * 32 def update_data(self, data: Union[bytes, bytearra...
en
0.641927
A module for hash unordered elements Using SHA256 on unordered elements update digest by data. type(data)=bytes update digest by hash. type(hashvalue)=bytes return unordered hashvalue return unordered hashvalue Generate bytes to identify the object by json serialization Generate bytes to identify the object by repr # E...
3.403936
3
tests/test_pull.py
cincanproject/cincan-command
1
6622808
<filename>tests/test_pull.py import logging import pytest from unittest import mock from cincan.frontend import ToolImage from cincan.configuration import Configuration DEFAULT_IMAGE = "quay.io/cincan/test" DEFAULT_STABLE_TAG = Configuration().default_stable_tag DEFAULT_DEV_TAG = Configuration().default_dev_tag def ...
<filename>tests/test_pull.py import logging import pytest from unittest import mock from cincan.frontend import ToolImage from cincan.configuration import Configuration DEFAULT_IMAGE = "quay.io/cincan/test" DEFAULT_STABLE_TAG = Configuration().default_stable_tag DEFAULT_DEV_TAG = Configuration().default_dev_tag def ...
en
0.777016
# cincan/test image has only 'dev' tag # Ignore version check messages, get two first # Busybox is not 'cincan' image, pulling normally # Busybox is not 'cincan' image, pulling non existing tag # Pulling non-existing tag from cincan tool # Pulling from non-existing repository 'cincann' Test for pulling non-existing 'ci...
2.248144
2
records/test_talks.py
gridpp/dissem-toolkit
1
6622809
#!/usr/bin/env python # -*- coding: utf-8 -*- #...the usual suspects. import os, inspect #...for the unit testing. import unittest #...for the logging. import logging as lg #...for the Pixelman dataset wrapper. from talks import Talk class TalkTest(unittest.TestCase): def setUp(self): pass def te...
#!/usr/bin/env python # -*- coding: utf-8 -*- #...the usual suspects. import os, inspect #...for the unit testing. import unittest #...for the logging. import logging as lg #...for the Pixelman dataset wrapper. from talks import Talk class TalkTest(unittest.TestCase): def setUp(self): pass def te...
en
0.672527
#!/usr/bin/env python # -*- coding: utf-8 -*- #...the usual suspects. #...for the unit testing. #...for the logging. #...for the Pixelman dataset wrapper. ## The test talk. # The talk title. # The talk date string. # The talk URL. # The authors. # The event URL. # The web entry. <li> <a href="https://indico.cern.ch/eve...
2.338108
2
credentials_replacer/replacer.py
singleton11/aws-credential-replacer
10
6622810
#!/usr/bin/env python import os import sys import click from credstash import getSecret, listSecrets from jinja2 import Environment, FileSystemLoader def render_with_credentials(file): """Render file argument with credstash credentials Load file as jinja2 template and render it with context where keys are ...
#!/usr/bin/env python import os import sys import click from credstash import getSecret, listSecrets from jinja2 import Environment, FileSystemLoader def render_with_credentials(file): """Render file argument with credstash credentials Load file as jinja2 template and render it with context where keys are ...
en
0.51294
#!/usr/bin/env python Render file argument with credstash credentials Load file as jinja2 template and render it with context where keys are credstash keys and values are credstash values Args: file (str): jinja2 template file path Returns: str: Rendered string Output rendered templa...
3.010739
3
main/Customer/views.py
VikasSherawat/OrderFood
0
6622811
from django.shortcuts import render from django.contrib import messages # Create your views here. from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponseRedirect from ..models import Shop, User, Customer, FoodItem,Order def fooditems(request, shop_id): shops = Shop....
from django.shortcuts import render from django.contrib import messages # Create your views here. from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponseRedirect from ..models import Shop, User, Customer, FoodItem,Order def fooditems(request, shop_id): shops = Shop....
en
0.968116
# Create your views here.
2.415996
2
flaxOptimizersBenchmark/mnist.py
nestordemeure/flaxOptimizersBenchmark
2
6622812
import tensorflow_datasets as tfds from .architectures import SimpleCNN from .training_loop import cross_entropy, accuracy, training_loop, make_training_loop_description, make_problem_description, Experiment # defines the model model=SimpleCNN(num_classes=10) model_name="SimpleCNN" # defines the training parameters b...
import tensorflow_datasets as tfds from .architectures import SimpleCNN from .training_loop import cross_entropy, accuracy, training_loop, make_training_loop_description, make_problem_description, Experiment # defines the model model=SimpleCNN(num_classes=10) model_name="SimpleCNN" # defines the training parameters b...
en
0.813575
# defines the model # defines the training parameters gets the dataset from the given path this function works ONLY if the dataset has been previously downloaded # this download by default, see https://www.tensorflow.org/datasets/api_docs/python/tfds/load #nb_classes = info.features['label'].num_classes # converts ...
3.358751
3
{{cookiecutter.repository_name}}/{{cookiecutter.package_name}}/problem/__init__.py
Aiwizo/pytorch-lantern-template
1
6622813
<reponame>Aiwizo/pytorch-lantern-template from {{cookiecutter.package_name}}.problem.example import Example from {{cookiecutter.package_name}}.problem.datasets import datasets
from {{cookiecutter.package_name}}.problem.example import Example from {{cookiecutter.package_name}}.problem.datasets import datasets
none
1
1.09958
1
visualizer/test/generate-memory-overview.py
asavonic/memprof
0
6622814
#!/usr/bin/env python # The MIT License (MIT) # # Copyright (c) 2016 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # t...
#!/usr/bin/env python # The MIT License (MIT) # # Copyright (c) 2016 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # t...
en
0.756309
#!/usr/bin/env python # The MIT License (MIT) # # Copyright (c) 2016 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to...
2.414246
2
app/core/tests/test_admin.py
FaridQattali/recipe-app-api
0
6622815
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( '<EMAIL>', 'admin123...
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( '<EMAIL>', 'admin123...
en
0.522682
Test users are listed in django admin Test user edit page renders correctlly Tests if user create page renders correctly
2.627995
3
test/fixtures/projects/printenv/project/action_plugins/look_at_environment.py
valbendan/ansible-runner
658
6622816
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.plugins.action import ActionBase import os class ActionModule(ActionBase): def run(self, tmp=None, task_vars=None): result = super(ActionModule, self).run(tmp, task_vars) result['changed'] = res...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.plugins.action import ActionBase import os class ActionModule(ActionBase): def run(self, tmp=None, task_vars=None): result = super(ActionModule, self).run(tmp, task_vars) result['changed'] = res...
none
1
2.166121
2
berktempy/core.py
d-chambers/2018_agu_workshop
0
6622817
""" A library for analogizing Berkley temperature data. Created in the best practices for open-source software development at AGU-2018. """ from pathlib import Path import matplotlib.pyplot as plt import numpy as np import requests def _generate_berkley_earth_location_url(location: str) -> str: " " base = 'h...
""" A library for analogizing Berkley temperature data. Created in the best practices for open-source software development at AGU-2018. """ from pathlib import Path import matplotlib.pyplot as plt import numpy as np import requests def _generate_berkley_earth_location_url(location: str) -> str: " " base = 'h...
en
0.823271
A library for analogizing Berkley temperature data. Created in the best practices for open-source software development at AGU-2018. # Download the content of the URL # Save it to a file # In[79]: # test for loading text # Extract the monthly temperature anomaly and calculate an approximate "decimal year" to use in plot...
3.503273
4
tests/example_helpers.py
aenglander/python-cose
0
6622818
<filename>tests/example_helpers.py from os import path EXAMPLE_ROOT = path.join(path.dirname(__file__), "example_data")
<filename>tests/example_helpers.py from os import path EXAMPLE_ROOT = path.join(path.dirname(__file__), "example_data")
none
1
1.597717
2
output.py
yuyobit/decode
2
6622819
<reponame>yuyobit/decode import csv import datetime import settings import sqlite3 # CSV output provides a simple dumping of decoded values # advanced functions like correcting data according to bulletin modifiers will not be done # as the CSV file is newly created every time # also station information is not saved in...
import csv import datetime import settings import sqlite3 # CSV output provides a simple dumping of decoded values # advanced functions like correcting data according to bulletin modifiers will not be done # as the CSV file is newly created every time # also station information is not saved in the CSV file def writeCs...
en
0.841966
# CSV output provides a simple dumping of decoded values # advanced functions like correcting data according to bulletin modifiers will not be done # as the CSV file is newly created every time # also station information is not saved in the CSV file # not possible to write more than one precipitation entry to CSV CREAT...
3.454291
3
xcube/util/geom.py
tiagoams/xcube
0
6622820
# The MIT License (MIT) # Copyright (c) 2019 by the xcube development team and contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation...
# The MIT License (MIT) # Copyright (c) 2019 by the xcube development team and contributors # # 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...
en
0.775834
# The MIT License (MIT) # Copyright (c) 2019 by the xcube development team and contributors # # 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...
1.602768
2
devops/__init__.py
pcah/python-clean-architecture
278
6622821
<reponame>pcah/python-clean-architecture<gh_stars>100-1000 # flake8: noqa from . import commands PROJECT_PACKAGE = None
# flake8: noqa from . import commands PROJECT_PACKAGE = None
it
0.238973
# flake8: noqa
1.00178
1
youths/admin.py
frwickst/open-city-profile
0
6622822
<gh_stars>0 from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from youths.models import YouthProfile class YouthProfileAdminInline(admin.StackedInline): model = YouthProfile fk_name = "profile" extra = 0 readonly_fields = ("approved_time", "approval_notification...
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from youths.models import YouthProfile class YouthProfileAdminInline(admin.StackedInline): model = YouthProfile fk_name = "profile" extra = 0 readonly_fields = ("approved_time", "approval_notification_timestamp")...
none
1
1.862009
2
data_processing/data_creation.py
KartikaySrivadtava/dl-for-har-ea1e9babb2b178cc338dbc72db974325c193c781
1
6622823
<filename>data_processing/data_creation.py<gh_stars>1-10 from PyAV.av.io import read import re import numpy as np import pandas as pd from glob import glob import os from io import BytesIO import zipfile def milliseconds_to_hertz(start, end, rate): """ Function which converts milliseconds to hertz timestamps...
<filename>data_processing/data_creation.py<gh_stars>1-10 from PyAV.av.io import read import re import numpy as np import pandas as pd from glob import glob import os from io import BytesIO import zipfile def milliseconds_to_hertz(start, end, rate): """ Function which converts milliseconds to hertz timestamps...
en
0.776996
Function which converts milliseconds to hertz timestamps :param start: start time in milliseconds :param end: end time in milliseconds :param rate: employed sampling rate during recording :return: start and end time in hertz Funtion which creates the a csv file using the WetLab mkv dataset files as inp...
3.027001
3
bql/execution/runBenchmarks.py
sensorbee/sensorbee
228
6622824
#!/usr/bin/python import os import sys import numpy results = {} for i in range(10): output = os.popen("go test -run=XYZ -bench=.").read() lines = output.strip().split("\n") header = lines[0] if not header == "PASS": print "failed to run tests" sys.exit(1) for benchmark in lines[1...
#!/usr/bin/python import os import sys import numpy results = {} for i in range(10): output = os.popen("go test -run=XYZ -bench=.").read() lines = output.strip().split("\n") header = lines[0] if not header == "PASS": print "failed to run tests" sys.exit(1) for benchmark in lines[1...
ru
0.258958
#!/usr/bin/python
2.518391
3
kraken/performance_scenarios/sql_histogram.py
FeixiDev/VersaTST
2
6622825
import sqlite3 import numpy as np import matplotlib as mpl from prettytable.prettytable import from_db_cursor import yaml mpl.use ('Agg') # mpl.use ('TKAgg') import matplotlib.pyplot as plt import kraken.performance_scenarios.utils as utils import kraken.performance_scenarios.log as log import kraken.performance_scenar...
import sqlite3 import numpy as np import matplotlib as mpl from prettytable.prettytable import from_db_cursor import yaml mpl.use ('Agg') # mpl.use ('TKAgg') import matplotlib.pyplot as plt import kraken.performance_scenarios.utils as utils import kraken.performance_scenarios.log as log import kraken.performance_scenar...
en
0.250364
# mpl.use ('TKAgg') # create connection object and database file # create a cursor for connection object # print(row) # plt.show() # print('bbbbb',b) # plt.show() # sql_graph_output()
2.392496
2
OOP/Shop/project/product.py
petel3/Softuni_education
2
6622826
<gh_stars>1-10 class Product: def __init__(self,name,quantity:int): self.name = name self.quantity = quantity def decrease(self,quantity:int): if self.quantity>=quantity: self.quantity-=quantity def increase(self,quantity:int): self.quantity+=quantity def ...
class Product: def __init__(self,name,quantity:int): self.name = name self.quantity = quantity def decrease(self,quantity:int): if self.quantity>=quantity: self.quantity-=quantity def increase(self,quantity:int): self.quantity+=quantity def __repr__(self):...
none
1
3.54
4
pyqt5/yaziresimekle.py
onselaydin/pytry
0
6622827
<gh_stars>0 import sys from PyQt5 import QtWidgets,QtGui import os def Pencere(): app = QtWidgets.QApplication(sys.argv) pencere = QtWidgets.QWidget() pencere.setWindowTitle("Test deneme kontrol başlık") etiket1 = QtWidgets.QLabel(pencere) etiket1.setText("AD SOYAD:") etiket1.move(150,40) ...
import sys from PyQt5 import QtWidgets,QtGui import os def Pencere(): app = QtWidgets.QApplication(sys.argv) pencere = QtWidgets.QWidget() pencere.setWindowTitle("Test deneme kontrol başlık") etiket1 = QtWidgets.QLabel(pencere) etiket1.setText("AD SOYAD:") etiket1.move(150,40) resim1 = Qt...
tr
0.429385
#pencere boyutu tespiti
2.691059
3
hooks/webkitpy/common/checkout/changelog_unittest.py
nizovn/luna-sysmgr
3
6622828
<filename>hooks/webkitpy/common/checkout/changelog_unittest.py # Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain ...
<filename>hooks/webkitpy/common/checkout/changelog_unittest.py # Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain ...
en
0.720879
# Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
1.519807
2
dataset_converters/TDG2FRCNNConverter.py
igiloh/Dataset-Converters
48
6622829
from dataset_converters.ConverterBase import ConverterBase import os import cv2 class TDG2FRCNNConverter(ConverterBase): formats = ['TDG2FRCNN'] def __init__(self, copy_fn): ConverterBase.__init__(self, copy_fn) def _run(self, input_folder, output_folder, FORMAT): f = open(os.path.joi...
from dataset_converters.ConverterBase import ConverterBase import os import cv2 class TDG2FRCNNConverter(ConverterBase): formats = ['TDG2FRCNN'] def __init__(self, copy_fn): ConverterBase.__init__(self, copy_fn) def _run(self, input_folder, output_folder, FORMAT): f = open(os.path.joi...
none
1
2.492778
2
backend/accounts/views.py
mmohajer9/merchant
4
6622830
from rest_framework import viewsets from rest_framework import permissions # from rest_framework.response import Response # from django.shortcuts import get_object_or_404 from .pagination import CustomLimitOffsetPagination from .models import Country, Province, City, Seller, Address from .serializers import ( Cou...
from rest_framework import viewsets from rest_framework import permissions # from rest_framework.response import Response # from django.shortcuts import get_object_or_404 from .pagination import CustomLimitOffsetPagination from .models import Country, Province, City, Seller, Address from .serializers import ( Cou...
en
0.42223
# from rest_framework.response import Response # from django.shortcuts import get_object_or_404 # Create your views here. # default serializer and permission classes # override per action # "list": Serializer1, # "create": Serializer2, # "update": Serializer4, # "partial_update": Serializer5, # "destroy": Serializer6, ...
1.958495
2
utils.py
IamEinstein/Ash
0
6622831
<gh_stars>0 def check_if_present(username: str, todo: str): file = open('./users.txt', 'r') if username in file.readlines(): if todo.lower() == "add": file.close() return False else: w_file = open('./users.txt', 'w') w_file.write(username) w_file.cl...
def check_if_present(username: str, todo: str): file = open('./users.txt', 'r') if username in file.readlines(): if todo.lower() == "add": file.close() return False else: w_file = open('./users.txt', 'w') w_file.write(username) w_file.close() ...
none
1
3.440862
3
analyzer.py
ibrahimhillowle/ibrahimhillowle.github.io
0
6622832
<reponame>ibrahimhillowle/ibrahimhillowle.github.io import pandas as pd from datetime import datetime from datetime import timedelta import lib_bamboo as bamboo import os os.system('cls') #Deze regel nog invullen! Hoe maak je het scherm leeg? print("Working...") data = pd.read_excel("Basketbal_Dutch Basketball League...
import pandas as pd from datetime import datetime from datetime import timedelta import lib_bamboo as bamboo import os os.system('cls') #Deze regel nog invullen! Hoe maak je het scherm leeg? print("Working...") data = pd.read_excel("Basketbal_Dutch Basketball League_tussenstand.xlsx") data["datum"] = pd.to_datetime(d...
nl
0.975913
#Deze regel nog invullen! Hoe maak je het scherm leeg? #Informatievraag 1 #Informatievraag 2 #Informatievraag 3 #Informatievraag 4
2.928988
3
mmdet/models/roi_extractors/__init__.py
ktw361/Local-Mid-Propagation
10
6622833
<reponame>ktw361/Local-Mid-Propagation from .single_level import SingleRoIExtractor from .multi_levels import MultiRoIExtractor from .rfcn_single_level import RfcnPSRoIExtractor __all__ = ['SingleRoIExtractor', 'MultiRoIExtractor', 'RfcnPSRoIExtractor']
from .single_level import SingleRoIExtractor from .multi_levels import MultiRoIExtractor from .rfcn_single_level import RfcnPSRoIExtractor __all__ = ['SingleRoIExtractor', 'MultiRoIExtractor', 'RfcnPSRoIExtractor']
none
1
1.077861
1
spectra_cluster/ui/protein_annotator.py
qinchunyuan/spectra-cluster-py
3
6622834
<reponame>qinchunyuan/spectra-cluster-py """protein_annotator This tool adds a protein accession column to a text file based on the present peptides. The column containing the peptide string must be defined. Then, all proteins that match the given peptide are written to a specified column. Usage: protein_annotator...
"""protein_annotator This tool adds a protein accession column to a text file based on the present peptides. The column containing the peptide string must be defined. Then, all proteins that match the given peptide are written to a specified column. Usage: protein_annotator.py --input=<input.tsv> --output=<extende...
en
0.690182
protein_annotator This tool adds a protein accession column to a text file based on the present peptides. The column containing the peptide string must be defined. Then, all proteins that match the given peptide are written to a specified column. Usage: protein_annotator.py --input=<input.tsv> --output=<extended_f...
3.304748
3
scripts/utils/stats.py
coastalcph/eacl2021-morpherror
2
6622835
from stability_selection import RandomizedLogisticRegression class PatchedRLG(RandomizedLogisticRegression): def __init__( self, weakness=0.5, tol=1e-4, C=1.0, fit_intercept=True, intercept_scaling=1, class_weight=None, random_state=None, sol...
from stability_selection import RandomizedLogisticRegression class PatchedRLG(RandomizedLogisticRegression): def __init__( self, weakness=0.5, tol=1e-4, C=1.0, fit_intercept=True, intercept_scaling=1, class_weight=None, random_state=None, sol...
none
1
2.40511
2
presearch_bot.py
jakiiii/presearch
0
6622836
<reponame>jakiiii/presearch<filename>presearch_bot.py<gh_stars>0 from time import sleep import random from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains # TODO: Make a Long...
from time import sleep import random from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains # TODO: Make a Long List of keyword all_keys = ["american legends", "income", "funny...
en
0.332556
# TODO: Make a Long List of keyword # ctrl + shift + enter => open new tab with link driver.execute_script("window.open('about:blank', 'tab2');") driver.switch_to.window("tab2") driver.get(url) sleep(10) driver.close() driver.switch_to.window(driver.window_handles[0]) sel = Selector(text=driver.page_source) link = sel....
2.999301
3
molecule/resources/tests/test_software.py
mesaguy/ansible-hashicorp
2
6622837
import os import pytest if os.getenv('HASHICORP_SOFTWARE_NAMES') is None: SOFTWARE_NAMES = [ 'boundary', 'consul', 'consul-template', 'envconsul', 'nomad', 'packer', 'sentinel', 'serf', 'terraform', 'vagrant', 'vault', ...
import os import pytest if os.getenv('HASHICORP_SOFTWARE_NAMES') is None: SOFTWARE_NAMES = [ 'boundary', 'consul', 'consul-template', 'envconsul', 'nomad', 'packer', 'sentinel', 'serf', 'terraform', 'vagrant', 'vault', ...
en
0.88401
# Contains two directories, "active" and the current version # Contains just one file, the binary
2.259529
2
mapper/train.py
yubin1219/CLIP_PJ
1
6622838
<reponame>yubin1219/CLIP_PJ import os import json import sys import pprint from argparse import Namespace sys.path.append(".") sys.path.append("..") from mapper.options.train_options import TrainOptions from mapper.utils import ensure_checkpoint_exists from mapper.training.coach import Coach def main(opts): os.mak...
import os import json import sys import pprint from argparse import Namespace sys.path.append(".") sys.path.append("..") from mapper.options.train_options import TrainOptions from mapper.utils import ensure_checkpoint_exists from mapper.training.coach import Coach def main(opts): os.makedirs(opts.exp_dir, exist_ok...
ko
0.764253
opt = {"exp_dir": "results/", # 저장할 파일 "model_download": True, # True : 사용할 pretrained 파일들 download "data_mode": "color", # 변화시킬 style ["hair", "color", "female", "male", "multi"] "text_embed_mode": None, # "clip_encoder" : CLIP text encoder로 얻은 text embedding vector 사용 , None : nn.embedding...
2.228352
2
experiments/radix/nv/radix.py
enjalot/adventures_in_opencl
152
6622839
<gh_stars>100-1000 #http://documen.tician.de/pyopencl/ import pyopencl as cl import numpy as np import struct import timing timings = timing.Timing() #ctx = cl.create_some_context() mf = cl.mem_flags class Radix: def __init__(self, max_elements, cta_size, dtype): self.WARP_SIZE = 32 self.SCAN_WG...
#http://documen.tician.de/pyopencl/ import pyopencl as cl import numpy as np import struct import timing timings = timing.Timing() #ctx = cl.create_some_context() mf = cl.mem_flags class Radix: def __init__(self, max_elements, cta_size, dtype): self.WARP_SIZE = 32 self.SCAN_WG_SIZE = 256 ...
en
0.247864
#http://documen.tician.de/pyopencl/ #ctx = cl.create_some_context() #print "num_blocks: ", num_blocks #print "numscan", numscan #MAX_WORKGROUP_INCLUSIVE_SCAN_SIZE 1024 #print "numElements", num #print "key_bits", key_bits #print "bit_step", self.bit_step #print "i*bit_step", i*self.bit_step #print "array length in step...
2.305816
2
r2lm.py
hkaneko1985/r2lm
1
6622840
<gh_stars>1-10 # r^2 based on the latest measured y-values import numpy as np # Calculate r^2 based on the latest measured y-values # measured_y and estimated_y must be vectors. def r2lm(measured_y, estimated_y): measured_y = np.array(measured_y).flatten() estimated_y = np.array(estimated_y).flatten()...
# r^2 based on the latest measured y-values import numpy as np # Calculate r^2 based on the latest measured y-values # measured_y and estimated_y must be vectors. def r2lm(measured_y, estimated_y): measured_y = np.array(measured_y).flatten() estimated_y = np.array(estimated_y).flatten() return fl...
en
0.927792
# r^2 based on the latest measured y-values # Calculate r^2 based on the latest measured y-values # measured_y and estimated_y must be vectors.
3.102416
3
apps/patrimonio/apps/combustivel/apps/km/views.py
mequetrefe-do-subtroco/web_constel
1
6622841
<reponame>mequetrefe-do-subtroco/web_constel import datetime from pprint import pprint from django.core.paginator import Paginator from django.contrib.auth.decorators import login_required from django.db.models import Q from django.http import HttpRequest, HttpResponse, HttpResponseRedirect from django.shortcuts impor...
import datetime from pprint import pprint from django.core.paginator import Paginator from django.contrib.auth.decorators import login_required from django.db.models import Q from django.http import HttpRequest, HttpResponse, HttpResponseRedirect from django.shortcuts import render from constel.forms import FormFiltr...
none
1
2.044914
2
DM/models/comp_encoder.py
moonfoam/fewshot-font-generation
49
6622842
""" DMFont Copyright (c) 2020-present NAVER Corp. MIT license """ from functools import partial import torch import torch.nn as nn from base.modules import ConvBlock, ResBlock, GCBlock, SAFFNBlock class ComponentEncoder(nn.Module): def __init__(self, n_heads=3): super().__init__() self.n_heads = n...
""" DMFont Copyright (c) 2020-present NAVER Corp. MIT license """ from functools import partial import torch import torch.nn as nn from base.modules import ConvBlock, ResBlock, GCBlock, SAFFNBlock class ComponentEncoder(nn.Module): def __init__(self, n_heads=3): super().__init__() self.n_heads = n...
en
0.400977
DMFont Copyright (c) 2020-present NAVER Corp. MIT license # 128x128 # 64x64 # 32x32 # 16x16
2.076434
2
src/gui.py
Jack477/CommanderPi_rockpi
3
6622843
#!/usr/bin/python import sys import os import resources as rs import update as up import tkinter as tk import theme as th import importlib import webbrowser from tkinter import messagebox as msb from tkinter import * from tkinter import ttk from PIL import Image, ImageTk ### TODO: Move change_theme funct...
#!/usr/bin/python import sys import os import resources as rs import update as up import tkinter as tk import theme as th import importlib import webbrowser from tkinter import messagebox as msb from tkinter import * from tkinter import ttk from PIL import Image, ImageTk ### TODO: Move change_theme funct...
en
0.399893
#!/usr/bin/python ### TODO: Move change_theme function to theme.py? ### split resources.py into smaller files ### move window_list from theme.py to resources #print(th.color_mode) ### Use in window class: master.protocol("WM_DELETE_WINDOW", lambda:on_Window_Close(master)) ### Using to keybind window kill ### Open new w...
2.622159
3
MobileRobot_class.py
michelyakoub/Reinforcement-learning-based-navigation-for-autonomous-mobile-robots-in-unknown-environments
0
6622844
import sys sys.path.append(r"E:\GUC\semester 8\codes\gym_pathfinding_master") import gym import gym_pathfinding import math import numpy as np import matplotlib.pyplot as plt class Robot(object) : """ Defines basic mobile robot properties """ def __init__(self) : self.pos_x = 0.0 s...
import sys sys.path.append(r"E:\GUC\semester 8\codes\gym_pathfinding_master") import gym import gym_pathfinding import math import numpy as np import matplotlib.pyplot as plt class Robot(object) : """ Defines basic mobile robot properties """ def __init__(self) : self.pos_x = 0.0 s...
en
0.540397
Defines basic mobile robot properties #sample time # Movement updates the x , y and angle Moves the robot for an ' s ' amount of seconds # plot path every 3 steps # Printing−and−plotting : prints the x , y position and angle plots a representation of the robot plots a dot in the position of the robot Defines a MobileRo...
3.819983
4
lamana/input_.py
par2/lamana
1
6622845
<gh_stars>1-10 # ----------------------------------------------------------------------------- '''Classes and functions for handling user inputs.''' # Geometry(): parse user input geometry strings to a tuple of floats (and lists/str) # BaseDefaults(): library of general geometry defaults; subclassed by the user. # flak...
# ----------------------------------------------------------------------------- '''Classes and functions for handling user inputs.''' # Geometry(): parse user input geometry strings to a tuple of floats (and lists/str) # BaseDefaults(): library of general geometry defaults; subclassed by the user. # flake8 input_.py --...
en
0.535416
# ----------------------------------------------------------------------------- Classes and functions for handling user inputs. # Geometry(): parse user input geometry strings to a tuple of floats (and lists/str) # BaseDefaults(): library of general geometry defaults; subclassed by the user. # flake8 input_.py --ignore...
2.92875
3
appengine/swarming/backend_conversions.py
maruel/swarming
74
6622846
<gh_stars>10-100 # Copyright 2021 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Functions that convert internal to/from Backend API's protoc objects.""" import collections import copy import posixpath from...
# Copyright 2021 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Functions that convert internal to/from Backend API's protoc objects.""" import collections import copy import posixpath from google.appengine...
en
0.721008
# Copyright 2021 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. Functions that convert internal to/from Backend API's protoc objects. # This is the path, relative to the swarming run dir, to the directory that #...
2.049047
2
tests/utils/__init__.py
yaak-ai/mapillary-python-sdk
13
6622847
# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) # -*- coding: utf-8 -*- """ tests.utils.__init__ This module loads the modules under src/mapillary/utils for tests :copyright: (c) 2021 Facebook :license: MIT LICENSE """ # Exraction testing from . import test_extract # noqa: F401 # Filt...
# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) # -*- coding: utf-8 -*- """ tests.utils.__init__ This module loads the modules under src/mapillary/utils for tests :copyright: (c) 2021 Facebook :license: MIT LICENSE """ # Exraction testing from . import test_extract # noqa: F401 # Filt...
en
0.532067
# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) # -*- coding: utf-8 -*- tests.utils.__init__ This module loads the modules under src/mapillary/utils for tests :copyright: (c) 2021 Facebook :license: MIT LICENSE # Exraction testing # noqa: F401 # Filter testing # noqa: F401
1.152469
1
GridSearch.py
he71dulu/time-aware-pbpm
10
6622848
""" This scripts help to get best parameters for each model from the history of hyperparameter tuning. """ import numpy as np import pickle import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import pandas as pd """ GridSearch ...................................... ...
""" This scripts help to get best parameters for each model from the history of hyperparameter tuning. """ import numpy as np import pickle import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import pandas as pd """ GridSearch ...................................... ...
en
0.496681
This scripts help to get best parameters for each model from the history of hyperparameter tuning. GridSearch ...................................... Finding the best set of hyperparameters for each model Variables ------------------- HP_NUM_UNIT...
3.201799
3
backend/desk_application/sources/serializers/desk_serializer.py
heyImDrew/edupro
0
6622849
<filename>backend/desk_application/sources/serializers/desk_serializer.py<gh_stars>0 from rest_framework import serializers class DeskSerializer(serializers.Serializer): desk_id = serializers.UUIDField() created_by_id = serializers.IntegerField() name = serializers.CharField() description = serializer...
<filename>backend/desk_application/sources/serializers/desk_serializer.py<gh_stars>0 from rest_framework import serializers class DeskSerializer(serializers.Serializer): desk_id = serializers.UUIDField() created_by_id = serializers.IntegerField() name = serializers.CharField() description = serializer...
none
1
1.838824
2
synapse/vendor/cashaddress/__init__.py
vishalbelsare/synapse
216
6622850
# It has been modified for vendored imports. import synapse.vendor.cashaddress.convert import synapse.vendor.cashaddress.crypto __all__ = ['convert', 'convert']
# It has been modified for vendored imports. import synapse.vendor.cashaddress.convert import synapse.vendor.cashaddress.crypto __all__ = ['convert', 'convert']
en
0.990465
# It has been modified for vendored imports.
1.115067
1