hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f70740e8d5d0361a718c1fdc8072113c78139c02
4,031
py
Python
nunaserver/nunaserver/views.py
UAVCAN/nunaweb
3dc59d5385716a2ad8581807a80d52489ffae8e8
[ "MIT" ]
3
2021-02-10T22:56:35.000Z
2021-09-11T12:43:27.000Z
nunaserver/nunaserver/views.py
UAVCAN/nunaweb
3dc59d5385716a2ad8581807a80d52489ffae8e8
[ "MIT" ]
33
2021-02-03T20:01:19.000Z
2021-10-05T10:24:08.000Z
nunaserver/nunaserver/views.py
bbworld1/nunaweb
3dc59d5385716a2ad8581807a80d52489ffae8e8
[ "MIT" ]
1
2021-02-20T08:29:08.000Z
2021-02-20T08:29:08.000Z
""" API endpoints for nunaserver. """ import tempfile import os import uuid from pathlib import Path import flask from minio.commonconfig import Filter, ENABLED from minio.lifecycleconfig import LifecycleConfig, Expiration, Rule from nunaserver import settings from nunaserver.minio_connection import storage from nunase...
28.792857
85
0.581245
import tempfile import os import uuid from pathlib import Path import flask from minio.commonconfig import Filter, ENABLED from minio.lifecycleconfig import LifecycleConfig, Expiration, Rule from nunaserver import settings from nunaserver.minio_connection import storage from nunaserver.limiter import limiter from nunas...
true
true
f70741177c95688de51f69d98bba581a54fd64b9
869
py
Python
static_optim/forces.py
pariterre/opensim_static_optimization_python
50a62d61992caa5dc0f7465cace8a7e7814566b7
[ "MIT" ]
3
2020-07-21T15:08:51.000Z
2022-03-31T17:28:20.000Z
static_optim/forces.py
pariterre/opensim_static_optimization_python
50a62d61992caa5dc0f7465cace8a7e7814566b7
[ "MIT" ]
null
null
null
static_optim/forces.py
pariterre/opensim_static_optimization_python
50a62d61992caa5dc0f7465cace8a7e7814566b7
[ "MIT" ]
1
2020-04-16T18:44:46.000Z
2020-04-16T18:44:46.000Z
""" Forces method classes. The dynamic model should inherit from these classes in order to get the proper forces. """ import opensim as osim class ResidualForces: def __init__(self, residual_actuator_xml=None): if residual_actuator_xml: res_force_set = osim.ForceSet(residual_actuator_xml, Tru...
31.035714
86
0.659379
import opensim as osim class ResidualForces: def __init__(self, residual_actuator_xml=None): if residual_actuator_xml: res_force_set = osim.ForceSet(residual_actuator_xml, True) n_forces = res_force_set.getSize() model_force_set = self.model.getForceSet() fo...
true
true
f707416286b22ddbdcf84f60b6ad38ded604bdfc
3,759
py
Python
scaper_concept/venv/lib/python3.9/site-packages/_distutils_hack/__init__.py
edudbot/web-scraper
12c07f805427699b2c3a35ed7c0d7efbc3673a7f
[ "MIT" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
scaper_concept/venv/lib/python3.9/site-packages/_distutils_hack/__init__.py
edudbot/web-scraper
12c07f805427699b2c3a35ed7c0d7efbc3673a7f
[ "MIT" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
scaper_concept/venv/lib/python3.9/site-packages/_distutils_hack/__init__.py
edudbot/web-scraper
12c07f805427699b2c3a35ed7c0d7efbc3673a7f
[ "MIT" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
import sys import os import re import importlib import warnings is_pypy = '__pypy__' in sys.builtin_module_names warnings.filterwarnings('ignore', r'.+ distutils\b.+ deprecated', DeprecationWarning) def warn_distutils_present(): if 'distutils' not in sys.modules...
28.263158
119
0.656824
import sys import os import re import importlib import warnings is_pypy = '__pypy__' in sys.builtin_module_names warnings.filterwarnings('ignore', r'.+ distutils\b.+ deprecated', DeprecationWarning) def warn_distutils_present(): if 'distutils' not in sys.modules...
true
true
f70742822966dd1f094d39360d4edf203161ebbe
2,033
py
Python
efls-console/console/resource/service.py
universe-hcy/Elastic-Federated-Learning-Solution
4e047fbbe6ae9809cd631499b7d3a3855dfe2208
[ "Apache-2.0" ]
65
2021-09-30T01:54:34.000Z
2022-03-26T13:57:15.000Z
efls-console/console/resource/service.py
universe-hcy/Elastic-Federated-Learning-Solution
4e047fbbe6ae9809cd631499b7d3a3855dfe2208
[ "Apache-2.0" ]
24
2021-09-30T09:25:43.000Z
2022-03-29T06:33:44.000Z
efls-console/console/resource/service.py
universe-hcy/Elastic-Federated-Learning-Solution
4e047fbbe6ae9809cd631499b7d3a3855dfe2208
[ "Apache-2.0" ]
18
2021-09-30T09:04:08.000Z
2022-03-31T10:17:27.000Z
# -*- coding: utf8 -*- import json from console.models import Resource, resource_repo from console.exceptions import NotFound, AlreadyExist, PermissionDenied from console.factory import logger class ResourceService: resource_repo = resource_repo def __init__(self, rid: str = None, task_intra_id: str = None...
36.303571
117
0.672897
import json from console.models import Resource, resource_repo from console.exceptions import NotFound, AlreadyExist, PermissionDenied from console.factory import logger class ResourceService: resource_repo = resource_repo def __init__(self, rid: str = None, task_intra_id: str = None, name: str = None): ...
true
true
f70743cd0111ce08d2a296554f294eea4d287785
1,453
py
Python
transform_mesh_w_4x4mat.py
likchuan/vtk_py
3ab28fb951af107d1b162b4be6a80ea79dbb6dcc
[ "MIT" ]
null
null
null
transform_mesh_w_4x4mat.py
likchuan/vtk_py
3ab28fb951af107d1b162b4be6a80ea79dbb6dcc
[ "MIT" ]
null
null
null
transform_mesh_w_4x4mat.py
likchuan/vtk_py
3ab28fb951af107d1b162b4be6a80ea79dbb6dcc
[ "MIT" ]
null
null
null
######################################################################## import sys import numpy import vtk from vtk_py import * ######################################################################## def transform_mesh_w_4x4mat(infilename, outfilename, matrix): ugrid = vtk.vtkUnstructuredGrid() if(infilename[l...
25.491228
72
0.668961
import sys import numpy import vtk from vtk_py import * def transform_mesh_w_4x4mat(infilename, outfilename, matrix): ugrid = vtk.vtkUnstructuredGrid() if(infilename[len(infilename)-4:len(infilename)] == ".vtu"): ugrid = readXMLUGrid(infilename) elif(infilename[len(infilename)-4:len(infilename)] == ".vtk"): ...
false
true
f70743d48387633092e6468a3ee10f04cbf592ae
3,799
py
Python
simple-harmonic-oscillator/gui/sho.py
guiltygyoza/rk4-starknet
76d3205a9c480be902066704abd8a2e0ff8ac7e9
[ "MIT" ]
18
2021-10-17T01:29:25.000Z
2022-02-04T03:33:03.000Z
simple-harmonic-oscillator/gui/sho.py
HZ2078/rk4-starknet
76d3205a9c480be902066704abd8a2e0ff8ac7e9
[ "MIT" ]
null
null
null
simple-harmonic-oscillator/gui/sho.py
HZ2078/rk4-starknet
76d3205a9c480be902066704abd8a2e0ff8ac7e9
[ "MIT" ]
4
2021-11-25T21:57:55.000Z
2022-03-29T03:17:46.000Z
import pygame, sys import numpy as np import subprocess import time import json from timeit import default_timer as timer # text box initialization def update_message (message): font = pygame.font.Font(None, 24) text = font.render(message, 1, (0, 0, 0)) text_rect = text.get_rect(center =(WIDTH / 2, HEIGHT-50)) scr...
26.943262
106
0.733088
import pygame, sys import numpy as np import subprocess import time import json from timeit import default_timer as timer def update_message (message): font = pygame.font.Font(None, 24) text = font.render(message, 1, (0, 0, 0)) text_rect = text.get_rect(center =(WIDTH / 2, HEIGHT-50)) screen.fill ((255,255,255), (...
true
true
f707449b00cb36d59a800350ebf6712735bf5f72
122
py
Python
DST/datasets/__init__.py
DunZhang/DomainSpecificThesaurus
539dcdbe618ade1864e56423667f28afb800e1e1
[ "MIT" ]
13
2019-02-21T23:16:55.000Z
2022-03-03T16:27:24.000Z
DST/datasets/__init__.py
EzioQR/DomainSpecificThesaurus
a7233b039e8e0d1250b9fc1ebe147deb02efb502
[ "MIT" ]
3
2021-04-28T11:49:20.000Z
2022-02-25T17:31:06.000Z
DST/datasets/__init__.py
EzioQR/DomainSpecificThesaurus
a7233b039e8e0d1250b9fc1ebe147deb02efb502
[ "MIT" ]
6
2019-02-23T16:01:36.000Z
2021-09-05T10:27:54.000Z
from ..datasets import CleanData,DownloadData # from .CleanData import cleanEngXml,cleanMathXml,CleanDataWiki,CleanDataSO
40.666667
75
0.860656
from ..datasets import CleanData,DownloadData
true
true
f70745fb4433febb663cfc4f6924bdf4b71efdcf
359
py
Python
app.py
bjongbloedt/menu
800b2045a28d1b3937ebefdda0b7a2ad45c09bb6
[ "MIT" ]
null
null
null
app.py
bjongbloedt/menu
800b2045a28d1b3937ebefdda0b7a2ad45c09bb6
[ "MIT" ]
1
2021-06-01T21:44:43.000Z
2021-06-01T21:44:43.000Z
app.py
bjongbloedt/menu
800b2045a28d1b3937ebefdda0b7a2ad45c09bb6
[ "MIT" ]
null
null
null
from apistar.backends import sqlalchemy_backend from apistar.frameworks.wsgi import WSGIApp as App from project.routes import routes from project.settings import settings app = App( routes=routes, settings=settings, commands=sqlalchemy_backend.commands, components=sqlalchemy_backend.components ) if ...
21.117647
50
0.777159
from apistar.backends import sqlalchemy_backend from apistar.frameworks.wsgi import WSGIApp as App from project.routes import routes from project.settings import settings app = App( routes=routes, settings=settings, commands=sqlalchemy_backend.commands, components=sqlalchemy_backend.components ) if ...
true
true
f707466d66d09b7bd0ac6ab4c68d70ddf32d14c9
6,794
py
Python
perfkitbenchmarker/providers/aws/flags.py
dongbinghua/PerfKitBenchmarker
d3424af4b4d60b4a5c19009b8aee29ceab7132d4
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/providers/aws/flags.py
dongbinghua/PerfKitBenchmarker
d3424af4b4d60b4a5c19009b8aee29ceab7132d4
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/providers/aws/flags.py
dongbinghua/PerfKitBenchmarker
d3424af4b4d60b4a5c19009b8aee29ceab7132d4
[ "Apache-2.0" ]
1
2022-02-20T14:46:56.000Z
2022-02-20T14:46:56.000Z
# Copyright 2015 PerfKitBenchmarker 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 appli...
53.920635
89
0.656609
from absl import flags from perfkitbenchmarker.providers.aws import util flags.DEFINE_string( 'aws_user_name', '', 'This determines the user name that Perfkit will ' 'attempt to use. Defaults are OS specific.') flags.DEFINE_integer('aws_provisioned_iops', None, 'IOPS for Provisioned IOPS ...
true
true
f70746b84258f285a896a73614aec7d279d5502b
145
py
Python
pedal/__main__.py
acbart/python-analysis
3cd2cc22d50a414ae6b62c74d2643be4742238d4
[ "MIT" ]
14
2019-08-22T03:40:23.000Z
2022-03-13T00:30:53.000Z
pedal/__main__.py
pedal-edu/pedal
3cd2cc22d50a414ae6b62c74d2643be4742238d4
[ "MIT" ]
74
2019-09-12T04:35:56.000Z
2022-01-26T19:21:32.000Z
pedal/__main__.py
acbart/python-analysis
3cd2cc22d50a414ae6b62c74d2643be4742238d4
[ "MIT" ]
2
2021-01-11T06:34:00.000Z
2021-07-21T12:48:07.000Z
""" Runs pedal as a toplevel module """ import sys from pedal.command_line.command_line import parse_args, main args = parse_args() main(args)
14.5
60
0.758621
import sys from pedal.command_line.command_line import parse_args, main args = parse_args() main(args)
true
true
f70746e2a0f4f5440fe577c9e2560ccce6a8d8da
1,709
py
Python
app/core/migrations/0001_initial.py
said017/satucan-app-api
cc4973aef3eeac2fd91e6b871480b6c0c5550d90
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
said017/satucan-app-api
cc4973aef3eeac2fd91e6b871480b6c0c5550d90
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
said017/satucan-app-api
cc4973aef3eeac2fd91e6b871480b6c0c5550d90
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2020-04-21 12:08 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', ...
50.264706
266
0.63897
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.Aut...
true
true
f70746e6dd5575877a660963cdcf29b89a4f5106
1,438
py
Python
pcat2py/class/2301f556-5cc5-11e4-af55-00155d01fe08.py
phnomcobra/PCAT2PY
937c3b365cdc5ac69b78f59070be0a21bdb53db0
[ "MIT" ]
null
null
null
pcat2py/class/2301f556-5cc5-11e4-af55-00155d01fe08.py
phnomcobra/PCAT2PY
937c3b365cdc5ac69b78f59070be0a21bdb53db0
[ "MIT" ]
null
null
null
pcat2py/class/2301f556-5cc5-11e4-af55-00155d01fe08.py
phnomcobra/PCAT2PY
937c3b365cdc5ac69b78f59070be0a21bdb53db0
[ "MIT" ]
null
null
null
#!/usr/bin/python ################################################################################ # 2301f556-5cc5-11e4-af55-00155d01fe08 # # Justin Dierking # justindierking@hardbitsolutions.com # phnomcobra@gmail.com # # 10/24/2014 Original Construction ################################################################...
37.842105
155
0.605007
class Finding: def __init__(self): self.output = [] self.is_compliant = False self.uuid = "2301f556-5cc5-11e4-af55-00155d01fe08" def check(self, cli): self.is_compliant = False dword = cli.get_reg_dword(r'HKLM:\Software\Policies\Microsoft\Intern...
true
true
f707477c13e4afcc374ebc5e785cec3cea21660d
3,708
py
Python
lib/galaxy/tool_util/cwl/cwltool_deps.py
patrice-dehais/galaxy
63ab54651ae2a65bd656b10302213085237a3b86
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/tool_util/cwl/cwltool_deps.py
patrice-dehais/galaxy
63ab54651ae2a65bd656b10302213085237a3b86
[ "CC-BY-3.0" ]
2
2017-05-18T16:12:55.000Z
2022-03-08T12:08:43.000Z
lib/galaxy/tool_util/cwl/cwltool_deps.py
patrice-dehais/galaxy
63ab54651ae2a65bd656b10302213085237a3b86
[ "CC-BY-3.0" ]
null
null
null
"""Logic for dealing with cwltool as an optional dependency. Use this as the import interface for cwltool and just call :func:`ensure_cwltool_available` before using any of the imported functionality at runtime. """ import re import warnings warnings.filterwarnings("ignore", message=r"[\n.]DEPRECATION: Python 2", mod...
28.96875
118
0.685275
import re import warnings warnings.filterwarnings("ignore", message=r"[\n.]DEPRECATION: Python 2", module="cwltool") import requests try: from cwltool import ( job, main, pathmapper, process, workflow, ) except ImportError: main = None workflow = None job...
true
true
f707493cff486a675ac1a9a45c41170b717423f0
1,004
py
Python
polls/models.py
ibowditch/polls
1428b87bf3a83c40083b0e248c1718a89078f11f
[ "MIT" ]
null
null
null
polls/models.py
ibowditch/polls
1428b87bf3a83c40083b0e248c1718a89078f11f
[ "MIT" ]
1
2021-06-10T21:51:24.000Z
2021-06-10T21:51:24.000Z
polls/models.py
ibowditch/polls
1428b87bf3a83c40083b0e248c1718a89078f11f
[ "MIT" ]
null
null
null
import datetime from django.db import models from django.utils import timezone # Create your models here. class Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') def __str__(self): return self.question_text def was_publ...
33.466667
73
0.721116
import datetime from django.db import models from django.utils import timezone class Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') def __str__(self): return self.question_text def was_published_recently(self): ...
true
true
f707494e82d8073d9df728440f3917ae002d3325
380
py
Python
tests/plugins/test_ard_live.py
xcgx/streamlink
b635e0d9d0fe9363817a96ec7d31faefed95cb57
[ "BSD-2-Clause" ]
10
2017-04-10T18:25:41.000Z
2021-09-15T20:14:58.000Z
tests/plugins/test_ard_live.py
xcgx/streamlink
b635e0d9d0fe9363817a96ec7d31faefed95cb57
[ "BSD-2-Clause" ]
9
2020-04-04T09:49:52.000Z
2020-04-21T01:52:02.000Z
tests/plugins/test_ard_live.py
xcgx/streamlink
b635e0d9d0fe9363817a96ec7d31faefed95cb57
[ "BSD-2-Clause" ]
12
2022-01-30T23:34:18.000Z
2022-03-26T17:09:43.000Z
from streamlink.plugins.ard_live import ARDLive from tests.plugins import PluginCanHandleUrl class TestPluginCanHandleUrlARDLive(PluginCanHandleUrl): __plugin__ = ARDLive should_match = [ 'https://daserste.de/live/index.html', 'https://www.daserste.de/live/index.html', ] should_not_m...
23.75
56
0.697368
from streamlink.plugins.ard_live import ARDLive from tests.plugins import PluginCanHandleUrl class TestPluginCanHandleUrlARDLive(PluginCanHandleUrl): __plugin__ = ARDLive should_match = [ 'https://daserste.de/live/index.html', 'https://www.daserste.de/live/index.html', ] should_not_m...
true
true
f70749ba117cc3eba7f524a371e92fe3e669750b
9,195
py
Python
gdc.py
mkol5222/ShiftLeftTraining-ImageScan
2ee75cd3637c6a3c0c4f6c8a7a17088b299e903d
[ "Apache-2.0" ]
null
null
null
gdc.py
mkol5222/ShiftLeftTraining-ImageScan
2ee75cd3637c6a3c0c4f6c8a7a17088b299e903d
[ "Apache-2.0" ]
null
null
null
gdc.py
mkol5222/ShiftLeftTraining-ImageScan
2ee75cd3637c6a3c0c4f6c8a7a17088b299e903d
[ "Apache-2.0" ]
1
2022-03-16T08:59:42.000Z
2022-03-16T08:59:42.000Z
#!/usr/bin/python3 import sys import json import os import getopt import ipaddress import uuid ip = '' function = '' gdc = None description = '' listofips = None if len(sys.argv) <= 4: print("Error - Format should be - gdc.py -g <Generic_Data_Center_N...
34.309701
174
0.588907
import sys import json import os import getopt import ipaddress import uuid ip = '' function = '' gdc = None description = '' listofips = None if len(sys.argv) <= 4: print("Error - Format should be - gdc.py -g <Generic_Data_Center_Name> -j <Json_File> -f <AddGDC/DelGDC/AddIP/DelIP> -i <ip> -d <GDC_Description>") ...
true
true
f7074a019eb3125fa22bf1609ead420d0cc2278e
3,374
py
Python
bert/wtfml/data_loaders/nlp/classification.py
jphacks/C_2111
df87580614d7e5c225ea30746e5f2cd0576bbc98
[ "MIT" ]
1
2021-10-19T07:10:16.000Z
2021-10-19T07:10:16.000Z
bert/wtfml/data_loaders/nlp/classification.py
jphacks/C_2111
df87580614d7e5c225ea30746e5f2cd0576bbc98
[ "MIT" ]
null
null
null
bert/wtfml/data_loaders/nlp/classification.py
jphacks/C_2111
df87580614d7e5c225ea30746e5f2cd0576bbc98
[ "MIT" ]
null
null
null
import pandas as pd import torch from transformers import BertJapaneseTokenizer from wtfml.data_loaders.nlp.utils import clean_sentence import transformers class BERTSimpleDataset: """ Dataset for bert which can accept clearning function """ def __init__(self, input_texts, target, clearning...
33.405941
80
0.602549
import pandas as pd import torch from transformers import BertJapaneseTokenizer from wtfml.data_loaders.nlp.utils import clean_sentence import transformers class BERTSimpleDataset: def __init__(self, input_texts, target, clearning_function=clean_sentence): if isinstance(input_texts, pd.Series): ...
true
true
f7074a14daec1b2c07974cf17dcc384aa1a40a51
2,763
py
Python
src/cec2017/utils.py
Evelkos/CellularEvolutionaryAlgorithm
9633337a00e20cb0c4d8a679e72755e165113468
[ "MIT" ]
null
null
null
src/cec2017/utils.py
Evelkos/CellularEvolutionaryAlgorithm
9633337a00e20cb0c4d8a679e72755e165113468
[ "MIT" ]
null
null
null
src/cec2017/utils.py
Evelkos/CellularEvolutionaryAlgorithm
9633337a00e20cb0c4d8a679e72755e165113468
[ "MIT" ]
null
null
null
# cec2017.utils # Author: Duncan Tilley # Additional functions for graphing and benchmarking def surface_plot(function, domain=(-100, 100), points=30, dimension=2, ax=None): """ Creates a surface plot of a function. Args: function (function): The objective function to be called at each point. ...
33.289157
80
0.624321
def surface_plot(function, domain=(-100, 100), points=30, dimension=2, ax=None): import matplotlib.pyplot as plt import numpy as np from mpl_toolkits import mplot3d xys = np.linspace(domain[0], domain[1], points) xys = np.transpose([np.tile(xys, len(xys)), np.repeat(xys, len(xys))]) zs = ...
true
true
f7074aeade807b1c32266500c292d635b2c2e6c5
4,326
py
Python
src/bookscripts/update_bigbook_toc.py
HootingYard/archive_management
448f15f74c035ef846e1a6f762e448d922744b9b
[ "CC0-1.0" ]
null
null
null
src/bookscripts/update_bigbook_toc.py
HootingYard/archive_management
448f15f74c035ef846e1a6f762e448d922744b9b
[ "CC0-1.0" ]
null
null
null
src/bookscripts/update_bigbook_toc.py
HootingYard/archive_management
448f15f74c035ef846e1a6f762e448d922744b9b
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 """ Create a new Table of Contents file (toc.xhtml) for The Big Book of Key. """ import re from argparse import ArgumentParser from datetime import datetime from pathlib import Path from typing import Dict, List from lxml.html import parse, fromstring, tostring, HtmlElement from copy import deep...
32.772727
110
0.626445
""" Create a new Table of Contents file (toc.xhtml) for The Big Book of Key. """ import re from argparse import ArgumentParser from datetime import datetime from pathlib import Path from typing import Dict, List from lxml.html import parse, fromstring, tostring, HtmlElement from copy import deepcopy class Settings: ...
false
true
f7074b3b1b22b3bd6da7e5ca01ce7e3d7f518bfc
8,049
py
Python
NT_UDA/demo_syn_atdoc.py
chamwen/NT-Benchmark
d5a17a07fdfa89d80d47843c35ecf3e078b94371
[ "MIT" ]
1
2022-03-21T16:30:40.000Z
2022-03-21T16:30:40.000Z
NT_UDA/demo_syn_atdoc.py
chamwen/NT-Benchmark
d5a17a07fdfa89d80d47843c35ecf3e078b94371
[ "MIT" ]
null
null
null
NT_UDA/demo_syn_atdoc.py
chamwen/NT-Benchmark
d5a17a07fdfa89d80d47843c35ecf3e078b94371
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # A Survey on Negative Transfer # https://github.com/chamwen/NT-Benchmark import numpy as np import argparse import os import torch as tr import torch.nn as nn import torch.optim as optim from utils import network, loss, utils from utils.network import calc_coeff from utils.dataloader import rea...
39.455882
120
0.653
import numpy as np import argparse import os import torch as tr import torch.nn as nn import torch.optim as optim from utils import network, loss, utils from utils.network import calc_coeff from utils.dataloader import read_syn_src_tar from utils.utils import lr_scheduler_full, fix_random_seed, add_label_noise_noimg fr...
true
true
f7074e5af3f28bfa6d2637e405fe9a2e435dfad9
9,020
py
Python
plot1.py
yangwenbo99/UNIQUE
50136f3169b82f20c8677f36c1b0882905b6d809
[ "Apache-2.0" ]
null
null
null
plot1.py
yangwenbo99/UNIQUE
50136f3169b82f20c8677f36c1b0882905b6d809
[ "Apache-2.0" ]
null
null
null
plot1.py
yangwenbo99/UNIQUE
50136f3169b82f20c8677f36c1b0882905b6d809
[ "Apache-2.0" ]
null
null
null
#!/bin/python3 ''' This file is to plot a graph with the following setting. 1. We first select an image x_0 2. We then add some pertubation to the image to get x_1 (its type shall configurable in the future, but we set it to be random or loaded from file currently) 3. Next, we plot f(x) for all x on the segment...
53.690476
480
0.708093
import argparse import TrainModel import scipy.io as sio import os import torch from PIL import Image import numpy as np import matplotlib.pyplot as plt from torchvision import transforms def parse_config(): parser = argparse.ArgumentParser() parser.add_argument('-x', '--img', type=str, help='the base image...
true
true
f7074ef9bdbaa19127201bdaec5ddd602f46976f
5,190
py
Python
apps/core/flask/errorhandler.py
yeayee/osroom
f7084843ea4b75505283f8b23da60471ba8fc9bb
[ "BSD-2-Clause" ]
1
2019-05-12T14:54:40.000Z
2019-05-12T14:54:40.000Z
apps/core/flask/errorhandler.py
yeayee/osroom
f7084843ea4b75505283f8b23da60471ba8fc9bb
[ "BSD-2-Clause" ]
null
null
null
apps/core/flask/errorhandler.py
yeayee/osroom
f7084843ea4b75505283f8b23da60471ba8fc9bb
[ "BSD-2-Clause" ]
null
null
null
# -*-coding:utf-8-*- import os from flask import request, render_template, g from flask_babel import gettext from flask_wtf.csrf import CSRFError from werkzeug.utils import redirect from apps.configs.sys_config import DEFAULT_ADMIN_LOGIN_PAGE from apps.core.auth.rest_token_auth import OsrTokenError, SecretTokenError, ...
32.848101
92
0.57052
import os from flask import request, render_template, g from flask_babel import gettext from flask_wtf.csrf import CSRFError from werkzeug.utils import redirect from apps.configs.sys_config import DEFAULT_ADMIN_LOGIN_PAGE from apps.core.auth.rest_token_auth import OsrTokenError, SecretTokenError, AccessTokenError from...
true
true
f7074f6dc108471ef2eb2a8ca7d691c95319e32d
31,569
py
Python
src/3rdparty/torrent-rasterbar/docs/gen_reference_doc.py
herokukuki/ydyd
942a98158e139f0bb00a837b762492bdaaffb94c
[ "MIT" ]
null
null
null
src/3rdparty/torrent-rasterbar/docs/gen_reference_doc.py
herokukuki/ydyd
942a98158e139f0bb00a837b762492bdaaffb94c
[ "MIT" ]
null
null
null
src/3rdparty/torrent-rasterbar/docs/gen_reference_doc.py
herokukuki/ydyd
942a98158e139f0bb00a837b762492bdaaffb94c
[ "MIT" ]
null
null
null
#!/usr/bin/env python import glob import os import sys verbose = '--verbose' in sys.argv dump = '--dump' in sys.argv internal = '--internal' in sys.argv plain_output = '--plain-output' in sys.argv if plain_output: plain_file = open('plain_text_out.txt', 'w+') in_code = None paths = ['include/libtorrent/*.hpp', 'inc...
26.913043
146
0.585068
import glob import os import sys verbose = '--verbose' in sys.argv dump = '--dump' in sys.argv internal = '--internal' in sys.argv plain_output = '--plain-output' in sys.argv if plain_output: plain_file = open('plain_text_out.txt', 'w+') in_code = None paths = ['include/libtorrent/*.hpp', 'include/libtorrent/kademl...
false
true
f7074f86527ff43cd05a3deae7642e669561ed3a
352
py
Python
quotes/views.py
k4rtik/alpo
2afffd62ccbc5865493b28bfc6926a8bea7dcf9a
[ "MIT" ]
null
null
null
quotes/views.py
k4rtik/alpo
2afffd62ccbc5865493b28bfc6926a8bea7dcf9a
[ "MIT" ]
null
null
null
quotes/views.py
k4rtik/alpo
2afffd62ccbc5865493b28bfc6926a8bea7dcf9a
[ "MIT" ]
null
null
null
from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.core.urlresolvers import reverse_lazy from quotes.models import Quote class QuoteCreate(CreateView): model = Quote class QuoteUpdate(UpdateView): model = Quote class QuoteDelete(DeleteView): model = Quote success_url...
25.142857
72
0.78125
from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.core.urlresolvers import reverse_lazy from quotes.models import Quote class QuoteCreate(CreateView): model = Quote class QuoteUpdate(UpdateView): model = Quote class QuoteDelete(DeleteView): model = Quote success_url...
true
true
f70750abed121bc2185c541e75504692681bdb2b
49,723
py
Python
django/db/models/sql/compiler.py
makinacorpus/django
3632d289dedc2e83cde1976e5a4cd00b08c799ee
[ "BSD-3-Clause" ]
null
null
null
django/db/models/sql/compiler.py
makinacorpus/django
3632d289dedc2e83cde1976e5a4cd00b08c799ee
[ "BSD-3-Clause" ]
null
null
null
django/db/models/sql/compiler.py
makinacorpus/django
3632d289dedc2e83cde1976e5a4cd00b08c799ee
[ "BSD-3-Clause" ]
null
null
null
import datetime from django.conf import settings from django.core.exceptions import FieldError from django.db.backends.util import truncate_name from django.db.models.constants import LOOKUP_SEP from django.db.models.query_utils import select_related_descend, QueryWrapper from django.db.models.sql.constants import (SI...
44.395536
136
0.577761
import datetime from django.conf import settings from django.core.exceptions import FieldError from django.db.backends.util import truncate_name from django.db.models.constants import LOOKUP_SEP from django.db.models.query_utils import select_related_descend, QueryWrapper from django.db.models.sql.constants import (SI...
true
true
f707512dbcc6d2e4322e81a713e62fad09555c31
283
py
Python
kolibri/tasks/permissions.py
rtibbles/kolibri
7efdf0497738c793f281013f9913f8ecc1a55f10
[ "MIT" ]
null
null
null
kolibri/tasks/permissions.py
rtibbles/kolibri
7efdf0497738c793f281013f9913f8ecc1a55f10
[ "MIT" ]
7
2016-06-23T16:01:02.000Z
2018-12-01T22:15:13.000Z
kolibri/tasks/permissions.py
MingDai/kolibri
e4719b7d41a40e0cc9fc4150bc137017643fea62
[ "MIT" ]
1
2021-06-01T23:15:26.000Z
2021-06-01T23:15:26.000Z
from rest_framework.permissions import BasePermission class IsDeviceOwnerOnly(BasePermission): def has_permission(self, request, view): return request.user.is_superuser def has_object_permission(self, request, view, obj): return request.user.is_superuser
25.727273
56
0.766784
from rest_framework.permissions import BasePermission class IsDeviceOwnerOnly(BasePermission): def has_permission(self, request, view): return request.user.is_superuser def has_object_permission(self, request, view, obj): return request.user.is_superuser
true
true
f707513df08df3e3ef4db3b743256ac0e7b4dd65
13,413
py
Python
lib/datasets/dist_fake.py
AlexErfan/Image_manipulation_detection
f07008b86112ae7d40a3728c715c53b6054ecc70
[ "MIT" ]
null
null
null
lib/datasets/dist_fake.py
AlexErfan/Image_manipulation_detection
f07008b86112ae7d40a3728c715c53b6054ecc70
[ "MIT" ]
null
null
null
lib/datasets/dist_fake.py
AlexErfan/Image_manipulation_detection
f07008b86112ae7d40a3728c715c53b6054ecc70
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Peng Zhou # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from ...
35.672872
104
0.600239
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from lib.datasets.imdb import imdb import lib.datasets.ds_utils as ds_utils import numpy as np import scipy.sparse import scipy.io as sio import lib.utils.cython_bbox import pickle import subprocess i...
true
true
f707518f375e2f34b650d7b3d43ac6c81aa6942b
3,263
py
Python
data/tools/download.py
leonnnop/VAR
59be66371e9a8a8a3e239cb5bdb1cf7ac8e86cae
[ "MIT" ]
6
2022-03-25T20:52:23.000Z
2022-03-30T11:38:52.000Z
data/tools/download.py
leonnnop/VAR
59be66371e9a8a8a3e239cb5bdb1cf7ac8e86cae
[ "MIT" ]
null
null
null
data/tools/download.py
leonnnop/VAR
59be66371e9a8a8a3e239cb5bdb1cf7ac8e86cae
[ "MIT" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. # This scripts is copied from # https://github.com/activitynet/ActivityNet/blob/master/Crawler/Kinetics/download.py # noqa: E501 # The code is licensed under the MIT licence. import argparse import os import ssl import subprocess import mmcv from joblib import Parallel,...
32.959596
99
0.644192
import argparse import os import ssl import subprocess import mmcv from joblib import Parallel, delayed ssl._create_default_https_context = ssl._create_unverified_context data_file = './data' output_dir = f'{data_file}/videos' def download_clip(video_identifier, output_filename, ...
true
true
f70752ebca45f492453c7c567e68c3544ba9c320
4,130
py
Python
plugins/modules/oci_container_engine_cluster_migrate_to_native_vcn_status_facts.py
sagar2938/oci-ansible-collection
5b8ce583a0d5d0aabf14494d61aea4649e18d1e6
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_container_engine_cluster_migrate_to_native_vcn_status_facts.py
sagar2938/oci-ansible-collection
5b8ce583a0d5d0aabf14494d61aea4649e18d1e6
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_container_engine_cluster_migrate_to_native_vcn_status_facts.py
sagar2938/oci-ansible-collection
5b8ce583a0d5d0aabf14494d61aea4649e18d1e6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
28.680556
114
0.715012
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_container_engine_cluster_migrate_to_native_vcn_status_facts short_description: ...
true
true
f707533305b80bf36cdd6ae41ab2b2aee1f24d73
216
py
Python
Domains/Python/04 - Sets/Introduction to Sets/solution.py
abhinavgunwant/hackerrank-solutions
e016366cb6a9fac562a754d2b230fef907080733
[ "MIT" ]
1
2019-06-09T00:04:56.000Z
2019-06-09T00:04:56.000Z
Domains/Python/04 - Sets/Introduction to Sets/solution.py
abhinavgunwant/hackerrank-solutions
e016366cb6a9fac562a754d2b230fef907080733
[ "MIT" ]
19
2019-06-09T14:45:52.000Z
2019-06-17T18:52:53.000Z
Domains/Python/04 - Sets/Introduction to Sets/solution.py
abhinavgunwant/hackerrank-solutions
e016366cb6a9fac562a754d2b230fef907080733
[ "MIT" ]
null
null
null
def average(array): array = list(set(array)) return sum(array)/len(array) if __name__ == '__main__': n = int(input()) arr = list(map(int, input().split())) result = average(arr) print(result)
24
41
0.606481
def average(array): array = list(set(array)) return sum(array)/len(array) if __name__ == '__main__': n = int(input()) arr = list(map(int, input().split())) result = average(arr) print(result)
true
true
f70753e6a5e249323b5a318751b32afa0841e720
2,588
py
Python
app.py
irvingpop/mode_wle_signer
8d0789620d847155388f3713c2eaf4a39b6d35a5
[ "Apache-2.0" ]
null
null
null
app.py
irvingpop/mode_wle_signer
8d0789620d847155388f3713c2eaf4a39b6d35a5
[ "Apache-2.0" ]
null
null
null
app.py
irvingpop/mode_wle_signer
8d0789620d847155388f3713c2eaf4a39b6d35a5
[ "Apache-2.0" ]
null
null
null
#!env python3 from flask import Flask, request, redirect from hashlib import sha256 import hmac import base64 import time import urllib # allow for relative importing if run directly if __name__ == "__main__": from config import secrets, reports, listen_port else: from .config import secrets, reports, listen_p...
31.950617
97
0.645672
from flask import Flask, request, redirect from hashlib import sha256 import hmac import base64 import time import urllib if __name__ == "__main__": from config import secrets, reports, listen_port else: from .config import secrets, reports, listen_port app = Flask(__name__) @app.route('/report/<report>') d...
true
true
f7075484bbedf4f8ffddb00ba857491fd45e88a6
52,253
py
Python
pysnmp/CISCO-DYNAMIC-TEMPLATE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-DYNAMIC-TEMPLATE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-DYNAMIC-TEMPLATE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-DYNAMIC-TEMPLATE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-DYNAMIC-TEMPLATE-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:39:09 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version ...
159.795107
6,565
0.756952
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.impo...
true
true
f70754ec00e8abe2a03b841fcbe112a86736ab17
16,591
py
Python
examples/demo_optim_data_preproc..py
andrerubeis/AIF360
c0ce6f2e3eff9cab0ccce0bc0a05b681a5df7e44
[ "Apache-2.0" ]
null
null
null
examples/demo_optim_data_preproc..py
andrerubeis/AIF360
c0ce6f2e3eff9cab0ccce0bc0a05b681a5df7e44
[ "Apache-2.0" ]
null
null
null
examples/demo_optim_data_preproc..py
andrerubeis/AIF360
c0ce6f2e3eff9cab0ccce0bc0a05b681a5df7e44
[ "Apache-2.0" ]
null
null
null
# %% md #### This notebook demonstrates the use of an optimized data pre-processing algorithm for bias mitigation # - The # debiasing # function # used is implemented in the # `OptimPreproc` # # class . # - Define # parameters # for optimized pre - processing specific to the dataset. # # # - Divide # the...
29.056042
148
0.710807
import sys sys.path.append("../") import numpy as np from tqdm import tqdm from aif360.datasets import BinaryLabelDataset from aif360.datasets import AdultDataset, GermanDataset, CompasDataset from aif360.metrics import BinaryLabelDatasetMetric from aif360.metrics import ClassificationMetric from aif360.metrics...
true
true
f70754f9689e79c241fc94176e86570974ac06ea
257
py
Python
alarm_client/contracts/payment_lib.py
StephenCleary/ethereum-alarm-clock
73547223b2021638b85e9f5ac2aaff18179598f7
[ "MIT" ]
1
2018-01-26T08:00:19.000Z
2018-01-26T08:00:19.000Z
alarm_client/contracts/payment_lib.py
ethereum-alarm-clock/alarm_client
021a8562e4ea2e8cfdb6467a8fd6647dbc37ad70
[ "MIT" ]
null
null
null
alarm_client/contracts/payment_lib.py
ethereum-alarm-clock/alarm_client
021a8562e4ea2e8cfdb6467a8fd6647dbc37ad70
[ "MIT" ]
1
2020-06-15T00:57:09.000Z
2020-06-15T00:57:09.000Z
from web3.contract import Contract class PaymentLibFactory(Contract): pass def get_payment_lib(web3, address, abi): return web3.eth.contract( abi=abi, address=address, base_contract_factory_class=PaymentLibFactory, )
18.357143
54
0.70428
from web3.contract import Contract class PaymentLibFactory(Contract): pass def get_payment_lib(web3, address, abi): return web3.eth.contract( abi=abi, address=address, base_contract_factory_class=PaymentLibFactory, )
true
true
f70757d7bdfc0ab8838b02e00a6c5244badb871a
4,290
py
Python
redi/utils/redcap_records.py
nrejack/redi
51dea9a217d52fec278adba2fb794fa7620f9ba7
[ "BSD-3-Clause" ]
7
2015-07-16T03:03:24.000Z
2021-02-05T14:26:32.000Z
redi/utils/redcap_records.py
nrejack/redi
51dea9a217d52fec278adba2fb794fa7620f9ba7
[ "BSD-3-Clause" ]
87
2015-01-08T16:21:47.000Z
2021-12-22T14:37:53.000Z
redi/utils/redcap_records.py
nrejack/redi
51dea9a217d52fec278adba2fb794fa7620f9ba7
[ "BSD-3-Clause" ]
15
2015-04-01T19:05:55.000Z
2021-03-02T22:23:16.000Z
#!/usr/bin/env python # Contributors: # Christopher P. Barnes <senrabc@gmail.com> # Andrei Sura: github.com/indera # Mohan Das Katragadda <mohan.das142@gmail.com> # Philip Chase <philipbchase@gmail.com> # Ruchi Vivek Desai <ruchivdesai@gmail.com> # Taeber Rapczak <taeber@ufl.edu> # Nicholas Rejack <nrejack@ufl.edu> # ...
32.255639
109
0.598601
import sys import argparse import json from redcap import Project, RedcapError def main(): parser = argparse.ArgumentParser( description='Read some data from a REDCap Project') parser.add_argument( '--token', dest='token', default='', required=True, help='Spec...
false
true
f7075980c08b471b1e04c09cbf6cc53a6847bdb7
8,771
py
Python
modules/extractors/pdfUtils.py
rotsee/protokollen
a001a1db86df57adcf5c53c95c4c2fae426340f1
[ "MIT", "Apache-2.0", "CC0-1.0", "Unlicense" ]
4
2015-03-22T20:23:36.000Z
2015-12-09T14:31:34.000Z
modules/extractors/pdfUtils.py
rotsee/protokollen
a001a1db86df57adcf5c53c95c4c2fae426340f1
[ "MIT", "Apache-2.0", "CC0-1.0", "Unlicense" ]
4
2015-03-24T10:42:00.000Z
2016-06-21T08:44:01.000Z
modules/extractors/pdfUtils.py
rotsee/protokollen
a001a1db86df57adcf5c53c95c4c2fae426340f1
[ "MIT", "Apache-2.0", "CC0-1.0", "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """Various helper methods for PDF extraction. """ # This file contains mostly unused leftovers from pdf.py. class Stream (object): """Wrapper around PdfMiner's stream class""" def __init__(self, stream): self.stream = stream def get(self, attribute): """Returns a...
34.128405
86
0.555581
class Stream (object): def __init__(self, stream): self.stream = stream def get(self, attribute): try: value = self.stream[attribute] return str(value).strip("/_").lower() except Exception: return None
true
true
f7075a14af26e3ded7e37c9d092ce1308362cd4b
129
py
Python
yourName2.py
pazyko/python_home
1e13a4d540ea56dd710d583aeea061a984d3fd7a
[ "Apache-2.0" ]
null
null
null
yourName2.py
pazyko/python_home
1e13a4d540ea56dd710d583aeea061a984d3fd7a
[ "Apache-2.0" ]
null
null
null
yourName2.py
pazyko/python_home
1e13a4d540ea56dd710d583aeea061a984d3fd7a
[ "Apache-2.0" ]
null
null
null
while True: print('Plese type your name') name=input() if name=='your name': break print('Thank you!')
18.428571
34
0.55814
while True: print('Plese type your name') name=input() if name=='your name': break print('Thank you!')
true
true
f7075b8078b2571e410054d686ba1e825a4bb608
1,193
py
Python
scripts/cleanup_datasets/populate_uuid.py
blankenberg/galaxy-data-resource
ca32a1aafd64948f489a4e5cf88096f32391b1d9
[ "CC-BY-3.0" ]
null
null
null
scripts/cleanup_datasets/populate_uuid.py
blankenberg/galaxy-data-resource
ca32a1aafd64948f489a4e5cf88096f32391b1d9
[ "CC-BY-3.0" ]
1
2015-02-21T18:48:19.000Z
2015-02-27T15:50:32.000Z
scripts/cleanup_datasets/populate_uuid.py
blankenberg/galaxy-data-resource
ca32a1aafd64948f489a4e5cf88096f32391b1d9
[ "CC-BY-3.0" ]
3
2015-02-22T13:34:16.000Z
2020-10-01T01:28:04.000Z
#!/usr/bin/env python """ Populates blank uuid fields in datasets with randomly generated values Going forward, these ids will be generated for all new datasets. This script fixes datasets that were generated before the change. """ import sys, os, ConfigParser import galaxy.app from galaxy.util.bunch import Bunch im...
25.934783
77
0.683152
""" Populates blank uuid fields in datasets with randomly generated values Going forward, these ids will be generated for all new datasets. This script fixes datasets that were generated before the change. """ import sys, os, ConfigParser import galaxy.app from galaxy.util.bunch import Bunch import galaxy.datatypes....
false
true
f7075d8698b9baf537da574e190efb77bafe24e9
18,834
py
Python
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/global_/lsp_bit/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
64
2016-10-20T15:47:18.000Z
2021-11-11T11:57:32.000Z
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/global_/lsp_bit/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
126
2016-10-05T10:36:14.000Z
2019-05-15T08:43:23.000Z
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/global_/lsp_bit/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
63
2016-11-07T15:23:08.000Z
2021-09-22T14:41:16.000Z
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
39.734177
395
0.613359
from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListType from pyangbind.lib.ya...
true
true
f7075e0814a6b52830ec7abfbaab90ad9441a256
732
py
Python
load_pkl_model.py
Rayaction/ECO-paddle
28c9adf0f6626dd8d262848fd6a2d7147e76048e
[ "MIT" ]
null
null
null
load_pkl_model.py
Rayaction/ECO-paddle
28c9adf0f6626dd8d262848fd6a2d7147e76048e
[ "MIT" ]
null
null
null
load_pkl_model.py
Rayaction/ECO-paddle
28c9adf0f6626dd8d262848fd6a2d7147e76048e
[ "MIT" ]
null
null
null
import pickle import sys sys.path.append("..") from model import ECO import paddle.fluid as fluid # Load pickle, since pretrained model is too bigger than the threshold(150M), split them into 2 parts and then reload them f0 = open('seg0.pkl', 'rb') f1 = open('seg1.pkl', 'rb') model_out = dict() model_0 = p...
31.826087
123
0.714481
import pickle import sys sys.path.append("..") from model import ECO import paddle.fluid as fluid f0 = open('seg0.pkl', 'rb') f1 = open('seg1.pkl', 'rb') model_out = dict() model_0 = pickle.load(f0) model_1 = pickle.load(f1) for i,key in enumerate(model_0): model_out[key]=model_0[key] for i,key in e...
true
true
f7075e0f367ebcead4beaff14fec4bae9eb78f51
2,959
py
Python
patron/tests/unit/cert/test_rpcapi.py
casbin/openstack-patron
b41b1262f3a52c8cc9f6b6bdf87be5a1abcf6d25
[ "Apache-2.0" ]
null
null
null
patron/tests/unit/cert/test_rpcapi.py
casbin/openstack-patron
b41b1262f3a52c8cc9f6b6bdf87be5a1abcf6d25
[ "Apache-2.0" ]
null
null
null
patron/tests/unit/cert/test_rpcapi.py
casbin/openstack-patron
b41b1262f3a52c8cc9f6b6bdf87be5a1abcf6d25
[ "Apache-2.0" ]
null
null
null
# Copyright 2012, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
34.811765
78
0.6634
import contextlib import mock from oslo_config import cfg from patron.cert import rpcapi as cert_rpcapi from patron import context from patron import test CONF = cfg.CONF class CertRpcAPITestCase(test.NoDBTestCase): def _test_cert_api(self, method, **kwargs): ctxt = context.RequestContext('fake_user'...
true
true
f7075e944abb59672f7df904d36157a6ba3e5bfa
1,750
py
Python
otp/level/LevelMgr.py
LittleNed/toontown-stride
1252a8f9a8816c1810106006d09c8bdfe6ad1e57
[ "Apache-2.0" ]
3
2020-01-02T08:43:36.000Z
2020-07-05T08:59:02.000Z
otp/level/LevelMgr.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
null
null
null
otp/level/LevelMgr.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
4
2019-06-20T23:45:23.000Z
2020-10-14T20:30:15.000Z
from toontown.toonbase.ToonPythonUtil import Functor from otp.level import LevelMgrBase class LevelMgr(LevelMgrBase.LevelMgrBase): def __init__(self, level, entId): LevelMgrBase.LevelMgrBase.__init__(self, level, entId) self.geom = loader.loadModel(self.modelFilename) if not self.geom: ...
37.234043
100
0.668
from toontown.toonbase.ToonPythonUtil import Functor from otp.level import LevelMgrBase class LevelMgr(LevelMgrBase.LevelMgrBase): def __init__(self, level, entId): LevelMgrBase.LevelMgrBase.__init__(self, level, entId) self.geom = loader.loadModel(self.modelFilename) if not self.geom: ...
true
true
f7075fe574053a5b93e97ee37753e0601d4ae576
1,708
py
Python
src/pwmio.py
domdfcoding/Adafruit_Blinka
8a25ee484e7aed8c58e4366b3fca78083bc61422
[ "MIT" ]
294
2018-06-30T19:08:27.000Z
2022-03-26T21:08:47.000Z
src/pwmio.py
domdfcoding/Adafruit_Blinka
8a25ee484e7aed8c58e4366b3fca78083bc61422
[ "MIT" ]
421
2018-06-30T20:54:46.000Z
2022-03-31T15:08:37.000Z
src/pwmio.py
domdfcoding/Adafruit_Blinka
8a25ee484e7aed8c58e4366b3fca78083bc61422
[ "MIT" ]
234
2018-07-23T18:49:16.000Z
2022-03-28T16:59:48.000Z
""" `pwmio` - Support for PWM based protocols =========================================================== See `CircuitPython:pwmio` in CircuitPython for more details. Not supported by all boards. * Author(s): Melissa LeBlanc-Williams """ import sys from adafruit_blinka.agnostic import detector # pylint: disable=unu...
37.130435
81
0.792155
import sys from adafruit_blinka.agnostic import detector if detector.board.any_raspberry_pi: from adafruit_blinka.microcontroller.bcm283x.pulseio.PWMOut import PWMOut elif detector.board.any_coral_board: from adafruit_blinka.microcontroller.generic_linux.sysfs_pwmout import PWMOut elif detector.board.any_gi...
true
true
f7075ff2b3abe58c51e44cf54aa559f3bfa6ae2f
1,295
py
Python
CV/migrations/0005_auto_20180903_1348.py
bdribault/Perso
cdf115f5901a845adc6222eddfbda9536847dad0
[ "MIT" ]
null
null
null
CV/migrations/0005_auto_20180903_1348.py
bdribault/Perso
cdf115f5901a845adc6222eddfbda9536847dad0
[ "MIT" ]
null
null
null
CV/migrations/0005_auto_20180903_1348.py
bdribault/Perso
cdf115f5901a845adc6222eddfbda9536847dad0
[ "MIT" ]
null
null
null
# Generated by Django 2.1.1 on 2018-09-03 13:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('CV', '0004_auto_20180903_1229'), ] operations = [ migrations.RemoveField( model_name='cv', name='availability_string...
34.078947
161
0.577606
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('CV', '0004_auto_20180903_1229'), ] operations = [ migrations.RemoveField( model_name='cv', name='availability_string', ), migrations.AddField( ...
true
true
f70760e9efe6724016ed206729de4193cdbba1e9
482
py
Python
Examples/Session08/properties_example.py
Sharmila8/intropython2016
a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479
[ "Unlicense" ]
null
null
null
Examples/Session08/properties_example.py
Sharmila8/intropython2016
a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479
[ "Unlicense" ]
null
null
null
Examples/Session08/properties_example.py
Sharmila8/intropython2016
a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python """ Example code for properties NOTE: if your getters and setters are this simple: don't do this! """ class C: def __init__(self): self._x = None @property def x(self): print("in getter") return self._x @x.setter def x(self, value): print("i...
15.548387
65
0.549793
class C: def __init__(self): self._x = None @property def x(self): print("in getter") return self._x @x.setter def x(self, value): print("in setter", value) self._x = value @x.deleter def x(self): del self._x if __name__ == "__main__": ...
true
true
f707625de59843ab74eaddf4cd84de3a68dd5c75
933
py
Python
chocs/middleware/application_middleware.py
danballance/chocs
8a64ce47d98ec327ce709b46c6389c5c627f4157
[ "MIT" ]
null
null
null
chocs/middleware/application_middleware.py
danballance/chocs
8a64ce47d98ec327ce709b46c6389c5c627f4157
[ "MIT" ]
null
null
null
chocs/middleware/application_middleware.py
danballance/chocs
8a64ce47d98ec327ce709b46c6389c5c627f4157
[ "MIT" ]
null
null
null
from chocs.http_error import HttpError from chocs.http_request import HttpRequest from chocs.http_response import HttpResponse from chocs.routing import Router from chocs.serverless.serverless import ServerlessFunction from .middleware import Middleware, MiddlewareHandler class ApplicationMiddleware(Middleware): ...
31.1
84
0.706324
from chocs.http_error import HttpError from chocs.http_request import HttpRequest from chocs.http_response import HttpResponse from chocs.routing import Router from chocs.serverless.serverless import ServerlessFunction from .middleware import Middleware, MiddlewareHandler class ApplicationMiddleware(Middleware): ...
true
true
f7076503a185e2d56681d0575d10cc00c4ccc108
4,397
py
Python
hw4/libs/new_isomap.py
ardihikaru/mlsp
db38972bcceac7b95808132457c4de9170546c9d
[ "Apache-2.0" ]
null
null
null
hw4/libs/new_isomap.py
ardihikaru/mlsp
db38972bcceac7b95808132457c4de9170546c9d
[ "Apache-2.0" ]
null
null
null
hw4/libs/new_isomap.py
ardihikaru/mlsp
db38972bcceac7b95808132457c4de9170546c9d
[ "Apache-2.0" ]
1
2020-01-07T14:25:54.000Z
2020-01-07T14:25:54.000Z
# Source: https://github.com/tracy-talent/curriculum/blob/ecaf850cb7932f23b5d7c0323e80a9f9a408bef6/Machine%20Learning/Dimension%20Reduction/src/ISOMAP.py from numpy import * from hw4.libs.metrics import _1NN from queue import PriorityQueue from os import path import time def loadData(filename): content = open(fi...
36.641667
153
0.643848
from numpy import * from hw4.libs.metrics import _1NN from queue import PriorityQueue from os import path import time def loadData(filename): content = open(filename).readlines() data = [list(map(float32, line.strip().split(",")[:-1])) for line in content] tag = [list(map(int, line.strip().split(",")...
true
true
f7076571e1f2a78d4b8409e2ded824ce37f2f625
956
gyp
Python
binding.gyp
Calyhre/node-simconnect
076e5725e735a3f81989412c0a9024685daf440c
[ "MIT" ]
65
2017-07-31T09:46:31.000Z
2022-02-24T07:00:17.000Z
binding.gyp
Calyhre/node-simconnect
076e5725e735a3f81989412c0a9024685daf440c
[ "MIT" ]
29
2017-07-31T14:39:26.000Z
2022-02-21T16:41:17.000Z
binding.gyp
Calyhre/node-simconnect
076e5725e735a3f81989412c0a9024685daf440c
[ "MIT" ]
26
2018-01-04T15:11:26.000Z
2022-03-18T02:21:03.000Z
{ "targets": [ { "target_name": "node-simconnect", "sources": [ "src/addon.cc" ], "include_dirs": [ "SimConnect/Inc", "<!(node -e \"require('nan')\")" ], "link_settings": { "libraries": [ "../...
26.555556
64
0.264644
{ "targets": [ { "target_name": "node-simconnect", "sources": [ "src/addon.cc" ], "include_dirs": [ "SimConnect/Inc", "<!(node -e \"require('nan')\")" ], "link_settings": { "libraries": [ "../...
true
true
f70765eebcf4a1048f40d5dbf0d0748b1d2c2301
1,654
py
Python
flavio/physics/quarkonium/test_Vllgamma.py
micha-a-schmidt/flavio
fb89a11cdf45e536f2d72de8a4a2657130c4e09f
[ "MIT" ]
null
null
null
flavio/physics/quarkonium/test_Vllgamma.py
micha-a-schmidt/flavio
fb89a11cdf45e536f2d72de8a4a2657130c4e09f
[ "MIT" ]
null
null
null
flavio/physics/quarkonium/test_Vllgamma.py
micha-a-schmidt/flavio
fb89a11cdf45e536f2d72de8a4a2657130c4e09f
[ "MIT" ]
1
2017-11-09T01:40:01.000Z
2017-11-09T01:40:01.000Z
import unittest import flavio from wilson import Wilson from .Vllgamma import * ### implement test class TestVllgamma(unittest.TestCase): def test_np(self): wc,br=Wilson({'CVRR_muecc' : 1e-2},scale=2.,eft='WET',basis='flavio'),8.3949e-6 self.assertAlmostEqual(flavio.np_prediction('BR(J/psi->muegamm...
66.16
182
0.688029
import unittest import flavio from wilson import Wilson from .Vllgamma import * class TestVllgamma(unittest.TestCase): def test_np(self): wc,br=Wilson({'CVRR_muecc' : 1e-2},scale=2.,eft='WET',basis='flavio'),8.3949e-6 self.assertAlmostEqual(flavio.np_prediction('BR(J/psi->muegamma)',wc), br,delta=0...
true
true
f70767d3f96b19adf3ea0ed6cd5cce120227f4e4
9,733
py
Python
selfdrive/controls/radard.py
Chrispreilly/openpilot-2012camryhybrid_archive
33b737375e75f2005736a1469d4c42126e754886
[ "MIT" ]
null
null
null
selfdrive/controls/radard.py
Chrispreilly/openpilot-2012camryhybrid_archive
33b737375e75f2005736a1469d4c42126e754886
[ "MIT" ]
1
2021-03-25T22:43:31.000Z
2021-03-25T22:43:31.000Z
selfdrive/controls/radard.py
Chrispreilly/openpilot-2012camryhybrid_archive
33b737375e75f2005736a1469d4c42126e754886
[ "MIT" ]
null
null
null
#!/usr/bin/env python import zmq import numpy as np import numpy.matlib import importlib from collections import defaultdict from fastcluster import linkage_vector import selfdrive.messaging as messaging from selfdrive.services import service_list from selfdrive.controls.lib.latcontrol_helpers import calc_lookahead_off...
33.912892
145
0.661358
import zmq import numpy as np import numpy.matlib import importlib from collections import defaultdict from fastcluster import linkage_vector import selfdrive.messaging as messaging from selfdrive.services import service_list from selfdrive.controls.lib.latcontrol_helpers import calc_lookahead_offset from selfdrive.con...
false
true
f7076853ea2f7368c6eda5ddd044c690d7cb536a
4,748
py
Python
seqgra/seqgras.py
gifford-lab/seqgra
3c7547878ecda4c00572746b8a07e0d614c9dbef
[ "MIT" ]
null
null
null
seqgra/seqgras.py
gifford-lab/seqgra
3c7547878ecda4c00572746b8a07e0d614c9dbef
[ "MIT" ]
null
null
null
seqgra/seqgras.py
gifford-lab/seqgra
3c7547878ecda4c00572746b8a07e0d614c9dbef
[ "MIT" ]
2
2021-06-14T20:27:40.000Z
2021-06-14T20:29:29.000Z
#!/usr/bin/env python """MIT - CSAIL - Gifford Lab - seqgra seqgra complete pipeline: 1. generate data based on data definition (once), see run_simulator.py 2. train model on data (once), see run_learner.py 3. evaluate model performance with SIS, see run_sis.py @author: Konstantin Krismer """ import argparse import...
29.861635
78
0.566344
import argparse import logging import os from typing import List, Optional import seqgra import seqgra.constants as c from seqgra import MiscHelper from seqgra.comparator import Comparator from seqgra.idresolver import IdResolver def get_all_grammar_ids(output_dir: str) -> List[str]: folder = output_dir + "eva...
true
true
f70769608dcb19db04a4c79f52e6922891d42c29
9,743
py
Python
geometry/shapes.py
kasmith/geometry
805b525ae8ffebb6bb1d84c094f76533d88dbb7a
[ "MIT" ]
null
null
null
geometry/shapes.py
kasmith/geometry
805b525ae8ffebb6bb1d84c094f76533d88dbb7a
[ "MIT" ]
null
null
null
geometry/shapes.py
kasmith/geometry
805b525ae8ffebb6bb1d84c094f76533d88dbb7a
[ "MIT" ]
null
null
null
"""Functions that work on collections of shapes """ from __future__ import division, print_function import numpy as np from .convex import convex_area, convex_centroid __all__ = ['recenter_polygon', 'centroid_for_shapes', 'centroid_for_uncomputed_shapes', 'recenter_system', 'rescale_and_recenter...
34.549645
81
0.615621
from __future__ import division, print_function import numpy as np from .convex import convex_area, convex_centroid __all__ = ['recenter_polygon', 'centroid_for_shapes', 'centroid_for_uncomputed_shapes', 'recenter_system', 'rescale_and_recenter_system', 'rotate_polygon', 'rotate_syste...
true
true
f7076a1be7f95b94829ffd29a534b75219784e7e
1,610
py
Python
tests/test_messages.py
felixcheruiyot/twilio-python
bbef708f0aa2879c582bd705f74b67f7b7c3787a
[ "MIT" ]
null
null
null
tests/test_messages.py
felixcheruiyot/twilio-python
bbef708f0aa2879c582bd705f74b67f7b7c3787a
[ "MIT" ]
null
null
null
tests/test_messages.py
felixcheruiyot/twilio-python
bbef708f0aa2879c582bd705f74b67f7b7c3787a
[ "MIT" ]
null
null
null
import six if six.PY3: import unittest else: import unittest2 as unittest from datetime import date from mock import Mock from six import u from twilio.rest.resources import Messages DEFAULT = { 'From': None, 'DateSent<': None, 'DateSent>': None, 'DateSent': None, } class MessageTest(unittes...
27.758621
67
0.606832
import six if six.PY3: import unittest else: import unittest2 as unittest from datetime import date from mock import Mock from six import u from twilio.rest.resources import Messages DEFAULT = { 'From': None, 'DateSent<': None, 'DateSent>': None, 'DateSent': None, } class MessageTest(unittes...
true
true
f7076adaa536e7eadf0ced46b2116f6273d1415a
1,336
py
Python
app/core/tests/test_admin.py
Saurav-Shrivastav/recipe-app-api
bbb024828784ca91c34b81cdf1aacfd5a3021f30
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
Saurav-Shrivastav/recipe-app-api
bbb024828784ca91c34b81cdf1aacfd5a3021f30
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
Saurav-Shrivastav/recipe-app-api
bbb024828784ca91c34b81cdf1aacfd5a3021f30
[ "MIT" ]
null
null
null
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='admin@gmail.com', ...
31.809524
68
0.636228
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='admin@gmail.com', ...
true
true
f7076ae73f0a6e979238dc4f62e5f4a973930177
17,240
py
Python
python/tvm/relax/transform/transform.py
sunggg/relax
fad6e9f6c9f4a519ebdba0c604106b1674c5d1ff
[ "Apache-2.0" ]
null
null
null
python/tvm/relax/transform/transform.py
sunggg/relax
fad6e9f6c9f4a519ebdba0c604106b1674c5d1ff
[ "Apache-2.0" ]
null
null
null
python/tvm/relax/transform/transform.py
sunggg/relax
fad6e9f6c9f4a519ebdba0c604106b1674c5d1ff
[ "Apache-2.0" ]
1
2021-11-16T01:01:52.000Z
2021-11-16T01:01:52.000Z
# 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...
32.838095
99
0.669432
import functools import inspect import types from typing import Callable, Dict, Union import tvm.ir from tvm.target import Target from tvm.meta_schedule.database import PyDatabase from . import _ffi_api @tvm._ffi.register_object("relax.FunctionPass") class FunctionPass(tvm.ir.transform.Pass): @tvm._ffi.register_ob...
true
true
f7076c0d99ab4811272b1a459a9679fad5e7f7dd
4,300
py
Python
virtual/lib/python3.6/site-packages/PIL/WmfImagePlugin.py
GabrielSpear/PersonalGallery
e863339af357469598ed3380d1449f579ce2a3b2
[ "MIT" ]
1
2021-02-08T07:49:35.000Z
2021-02-08T07:49:35.000Z
virtual/lib/python3.6/site-packages/PIL/WmfImagePlugin.py
GabrielSpear/PersonalGallery
e863339af357469598ed3380d1449f579ce2a3b2
[ "MIT" ]
2
2017-05-07T06:30:37.000Z
2017-05-08T06:58:23.000Z
virtual/lib/python3.6/site-packages/PIL/WmfImagePlugin.py
GabrielSpear/PersonalGallery
e863339af357469598ed3380d1449f579ce2a3b2
[ "MIT" ]
2
2019-05-19T08:12:45.000Z
2021-08-28T07:16:42.000Z
# # The Python Imaging Library # $Id$ # # WMF stub codec # # history: # 1996-12-14 fl Created # 2004-02-22 fl Turned into a stub driver # 2004-02-23 fl Added EMF support # # Copyright (c) Secret Labs AB 1997-2004. All rights reserved. # Copyright (c) Fredrik Lundh 1996. # # See the README file for information on...
25.443787
92
0.550233
from __future__ import print_function from . import Image, ImageFile from ._binary import i16le as word, si16le as short, i32le as dword, si32le as _long __version__ = "0.2" _handler = None if str != bytes: long = int def register_handler(handler): global _handler _handler = handler if hasattr(Ima...
true
true
f7076cd82473a73c1260bf024f4491e7a0bec4c1
1,069
py
Python
dev/circuitpython/examples/rockblock_send_data.py
scripsi/picodeebee
0ec77e92f09fa8711705623482e57a5e0b702696
[ "MIT" ]
7
2021-03-15T10:06:20.000Z
2022-03-23T02:53:15.000Z
Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/rockblock_send_data.py
IanSMoyes/SpiderPi
cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1
[ "Apache-2.0" ]
5
2021-04-27T18:21:11.000Z
2021-05-02T14:17:14.000Z
Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/rockblock_send_data.py
IanSMoyes/SpiderPi
cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1
[ "Apache-2.0" ]
null
null
null
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT # pylint: disable=wrong-import-position import time import struct # CircuitPython / Blinka import board uart = board.UART() uart.baudrate = 19200 # via USB cable # import serial # uart = serial.Serial("/dev/...
21.816327
64
0.6913
import time import struct import board uart = board.UART() uart.baudrate = 19200 from adafruit_rockblock import RockBlock rb = RockBlock(uart) some_int = 2112 some_float = 42.123456789 some_text = "hello world" text_len = len(some_text) data = struct.pack("i", some_int) data += struct.pack("...
true
true
f7076cece7ffd30ca69295da749759a13db9576d
3,203
py
Python
code-sdc/models/chauffeur.py
mosin26/selforacle
c99478bf65fd137014f3b7947ed83d105b9f038a
[ "MIT" ]
17
2020-02-29T08:12:01.000Z
2022-01-31T16:17:43.000Z
code-sdc/models/chauffeur.py
mosin26/selforacle
c99478bf65fd137014f3b7947ed83d105b9f038a
[ "MIT" ]
6
2020-03-02T10:06:55.000Z
2022-02-22T15:13:04.000Z
code-sdc/models/chauffeur.py
mosin26/selforacle
c99478bf65fd137014f3b7947ed83d105b9f038a
[ "MIT" ]
12
2020-02-28T14:22:48.000Z
2022-02-22T15:13:20.000Z
import logging from keras import Sequential from keras.layers import Convolution2D, MaxPooling2D, Flatten, Dropout, Dense, SpatialDropout2D, K from keras.optimizers import SGD from keras.regularizers import l2 from utils_train_self_driving_car import INPUT_SHAPE, rmse from models.abstract_model_provider import Abstra...
34.815217
129
0.603185
import logging from keras import Sequential from keras.layers import Convolution2D, MaxPooling2D, Flatten, Dropout, Dense, SpatialDropout2D, K from keras.optimizers import SGD from keras.regularizers import l2 from utils_train_self_driving_car import INPUT_SHAPE, rmse from models.abstract_model_provider import Abstra...
true
true
f7076d9c53440bb973967a498a80e0ceda5bc56e
552
py
Python
dogAccountantProject/manage.py
cs-fullstack-2019-fall/django-models-cw-tdude0175
71dc308508f8eb6d9480509d6288aaa2fd47ff1d
[ "Apache-2.0" ]
null
null
null
dogAccountantProject/manage.py
cs-fullstack-2019-fall/django-models-cw-tdude0175
71dc308508f8eb6d9480509d6288aaa2fd47ff1d
[ "Apache-2.0" ]
null
null
null
dogAccountantProject/manage.py
cs-fullstack-2019-fall/django-models-cw-tdude0175
71dc308508f8eb6d9480509d6288aaa2fd47ff1d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dogAccountantProject.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import...
34.5
84
0.693841
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dogAccountantProject.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure ...
true
true
f7076eecf0603a14c3c760df4b5a73836e595690
686
py
Python
app/core/migrations/0003_ingredient.py
alextfos/receipe-app-api
3bcb2e5eba232615d8fc4292e9335e4d55685d5e
[ "MIT" ]
null
null
null
app/core/migrations/0003_ingredient.py
alextfos/receipe-app-api
3bcb2e5eba232615d8fc4292e9335e4d55685d5e
[ "MIT" ]
null
null
null
app/core/migrations/0003_ingredient.py
alextfos/receipe-app-api
3bcb2e5eba232615d8fc4292e9335e4d55685d5e
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2021-08-12 11:35 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0002_tag'), ] operations = [ migrations.CreateModel( ...
28.583333
118
0.618076
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0002_tag'), ] operations = [ migrations.CreateModel( name='Ingredient', fields=[ ...
true
true
f7076ef79bd6c5f48bb073783a0a1f332d581a9d
6,322
py
Python
sdk/eventhub/azure-eventhubs/samples/sync_samples/sample_code_eventhub.py
quxiaozha/azure-sdk-for-python
60af58e4e356714383ced0a2cb0b1433237a0ee1
[ "MIT" ]
null
null
null
sdk/eventhub/azure-eventhubs/samples/sync_samples/sample_code_eventhub.py
quxiaozha/azure-sdk-for-python
60af58e4e356714383ced0a2cb0b1433237a0ee1
[ "MIT" ]
null
null
null
sdk/eventhub/azure-eventhubs/samples/sync_samples/sample_code_eventhub.py
quxiaozha/azure-sdk-for-python
60af58e4e356714383ced0a2cb0b1433237a0ee1
[ "MIT" ]
null
null
null
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import time...
35.920455
99
0.715913
import time import logging def create_eventhub_producer_client(): import os from azure.eventhub import EventHubProducerClient event_hub_connection_str = os.environ['EVENT_HUB_CONN_STR'] eventhub_name = os.environ['EVENT_HUB_NAME'] producer = EventHubProducerClient.from_connection_string( ...
true
true
f7077019a17e6790f579a777930a023004695713
1,137
py
Python
deeple/config.py
luisfrvz/deeple
9e3a58ca69bcb7939e55f592855b642150c4e466
[ "MIT" ]
null
null
null
deeple/config.py
luisfrvz/deeple
9e3a58ca69bcb7939e55f592855b642150c4e466
[ "MIT" ]
null
null
null
deeple/config.py
luisfrvz/deeple
9e3a58ca69bcb7939e55f592855b642150c4e466
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Module to define CONSTANTS used across the project """ from os import path # identify basedir for the package BASE_DIR = path.dirname(path.normpath(path.dirname(__file__))) # Training and predict(deepaas>=0.5.0) arguments as a dict of dicts # with the following structure to feed the ...
29.153846
68
0.475814
from os import path BASE_DIR = path.dirname(path.normpath(path.dirname(__file__))) train_args = { 'arg1': {'default': 1, 'help': '', 'required': False }, } predict_args = { 'arg2': {'default': 1, 'help': '', ...
true
true
f70770281b179107c384838fb40f824cdf5615f7
3,269
py
Python
configs/mixSETR/CNN_SETR_PUP_768x768_80k_cityscapes_bs_8.py
HaitaoWang97/SETR
6b8c8db2fc66bfa854c336f31ad18b700e9541ac
[ "MIT" ]
null
null
null
configs/mixSETR/CNN_SETR_PUP_768x768_80k_cityscapes_bs_8.py
HaitaoWang97/SETR
6b8c8db2fc66bfa854c336f31ad18b700e9541ac
[ "MIT" ]
null
null
null
configs/mixSETR/CNN_SETR_PUP_768x768_80k_cityscapes_bs_8.py
HaitaoWang97/SETR
6b8c8db2fc66bfa854c336f31ad18b700e9541ac
[ "MIT" ]
null
null
null
_base_ = [ '../_base_/datasets/cityscapes_768x768.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py' ] # model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( typ...
33.357143
133
0.531967
_base_ = [ '../_base_/datasets/cityscapes_768x768.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py' ] norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', ...
true
true
f70770b49aa86d0bb703062d89e9f8abff723490
6,957
py
Python
Serial2MQTT_python/serial2MQTT.py
GanonKuppa/umouse_webapp_kuwaganon
f0a26a2e8a20dfaeb6730040933ea01561949268
[ "MIT" ]
null
null
null
Serial2MQTT_python/serial2MQTT.py
GanonKuppa/umouse_webapp_kuwaganon
f0a26a2e8a20dfaeb6730040933ea01561949268
[ "MIT" ]
null
null
null
Serial2MQTT_python/serial2MQTT.py
GanonKuppa/umouse_webapp_kuwaganon
f0a26a2e8a20dfaeb6730040933ea01561949268
[ "MIT" ]
null
null
null
#coding: UTF-8 import serial import sys import time import binascii import json import math from collections import deque import paho.mqtt.client as mqtt # 設定系変数(デフォルト値で初期化) MQTT_BROKER_IP = "localhost" MQTT_BROKER_PORT = 1883 SERIAL_PORT = "COM3" MESSAGE_LEN = 240 NO_MESSAGE_TIME_OUT = 5.0 NO_MESSAGE_MAX_COUNT = 30...
28.165992
146
0.51459
import serial import sys import time import binascii import json import math from collections import deque import paho.mqtt.client as mqtt MQTT_BROKER_IP = "localhost" MQTT_BROKER_PORT = 1883 SERIAL_PORT = "COM3" MESSAGE_LEN = 240 NO_MESSAGE_TIME_OUT = 5.0 NO_MESSAGE_MAX_COUNT = 30000 cmd_gamepad = [99,109,100,254,...
true
true
f70770e6eaced67c749412bd2f93605d8c2ffbe9
713
py
Python
spark_auto_mapper_fhir/extensions/custom/provider_search_system.py
imranq2/SparkAutoMapper.FHIR
dd23b218fb0097d1edc2f3e688e8d6d4d7278bd2
[ "Apache-2.0" ]
1
2020-10-31T23:25:07.000Z
2020-10-31T23:25:07.000Z
spark_auto_mapper_fhir/extensions/custom/provider_search_system.py
icanbwell/SparkAutoMapper.FHIR
98f368e781b46523142c7cb513c670d659a93c9b
[ "Apache-2.0" ]
null
null
null
spark_auto_mapper_fhir/extensions/custom/provider_search_system.py
icanbwell/SparkAutoMapper.FHIR
98f368e781b46523142c7cb513c670d659a93c9b
[ "Apache-2.0" ]
null
null
null
from spark_auto_mapper_fhir.extensions.extension_base import ExtensionBase from spark_auto_mapper_fhir.classproperty import genericclassproperty from spark_auto_mapper_fhir.fhir_types.uri import FhirUri class ProviderSearchSystemExtensionItem(ExtensionBase): # noinspection PyPep8Naming def __init__(self, val...
25.464286
74
0.674614
from spark_auto_mapper_fhir.extensions.extension_base import ExtensionBase from spark_auto_mapper_fhir.classproperty import genericclassproperty from spark_auto_mapper_fhir.fhir_types.uri import FhirUri class ProviderSearchSystemExtensionItem(ExtensionBase): def __init__(self, valueUri: FhirUri): sup...
true
true
f707713f0caa3a96250f01703cacd23700c5d207
5,538
py
Python
util/summary.py
tdilauro/circulation-core
8086ca8cbedd5f4b2a0c44df97889d078ff79aac
[ "Apache-2.0" ]
1
2021-11-16T00:58:43.000Z
2021-11-16T00:58:43.000Z
util/summary.py
tdilauro/circulation-core
8086ca8cbedd5f4b2a0c44df97889d078ff79aac
[ "Apache-2.0" ]
44
2022-01-20T01:31:32.000Z
2022-03-31T01:50:41.000Z
util/summary.py
tdilauro/circulation-core
8086ca8cbedd5f4b2a0c44df97889d078ff79aac
[ "Apache-2.0" ]
1
2021-05-12T19:11:52.000Z
2021-05-12T19:11:52.000Z
import logging import re from collections import Counter from textblob import TextBlob from textblob.exceptions import MissingCorpusError from . import Bigrams, english_bigrams class SummaryEvaluator(object): """Evaluate summaries of a book to find a usable summary. A usable summary will have good coverag...
30.766667
88
0.570061
import logging import re from collections import Counter from textblob import TextBlob from textblob.exceptions import MissingCorpusError from . import Bigrams, english_bigrams class SummaryEvaluator(object): # whatever reason. default_bad_phrases = set( [ "version of", ...
true
true
f7077143ea9e2cee482d69a3f3252c29505bc3b9
2,030
py
Python
week5/workshop5.py
jaycvilla/nucamppython_fundamentals
a53533e4459a10ff5fbc8e6b4c066412278cd7c1
[ "MIT" ]
null
null
null
week5/workshop5.py
jaycvilla/nucamppython_fundamentals
a53533e4459a10ff5fbc8e6b4c066412278cd7c1
[ "MIT" ]
null
null
null
week5/workshop5.py
jaycvilla/nucamppython_fundamentals
a53533e4459a10ff5fbc8e6b4c066412278cd7c1
[ "MIT" ]
null
null
null
import random def guess_random_number(tries, start, stop): number = random.randint(start, stop) while tries != 0: print('Number of tries left: ', tries) guess = int(input("Guess a number between 1 and 10: ")) tries -= 1 if guess < number: print('Guess high...
29.42029
69
0.539901
import random def guess_random_number(tries, start, stop): number = random.randint(start, stop) while tries != 0: print('Number of tries left: ', tries) guess = int(input("Guess a number between 1 and 10: ")) tries -= 1 if guess < number: print('Guess high...
true
true
f707719d8c68857afc88f397486764c6de386f1c
8,215
py
Python
deep-web-scanner.py
Leetcore/deepweb
28e93d5368f6b1496ea5675f6c6aa9e4c794da3f
[ "Apache-2.0" ]
null
null
null
deep-web-scanner.py
Leetcore/deepweb
28e93d5368f6b1496ea5675f6c6aa9e4c794da3f
[ "Apache-2.0" ]
null
null
null
deep-web-scanner.py
Leetcore/deepweb
28e93d5368f6b1496ea5675f6c6aa9e4c794da3f
[ "Apache-2.0" ]
null
null
null
import threading import ipaddress import socket import time from typing import Optional, Union import requests requests.packages.urllib3.disable_warnings() # type: ignore from concurrent.futures import ThreadPoolExecutor import colorama colorama.init(autoreset=True) import os import bs4 import argparse folder = os.pa...
37.340909
123
0.59574
import threading import ipaddress import socket import time from typing import Optional, Union import requests requests.packages.urllib3.disable_warnings() from concurrent.futures import ThreadPoolExecutor import colorama colorama.init(autoreset=True) import os import bs4 import argparse folder = os.path.dirname(__fi...
true
true
f70772545aea1123adb436514a0719a0eca58607
567
py
Python
examples/example_events/service2.py
vladcalin/pymicroservice
325a49d17621b9d45ffd2b5eca6f0de284de8ba4
[ "MIT" ]
2
2016-12-17T13:09:14.000Z
2016-12-31T18:38:57.000Z
examples/example_events/service2.py
vladcalin/pymicroservice
325a49d17621b9d45ffd2b5eca6f0de284de8ba4
[ "MIT" ]
15
2016-11-27T13:28:25.000Z
2017-01-10T09:09:30.000Z
examples/example_events/service2.py
vladcalin/pymicroservice
325a49d17621b9d45ffd2b5eca6f0de284de8ba4
[ "MIT" ]
null
null
null
from gemstone import MicroService, event_handler, exposed_method from gemstone.event.transport import rabbitmq, redis_transport class EventTestService2(MicroService): name = "event.test2" host = "127.0.0.1" port = 8000 event_transports = [ redis_transport.RedisEventTransport("redis://127.0.0....
24.652174
71
0.679012
from gemstone import MicroService, event_handler, exposed_method from gemstone.event.transport import rabbitmq, redis_transport class EventTestService2(MicroService): name = "event.test2" host = "127.0.0.1" port = 8000 event_transports = [ redis_transport.RedisEventTransport("redis://127.0.0....
true
true
f7077369b4a25c7679ffe42278eadb846b8055d9
1,396
py
Python
musicbot/pubg.py
gueishe/music_bot
cb6be80171fb599de1a933c6bd64928193af6377
[ "MIT" ]
null
null
null
musicbot/pubg.py
gueishe/music_bot
cb6be80171fb599de1a933c6bd64928193af6377
[ "MIT" ]
null
null
null
musicbot/pubg.py
gueishe/music_bot
cb6be80171fb599de1a933c6bd64928193af6377
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta class Pubg(object): def __init__(self): self.top_history = [] def _last_top(self, players=None): if not players: if self.top_history: return self.top_history[-1] else: return None ...
28.489796
121
0.485673
from datetime import datetime, timedelta class Pubg(object): def __init__(self): self.top_history = [] def _last_top(self, players=None): if not players: if self.top_history: return self.top_history[-1] else: return None ...
true
true
f7077379de2caec8b5306a111f10b19a8551c5f6
5,165
py
Python
src/webargs/tornadoparser.py
hugovk/webargs
f62dc822a5d7e1add1f25de7bf040685ce8f7089
[ "MIT" ]
null
null
null
src/webargs/tornadoparser.py
hugovk/webargs
f62dc822a5d7e1add1f25de7bf040685ce8f7089
[ "MIT" ]
null
null
null
src/webargs/tornadoparser.py
hugovk/webargs
f62dc822a5d7e1add1f25de7bf040685ce8f7089
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Tornado request argument parsing module. Example: :: import tornado.web from marshmallow import fields from webargs.tornadoparser import use_args class HelloHandler(tornado.web.RequestHandler): @use_args({'name': fields.Str(missing='World')}) def get(self, ...
33.538961
87
0.651113
import tornado.web import tornado.concurrent from tornado.escape import _unicode from webargs import core from webargs.compat import basestring from webargs.multidictproxy import MultiDictProxy class HTTPError(tornado.web.HTTPError): def __init__(self, *args, **kwargs): self.messages = kwargs.pop("messa...
true
true
f7077401251a66e208db2a6e65da8bcf1a0f9567
6,791
py
Python
java/kotlin-extractor/build.py
taus-semmle/ql
234a36ff61e9b06476c4356f0f7ac160115d60ed
[ "MIT" ]
null
null
null
java/kotlin-extractor/build.py
taus-semmle/ql
234a36ff61e9b06476c4356f0f7ac160115d60ed
[ "MIT" ]
null
null
null
java/kotlin-extractor/build.py
taus-semmle/ql
234a36ff61e9b06476c4356f0f7ac160115d60ed
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import kotlin_plugin_versions import glob import platform import re import subprocess import shutil import os import os.path import sys import shlex def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--dependencies', default='../../../resources/ko...
32.806763
133
0.621558
import argparse import kotlin_plugin_versions import glob import platform import re import subprocess import shutil import os import os.path import sys import shlex def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--dependencies', default='../../../resources/kotlin-dependencies', ...
true
true
f707741208aa7e225a0d5059459340c1fec7afbd
8,602
py
Python
tests/strategies/test_ddp_strategy_with_comm_hook.py
krfricke/pytorch-lightning
fbd887df9d487da4c57d884e01b3401af140b1bc
[ "Apache-2.0" ]
3,469
2019-03-31T03:09:16.000Z
2020-01-13T15:06:31.000Z
tests/strategies/test_ddp_strategy_with_comm_hook.py
krfricke/pytorch-lightning
fbd887df9d487da4c57d884e01b3401af140b1bc
[ "Apache-2.0" ]
524
2019-04-02T12:33:39.000Z
2020-01-14T02:53:33.000Z
tests/strategies/test_ddp_strategy_with_comm_hook.py
krfricke/pytorch-lightning
fbd887df9d487da4c57d884e01b3401af140b1bc
[ "Apache-2.0" ]
365
2019-04-02T22:14:04.000Z
2020-01-13T17:21:54.000Z
# Copyright The PyTorch Lightning 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 i...
34.825911
111
0.713439
from unittest import mock import pytest import torch from pytorch_lightning import Trainer from pytorch_lightning.strategies import DDPSpawnStrategy, DDPStrategy from pytorch_lightning.utilities import _TORCH_GREATER_EQUAL_1_10 from tests.helpers import BoringModel from tests.helpers.runif import RunIf if torch.dist...
true
true
f7077532ef595e987257cd5055e8eba48e9aa978
26,132
py
Python
alphagradient/utils.py
nathanheidacker/AlphaGradient
cf031058f3e91381575e2df44cc029bcc7f4cc73
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
alphagradient/utils.py
nathanheidacker/AlphaGradient
cf031058f3e91381575e2df44cc029bcc7f4cc73
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
alphagradient/utils.py
nathanheidacker/AlphaGradient
cf031058f3e91381575e2df44cc029bcc7f4cc73
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Standard utility functions used throughout AlphaGradient""" # Standard Imports from __future__ import annotations from abc import ABC, abstractmethod import builtins from datetime import ( date, datetime, time, timedelta, ) import math from pathlib import Path # Third Party...
30.85242
94
0.641321
from __future__ import annotations from abc import ABC, abstractmethod import builtins from datetime import ( date, datetime, time, timedelta, ) import math from pathlib import Path import numpy as np import pandas as pd from typing import ( TYPE_CHECKING, Any, Literal, Generator, ...
true
true
f7077629f4047cd4624eb6867fe46fb9a5aa1e11
420
py
Python
core/wsgi.py
diegolinkk/praise_songs_control
8bfb1234cfd2f6cce977dbebed5bf939479cdcbf
[ "MIT" ]
null
null
null
core/wsgi.py
diegolinkk/praise_songs_control
8bfb1234cfd2f6cce977dbebed5bf939479cdcbf
[ "MIT" ]
3
2021-03-18T22:31:55.000Z
2021-09-22T18:21:36.000Z
core/wsgi.py
diegolinkk/praise_songs_control
8bfb1234cfd2f6cce977dbebed5bf939479cdcbf
[ "MIT" ]
null
null
null
""" WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from dj_static import Cling os.environ...
23.333333
78
0.785714
import os from django.core.wsgi import get_wsgi_application from dj_static import Cling os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') application = Cling(get_wsgi_application())
true
true
f7077667b8e2b3f0de93363073e81d69a01b08d9
1,237
py
Python
assets/data_and_scripts/Parsing/write_records_cancer-expressed_2.py
GTPB/PPB18
fe19c9b8c6b91dce22c554bc1fa48c97834f8a87
[ "CC-BY-4.0" ]
4
2020-01-14T18:23:24.000Z
2021-07-30T10:15:10.000Z
assets/data_and_scripts/Parsing/write_records_cancer-expressed_2.py
GTPB/PPB18
fe19c9b8c6b91dce22c554bc1fa48c97834f8a87
[ "CC-BY-4.0" ]
null
null
null
assets/data_and_scripts/Parsing/write_records_cancer-expressed_2.py
GTPB/PPB18
fe19c9b8c6b91dce22c554bc1fa48c97834f8a87
[ "CC-BY-4.0" ]
1
2021-07-30T10:11:35.000Z
2021-07-30T10:11:35.000Z
''' Parsing - Exercise 16 The script reads a multiple sequence file in FASTA format and only write to a new file the records the Uniprot ACs of which are present in the list created in Exercise 14). This version of the script collects the header and the sequence separately, in case you wanted to manipulate them. '...
25.770833
63
0.65966
cancer_file = open('cancer-expressed.txt') human_fasta = open('SwissProt-Human.fasta') Outfile = open('cancer-expressed_records.fasta','w') cancer_list = [] for line in cancer_file: AC = line.strip() cancer_list.append(AC) seq = "" for line in human_fasta: if line[0] == '>' and seq == '': header =...
true
true
f70777f09a9a9f21addb5306d2a17be6ccea84c0
1,699
py
Python
gym_wmgds/envs/mujoco/ant.py
ozcell/gym_wmgds_ma
c2cb22943913361947216b908d50decc46616e99
[ "Python-2.0", "OLDAP-2.7" ]
1
2020-12-23T16:38:15.000Z
2020-12-23T16:38:15.000Z
gym_wmgds/envs/mujoco/ant.py
ozcell/gym_wmgds_ma
c2cb22943913361947216b908d50decc46616e99
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
gym_wmgds/envs/mujoco/ant.py
ozcell/gym_wmgds_ma
c2cb22943913361947216b908d50decc46616e99
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
import numpy as np from gym_wmgds import utils from gym_wmgds.envs.mujoco import mujoco_env class AntEnv(mujoco_env.MujocoEnv, utils.EzPickle): def __init__(self): mujoco_env.MujocoEnv.__init__(self, 'ant.xml', 5) utils.EzPickle.__init__(self) def step(self, a): xposbefore = self.get_b...
36.934783
92
0.615068
import numpy as np from gym_wmgds import utils from gym_wmgds.envs.mujoco import mujoco_env class AntEnv(mujoco_env.MujocoEnv, utils.EzPickle): def __init__(self): mujoco_env.MujocoEnv.__init__(self, 'ant.xml', 5) utils.EzPickle.__init__(self) def step(self, a): xposbefore = self.get_b...
true
true
f70777f94ac9e945ac459a52890901f6a1135b62
678
py
Python
gifsong/models.py
bigjust/gifsong
954df6b35c2b4d85773a223e63739c97fcb749dd
[ "MIT", "Unlicense" ]
1
2019-04-21T17:28:10.000Z
2019-04-21T17:28:10.000Z
gifsong/models.py
bigjust/gifsong
954df6b35c2b4d85773a223e63739c97fcb749dd
[ "MIT", "Unlicense" ]
null
null
null
gifsong/models.py
bigjust/gifsong
954df6b35c2b4d85773a223e63739c97fcb749dd
[ "MIT", "Unlicense" ]
null
null
null
from django.db import models class SFWManager(models.Manager): def get_queryset(self): return super(SFWManager, self).get_queryset().filter(sfwness=gifsong.SFW) class gifsong(models.Model): SFW = 1 NSFW = 2 UNKNOWN = 3 STATUS_CHOICES = ( (SFW, 'SFW'), (NSFW, 'NSFW'), ...
25.111111
82
0.650442
from django.db import models class SFWManager(models.Manager): def get_queryset(self): return super(SFWManager, self).get_queryset().filter(sfwness=gifsong.SFW) class gifsong(models.Model): SFW = 1 NSFW = 2 UNKNOWN = 3 STATUS_CHOICES = ( (SFW, 'SFW'), (NSFW, 'NSFW'), ...
true
true
f70778288e6a0299fe2b3813692e792b2c507dba
4,054
py
Python
onmt/encoders/bert.py
SivilTaram/dialogue-utterance-rewriter-pytorch
92c2254958b7a1ee9199836f7f2236575270983f
[ "MIT" ]
null
null
null
onmt/encoders/bert.py
SivilTaram/dialogue-utterance-rewriter-pytorch
92c2254958b7a1ee9199836f7f2236575270983f
[ "MIT" ]
null
null
null
onmt/encoders/bert.py
SivilTaram/dialogue-utterance-rewriter-pytorch
92c2254958b7a1ee9199836f7f2236575270983f
[ "MIT" ]
null
null
null
""" Implementation from: https://raw.githubusercontent.com/Zenglinxiao/OpenNMT-py/bert/onmt/encoders/bert.py @Author: Zenglinxiao """ import torch.nn as nn from onmt.encoders.transformer import TransformerEncoderLayer from onmt.utils.misc import sequence_mask class BertEncoder(nn.Module): """BERT Encoder: A Tran...
34.948276
104
0.619388
import torch.nn as nn from onmt.encoders.transformer import TransformerEncoderLayer from onmt.utils.misc import sequence_mask class BertEncoder(nn.Module): def __init__(self, embeddings, num_layers=12, d_model=768, heads=12, d_ff=3072, dropout=0.1, attention_dropout=0.1, max_re...
true
true
f707785c5c17239ff88272142d3ef7859dc477c1
1,559
py
Python
photo_app/models.py
newtonkiragu/photo_share
43344ddf32c89547ff4b2fb1f33aaaf4d502566d
[ "MIT" ]
2
2019-01-23T11:14:42.000Z
2019-01-23T11:14:45.000Z
photo_app/models.py
silver230/photo_share
43344ddf32c89547ff4b2fb1f33aaaf4d502566d
[ "MIT" ]
null
null
null
photo_app/models.py
silver230/photo_share
43344ddf32c89547ff4b2fb1f33aaaf4d502566d
[ "MIT" ]
1
2018-12-04T14:36:27.000Z
2018-12-04T14:36:27.000Z
import uuid from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save class Profile(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) user = models.OneToOneField(User, on_delete=models.CASCADE) profile_p...
29.415094
91
0.720334
import uuid from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save class Profile(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) user = models.OneToOneField(User, on_delete=models.CASCADE) profile_p...
true
true
f70778b35ade5ae9f9780b0e26a1ac6183840c0f
4,528
py
Python
test_cli.py
shede333/PyMobileProvision
281fdf35362a570739a35bbf45ee7c4b5f7e6120
[ "MIT" ]
7
2019-05-21T03:15:22.000Z
2021-04-16T03:26:33.000Z
test_cli.py
shede333/PyMobileProvision
281fdf35362a570739a35bbf45ee7c4b5f7e6120
[ "MIT" ]
1
2019-09-03T09:07:58.000Z
2020-03-18T07:03:28.000Z
test_cli.py
shede333/PyMobileProvision
281fdf35362a570739a35bbf45ee7c4b5f7e6120
[ "MIT" ]
null
null
null
#!/usr/bin/env python # _*_ coding:UTF-8 _*_ """ __author__ = 'shede333' """ import plistlib import shutil from pathlib import Path from mobileprovision import util from mobileprovision import MobileProvisionModel RESOURCE_PATH = Path(__file__).resolve().parent.joinpath("resource") SRC_MP_PATH = RESOURCE_PATH.joinpa...
39.719298
102
0.730345
import plistlib import shutil from pathlib import Path from mobileprovision import util from mobileprovision import MobileProvisionModel RESOURCE_PATH = Path(__file__).resolve().parent.joinpath("resource") SRC_MP_PATH = RESOURCE_PATH.joinpath("sw-src.mobileprovision") def test_cli_import(): origin_path = util....
true
true
f707797a77dc879868486481a5c6510730eb87b1
9,376
py
Python
install/cupy_builder/_compiler.py
hey-sagar/cupy
83a6d9efeee27f80ef000561f58454abd9d21533
[ "MIT" ]
null
null
null
install/cupy_builder/_compiler.py
hey-sagar/cupy
83a6d9efeee27f80ef000561f58454abd9d21533
[ "MIT" ]
null
null
null
install/cupy_builder/_compiler.py
hey-sagar/cupy
83a6d9efeee27f80ef000561f58454abd9d21533
[ "MIT" ]
1
2022-03-21T20:19:12.000Z
2022-03-21T20:19:12.000Z
import distutils.ccompiler import os import os.path import platform import shutil import sys import subprocess from typing import Optional, List import setuptools import setuptools.msvc from setuptools import Extension from cupy_builder._context import Context import cupy_builder.install_build as build def _nvcc_ge...
40.240343
118
0.564526
import distutils.ccompiler import os import os.path import platform import shutil import sys import subprocess from typing import Optional, List import setuptools import setuptools.msvc from setuptools import Extension from cupy_builder._context import Context import cupy_builder.install_build as build def _nvcc_ge...
true
true
f70779a887ba49ecdcd744e1cbc233a53a5fed12
154
py
Python
test.py
KuangenZhang/XsensIMUReader
24eb04d363d574cfbbfe6f9b27f22ea26116dc7b
[ "MIT" ]
1
2021-09-14T15:55:42.000Z
2021-09-14T15:55:42.000Z
test.py
KuangenZhang/XsensIMUReader
24eb04d363d574cfbbfe6f9b27f22ea26116dc7b
[ "MIT" ]
null
null
null
test.py
KuangenZhang/XsensIMUReader
24eb04d363d574cfbbfe6f9b27f22ea26116dc7b
[ "MIT" ]
null
null
null
import keyboard import time while True: if keyboard.is_pressed('esc'): print('Pressed ESC') break else: time.sleep(1e-3)
15.4
34
0.597403
import keyboard import time while True: if keyboard.is_pressed('esc'): print('Pressed ESC') break else: time.sleep(1e-3)
true
true
f7077a064f15130f8f179abed20b25de3a326f42
21,354
py
Python
tests/cosmology/test_cosmology_apsuite.py
emaballarin/phytorch
68cf0a630e2fee9dd98f08639edcceb2389adf35
[ "MIT" ]
1
2022-01-21T06:59:20.000Z
2022-01-21T06:59:20.000Z
tests/cosmology/test_cosmology_apsuite.py
emaballarin/phytorch
68cf0a630e2fee9dd98f08639edcceb2389adf35
[ "MIT" ]
null
null
null
tests/cosmology/test_cosmology_apsuite.py
emaballarin/phytorch
68cf0a630e2fee9dd98f08639edcceb2389adf35
[ "MIT" ]
1
2021-04-27T00:45:47.000Z
2021-04-27T00:45:47.000Z
# Based on the astropy test suite (v4.2.1) # (https://github.com/astropy/astropy/blob/v4.2.1/astropy/cosmology/tests/test_cosmology.py) from io import StringIO from typing import Type import numpy as np import pytest import torch from pytest import mark from torch import tensor import phytorch.cosmology.drivers.analy...
44.028866
119
0.588929
from io import StringIO from typing import Type import numpy as np import pytest import torch from pytest import mark from torch import tensor import phytorch.cosmology.drivers.analytic import phytorch.cosmology.drivers.analytic_diff import phytorch.cosmology.special from phytorch.constants import codata2014, G as Ne...
true
true
f7077aff83afe4368eaf95ebf3fc072b46c40a11
3,765
py
Python
src/selectedtests/datasource/datasource_cli.py
isabella232/selected-tests
890cd5f39f5571d50f0406b4c25a1a2eef1006a3
[ "Apache-2.0" ]
2
2020-04-13T11:26:57.000Z
2022-01-21T00:03:52.000Z
src/selectedtests/datasource/datasource_cli.py
mongodb/selected-tests
467f71f1d45b06ac3cc5db252f18658f8cd93083
[ "Apache-2.0" ]
54
2019-09-26T18:56:34.000Z
2022-03-12T01:07:00.000Z
src/selectedtests/datasource/datasource_cli.py
isabella232/selected-tests
890cd5f39f5571d50f0406b4c25a1a2eef1006a3
[ "Apache-2.0" ]
6
2019-10-01T14:24:27.000Z
2020-02-13T15:53:47.000Z
"""Cli entry point to setup db indexes.""" import click import structlog from click import Context from miscutils.logging_config import Verbosity from pymongo import ASCENDING, IndexModel from pymongo.collection import Collection from selectedtests.config.logging_config import config_logging from selectedtests.dataso...
35.186916
98
0.724037
import click import structlog from click import Context from miscutils.logging_config import Verbosity from pymongo import ASCENDING, IndexModel from pymongo.collection import Collection from selectedtests.config.logging_config import config_logging from selectedtests.datasource.mongo_wrapper import MongoWrapper LOG...
true
true
f7077b3a0499cf10523ce9abd87eec6b3738fc49
11,466
py
Python
sdk/python/pulumi_azure_native/network/v20200701/route.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20200701/route.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20200701/route.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
70.343558
4,458
0.703646
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from ._enums import * __all__ = ['Route'] class Route(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Opti...
true
true
f7077b9417b0fce6177d498be5608e33221eec90
8,942
py
Python
Scripts/GeMS_DMUtoDocx_Arc10.py
rcrow/GeMS_Tools
6120854e1222e68cfec5bb16940c6589ebb94c28
[ "CC0-1.0" ]
null
null
null
Scripts/GeMS_DMUtoDocx_Arc10.py
rcrow/GeMS_Tools
6120854e1222e68cfec5bb16940c6589ebb94c28
[ "CC0-1.0" ]
null
null
null
Scripts/GeMS_DMUtoDocx_Arc10.py
rcrow/GeMS_Tools
6120854e1222e68cfec5bb16940c6589ebb94c28
[ "CC0-1.0" ]
null
null
null
""" Translates DMU table in NCGMP09-style geodatabase into a fully formatted Microsoft Word .docx file. Assumes formatting and style names in USGS Pubs template MapManuscript_v1-0_04-11.dotx Arguments Input geodatabase Output workspace Output filename (if it doesn't end in .docx, .docx will be appended) ...
37.103734
118
0.539253
""" Translates DMU table in NCGMP09-style geodatabase into a fully formatted Microsoft Word .docx file. Assumes formatting and style names in USGS Pubs template MapManuscript_v1-0_04-11.dotx Arguments Input geodatabase Output workspace Output filename (if it doesn't end in .docx, .docx will be appended) ...
false
true
f7077bba967cf6529a48e062c8de879f6a9a44de
10,325
py
Python
tensorflow_gan/examples/progressive_gan/networks_test.py
Ankuraxz/gan
b956c7d571539fd1053b3df3dddddbcbd27be65c
[ "Apache-2.0" ]
2
2021-03-29T04:39:29.000Z
2021-05-14T05:51:40.000Z
tensorflow_gan/examples/progressive_gan/networks_test.py
Ankuraxz/gan
b956c7d571539fd1053b3df3dddddbcbd27be65c
[ "Apache-2.0" ]
2
2020-08-18T20:47:45.000Z
2020-08-19T18:38:39.000Z
tensorflow_gan/examples/progressive_gan/networks_test.py
Ankuraxz/gan
b956c7d571539fd1053b3df3dddddbcbd27be65c
[ "Apache-2.0" ]
1
2020-08-18T16:12:39.000Z
2020-08-18T16:12:39.000Z
# coding=utf-8 # Copyright 2020 The TensorFlow GAN 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 applicabl...
38.240741
80
0.657821
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tensorflow_gan.examples.progressive_gan import layers from tensorflow_gan.examples.progressive_gan import networks def _get_grad_norm(ys, xs): return tf.sqr...
true
true
f7077d34d2c10e6a2d7526ede57dfb4554d44700
13,018
py
Python
kubernetes/client/models/extensions_v1beta1_deployment_spec.py
Prahladk09/python-1
2dfb3035535e4be52ba549f1ff47acbe573b73f6
[ "Apache-2.0" ]
11
2020-10-13T05:27:59.000Z
2021-09-23T02:56:32.000Z
kubernetes/client/models/extensions_v1beta1_deployment_spec.py
Prahladk09/python-1
2dfb3035535e4be52ba549f1ff47acbe573b73f6
[ "Apache-2.0" ]
48
2020-10-15T09:53:36.000Z
2021-07-05T15:33:24.000Z
kubernetes/client/models/extensions_v1beta1_deployment_spec.py
Prahladk09/python-1
2dfb3035535e4be52ba549f1ff47acbe573b73f6
[ "Apache-2.0" ]
4
2020-12-04T08:51:35.000Z
2022-03-27T09:42:20.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.14.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
36.982955
453
0.666308
from pprint import pformat from six import iteritems import re class ExtensionsV1beta1DeploymentSpec(object): swagger_types = { 'min_ready_seconds': 'int', 'paused': 'bool', 'progress_deadline_seconds': 'int', 'replicas': 'int', 'revision_history_limit': 'int', ...
true
true
f7077db102990be3657c8aaccdcd149bcdc1e042
978
py
Python
nomadgram/users/migrations/0002_auto_20171213_2310.py
BryanSHRyu/nomadgram
5ee49d1f384d5cc7fc9fc57d8518e9762019ee15
[ "MIT" ]
null
null
null
nomadgram/users/migrations/0002_auto_20171213_2310.py
BryanSHRyu/nomadgram
5ee49d1f384d5cc7fc9fc57d8518e9762019ee15
[ "MIT" ]
18
2020-06-05T16:48:54.000Z
2022-03-08T22:48:59.000Z
nomadgram/users/migrations/0002_auto_20171213_2310.py
bshryu/nomadgram
5ee49d1f384d5cc7fc9fc57d8518e9762019ee15
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2017-12-13 14:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( ...
27.166667
147
0.551125
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='user', name='bio', field=models.TextF...
true
true
f7077dd0a24962ac99cf887a355fd7e25b0c8fe9
475
py
Python
polityper/wsgi.py
kubasikora/WPAM-Projekt-Backend
09419b9d3b881c8e741ec86e985db0740f28c0c4
[ "MIT" ]
1
2020-11-06T18:25:20.000Z
2020-11-06T18:25:20.000Z
polityper/wsgi.py
kubasikora/WPAM-Projekt-Backend
09419b9d3b881c8e741ec86e985db0740f28c0c4
[ "MIT" ]
20
2020-11-07T00:10:16.000Z
2021-03-25T15:04:12.000Z
polityper/wsgi.py
kubasikora/WPAM-Projekt-Backend
09419b9d3b881c8e741ec86e985db0740f28c0c4
[ "MIT" ]
null
null
null
""" WSGI config for polityper project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from dotenv import load_dotenv from django.core.wsgi import get_wsgi_application loa...
26.388889
78
0.795789
import os from dotenv import load_dotenv from django.core.wsgi import get_wsgi_application load_dotenv(dotenv_path="prod.env", verbose=True) os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'polityper.settings') application = get_wsgi_application()
true
true
f7077e6a47717ee76b83b0cd1f2ab5b0bc01b6e4
1,063
py
Python
assistant/products/urls.py
kapiak/ware_prod
ae61256890834c434d2e38cc2ccacf00b638665a
[ "MIT" ]
null
null
null
assistant/products/urls.py
kapiak/ware_prod
ae61256890834c434d2e38cc2ccacf00b638665a
[ "MIT" ]
null
null
null
assistant/products/urls.py
kapiak/ware_prod
ae61256890834c434d2e38cc2ccacf00b638665a
[ "MIT" ]
null
null
null
from django.urls import path from .views import ( product_orders_modal, make_product_purchase, allocate_product_to_order, receive_product_stock, ProductListView, product_add_to_purchase, product_search, ) app_name = "products" urlpatterns = [ path('', ProductListView.as_view(), name="...
24.159091
61
0.636877
from django.urls import path from .views import ( product_orders_modal, make_product_purchase, allocate_product_to_order, receive_product_stock, ProductListView, product_add_to_purchase, product_search, ) app_name = "products" urlpatterns = [ path('', ProductListView.as_view(), name="...
true
true
f7077eff780853479ec63093b2da83cd37972231
1,645
py
Python
package/spack-perl-file-sharedir-install/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
1
2018-07-17T07:45:09.000Z
2018-07-17T07:45:09.000Z
package/spack-perl-file-sharedir-install/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
package/spack-perl-file-sharedir-install/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
44.459459
102
0.682067
from spack import * class PerlFileSharedirInstall(PerlPackage): homepage = "http://search.cpan.org/~ether/File-ShareDir-Install-0.11/lib/File/ShareDir/Install.pm" url = "http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/File-ShareDir-Install-0.11.tar.gz" version('0.11', '61107e6ce6eee42bf29525b1a4d...
true
true
f7077f937e44a1c495e4cf9ba12d72a24f64ccef
963
py
Python
src/spacemapping_curve/combinations.py
wenqian157/spacemapping_curve
6acceb003dfd78b144f80fa8ba6b96956ba6b330
[ "MIT" ]
null
null
null
src/spacemapping_curve/combinations.py
wenqian157/spacemapping_curve
6acceb003dfd78b144f80fa8ba6b96956ba6b330
[ "MIT" ]
null
null
null
src/spacemapping_curve/combinations.py
wenqian157/spacemapping_curve
6acceb003dfd78b144f80fa8ba6b96956ba6b330
[ "MIT" ]
null
null
null
class BooleanData: def __init__(self, objects): self.objects = list(objects) @ property def head(self): return(self.objects[0]) @ property def tail(self): if len(self.objects) > 1: return self.objects[1:] else: return [] class BooleanUnion(...
24.692308
55
0.610592
class BooleanData: def __init__(self, objects): self.objects = list(objects) @ property def head(self): return(self.objects[0]) @ property def tail(self): if len(self.objects) > 1: return self.objects[1:] else: return [] class BooleanUnion(...
true
true
f7077fba0abe383ff9dbf4784a50f8fffffe4ad7
666
py
Python
ansible-devel/test/integration/targets/cli/test_k_and_K.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
ansible-devel/test/integration/targets/cli/test_k_and_K.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
ansible-devel/test/integration/targets/cli/test_k_and_K.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
#!/usr/bin/env python # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import sys import pexpect os.environ['ANSIBLE_NOCOLOR'] = '1' out = pex...
23.785714
92
0.696697
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import sys import pexpect os.environ['ANSIBLE_NOCOLOR'] = '1' out = pexpect.run( 'ansible -c ssh -i localhost, -u cliuser1 -e ansible_python_interpreter={0} ' '-m command -a whoami -Kkb --become-user cliuser2 ...
true
true
f707802812c78956b7db89420facbe5e35dccd50
1,373
py
Python
parsers/disk.py
jazevedo620/wise-kubernetes
a39daa1bb4b742c974a43f3d5e44f6036d1d16ad
[ "Apache-2.0" ]
1
2020-03-13T06:10:18.000Z
2020-03-13T06:10:18.000Z
parsers/disk.py
elba-kubernetes/experiment
a39daa1bb4b742c974a43f3d5e44f6036d1d16ad
[ "Apache-2.0" ]
1
2020-09-18T20:14:38.000Z
2020-09-18T20:14:38.000Z
parsers/disk.py
elba-kubernetes/experiment
a39daa1bb4b742c974a43f3d5e44f6036d1d16ad
[ "Apache-2.0" ]
null
null
null
import datetime import sys from collections import OrderedDict class DiskEntry: """A disk entry.""" def __init__(self, read_in_kb, write_in_kb, timestamp): """Initialize a DiskEntry.""" self._read_in_kb = read_in_kb self._write_in_kb = write_in_kb self._timestamp = timestamp ...
31.930233
91
0.638019
import datetime import sys from collections import OrderedDict class DiskEntry: def __init__(self, read_in_kb, write_in_kb, timestamp): self._read_in_kb = read_in_kb self._write_in_kb = write_in_kb self._timestamp = timestamp def read_in_kb(self): return self._read_in_kb ...
true
true
f70782141243795c016e0d2561dc97be4a8bf135
12,442
py
Python
examples/speech_to_text/prep_covost_data.py
adrienxu/SATE
a932859287b2d3a944f7b0ae6670c84c98db7965
[ "MIT" ]
11
2021-07-01T19:52:36.000Z
2022-03-09T09:33:47.000Z
examples/speech_to_text/prep_covost_data.py
adrienxu/SATE
a932859287b2d3a944f7b0ae6670c84c98db7965
[ "MIT" ]
null
null
null
examples/speech_to_text/prep_covost_data.py
adrienxu/SATE
a932859287b2d3a944f7b0ae6670c84c98db7965
[ "MIT" ]
1
2021-09-11T08:02:21.000Z
2021-09-11T08:02:21.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import logging from pathlib import Path import shutil from tempfile import NamedTemporaryFile from typi...
34.949438
111
0.571371
import argparse import logging from pathlib import Path import shutil from tempfile import NamedTemporaryFile from typing import Optional, Tuple import string import pandas as pd import torchaudio from examples.speech_to_text.data_utils import ( create_zip, extract_fbank_features, filter_manifest_df, ...
true
true
f70782746902e562e89870e2bce98b502c29402b
2,205
py
Python
test/posix/integration/udp/test.py
AndreasAakesson/IncludeOS
891b960a0a7473c08cd0d93a2bba7569c6d88b48
[ "Apache-2.0" ]
null
null
null
test/posix/integration/udp/test.py
AndreasAakesson/IncludeOS
891b960a0a7473c08cd0d93a2bba7569c6d88b48
[ "Apache-2.0" ]
1
2016-04-03T16:24:09.000Z
2016-04-03T16:24:09.000Z
test/posix/integration/udp/test.py
AndreasAakesson/IncludeOS
891b960a0a7473c08cd0d93a2bba7569c6d88b48
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python from __future__ import print_function from future import standard_library standard_library.install_aliases() from builtins import str from builtins import range import sys import os import subprocess import atexit from vmrunner import vmrunner vm = vmrunner.vms[0] import socket # Set up a tem...
25.344828
111
0.693424
from __future__ import print_function from future import standard_library standard_library.install_aliases() from builtins import str from builtins import range import sys import os import subprocess import atexit from vmrunner import vmrunner vm = vmrunner.vms[0] import socket import platform if platform.system() ...
true
true
f7078323428be9f40d3247f9d5889a1af4f5f73c
2,771
py
Python
python3/koans/about_string_manipulation.py
leahein/python_koans
382d6b10397df22202af2402c93979d588c0093c
[ "MIT" ]
null
null
null
python3/koans/about_string_manipulation.py
leahein/python_koans
382d6b10397df22202af2402c93979d588c0093c
[ "MIT" ]
null
null
null
python3/koans/about_string_manipulation.py
leahein/python_koans
382d6b10397df22202af2402c93979d588c0093c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutStringManipulation(Koan): def test_use_format_to_interpolate_variables(self): value1 = 'one' value2 = 2 string = "The values are {0} and {1}".format(value1, value2) self.assertEqual("The values are ...
36.946667
81
0.648863
from runner.koan import * class AboutStringManipulation(Koan): def test_use_format_to_interpolate_variables(self): value1 = 'one' value2 = 2 string = "The values are {0} and {1}".format(value1, value2) self.assertEqual("The values are one and 2", string) def test_formatted_va...
true
true
f70783d2ccd40fcc6acaed1d94cedfa8b5d90036
643
py
Python
frappe/patches/v5_3/rename_chinese_languages.py
ashokrajbathu/secondrep
6e6a469a0956db01b5640c8bb16c5752556a219e
[ "MIT" ]
null
null
null
frappe/patches/v5_3/rename_chinese_languages.py
ashokrajbathu/secondrep
6e6a469a0956db01b5640c8bb16c5752556a219e
[ "MIT" ]
null
null
null
frappe/patches/v5_3/rename_chinese_languages.py
ashokrajbathu/secondrep
6e6a469a0956db01b5640c8bb16c5752556a219e
[ "MIT" ]
2
2016-02-09T20:17:59.000Z
2018-03-21T16:48:48.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import frappe def execute(): language_map = { "中国(简体)": "簡體中文", "中國(繁體)": "正體中文" } language_in_system_settings = frappe.db.get_single_value("System Settings", "language") if language_in_system_settings in language_map: new_language_name = langu...
33.842105
93
0.73717
from __future__ import unicode_literals import frappe def execute(): language_map = { "中国(简体)": "簡體中文", "中國(繁體)": "正體中文" } language_in_system_settings = frappe.db.get_single_value("System Settings", "language") if language_in_system_settings in language_map: new_language_name = language_map[language_in_syst...
true
true