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
tests/test_langs_fr.py
honzajavorek/tipi
3
5600
<gh_stars>1-10 # -*- coding: utf-8 -*- from __future__ import unicode_literals from tipi import tipi as _tipi tipi = lambda s: _tipi(s, lang='fr') def test_double_quotes(): assert tipi('''"brutal" "quote's"''') == ( '''«brutal» «quote's»''' ) def test_single_quotes(): assert tipi("""'brutal'...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from tipi import tipi as _tipi tipi = lambda s: _tipi(s, lang='fr') def test_double_quotes(): assert tipi('''"brutal" "quote's"''') == ( '''«brutal» «quote's»''' ) def test_single_quotes(): assert tipi("""'brutal' 'quote's'""") ...
ru
0.269605
# -*- coding: utf-8 -*- "brutal" "quote's" «brutal» «quote's» 'brutal' 'quote's' ‹brutal› ‹quote's›
2.66497
3
vendor/models.py
brethauer/mirage
8
5601
<gh_stars>1-10 from django.db import models VEHICLE_CHOICES = ( ('OASISSB', 'OASIS Small Business'), ('OASIS', 'OASIS Unrestricted') ) STATUS_CHOICES = ( ('P', 'In Progress'), ('C', 'Completed'), ('F', 'Cancelled') ) class Vendor(models.Model): name = models.CharField(max_length=128) ...
from django.db import models VEHICLE_CHOICES = ( ('OASISSB', 'OASIS Small Business'), ('OASIS', 'OASIS Unrestricted') ) STATUS_CHOICES = ( ('P', 'In Progress'), ('C', 'Completed'), ('F', 'Cancelled') ) class Vendor(models.Model): name = models.CharField(max_length=128) duns = models.C...
none
1
2.019197
2
two_qubit_simulator/circuits.py
L-McCormack/two-qubit-simulator
0
5602
""" Contains the QuantumCircuit class boom. """ class QuantumCircuit(object): # pylint: disable=useless-object-inheritance """ Implements a quantum circuit. - - - WRITE DOCUMENTATION HERE - - - """ def __init__(self): """ Initialise a QuantumCircuit object """ pass def add_ga...
""" Contains the QuantumCircuit class boom. """ class QuantumCircuit(object): # pylint: disable=useless-object-inheritance """ Implements a quantum circuit. - - - WRITE DOCUMENTATION HERE - - - """ def __init__(self): """ Initialise a QuantumCircuit object """ pass def add_ga...
en
0.557419
Contains the QuantumCircuit class boom. # pylint: disable=useless-object-inheritance Implements a quantum circuit. - - - WRITE DOCUMENTATION HERE - - - Initialise a QuantumCircuit object Add a gate to the circuit Run the circuit on a given quantum register Run the circuit on a given quantum register
2.522862
3
examples/bathymetricGradient.py
usgs/water-datapreptools
2
5603
import sys sys.path.append("..") # change environment to see tools from make_hydrodem import bathymetricGradient workspace = r"" # path to geodatabase to use as a workspace snapGrid = r"" # path to snapping grid hucPoly = r"" # path to local folder polygon hydrographyArea = r"" # path to NHD area feature class...
import sys sys.path.append("..") # change environment to see tools from make_hydrodem import bathymetricGradient workspace = r"" # path to geodatabase to use as a workspace snapGrid = r"" # path to snapping grid hucPoly = r"" # path to local folder polygon hydrographyArea = r"" # path to NHD area feature class...
en
0.861301
# change environment to see tools # path to geodatabase to use as a workspace # path to snapping grid # path to local folder polygon # path to NHD area feature class # path to NHD flowline feature class # path to NHD water body feature class # cell size
2.151098
2
out/flowContext.py
hxb1997/Menge
0
5604
<filename>out/flowContext.py # This is the OpenGL context for drawing flow calculation lines from Context import * from primitives import Vector2, Segment from OpenGL.GL import * from copy import deepcopy class GLFlowSegment( Segment ): '''The OpenGL representation of a flow line. Basically a segment with a d...
<filename>out/flowContext.py # This is the OpenGL context for drawing flow calculation lines from Context import * from primitives import Vector2, Segment from OpenGL.GL import * from copy import deepcopy class GLFlowSegment( Segment ): '''The OpenGL representation of a flow line. Basically a segment with a d...
en
0.82242
# This is the OpenGL context for drawing flow calculation lines The OpenGL representation of a flow line. Basically a segment with a direciton indicator. The direction indicator shows which way flow is expected to cross the line. The flow direction is to the RIGHT of the segment. The forward direction i...
3.471773
3
instascrape/collectors/__init__.py
Paola351/instascrape
1
5605
<reponame>Paola351/instascrape from .interval_collectors import *
from .interval_collectors import *
none
1
1.17731
1
Codes/gracekoo/test.py
ghoslation/algorithm
256
5606
# -*- coding: utf-8 -*- # @Time: 2020/11/8 23:47 # @Author: GraceKoo # @File: test.py # @Desc: from threading import Thread import time def print_numbers(): time.sleep(0.2) print("子线程结束") if __name__ == "__main__": t1 = Thread(target=print_numbers) t1.setDaemon(True) t1.start() # print("主线程结...
# -*- coding: utf-8 -*- # @Time: 2020/11/8 23:47 # @Author: GraceKoo # @File: test.py # @Desc: from threading import Thread import time def print_numbers(): time.sleep(0.2) print("子线程结束") if __name__ == "__main__": t1 = Thread(target=print_numbers) t1.setDaemon(True) t1.start() # print("主线程结...
en
0.574549
# -*- coding: utf-8 -*- # @Time: 2020/11/8 23:47 # @Author: GraceKoo # @File: test.py # @Desc: # print("主线程结束")
2.826393
3
src/_main_/settings.py
gregory-chekler/api
0
5607
""" Django settings for massenergize_portal_backend project. Generated by 'django-admin startproject' using Django 2.1.4. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/setting...
""" Django settings for massenergize_portal_backend project. Generated by 'django-admin startproject' using Django 2.1.4. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/setting...
en
0.459326
Django settings for massenergize_portal_backend project. Generated by 'django-admin startproject' using Django 2.1.4. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ #...
1.628977
2
aiorpcgrid/client.py
urands/aiorpcgrid
0
5608
import asyncio # from aiorpcgrid.client import Client from aiorpcgrid.task import AsyncTask, State class AsyncClient: _provider = None _method = None _requests: dict = {} _running = True _request_queue: asyncio.Queue = asyncio.Queue() _loop = None def __init__(self, provider, loop=None):...
import asyncio # from aiorpcgrid.client import Client from aiorpcgrid.task import AsyncTask, State class AsyncClient: _provider = None _method = None _requests: dict = {} _running = True _request_queue: asyncio.Queue = asyncio.Queue() _loop = None def __init__(self, provider, loop=None):...
en
0.346791
# from aiorpcgrid.client import Client
2.667506
3
python/src/otel/otel_sdk/opentelemetry/instrumentation/aws_lambda/__init__.py
matt-tyler/opentelemetry-lambda
0
5609
# Copyright 2020, OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
# Copyright 2020, OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
en
0.677475
# Copyright 2020, OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1.744493
2
instructors/migrations/0021_alter_user_avatar_url.py
bastoune57/gokiting_back_end
0
5610
# Generated by Django 4.0.2 on 2022-04-01 16:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('instructors', '0020_alter_user_description_alter_user_title'), ] operations = [ migrations.AlterField( model_name='user', ...
# Generated by Django 4.0.2 on 2022-04-01 16:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('instructors', '0020_alter_user_description_alter_user_title'), ] operations = [ migrations.AlterField( model_name='user', ...
en
0.893472
# Generated by Django 4.0.2 on 2022-04-01 16:09
1.545076
2
sopa/src/models/utils.py
SamplingAndEnsemblingSolvers/SamplingAndEnsemblingSolvers
25
5611
<filename>sopa/src/models/utils.py import numpy as np import torch import random from .odenet_mnist.layers import MetaNODE def fix_seeds(seed=502): np.random.seed(seed) random.seed(seed) torch.manual_seed(seed) torch.cuda.manual_seed_all(seed) torch.set_printoptions(precision=10) torc...
<filename>sopa/src/models/utils.py import numpy as np import torch import random from .odenet_mnist.layers import MetaNODE def fix_seeds(seed=502): np.random.seed(seed) random.seed(seed) torch.manual_seed(seed) torch.cuda.manual_seed_all(seed) torch.set_printoptions(precision=10) torc...
en
0.876273
Computes and stores the average and current value
2.236684
2
packages/micropython-official/v1.10/esp32/stubs/ubinascii.py
TheVinhLuong102/micropy-stubs
18
5612
<filename>packages/micropython-official/v1.10/esp32/stubs/ubinascii.py """ Module: 'ubinascii' on esp32 1.10.0 """ # MCU: (sysname='esp32', nodename='esp32', release='1.10.0', version='v1.10 on 2019-01-25', machine='ESP32 module with ESP32') # Stubber: 1.2.0 def a2b_base64(): pass def b2a_base64(): pass def c...
<filename>packages/micropython-official/v1.10/esp32/stubs/ubinascii.py """ Module: 'ubinascii' on esp32 1.10.0 """ # MCU: (sysname='esp32', nodename='esp32', release='1.10.0', version='v1.10 on 2019-01-25', machine='ESP32 module with ESP32') # Stubber: 1.2.0 def a2b_base64(): pass def b2a_base64(): pass def c...
en
0.231453
Module: 'ubinascii' on esp32 1.10.0 # MCU: (sysname='esp32', nodename='esp32', release='1.10.0', version='v1.10 on 2019-01-25', machine='ESP32 module with ESP32') # Stubber: 1.2.0
1.903247
2
jv/test_jv.py
chenwang/QuantEcon.lectures.code
56
5613
""" @author : <NAME> """ from __future__ import division import sys import unittest from nose.plugins.skip import SkipTest from jv import JvWorker from quantecon import compute_fixed_point from quantecon.tests import get_h5_data_file, write_array, max_abs_diff # specify params -- use defaults A = 1.4 alpha = 0.6 bet...
""" @author : <NAME> """ from __future__ import division import sys import unittest from nose.plugins.skip import SkipTest from jv import JvWorker from quantecon import compute_fixed_point from quantecon.tests import get_h5_data_file, write_array, max_abs_diff # specify params -- use defaults A = 1.4 alpha = 0.6 bet...
en
0.778105
@author : <NAME> # specify params -- use defaults # python 3 # See if the jv group already exists # doesn't exist # group doesn't exist, or forced to create new data. # This function updates f in place and returns v_vfi, c_vfi, c_pfi # if we made it here, the group exists and we should try to read # existing solutions ...
1.970325
2
excentury/command/config.py
LaudateCorpus1/excentury
0
5614
"""Config This module is in charge of providing all the necessary settings to the rest of the modules in excentury. """ import os import re import sys import textwrap import argparse from collections import OrderedDict from excentury.command import error, trace, import_mod DESC = """Edit a configuration file for ex...
"""Config This module is in charge of providing all the necessary settings to the rest of the modules in excentury. """ import os import re import sys import textwrap import argparse from collections import OrderedDict from excentury.command import error, trace, import_mod DESC = """Edit a configuration file for ex...
en
0.799417
Config This module is in charge of providing all the necessary settings to the rest of the modules in excentury. Edit a configuration file for excentury. Some actions performed by excentury can be overwritten by using configuration files. To see the values that the configuration file can overwrite use the `defaults`...
2.537884
3
tests/test_urls.py
pkjmesra/nseta
8
5615
# -*- coding: utf-8 -*- ''' Created on Thu Nov 19 20:52:33 2015 @author: SW274998 ''' from nseta.common.commons import * import datetime import unittest import time from bs4 import BeautifulSoup from tests import htmls import json import requests import six from nseta.common.urls import * import nseta.common.urls as ...
# -*- coding: utf-8 -*- ''' Created on Thu Nov 19 20:52:33 2015 @author: SW274998 ''' from nseta.common.commons import * import datetime import unittest import time from bs4 import BeautifulSoup from tests import htmls import json import requests import six from nseta.common.urls import * import nseta.common.urls as ...
en
0.424474
# -*- coding: utf-8 -*- Created on Thu Nov 19 20:52:33 2015 @author: SW274998 #'<columns><column>date</column><column>pltp</column><column>nltp</column><column>previousclose</column><column>allltp</column>'
2.080424
2
accounts/forms.py
cheradenine/Django-CRM
2
5616
from django import forms from .models import Account from common.models import Comment, Attachments from leads.models import Lead from contacts.models import Contact from django.db.models import Q class AccountForm(forms.ModelForm): def __init__(self, *args, **kwargs): account_view = kwargs.pop('account'...
from django import forms from .models import Account from common.models import Comment, Attachments from leads.models import Lead from contacts.models import Contact from django.db.models import Q class AccountForm(forms.ModelForm): def __init__(self, *args, **kwargs): account_view = kwargs.pop('account'...
none
1
2.190021
2
pywren/pywren_ibm_cloud/invokers.py
thetolga/pywren-ibm-cloud
0
5617
# # Copyright 2018 PyWren Team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# # Copyright 2018 PyWren Team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
en
0.810697
# # Copyright 2018 PyWren Team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
2.021925
2
Projet1/Dataset/addlinkRealExample.py
Arugakente/DataScienceP1
0
5618
<filename>Projet1/Dataset/addlinkRealExample.py import os import random inputDirectory = "./original" outputDirectory = "./processed" #probability parameters TopLevel = 0.6 SecondLevel = 0.5 ThirdLevel = 0.4 FourAndAbove = 0.2 pickInside = 0.5 pickOutside = 0.25 topics = [] siteLevel = [] fileStructure = [] count...
<filename>Projet1/Dataset/addlinkRealExample.py import os import random inputDirectory = "./original" outputDirectory = "./processed" #probability parameters TopLevel = 0.6 SecondLevel = 0.5 ThirdLevel = 0.4 FourAndAbove = 0.2 pickInside = 0.5 pickOutside = 0.25 topics = [] siteLevel = [] fileStructure = [] count...
bn
0.08735
#probability parameters
2.383978
2
kkcalc/kk.py
benajamin/kkcalc
0
5619
<reponame>benajamin/kkcalc<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of the Kramers-Kronig Calculator software package. # # Copyright (c) 2013 <NAME>, <NAME> # # The software is licensed under the terms of the zlib/libpng license. # For details see LICENSE.txt """This module impleme...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of the Kramers-Kronig Calculator software package. # # Copyright (c) 2013 <NAME>, <NAME> # # The software is licensed under the terms of the zlib/libpng license. # For details see LICENSE.txt """This module implements the Kramers-Kronig transformation....
en
0.594913
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of the Kramers-Kronig Calculator software package. # # Copyright (c) 2013 <NAME>, <NAME> # # The software is licensed under the terms of the zlib/libpng license. # For details see LICENSE.txt This module implements the Kramers-Kronig transformation. Calc...
2.609244
3
random-images/hexxy.py
dominicschaff/random
0
5620
<reponame>dominicschaff/random from PIL import ImageDraw, Image from math import cos,sin,radians from random import randint import sys a = "a0A1b2B3c4C5d6D7e8E9f!F,g.G/h?H<i>I:j;J'k\"K\\l|L/m M\nn\tN@o#O$p%P^q&Q*r(R)s_S-t+T=u{U}v[V]w W x X y Y z Z" if len(a) > 128: print("TOO MANY CHARACTERS") sys.exit(1) # f...
from PIL import ImageDraw, Image from math import cos,sin,radians from random import randint import sys a = "a0A1b2B3c4C5d6D7e8E9f!F,g.G/h?H<i>I:j;J'k\"K\\l|L/m M\nn\tN@o#O$p%P^q&Q*r(R)s_S-t+T=u{U}v[V]w W x X y Y z Z" if len(a) > 128: print("TOO MANY CHARACTERS") sys.exit(1) # for i in a: # print("%s -> %...
en
0.256022
#O$p%P^q&Q*r(R)s_S-t+T=u{U}v[V]w W x X y Y z Z" # for i in a: # print("%s -> %d %d %d %d %d %d %d "%(i, # 1 if a.index(i) & 1 == 1 else 0, # 1 if a.index(i) & 2 == 2 else 0, # 1 if a.index(i) & 4 == 4 else 0, # 1 if a.index(i) & 8 == 8 else 0, # 1 if a.index(i) & 16 == 16 els...
2.829276
3
src/plugins/maimaidx.py
LonelyFantasy/Chiyuki-Bot
0
5621
<reponame>LonelyFantasy/Chiyuki-Bot import math from collections import defaultdict from typing import List, Dict, Any from nonebot import on_command, on_message, on_notice, on_regex, get_driver from nonebot.log import logger from nonebot.permission import Permission from nonebot.typing import T_State from nonebot.ada...
import math from collections import defaultdict from typing import List, Dict, Any from nonebot import on_command, on_message, on_notice, on_regex, get_driver from nonebot.log import logger from nonebot.permission import Permission from nonebot.typing import T_State from nonebot.adapters import Event, Bot from nonebot...
zh
0.617107
桜千雪です、よろしく。 可用命令如下: 今日舞萌 查看今天的舞萌运势 XXXmaimaiXXX什么 随机一首歌 随个[dx/标准][绿黄红紫白]<难度> 随机一首指定条件的乐曲 查歌<乐曲标题的一部分> 查询符合条件的乐曲 [绿黄红紫白]id<歌曲编号> 查询乐曲信息或谱面信息 <歌曲别名>是什么歌 查询乐曲别名对应的乐曲 定数查歌 <定数> 查询定数对应的乐曲 定数查歌 <定数下限> <定数上限> 分数线 <难度+歌曲id> <分数线> 详情请输入“分数线 帮助”查看 {level_name[level_index]} {level}({ds}) TAP: {chart['notes'][0]} HOLD: {chart['no...
2.085241
2
trace_analysis/trace_analysis/architecture/interface.py
hsgwa/trace_analysis
0
5622
<gh_stars>0 # Copyright 2021 Research Institute of Systems Planning, 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 require...
# Copyright 2021 Research Institute of Systems Planning, 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 applica...
en
0.84665
# Copyright 2021 Research Institute of Systems Planning, 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 applica...
2.212277
2
disrank/__init__.py
treehousekingcomic/disrank
1
5623
from thkc_disrank import *
from thkc_disrank import *
none
1
1.081999
1
layers/gin_layer.py
JakeStevens/benchmarking-gnns
275
5624
<reponame>JakeStevens/benchmarking-gnns<gh_stars>100-1000 import torch import torch.nn as nn import torch.nn.functional as F import dgl.function as fn """ GIN: Graph Isomorphism Networks HOW POWERFUL ARE GRAPH NEURAL NETWORKS? (<NAME>, <NAME>, <NAME> and <NAME>, ICLR 2019) https://arxiv.org/pdf/1810.00826....
import torch import torch.nn as nn import torch.nn.functional as F import dgl.function as fn """ GIN: Graph Isomorphism Networks HOW POWERFUL ARE GRAPH NEURAL NETWORKS? (<NAME>, <NAME>, <NAME> and <NAME>, ICLR 2019) https://arxiv.org/pdf/1810.00826.pdf """ class GINLayer(nn.Module): """ [!] code a...
en
0.574086
GIN: Graph Isomorphism Networks HOW POWERFUL ARE GRAPH NEURAL NETWORKS? (<NAME>, <NAME>, <NAME> and <NAME>, ICLR 2019) https://arxiv.org/pdf/1810.00826.pdf [!] code adapted from dgl implementation of GINConv Parameters ---------- apply_func : callable activation function/layer or None If no...
3.116798
3
music/distance/aural/diatonic/__init__.py
jedhsu/music
0
5625
<filename>music/distance/aural/diatonic/__init__.py """ *mus . it . dia* The simple diatonic intervals. """ from .second import MinorSecond from .second import MajorSecond from .third import MinorThird from .third import MajorThird from .fourth import PerfectFourth from .fifth import Tritone from .fifth impor...
<filename>music/distance/aural/diatonic/__init__.py """ *mus . it . dia* The simple diatonic intervals. """ from .second import MinorSecond from .second import MajorSecond from .third import MinorThird from .third import MajorThird from .fourth import PerfectFourth from .fifth import Tritone from .fifth impor...
en
0.459725
*mus . it . dia* The simple diatonic intervals.
1.602339
2
selenium_tests/test_functions.py
AriTheGuitarMan/AriTheGuitarMan.github.io
0
5626
<reponame>AriTheGuitarMan/AriTheGuitarMan.github.io # this file holds some common testing functions from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By depurl = "localhost:3000" def getElement(driver, xp...
# this file holds some common testing functions from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By depurl = "localhost:3000" def getElement(driver, xpath): return WebDriverWait(driver, 10).until(EC....
en
0.951735
# this file holds some common testing functions
2.612791
3
papirus_renderer.py
ryuchihoon/WeatherStation
0
5627
#-- coding: utf-8 -- import sys reload(sys) sys.setdefaultencoding('utf-8') import os import time import collections from PIL import Image, ImageOps, ImageDraw, ImageFont code_2_icono = collections.defaultdict(lambda : '38') kor_2_eng = collections.defaultdict(lambda : 'UNKNOWN') code_2_icono['SKY_O00'] = ['38'] ...
#-- coding: utf-8 -- import sys reload(sys) sys.setdefaultencoding('utf-8') import os import time import collections from PIL import Image, ImageOps, ImageDraw, ImageFont code_2_icono = collections.defaultdict(lambda : '38') kor_2_eng = collections.defaultdict(lambda : 'UNKNOWN') code_2_icono['SKY_O00'] = ['38'] ...
en
0.480635
#-- coding: utf-8 -- Renderer for Papirus HAT # update time # save a image for debugging purpose
2.178591
2
hydrobox/discharge/__init__.py
VForWaTer/hydrobox
4
5628
from .catchment import regime, flow_duration_curve from . import indices
from .catchment import regime, flow_duration_curve from . import indices
none
1
0.990318
1
scripts/convert_keras2onnx.py
ecmwf-lab/infero
8
5629
<reponame>ecmwf-lab/infero # # (C) Copyright 1996- ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its...
# # (C) Copyright 1996- ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergovernme...
en
0.896102
# # (C) Copyright 1996- ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergovernme...
2.50243
3
src/lava/lib/dl/slayer/utils/assistant.py
timcheck/lava-dl
37
5630
# Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause """Assistant utility for automatically load network from network description.""" import torch class Assistant: """Assistant that bundles training, validation and testing workflow. Parameters ---------- net : torch.nn.Mo...
# Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause """Assistant utility for automatically load network from network description.""" import torch class Assistant: """Assistant that bundles training, validation and testing workflow. Parameters ---------- net : torch.nn.Mo...
en
0.631027
# Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause Assistant utility for automatically load network from network description. Assistant that bundles training, validation and testing workflow. Parameters ---------- net : torch.nn.Module network to train. error : obje...
2.598397
3
lstm-synthetic-wave-anomaly-detect.py
cse-icon-dataAnalytics/lstm-anomaly-detect
178
5631
<reponame>cse-icon-dataAnalytics/lstm-anomaly-detect """ Inspired by example from https://github.com/Vict0rSch/deep_learning/tree/master/keras/recurrent Uses the TensorFlow backend The basic idea is to detect anomalies in a time-series. """ import matplotlib.pyplot as plt import numpy as np import time from keras.layer...
""" Inspired by example from https://github.com/Vict0rSch/deep_learning/tree/master/keras/recurrent Uses the TensorFlow backend The basic idea is to detect anomalies in a time-series. """ import matplotlib.pyplot as plt import numpy as np import time from keras.layers.core import Dense, Activation, Dropout from keras.l...
en
0.77676
Inspired by example from https://github.com/Vict0rSch/deep_learning/tree/master/keras/recurrent Uses the TensorFlow backend The basic idea is to detect anomalies in a time-series. # Global hyper-parameters # each sample randomly duplicated between 0 and 9 times, see dropin function The name suggests the inverse of drop...
3.732879
4
hpc-historias-clinicas/historias/migrations/0007_auto_20150425_1459.py
btenaglia/hpc-historias-clinicas
0
5632
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('historias', '0006_auto_20150413_0001'), ] operations = [ migrations.AlterField( model_name='hist...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('historias', '0006_auto_20150413_0001'), ] operations = [ migrations.AlterField( model_name='hist...
en
0.769321
# -*- coding: utf-8 -*-
1.647541
2
venv/Lib/site-packages/har2case/__about__.py
Verckolf/MyInterfaceTest
0
5633
__title__ = 'har2case' __description__ = 'Convert HAR(HTTP Archive) to YAML/JSON testcases for HttpRunner.' __url__ = 'https://github.com/HttpRunner/har2case' __version__ = '0.2.0' __author__ = 'debugtalk' __author_email__ = '<EMAIL>' __license__ = 'Apache-2.0' __copyright__ = 'Copyright 2017 debugtalk'
__title__ = 'har2case' __description__ = 'Convert HAR(HTTP Archive) to YAML/JSON testcases for HttpRunner.' __url__ = 'https://github.com/HttpRunner/har2case' __version__ = '0.2.0' __author__ = 'debugtalk' __author_email__ = '<EMAIL>' __license__ = 'Apache-2.0' __copyright__ = 'Copyright 2017 debugtalk'
none
1
1.106557
1
app_id_utils.py
woctezuma/match-steam-banners
0
5634
import os from pathlib import Path from data_utils import get_data_path, get_image_data_path, get_image_extension def app_id_to_image_filename(app_id, is_horizontal_banner=False): image_data_path = get_image_data_path(is_horizontal_banner) image_filename = image_data_path + str(app_id) + get_image_extension...
import os from pathlib import Path from data_utils import get_data_path, get_image_data_path, get_image_extension def app_id_to_image_filename(app_id, is_horizontal_banner=False): image_data_path = get_image_data_path(is_horizontal_banner) image_filename = image_data_path + str(app_id) + get_image_extension...
en
0.937426
# Do not convert to a set object, or any other conversion, because we want to keep the list order as it is. # Just read the list from the file. That is all there is to do. Otherwise, appIDs will be scrambled!
2.449537
2
upload.py
sjm446/aMAZEd
0
5635
<reponame>sjm446/aMAZEd #!/usr/bin/env python import boto3 import random import os BUCKET=os.environ.get('EXPORT_S3_BUCKET_URL') if (BUCKET != None): s3 = boto3.client('s3') with open("maze.txt", "rb") as f: s3.upload_fileobj(f, BUCKET, "maze"+str(random.randrange(100000))+".txt") else: print("EXPOR...
#!/usr/bin/env python import boto3 import random import os BUCKET=os.environ.get('EXPORT_S3_BUCKET_URL') if (BUCKET != None): s3 = boto3.client('s3') with open("maze.txt", "rb") as f: s3.upload_fileobj(f, BUCKET, "maze"+str(random.randrange(100000))+".txt") else: print("EXPORT_S3_BUCKET_URL was not ...
ru
0.26433
#!/usr/bin/env python
2.601209
3
zerver/management/commands/list_realms.py
rtzll/zulip
0
5636
<filename>zerver/management/commands/list_realms.py<gh_stars>0 import sys from typing import Any from argparse import ArgumentParser from zerver.models import Realm from zerver.lib.management import ZulipBaseCommand class Command(ZulipBaseCommand): help = """List realms in the server and it's configuration sett...
<filename>zerver/management/commands/list_realms.py<gh_stars>0 import sys from typing import Any from argparse import ArgumentParser from zerver.models import Realm from zerver.lib.management import ZulipBaseCommand class Command(ZulipBaseCommand): help = """List realms in the server and it's configuration sett...
en
0.777851
List realms in the server and it's configuration settings(optional). Usage examples: ./manage.py list_realms ./manage.py list_realms --all # The remaining code path is the --all case. # Start with just all the fields on the object, which is # hacky but doesn't require any work to maintain. # Remove a field that is co...
2.520616
3
tests/integration/ec2/test_connection.py
bopopescu/debpkg_python-boto
15
5637
# Copyright (c) 2006-2010 <NAME> http://garnaat.org/ # Copyright (c) 2009, Eucalyptus Systems, Inc. # All rights reserved. # # 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 restrictio...
# Copyright (c) 2006-2010 <NAME> http://garnaat.org/ # Copyright (c) 2009, Eucalyptus Systems, Inc. # All rights reserved. # # 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 restrictio...
en
0.867354
# Copyright (c) 2006-2010 <NAME> http://garnaat.org/ # Copyright (c) 2009, Eucalyptus Systems, Inc. # All rights reserved. # # 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 restrictio...
2.015029
2
docusign_esign/models/conditional_recipient_rule_filter.py
joekohlsdorf/docusign-esign-python-client
58
5638
<filename>docusign_esign/models/conditional_recipient_rule_filter.py # coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: <EMAIL> Generated...
<filename>docusign_esign/models/conditional_recipient_rule_filter.py # coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: <EMAIL> Generated...
en
0.679307
# coding: utf-8 DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git # noqa: F401 NOTE: Thi...
1.857058
2
conman/routes/apps.py
meshy/django-conman
0
5639
<reponame>meshy/django-conman from django.apps import AppConfig from django.core.checks import register from . import checks class RouteConfig(AppConfig): """The AppConfig for conman routes.""" name = 'conman.routes' def ready(self): """Register checks for conman routes.""" register(chec...
from django.apps import AppConfig from django.core.checks import register from . import checks class RouteConfig(AppConfig): """The AppConfig for conman routes.""" name = 'conman.routes' def ready(self): """Register checks for conman routes.""" register(checks.polymorphic_installed) ...
en
0.475404
The AppConfig for conman routes. Register checks for conman routes.
2.001137
2
Other/transactionlog entries since timestamp.py
DJHig/TM1py-samples
1
5640
<filename>Other/transactionlog entries since timestamp.py """ Get all TM1 transactions for all cubes starting to a specific date. """ import configparser config = configparser.ConfigParser() config.read('..\config.ini') from datetime import datetime from TM1py.Services import TM1Service with TM1Service(**config['t...
<filename>Other/transactionlog entries since timestamp.py """ Get all TM1 transactions for all cubes starting to a specific date. """ import configparser config = configparser.ConfigParser() config.read('..\config.ini') from datetime import datetime from TM1py.Services import TM1Service with TM1Service(**config['t...
en
0.805447
Get all TM1 transactions for all cubes starting to a specific date. # Timestamp for Message-Log parsing # Get all entries since timestamp # loop through entries # Do stuff
2.962506
3
src/patteRNA/Dataset.py
AviranLab/patteRNA
12
5641
<filename>src/patteRNA/Dataset.py import logging import numpy as np from scipy.stats import entropy from patteRNA.Transcript import Transcript from patteRNA import filelib logger = logging.getLogger(__name__) class Dataset: def __init__(self, fp_observations, fp_sequences=None, fp_references=None): self....
<filename>src/patteRNA/Dataset.py import logging import numpy as np from scipy.stats import entropy from patteRNA.Transcript import Transcript from patteRNA import filelib logger = logging.getLogger(__name__) class Dataset: def __init__(self, fp_observations, fp_sequences=None, fp_references=None): self....
en
0.865401
# Cross reference input files to confirm all transcripts Parse all finite observations in the input file and compute some statistics on the data. These statistics are mostly used to initialize parameters of the emission model before training. Spawn a training set (smaller than or equal size to overall data) ba...
2.444492
2
src/Simulation/developer_0/main.py
GYRY-NEU/CS7610-Experiments
0
5642
<reponame>GYRY-NEU/CS7610-Experiments import library import json @library.export def init(args): model = [[9.2, 0.21, 0.21], [8.2, 0.22, 0.21], [7.2, 1.21, 2.41], [1.2, 2.21, 0.29]] library.put("model", model) ROUND = 0 library.put("ROUND", ROUND) alpha = 0.2 ...
import library import json @library.export def init(args): model = [[9.2, 0.21, 0.21], [8.2, 0.22, 0.21], [7.2, 1.21, 2.41], [1.2, 2.21, 0.29]] library.put("model", model) ROUND = 0 library.put("ROUND", ROUND) alpha = 0.2 library.put("alpha", alpha) @libr...
en
0.875044
# get client model # client round # save model to buckets # if enough models # check client rounds == current rounds # set round to -1 to prevent clients uploading to this bucket # save calculated model and restore round list_weights : 3D list of shape : (clientNumber,modelOuter, modelInner) It contains all the...
2.773505
3
molecule_ignite/test/unit/test_driver.py
ragingpastry/molecule-ignite
17
5643
<reponame>ragingpastry/molecule-ignite from molecule import api def test_driver_is_detected(): driver_name = __name__.split(".")[0].split("_")[-1] assert driver_name in [str(d) for d in api.drivers()]
from molecule import api def test_driver_is_detected(): driver_name = __name__.split(".")[0].split("_")[-1] assert driver_name in [str(d) for d in api.drivers()]
none
1
2.370798
2
coffeine/pipelines.py
dengemann/meegpowreg
6
5644
import numpy as np from coffeine.covariance_transformers import ( Diag, LogDiag, ExpandFeatures, Riemann, RiemannSnp, NaiveVec) from coffeine.spatial_filters import ( ProjIdentitySpace, ProjCommonSpace, ProjLWSpace, ProjRandomSpace, ProjSPoCSpace) from sklearn.compose impor...
import numpy as np from coffeine.covariance_transformers import ( Diag, LogDiag, ExpandFeatures, Riemann, RiemannSnp, NaiveVec) from coffeine.spatial_filters import ( ProjIdentitySpace, ProjCommonSpace, ProjLWSpace, ProjRandomSpace, ProjSPoCSpace) from sklearn.compose impor...
en
0.770133
Generate pipeline for filterbank models. Prepare filter bank models as used in [1]_. These models take as input sensor-space covariance matrices computed from M/EEG signals in different frequency bands. Then transformations are applied to improve the applicability of linear regression techniques by red...
2.693167
3
submissions/Chouard/mygames.py
dysomni/aima-python
0
5645
<gh_stars>0 from games import Game from math import nan, isnan from queue import PriorityQueue from copy import deepcopy from utils import isnumber from grading.util import print_table class GameState: def __init__(self, to_move, position, board, label=None): self.to_move = to_move self.position =...
from games import Game from math import nan, isnan from queue import PriorityQueue from copy import deepcopy from utils import isnumber from grading.util import print_table class GameState: def __init__(self, to_move, position, board, label=None): self.to_move = to_move self.position = position ...
en
0.776912
An implementation of ThinkAhead # defines the order of play # http://www.kongregate.com/games/zolli/thinkahead-brain-trainer *** *** *** An implementation of Dots and Lines # defines the order of play # print_table(state.board, njust='center', sep=',') Board represents the squares, whether the top, bottom, left, and r...
3.560918
4
discordbot/stocks/options/opt_chain.py
minhhoang1023/GamestonkTerminal
1
5646
import os import df2img import disnake import numpy as np import pandas as pd from menus.menu import Menu from PIL import Image import discordbot.config_discordbot as cfg from discordbot.config_discordbot import gst_imgur, logger from discordbot.helpers import autocrop_image from gamestonk_terminal.stocks.options imp...
import os import df2img import disnake import numpy as np import pandas as pd from menus.menu import Menu from PIL import Image import discordbot.config_discordbot as cfg from discordbot.config_discordbot import gst_imgur, logger from discordbot.helpers import autocrop_image from gamestonk_terminal.stocks.options imp...
en
0.501657
Show calls/puts for given ticker and expiration # Debug # Check for argument # type: ignore # pylint: disable=W0640 # Weekly Calls Pages # Author/Footer
2.486378
2
scripts/get_lenderprofit.py
xujiahuayz/premfin
4
5647
<filename>scripts/get_lenderprofit.py #%% import packages import numpy as np import pandas as pd import multiprocessing from time import time import json from premiumFinance.constants import ( MORTALITY_TABLE_CLEANED_PATH, PROCESSED_PROFITABILITY_PATH, ) from premiumFinance.financing import calculate_lender_p...
<filename>scripts/get_lenderprofit.py #%% import packages import numpy as np import pandas as pd import multiprocessing from time import time import json from premiumFinance.constants import ( MORTALITY_TABLE_CLEANED_PATH, PROCESSED_PROFITABILITY_PATH, ) from premiumFinance.financing import calculate_lender_p...
en
0.275307
#%% import packages #%% calculate profit rate #%% tbd
2.345878
2
dashboard/dashboard/common/layered_cache.py
BearerPipelineTest/catapult
0
5648
<reponame>BearerPipelineTest/catapult<gh_stars>0 # Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Caches processed query results in memcache and datastore. Memcache is not very reliable for the perf dash...
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Caches processed query results in memcache and datastore. Memcache is not very reliable for the perf dashboard. Prometheus team explained that memcache is...
en
0.830132
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. Caches processed query results in memcache and datastore. Memcache is not very reliable for the perf dashboard. Prometheus team explained that memcache is LR...
1.906354
2
hypergbm/tests/cuml_/run_experiment_cuml.py
BigAndSweet/HyperGBM
0
5649
# -*- coding:utf-8 -*- """ """ import cudf from hypergbm import make_experiment from hypernets.tabular import get_tool_box from hypernets.tabular.datasets import dsutils def main(target='y', dtype=None, max_trials=3, drift_detection=False, clear_cache=True, **kwargs): tb = get_tool_box(cudf.DataFrame) asse...
# -*- coding:utf-8 -*- """ """ import cudf from hypergbm import make_experiment from hypernets.tabular import get_tool_box from hypernets.tabular.datasets import dsutils def main(target='y', dtype=None, max_trials=3, drift_detection=False, clear_cache=True, **kwargs): tb = get_tool_box(cudf.DataFrame) asse...
en
0.203431
# -*- coding:utf-8 -*- # main(target='y', max_trials=10, cv=False, ensemble_size=0, verbose=0, pos_label='yes', ) # main(target='day', reward_metric='f1', ensemble_size=10, log_level='info', max_trials=5) # main(target='day', dtype='str', reward_metric='f1', ensemble_size=0, log_level='info', max_trials=6) # main(tar...
2.276793
2
Inserter.py
DarthSpector/Poster-Adder
0
5650
<gh_stars>0 def pictureInserter(og,address,list): j=0 for i in og: file1 = open(address+'/'+i, "a") x="\ncover::https://image.tmdb.org/t/p/original/"+list[j] file1.writelines(x) file1.close() j=j+1
def pictureInserter(og,address,list): j=0 for i in og: file1 = open(address+'/'+i, "a") x="\ncover::https://image.tmdb.org/t/p/original/"+list[j] file1.writelines(x) file1.close() j=j+1
none
1
2.916693
3
datasets/imagenet.py
xhchrn/open_lth
9
5651
<gh_stars>1-10 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import concurrent.futures import numpy as np import os from PIL import Image import torchvision from datasets import base from ...
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import concurrent.futures import numpy as np import os from PIL import Image import torchvision from datasets import base from platforms.platf...
en
0.897098
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. ImageNet # Load the data.
2.423644
2
sm4.py
ZelKnow/sm4
0
5652
<filename>sm4.py #!/usr/bin/env python # -*- encoding: utf-8 -*- """ @File : sm4.py @Description : sm4加密算法的实现 @Date : 2021/10/28 15:59:51 @Author : ZelKnow @Github : https://github.com/ZelKnow """ __author__ = "ZelKnow" from argparse import ArgumentParser, ArgumentError from binascii ...
<filename>sm4.py #!/usr/bin/env python # -*- encoding: utf-8 -*- """ @File : sm4.py @Description : sm4加密算法的实现 @Date : 2021/10/28 15:59:51 @Author : ZelKnow @Github : https://github.com/ZelKnow """ __author__ = "ZelKnow" from argparse import ArgumentParser, ArgumentError from binascii ...
zh
0.618321
#!/usr/bin/env python # -*- encoding: utf-8 -*- @File : sm4.py @Description : sm4加密算法的实现 @Date : 2021/10/28 15:59:51 @Author : ZelKnow @Github : https://github.com/ZelKnow # 加密 # 解密 合成置换函数T T(.) = L(\tau(.)) Args: A (int): 输入数据 L_func (function)...
2.722111
3
sendotp/sendotp.py
saadmk11/sendotp-python
5
5653
<reponame>saadmk11/sendotp-python<filename>sendotp/sendotp.py import json import requests from random import randint class sendotp: def __init__(self, key, msg): self.baseUrl = "http://control.msg91.com" self.authkey = key try: msg except NameError: self....
import json import requests from random import randint class sendotp: def __init__(self, key, msg): self.baseUrl = "http://control.msg91.com" self.authkey = key try: msg except NameError: self.msg = "Your otp is {{otp}}. Please do not share it with anybod...
en
0.224525
# print self.baseUrl + '/api/' +str(actionurl)
2.750951
3
leetcode/1021-remove-outermost-parentheses.py
tjeubaoit/algorithm
0
5654
class Solution: def removeOuterParentheses(self, s: str) -> str: ans = [] ct = 0 for ch in s: if ch == '(': ct += 1 if ct != 1: ans.append(ch) else: ct -= 1 if ct != 0: ...
class Solution: def removeOuterParentheses(self, s: str) -> str: ans = [] ct = 0 for ch in s: if ch == '(': ct += 1 if ct != 1: ans.append(ch) else: ct -= 1 if ct != 0: ...
en
0.254969
# s = '(()())(())' # s = '(()())(())(()(()))'
3.374324
3
venv/Scripts/ex049.py
SamuelNunesDev/starting_point_in_python
0
5655
n = int(input('Digite um número para ver sua tabuada: ')) for c in range(0, 11): print(f'{n} * {c} = {n * c}')
n = int(input('Digite um número para ver sua tabuada: ')) for c in range(0, 11): print(f'{n} * {c} = {n * c}')
none
1
3.872717
4
js2py/evaljs.py
inprod/Js2Py
0
5656
<reponame>inprod/Js2Py # coding=utf-8 from .translators import translate_js, DEFAULT_HEADER from .es6 import js6_to_js5 import sys import time import json import six import os import hashlib import codecs __all__ = [ 'EvalJs', 'translate_js', 'import_js', 'eval_js', 'translate_file', 'eval_js6', 'translate_js6...
# coding=utf-8 from .translators import translate_js, DEFAULT_HEADER from .es6 import js6_to_js5 import sys import time import json import six import os import hashlib import codecs __all__ = [ 'EvalJs', 'translate_js', 'import_js', 'eval_js', 'translate_file', 'eval_js6', 'translate_js6', 'run_file', 'disable...
en
0.73758
# coding=utf-8 # relative to cwd Imports from javascript source file. globals is your globals() Translates input JS file to python and saves the it to the output path. It appends some convenience code at the end so that it is easy to import JS objects. For example we have a file 'example.js' with: var ...
2.354106
2
setup.py
mvduin/py-uio
38
5657
#!/usr/bin/python3 from setuptools import setup, find_packages setup( package_dir = { '': 'src' }, packages = find_packages( where='src' ), )
#!/usr/bin/python3 from setuptools import setup, find_packages setup( package_dir = { '': 'src' }, packages = find_packages( where='src' ), )
fr
0.386793
#!/usr/bin/python3
1.424281
1
tools/verity_utils.py
FabriSC/Alioth-SC
3
5658
#!/usr/bin/env python # # Copyright (C) 2018 The Android Open Source Project # # 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...
#!/usr/bin/env python # # Copyright (C) 2018 The Android Open Source Project # # 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...
en
0.810129
#!/usr/bin/env python # # Copyright (C) 2018 The Android Open Source Project # # 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...
1.984651
2
orgviz/dones.py
tkf/orgviz
8
5659
<filename>orgviz/dones.py #!/usr/bin/env python """org archive to html table converter""" import os import datetime import itertools from .utils.date import minutestr, total_minutes def rootname_from_archive_olpath(node): """ Find rootname from ARCHIVE_OLPATH property. Return None if not found. """ ...
<filename>orgviz/dones.py #!/usr/bin/env python """org archive to html table converter""" import os import datetime import itertools from .utils.date import minutestr, total_minutes def rootname_from_archive_olpath(node): """ Find rootname from ARCHIVE_OLPATH property. Return None if not found. """ ...
en
0.668361
#!/usr/bin/env python org archive to html table converter Find rootname from ARCHIVE_OLPATH property. Return None if not found. Find rootname given node # n is root node Return three tuple (key, row) whose elemens are key object for sorting table and dictionary which has following keywords: heading, closed,...
2.69019
3
tests/python/unittest/test_lang_tag.py
ravikumarvc/incubator-tvm
3
5660
# 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...
# 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.858127
# 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...
2.030138
2
doepy/case_studies/discrete_time/MSFB2014.py
scwolof/doepy
1
5661
<reponame>scwolof/doepy<gh_stars>1-10 """ MIT License Copyright (c) 2019 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
""" MIT License Copyright (c) 2019 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
en
0.75915
MIT License Copyright (c) 2019 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...
1.657846
2
house_code/tutorials_altered/3D_positioning_and_orientation.py
mukobi/Pozyx-Gabe
1
5662
#!/usr/bin/env python """ The pozyx ranging demo (c) Pozyx Labs please check out https://www.pozyx.io/Documentation/Tutorials/getting_started/Python This demo requires one (or two) pozyx shields. It demonstrates the 3D orientation and the functionality to remotely read register data from a pozyx device. Connect one of...
#!/usr/bin/env python """ The pozyx ranging demo (c) Pozyx Labs please check out https://www.pozyx.io/Documentation/Tutorials/getting_started/Python This demo requires one (or two) pozyx shields. It demonstrates the 3D orientation and the functionality to remotely read register data from a pozyx device. Connect one of...
en
0.722577
#!/usr/bin/env python The pozyx ranging demo (c) Pozyx Labs please check out https://www.pozyx.io/Documentation/Tutorials/getting_started/Python This demo requires one (or two) pozyx shields. It demonstrates the 3D orientation and the functionality to remotely read register data from a pozyx device. Connect one of the...
2.710381
3
hdfs_kernel/exceptions.py
Jasper912/jupyter-hdfs-kernel
3
5663
<reponame>Jasper912/jupyter-hdfs-kernel #!/usr/bin/env python # -*- coding=utf-8 -*- # # Author: huangnj # Time: 2019/09/27 import traceback from functools import wraps from hdfs_kernel.constants import EXPECTED_ERROR_MSG, INTERNAL_ERROR_MSG from hdfs.util import HdfsError # == EXCEPTIONS == class SessionManagementEx...
#!/usr/bin/env python # -*- coding=utf-8 -*- # # Author: huangnj # Time: 2019/09/27 import traceback from functools import wraps from hdfs_kernel.constants import EXPECTED_ERROR_MSG, INTERNAL_ERROR_MSG from hdfs.util import HdfsError # == EXCEPTIONS == class SessionManagementException(Exception): pass class Comm...
en
0.786893
#!/usr/bin/env python # -*- coding=utf-8 -*- # # Author: huangnj # Time: 2019/09/27 # == EXCEPTIONS == # option parse Error # == DECORATORS FOR EXCEPTION HANDLING == A decorator that handles expected exceptions. Self can be any object with an "ipython_display" attribute. Usage: @handle_expected_exceptions ...
2.360929
2
dashboard/tests/test_inventory.py
vishalvvr/transtats
0
5664
# Copyright 2017 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
en
0.538909
# Copyright 2017 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
1.957011
2
web_console_v2/api/fedlearner_webconsole/rpc/server.py
nolanliou/fedlearner
0
5665
# Copyright 2020 The FedLearner 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 applica...
# Copyright 2020 The FedLearner 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 applica...
en
0.786332
# Copyright 2020 The FedLearner 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 applica...
1.807309
2
chapter15/async_aiohttp.py
haru-256/ExpertPython3_Source
9
5666
<reponame>haru-256/ExpertPython3_Source<filename>chapter15/async_aiohttp.py<gh_stars>1-10 """ 「非同期プログラミング」の節で登場するサンプルコード aiohttpを使って非同期にHTTPのリクエストを送信する方法 """ import asyncio import time import aiohttp from asyncrates import get_rates SYMBOLS = ('USD', 'EUR', 'PLN', 'NOK', 'CZK') BASES = ('USD', 'EUR', 'PLN', 'NOK', ...
""" 「非同期プログラミング」の節で登場するサンプルコード aiohttpを使って非同期にHTTPのリクエストを送信する方法 """ import asyncio import time import aiohttp from asyncrates import get_rates SYMBOLS = ('USD', 'EUR', 'PLN', 'NOK', 'CZK') BASES = ('USD', 'EUR', 'PLN', 'NOK', 'CZK') async def fetch_rates(session, place): return await get_rates(session, place)...
ja
0.999968
「非同期プログラミング」の節で登場するサンプルコード aiohttpを使って非同期にHTTPのリクエストを送信する方法
3.469126
3
experiments/nginx/run.py
OleksiiOleksenko/intel_mpx_explained
15
5667
#!/usr/bin/env python from __future__ import print_function import logging import os import signal from time import sleep from subprocess import Popen, PIPE import socket from core.common_functions import * from core.run import Runner class NginxPerf(Runner): """ Runs Nginx """ name = "nginx" e...
#!/usr/bin/env python from __future__ import print_function import logging import os import signal from time import sleep from subprocess import Popen, PIPE import socket from core.common_functions import * from core.run import Runner class NginxPerf(Runner): """ Runs Nginx """ name = "nginx" e...
en
0.698969
#!/usr/bin/env python Runs Nginx # in seconds # some huge number so we always take 20 seconds # generate an input file # config Nginx # by default start client on local machine # start server # for sanity # start client (possibly on another machine) # log and stop server
2.346392
2
tavi/test/unit/base/document_no_fields_test.py
verdammelt/tavi
0
5668
<gh_stars>0 # -*- coding: utf-8 -*- import unittest from tavi.base.documents import BaseDocument class BaseDocumentNoFieldsTest(unittest.TestCase): class NoFieldsSample(BaseDocument): pass def setUp(self): super(BaseDocumentNoFieldsTest, self).setUp() self.no_fields_sample = self.NoFi...
# -*- coding: utf-8 -*- import unittest from tavi.base.documents import BaseDocument class BaseDocumentNoFieldsTest(unittest.TestCase): class NoFieldsSample(BaseDocument): pass def setUp(self): super(BaseDocumentNoFieldsTest, self).setUp() self.no_fields_sample = self.NoFieldsSample()...
en
0.769321
# -*- coding: utf-8 -*-
2.426333
2
seqparse/test/test_seqparse.py
hoafaloaf/seqparse
1
5669
"""Test file sequence discovery on disk.""" # "Future" Libraries from __future__ import print_function # Standard Libraries import os import unittest # Third Party Libraries import mock from builtins import range from future.utils import lrange from . import (DirEntry, generate_entries, initialise_mock_scandir_data...
"""Test file sequence discovery on disk.""" # "Future" Libraries from __future__ import print_function # Standard Libraries import os import unittest # Third Party Libraries import mock from builtins import range from future.utils import lrange from . import (DirEntry, generate_entries, initialise_mock_scandir_data...
en
0.703966
Test file sequence discovery on disk. # "Future" Libraries # Standard Libraries # Third Party Libraries ############################################################################### # class: TestSeqparseModule Test file discovery on the seqparse module. Set up the test case. Seqparse: Test file singleton discovery fr...
2.570887
3
deliveroo_scraping.py
ragreener1/deliveroo-scraping
0
5670
<filename>deliveroo_scraping.py import urllib.request import pandas as pd import sqlite3 import re from bs4 import BeautifulSoup # Parameters postcodes_list = ["W1F7EY"] db_name = "scraped.db" # This is so that Deliveroo think the scraper is Google Chrome # as opposed to a web scraper hdr = {'User-Agent': 'Mozilla/...
<filename>deliveroo_scraping.py import urllib.request import pandas as pd import sqlite3 import re from bs4 import BeautifulSoup # Parameters postcodes_list = ["W1F7EY"] db_name = "scraped.db" # This is so that Deliveroo think the scraper is Google Chrome # as opposed to a web scraper hdr = {'User-Agent': 'Mozilla/...
en
0.85053
# Parameters # This is so that Deliveroo think the scraper is Google Chrome # as opposed to a web scraper # This function processes the menu # This gets the restaurant_name by finding the <h1> tag with the CSS class # restaurant_name # This gets the deliveroo_name by selecting the appropriate part from the # URL # This...
3.588562
4
wouso/core/security/admin.py
AlexandruGhergut/wouso
117
5671
from django.contrib import admin from wouso.core.security.models import Report admin.site.register(Report)
from django.contrib import admin from wouso.core.security.models import Report admin.site.register(Report)
none
1
1.067398
1
DataWrangling/TTNData2Gsheet_Auto.py
diliprk/SmartCityVisualization
0
5672
<filename>DataWrangling/TTNData2Gsheet_Auto.py #### Reading Data from The Things Network Data and Automatically Storing it to a Google Spreadsheet # Author: <NAME> # Email: <EMAIL> # Date: 19/01/2018 # Revision: version#1 # License: MIT License import pandas as pd import requests from df2gspread import df2gspread as ...
<filename>DataWrangling/TTNData2Gsheet_Auto.py #### Reading Data from The Things Network Data and Automatically Storing it to a Google Spreadsheet # Author: <NAME> # Email: <EMAIL> # Date: 19/01/2018 # Revision: version#1 # License: MIT License import pandas as pd import requests from df2gspread import df2gspread as ...
en
0.729865
#### Reading Data from The Things Network Data and Automatically Storing it to a Google Spreadsheet # Author: <NAME> # Email: <EMAIL> # Date: 19/01/2018 # Revision: version#1 # License: MIT License ## Set Initial Time Duration in mins to query TTN Data: # Insert spreadsheet file id of Google Spreadsheet ## Google Sprea...
3.136007
3
alleycat/reactive/property.py
mysticfall/alleycat-reactive
14
5673
from __future__ import annotations from typing import TypeVar, Generic, Callable, Optional, Any, cast, Tuple import rx from returns import pipeline from returns.functions import identity from returns.maybe import Maybe, Nothing from rx import Observable from rx.subject import BehaviorSubject from . import ReactiveVa...
from __future__ import annotations from typing import TypeVar, Generic, Callable, Optional, Any, cast, Tuple import rx from returns import pipeline from returns.functions import identity from returns.maybe import Maybe, Nothing from rx import Observable from rx.subject import BehaviorSubject from . import ReactiveVa...
en
0.792451
# FIXME: Not sure why both PyCharm and Mypy fails to resolve pipeline.pipe(). Should investigate later. # noinspection PyUnresolvedReferences # type:ignore # Must override to appease Mypy... I hate Python.
2.111857
2
utils/mask/converter.py
csgcmai/cvat
4
5674
#!/usr/bin/env python # # Copyright (C) 2018 Intel Corporation # # SPDX-License-Identifier: MIT from __future__ import absolute_import, division, print_function import argparse import os import glog as log import numpy as np import cv2 from lxml import etree from tqdm import tqdm def parse_args(): """Parse argu...
#!/usr/bin/env python # # Copyright (C) 2018 Intel Corporation # # SPDX-License-Identifier: MIT from __future__ import absolute_import, division, print_function import argparse import os import glog as log import numpy as np import cv2 from lxml import etree from tqdm import tqdm def parse_args(): """Parse argu...
en
0.24624
#!/usr/bin/env python # # Copyright (C) 2018 Intel Corporation # # SPDX-License-Identifier: MIT Parse arguments of command line
2.609935
3
examples/plot_afq_callosal.py
gkiar/pyAFQ
0
5675
<reponame>gkiar/pyAFQ """ ========================== Callosal bundles using AFQ API ========================== An example using the AFQ API to find callosal bundles using the templates from: http://hdl.handle.net/1773/34926 """ import os.path as op import plotly from AFQ import api from AFQ.mask import RoiMask import...
""" ========================== Callosal bundles using AFQ API ========================== An example using the AFQ API to find callosal bundles using the templates from: http://hdl.handle.net/1773/34926 """ import os.path as op import plotly from AFQ import api from AFQ.mask import RoiMask import AFQ.data as afd ####...
en
0.396399
========================== Callosal bundles using AFQ API ========================== An example using the AFQ API to find callosal bundles using the templates from: http://hdl.handle.net/1773/34926 ########################################################################## # Get some example data # ---------------------...
1.998132
2
latest/probe.py
Soldie/Nscan-scanner-ip
574
5676
import time import Queue import random import socket import struct import logging import threading from convert import * from protocol import ethernet, ip, tcp, udp ETH_P_IP = 0x0800 # IP protocol ETH_P_ALL = 0x0003 # Every packet NSCRIPT_PATH = 'nscript' # NSCRIPT PATH PAYLOAD = { 53:('\x5d\x0d\x01\x00\x00\x01\x00...
import time import Queue import random import socket import struct import logging import threading from convert import * from protocol import ethernet, ip, tcp, udp ETH_P_IP = 0x0800 # IP protocol ETH_P_ALL = 0x0003 # Every packet NSCRIPT_PATH = 'nscript' # NSCRIPT PATH PAYLOAD = { 53:('\x5d\x0d\x01\x00\x00\x01\x00...
en
0.506273
# IP protocol # Every packet # NSCRIPT PATH # 'google.com' DNS Lookup # SNMP GetNextRequest|public|2c version|1.3.6.1.2.1 # NTP systats commands lacks 38 null bytes (just to save bandwidth) #self.PickPort() # source port # SYN-ACK #tcph.pack(iph.src, iph.dst) # self.ifname Split host range into n parts (multithreaded) ...
2.124902
2
parsy-backend/flaskApp/assignment/views.py
dstambler17/Parsy.io
0
5677
import sys from flask import Blueprint, request, jsonify from flaskApp import db from flaskApp.assignment.utils import * from flaskApp.error.error_handlers import * import json from flaskApp.helpers import getAssignmentData assignment = Blueprint('assignment', __name__) @assignment.route('/restoreAssignment/<calID>/<...
import sys from flask import Blueprint, request, jsonify from flaskApp import db from flaskApp.assignment.utils import * from flaskApp.error.error_handlers import * import json from flaskApp.helpers import getAssignmentData assignment = Blueprint('assignment', __name__) @assignment.route('/restoreAssignment/<calID>/<...
en
0.928384
Test method, keep just in case. Will prob be moved to seperate API designed to interact with just the MySQL database that the data pipeline will drop stuff into
2.329495
2
python/patterns/slidingwindow/longest_substring_no_repeating_char.py
dharmik-thakkar/dsapatterns
0
5678
####################################################################################################################### # Given a string, find the length of the longest substring which has no repeating characters. # # Input: String="aabccbb" # Output: 3 # Explanation: The longest substring without any repeating charact...
####################################################################################################################### # Given a string, find the length of the longest substring which has no repeating characters. # # Input: String="aabccbb" # Output: 3 # Explanation: The longest substring without any repeating charact...
en
0.275075
####################################################################################################################### # Given a string, find the length of the longest substring which has no repeating characters. # # Input: String="aabccbb" # Output: 3 # Explanation: The longest substring without any repeating charact...
4.081986
4
Apache Spark with Python - Big Data with PySpark and Spark/6-PairRDD/filter/AirportsNotInUsa.py
jrderek/Big_Data_Engineering_Portfolio
0
5679
<filename>Apache Spark with Python - Big Data with PySpark and Spark/6-PairRDD/filter/AirportsNotInUsa.py import sys sys.path.insert(0, '.') from pyspark import SparkContext, SparkConf from commons.Utils import Utils if __name__ == "__main__": ''' Create a Spark program to read the airport data fr...
<filename>Apache Spark with Python - Big Data with PySpark and Spark/6-PairRDD/filter/AirportsNotInUsa.py import sys sys.path.insert(0, '.') from pyspark import SparkContext, SparkConf from commons.Utils import Utils if __name__ == "__main__": ''' Create a Spark program to read the airport data fr...
en
0.845697
Create a Spark program to read the airport data from in/airports.text; generate a pair RDD with airport name being the key and country name being the value. Then remove all the airports which are located in United States and output the pair RDD to out/airports_not_in_usa_pair_rdd.text Each row of the i...
3.409134
3
linux/keyman-config/keyman_config/keyboard_details.py
srl295/keyman
0
5680
<reponame>srl295/keyman #!/usr/bin/python3 # Keyboard details window import logging import json from os import path import qrcode import tempfile import gi from gi.repository import Gtk from keyman_config import KeymanComUrl, _, secure_lookup from keyman_config.accelerators import init_accel from keyman_config.kmpm...
#!/usr/bin/python3 # Keyboard details window import logging import json from os import path import qrcode import tempfile import gi from gi.repository import Gtk from keyman_config import KeymanComUrl, _, secure_lookup from keyman_config.accelerators import init_accel from keyman_config.kmpmetadata import parsemeta...
en
0.552551
#!/usr/bin/python3 # Keyboard details window # basics: keyboard name, package version, description # other things: filename (of kmx), , # OSK availability, documentation availability, package copyright # also: supported languages, fonts # from kmx?: keyboard version, encoding, layout type # there is data in kmp.inf/...
2.291905
2
build_osx/copy_runtime.py
ozsolarwind/SAM
0
5681
import os import shutil SOURCE_DIR = '../deploy/runtime' TARGET_DIR = 'SAM.app/Contents/runtime' if os.path.exists(TARGET_DIR): shutil.rmtree(TARGET_DIR) shutil.copytree(SOURCE_DIR, TARGET_DIR, ignore=shutil.ignore_patterns('.git')) SOURCE_DIR = '../deploy/solar_resource' TARGET_DIR = 'SAM.app/Contents/solar_re...
import os import shutil SOURCE_DIR = '../deploy/runtime' TARGET_DIR = 'SAM.app/Contents/runtime' if os.path.exists(TARGET_DIR): shutil.rmtree(TARGET_DIR) shutil.copytree(SOURCE_DIR, TARGET_DIR, ignore=shutil.ignore_patterns('.git')) SOURCE_DIR = '../deploy/solar_resource' TARGET_DIR = 'SAM.app/Contents/solar_re...
none
1
2.124556
2
codalab/lib/path_util.py
kl-chou/codalab-worksheets
236
5682
<filename>codalab/lib/path_util.py """ path_util contains helpers for working with local filesystem paths. There are a few classes of methods provided here: Functions to normalize paths and check that they are in normal form: normalize, check_isvalid, check_isdir, check_isfile, path_is_url Functions to list d...
<filename>codalab/lib/path_util.py """ path_util contains helpers for working with local filesystem paths. There are a few classes of methods provided here: Functions to normalize paths and check that they are in normal form: normalize, check_isvalid, check_isdir, check_isfile, path_is_url Functions to list d...
en
0.767791
path_util contains helpers for working with local filesystem paths. There are a few classes of methods provided here: Functions to normalize paths and check that they are in normal form: normalize, check_isvalid, check_isdir, check_isfile, path_is_url Functions to list directories and to deal with subpaths of...
2.76687
3
statsmodels/regression/tests/test_glsar_gretl.py
aliavni/statsmodels
1
5683
# -*- coding: utf-8 -*- """Tests of GLSAR and diagnostics against Gretl Created on Thu Feb 02 21:15:47 2012 Author: <NAME> License: BSD-3 """ import os import numpy as np from numpy.testing import (assert_almost_equal, assert_equal, assert_allclose, assert_array_less) from statsmodels.r...
# -*- coding: utf-8 -*- """Tests of GLSAR and diagnostics against Gretl Created on Thu Feb 02 21:15:47 2012 Author: <NAME> License: BSD-3 """ import os import numpy as np from numpy.testing import (assert_almost_equal, assert_equal, assert_allclose, assert_array_less) from statsmodels.r...
en
0.462507
# -*- coding: utf-8 -*- Tests of GLSAR and diagnostics against Gretl Created on Thu Feb 02 21:15:47 2012 Author: <NAME> License: BSD-3 #import datasetswsm.greene as g #d = g.load('5-1') #growth rates #simple diff, not growthrate, I want heteroscedasticity later for testing #print res_ols.params #print res_g1.params #...
1.815376
2
core/views.py
tweeprint/api.tweeprint.com
1
5684
<gh_stars>1-10 import requests import django.contrib.auth as auth from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponse, JsonResponse, Http404 from django.contrib.auth.decorators import login_required from django.core.serializers import serialize from core.serializers imp...
import requests import django.contrib.auth as auth from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponse, JsonResponse, Http404 from django.contrib.auth.decorators import login_required from django.core.serializers import serialize from core.serializers import * from core...
none
1
1.950084
2
src/framed/bioreactor/__init__.py
cdanielmachado/framed
25
5685
<gh_stars>10-100 from __future__ import absolute_import __author__ = 'kaizhuang' """ Package implementing features for simulating bioreactor operation. """ from .base import Organism, Bioreactor from .bioreactors import ANAEROBIC, AEROBIC, MICROAEROBIC from .bioreactors import Bioreactor_ox, IdealBatch, IdealFedbatch ...
from __future__ import absolute_import __author__ = 'kaizhuang' """ Package implementing features for simulating bioreactor operation. """ from .base import Organism, Bioreactor from .bioreactors import ANAEROBIC, AEROBIC, MICROAEROBIC from .bioreactors import Bioreactor_ox, IdealBatch, IdealFedbatch from framed.biore...
en
0.828275
Package implementing features for simulating bioreactor operation.
1.009801
1
shared/templates/coreos_kernel_option/template.py
deperrone/content
1,138
5686
<reponame>deperrone/content<filename>shared/templates/coreos_kernel_option/template.py from ssg.utils import parse_template_boolean_value def preprocess(data, lang): data["arg_negate"] = parse_template_boolean_value(data, parameter="arg_negate", default_value=False) data["arg_is_regex"] = parse_template_boole...
from ssg.utils import parse_template_boolean_value def preprocess(data, lang): data["arg_negate"] = parse_template_boolean_value(data, parameter="arg_negate", default_value=False) data["arg_is_regex"] = parse_template_boolean_value(data, parameter="arg_is_regex", default_value=False) return data
none
1
2.412775
2
pondus/backends/__init__.py
enicklas/pondus
1
5687
# -*- coding: UTF-8 -*- """ This file is part of Pondus, a personal weight manager. Copyright (C) 2011 <NAME> <<EMAIL>> This program is free software licensed under the MIT license. For details see LICENSE or http://www.opensource.org/licenses/mit-license.php """ __all__ = ['csv_backend', 'sportstracker_backend', '...
# -*- coding: UTF-8 -*- """ This file is part of Pondus, a personal weight manager. Copyright (C) 2011 <NAME> <<EMAIL>> This program is free software licensed under the MIT license. For details see LICENSE or http://www.opensource.org/licenses/mit-license.php """ __all__ = ['csv_backend', 'sportstracker_backend', '...
en
0.741538
# -*- coding: UTF-8 -*- This file is part of Pondus, a personal weight manager. Copyright (C) 2011 <NAME> <<EMAIL>> This program is free software licensed under the MIT license. For details see LICENSE or http://www.opensource.org/licenses/mit-license.php
0.840486
1
setup.py
specialprocedures/chpy
0
5688
<filename>setup.py import pathlib from setuptools import find_packages, setup # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() # This call to setup() does all the work setup( name="chpy", version="0.1...
<filename>setup.py import pathlib from setuptools import find_packages, setup # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() # This call to setup() does all the work setup( name="chpy", version="0.1...
en
0.618225
# The directory containing this file # The text of the README file # This call to setup() does all the work # author_email="<EMAIL>", # install_requires=["networkx", "pandas", "progressbar", "fuzzywuzzy", # "os", "requests", "math", "time", "collections", "re"]
1.644081
2
src/sentry/eventtypes/error.py
boblail/sentry
0
5689
<gh_stars>0 from __future__ import absolute_import import six from sentry.utils.safe import get_path, trim from sentry.utils.strings import truncatechars from .base import BaseEvent def get_crash_location(exception, platform=None): default = None for frame in reversed(get_path(exception, 'stacktrace', 'fra...
from __future__ import absolute_import import six from sentry.utils.safe import get_path, trim from sentry.utils.strings import truncatechars from .base import BaseEvent def get_crash_location(exception, platform=None): default = None for frame in reversed(get_path(exception, 'stacktrace', 'frames', filter...
en
0.677648
# If the exception mechanism indicates a synthetic exception we do not # want to record the type and value into the metadata. # Attach crash location if available
2.116632
2
keras_en_parser_and_analyzer/library/tests/test_detect_date.py
Sultan91/keras-english-resume-parser-and-analyzer
0
5690
from unittest import TestCase from datetime import date from keras_en_parser_and_analyzer.library.pipmp_my_cv_classify import detect_date class DetectDate(TestCase): def test_detect_date(self): dates_to_test = ['10-1990', '09/12/2020', 'jan 1990', 'feb 2012', '9-12-2020'] res = detect_date(dates_t...
from unittest import TestCase from datetime import date from keras_en_parser_and_analyzer.library.pipmp_my_cv_classify import detect_date class DetectDate(TestCase): def test_detect_date(self): dates_to_test = ['10-1990', '09/12/2020', 'jan 1990', 'feb 2012', '9-12-2020'] res = detect_date(dates_t...
none
1
3.003879
3
capirca/lib/ipset.py
google-admin/capirca
604
5691
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required by applicable law or a...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required by applicable law or a...
en
0.849027
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required by applicable law or a...
2.094063
2
straxen/analyses/records_matrix.py
zhut19/straxen
14
5692
import warnings import numba import numpy as np import strax import straxen DEFAULT_MAX_SAMPLES = 20_000 @straxen.mini_analysis(requires=('records',), warn_beyond_sec=10, default_time_selection='touching') def records_matrix(records, time_range, seconds_range, config, ...
import warnings import numba import numpy as np import strax import straxen DEFAULT_MAX_SAMPLES = 20_000 @straxen.mini_analysis(requires=('records',), warn_beyond_sec=10, default_time_selection='touching') def records_matrix(records, time_range, seconds_range, config, ...
en
0.749588
Return (wv_matrix, times, pms) - wv_matrix: (n_samples, n_pmt) array with per-PMT waveform intensity in PE/ns - times: time labels in seconds (corr. to rows) - pmts: PMT numbers (corr. to columns) Both times and pmts have one extra element. :param max_samples: Maximum number of time samples. ...
2.412221
2
bdbc/lib/python3.5/site-packages/bigchaindb_driver/crypto.py
entropyx/fiduchain-blockchain-interface
0
5693
from collections import namedtuple from cryptoconditions import crypto CryptoKeypair = namedtuple('CryptoKeypair', ('signing_key', 'verifying_key')) def generate_keypair(): """Generates a cryptographic key pair. Returns: :class:`~bigchaindb_driver.crypto.CryptoKeypair`: A :obj:`collections...
from collections import namedtuple from cryptoconditions import crypto CryptoKeypair = namedtuple('CryptoKeypair', ('signing_key', 'verifying_key')) def generate_keypair(): """Generates a cryptographic key pair. Returns: :class:`~bigchaindb_driver.crypto.CryptoKeypair`: A :obj:`collections...
en
0.429723
Generates a cryptographic key pair. Returns: :class:`~bigchaindb_driver.crypto.CryptoKeypair`: A :obj:`collections.namedtuple` with named fields :attr:`~bigchaindb_driver.crypto.CryptoKeypair.signing_key` and :attr:`~bigchaindb_driver.crypto.CryptoKeypair.verifying_key`.
3.02379
3
reviewboard/webapi/resources/change.py
mnoorenberghe/reviewboard
0
5694
<reponame>mnoorenberghe/reviewboard from __future__ import unicode_literals from django.utils import six from djblets.util.decorators import augment_method_from from reviewboard.changedescs.models import ChangeDescription from reviewboard.reviews.fields import get_review_request_field from reviewboard.webapi.base imp...
from __future__ import unicode_literals from django.utils import six from djblets.util.decorators import augment_method_from from reviewboard.changedescs.models import ChangeDescription from reviewboard.reviews.fields import get_review_request_field from reviewboard.webapi.base import WebAPIResource from reviewboard....
en
0.907537
Provides information on a change made to a public review request. A change includes, optionally, text entered by the user describing the change, and also includes a list of fields that were changed on the review request. The list of fields changed are in ``fields_changed``. The keys are the names ...
1.765646
2
controllers/notes/NewNote.py
heminsatya/free_notes
0
5695
# Dependencies from aurora import Controller, View, Forms from models import Users, Notes from aurora.security import login_required, get_session from flask import request from datetime import datetime # The controller class class NewNote(Controller): # POST Method @login_required(app='users') def post(se...
# Dependencies from aurora import Controller, View, Forms from models import Users, Notes from aurora.security import login_required, get_session from flask import request from datetime import datetime # The controller class class NewNote(Controller): # POST Method @login_required(app='users') def post(se...
en
0.458356
# Dependencies # The controller class # POST Method # The required models # Form data # Valid form data # Collect form inputs # Required fields # Everything is fine # Insert new note into the database # 'date': datetime.now().strftime("%m-%d-%Y") # Return the result # Invalid form data # Return the result # GET Method ...
2.767373
3
EDA-&-Data-Preprocessing/code.py
udayraj-gupta/ga-learner-dsmp-repo
0
5696
# -------------- #Importing header files import pandas as pd import matplotlib.pyplot as plt import seaborn as sns #Code starts here data = pd.read_csv(path) data['Rating'].hist() data = data[data['Rating']<=5] data['Rating'].hist() #Code ends here # -------------- # code starts here total_null = data.isnull().sum...
# -------------- #Importing header files import pandas as pd import matplotlib.pyplot as plt import seaborn as sns #Code starts here data = pd.read_csv(path) data['Rating'].hist() data = data[data['Rating']<=5] data['Rating'].hist() #Code ends here # -------------- # code starts here total_null = data.isnull().sum...
en
0.442963
# -------------- #Importing header files #Code starts here #Code ends here # -------------- # code starts here # code ends here # -------------- #Code starts here #Code ends here # -------------- #Importing header files #Code starts here #data['Installs'] = data['Installs'].str.replace(',','').str.replace('+','') #Code...
2.971504
3
openpnm/algorithms/ChargeConservation.py
rguan-uoft/OpenPNM
1
5697
import numpy as np from openpnm.algorithms import ReactiveTransport from openpnm.models.physics import generic_source_term as gst from openpnm.utils import logging logger = logging.getLogger(__name__) class ChargeConservation(ReactiveTransport): r""" A class to enforce charge conservation in ionic transport s...
import numpy as np from openpnm.algorithms import ReactiveTransport from openpnm.models.physics import generic_source_term as gst from openpnm.utils import logging logger = logging.getLogger(__name__) class ChargeConservation(ReactiveTransport): r""" A class to enforce charge conservation in ionic transport s...
en
0.760735
A class to enforce charge conservation in ionic transport simulations. Parameters ---------- network : OpenPNM Network object The network on which this algorithm operates project : OpenPNM Project object Either a network or a project must be specified name : string, optional ...
2.664825
3
jno/commands/upload.py
Kosinkadink/jno
1
5698
from jno.util import interpret_configs from jno.util import run_arduino_process from jno.util import create_build_directory from jno.util import get_common_parameters from jno.util import verify_arduino_dir from jno.util import verify_and_get_port from jno.util import JnoException from jno.commands.command import Comma...
from jno.util import interpret_configs from jno.util import run_arduino_process from jno.util import create_build_directory from jno.util import get_common_parameters from jno.util import verify_arduino_dir from jno.util import verify_and_get_port from jno.util import JnoException from jno.commands.command import Comma...
en
0.389211
# Create argument list for arduino build # assemble command query # GOAL: <arduino exec> --upload <script> --board <board> --port <serial> # add common params - set pref # add upload params # verify port or get first available # add board params # add port params
2.488939
2
modelling/inference_multi_attribute.py
rizwan09/hydra-sum
5
5699
import argparse import json import logging import os import torch from transformers.file_utils import ModelOutput from typing import Dict, Optional, Tuple from torch.utils.data import DataLoader, SequentialSampler from transformers.modeling_outputs import Seq2SeqLMOutput import train_seq2seq_utils import single_head_ut...
import argparse import json import logging import os import torch from transformers.file_utils import ModelOutput from typing import Dict, Optional, Tuple from torch.utils.data import DataLoader, SequentialSampler from transformers.modeling_outputs import Seq2SeqLMOutput import train_seq2seq_utils import single_head_ut...
en
0.557756
# unchanged # cut decoder_input_ids if past is used # encoder_outputs is defined. input_ids not needed # change this to avoid caching (presumably for debugging) # Eval! # gen = gen[0] # Required parameters # Other parameters # custom flags # Setup logging # Set seed
2.054158
2