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
1c252d148b75224d21dc27329d3512cf10319468
6,506
py
Python
discord/types/interactions.py
mansuf/pycord
644054fff4d8221d4b577e2c8ab31f24a5dfbdeb
[ "MIT" ]
8
2021-08-30T03:10:59.000Z
2021-12-01T13:53:53.000Z
discord/types/interactions.py
mansuf/pycord
644054fff4d8221d4b577e2c8ab31f24a5dfbdeb
[ "MIT" ]
5
2021-11-02T17:08:59.000Z
2022-03-28T07:31:06.000Z
discord/types/interactions.py
mansuf/pycord
644054fff4d8221d4b577e2c8ab31f24a5dfbdeb
[ "MIT" ]
1
2021-11-26T05:50:50.000Z
2021-11-26T05:50:50.000Z
""" The MIT License (MIT) Copyright (c) 2015-2021 Rapptz Copyright (c) 2021-present Pycord Development Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limit...
27.336134
99
0.802183
from __future__ import annotations from typing import Optional, TYPE_CHECKING, Dict, TypedDict, Union, List, Literal from .snowflake import Snowflake from .components import Component, ComponentType from .embed import Embed from .channel import ChannelType from .member import Member from .role import Role from .user ...
true
true
1c252e1d4c430f9e72498ada0b40ee4d1cf27984
2,451
py
Python
scons-local-1.1.0/SCons/Tool/aixlink.py
frew/simpleproto
393a7a059802152c888130c0a117fcc62d4fc8ab
[ "BSD-2-Clause", "MIT" ]
null
null
null
scons-local-1.1.0/SCons/Tool/aixlink.py
frew/simpleproto
393a7a059802152c888130c0a117fcc62d4fc8ab
[ "BSD-2-Clause", "MIT" ]
null
null
null
scons-local-1.1.0/SCons/Tool/aixlink.py
frew/simpleproto
393a7a059802152c888130c0a117fcc62d4fc8ab
[ "BSD-2-Clause", "MIT" ]
null
null
null
"""SCons.Tool.aixlink Tool-specific initialization for the IBM Visual Age linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Fou...
34.521127
89
0.72093
__revision__ = "src/engine/SCons/Tool/aixlink.py 3603 2008/10/10 05:46:45 scons" import os import os.path import SCons.Util import aixcc import link cplusplus = __import__('c++', globals(), locals(), []) def smart_linkflags(source, target, env, for_signature): if cplusplus.iscplusplus(s...
true
true
1c252ec8e70474686a723b7c5f1b36b5f756afec
5,615
py
Python
tests/bugs/core_0883_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_0883_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_0883_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_0883 # title: The built-in BLR printer doesn't support all FB2 features # decription: # tracker_id: CORE-883 # min_versions: [] # versions: 3.0 # qmid: bugs.core_883 import pytest from firebird.qa import db_factory, isql_act, Action # version: 3.0 # re...
39.542254
146
0.351736
# decription: # tracker_id: CORE-883 # min_versions: [] # versions: 3.0 # qmid: bugs.core_883 import pytest from firebird.qa import db_factory, isql_act, Action # version: 3.0 # resources: None substitutions_1 = [('RDB\\$PROCEDURE_BLR.*', '')] init_script_1 = """""" db_1 = db_factory(from_back...
true
true
1c252f1060d0224b1035302a1ad93cfe6ab133c7
6,473
py
Python
dictionary/models/topic.py
ankitgc1/django-sozluk-master
eeebc3eadf932a3f98e826400d5010d2b5b360b7
[ "BSD-3-Clause" ]
248
2019-10-29T20:35:01.000Z
2022-03-25T11:17:35.000Z
dictionary/models/topic.py
ankitgc1/django-sozluk-master
eeebc3eadf932a3f98e826400d5010d2b5b360b7
[ "BSD-3-Clause" ]
27
2019-12-18T21:58:15.000Z
2022-02-28T11:41:25.000Z
dictionary/models/topic.py
ankitgc1/django-sozluk-master
eeebc3eadf932a3f98e826400d5010d2b5b360b7
[ "BSD-3-Clause" ]
74
2019-10-30T14:06:46.000Z
2022-02-28T07:29:05.000Z
from django.db import models from django.shortcuts import reverse from django.utils.translation import gettext, gettext_lazy as _ from uuslug import uuslug from dictionary.models.author import Author from dictionary.models.category import Category from dictionary.models.m2m import TopicFollowing from dictionary.model...
34.068421
118
0.635409
from django.db import models from django.shortcuts import reverse from django.utils.translation import gettext, gettext_lazy as _ from uuslug import uuslug from dictionary.models.author import Author from dictionary.models.category import Category from dictionary.models.m2m import TopicFollowing from dictionary.model...
true
true
1c252f5bdc42be4332faf57e316b7286eccdeb47
22,066
py
Python
IRIS_data_download/IRIS_download_support/obspy/signal/tests/test_invsim.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
2
2020-03-05T01:03:01.000Z
2020-12-17T05:04:07.000Z
IRIS_data_download/IRIS_download_support/obspy/signal/tests/test_invsim.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
4
2021-03-31T19:25:55.000Z
2021-12-13T20:32:46.000Z
IRIS_data_download/IRIS_download_support/obspy/signal/tests/test_invsim.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
2
2020-09-08T19:33:40.000Z
2021-04-05T09:47:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ The InvSim test suite. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * # NOQA from future.utils import native_str import ctypes as C import gzip import io import os import u...
40.862963
79
0.551527
from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * from future.utils import native_str import ctypes as C import gzip import io import os import unittest import platform import numpy as np from obspy import Trace, UTCDateTime...
true
true
1c2530d5d3a9950d11c7fd9b5b18506ca133b7d9
1,172
py
Python
manager/migrations/0002_auto_20200717_2204.py
ahbali/manageit
e36b66d8aed3343edbf34b699a5b9840ce687d4e
[ "MIT" ]
null
null
null
manager/migrations/0002_auto_20200717_2204.py
ahbali/manageit
e36b66d8aed3343edbf34b699a5b9840ce687d4e
[ "MIT" ]
4
2021-06-09T18:02:00.000Z
2022-03-04T09:14:10.000Z
manager/migrations/0002_auto_20200717_2204.py
ahbali/manageit
e36b66d8aed3343edbf34b699a5b9840ce687d4e
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-07-17 21:04 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('manager', '0001_initial'), ] operations = [ migrations.AddField( model_nam...
32.555556
110
0.607509
import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('manager', '0001_initial'), ] operations = [ migrations.AddField( model_name='hardware', name='expiration_date...
true
true
1c25323fdd0118f095b736241ebbee16b5948895
1,184
py
Python
app/home/views.py
kirov-qh/movie_project
a935fccd8a060f8999a9d59d433c07257c15c94b
[ "Apache-2.0" ]
null
null
null
app/home/views.py
kirov-qh/movie_project
a935fccd8a060f8999a9d59d433c07257c15c94b
[ "Apache-2.0" ]
null
null
null
app/home/views.py
kirov-qh/movie_project
a935fccd8a060f8999a9d59d433c07257c15c94b
[ "Apache-2.0" ]
null
null
null
# coding:utf8 from . import home from flask import render_template from flask import redirect from flask import url_for @home.route("/") def index(): return render_template("home/index.html") @home.route("/animation/") def animation(): return render_template("home/animation.html") @home.route("/search/"...
17.15942
50
0.695946
from . import home from flask import render_template from flask import redirect from flask import url_for @home.route("/") def index(): return render_template("home/index.html") @home.route("/animation/") def animation(): return render_template("home/animation.html") @home.route("/search/") def search(...
true
true
1c2532401c7c6013e2e1a55e74477ff1344c342a
116
py
Python
lightning_baselines3/on_policy_models/__init__.py
HenryJia/lightning-baselines3
10d1a0eed6136978204323250e37d49915a12e14
[ "MIT" ]
3
2021-01-18T23:27:38.000Z
2021-10-04T12:07:16.000Z
lightning_baselines3/on_policy_models/__init__.py
HenryJia/lightning-baselines3
10d1a0eed6136978204323250e37d49915a12e14
[ "MIT" ]
8
2021-01-21T03:29:29.000Z
2021-07-25T18:45:39.000Z
lightning_baselines3/on_policy_models/__init__.py
HenryJia/lightning-baselines3
10d1a0eed6136978204323250e37d49915a12e14
[ "MIT" ]
null
null
null
from lightning_baselines3.on_policy_models.ppo import PPO from lightning_baselines3.on_policy_models.a2c import A2C
38.666667
57
0.896552
from lightning_baselines3.on_policy_models.ppo import PPO from lightning_baselines3.on_policy_models.a2c import A2C
true
true
1c253264d7acc7e1611ff6a90004b9766fbbeb98
358
py
Python
wolsemap/wolsemap/urls.py
Curzy/Wolsemap
d0c10c1c14e168059faa0d2bdd6a5329c76e174a
[ "MIT" ]
90
2017-01-08T13:32:19.000Z
2020-09-30T09:01:27.000Z
wolsemap/wolsemap/urls.py
Curzy/Wolsemap
d0c10c1c14e168059faa0d2bdd6a5329c76e174a
[ "MIT" ]
19
2016-12-11T10:49:06.000Z
2021-11-15T17:46:45.000Z
wolsemap/wolsemap/urls.py
Curzy/MonthlyRentalFeeMetroMapSeoul
d0c10c1c14e168059faa0d2bdd6a5329c76e174a
[ "MIT" ]
3
2016-12-26T12:35:27.000Z
2018-03-01T11:24:09.000Z
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('dabangcrawler.urls', namespace='dabangcrawler')), ] + static(settings.STATIC_URL,...
29.833333
72
0.759777
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('dabangcrawler.urls', namespace='dabangcrawler')), ] + static(settings.STATIC_URL,...
true
true
1c2532d1ffb2cedf5a2d0dfb768c3aabaa005dd1
208
py
Python
parser/fase2/team05/proyecto/analizadorFase2/Abstractas/Expresion.py
eoJimenez/tytus
0987e4e12c7e021d41ff00b59062c4451dea3e1c
[ "MIT" ]
1
2021-01-09T09:39:57.000Z
2021-01-09T09:39:57.000Z
parser/fase2/team05/proyecto/analizadorFase2/Abstractas/Expresion.py
AllVides/tytus
03186f728d1cbcd5f701402604cd8df4e6795a12
[ "MIT" ]
null
null
null
parser/fase2/team05/proyecto/analizadorFase2/Abstractas/Expresion.py
AllVides/tytus
03186f728d1cbcd5f701402604cd8df4e6795a12
[ "MIT" ]
null
null
null
from enum import Enum class Tipos(Enum): Numero = 1 Cadena = 2 Booleano = 3 Decimal = 4 Id = 5 class Expresion(): def __init__(self): self.trueLabel = self.falseLabel = ''
14.857143
45
0.586538
from enum import Enum class Tipos(Enum): Numero = 1 Cadena = 2 Booleano = 3 Decimal = 4 Id = 5 class Expresion(): def __init__(self): self.trueLabel = self.falseLabel = ''
true
true
1c25331fab89d2523337d36483209aade4580522
16,996
py
Python
flask/harmonisation/corporel.py
Artelys/Safer-Roads
ba9eb4b2c0f02c40142caa612ed7998c7ee01155
[ "MIT" ]
null
null
null
flask/harmonisation/corporel.py
Artelys/Safer-Roads
ba9eb4b2c0f02c40142caa612ed7998c7ee01155
[ "MIT" ]
null
null
null
flask/harmonisation/corporel.py
Artelys/Safer-Roads
ba9eb4b2c0f02c40142caa612ed7998c7ee01155
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Jan 31 12:54:46 2020 @author: aboutet """ import pandas as pd import sys import os import Get_Location as gl from datetime import datetime, timedelta sys.path.append( "/home/begood/flask/cluster/") from functions import list_directory, getContext, find_last_id, get_data_fram...
38.803653
177
0.50453
import pandas as pd import sys import os import Get_Location as gl from datetime import datetime, timedelta sys.path.append( "/home/begood/flask/cluster/") from functions import list_directory, getContext, find_last_id, get_data_frame_elastic from get_cluster import get_cluster from sklearn.preprocessing import Norma...
true
true
1c2536fd7b7ee638fcb7bcb375b41ebf0b1a3625
877
py
Python
object_detection2/modeling/keypoints_heads/utest.py
vghost2008/wml
d0c5a1da6c228e321ae59a563e9ac84aa66266ff
[ "MIT" ]
6
2019-12-10T17:18:56.000Z
2022-03-01T01:00:35.000Z
object_detection2/modeling/keypoints_heads/utest.py
vghost2008/wml
d0c5a1da6c228e321ae59a563e9ac84aa66266ff
[ "MIT" ]
2
2021-08-25T16:16:01.000Z
2022-02-10T05:21:19.000Z
object_detection2/modeling/keypoints_heads/utest.py
vghost2008/wml
d0c5a1da6c228e321ae59a563e9ac84aa66266ff
[ "MIT" ]
2
2019-12-07T09:57:35.000Z
2021-09-06T04:58:10.000Z
import tensorflow as tf from object_detection2.modeling.keypoints_heads.hrnet_pe_outputs import * from object_detection2.config.config import * import wmodule import numpy as np tf.enable_eager_execution() cfg = get_cfg() data = list(range(60)) #net = np.zeros([1,5,4,3],dtype=np.float32) data = np.array(data,dtype=np...
25.794118
83
0.734322
import tensorflow as tf from object_detection2.modeling.keypoints_heads.hrnet_pe_outputs import * from object_detection2.config.config import * import wmodule import numpy as np tf.enable_eager_execution() cfg = get_cfg() data = list(range(60)) data = np.array(data,dtype=np.float32) data = np.reshape(data,[1,5,4,3])...
true
true
1c253765b2f3152d646c3730c0ddd1fe7a189b44
24,730
py
Python
resource/lib/python2.7/site-packages/Crypto/SelfTest/Cipher/test_ARC4.py
claudiopastorini/geofire-python
274e1b1d733a1158e4f36de40f0349dbc1ff6c34
[ "MIT" ]
5
2018-01-18T11:39:23.000Z
2022-01-01T11:38:40.000Z
resource/lib/python2.7/site-packages/Crypto/SelfTest/Cipher/test_ARC4.py
claudiopastorini/geofire-python
274e1b1d733a1158e4f36de40f0349dbc1ff6c34
[ "MIT" ]
4
2017-02-20T02:33:48.000Z
2017-02-20T04:10:16.000Z
resource/lib/python2.7/site-packages/Crypto/SelfTest/Cipher/test_ARC4.py
claudiopastorini/geofire-python
274e1b1d733a1158e4f36de40f0349dbc1ff6c34
[ "MIT" ]
4
2018-01-18T11:32:38.000Z
2021-11-25T23:28:04.000Z
# -*- coding: utf-8 -*- # # SelfTest/Cipher/ARC4.py: Self-test for the Alleged-RC4 cipher # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedicat...
53.182796
81
0.528872
__revision__ = "$Id$" from Crypto.Util.py3compat import * from Crypto.SelfTest.st_common import * from binascii import unhexlify from Crypto.Cipher import ARC4 test_data = [ # "RC4 compatibility testing", sent to the cipherpunks mailing list on # September 13, 1994. # http:...
true
true
1c2537c8e3acca9127ed39c63f656efe683c5e65
50,417
py
Python
test/integration/component/test_snapshots.py
ksowmya/cloudstack-1
f8f779158da056be7da669884ae4ddd109cec044
[ "Apache-2.0" ]
1
2020-03-27T22:21:20.000Z
2020-03-27T22:21:20.000Z
test/integration/component/test_snapshots.py
ksowmya/cloudstack-1
f8f779158da056be7da669884ae4ddd109cec044
[ "Apache-2.0" ]
null
null
null
test/integration/component/test_snapshots.py
ksowmya/cloudstack-1
f8f779158da056be7da669884ae4ddd109cec044
[ "Apache-2.0" ]
1
2019-12-26T07:16:06.000Z
2019-12-26T07:16:06.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...
43.313574
139
0.414384
from nose.plugins.attrib import attr from marvin.cloudstackTestCase import * from marvin.cloudstackAPI import * from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * from marvin.integration.lib.utils import is_snapshot_on_nfs ...
true
true
1c25392cca031b6a91f401d546c682d2accf606a
17,774
py
Python
pysimm/forcefield/gaff.py
AlleksD/pysimm
0f5149db00790cbd1ff2e6b9a4651879d91f187c
[ "MIT" ]
1
2017-01-19T21:19:22.000Z
2017-01-19T21:19:22.000Z
pysimm/forcefield/gaff.py
plin1112/pysimm
87260616d5fc56f362354c838e871436d45f588d
[ "MIT" ]
null
null
null
pysimm/forcefield/gaff.py
plin1112/pysimm
87260616d5fc56f362354c838e871436d45f588d
[ "MIT" ]
1
2019-05-30T08:12:31.000Z
2019-05-30T08:12:31.000Z
# ****************************************************************************** # pysimm.forcefield.gaff module # ****************************************************************************** # # ****************************************************************************** # License # *******************************...
40.395455
135
0.423709
import os from itertools import permutations, combinations import gasteiger from pysimm.system import Angle, Dihedral, Improper from forcefield import Forcefield class Gaff(Forcefield): """pysimm.forcefield.Gaff Forcefield object with typing rules for Gaff model. By default ...
false
true
1c253a2e1243e74ebee289f521ea63791247663b
408
py
Python
oop_pt1.py
rshaurya/udemy_flask_bootcamp
949a2c25d796efe2467ba460ddc0bb667ea00f29
[ "MIT" ]
null
null
null
oop_pt1.py
rshaurya/udemy_flask_bootcamp
949a2c25d796efe2467ba460ddc0bb667ea00f29
[ "MIT" ]
null
null
null
oop_pt1.py
rshaurya/udemy_flask_bootcamp
949a2c25d796efe2467ba460ddc0bb667ea00f29
[ "MIT" ]
null
null
null
# Inheritance... class Animal(): def __init__(self, fur): self.fur = fur print('animal created') def report(self): print('animal') def eat(self): print('eating') class Dog(Animal): def __init__(self, fur): Animal.__init__(self, fur) print('dog creat...
14.571429
34
0.54902
class Animal(): def __init__(self, fur): self.fur = fur print('animal created') def report(self): print('animal') def eat(self): print('eating') class Dog(Animal): def __init__(self, fur): Animal.__init__(self, fur) print('dog created') def re...
true
true
1c253a9c9bef0fb1af0ea096ccb1be545a34bc3e
79,803
py
Python
src/observations.py
paolodidio/flatland-bologna
3a493e686ae5c38f59b9f8230ce541cd0d0f4a9d
[ "MIT" ]
null
null
null
src/observations.py
paolodidio/flatland-bologna
3a493e686ae5c38f59b9f8230ce541cd0d0f4a9d
[ "MIT" ]
null
null
null
src/observations.py
paolodidio/flatland-bologna
3a493e686ae5c38f59b9f8230ce541cd0d0f4a9d
[ "MIT" ]
null
null
null
""" Collection of environment-specific ObservationBuilder. """ import collections from typing import Optional, List, Dict, Tuple from networkx.classes import graph from networkx.drawing.nx_pylab import draw import numpy as np from flatland.core.env import Environment from flatland.core.env_observation_builder import...
53.487265
185
0.583712
import collections from typing import Optional, List, Dict, Tuple from networkx.classes import graph from networkx.drawing.nx_pylab import draw import numpy as np from flatland.core.env import Environment from flatland.core.env_observation_builder import ObservationBuilder from flatland.core.env_prediction_builder i...
true
true
1c253aee9d27a43e463b7dfc786f7439dc7f89e5
1,826
py
Python
examples/paper/sun.py
AWehrhahn/SME
542e880ed779381f7cbbaaacb59475fa6a6d3537
[ "BSD-3-Clause" ]
14
2019-06-26T18:43:09.000Z
2022-03-12T00:53:42.000Z
examples/paper/sun.py
AWehrhahn/SME
542e880ed779381f7cbbaaacb59475fa6a6d3537
[ "BSD-3-Clause" ]
10
2020-03-01T15:21:23.000Z
2021-09-01T15:28:37.000Z
examples/paper/sun.py
AWehrhahn/SME
542e880ed779381f7cbbaaacb59475fa6a6d3537
[ "BSD-3-Clause" ]
6
2019-03-01T15:25:24.000Z
2022-03-30T10:26:33.000Z
from os.path import dirname, join from re import I import numpy as np from pysme.abund import Abund from pysme.gui import plot_plotly from pysme.linelist.vald import ValdFile from pysme.nso import load_solar_spectrum from pysme.persistence import save_as_idl from pysme.sme import SME_Structure from pysme.solve import...
27.253731
62
0.662103
from os.path import dirname, join from re import I import numpy as np from pysme.abund import Abund from pysme.gui import plot_plotly from pysme.linelist.vald import ValdFile from pysme.nso import load_solar_spectrum from pysme.persistence import save_as_idl from pysme.sme import SME_Structure from pysme.solve import...
true
true
1c253afde3436d2f179a9fa0a563bdc609271304
1,647
py
Python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/application_gateway_backend_health_server.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/application_gateway_backend_health_server.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/application_gateway_backend_health_server.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
41.175
98
0.645416
from msrest.serialization import Model class ApplicationGatewayBackendHealthServer(Model): _attribute_map = { 'address': {'key': 'address', 'type': 'str'}, 'ip_configuration': {'key': 'ipConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, 'health': {'key': 'health', 'ty...
true
true
1c25408458876e515063f6d51c48e6a21927d27b
1,675
py
Python
main.py
skibster/conference_central
6b977a10f21e9172f68ded6cf364a441be0fd23a
[ "Apache-2.0" ]
null
null
null
main.py
skibster/conference_central
6b977a10f21e9172f68ded6cf364a441be0fd23a
[ "Apache-2.0" ]
null
null
null
main.py
skibster/conference_central
6b977a10f21e9172f68ded6cf364a441be0fd23a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ main.py -- Udacity conference server-side Python App Engine HTTP controller handlers for memcache & task queue access $Id$ created by wesc on 2014 may 24 """ import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail from conference import Confe...
29.910714
69
0.658507
import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail from conference import ConferenceApi __author__ = 'wesc+api@google.com (Wesley Chun)' class SetAnnouncementHandler(webapp2.RequestHandler): def get(self): ConferenceApi._cacheAnnouncement() self....
true
true
1c2541657186be53f4e4c7461ecca38e71070ed1
85,337
py
Python
src/sage/combinat/skew_tableau.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
2
2019-06-02T03:16:59.000Z
2019-06-15T10:17:18.000Z
src/sage/combinat/skew_tableau.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/skew_tableau.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
1
2019-06-02T03:16:55.000Z
2019-06-02T03:16:55.000Z
r""" Skew Tableaux AUTHORS: - Mike Hansen: Initial version - Travis Scrimshaw, Arthur Lubovsky (2013-02-11): Factored out ``CombinatorialClass`` """ #***************************************************************************** # Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>, # Copyright (C) 2013 T...
33.46549
346
0.521626
from __future__ import print_function, absolute_import from six import add_metaclass from six.moves import range, zip from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentati...
true
true
1c2541a01e0ae8b592222b160719e05df1f5dab2
2,703
py
Python
py_wlc/economics/discount.py
textbook/py_wlc
dd54d747029d3528b5a2f78a43f22391f8a8c4f5
[ "MIT" ]
null
null
null
py_wlc/economics/discount.py
textbook/py_wlc
dd54d747029d3528b5a2f78a43f22391f8a8c4f5
[ "MIT" ]
1
2015-09-11T16:34:06.000Z
2015-09-11T16:34:06.000Z
py_wlc/economics/discount.py
textbook/py_wlc
dd54d747029d3528b5a2f78a43f22391f8a8c4f5
[ "MIT" ]
null
null
null
""":py:mod:`~.discount` enables the calculation of Present Value.""" from ..generic import ExtendedDict, IndexSeries class Discount(IndexSeries): """Discount rates and factors for calculating Present Value. The discount rate is assumed to be zero prior to ``year_zero``, and remain at the rate correspond...
34.21519
110
0.606363
from ..generic import ExtendedDict, IndexSeries class Discount(IndexSeries): RATES = {0: 0.035, 31: 0.03, 76: 0.025, 126: 0.02, 201: 0.015, 301: 0.01} def __init__(self, base_year, rates=None, year_zero=None): if rates is None: rates = self.RATES self._infill_rates(rates) ...
true
true
1c2544b4e3eb84d73e69367bbe3b0d94b80e94bd
7,404
py
Python
heatshrinkpy/core/decoder.py
yawor/heatshrinkpy
13e25d10cd42e2c76bba3d5fafbe85ec2d2a75d8
[ "0BSD" ]
null
null
null
heatshrinkpy/core/decoder.py
yawor/heatshrinkpy
13e25d10cd42e2c76bba3d5fafbe85ec2d2a75d8
[ "0BSD" ]
null
null
null
heatshrinkpy/core/decoder.py
yawor/heatshrinkpy
13e25d10cd42e2c76bba3d5fafbe85ec2d2a75d8
[ "0BSD" ]
null
null
null
from enum import Enum, auto from typing import Optional, Tuple from .consts import * from .common import OutputInfo, _validate_input_buffer_size, _validate_window_sz2, _validate_lookahead_sz2 class State(Enum): TAG_BIT = auto() YIELD_LITERAL = auto() BACKREF_INDEX_MSB = auto() BACKREF_INDEX_LSB = aut...
31.913793
106
0.596029
from enum import Enum, auto from typing import Optional, Tuple from .consts import * from .common import OutputInfo, _validate_input_buffer_size, _validate_window_sz2, _validate_lookahead_sz2 class State(Enum): TAG_BIT = auto() YIELD_LITERAL = auto() BACKREF_INDEX_MSB = auto() BACKREF_INDEX_LSB = aut...
true
true
1c25456e8d74e27b8f09ad0a4daff1c58232a56d
107
py
Python
examples/python/index.py
muka/mufaas
8945b2729773bbede0d45b5bc09ba247a72ec23e
[ "MIT" ]
6
2018-01-18T00:45:28.000Z
2019-12-02T22:11:34.000Z
templates/python/index.py
muka/mufaas
8945b2729773bbede0d45b5bc09ba247a72ec23e
[ "MIT" ]
null
null
null
templates/python/index.py
muka/mufaas
8945b2729773bbede0d45b5bc09ba247a72ec23e
[ "MIT" ]
null
null
null
import sys who = sys.argv[1] if len(sys.argv) > 1 and sys.argv[1] else 'Python' print('Hi ' + who + "!")
17.833333
68
0.598131
import sys who = sys.argv[1] if len(sys.argv) > 1 and sys.argv[1] else 'Python' print('Hi ' + who + "!")
true
true
1c2548456414cd67222c6ee121b028c0ff877f70
14,642
py
Python
nova/tests/api/openstack/compute/contrib/test_networks.py
bopopescu/nova-40
d8d5e4c4e30d0e605001ebab9f19005d2ea96f99
[ "Apache-2.0" ]
null
null
null
nova/tests/api/openstack/compute/contrib/test_networks.py
bopopescu/nova-40
d8d5e4c4e30d0e605001ebab9f19005d2ea96f99
[ "Apache-2.0" ]
null
null
null
nova/tests/api/openstack/compute/contrib/test_networks.py
bopopescu/nova-40
d8d5e4c4e30d0e605001ebab9f19005d2ea96f99
[ "Apache-2.0" ]
1
2020-07-24T09:44:17.000Z
2020-07-24T09:44:17.000Z
# Copyright 2011 Grid Dynamics # Copyright 2011 OpenStack Foundation # 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...
41.7151
79
0.616173
import copy import math import uuid import netaddr from oslo.config import cfg import webob from nova.api.openstack.compute.contrib import networks_associate from nova.api.openstack.compute.contrib import os_networks as networks import nova.context from nova import exception from nova import test from...
true
true
1c25491d4602c9535deaab666897d604f1adc0e2
2,547
py
Python
airsenal/scripts/fill_transaction_table.py
barbourians/AIrsenal
a251c8fa53cadbb65c78f14176da0e1dddef7b5a
[ "MIT" ]
null
null
null
airsenal/scripts/fill_transaction_table.py
barbourians/AIrsenal
a251c8fa53cadbb65c78f14176da0e1dddef7b5a
[ "MIT" ]
null
null
null
airsenal/scripts/fill_transaction_table.py
barbourians/AIrsenal
a251c8fa53cadbb65c78f14176da0e1dddef7b5a
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import argparse from ..framework.schema import Transaction, session_scope from ..framework.utils import get_players_for_gameweek, fetcher def add_transaction(player_id, gameweek, in_or_out, price, season, tag, session): """ add buy (in_or_out=1) or sell (in_or_out=-1) transa...
39.184615
122
0.704751
import os import argparse from ..framework.schema import Transaction, session_scope from ..framework.utils import get_players_for_gameweek, fetcher def add_transaction(player_id, gameweek, in_or_out, price, season, tag, session): t = Transaction(player_id=player_id, gameweek=gameweek, bought_or_sold=in_or_out...
true
true
1c25494beb7f6cf1323639ec4f9563b68c400df1
18,836
py
Python
nipype/interfaces/slicer/registration/brainsfit.py
nicholsn/nipype
6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3
[ "BSD-3-Clause" ]
1
2018-04-18T12:13:37.000Z
2018-04-18T12:13:37.000Z
nipype/interfaces/slicer/registration/brainsfit.py
ito-takuya/nipype
9099a5809487b55868cdec82a719030419cbd6ba
[ "BSD-3-Clause" ]
null
null
null
nipype/interfaces/slicer/registration/brainsfit.py
ito-takuya/nipype
9099a5809487b55868cdec82a719030419cbd6ba
[ "BSD-3-Clause" ]
1
2021-09-08T14:31:47.000Z
2021-09-08T14:31:47.000Z
# -*- coding: utf8 -*- """Autogenerated file - DO NOT EDIT If you spot a bug, please report it on the mailing list and/or change the generator.""" from nipype.interfaces.base import CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath i...
179.390476
738
0.778085
from nipype.interfaces.base import CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath import os class BRAINSFitInputSpec(CommandLineInputSpec): fixedVolume = File(desc="The fixed image for registration by mutual information opt...
true
true
1c254a726e7912473ed8e2e474a2fb0d602fee92
885
py
Python
learning/LearnPython3TheHardWay/ex19.py
AlexanderTN/Python
b4896c5bc179f1ac95955719a9869795c7325319
[ "Apache-2.0" ]
1
2021-09-09T11:43:13.000Z
2021-09-09T11:43:13.000Z
learning/LearnPython3TheHardWay/ex19.py
AlexanderTN/Python
b4896c5bc179f1ac95955719a9869795c7325319
[ "Apache-2.0" ]
null
null
null
learning/LearnPython3TheHardWay/ex19.py
AlexanderTN/Python
b4896c5bc179f1ac95955719a9869795c7325319
[ "Apache-2.0" ]
1
2021-09-09T11:43:15.000Z
2021-09-09T11:43:15.000Z
def get_age(name): # if name == "Fuck": # print("Mat day") # return 1 # else print("Khong mat day") return 19 #1 age = get_age("Tam") #2 xxx = input("> ") get_age(xxx) #3 get_age(xxx + "Tam") #4 def cheese_and_crackers(cheese_count, boxes_of_crackers): print(f"You have {cheese_count} cheeses!") print(f"Y...
22.125
68
0.723164
def get_age(name): print("Khong mat day") return 19 age = get_age("Tam") xxx = input("> ") get_age(xxx) get_age(xxx + "Tam") def cheese_and_crackers(cheese_count, boxes_of_crackers): print(f"You have {cheese_count} cheeses!") print(f"You have {boxes_of_crackers} boxes of crackers!") print("Man th...
true
true
1c254af4c7a084807ec7b34efd32ea8d21d834e2
9,047
py
Python
src/Selenium2Library/locators/elementfinder.py
Dmitry-Boyko/RobotFramework-Selenium2Library
4d0b97183bc3f470ac550052969edc8855a68fea
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/Selenium2Library/locators/elementfinder.py
Dmitry-Boyko/RobotFramework-Selenium2Library
4d0b97183bc3f470ac550052969edc8855a68fea
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/Selenium2Library/locators/elementfinder.py
Dmitry-Boyko/RobotFramework-Selenium2Library
4d0b97183bc3f470ac550052969edc8855a68fea
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from robot.api import logger from robot.utils import NormalizedDict from Selenium2Library.utils import escape_xpath_value, events class ElementFinder(object): def __init__(self): strategies = { 'identifier': self._find_by_identifier, 'id': self._find_by_id, 'name': se...
39.854626
100
0.595004
from robot.api import logger from robot.utils import NormalizedDict from Selenium2Library.utils import escape_xpath_value, events class ElementFinder(object): def __init__(self): strategies = { 'identifier': self._find_by_identifier, 'id': self._find_by_id, 'name': se...
true
true
1c254b675537120d0e75e52e21a415c842cb9a89
22,809
py
Python
test/functional/test_framework/util.py
adamsestak/bitcoin
cf57e33cc6d95a96f94b259d7680ff9b4f7e22cf
[ "MIT" ]
null
null
null
test/functional/test_framework/util.py
adamsestak/bitcoin
cf57e33cc6d95a96f94b259d7680ff9b4f7e22cf
[ "MIT" ]
null
null
null
test/functional/test_framework/util.py
adamsestak/bitcoin
cf57e33cc6d95a96f94b259d7680ff9b4f7e22cf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Helpful routines for regression testing.""" from base64 import b64encode from binascii import unhexlif...
39.123499
140
0.648867
from base64 import b64encode from binascii import unhexlify from decimal import Decimal, ROUND_DOWN import inspect import json import logging import os import random import re from subprocess import CalledProcessError import time from . import coverage from .authproxy import AuthServiceProxy, JSONRPCException fro...
true
true
1c254b6c7e58362c9fda4309d0cbc34520d04fc0
393
py
Python
mc_shoes/mc_shoes/wsgi.py
markdavidmc0/mc-shoes
71f5e6d127cb2175d3bfe2abbe25477d41e9a1c6
[ "MIT" ]
null
null
null
mc_shoes/mc_shoes/wsgi.py
markdavidmc0/mc-shoes
71f5e6d127cb2175d3bfe2abbe25477d41e9a1c6
[ "MIT" ]
null
null
null
mc_shoes/mc_shoes/wsgi.py
markdavidmc0/mc-shoes
71f5e6d127cb2175d3bfe2abbe25477d41e9a1c6
[ "MIT" ]
null
null
null
""" WSGI config for mc_shoes 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 django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETT...
23.117647
78
0.78626
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mc_shoes.settings') application = get_wsgi_application()
true
true
1c254b7b12da9e0896d14b08ebcd67f2ce5f88d7
3,941
py
Python
third_party/webrtc/src/chromium/src/build/android/lint/suppress.py
bopopescu/webrtc-streaming-node
727a441204344ff596401b0253caac372b714d91
[ "MIT" ]
8
2016-02-08T11:59:31.000Z
2020-05-31T15:19:54.000Z
third_party/webrtc/src/chromium/src/build/android/lint/suppress.py
bopopescu/webrtc-streaming-node
727a441204344ff596401b0253caac372b714d91
[ "MIT" ]
1
2016-01-29T00:54:49.000Z
2016-01-29T00:54:49.000Z
third_party/webrtc/src/chromium/src/build/android/lint/suppress.py
bopopescu/webrtc-streaming-node
727a441204344ff596401b0253caac372b714d91
[ "MIT" ]
7
2016-02-09T09:28:14.000Z
2020-07-25T19:03:36.000Z
#!/usr/bin/env python # # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Add all generated lint_result.xml files to suppressions.xml""" # pylint: disable=no-member import collections import optpar...
33.398305
78
0.709972
"""Add all generated lint_result.xml files to suppressions.xml""" import collections import optparse import os import sys from xml.dom import minidom _BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..') sys.path.append(_BUILD_ANDROID_DIR) from pylib import constants _THIS_FILE = os.path.absp...
false
true
1c254c80271e24ab1c175be523c03a22b6c327fb
10,680
py
Python
authors/apps/authentication/views.py
andela/ah-codeofduty
ab749037dbb08712a2e47848e31a1ccb14de1165
[ "BSD-3-Clause" ]
null
null
null
authors/apps/authentication/views.py
andela/ah-codeofduty
ab749037dbb08712a2e47848e31a1ccb14de1165
[ "BSD-3-Clause" ]
41
2018-10-23T08:45:43.000Z
2022-03-11T23:34:18.000Z
authors/apps/authentication/views.py
andela/ah-codeofduty
ab749037dbb08712a2e47848e31a1ccb14de1165
[ "BSD-3-Clause" ]
3
2020-05-01T16:21:13.000Z
2021-05-11T08:25:11.000Z
import os import jwt import sendgrid from datetime import datetime from rest_framework import status from rest_framework.generics import RetrieveUpdateAPIView, CreateAPIView from rest_framework.permissions import AllowAny, IsAuthenticated from social_django.utils import load_backend, load_strategy from social_core.exc...
41.55642
141
0.66882
import os import jwt import sendgrid from datetime import datetime from rest_framework import status from rest_framework.generics import RetrieveUpdateAPIView, CreateAPIView from rest_framework.permissions import AllowAny, IsAuthenticated from social_django.utils import load_backend, load_strategy from social_core.exc...
true
true
1c254cdc02d6101282df3d17bdc1a68dee59e8b3
1,827
py
Python
model/det/layers/rpn_detection_layer.py
qrsforever/torchcv
e2e17f730497fb838237357a1df4bf6ca278f107
[ "Apache-2.0" ]
308
2019-08-11T02:12:37.000Z
2022-03-30T07:20:41.000Z
model/det/layers/rpn_detection_layer.py
qrsforever/torchcv
e2e17f730497fb838237357a1df4bf6ca278f107
[ "Apache-2.0" ]
19
2019-08-22T04:57:33.000Z
2022-03-27T10:59:23.000Z
model/det/layers/rpn_detection_layer.py
qrsforever/torchcv
e2e17f730497fb838237357a1df4bf6ca278f107
[ "Apache-2.0" ]
64
2019-08-17T07:09:50.000Z
2022-03-27T11:23:39.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: Donny You(youansheng@gmail.com) import torch import torch.nn as nn class RPNDetectionLayer(nn.Module): def __init__(self, configer): super(RPNDetectionLayer, self).__init__() self.configer = configer self.num_anchors = self.configer....
33.218182
98
0.577997
import torch import torch.nn as nn class RPNDetectionLayer(nn.Module): def __init__(self, configer): super(RPNDetectionLayer, self).__init__() self.configer = configer self.num_anchors = self.configer.get('rpn', 'num_anchor_list') self.num_features = configer.get('rpn', 'num_f...
true
true
1c254dbfe1d276ad78307cd41f136e271ddb5ac9
370
py
Python
Python/Algorithms/1446.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
2
2021-01-15T17:22:54.000Z
2021-05-16T19:58:02.000Z
Python/Algorithms/1446.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
null
null
null
Python/Algorithms/1446.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
null
null
null
class Solution: def maxPower(self, s: str) -> int: max_subseq, count = 0, 0 current = s[0] for n in s: if n == current: count = count + 1 if count > max_subseq: max_subseq = count else: count = 1 ...
26.428571
38
0.418919
class Solution: def maxPower(self, s: str) -> int: max_subseq, count = 0, 0 current = s[0] for n in s: if n == current: count = count + 1 if count > max_subseq: max_subseq = count else: count = 1 ...
true
true
1c254e348f6dd415e185ff115eee2f482654a64b
12,389
py
Python
docs/examples/slidingpendulum.py
cklb/odes
945a461754c8155bca88aa83d725f77720a40539
[ "BSD-3-Clause" ]
95
2015-02-12T15:33:24.000Z
2022-03-07T12:57:46.000Z
docs/examples/slidingpendulum.py
cklb/odes
945a461754c8155bca88aa83d725f77720a40539
[ "BSD-3-Clause" ]
89
2015-01-22T12:42:26.000Z
2022-01-09T17:02:49.000Z
docs/examples/slidingpendulum.py
cklb/odes
945a461754c8155bca88aa83d725f77720a40539
[ "BSD-3-Clause" ]
29
2015-01-30T09:20:56.000Z
2022-02-23T03:50:15.000Z
# Authors: B. Malengier """ This example shows how to solve the sliding pendulum in full coordinate space. This results in a dae system. The problem is easily stated: A pendulum can slide with friction along a curve in a plane. We take the curve y = x^2+1/3 cos(\omega x) There is a mass M on the top part (on the...
33.942466
91
0.524498
from __future__ import print_function, division try: input = raw_input except: pass from numpy import (arange, zeros, array, sin, cos, asarray, sqrt, pi, empty) from scikits.odes import dae import pylab import os class Slidingpendulum(): deftend = 120. deftstep = 1e-2 defg = 9.8 defm =...
true
true
1c2552755aae0762f82c19576aedf3481c542e43
18,798
py
Python
tasks.py
vincenzo-gasparo/robotframework-browser
fd6cc3f414ddcd76ad4a2b8f03b5dc2ffe64aa01
[ "Apache-2.0" ]
null
null
null
tasks.py
vincenzo-gasparo/robotframework-browser
fd6cc3f414ddcd76ad4a2b8f03b5dc2ffe64aa01
[ "Apache-2.0" ]
null
null
null
tasks.py
vincenzo-gasparo/robotframework-browser
fd6cc3f414ddcd76ad4a2b8f03b5dc2ffe64aa01
[ "Apache-2.0" ]
null
null
null
import os import subprocess import sys import zipfile from pathlib import Path, PurePath import platform import re import shutil from invoke import task, Exit from robot import rebot_cli from robot import __version__ as robot_version try: from pabot import pabot import pytest from rellu import ReleaseNote...
30.665579
189
0.647516
import os import subprocess import sys import zipfile from pathlib import Path, PurePath import platform import re import shutil from invoke import task, Exit from robot import rebot_cli from robot import __version__ as robot_version try: from pabot import pabot import pytest from rellu import ReleaseNote...
true
true
1c255290d8d38473aa16da5a8f9b5cc248bdbc4b
430
py
Python
rameniaapp/migrations/0016_auto_20201015_0207.py
awlane/ramenia
6bf8e75a1f279ac584daa4ee19927ffccaa67551
[ "MIT" ]
null
null
null
rameniaapp/migrations/0016_auto_20201015_0207.py
awlane/ramenia
6bf8e75a1f279ac584daa4ee19927ffccaa67551
[ "MIT" ]
null
null
null
rameniaapp/migrations/0016_auto_20201015_0207.py
awlane/ramenia
6bf8e75a1f279ac584daa4ee19927ffccaa67551
[ "MIT" ]
null
null
null
# Generated by Django 3.1.1 on 2020-10-15 02:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rameniaapp', '0015_auto_20201012_2016'), ] operations = [ migrations.AlterField( model_name='profile', name='profile...
22.631579
85
0.613953
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rameniaapp', '0015_auto_20201012_2016'), ] operations = [ migrations.AlterField( model_name='profile', name='profile_pic', field=models.ImageField(blan...
true
true
1c2555535e726cfaa9e72d41568dbd120b8010f3
1,031
py
Python
twitoff/migrations/versions/10768123552a_.py
andrewwhite5/TwitOff
5ce228083b6f8d0d46b7403d4c6f98d4fdb747e7
[ "MIT" ]
null
null
null
twitoff/migrations/versions/10768123552a_.py
andrewwhite5/TwitOff
5ce228083b6f8d0d46b7403d4c6f98d4fdb747e7
[ "MIT" ]
4
2021-06-08T21:02:17.000Z
2022-03-12T00:24:25.000Z
twitoff/migrations/versions/10768123552a_.py
andrewwhite5/TwitOff
5ce228083b6f8d0d46b7403d4c6f98d4fdb747e7
[ "MIT" ]
null
null
null
"""empty message Revision ID: 10768123552a Revises: Create Date: 2020-02-18 19:56:09.624552 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '10768123552a' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
25.146341
65
0.659554
from alembic import op import sqlalchemy as sa revision = '10768123552a' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table('tweet', sa.Column('id', sa.Integer(), nullable=False), sa.Column('status', sa.String(), nullable=True), sa.Column('user_id', sa.I...
true
true
1c255774058cd3a1189878869d22842925523efd
20,082
py
Python
fluiddb/cache/test/test_permission.py
fluidinfo/fluiddb
b5a8c8349f3eaf3364cc4efba4736c3e33b30d96
[ "Apache-2.0" ]
3
2021-05-10T14:41:30.000Z
2021-12-16T05:53:30.000Z
fluiddb/cache/test/test_permission.py
fluidinfo/fluiddb
b5a8c8349f3eaf3364cc4efba4736c3e33b30d96
[ "Apache-2.0" ]
null
null
null
fluiddb/cache/test/test_permission.py
fluidinfo/fluiddb
b5a8c8349f3eaf3364cc4efba4736c3e33b30d96
[ "Apache-2.0" ]
2
2018-01-24T09:03:21.000Z
2021-06-25T08:34:54.000Z
import json from fluiddb.cache.permission import ( CachingPermissionAPI, CachingPermissionCheckerAPI, PermissionCache) from fluiddb.data.permission import ( Operation, Policy, TagPermission, NamespacePermission, getTagPermissions) from fluiddb.data.system import createSystemData from fluiddb.model.tag import T...
45.22973
79
0.6097
import json from fluiddb.cache.permission import ( CachingPermissionAPI, CachingPermissionCheckerAPI, PermissionCache) from fluiddb.data.permission import ( Operation, Policy, TagPermission, NamespacePermission, getTagPermissions) from fluiddb.data.system import createSystemData from fluiddb.model.tag import T...
true
true
1c2557c0b161884f953ac0a8b447417d59234c4b
461
py
Python
djassets/webp.py
pmaigutyak/djassets
90199d4a5c2e1474dde8706a9e7025cc2fa5ba56
[ "0BSD" ]
null
null
null
djassets/webp.py
pmaigutyak/djassets
90199d4a5c2e1474dde8706a9e7025cc2fa5ba56
[ "0BSD" ]
null
null
null
djassets/webp.py
pmaigutyak/djassets
90199d4a5c2e1474dde8706a9e7025cc2fa5ba56
[ "0BSD" ]
null
null
null
import httpagentparser WEBP_VALID_BROWSERS = ['Chrome', 'Opera', 'Opera Mobile'] def is_webp_supported(request): user_agent = request.META.get('HTTP_USER_AGENT') http_accept = request.META.get('HTTP_ACCEPT', '') if 'webp' in http_accept: return True if user_agent: data = httpagen...
20.954545
65
0.668113
import httpagentparser WEBP_VALID_BROWSERS = ['Chrome', 'Opera', 'Opera Mobile'] def is_webp_supported(request): user_agent = request.META.get('HTTP_USER_AGENT') http_accept = request.META.get('HTTP_ACCEPT', '') if 'webp' in http_accept: return True if user_agent: data = httpagen...
true
true
1c25588575547e3401d9bcac1630ed3ae47d83bf
337
py
Python
006 - Strings.py/017 - Outra forma Se tem vogais.py
rodrigoviannini/meus_Primeiros_Codigos
828dec1c4ce06889efd491145e631c30a45e858f
[ "MIT" ]
2
2021-07-22T23:26:54.000Z
2021-07-22T23:27:27.000Z
006 - Strings.py/017 - Outra forma Se tem vogais.py
rodrigoviannini/meus_Primeiros_Codigos
828dec1c4ce06889efd491145e631c30a45e858f
[ "MIT" ]
null
null
null
006 - Strings.py/017 - Outra forma Se tem vogais.py
rodrigoviannini/meus_Primeiros_Codigos
828dec1c4ce06889efd491145e631c30a45e858f
[ "MIT" ]
null
null
null
def possuiVogaisInLine1(string): return len([letra.lower() for letra in string if letra.lower() in 'aeiou']) > 0 # Garante um BOOLEAN def possuiVogaisInLine2(string): return True if True in [letra.lower() in 'aeiou' for letra in string] else False print(possuiVogaisInLine1("pssa vgs")) print(possuiVogaisInLin...
42.125
104
0.744807
def possuiVogaisInLine1(string): return len([letra.lower() for letra in string if letra.lower() in 'aeiou']) > 0 def possuiVogaisInLine2(string): return True if True in [letra.lower() in 'aeiou' for letra in string] else False print(possuiVogaisInLine1("pssa vgs")) print(possuiVogaisInLine2("nepd mspas"))
true
true
1c255ae441153f09753fbc6a1b77f4ef8432b136
14,733
py
Python
indico/web/rh.py
kadet1090/indico
36a1036017bdce5c910e889fea7017f18a1dd026
[ "MIT" ]
null
null
null
indico/web/rh.py
kadet1090/indico
36a1036017bdce5c910e889fea7017f18a1dd026
[ "MIT" ]
null
null
null
indico/web/rh.py
kadet1090/indico
36a1036017bdce5c910e889fea7017f18a1dd026
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import absolute_import, unicode_literals import cProfile import inspect import itertools ...
41.384831
120
0.631915
from __future__ import absolute_import, unicode_literals import cProfile import inspect import itertools import os import time from functools import partial, wraps import jsonschema from flask import current_app, g, redirect, request, session from sqlalchemy.exc import DatabaseError from sqlalchemy.orm.exc imp...
true
true
1c255afbdc9aeb1909f80923b8f14b80ded0361b
1,951
py
Python
aliyunsdkcore/acs_exception/exceptions.py
louielong/aliyun-ddns
ca3ff947ab1cf725c209b6ca5fccac21231d541f
[ "MIT" ]
7
2017-11-26T07:23:03.000Z
2019-10-31T06:46:49.000Z
aliyunsdkcore/acs_exception/exceptions.py
jancee/wjx-aliyun-python-ddns
cb9a132a16ead2b4159d80e3ea7c32193b590cd6
[ "MIT" ]
1
2018-11-22T03:39:14.000Z
2018-11-22T06:08:52.000Z
aliyunsdkcore/acs_exception/exceptions.py
louielong/aliyun-ddns
ca3ff947ab1cf725c209b6ca5fccac21231d541f
[ "MIT" ]
1
2018-11-22T06:14:16.000Z
2018-11-22T06:14:16.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...
21.921348
62
0.743721
import error_type class ClientException(Exception): def __init__(self, code, msg): Exception.__init__(self) self.__error_type = error_type.ERROR_TYPE_CLIENT self.message = msg self.error_code = code def set_error_code(self, code): self.error_code = code def set_error_msg(self, ms...
true
true
1c255bde9143f65e22c116d587819cbd76fc5214
2,731
py
Python
tests/test_engine/test_update/test_update_min.py
bobuk/montydb
9ee299e7f1d3a7236abb683e0dfe4f7817859b2c
[ "BSD-3-Clause" ]
478
2019-07-31T00:48:11.000Z
2022-03-18T09:12:29.000Z
tests/test_engine/test_update/test_update_min.py
bobuk/montydb
9ee299e7f1d3a7236abb683e0dfe4f7817859b2c
[ "BSD-3-Clause" ]
47
2019-07-28T10:12:22.000Z
2022-01-04T16:25:12.000Z
tests/test_engine/test_update/test_update_min.py
bobuk/montydb
9ee299e7f1d3a7236abb683e0dfe4f7817859b2c
[ "BSD-3-Clause" ]
26
2019-08-09T14:28:29.000Z
2022-02-22T02:49:51.000Z
from montydb.types import bson from datetime import datetime from ...conftest import skip_if_no_bson def test_update_min_1(monty_update, mongo_update): docs = [ {"a": 1} ] spec = {"$min": {"a": 0}} monty_c = monty_update(docs, spec) mongo_c = mongo_update(docs, spec) assert next(mo...
22.758333
56
0.59502
from montydb.types import bson from datetime import datetime from ...conftest import skip_if_no_bson def test_update_min_1(monty_update, mongo_update): docs = [ {"a": 1} ] spec = {"$min": {"a": 0}} monty_c = monty_update(docs, spec) mongo_c = mongo_update(docs, spec) assert next(mo...
true
true
1c255c3077fafafafaa40daee62fedb65bd70fae
2,680
py
Python
tests/cupyx_tests/linalg_tests/test_solve.py
prkhrsrvstv1/cupy
ea86c8225b575af9d2855fb77a306cf86fd098ea
[ "MIT" ]
6,180
2016-11-01T14:22:30.000Z
2022-03-31T08:39:20.000Z
tests/cupyx_tests/linalg_tests/test_solve.py
prkhrsrvstv1/cupy
ea86c8225b575af9d2855fb77a306cf86fd098ea
[ "MIT" ]
6,281
2016-12-22T07:42:31.000Z
2022-03-31T19:57:02.000Z
tests/cupyx_tests/linalg_tests/test_solve.py
prkhrsrvstv1/cupy
ea86c8225b575af9d2855fb77a306cf86fd098ea
[ "MIT" ]
829
2017-02-23T05:46:12.000Z
2022-03-27T17:40:03.000Z
import unittest import numpy import pytest import cupy from cupy.cuda import runtime from cupy import cusolver from cupy import testing import cupyx @testing.parameterize(*testing.product({ 'size': [5, 9, 17, 33], 'dtype': [numpy.float32, numpy.float64, numpy.complex64, numpy.complex128], })) @testing.gpu @...
31.529412
79
0.633582
import unittest import numpy import pytest import cupy from cupy.cuda import runtime from cupy import cusolver from cupy import testing import cupyx @testing.parameterize(*testing.product({ 'size': [5, 9, 17, 33], 'dtype': [numpy.float32, numpy.float64, numpy.complex64, numpy.complex128], })) @testing.gpu @...
true
true
1c255c691cdf5b4f91569ac504ae511965a64ffe
34,993
py
Python
ruff.py
kjcain/ruffer-overflow
2545a943f8a87d6850b79d93be7f3d44f623c086
[ "MIT" ]
1
2020-10-17T23:50:48.000Z
2020-10-17T23:50:48.000Z
ruff.py
kjcain/ruffer-overflow
2545a943f8a87d6850b79d93be7f3d44f623c086
[ "MIT" ]
7
2020-08-11T21:58:17.000Z
2020-08-11T22:11:49.000Z
ruff.py
kjcain/ruffer-overflow
2545a943f8a87d6850b79d93be7f3d44f623c086
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # MIT License # Copyright (c) 2020 Cain (kyler@kylercain.com) # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the ...
38.62362
301
0.639499
import datetime import getopt import os import platform import re import socket import struct import subprocess import sys import time PATTERN_SIZE = 5000 LOAD_TIME = 5 PLATFORM_WINDOWS = "windows" PLATFORM_LINUX = "linux" ARCH_16_BIT = "16-bit" ARCH_32_BIT = "32-bit" ARCH_...
true
true
1c255c8ca7497bd7560c2b3b5d93393c5bdee1de
6,448
py
Python
src/artisynth/core/util/matrixBindings.py
artisynth/artisynth_core
13848b88a64dc1ee7ce7571565971e3e5525efab
[ "Apache-2.0", "BSD-3-Clause" ]
30
2018-03-14T17:19:31.000Z
2022-02-08T15:02:38.000Z
src/artisynth/core/util/matrixBindings.py
artisynth/artisynth_core
13848b88a64dc1ee7ce7571565971e3e5525efab
[ "Apache-2.0", "BSD-3-Clause" ]
6
2018-05-02T21:17:34.000Z
2021-11-30T04:17:57.000Z
src/artisynth/core/util/matrixBindings.py
artisynth/artisynth_core
13848b88a64dc1ee7ce7571565971e3e5525efab
[ "Apache-2.0", "BSD-3-Clause" ]
18
2018-04-11T13:37:51.000Z
2022-02-01T21:17:57.000Z
import sys class NonconformingSizeException(Exception): "Jython exception for non-conforming argument sizes" from maspack.util import * from maspack.matrix import * from maspack.geometry import * from maspack.collision import * from maspack.render import * from maspack.solvers import * from artisynth.core.mechmodel...
31
73
0.716656
import sys class NonconformingSizeException(Exception): "Jython exception for non-conforming argument sizes" from maspack.util import * from maspack.matrix import * from maspack.geometry import * from maspack.collision import * from maspack.render import * from maspack.solvers import * from artisynth.core.mechmodel...
false
true
1c255e90e45cd0cd9b8d7c98b0c3614fcf1e93ce
2,117
py
Python
scratch/check_bispectrum.py
AdriJD/cmb_sst_ksw
635f0627a3c8a36c743cdf8955e3671352ab6d90
[ "MIT" ]
null
null
null
scratch/check_bispectrum.py
AdriJD/cmb_sst_ksw
635f0627a3c8a36c743cdf8955e3671352ab6d90
[ "MIT" ]
null
null
null
scratch/check_bispectrum.py
AdriJD/cmb_sst_ksw
635f0627a3c8a36c743cdf8955e3671352ab6d90
[ "MIT" ]
null
null
null
''' ''' import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import matplotlib.colors as colors import sys import os import numpy as np from scipy.special import spherical_jn sys.path.insert(0,'./../') import fisher lmin = 2 lmax = 200 opj = os.path.join ana_dir = '/mn/stornext/d8/ITA/spider/adri...
29.402778
100
0.663675
''' ''' import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import matplotlib.colors as colors import sys import os import numpy as np from scipy.special import spherical_jn sys.path.insert(0,'./../') import fisher lmin = 2 lmax = 200 opj = os.path.join ana_dir = '/mn/stornext/d8/ITA/spider/adri...
false
true
1c255f3932a0dd275fcda89798dc1317bba9bb96
2,717
py
Python
liggrep/ligand/matches.py
UnixJunkie/ligprep
49f5516e658eec873dbad0b00568fd649f5e69cd
[ "Apache-2.0" ]
1
2020-12-03T02:47:28.000Z
2020-12-03T02:47:28.000Z
liggrep/ligand/matches.py
UnixJunkie/ligprep
49f5516e658eec873dbad0b00568fd649f5e69cd
[ "Apache-2.0" ]
null
null
null
liggrep/ligand/matches.py
UnixJunkie/ligprep
49f5516e658eec873dbad0b00568fd649f5e69cd
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Jacob D. Durrant # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
34.392405
88
0.710342
from .. import scoria from rdkit import Chem from ..parameters import validate def get_ligand_selection_scoria_mol(ligand_mol, ligand_atom_mol_from_smarts): coors = ligand_mol.GetConformers()[0].GetPositions() substruc_coors = [] matches = ligand_mol.GetSubstructMatches(liga...
true
true
1c2560e905053ac115a73fbbfd7179a7944b16c2
332
py
Python
2020/day10/1.py
darkterbear/advent-of-code-2015
543d5a70c4b4c84081602cfa3d0ba05fe0693e54
[ "MIT" ]
null
null
null
2020/day10/1.py
darkterbear/advent-of-code-2015
543d5a70c4b4c84081602cfa3d0ba05fe0693e54
[ "MIT" ]
2
2019-12-01T20:03:18.000Z
2021-05-11T22:41:00.000Z
2020/day10/1.py
darkterbear/advent-of-code-2015
543d5a70c4b4c84081602cfa3d0ba05fe0693e54
[ "MIT" ]
null
null
null
import re file = open('./input', 'r') lines = file.readlines() nums = [0] + list(map(lambda line: int(line[:-1]), lines)) nums.append(max(nums) + 3) nums.sort() ones = 0 threes = 0 for i in range(1, len(nums)): diff = nums[i] - nums[i - 1] if diff == 1: ones += 1 elif diff == 3: threes += 1 print(one...
15.809524
58
0.572289
import re file = open('./input', 'r') lines = file.readlines() nums = [0] + list(map(lambda line: int(line[:-1]), lines)) nums.append(max(nums) + 3) nums.sort() ones = 0 threes = 0 for i in range(1, len(nums)): diff = nums[i] - nums[i - 1] if diff == 1: ones += 1 elif diff == 3: threes += 1 print(one...
true
true
1c25623261dd3c46d53ff16b6a110fbc886bdfce
3,335
py
Python
src/benchmarks/gc/src/commonlib/setup.py
saucecontrol/performance
07a9972ebb445b66e8524078502ac305c577891a
[ "MIT" ]
1
2020-04-15T01:29:12.000Z
2020-04-15T01:29:12.000Z
src/benchmarks/gc/src/commonlib/setup.py
saucecontrol/performance
07a9972ebb445b66e8524078502ac305c577891a
[ "MIT" ]
null
null
null
src/benchmarks/gc/src/commonlib/setup.py
saucecontrol/performance
07a9972ebb445b66e8524078502ac305c577891a
[ "MIT" ]
null
null
null
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. # See the LICENSE file in the project root for more information. from pathlib import Path from subprocess import call from sys import stdout from typing import cast from urllib import ...
34.739583
94
0.703748
from pathlib import Path from subprocess import call from sys import stdout from typing import cast from urllib import request from zipfile import ZipFile from .command import Command, CommandKind, CommandsMapping from .config import PERFVIEW_PATH, SIGCHECK64_PATH from .get_built import get_platform_name, is_arm f...
true
true
1c2562d003ca9d3be0417b982978177ae3c4dceb
3,116
py
Python
configs/matrixnet_dl733.py
lizhe960118/CenterNet
d1a0d13974e2316c6d127ca7860866cdd93bcfa7
[ "Apache-2.0" ]
92
2019-08-12T09:31:38.000Z
2022-03-17T06:22:41.000Z
configs/matrixnet_dl733.py
lizhe960118/CenterNet
d1a0d13974e2316c6d127ca7860866cdd93bcfa7
[ "Apache-2.0" ]
4
2019-08-15T09:06:01.000Z
2020-12-25T06:46:36.000Z
configs/matrixnet_dl733.py
lizhe960118/CenterNet
d1a0d13974e2316c6d127ca7860866cdd93bcfa7
[ "Apache-2.0" ]
18
2019-09-05T01:29:14.000Z
2021-06-29T13:10:11.000Z
# model settings model = dict( type='CenterNetFPN', #pretrained='open-mmlab://resnet50_caffe', backbone=dict( type='DLA2', base_name='dla34'), neck=dict( type='MatrixFPN', in_channels=[64], out_channels=256), bbox_head=dict( type='MatrixCenterHead', ...
25.752066
72
0.621309
model = dict( type='CenterNetFPN', backbone=dict( type='DLA2', base_name='dla34'), neck=dict( type='MatrixFPN', in_channels=[64], out_channels=256), bbox_head=dict( type='MatrixCenterHead', num_classes=20, in_channels=256, sta...
true
true
1c2563373244fdf6f39a200c07a9414ac377c4be
162,266
py
Python
python-package/lets_plot/plot/geom.py
IKrukov-HORIS/lets-plot
b772e4abcc4c715ef3c3a2e3db55abd4044f863f
[ "MIT" ]
null
null
null
python-package/lets_plot/plot/geom.py
IKrukov-HORIS/lets-plot
b772e4abcc4c715ef3c3a2e3db55abd4044f863f
[ "MIT" ]
null
null
null
python-package/lets_plot/plot/geom.py
IKrukov-HORIS/lets-plot
b772e4abcc4c715ef3c3a2e3db55abd4044f863f
[ "MIT" ]
null
null
null
# # Copyright (c) 2019. JetBrains s.r.o. # Use of this source code is governed by the MIT license that can be found in the LICENSE file. # from lets_plot.geo_data_internals.utils import is_geocoder from .core import FeatureSpec, LayerSpec from .util import as_annotated_data, is_geo_data_frame, geo_data_frame_to_wgs84, ...
38.726969
489
0.588515
from lets_plot.geo_data_internals.utils import is_geocoder from .core import FeatureSpec, LayerSpec from .util import as_annotated_data, is_geo_data_frame, geo_data_frame_to_wgs84, get_geo_data_frame_meta __all__ = ['geom_point', 'geom_path', 'geom_line', 'geom_smooth', 'geom_bar', 'geom_h...
true
true
1c256345bf7c26775b0db6c7ede6ab9b03d823df
18,147
py
Python
main.py
drophair/mimotion
61ca5d852b349bb2b535928664b0019ead98d2f1
[ "Apache-2.0" ]
null
null
null
main.py
drophair/mimotion
61ca5d852b349bb2b535928664b0019ead98d2f1
[ "Apache-2.0" ]
null
null
null
main.py
drophair/mimotion
61ca5d852b349bb2b535928664b0019ead98d2f1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf8 -*- # python >=3.8 import requests,time,re,json,random now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) headers = { 'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 9; MI 6 MIUI/20.6.18)' } #获取登录code def get_code(location): code_pattern = re.compile("(?<=access=).*?(?=...
112.018519
13,341
0.778366
import requests,time,re,json,random now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) headers = { 'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 9; MI 6 MIUI/20.6.18)' } def get_code(location): code_pattern = re.compile("(?<=access=).*?(?=&)") code = code_pattern.findall(location...
true
true
1c25634c1ea3d7029368b7206534d86303c16cf4
3,552
py
Python
script/multi_goals.py
swapdha/adlink_ddsbot
5e8e0c429b4e76eccdda60ab2df617174a234790
[ "Apache-2.0" ]
35
2017-09-11T09:09:47.000Z
2022-01-28T02:25:31.000Z
script/multi_goals.py
swapdha/adlink_ddsbot
5e8e0c429b4e76eccdda60ab2df617174a234790
[ "Apache-2.0" ]
1
2017-12-02T08:53:01.000Z
2017-12-02T08:53:01.000Z
script/multi_goals.py
swapdha/adlink_ddsbot
5e8e0c429b4e76eccdda60ab2df617174a234790
[ "Apache-2.0" ]
40
2017-09-12T09:27:37.000Z
2021-08-04T09:12:37.000Z
#!/usr/bin/env python # Copyright 2017 ADLINK Technology, Inc. # Developer: HaoChih, LIN (haochih.lin@adlinktech.com) # # 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...
38.608696
107
0.635135
import rospy import string import math import time import sys from std_msgs.msg import String from move_base_msgs.msg import MoveBaseActionResult from actionlib_msgs.msg import GoalStatusArray from geometry_msgs.msg import PoseStamped class MultiGoals: def __init__(self, goalListX, goalListY, retr...
true
true
1c2563633983910eab7fa3399b5ef57bf1bb288c
2,024
py
Python
utils/agent.py
Nikunj-Gupta/voi
ba7e3f887e92ccb97b11172831bdda33b57dbb13
[ "MIT" ]
null
null
null
utils/agent.py
Nikunj-Gupta/voi
ba7e3f887e92ccb97b11172831bdda33b57dbb13
[ "MIT" ]
null
null
null
utils/agent.py
Nikunj-Gupta/voi
ba7e3f887e92ccb97b11172831bdda33b57dbb13
[ "MIT" ]
null
null
null
import torch import utils from .other import device from value import VoI class Agent: """An agent. It is able: - to choose an action given an observation, - to analyze the feedback (i.e. reward and done state) of its action.""" def __init__(self, obs_space, action_space, model_dir, ...
35.508772
137
0.657609
import torch import utils from .other import device from value import VoI class Agent: def __init__(self, obs_space, action_space, model_dir, argmax=False, num_envs=1, use_memory=False, use_text=False, use_hammer=False, learn_voi=False): obs_space, self.preprocess_obss = utils.get_obss_...
true
true
1c2564ab20e627887ba3694f540a0e10fba2436f
2,761
py
Python
t_core/synchronizer.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
3
2017-06-02T19:26:27.000Z
2021-06-14T04:25:45.000Z
t_core/synchronizer.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
8
2016-08-24T07:04:07.000Z
2017-05-26T16:22:47.000Z
t_core/synchronizer.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
1
2019-10-31T06:00:23.000Z
2019-10-31T06:00:23.000Z
from util.seeded_random import Random from control_primitive import ControlPrimitive from messages import TransformationException, NIL_PACKET class Synchronizer(ControlPrimitive): ''' Synchonizes all threads of execution by merging the packets. ''' def __init__(self, threads=2, custom_m...
31.735632
96
0.523723
from util.seeded_random import Random from control_primitive import ControlPrimitive from messages import TransformationException, NIL_PACKET class Synchronizer(ControlPrimitive): def __init__(self, threads=2, custom_merge=lambda packets: None): super(Synchronizer, self) assert...
true
true
1c25654a8402c178e81b75abe663f6276ea22410
832
py
Python
17-CS-Python/01-Intro-Python-Overview/src/03_modules.py
shalevy1/data-science-journal
2a6beaf5bf328e257b638a695983457a9f3cd7ce
[ "MIT" ]
71
2019-03-05T04:44:48.000Z
2022-03-24T09:47:48.000Z
17-CS-Python/01-Intro-Python-Overview/src/03_modules.py
emichris/data-science-journal
2a6beaf5bf328e257b638a695983457a9f3cd7ce
[ "MIT" ]
null
null
null
17-CS-Python/01-Intro-Python-Overview/src/03_modules.py
emichris/data-science-journal
2a6beaf5bf328e257b638a695983457a9f3cd7ce
[ "MIT" ]
37
2019-03-07T05:08:03.000Z
2022-01-05T11:32:51.000Z
""" In this exercise, you'll be playing around with the sys module, which allows you to access many system specific variables and methods, and the os module, which gives you access to lower- level operating system functionality. """ import sys # See docs for the sys module: https://docs.python.org/3.7/library/sys.html...
25.212121
77
0.745192
import sys for arg in sys.argv: print(arg) print(sys.getwindowsversion()) # Print out the version of Python you're using: print(sys.version) import os print(os.getpid()) print(os.getcwd()) print(os.getlogin())
true
true
1c2565b40497b5b5fe8568b1be437dd51dcb8d4b
2,496
py
Python
src/transformers/models/blenderbot/__init__.py
SBrandeis/transformers
01a1684078c20be325fbe9422d924ac2cbb0522e
[ "Apache-2.0" ]
1
2021-01-11T19:59:56.000Z
2021-01-11T19:59:56.000Z
src/transformers/models/blenderbot/__init__.py
SBrandeis/transformers
01a1684078c20be325fbe9422d924ac2cbb0522e
[ "Apache-2.0" ]
null
null
null
src/transformers/models/blenderbot/__init__.py
SBrandeis/transformers
01a1684078c20be325fbe9422d924ac2cbb0522e
[ "Apache-2.0" ]
null
null
null
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. # Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
33.72973
115
0.735577
# module, but to preserve other warnings. So, don't check this module at all. from typing import TYPE_CHECKING from ...file_utils import _BaseLazyModule, is_tf_available, is_torch_available _import_structure = { "configuration_blenderbot": ["BLENDERBOT_PRETRAINED_CONFIG_ARCHIVE_MAP", "Blenderbot...
true
true
1c2566140f5aa47bace3b944405be48dc56493b5
4,065
py
Python
evaluation/CodeBLEU/utils.py
serjtroshin/PLBART
58e5de3041a2fc8b98e54648c6489fb3c23db9cb
[ "MIT" ]
99
2021-03-12T17:12:02.000Z
2022-03-29T03:04:14.000Z
evaluation/CodeBLEU/utils.py
serjtroshin/PLBART
58e5de3041a2fc8b98e54648c6489fb3c23db9cb
[ "MIT" ]
32
2021-03-24T15:43:02.000Z
2022-03-30T21:21:45.000Z
evaluation/CodeBLEU/utils.py
serjtroshin/PLBART
58e5de3041a2fc8b98e54648c6489fb3c23db9cb
[ "MIT" ]
18
2021-03-26T23:43:28.000Z
2022-03-24T05:55:05.000Z
# Natural Language Toolkit: Utility functions # # Copyright (C) 2001-2020 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from itertools import chain def pad_sequence( sequence, n, pad_left=False, ...
37.638889
126
0.590898
from itertools import chain def pad_sequence( sequence, n, pad_left=False, pad_right=False, left_pad_symbol=None, right_pad_symbol=None, ): sequence = iter(sequence) if pad_left: sequence = chain((left_pad_symbol,) * (n - 1), sequenc...
true
true
1c2566978bf46849c92ca64ae231fbcffa89f9b6
8,210
py
Python
aiida/backends/tests/cmdline/commands/test_code.py
iriberri/aiida_core
c4a1ec5dac92ee62c59d39ca580bde449f3abf73
[ "BSD-2-Clause" ]
null
null
null
aiida/backends/tests/cmdline/commands/test_code.py
iriberri/aiida_core
c4a1ec5dac92ee62c59d39ca580bde449f3abf73
[ "BSD-2-Clause" ]
null
null
null
aiida/backends/tests/cmdline/commands/test_code.py
iriberri/aiida_core
c4a1ec5dac92ee62c59d39ca580bde449f3abf73
[ "BSD-2-Clause" ]
1
2018-12-21T11:10:09.000Z
2018-12-21T11:10:09.000Z
"""Tests for the 'verdi code' command.""" import os import subprocess as sp from click.testing import CliRunner from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands.cmd_code import (setup_code, delete, hide, reveal, relabel, code_list, show) from aiida.common.exceptions import NotExistent # ...
41.05
120
0.642631
import os import subprocess as sp from click.testing import CliRunner from aiida.backends.testbase import AiidaTestCase from aiida.cmdline.commands.cmd_code import (setup_code, delete, hide, reveal, relabel, code_list, show) from aiida.common.exceptions import NotExistent class TestVerdiCodeSetup(AiidaTestCase): ...
true
true
1c256777f191e32403bdccb5f9c3a6140302f354
4,192
py
Python
BOFdat/core/dna.py
EBosi/BOFdat
30447be0759eac1811d05634bda198cdb192592f
[ "MIT" ]
null
null
null
BOFdat/core/dna.py
EBosi/BOFdat
30447be0759eac1811d05634bda198cdb192592f
[ "MIT" ]
null
null
null
BOFdat/core/dna.py
EBosi/BOFdat
30447be0759eac1811d05634bda198cdb192592f
[ "MIT" ]
null
null
null
""" DNA === This module generates BOFsc for the 4 bases of DNA (dATP, dTTP, dCTP and dGTP) """ BASES = ['A', 'T', 'C', 'G'] # Methods def _import_genome(fasta): from Bio import SeqIO genome = SeqIO.read(fasta, 'fasta') return genome def _import_model(path_to_model): import cobra extension = path...
34.644628
120
0.695611
BASES = ['A', 'T', 'C', 'G'] def _import_genome(fasta): from Bio import SeqIO genome = SeqIO.read(fasta, 'fasta') return genome def _import_model(path_to_model): import cobra extension = path_to_model.split('.')[-1] if extension == 'json': return cobra.io.load_json_model(path_to_model...
true
true
1c2568ee1574c1cd9984e88104d418411a19d675
376
py
Python
pro_test/myapp/models.py
MaLLLiYA/Django_test
a355d24995480e26cb4164de85513a36505e692f
[ "MIT" ]
null
null
null
pro_test/myapp/models.py
MaLLLiYA/Django_test
a355d24995480e26cb4164de85513a36505e692f
[ "MIT" ]
null
null
null
pro_test/myapp/models.py
MaLLLiYA/Django_test
a355d24995480e26cb4164de85513a36505e692f
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Student(models.Model): name = models.CharField(max_length=10) age = models.IntegerField() sex = models.CharField(max_length=10) def __str__(self): return self.name class Course(models.Model): name = models.CharField(max_leng...
18.8
42
0.68617
from django.db import models class Student(models.Model): name = models.CharField(max_length=10) age = models.IntegerField() sex = models.CharField(max_length=10) def __str__(self): return self.name class Course(models.Model): name = models.CharField(max_length=10) def __str__(se...
true
true
1c2569aa419f5da41116b6fbf3ac28829dd6ba48
69
py
Python
example_files/code.py
ashishkharche/cli_text_processing_coreutils
80e104bb6b8b81d1a3df3a2220e80ce171ba476c
[ "MIT" ]
87
2021-08-07T13:04:23.000Z
2022-03-16T15:27:23.000Z
example_files/code.py
ashishkharche/cli_text_processing_coreutils
80e104bb6b8b81d1a3df3a2220e80ce171ba476c
[ "MIT" ]
null
null
null
example_files/code.py
ashishkharche/cli_text_processing_coreutils
80e104bb6b8b81d1a3df3a2220e80ce171ba476c
[ "MIT" ]
4
2021-10-09T05:49:11.000Z
2021-11-26T02:37:48.000Z
def compute(x, y): if x > y: print('hello') else: print('bye')
11.5
18
0.550725
def compute(x, y): if x > y: print('hello') else: print('bye')
true
true
1c256a338c9d2e4eb4b590ee5a9c1c31549330ac
16,525
py
Python
pgoapi/protos/POGOProtos/Settings/Master/PokemonSettings_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
pgoapi/protos/POGOProtos/Settings/Master/PokemonSettings_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
pgoapi/protos/POGOProtos/Settings/Master/PokemonSettings_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Settings/Master/PokemonSettings.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from g...
59.442446
2,273
0.772042
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from...
true
true
1c256a39b886976e85fabbefc41ea361311ab78f
6,834
py
Python
blockchain/timestamping.py
willamm/dragonchain
c3a619e452b6256920ed15ccf5e5263a33dc33e1
[ "Apache-2.0" ]
18
2016-12-05T22:36:07.000Z
2021-11-14T14:13:09.000Z
blockchain/timestamping.py
willamm/dragonchain
c3a619e452b6256920ed15ccf5e5263a33dc33e1
[ "Apache-2.0" ]
null
null
null
blockchain/timestamping.py
willamm/dragonchain
c3a619e452b6256920ed15ccf5e5263a33dc33e1
[ "Apache-2.0" ]
12
2016-12-24T14:18:13.000Z
2020-07-22T21:11:36.000Z
""" Copyright 2016 Disney Connected and Advanced Technologies Licensed under the Apache License, Version 2.0 (the "Apache License") with the following modification; you may not use this file except in compliance with the Apache License and the following modification to it: Section 6. Trademarks. is deleted and replace...
36.351064
108
0.658911
""" Copyright 2016 Disney Connected and Advanced Technologies Licensed under the Apache License, Version 2.0 (the "Apache License") with the following modification; you may not use this file except in compliance with the Apache License and the following modification to it: Section 6. Trademarks. is deleted and replace...
false
true
1c256b1dfedf232dd6e9733f061ee0fcac30aeab
2,045
py
Python
zerver/webhooks/netlify/view.py
kaustubh-nair/zulip
fb96407607c1f42b350980ad13af20b884750606
[ "Apache-2.0" ]
6
2019-05-09T20:43:20.000Z
2022-03-29T05:53:50.000Z
zerver/webhooks/netlify/view.py
kaustubh-nair/zulip
fb96407607c1f42b350980ad13af20b884750606
[ "Apache-2.0" ]
2
2016-10-18T04:01:56.000Z
2016-10-20T18:19:09.000Z
zerver/webhooks/netlify/view.py
kaustubh-nair/zulip
fb96407607c1f42b350980ad13af20b884750606
[ "Apache-2.0" ]
7
2016-08-10T02:24:32.000Z
2022-03-28T15:14:18.000Z
from typing import Any, Dict, Iterable from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.webhooks.common import ( UnexpectedWebhookEventType...
37.181818
99
0.71198
from typing import Any, Dict, Iterable from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.webhooks.common import ( UnexpectedWebhookEventType...
true
true
1c256cf350aa1e3fdc86ecc97594c4f7aa8368a1
17,567
py
Python
decode.py
ucfnlp/summarization-sing-pair-mix
994f6246431255bb2cabbfd515d07c84cf94e870
[ "BSD-3-Clause" ]
70
2019-06-02T23:31:14.000Z
2022-03-10T17:35:28.000Z
decode.py
ucfnlp/summarization-sing-pair-mix
994f6246431255bb2cabbfd515d07c84cf94e870
[ "BSD-3-Clause" ]
11
2019-06-06T08:01:55.000Z
2020-01-15T06:16:16.000Z
decode.py
ucfnlp/summarization-sing-pair-mix
994f6246431255bb2cabbfd515d07c84cf94e870
[ "BSD-3-Clause" ]
11
2019-08-07T07:26:19.000Z
2020-09-10T13:03:42.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # Modifications Copyright 2017 Abigail See # Modifications made 2018 by Logan Lebanoff # # 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 Licen...
54.386997
250
0.646212
import glob import os import time import tensorflow as tf import beam_search import data import json import util from tqdm import tqdm from absl import flags from absl import logging import rouge_functions from batcher import create_batch import ssi_functions FLAGS = flags.FLAGS SECS_UNTIL_NEW_CKPT...
true
true
1c256daeea42ba9d48bac1773cc8513c70507a65
1,573
py
Python
mongoengine/signals.py
99co/mongoengine
ce2c587b1bf910965cc09388951fdeb02e68ece7
[ "MIT" ]
21
2015-08-05T03:40:28.000Z
2021-06-05T05:29:55.000Z
mongoengine/signals.py
99co/mongoengine
ce2c587b1bf910965cc09388951fdeb02e68ece7
[ "MIT" ]
9
2015-07-24T23:13:06.000Z
2022-02-25T17:34:09.000Z
mongoengine/signals.py
99co/mongoengine
ce2c587b1bf910965cc09388951fdeb02e68ece7
[ "MIT" ]
5
2015-11-18T23:20:20.000Z
2021-02-02T02:31:07.000Z
# -*- coding: utf-8 -*- __all__ = ['pre_save', 'post_save', 'pre_delete', 'post_delete'] signals_available = False try: from blinker import Namespace signals_available = True except ImportError: class Namespace(object): def signal(self, name, doc=None): return _FakeSignal(name, doc) ...
35.75
71
0.6548
__all__ = ['pre_save', 'post_save', 'pre_delete', 'post_delete'] signals_available = False try: from blinker import Namespace signals_available = True except ImportError: class Namespace(object): def signal(self, name, doc=None): return _FakeSignal(name, doc) class _FakeSignal(ob...
true
true
1c256e5a88b7b62b5eb4cf9aebb4c96e4c667eb9
784
py
Python
prtx_faq/__init__.py
raphaelm/prtx-faq
384b28e14f389aef3a2be09f832573774f245866
[ "Apache-2.0" ]
null
null
null
prtx_faq/__init__.py
raphaelm/prtx-faq
384b28e14f389aef3a2be09f832573774f245866
[ "Apache-2.0" ]
null
null
null
prtx_faq/__init__.py
raphaelm/prtx-faq
384b28e14f389aef3a2be09f832573774f245866
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import gettext_lazy class PluginApp(AppConfig): name = 'prtx_faq' verbose_name = 'A FAQ plugin for pretalx and pretix' class PretixPluginMeta: name = gettext_lazy('Frequently Asked Questions') author = 'Tobias Kunze' ...
28
74
0.665816
from django.apps import AppConfig from django.utils.translation import gettext_lazy class PluginApp(AppConfig): name = 'prtx_faq' verbose_name = 'A FAQ plugin for pretalx and pretix' class PretixPluginMeta: name = gettext_lazy('Frequently Asked Questions') author = 'Tobias Kunze' ...
true
true
1c256f489be426b755c25433b2af8272183a5fe4
344
py
Python
myconnectome/utils/getmd5sum.py
poldrack/myconnectome
201f414b3165894d6fe0be0677c8a58f6d161948
[ "MIT" ]
28
2015-04-02T16:43:14.000Z
2020-06-17T20:04:26.000Z
myconnectome/utils/getmd5sum.py
poldrack/myconnectome
201f414b3165894d6fe0be0677c8a58f6d161948
[ "MIT" ]
11
2015-05-19T02:57:22.000Z
2017-03-17T17:36:16.000Z
myconnectome/utils/getmd5sum.py
poldrack/myconnectome
201f414b3165894d6fe0be0677c8a58f6d161948
[ "MIT" ]
10
2015-05-21T17:01:26.000Z
2020-11-11T04:28:08.000Z
# -*- coding: utf-8 -*- """ Created on Fri Jul 3 09:40:16 2015 @author: poldrack """ import hashlib def getmd5sum(fname, blocksize=65536): afile=open(fname,'rb') hasher=hashlib.md5() buf = afile.read(blocksize) while len(buf) > 0: hasher.update(buf) buf = afile.read(blocksize) re...
19.111111
38
0.627907
import hashlib def getmd5sum(fname, blocksize=65536): afile=open(fname,'rb') hasher=hashlib.md5() buf = afile.read(blocksize) while len(buf) > 0: hasher.update(buf) buf = afile.read(blocksize) return hasher.hexdigest()
true
true
1c2570075dff417854a7c587ac645b1699a96f38
10,293
py
Python
vcd2wavedrom.py
lbaitemple/vcd2wavedrom
07d73885d7eafd221212e318e0cceb10677561ac
[ "MIT" ]
1
2021-04-06T08:12:48.000Z
2021-04-06T08:12:48.000Z
vcd2wavedrom.py
lbaitemple/vcd2wavedrom
07d73885d7eafd221212e318e0cceb10677561ac
[ "MIT" ]
null
null
null
vcd2wavedrom.py
lbaitemple/vcd2wavedrom
07d73885d7eafd221212e318e0cceb10677561ac
[ "MIT" ]
1
2021-04-06T08:12:51.000Z
2021-04-06T08:12:51.000Z
import sys import os import argparse import json import re from vcdvcd import VCDVCD HTML_BFORMAT=""" <html> <script src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/2.6.8/skins/default.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/2.6.8/wavedrom.min.js" type="t...
30.633929
117
0.510055
import sys import os import argparse import json import re from vcdvcd import VCDVCD HTML_BFORMAT=""" <html> <script src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/2.6.8/skins/default.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/2.6.8/wavedrom.min.js" type="t...
true
true
1c25700bd00a7dc681dd4d88edcf6664685a1944
173
py
Python
main.py
l3d00m/Twitter-to-Reddit
99da44749274f4704dac1eb8da24895277b558a5
[ "MIT" ]
4
2016-10-25T06:38:39.000Z
2021-02-06T03:52:13.000Z
main.py
l3d00m/Twitter-to-Reddit
99da44749274f4704dac1eb8da24895277b558a5
[ "MIT" ]
1
2017-10-24T02:39:07.000Z
2022-01-02T12:42:36.000Z
main.py
l3d00m/Twitter-to-Reddit
99da44749274f4704dac1eb8da24895277b558a5
[ "MIT" ]
2
2017-10-24T02:32:23.000Z
2017-10-26T02:39:31.000Z
def main(): from TwitterToReddit.bot import start import logging logging.getLogger().setLevel(logging.DEBUG) start() if __name__ == '__main__': main()
17.3
47
0.67052
def main(): from TwitterToReddit.bot import start import logging logging.getLogger().setLevel(logging.DEBUG) start() if __name__ == '__main__': main()
true
true
1c2571987600849f992e6289f89d01f3a30e21d8
6,329
py
Python
2015/21_rpg.py
pchudzik/adventofcode
e1d6521621f6ca90f9dc53cf3d1ed5b8c5c2b7d1
[ "MIT" ]
null
null
null
2015/21_rpg.py
pchudzik/adventofcode
e1d6521621f6ca90f9dc53cf3d1ed5b8c5c2b7d1
[ "MIT" ]
null
null
null
2015/21_rpg.py
pchudzik/adventofcode
e1d6521621f6ca90f9dc53cf3d1ed5b8c5c2b7d1
[ "MIT" ]
null
null
null
""" --- Day 21: RPG Simulator 20XX --- Little Henry Case got a new video game for Christmas. It's an RPG, and he's stuck on a boss. He needs to know what equipment to buy at the shop. He hands you the controller. In this game, the player (you) and the enemy (the boss) take turns attacking. The player always goes firs...
32.45641
120
0.649866
class Character: def __init__(self, hit_points, damage, armor, inventory_cost=0): self.hit_points = hit_points self.damage = damage self.armor = armor self.inventory_cost = inventory_cost def attack(self, other_character): damage = self.damage - other_character.armor ...
true
true
1c2571e21b5aa5cd253e89dfe29a27ba12e91f77
501
py
Python
quiz_mill/run_papermill.py
eoas-ubc/quiz_mill
922989244964e2147ecac9186bdafae8d8f91813
[ "MIT", "BSD-3-Clause" ]
null
null
null
quiz_mill/run_papermill.py
eoas-ubc/quiz_mill
922989244964e2147ecac9186bdafae8d8f91813
[ "MIT", "BSD-3-Clause" ]
null
null
null
quiz_mill/run_papermill.py
eoas-ubc/quiz_mill
922989244964e2147ecac9186bdafae8d8f91813
[ "MIT", "BSD-3-Clause" ]
1
2021-06-01T23:03:17.000Z
2021-06-01T23:03:17.000Z
import click import subprocess from pathlib import Path import contextlib @click.group() def main(): pass @main.command() @click.argument("parameter_file") def doit(parameter_file): arglist=['papermill','--help'] result = subprocess.run(arglist, capture_output=True) if result.stdout: print(f...
20.04
67
0.682635
import click import subprocess from pathlib import Path import contextlib @click.group() def main(): pass @main.command() @click.argument("parameter_file") def doit(parameter_file): arglist=['papermill','--help'] result = subprocess.run(arglist, capture_output=True) if result.stdout: print(f...
true
true
1c257412bf94ad3d49dce1fd3b9971087ba503d9
907
py
Python
strategy/nn_utils.py
nibrunie/thegameia
e320aef799da44d61087099527c57dc3a518e6bd
[ "MIT" ]
1
2019-04-26T16:57:51.000Z
2019-04-26T16:57:51.000Z
strategy/nn_utils.py
nibrunie/thegameia
e320aef799da44d61087099527c57dc3a518e6bd
[ "MIT" ]
null
null
null
strategy/nn_utils.py
nibrunie/thegameia
e320aef799da44d61087099527c57dc3a518e6bd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np def value_to_one_hot(value): """ covert index @p value to a one-hot vector of size 60 (card state) encoding index """ vector = new_empty_vector() vector[value-1] = 1 return vector def new_empty_vector(): return np.zeros(60) def stack_state_to_v...
31.275862
91
0.679162
import numpy as np def value_to_one_hot(value): vector = new_empty_vector() vector[value-1] = 1 return vector def new_empty_vector(): return np.zeros(60) def stack_state_to_vector(stack_state): assert len(stack_state) == 2 vector = np.zeros(2 * 60) for index, card in enumerate(stack_st...
true
true
1c2574141b6b52661bc67cccf0cd9cd0a217bd0c
26,572
py
Python
emission/tests/analysisTests/resultTests/TestTimeGrouping.py
Andrew-Tan/e-mission-server
91d59bee86e63d803e401f10f4b6a2502effedda
[ "BSD-3-Clause" ]
null
null
null
emission/tests/analysisTests/resultTests/TestTimeGrouping.py
Andrew-Tan/e-mission-server
91d59bee86e63d803e401f10f4b6a2502effedda
[ "BSD-3-Clause" ]
1
2017-08-31T19:54:16.000Z
2017-08-31T19:54:16.000Z
emission/tests/analysisTests/resultTests/TestTimeGrouping.py
Andrew-Tan/e-mission-server
91d59bee86e63d803e401f10f4b6a2502effedda
[ "BSD-3-Clause" ]
null
null
null
# Standard imports import unittest import logging import pandas as pd import uuid import arrow import dateutil.tz as tz # Our imports import emission.core.get_database as edb import emission.tests.common as etc import emission.analysis.result.metrics.time_grouping as earmt import emission.analysis.result.metrics.simp...
49.482309
105
0.612826
import unittest import logging import pandas as pd import uuid import arrow import dateutil.tz as tz import emission.core.get_database as edb import emission.tests.common as etc import emission.analysis.result.metrics.time_grouping as earmt import emission.analysis.result.metrics.simple_metrics as earmts import em...
true
true
1c2575b8041f21c9ccefdfcf3c1530c9a16cd92a
486
py
Python
calculation/config/calculation.py
riconova92/calculation
a5bdafdd064a44639fb4a400c7f4eaec94db32b4
[ "MIT" ]
1
2020-06-14T20:20:14.000Z
2020-06-14T20:20:14.000Z
calculation/config/calculation.py
riconova92/calculation
a5bdafdd064a44639fb4a400c7f4eaec94db32b4
[ "MIT" ]
null
null
null
calculation/config/calculation.py
riconova92/calculation
a5bdafdd064a44639fb4a400c7f4eaec94db32b4
[ "MIT" ]
1
2020-06-14T20:15:22.000Z
2020-06-14T20:15:22.000Z
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Document"), "items": [ { "type": "doctype", "name": "Rebate Calculation", "description":_("Rebate Calculation"), "onboard": 1, }, ] }, { "label": _("Setup"...
17.357143
44
0.483539
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Document"), "items": [ { "type": "doctype", "name": "Rebate Calculation", "description":_("Rebate Calculation"), "onboard": 1, }, ] }, { "label": _("Setup"...
true
true
1c257698a5f5f0910b60590d141c1da91ab49fdd
380
py
Python
handler/IndexHandler.py
amfox/af_sbs
327a0a68731e905818b24aaf4efb35cfd0d29637
[ "MIT" ]
null
null
null
handler/IndexHandler.py
amfox/af_sbs
327a0a68731e905818b24aaf4efb35cfd0d29637
[ "MIT" ]
null
null
null
handler/IndexHandler.py
amfox/af_sbs
327a0a68731e905818b24aaf4efb35cfd0d29637
[ "MIT" ]
null
null
null
# coding=utf-8 from datetime import datetime from tornado.web import RequestHandler __author__ = 'TIF' def tick(): print('Tick! The time is: %s' % datetime.now()) class IndexHandler(RequestHandler): def get(self): # self.application.scheduler.add_job(tick, 'interval', seconds=3) import pdb ...
20
73
0.663158
from datetime import datetime from tornado.web import RequestHandler __author__ = 'TIF' def tick(): print('Tick! The time is: %s' % datetime.now()) class IndexHandler(RequestHandler): def get(self): import pdb pdb.set_trace() self.write("Hello, world")
true
true
1c2577c9a01b92d0fd18ca7841a7bf70835d0995
5,920
py
Python
digits/dataset/tasks/parse_folder.py
TimZaman/DIGITS
820c82f257233845f21a9ef2addd84d3c59cf006
[ "BSD-3-Clause" ]
4
2016-09-12T08:29:05.000Z
2017-07-10T18:29:26.000Z
digits/dataset/tasks/parse_folder.py
Acidburn0zzz/DIGITS
820c82f257233845f21a9ef2addd84d3c59cf006
[ "BSD-3-Clause" ]
1
2017-07-09T13:48:39.000Z
2017-07-09T13:48:39.000Z
digits/dataset/tasks/parse_folder.py
Acidburn0zzz/DIGITS
820c82f257233845f21a9ef2addd84d3c59cf006
[ "BSD-3-Clause" ]
4
2016-12-07T01:59:19.000Z
2019-03-07T21:45:05.000Z
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import import os.path import re import sys import digits from digits import utils from digits.task import Task from digits.utils import subclass, override # NOTE: Increment this everytime the pickled object PICKLE_VE...
32.888889
101
0.581419
from __future__ import absolute_import import os.path import re import sys import digits from digits import utils from digits.task import Task from digits.utils import subclass, override PICKLE_VERSION = 1 @subclass class ParseFolderTask(Task): def __init__(self, folder, **kwargs): percent_va...
true
true
1c2578f894d6383792c14622b3fdee9fb3396b2f
3,412
py
Python
mpld3/test_plots/test_mouse_events.py
odidev/mpld3
7bb37b9a9e6d1c90dd9f83075d1987541bb087d5
[ "BSD-3-Clause" ]
1,101
2016-04-20T18:35:09.000Z
2022-03-31T10:52:22.000Z
mpld3/test_plots/test_mouse_events.py
odidev/mpld3
7bb37b9a9e6d1c90dd9f83075d1987541bb087d5
[ "BSD-3-Clause" ]
172
2016-04-20T18:19:21.000Z
2022-03-16T13:44:08.000Z
mpld3/test_plots/test_mouse_events.py
odidev/mpld3
7bb37b9a9e6d1c90dd9f83075d1987541bb087d5
[ "BSD-3-Clause" ]
195
2016-04-21T17:39:12.000Z
2022-03-16T05:10:09.000Z
"""Plot to test mouse events""" import matplotlib.pyplot as plt import numpy as np import mpld3, mpld3.plugins as plugins random_x = [0.037984906849671374, 0.5880357008425118, 0.47736125281329767, 0.010304252492200239, 0.35796828706754447, 0.23109561146897417, 0.8631302372372742, 0.13444834717909937, 0.505639786123066...
65.615385
1,038
0.760844
import matplotlib.pyplot as plt import numpy as np import mpld3, mpld3.plugins as plugins random_x = [0.037984906849671374, 0.5880357008425118, 0.47736125281329767, 0.010304252492200239, 0.35796828706754447, 0.23109561146897417, 0.8631302372372742, 0.13444834717909937, 0.5056397861230668, 0.024528122585731227, 0.53728...
true
true
1c2579a35a5f88a8dd6bed147b84936b46507ade
3,945
py
Python
test/functional/zerocoin_wrapped_serials.py
ekkakon/vpcpos
4a6fb8ca0220baaaf3cc3bc6bcfc3c1218a931a8
[ "MIT" ]
null
null
null
test/functional/zerocoin_wrapped_serials.py
ekkakon/vpcpos
4a6fb8ca0220baaaf3cc3bc6bcfc3c1218a931a8
[ "MIT" ]
null
null
null
test/functional/zerocoin_wrapped_serials.py
ekkakon/vpcpos
4a6fb8ca0220baaaf3cc3bc6bcfc3c1218a931a8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019 The PIVX developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Covers the 'Wrapped Serials Attack' scenario ''' import random from time import sleep from test_framework.authpr...
36.192661
107
0.601521
import random from time import sleep from test_framework.authproxy import JSONRPCException from test_framework.util import assert_equal, assert_greater_than from fake_stake.base_test import VoltPotCoin_FakeStakeTest class zVPCwrappedSerialsTest(VoltPotCoin_FakeStakeTest): def run_test(self): q = 7...
true
true
1c2579ca0cb460320745cd6bf615876a1c8600e5
545
py
Python
sphinxhypothesis/extension.py
humitos/sphinx-hypothesis
b75f1d406a7cdf89083d86a7a893dcd5bdd9f78f
[ "MIT" ]
2
2021-01-03T01:54:16.000Z
2021-02-25T01:14:41.000Z
sphinxhypothesis/extension.py
humitos/sphinx-hypothesis
b75f1d406a7cdf89083d86a7a893dcd5bdd9f78f
[ "MIT" ]
null
null
null
sphinxhypothesis/extension.py
humitos/sphinx-hypothesis
b75f1d406a7cdf89083d86a7a893dcd5bdd9f78f
[ "MIT" ]
null
null
null
import json def add_js_files(app, config, **kwargs): app.add_js_file(None, **{ 'type': 'application/json', 'class': 'js-hypothesis-config', 'body': json.dumps(app.config.hypothesis_config), }) app.add_js_file('https://hypothes.is/embed.js', **{'async': 'async'}) def setup(app): ...
28.684211
73
0.647706
import json def add_js_files(app, config, **kwargs): app.add_js_file(None, **{ 'type': 'application/json', 'class': 'js-hypothesis-config', 'body': json.dumps(app.config.hypothesis_config), }) app.add_js_file('https://hypothes.is/embed.js', **{'async': 'async'}) def setup(app): ...
true
true
1c257a87da27abb475465d9139e1aa240c244228
738
py
Python
setup.py
arogozhnikov/mlp-mixer-pytorch
d35ad56cc61a1098cbac473c053a2c1c2472d029
[ "MIT" ]
1
2021-05-10T10:03:10.000Z
2021-05-10T10:03:10.000Z
setup.py
arogozhnikov/mlp-mixer-pytorch
d35ad56cc61a1098cbac473c053a2c1c2472d029
[ "MIT" ]
null
null
null
setup.py
arogozhnikov/mlp-mixer-pytorch
d35ad56cc61a1098cbac473c053a2c1c2472d029
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name = 'mlp-mixer-pytorch', packages = find_packages(exclude=[]), version = '0.0.4', license='MIT', description = 'MLP Mixer - Pytorch', author = 'Phil Wang', author_email = 'lucidrains@gmail.com', url = 'https://github.com/lucidrains/mlp-mixer-pytorch...
25.448276
65
0.640921
from setuptools import setup, find_packages setup( name = 'mlp-mixer-pytorch', packages = find_packages(exclude=[]), version = '0.0.4', license='MIT', description = 'MLP Mixer - Pytorch', author = 'Phil Wang', author_email = 'lucidrains@gmail.com', url = 'https://github.com/lucidrains/mlp-mixer-pytorch...
true
true
1c257bb09467739756c0cbf4cc5eb06ff6e874e3
1,658
py
Python
meal_app/tests.py
IvanHreskiv/fridgenotice
d86b954155a033bedd3b1264f1f6330703fff517
[ "MIT" ]
null
null
null
meal_app/tests.py
IvanHreskiv/fridgenotice
d86b954155a033bedd3b1264f1f6330703fff517
[ "MIT" ]
null
null
null
meal_app/tests.py
IvanHreskiv/fridgenotice
d86b954155a033bedd3b1264f1f6330703fff517
[ "MIT" ]
null
null
null
import pytest from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model from meal_app.models import Meal pytestmark = pytest.mark.django_db(transaction=True) def create_meal(): get_user_model().objects.create_user('temporary', 'temporary@example.com', 'temp...
35.276596
100
0.706876
import pytest from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model from meal_app.models import Meal pytestmark = pytest.mark.django_db(transaction=True) def create_meal(): get_user_model().objects.create_user('temporary', 'temporary@example.com', 'temp...
true
true
1c257bbbc360b24f102718a972adf7867b9e2a07
1,233
py
Python
Main.py
Necom1/Mango-Pi
6476b471c2345f0417f075742e7da74a1c5155fe
[ "MIT" ]
1
2020-07-23T19:16:25.000Z
2020-07-23T19:16:25.000Z
Main.py
Necom1/Mango-Pi
6476b471c2345f0417f075742e7da74a1c5155fe
[ "MIT" ]
null
null
null
Main.py
Necom1/Mango-Pi
6476b471c2345f0417f075742e7da74a1c5155fe
[ "MIT" ]
1
2021-01-09T12:26:54.000Z
2021-01-09T12:26:54.000Z
import sys import time import subprocess # References: # https://www.youtube.com/playlist?list=PLW3GfRiBCHOiEkjvQj0uaUB1Q-RckYnj9 # https://www.youtube.com/playlist?list=PLpbRB6ke-VkvP1W2d_nLa1Ott3KrDx2aN # Resources: # https://flatuicolors.com/ # https://discordpy.readthedocs.io/ try: import pytz import re...
30.073171
110
0.725061
import sys import time import subprocess try: import pytz import requests import discord import pymongo import wavelink import yaml except ImportError: print("Missing installation detected, will now attempt to manually install libraries") subprocess.check_call([sys.executable, ...
true
true
1c257c4887a70c240580ee75f2e4ece615043522
7,706
py
Python
vsts/vsts/settings/v4_1/settings_client.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
vsts/vsts/settings/v4_1/settings_client.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
vsts/vsts/settings/v4_1/settings_client.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "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. # --------------------------------------------------------------------...
52.780822
132
0.602907
from msrest import Serializer, Deserializer from ...vss_client import VssClient class SettingsClient(VssClient): def __init__(self, base_url=None, creds=None): super(SettingsClient, self).__init__(base_url, creds) self._serialize = Serializer() self._deserialize = Deserializer() ...
true
true
1c257c4b093520f39198185f622ac1ef06a435ac
3,963
py
Python
python/GafferSceneUI/UDIMQueryUI.py
wengn/gaffer
871464487c98a94c8108adb79a86330f8824a017
[ "BSD-3-Clause" ]
null
null
null
python/GafferSceneUI/UDIMQueryUI.py
wengn/gaffer
871464487c98a94c8108adb79a86330f8824a017
[ "BSD-3-Clause" ]
null
null
null
python/GafferSceneUI/UDIMQueryUI.py
wengn/gaffer
871464487c98a94c8108adb79a86330f8824a017
[ "BSD-3-Clause" ]
1
2020-12-21T12:33:49.000Z
2020-12-21T12:33:49.000Z
########################################################################## # # Copyright (c) 2018, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
29.139706
160
0.669442
true
true
1c257d00f88efb0c622ee43356d7eeec825aecd3
7,676
py
Python
examples/einsum.py
nipunbatra/pyro
d5b0545c4f992d435692080db6969314a2c32f05
[ "Apache-2.0" ]
4,959
2017-11-03T14:39:17.000Z
2019-02-04T16:14:30.000Z
examples/einsum.py
nipunbatra/pyro
d5b0545c4f992d435692080db6969314a2c32f05
[ "Apache-2.0" ]
985
2017-11-03T14:27:56.000Z
2019-02-02T18:52:54.000Z
examples/einsum.py
nipunbatra/pyro
d5b0545c4f992d435692080db6969314a2c32f05
[ "Apache-2.0" ]
564
2017-11-03T15:05:55.000Z
2019-01-31T14:02:29.000Z
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 """ This example demonstrates how to use plated ``einsum`` with different backends to compute logprob, gradients, MAP estimates, posterior samples, and marginals. The interface for adjoint algorithms requires four steps: 1. Call ...
32.944206
89
0.649427
import argparse import timeit import torch from torch.autograd import grad from pyro.ops.contract import einsum from pyro.ops.einsum.adjoint import require_backward from pyro.util import ignore_jit_warnings _CACHE = {} def jit_prob(equation, *operands, **kwargs): key = "prob", equation, kwargs["plates"] ...
true
true
1c257d91963dee46b79f6edaf2ff02983d706729
30,879
py
Python
mvpa2/clfs/base.py
thomastweets/PyMVPA
a9c05acd7569639bb636aed3c22a13b21559ca02
[ "MIT" ]
1
2016-08-23T05:04:09.000Z
2016-08-23T05:04:09.000Z
mvpa2/clfs/base.py
thomastweets/PyMVPA
a9c05acd7569639bb636aed3c22a13b21559ca02
[ "MIT" ]
null
null
null
mvpa2/clfs/base.py
thomastweets/PyMVPA
a9c05acd7569639bb636aed3c22a13b21559ca02
[ "MIT" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms. # ### ### ### ### ###...
39.998705
84
0.58943
lassifier.""", index=1002) def __init__(self, space=None, **kwargs): if space is None: space = 'targets' Learner.__init__(self, space=space, **kwargs) self._attrmap = AttributeM...
false
true
1c257e3b1fa8f239aead32b56e447306287bcede
17,510
py
Python
heat/engine/scheduler.py
redhat-openstack/heat
6b9be0a868b857e942c1cc90594d0f3a0d0725d0
[ "Apache-2.0" ]
null
null
null
heat/engine/scheduler.py
redhat-openstack/heat
6b9be0a868b857e942c1cc90594d0f3a0d0725d0
[ "Apache-2.0" ]
null
null
null
heat/engine/scheduler.py
redhat-openstack/heat
6b9be0a868b857e942c1cc90594d0f3a0d0725d0
[ "Apache-2.0" ]
null
null
null
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
33.868472
79
0.584923
import functools import itertools import sys from time import time as wallclock import types import eventlet from oslo.utils import excutils import six from heat.common.i18n import _ from heat.openstack.common import log as logging LOG = logging.getLogger(__name__) ENABLE_SLEEP = True def task_desc...
false
true
1c25823b54c4ee9c8ce4d2c74252228fdef33697
3,134
py
Python
platforms/bmv2-mininet/docker/scripts/send.py
nhnghia/int-platforms
aa0b7be45ae97b2a1f1d5fea2938f9c75aefc9d7
[ "Apache-2.0" ]
11
2021-10-01T14:22:04.000Z
2022-03-24T21:34:52.000Z
platforms/bmv2-mininet/docker/scripts/send.py
nhnghia/int-platforms
aa0b7be45ae97b2a1f1d5fea2938f9c75aefc9d7
[ "Apache-2.0" ]
4
2021-09-26T07:56:40.000Z
2022-03-22T09:08:50.000Z
platforms/bmv2-mininet/docker/scripts/send.py
nhnghia/int-platforms
aa0b7be45ae97b2a1f1d5fea2938f9c75aefc9d7
[ "Apache-2.0" ]
3
2021-11-22T18:24:56.000Z
2021-12-22T14:55:46.000Z
#!/usr/bin/python # Copyright 2013-present Barefoot Networks, 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 ap...
31.656566
81
0.59381
from scapy.all import Ether, IP, sendp, get_if_hwaddr, get_if_list, TCP, Raw, UDP import sys import random, string def randomword(max_length): length = random.randint(1, max_length) return ''.join(random.choice(string.lowercase) for i in range(length)) def read_topo(): nb_hosts = 0 nb_...
false
true
1c258265fdea5e8892051089e0a4e17a5a2bfbbb
972
py
Python
src/transformers/configuration_marian.py
12190143/transformers
6faca88ee0c472de8207e648b0999a1ee01ff127
[ "Apache-2.0" ]
480
2019-10-14T02:22:34.000Z
2022-03-29T18:07:00.000Z
src/transformers/configuration_marian.py
hmason/transformers
ab90353f1abfd15f8d21f99395658d060679a08c
[ "Apache-2.0" ]
20
2019-10-15T16:18:05.000Z
2022-02-27T21:23:55.000Z
src/transformers/configuration_marian.py
hmason/transformers
ab90353f1abfd15f8d21f99395658d060679a08c
[ "Apache-2.0" ]
42
2019-10-14T21:29:59.000Z
2021-12-28T15:25:58.000Z
# coding=utf-8 # Copyright 2020 The OPUS-NMT Team, Marian team, and The HuggingFace Inc. 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...
36
113
0.76749
from .configuration_bart import BartConfig PRETRAINED_CONFIG_ARCHIVE_MAP = { "marian-en-de": "https://s3.amazonaws.com/models.huggingface.co/bert/Helsinki-NLP/opus-mt-en-de/config.json", } class MarianConfig(BartConfig): pretrained_config_archive_map = PRETRAINED_CONFIG_ARCHIVE_MAP
true
true
1c25827bf03d96d5b06898d597e067bf09f00144
2,409
py
Python
conanfile.py
Gorgonx7/Catch2
efb54926eec28900e020131930b35116075f6f84
[ "BSL-1.0" ]
1
2022-02-04T05:56:52.000Z
2022-02-04T05:56:52.000Z
conanfile.py
Gorgonx7/Catch2
efb54926eec28900e020131930b35116075f6f84
[ "BSL-1.0" ]
null
null
null
conanfile.py
Gorgonx7/Catch2
efb54926eec28900e020131930b35116075f6f84
[ "BSL-1.0" ]
null
null
null
#!/usr/bin/env python from conans import ConanFile, CMake, tools class CatchConan(ConanFile): name = "catch2" description = "A modern, C++-native, framework for unit-tests, TDD and BDD" topics = ("conan", "catch2", "unit-test", "tdd", "bdd") url = "https://github.com/catchorg/Catch2" homepage = url...
41.534483
99
0.652968
from conans import ConanFile, CMake, tools class CatchConan(ConanFile): name = "catch2" description = "A modern, C++-native, framework for unit-tests, TDD and BDD" topics = ("conan", "catch2", "unit-test", "tdd", "bdd") url = "https://github.com/catchorg/Catch2" homepage = url license = "BSL-1...
true
true
1c25832705cf71351ab64061a3fb83ff266f6e42
3,155
py
Python
code/12_paketierung/audioplayer.py
padmalcom/AISpeechAssistant
b7501a23a8f513acb5043f3c7bb06df129bdc2cc
[ "Apache-2.0" ]
1
2021-09-08T09:21:16.000Z
2021-09-08T09:21:16.000Z
code/12_paketierung/audioplayer.py
padmalcom/AISpeechAssistant
b7501a23a8f513acb5043f3c7bb06df129bdc2cc
[ "Apache-2.0" ]
null
null
null
code/12_paketierung/audioplayer.py
padmalcom/AISpeechAssistant
b7501a23a8f513acb5043f3c7bb06df129bdc2cc
[ "Apache-2.0" ]
2
2022-02-06T09:54:40.000Z
2022-03-01T07:52:51.000Z
from loguru import logger import time import os import ffmpeg import sounddevice as sd import soundfile as sf import multiprocessing import queue import numpy as np class AudioPlayer: def __init__(self): self._process = None self._volume = 0.5 def play_file(self, file): if self._process: self.stop() ...
29.485981
190
0.696672
from loguru import logger import time import os import ffmpeg import sounddevice as sd import soundfile as sf import multiprocessing import queue import numpy as np class AudioPlayer: def __init__(self): self._process = None self._volume = 0.5 def play_file(self, file): if self._process: self.stop() ...
true
true
1c258343a286d124a4fb70c551168fb1d4f0be22
2,239
py
Python
demo/senta/predict.py
MRXLT/PaddleHub
a9cd941bef2ac5a2d81b2f20422a4fbd9a87eb90
[ "Apache-2.0" ]
1
2019-07-03T13:08:39.000Z
2019-07-03T13:08:39.000Z
demo/senta/predict.py
binweiwu/PaddleHub
f92d0edd18057044ef248d7f2c42d8f347b62fbf
[ "Apache-2.0" ]
null
null
null
demo/senta/predict.py
binweiwu/PaddleHub
f92d0edd18057044ef248d7f2c42d8f347b62fbf
[ "Apache-2.0" ]
null
null
null
#coding:utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import ast import numpy as np import os import time import paddle import paddle.fluid as fluid import paddlehub as hub # yapf: disable parser = argparse.ArgumentParser(__doc__) p...
31.535211
149
0.6954
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import ast import numpy as np import os import time import paddle import paddle.fluid as fluid import paddlehub as hub parser = argparse.ArgumentParser(__doc__) parser.add_argument("--checkp...
true
true
1c2583e1bb973c43ae1ca3196125b2f188b5f65f
1,894
py
Python
docs/ext_github.py
unintended/Cohen
c5342376cec78e031d29e9cf806dfd25bb861f4c
[ "MIT" ]
21
2015-05-23T09:34:40.000Z
2021-08-09T04:42:44.000Z
docs/ext_github.py
unintended/Cohen
c5342376cec78e031d29e9cf806dfd25bb861f4c
[ "MIT" ]
7
2015-05-24T12:19:49.000Z
2020-05-21T09:27:43.000Z
docs/ext_github.py
unintended/Cohen
c5342376cec78e031d29e9cf806dfd25bb861f4c
[ "MIT" ]
4
2015-05-23T09:34:29.000Z
2019-08-02T09:21:12.000Z
"""Creates Github links from @user and #issue text. Bascially a much simplified version of sphinxcontrib.issuetracker with support for @user. """ import re import sys from docutils import nodes from docutils.transforms import Transform GITHUB_ISSUE_URL = "https://github.com/{0}/issues/{1}" GITHUB_USER_URL = "https:...
26.676056
69
0.682154
import re import sys from docutils import nodes from docutils.transforms import Transform GITHUB_ISSUE_URL = "https://github.com/{0}/issues/{1}" GITHUB_USER_URL = "https://github.com/{1}" if sys.version_info[0] == 2: str = unicode class GithubReferences(Transform): default_priority = 999 def apply(self): ...
true
true
1c25869afa2ed42f70c36e15c923de9985dd7da2
676
py
Python
Week 1/ex4.py
wahsandaruwan/python_ess_exercises
a43cffa1077d1d9af7ee2e81427416894b29b0b6
[ "MIT" ]
null
null
null
Week 1/ex4.py
wahsandaruwan/python_ess_exercises
a43cffa1077d1d9af7ee2e81427416894b29b0b6
[ "MIT" ]
null
null
null
Week 1/ex4.py
wahsandaruwan/python_ess_exercises
a43cffa1077d1d9af7ee2e81427416894b29b0b6
[ "MIT" ]
null
null
null
# ======Variables and Value Assigning========= # ------The = operator can be used to assign values to variables------ bakers_dozen = 12 + 1 temperature = 93 # --------Variables can be used as values and in expressions--------- print(temperature,bakers_dozen) print("Celsius : ",(temperature - 32) * 5 / 9) print("Fahre...
30.727273
77
0.649408
bakers_dozen = 12 + 1 temperature = 93 print(temperature,bakers_dozen) print("Celsius : ",(temperature - 32) * 5 / 9) print("Fahrenheit : ", float(temperature)) temperature = 26 print("New Value : ", temperature) offset = 32 multiplier = 5.0 / 9.0 celsius = (temperature - offset) * multiplier print("Celsius Va...
true
true
1c2586ace9694d459814a4e5873aa2df154629bb
2,707
py
Python
services/ows_refactored/surface_reflectance/ows_s2_cfg.py
andrewdhicks/config
d120c4556f6eb734fc67c1f1ab3fafdd260d35d8
[ "Apache-2.0" ]
null
null
null
services/ows_refactored/surface_reflectance/ows_s2_cfg.py
andrewdhicks/config
d120c4556f6eb734fc67c1f1ab3fafdd260d35d8
[ "Apache-2.0" ]
null
null
null
services/ows_refactored/surface_reflectance/ows_s2_cfg.py
andrewdhicks/config
d120c4556f6eb734fc67c1f1ab3fafdd260d35d8
[ "Apache-2.0" ]
null
null
null
from ows_refactored.common.ows_reslim_cfg import reslim_srtm from ows_refactored.surface_reflectance.band_sr_cfg import bands_sentinel from ows_refactored.surface_reflectance.style_sr_cfg import styles_s2_list layer = { "title": "Surface Reflectance Sentinel-2", "name": "s2_l2a", "abstract": """ Surface re...
71.236842
593
0.769487
from ows_refactored.common.ows_reslim_cfg import reslim_srtm from ows_refactored.surface_reflectance.band_sr_cfg import bands_sentinel from ows_refactored.surface_reflectance.style_sr_cfg import styles_s2_list layer = { "title": "Surface Reflectance Sentinel-2", "name": "s2_l2a", "abstract": """ Surface re...
true
true