hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
345129245b461f44ef58538f02a08c3684d33f31
2,289
py
Python
netdissect/acesummarize.py
priyaravichander/ganspace
fefc001fabf6986a98da4df3166fc31693a4c26b
[ "Apache-2.0" ]
1,711
2018-11-22T08:56:26.000Z
2022-03-30T21:03:58.000Z
netdissect/acesummarize.py
priyaravichander/ganspace
fefc001fabf6986a98da4df3166fc31693a4c26b
[ "Apache-2.0" ]
54
2020-04-07T23:32:19.000Z
2022-03-27T15:06:26.000Z
netdissect/acesummarize.py
priyaravichander/ganspace
fefc001fabf6986a98da4df3166fc31693a4c26b
[ "Apache-2.0" ]
284
2018-11-27T02:05:21.000Z
2021-12-19T05:41:21.000Z
if __name__ == '__main__': main()
36.333333
80
0.602883
import os, sys, numpy, torch, argparse, skimage, json, shutil from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib.ticker import MaxNLocator import matplotlib def main(): parser = argparse.ArgumentParser(description='ACE optimization utili...
0
0
0
0
0
1,969
0
125
156
9c4d850bdefd749768f01ac9217c8649aea40380
2,690
py
Python
src/sage/combinat/root_system/type_I.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
4
2020-07-17T04:49:44.000Z
2020-07-29T06:33:51.000Z
src/sage/combinat/root_system/type_I.py
Ivo-Maffei/sage
467fbc70a08b552b3de33d9065204ee9cbfb02c7
[ "BSL-1.0" ]
2
2018-10-30T13:40:20.000Z
2020-07-23T12:13:30.000Z
src/sage/combinat/root_system/type_I.py
dimpase/sage
468f23815ade42a2192b0a9cd378de8fdc594dcd
[ "BSL-1.0" ]
3
2020-03-29T17:13:36.000Z
2021-05-03T18:11:28.000Z
""" Root system data for type I """ from __future__ import absolute_import #***************************************************************************** # Copyright (C) 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net>, # # Distributed under the terms of the GNU General Public License (GPL) # ...
24.454545
78
0.454647
""" Root system data for type I """ from __future__ import absolute_import #***************************************************************************** # Copyright (C) 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net>, # # Distributed under the terms of the GNU General Public License (GPL) # ...
0
0
0
2,164
0
0
0
49
45
a4b9815d03a75fa1aae1485266e983d7acb14a6e
346
py
Python
fpdb/common/util.py
xvzezi/filedb-python
513de426976e2782aa9aced1a2bf522db7aae51d
[ "MIT" ]
null
null
null
fpdb/common/util.py
xvzezi/filedb-python
513de426976e2782aa9aced1a2bf522db7aae51d
[ "MIT" ]
null
null
null
fpdb/common/util.py
xvzezi/filedb-python
513de426976e2782aa9aced1a2bf522db7aae51d
[ "MIT" ]
null
null
null
# coding=utf-8 ########################### # file: util.py # date: 2021-7-16 # author: Sturmfy # desc: utility # version: # 2021-7-16 init design ###########################
21.625
37
0.528902
# coding=utf-8 ########################### # file: util.py # date: 2021-7-16 # author: Sturmfy # desc: utility # version: # 2021-7-16 init design ########################### def path_stitch(dir_name, file_name): # type: (str, str) -> str if not dir_name.endswith('/'): dir_name = dir_name + '/' r...
0
0
0
0
0
147
0
0
23
6cfba856eccf9697a5c0bedb864ea116614eaa65
12,421
py
Python
Experiments_Pseudo/df_unify_5m.py
markus93/fit-on-the-test
e8e4ddda1ba52582920bdf0585314702c8b65892
[ "MIT" ]
null
null
null
Experiments_Pseudo/df_unify_5m.py
markus93/fit-on-the-test
e8e4ddda1ba52582920bdf0585314702c8b65892
[ "MIT" ]
null
null
null
Experiments_Pseudo/df_unify_5m.py
markus93/fit-on-the-test
e8e4ddda1ba52582920bdf0585314702c8b65892
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # 5m - Df unification (10 calib. fn-s) import numpy as np import pandas as pd import os # In[7]: # MAIN IDENT_TAG = "28_05_pre" PATH_res = "data_1m_final_2805" COLUMNS = ["model_name", "tag_name", "cgt_nr", "seed", "n_data", "binning", "n_bins", "c_hat_distance_p", "c_...
30.975062
162
0.632638
#!/usr/bin/env python # coding: utf-8 # # 5m - Df unification (10 calib. fn-s) import matplotlib.pyplot as plt import numpy as np import pandas as pd import os from os.path import join import pickle from copy import copy def get_data_name(file): if "resnet110" in file: return "resnet110" elif ...
0
0
0
0
0
8,830
0
5
250
e1486d9dbc7c678e499d8061c350dda681a214ea
792
py
Python
users/urls.py
raikasdev/app
6686db149c493a605c0f73056a3db1516f77e1b6
[ "MIT" ]
1
2021-05-09T14:20:52.000Z
2021-05-09T14:20:52.000Z
users/urls.py
jounile/qlma
dac96622d47bc3b5f04ad220322313b2676e2c26
[ "MIT" ]
19
2020-12-22T20:50:32.000Z
2021-07-10T19:37:46.000Z
users/urls.py
jounile/qlma
dac96622d47bc3b5f04ad220322313b2676e2c26
[ "MIT" ]
3
2021-05-08T17:57:50.000Z
2021-05-16T15:21:41.000Z
from django.urls import path from . import views urlpatterns = [ path('add_user', views.UserCreateView.as_view(), name="add_user"), path('edit_user/<str:user_id>', views.UserEditView.as_view(), name="edit_user"), path('manage_users', views.UsersManageView.as_view(), name="manage_users"), path('m...
39.6
95
0.72096
from django.conf.urls.static import static from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('add_user', views.UserCreateView.as_view(), name="add_user"), path('edit_user/<str:user_id>', views.UserEditView.as_view(), name="edit_user"), path('manag...
0
0
0
0
0
0
0
32
44
3796753eb177e2bfc5e0369e3a3f7acdcff7b4b7
2,652
py
Python
Deployment of Mini Project 2 using Flask/app.py
ynpreet/Technocolabs-data-science-internship
cb520f96ed825765ad140ab31af09b98a2511127
[ "MIT" ]
null
null
null
Deployment of Mini Project 2 using Flask/app.py
ynpreet/Technocolabs-data-science-internship
cb520f96ed825765ad140ab31af09b98a2511127
[ "MIT" ]
null
null
null
Deployment of Mini Project 2 using Flask/app.py
ynpreet/Technocolabs-data-science-internship
cb520f96ed825765ad140ab31af09b98a2511127
[ "MIT" ]
1
2021-02-16T05:07:31.000Z
2021-02-16T05:07:31.000Z
from flask import Flask import pickle app = Flask(__name__) model = pickle.load(open("final_model.pkl", "rb")) if __name__ == '__main__': app.run(debug = True)
42.095238
240
0.642157
from flask import Flask, render_template, request, flash, redirect import pickle import numpy as np app = Flask(__name__) model = pickle.load(open("final_model.pkl", "rb")) def predict_default(features): features = np.array(features).astype(np.float64).reshape(1,-1) prediction = model.predi...
0
2,151
0
0
0
214
0
40
73
3de1ba95b3d8e62cb61c3e0e82403f46c9ad773c
467
py
Python
2021-08-31 - Python Medellin - aiohttp Asynchronous HTTP Requests/Examples/Pokemon/pokemon_aiohttp.py
williamegomezo/Talks
0b123c6c8dec9c1a2357c142b617109068caf060
[ "MIT" ]
2
2020-04-24T23:03:41.000Z
2020-11-10T15:08:38.000Z
2021-08-31 - Python Medellin - aiohttp Asynchronous HTTP Requests/Examples/Pokemon/pokemon_aiohttp.py
williamegomezo/Talks
0b123c6c8dec9c1a2357c142b617109068caf060
[ "MIT" ]
5
2021-03-10T11:42:15.000Z
2022-02-10T21:38:54.000Z
2021-08-31 - Python Medellin - aiohttp Asynchronous HTTP Requests/Examples/Pokemon/pokemon_aiohttp.py
williamegomezo/Talks
0b123c6c8dec9c1a2357c142b617109068caf060
[ "MIT" ]
4
2020-10-01T04:32:27.000Z
2022-02-14T15:08:16.000Z
import asyncio import time start_time = time.time() asyncio.run(main()) print("--- %s seconds ---" % (time.time() - start_time))
24.578947
71
0.610278
import aiohttp import asyncio import time start_time = time.time() async def main(): async with aiohttp.ClientSession() as session: for number in range(1, 151): pokemon_url = f'https://pokeapi.co/api/v2/pokemon/{number}' async with session.get(pokemon_url) as resp: ...
0
0
296
0
0
0
0
-7
45
5da44211934a15e4da52cce4b451c12fad31632f
21,537
py
Python
parla/tasks.py
nicelhc13/Parla.py
45a4e9e3835b096c6f3c7421a19bdc8629eaedf9
[ "BSD-3-Clause" ]
11
2020-06-22T16:20:15.000Z
2022-03-20T22:54:40.000Z
parla/tasks.py
nicelhc13/Parla.py
45a4e9e3835b096c6f3c7421a19bdc8629eaedf9
[ "BSD-3-Clause" ]
86
2019-10-24T07:43:05.000Z
2022-03-28T05:20:17.000Z
parla/tasks.py
nicelhc13/Parla.py
45a4e9e3835b096c6f3c7421a19bdc8629eaedf9
[ "BSD-3-Clause" ]
7
2019-10-24T05:46:27.000Z
2022-02-09T19:47:58.000Z
""" Parla supports simple task parallelism. .. testsetup:: T0 = None code = None from .cpu import cpu """ import logging import inspect from typing import Collection, Optional, Any, Union, List from parla.device import Device, Architecture from parla.task_runtime import TaskCompleted, TaskRunning, TaskA...
35.539604
180
0.623392
""" Parla supports simple task parallelism. .. testsetup:: T0 = None code = None from .cpu import cpu """ import logging import threading import inspect from abc import abstractmethod, ABCMeta from contextlib import asynccontextmanager, contextmanager, ExitStack from typing import Awaitable, Collection, ...
0
7,750
0
3,473
0
4,056
0
183
439
aebe595e4af6bd51e96e3fc0e0868d4c5c25470f
24,324
py
Python
mesxr/calibration/plots.py
pdvanmeter/meSXR
c281e15c5fd01591bba9e0c1510f83c5f7ef771a
[ "MIT" ]
null
null
null
mesxr/calibration/plots.py
pdvanmeter/meSXR
c281e15c5fd01591bba9e0c1510f83c5f7ef771a
[ "MIT" ]
null
null
null
mesxr/calibration/plots.py
pdvanmeter/meSXR
c281e15c5fd01591bba9e0c1510f83c5f7ef771a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Package: mesxr.calibration Module: plots Author: Patrick VanMeter Affiliation: Department of Physics, University of Wisconsin-Madison Last Updated: November 2018 Description: This module is used to generate common plots to analyse the ressults of the ME-SXR calibra...
41.865749
150
0.60245
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Package: mesxr.calibration Module: plots Author: Patrick VanMeter Affiliation: Department of Physics, University of Wisconsin-Madison Last Updated: November 2018 Description: This module is used to generate common plots to analyse the ressults of the ME-SXR calibra...
0
0
0
0
0
0
0
0
0
ac9657a422b46b935b62bce15f92796f3fe1a2b7
3,219
py
Python
admin.py
carterbrwn2/greyfish
6b43f2fc7b7560d9ad13516cb67089bf8b1f15ca
[ "BSD-3-Clause" ]
6
2018-11-09T22:37:07.000Z
2021-11-15T11:26:54.000Z
admin.py
carterbrwn2/greyfish
6b43f2fc7b7560d9ad13516cb67089bf8b1f15ca
[ "BSD-3-Clause" ]
1
2021-01-13T11:02:41.000Z
2021-01-21T16:37:02.000Z
admin.py
carterbrwn2/greyfish
6b43f2fc7b7560d9ad13516cb67089bf8b1f15ca
[ "BSD-3-Clause" ]
3
2019-06-20T04:27:07.000Z
2019-08-02T20:22:39.000Z
#!/usr/bin/env python3 """ BASICS Admin functionalities """ from flask import Flask import os app = Flask(__name__) GREYFISH_FOLDER = os.environ['greyfish_path']+"/sandbox/" # Gets a list of all available users, comma-separated # If there are no users, it will return an emprty string: '' # Removes all fi...
28.486726
131
0.66822
#!/usr/bin/env python3 """ BASICS Admin functionalities """ from flask import Flask, request import glob import os import time import base_functions as bf import remove_files as rmf app = Flask(__name__) GREYFISH_FOLDER = os.environ['greyfish_path']+"/sandbox/" # Gets a list of all available users, comma-se...
0
2,692
0
0
0
0
0
0
136
bcd6e37b1e2ddd8a3033cd21f1b7d3fe4afc4341
19
py
Python
setup.py
snrakshith/chipsy
7bde3f90dc1aee953ed1c89071bce230b4613635
[ "MIT" ]
null
null
null
setup.py
snrakshith/chipsy
7bde3f90dc1aee953ed1c89071bce230b4613635
[ "MIT" ]
null
null
null
setup.py
snrakshith/chipsy
7bde3f90dc1aee953ed1c89071bce230b4613635
[ "MIT" ]
null
null
null
""" Setup file"""
9.5
18
0.473684
""" Setup file"""
0
0
0
0
0
0
0
0
0
51ea294cb5057066f289ae35171953e5ab6bf905
3,052
py
Python
admin/c2cgeoportal_admin/__init__.py
vvmruder/c2cgeoportal
2aa1cfbfa3872fb745db6dae1e0c4ae9a0692542
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
admin/c2cgeoportal_admin/__init__.py
vvmruder/c2cgeoportal
2aa1cfbfa3872fb745db6dae1e0c4ae9a0692542
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
admin/c2cgeoportal_admin/__init__.py
vvmruder/c2cgeoportal
2aa1cfbfa3872fb745db6dae1e0c4ae9a0692542
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from translationstring import TranslationStringFactory from pyramid.config import Configurator from c2cwsgiutils.health_check import HealthCheck from pyramid.events import BeforeRender, NewRequest import c2cgeoform from pkg_resources import resource_filename from c2c.template.config import config as configuration fro...
31.791667
105
0.742136
from translationstring import TranslationStringFactory from pyramid.config import Configurator from c2cwsgiutils.health_check import HealthCheck from pyramid.events import BeforeRender, NewRequest import c2cgeoform from pkg_resources import resource_filename from c2c.template.config import config as configuration fro...
0
0
0
679
0
398
0
39
46
a72e41eedab2083459339756e892886f9163c467
4,445
py
Python
Baseball-5501/BaseballSerialParserCOM.py
MSOInfinite/DaktronicsCGSerialParser
6df702fe429822eceab42a1a3ab2dd66176b38e1
[ "MIT" ]
2
2020-11-24T01:08:56.000Z
2021-09-25T16:15:53.000Z
Baseball-5501/BaseballSerialParserCOM.py
Bristol-Tennessee-City-Schools/DaktronicsCGSerialParser
6df702fe429822eceab42a1a3ab2dd66176b38e1
[ "MIT" ]
null
null
null
Baseball-5501/BaseballSerialParserCOM.py
Bristol-Tennessee-City-Schools/DaktronicsCGSerialParser
6df702fe429822eceab42a1a3ab2dd66176b38e1
[ "MIT" ]
1
2021-02-21T19:11:42.000Z
2021-02-21T19:11:42.000Z
#!/usr/bin/env python """BaseballSerialParserCOM.py: Collects data from a Daktronics All Sport 5000 connected via port J2 to a Daktronics All Sport CG connected to a computer on COM port (defined on line 56), then parses data to a .csv readable by broadcasting programs. This file has only been tested using game code...
32.210145
129
0.682115
#!/usr/bin/env python """BaseballSerialParserCOM.py: Collects data from a Daktronics All Sport 5000 connected via port J2 to a Daktronics All Sport CG connected to a computer on COM port (defined on line 56), then parses data to a .csv readable by broadcasting programs. This file has only been tested using game code...
0
0
0
0
0
0
0
0
0
222e8b789c7ed3d0400b46d86c0b4d01de5fa5cf
1,415
py
Python
setup.py
timofurrer/pylemon
48fb6a4792450c86d091e50848760aff5b5f6123
[ "MIT" ]
1
2018-02-08T19:47:04.000Z
2018-02-08T19:47:04.000Z
setup.py
timofurrer/pylemon
48fb6a4792450c86d091e50848760aff5b5f6123
[ "MIT" ]
null
null
null
setup.py
timofurrer/pylemon
48fb6a4792450c86d091e50848760aff5b5f6123
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from imp import load_source from setuptools import setup version = load_source("version", "pylemon/__init__.py") setup( name="pylemon", version=version.__version__, license="MIT", description="python daemon to monitor specific directories and react on changes...
33.690476
85
0.633216
#!/usr/bin/python # -*- coding: utf-8 -*- from imp import load_source from setuptools import setup version = load_source("version", "pylemon/__init__.py") setup( name="pylemon", version=version.__version__, license="MIT", description="python daemon to monitor specific directories and react on changes...
0
0
0
0
0
0
0
0
0
6964e6c91a17b83171913f53519b538e1b2d9588
415
py
Python
round-all-kerns.py
thundernixon/thundernixon-glyphs_scripts
42e89a654fbadfa222ce7bf0723420585d05b9ef
[ "Apache-2.0" ]
3
2019-02-22T06:52:31.000Z
2019-09-09T01:31:34.000Z
round-all-kerns.py
thundernixon/glyphs_scripts
42e89a654fbadfa222ce7bf0723420585d05b9ef
[ "Apache-2.0" ]
null
null
null
round-all-kerns.py
thundernixon/glyphs_scripts
42e89a654fbadfa222ce7bf0723420585d05b9ef
[ "Apache-2.0" ]
2
2019-01-27T17:00:10.000Z
2019-02-22T06:54:38.000Z
#MenuTitle: Round All Kerns # -*- coding: utf-8 -*- __doc__=""" If there are any floating-point kern values in the font, this will round them to the nearest integer. """ font = Glyphs.font # print(font.kerning) # for each value in kerning dictionary for key, value in font.kerning.items(): for key, value in font....
25.9375
101
0.662651
#MenuTitle: Round All Kerns # -*- coding: utf-8 -*- __doc__=""" If there are any floating-point kern values in the font, this will round them to the nearest integer. """ font = Glyphs.font # print(font.kerning) # for each value in kerning dictionary for key, value in font.kerning.items(): for key, value in font....
0
0
0
0
0
0
0
0
0
f00738dbb83576f11e2dc73109618a3cd1be6fa7
60,289
py
Python
sdk/python/pulumi_aws/cognito/_inputs.py
jen20/pulumi-aws
172e00c642adc03238f89cc9c5a16b914a77c2b1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/cognito/_inputs.py
jen20/pulumi-aws
172e00c642adc03238f89cc9c5a16b914a77c2b1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/cognito/_inputs.py
jen20/pulumi-aws
172e00c642adc03238f89cc9c5a16b914a77c2b1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi from .. import _utilities, _tables __all__ = [ 'IdentityPoolCognitoIdentityProviderArgs', 'IdentityPoolRoleAttach...
44.460914
383
0.683475
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
18
58,435
0
0
0
0
0
41
573
ff4fb2f52439b1efcb49f46bb18f2a9d76da96e2
583
py
Python
servlets/pushitems.py
fhats/pushmanager
91fb61d400622477b9f1b3902c9dc77aff983be4
[ "Apache-2.0" ]
null
null
null
servlets/pushitems.py
fhats/pushmanager
91fb61d400622477b9f1b3902c9dc77aff983be4
[ "Apache-2.0" ]
null
null
null
servlets/pushitems.py
fhats/pushmanager
91fb61d400622477b9f1b3902c9dc77aff983be4
[ "Apache-2.0" ]
null
null
null
import tornado.gen
26.5
66
0.607204
import tornado.gen import tornado.web from core.requesthandler import RequestHandler import core.util class PushItemsServlet(RequestHandler): @tornado.web.asynchronous @tornado.gen.engine def get(self): pushid = core.util.get_int_arg(self.request, 'push', None) response = yield tornado.g...
0
412
0
18
0
0
0
17
117
211439202792f9f3367480fc0fbaf452afd57f1b
836
py
Python
src/MonotoneStack.py
ArkiWang/LeetcodePy
6b4af8da843910823f7f53989bbda4ec8e6dad15
[ "MIT" ]
null
null
null
src/MonotoneStack.py
ArkiWang/LeetcodePy
6b4af8da843910823f7f53989bbda4ec8e6dad15
[ "MIT" ]
null
null
null
src/MonotoneStack.py
ArkiWang/LeetcodePy
6b4af8da843910823f7f53989bbda4ec8e6dad15
[ "MIT" ]
null
null
null
#monotonous increase stack
24.588235
61
0.532297
#monotonous increase stack class MonotonStack(object): def __init__(self): self.stack = [int] self.pointer = -1 def push(self, e: int) -> []: pop = [] while self.stack[self.pointer] < e: pop.append(self.stack.pop(self.pointer)) self.pointer -= 1 s...
0
0
0
787
0
0
0
0
22
29c6d38134cb96da5a7ef2a274974210ea412ddb
2,165
py
Python
probs/prob24.py
mattrid93/ProjectEuler
3e1cf1bad9581e526b37d17e20b5fe8af837c1c6
[ "MIT" ]
null
null
null
probs/prob24.py
mattrid93/ProjectEuler
3e1cf1bad9581e526b37d17e20b5fe8af837c1c6
[ "MIT" ]
null
null
null
probs/prob24.py
mattrid93/ProjectEuler
3e1cf1bad9581e526b37d17e20b5fe8af837c1c6
[ "MIT" ]
null
null
null
"""Problem 24: Lexographic permutations. Iteratively generate permutations""" import unittest def is_permutation(n, d): """Checks to see if n is a permutation of the digits 0-d.""" n = [int(i) for i in str(n)] if len(n) < d or len(n) > d+1: return False elif len(n) < d+1: n.insert(0, 0...
28.116883
64
0.563048
"""Problem 24: Lexographic permutations. Iteratively generate permutations""" import unittest def is_permutation(n, d): """Checks to see if n is a permutation of the digits 0-d.""" n = [int(i) for i in str(n)] if len(n) < d or len(n) > d+1: return False elif len(n) < d+1: n.insert(0, 0...
0
0
0
850
0
247
0
0
69
6d920bdccc2fe19aa21bd966b7946d23dddecdf2
3,975
py
Python
ipycli/tests/test_cli.py
dalejung/ipycli
eee39731d6fd437cac0ccdc1a84d17f30e3881ac
[ "Apache-2.0" ]
null
null
null
ipycli/tests/test_cli.py
dalejung/ipycli
eee39731d6fd437cac0ccdc1a84d17f30e3881ac
[ "Apache-2.0" ]
null
null
null
ipycli/tests/test_cli.py
dalejung/ipycli
eee39731d6fd437cac0ccdc1a84d17f30e3881ac
[ "Apache-2.0" ]
null
null
null
if __name__ == '__main__': import nose nose.runmodule(argv=[__file__,'-vvs','-x','--pdb', '--pdb-failure'], exit=False)
37.149533
116
0.601258
import os.path from unittest import TestCase import numpy as np import pandas as pd from ipycli.notebookmanager import NotebookManager from IPython.utils.tempdir import TemporaryDirectory class TestCLI(TestCase): def __init__(self, *args, **kwargs): TestCase.__init__(self, *args, **kwargs) def runT...
0
0
0
3,452
0
0
0
56
157
d23dcc7c087f9e606a97f89051d516ff7ec87597
360
py
Python
main.py
niesuch/ftp-backup
60dea63f5b77fded3ae03041d6c590e3833aa535
[ "MIT" ]
null
null
null
main.py
niesuch/ftp-backup
60dea63f5b77fded3ae03041d6c590e3833aa535
[ "MIT" ]
null
null
null
main.py
niesuch/ftp-backup
60dea63f5b77fded3ae03041d6c590e3833aa535
[ "MIT" ]
null
null
null
import ftplib import sys import os from lib.FTPUpload import FTPUpload if __name__ == '__main__': try: ftp_upload = FTPUpload(os.path.abspath('config/config.json')) ftp_upload.upload() except FileNotFoundError as error: sys.exit(f'File `{error.filename}` does not exist.') except ftp...
27.692308
69
0.680556
import ftplib import sys import os from lib.FTPUpload import FTPUpload if __name__ == '__main__': try: ftp_upload = FTPUpload(os.path.abspath('config/config.json')) ftp_upload.upload() except FileNotFoundError as error: sys.exit(f'File `{error.filename}` does not exist.') except ftp...
0
0
0
0
0
0
0
0
0
d297524cb61305cbbbc64fb60a791267557ad237
7,407
py
Python
py/testdir_release/c5/test_c5_KMeans_sphere_h1m_fvec.py
gigliovale/h2o
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
[ "Apache-2.0" ]
882
2015-05-22T02:59:21.000Z
2022-02-17T05:02:48.000Z
py/testdir_release/c5/test_c5_KMeans_sphere_h1m_fvec.py
VonRosenchild/h2o-2
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
[ "Apache-2.0" ]
1
2015-01-14T23:54:56.000Z
2015-01-15T20:04:17.000Z
py/testdir_release/c5/test_c5_KMeans_sphere_h1m_fvec.py
VonRosenchild/h2o-2
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
[ "Apache-2.0" ]
392
2015-05-22T17:04:11.000Z
2022-02-22T09:04:39.000Z
import unittest, time, sys, random, math, json sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_kmeans, h2o_import as h2i, h2o_common import socket print "Assumes you ran ../build_for_clone.py in this directory" print "Using h2o-nodes.json. Also the sandbox dir" DELETE_KEYS_EACH_ITER = True DO_KMEANS...
51.4375
142
0.590928
import unittest, time, sys, random, math, json sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_kmeans, h2o_import as h2i, h2o_common import socket print "Assumes you ran ../build_for_clone.py in this directory" print "Using h2o-nodes.json. Also the sandbox dir" DELETE_KEYS_EACH_ITER = True DO_KMEANS...
0
0
0
6,883
0
0
0
0
22
6ef795e30f4b23602565feb5a83126c90d675ae5
4,273
py
Python
src/rd_math.py
leahpar/RainDrop
cb7f43bd1b18841341ba7b812009038b545111c4
[ "MIT" ]
null
null
null
src/rd_math.py
leahpar/RainDrop
cb7f43bd1b18841341ba7b812009038b545111c4
[ "MIT" ]
null
null
null
src/rd_math.py
leahpar/RainDrop
cb7f43bd1b18841341ba7b812009038b545111c4
[ "MIT" ]
null
null
null
from scipy.optimize import fsolve # apt-get install python-scipy #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # REFLEX TIMING #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # # | R0u R0d R1u ...
30.963768
87
0.37538
from scipy.optimize import fsolve # apt-get install python-scipy #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # REFLEX TIMING #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # # | R0u R0d R1u ...
0
0
0
0
0
0
0
0
0
37a601c88c5e8196f43b23230a5cd91b7562bf83
762
py
Python
pmpapp/models.py
mani0608/DjangoProjectManager
41c5d7b16db8df01a79cb8722851325ef85b5010
[ "MIT" ]
null
null
null
pmpapp/models.py
mani0608/DjangoProjectManager
41c5d7b16db8df01a79cb8722851325ef85b5010
[ "MIT" ]
null
null
null
pmpapp/models.py
mani0608/DjangoProjectManager
41c5d7b16db8df01a79cb8722851325ef85b5010
[ "MIT" ]
null
null
null
# Create your models here.
31.75
72
0.74147
from django.db import models from django.contrib.auth.models import User # Create your models here. class UserInfo(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) website = models.URLField(blank=True) profile_picture = models.ImageField(upload_to='images', blank=True) def _...
0
0
0
614
0
0
0
29
89
caedfc9ca4d335bf9a6a0bb330a7d228fed7431b
4,163
py
Python
mouselight/visualizations/view_ng_mouselight_n5.py
pattonw/mouselight
296e6df7d4e79776ed9f8533d17d937bb6866082
[ "MIT" ]
null
null
null
mouselight/visualizations/view_ng_mouselight_n5.py
pattonw/mouselight
296e6df7d4e79776ed9f8533d17d937bb6866082
[ "MIT" ]
null
null
null
mouselight/visualizations/view_ng_mouselight_n5.py
pattonw/mouselight
296e6df7d4e79776ed9f8533d17d937bb6866082
[ "MIT" ]
null
null
null
from funlib.show.neuroglancer import add_layer import argparse import daisy import neuroglancer import numpy as np from swc_parser import _parse_swc from pathlib import Path import itertools import logging ngid = itertools.count(start=1) parser = argparse.ArgumentParser() parser.add_argument( "--file", "-f", type...
24.779762
119
0.665866
from funlib.show.neuroglancer import add_layer, ScalePyramid import argparse import daisy import glob import neuroglancer import numpy as np import os import webbrowser from swc_parser import _parse_swc from pathlib import Path import itertools import random import logging ngid = itertools.count(start=1) parser = arg...
0
0
0
0
0
648
0
-20
134
1b515003b261436128953a65288c4fe53580d5c5
121
py
Python
oremda/event_loops/__init__.py
OpenChemistry/oremda
3fb4cb8318713b87ecd7999ee2b725da745dd023
[ "BSD-3-Clause" ]
11
2021-09-01T23:10:51.000Z
2022-03-20T07:39:37.000Z
oremda/event_loops/__init__.py
OpenChemistry/oremda
3fb4cb8318713b87ecd7999ee2b725da745dd023
[ "BSD-3-Clause" ]
22
2021-05-18T14:10:27.000Z
2021-10-04T15:06:27.000Z
oremda/event_loops/__init__.py
OpenChemistry/oremda
3fb4cb8318713b87ecd7999ee2b725da745dd023
[ "BSD-3-Clause" ]
2
2021-09-01T22:11:13.000Z
2021-10-30T09:12:36.000Z
from .mpi import MPINonRootEventLoop, MPIRootEventLoop __all__ = [ "MPINonRootEventLoop", "MPIRootEventLoop", ]
17.285714
54
0.743802
from .mpi import MPINonRootEventLoop, MPIRootEventLoop __all__ = [ "MPINonRootEventLoop", "MPIRootEventLoop", ]
0
0
0
0
0
0
0
0
0
8c50bb3aec8aade33d39e6f2be7cc79a8286f00b
3,351
py
Python
systemtimer.py
eyespied/F.R.A.M.E
5b52cd2a03bb6cd2c8dab7ba9e9e0166f35b195b
[ "MIT" ]
null
null
null
systemtimer.py
eyespied/F.R.A.M.E
5b52cd2a03bb6cd2c8dab7ba9e9e0166f35b195b
[ "MIT" ]
null
null
null
systemtimer.py
eyespied/F.R.A.M.E
5b52cd2a03bb6cd2c8dab7ba9e9e0166f35b195b
[ "MIT" ]
1
2020-02-20T16:29:23.000Z
2020-02-20T16:29:23.000Z
__author__ = "James Clark" __copyright__ = "Copyright 2020, F.R.A.M.E Project" __credits__ = ["James Clark"] __version__ = "1.0" # Import in necessary libraries current_time_and_date = '' # Function that runs the system timer # When the system timer reaches 15, updates the SQL database with late and attended SQL qu...
28.398305
102
0.718591
__author__ = "James Clark" __copyright__ = "Copyright 2020, F.R.A.M.E Project" __credits__ = ["James Clark"] __version__ = "1.0" # Import in necessary libraries import threading import time import sqlForGui import gui from datetime import datetime, date current_time_and_date = '' # Function that runs the system tim...
0
0
0
0
0
2,053
0
-17
225
16b96fe856e7e2032cbc02a1cd8e01350f4797d1
4,663
py
Python
samples/aci_demo_contract.py
michsmit99/snapback
a1ba92b3a73cfa20144f6a6f45a7d3ce893ee5b4
[ "Apache-2.0" ]
1
2020-08-19T13:48:40.000Z
2020-08-19T13:48:40.000Z
samples/aci_demo_contract.py
michsmit99/development
a1ba92b3a73cfa20144f6a6f45a7d3ce893ee5b4
[ "Apache-2.0" ]
null
null
null
samples/aci_demo_contract.py
michsmit99/development
a1ba92b3a73cfa20144f6a6f45a7d3ce893ee5b4
[ "Apache-2.0" ]
null
null
null
################################################################################ # _ ____ ___ _____ _ _ _ _ # # / \ / ___|_ _| |_ _|__ ___ | | | _(_) |_ # # / _ \| | | | | |/ _ \ / _ \| | |/ / | __| ...
46.168317
80
0.43234
################################################################################ # _ ____ ___ _____ _ _ _ _ # # / \ / ___|_ _| |_ _|__ ___ | | | _(_) |_ # # / _ \| | | | | |/ _ \ / _ \| | |/ / | __| ...
0
0
0
0
0
0
0
0
0
10fc91fbb02e7c36e489e3fffd3f00edd172bd34
151
py
Python
pure_aionsq/log.py
RafRaf/pure-aionsq
b22defeb52393d3ffea71845fa73591731a88c3f
[ "MIT" ]
null
null
null
pure_aionsq/log.py
RafRaf/pure-aionsq
b22defeb52393d3ffea71845fa73591731a88c3f
[ "MIT" ]
null
null
null
pure_aionsq/log.py
RafRaf/pure-aionsq
b22defeb52393d3ffea71845fa73591731a88c3f
[ "MIT" ]
null
null
null
import logging from pure_aionsq.settings import loggerName _logger = logging.getLogger(loggerName) _logger.setLevel(logging.DEBUG) logger = _logger
16.777778
43
0.827815
import logging from pure_aionsq.settings import loggerName _logger = logging.getLogger(loggerName) _logger.setLevel(logging.DEBUG) logger = _logger
0
0
0
0
0
0
0
0
0
6d86c80ac6abf9907c11d4d63b0e2161e290cde9
8,100
py
Python
google_or_tools/einav_puzzle_sat.py
tias/hakank
87b7f180c9393afce440864eb9e5fb119bdec1a4
[ "MIT" ]
279
2015-01-10T09:55:35.000Z
2022-03-28T02:34:03.000Z
google_or_tools/einav_puzzle_sat.py
tias/hakank
87b7f180c9393afce440864eb9e5fb119bdec1a4
[ "MIT" ]
10
2017-10-05T15:48:50.000Z
2021-09-20T12:06:52.000Z
google_or_tools/einav_puzzle_sat.py
tias/hakank
87b7f180c9393afce440864eb9e5fb119bdec1a4
[ "MIT" ]
83
2015-01-20T03:44:00.000Z
2022-03-13T23:53:06.000Z
# Copyright 2021 Hakan Kjellerstrand hakank@gmail.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.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
34.468085
90
0.595309
# Copyright 2021 Hakan Kjellerstrand hakank@gmail.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.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
0
0
0
0
0
5,641
0
19
67
b4182e1459c54470017bc1fdd0a30555d4eabb91
4,767
py
Python
python/tink/streaming_aead/_decrypting_stream.py
fax001/tink
9f30c97cb84b10bbba6978bc9c12c86478024050
[ "Apache-2.0" ]
1
2022-03-15T03:21:44.000Z
2022-03-15T03:21:44.000Z
python/tink/streaming_aead/_decrypting_stream.py
fax001/tink
9f30c97cb84b10bbba6978bc9c12c86478024050
[ "Apache-2.0" ]
null
null
null
python/tink/streaming_aead/_decrypting_stream.py
fax001/tink
9f30c97cb84b10bbba6978bc9c12c86478024050
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # 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, ...
35.051471
80
0.707573
# Copyright 2020 Google LLC # # 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, ...
0
432
0
3,442
0
0
0
44
135
d373a091b51821f147d0f588f36e39588c7b42f1
1,164
py
Python
min_bias/min_bias_calc.py
victor-gil-sepulveda/PhD-ANMPythonHelpers
c0e15684cce4aa4da90141b51f043a567a5f8655
[ "MIT" ]
1
2017-11-01T15:19:10.000Z
2017-11-01T15:19:10.000Z
min_bias/min_bias_calc.py
victor-gil-sepulveda/PhD-ANMPythonHelpers
c0e15684cce4aa4da90141b51f043a567a5f8655
[ "MIT" ]
null
null
null
min_bias/min_bias_calc.py
victor-gil-sepulveda/PhD-ANMPythonHelpers
c0e15684cce4aa4da90141b51f043a567a5f8655
[ "MIT" ]
null
null
null
''' Created on 14/9/2015 @author: victor ''' import sys import numpy from nma_algo_char.data_retrieval import calculate_rmsds if __name__ == '__main__': current_coords = numpy.delete(numpy.loadtxt(sys.argv[1]),0,1) proposal_coords = numpy.delete(numpy.loadtxt(sys.argv[2]),0,1) anm_final_coords = numpy.del...
34.235294
72
0.659794
''' Created on 14/9/2015 @author: victor ''' import sys import numpy from nma_algo_char.data_retrieval import calculate_rmsds if __name__ == '__main__': current_coords = numpy.delete(numpy.loadtxt(sys.argv[1]),0,1) proposal_coords = numpy.delete(numpy.loadtxt(sys.argv[2]),0,1) anm_final_coords = numpy.del...
0
0
0
0
0
0
0
0
0
be5511693a45ec4ffc03246aea2338dbb036fe3f
2,402
py
Python
Python3/355.design-twitter.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
Python3/355.design-twitter.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
Python3/355.design-twitter.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=355 lang=python3 # # [355] Design Twitter # # @lc code=start # Your Twitter object will be instantiated and called as such: # obj = Twitter() # obj.postTweet(1,5) # param_2 = obj.getNewsFeed(1) # obj.follow(1,2) # obj.postTweet(2,6) # param_2 = obj.getNewsFeed(1) # print(param_2) # obj.unfollo...
34.314286
224
0.628643
# # @lc app=leetcode id=355 lang=python3 # # [355] Design Twitter # import collections import heapq # @lc code=start class Twitter: def __init__(self): """ Initialize your data structure here. """ self.user_and_posts = collections.defaultdict(list) self.user_and_followers = ...
0
0
0
1,987
0
0
0
-12
66
315e53cbb30810268cbe2e7fbc7e5ed76c295e5f
578
py
Python
chartkick/options.py
anuragverma65/chartkick.py
4d0f2f78fd580c3c81fe8417b9c0e0d01a53c32a
[ "MIT" ]
407
2015-01-04T22:57:08.000Z
2022-01-11T18:39:15.000Z
chartkick/options.py
anuragverma65/chartkick.py
4d0f2f78fd580c3c81fe8417b9c0e0d01a53c32a
[ "MIT" ]
23
2015-01-05T02:45:00.000Z
2020-12-23T14:15:14.000Z
chartkick/options.py
anuragverma65/chartkick.py
4d0f2f78fd580c3c81fe8417b9c0e0d01a53c32a
[ "MIT" ]
104
2015-01-04T17:38:20.000Z
2021-08-01T20:01:26.000Z
from __future__ import absolute_import
27.52381
72
0.544983
from __future__ import absolute_import import json import logging class Options(dict): def __init__(self, *args, **kwargs) : dict.__init__(self, *args, **kwargs) def load(self, filename): with open(filename) as jsonfile: options = json.loads(jsonfile.read()) self.clea...
0
0
0
487
0
0
0
-17
68
c1b4e83ebdecf306834ecc00b17106d9265eea49
359
py
Python
tests/generate_testdata.py
slub/es2json
be22a193c615043693d580ff73f89adf4c0fe8f1
[ "Apache-2.0" ]
null
null
null
tests/generate_testdata.py
slub/es2json
be22a193c615043693d580ff73f89adf4c0fe8f1
[ "Apache-2.0" ]
1
2020-12-08T09:51:42.000Z
2020-12-08T09:51:42.000Z
tests/generate_testdata.py
slub/es2json
be22a193c615043693d580ff73f89adf4c0fe8f1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import json import gzip MAX = 1000 if __name__ == "__main__": with gzip.open("./tests/testdata.ldj.gz", "wt") as outp: for n in range(0, MAX): print(json.dumps({"foo": n, "bar": MAX-n, "baz": "test{}".format(n) ...
25.642857
60
0.448468
#!/usr/bin/env python3 import json import gzip MAX = 1000 if __name__ == "__main__": with gzip.open("./tests/testdata.ldj.gz", "wt") as outp: for n in range(0, MAX): print(json.dumps({"foo": n, "bar": MAX-n, "baz": "test{}".format(n) ...
0
0
0
0
0
0
0
0
0
8a600accf720d7910edc329583e7353bf5eacf1e
824
py
Python
updateMathSciNet.py
musm/abbrv.jabref.org
97e28a876dd09149bf6fc974a960ac80408b17d9
[ "CC0-1.0" ]
null
null
null
updateMathSciNet.py
musm/abbrv.jabref.org
97e28a876dd09149bf6fc974a960ac80408b17d9
[ "CC0-1.0" ]
null
null
null
updateMathSciNet.py
musm/abbrv.jabref.org
97e28a876dd09149bf6fc974a960ac80408b17d9
[ "CC0-1.0" ]
null
null
null
import urllib.request import csv csv_file_path = 'mathscinet.csv' urllib.request.urlretrieve('https://mathscinet.ams.org/msnhtml/annser.csv', csv_file_path) with open(csv_file_path, mode='r') as csv_file, open('journal_abbreviations_mathematics.txt', mode='w') as abbreviations_file: abbreviations_file = csv.write...
35.826087
126
0.680825
import os import urllib.request import csv csv_file_path = 'mathscinet.csv' urllib.request.urlretrieve('https://mathscinet.ams.org/msnhtml/annser.csv', csv_file_path) with open(csv_file_path, mode='r') as csv_file, open('journal_abbreviations_mathematics.txt', mode='w') as abbreviations_file: abbreviations_file =...
0
0
0
0
0
0
0
-12
22
1c128ff78f15577fb04cfae6c313098089fc1267
1,803
py
Python
tests/components/vaillant/test_init.py
dmaisonn/home-assistant
e40e5bf4ab5093dd30fc95ab7a68ce41d3742d9f
[ "Apache-2.0" ]
null
null
null
tests/components/vaillant/test_init.py
dmaisonn/home-assistant
e40e5bf4ab5093dd30fc95ab7a68ce41d3742d9f
[ "Apache-2.0" ]
null
null
null
tests/components/vaillant/test_init.py
dmaisonn/home-assistant
e40e5bf4ab5093dd30fc95ab7a68ce41d3742d9f
[ "Apache-2.0" ]
null
null
null
"""Tests for the vaillant HUB."""
30.559322
63
0.719911
"""Tests for the vaillant HUB.""" import mock import pytest from pymultimatic.api import ApiError from homeassistant.components import vaillant from homeassistant.components.vaillant import DOMAIN from tests.components.vaillant import _setup, SystemManagerMock @pytest.fixture(autouse=True) def fixture_no_platform(m...
0
403
1,017
0
0
0
0
95
249
a0130fe08c7f469c02240d34542a1eca14984049
4,614
py
Python
src/website/apps/packages/views.py
rapidsms/rapidsms.org
db871949797150e654a42afe00fc9e8f9fc1559e
[ "Apache-2.0" ]
2
2015-10-09T04:48:55.000Z
2020-05-29T18:33:39.000Z
src/website/apps/packages/views.py
rapidsms/rapidsms.org
db871949797150e654a42afe00fc9e8f9fc1559e
[ "Apache-2.0" ]
22
2015-09-20T14:00:16.000Z
2021-06-10T20:08:25.000Z
src/website/apps/packages/views.py
rapidsms/rapidsms.org
db871949797150e654a42afe00fc9e8f9fc1559e
[ "Apache-2.0" ]
6
2015-12-14T21:05:01.000Z
2019-11-02T19:35:24.000Z
# TODO: This probably doesn't need to require login. But in that case we may # want to integrate something like honeypot at least.
36.330709
97
0.696792
import datetime from django.contrib import messages from django.shortcuts import redirect from django.utils import timezone from django.views.generic import CreateView, DetailView, FormView, UpdateView, View from django.views.generic.detail import SingleObjectMixin from website.apps.core.mixins import IsActiveObjectM...
0
209
0
3,564
0
0
0
299
404
071b0d8d4806b63e684f90c18734504cdce03709
11,297
py
Python
server/src/server.py
ladyrassilon/brat
69c287df5410221c49e0560d6cdea063aa4d4441
[ "CC-BY-3.0" ]
null
null
null
server/src/server.py
ladyrassilon/brat
69c287df5410221c49e0560d6cdea063aa4d4441
[ "CC-BY-3.0" ]
null
null
null
server/src/server.py
ladyrassilon/brat
69c287df5410221c49e0560d6cdea063aa4d4441
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python # -*- Mode: Python; tab-width: 4; indent-tabs-mode: nil; -*- # vim:set ft=python ts=4 sw=4 sts=4 autoindent: """Main entry for the brat server, ensures integrity, handles dispatch and processes potential exceptions before returning them to be sent as responses. NOTE(S): * Defer imports until fa...
33.032164
104
0.642471
#!/usr/bin/env python # -*- Mode: Python; tab-width: 4; indent-tabs-mode: nil; -*- # vim:set ft=python ts=4 sw=4 sts=4 autoindent: """Main entry for the brat server, ensures integrity, handles dispatch and processes potential exceptions before returning them to be sent as responses. NOTE(S): * Defer imports until fa...
0
0
0
249
0
9,332
0
37
362
7d1c639d43321ee2fb5737f7743b1a5c0ac293a0
1,544
py
Python
src/handlers/mail/handler.py
alienhard/notify
a288d7472d930aad693559ebd5dd88d0b8c9a087
[ "Unlicense", "MIT" ]
1
2015-11-05T08:10:08.000Z
2015-11-05T08:10:08.000Z
src/handlers/mail/handler.py
alienhard/notify
a288d7472d930aad693559ebd5dd88d0b8c9a087
[ "Unlicense", "MIT" ]
null
null
null
src/handlers/mail/handler.py
alienhard/notify
a288d7472d930aad693559ebd5dd88d0b8c9a087
[ "Unlicense", "MIT" ]
null
null
null
"""A handler that sends mails.""" import os.path from ConfigParser import RawConfigParser # load config CFG_PATH = os.path.join( os.path.dirname(__file__), '..', '..', '..', 'notify.cfg') CONFIG = RawConfigParser() CONFIG.read(CFG_PATH) SENDER_MAIL = CONFIG.get('mail', 'sender') SMPT_SERVER = CONFIG.get('mail', 's...
32.851064
68
0.649611
"""A handler that sends mails.""" import smtplib import os.path from ConfigParser import RawConfigParser from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText # load config CFG_PATH = os.path.join( os.path.dirname(__file__), '..', '..', '..', 'notify.cfg') CONFIG = RawConfigParser()...
0
0
0
1,078
0
0
0
33
91
dfcd6b81ed92cc249830db379d1f335194889506
1,127
py
Python
jeffnet/objax/layers/drop_path.py
Forbu/efficientnet-jax
eb9ed23826a92761bd3c8d88df0243910c9c24bd
[ "Apache-2.0" ]
95
2020-10-28T22:32:55.000Z
2022-03-09T09:37:34.000Z
jeffnet/objax/layers/drop_path.py
Forbu/efficientnet-jax
eb9ed23826a92761bd3c8d88df0243910c9c24bd
[ "Apache-2.0" ]
2
2021-03-19T17:03:06.000Z
2022-02-02T17:48:10.000Z
jeffnet/objax/layers/drop_path.py
Forbu/efficientnet-jax
eb9ed23826a92761bd3c8d88df0243910c9c24bd
[ "Apache-2.0" ]
8
2020-11-01T14:05:02.000Z
2022-03-18T14:33:19.000Z
""" Drop Path Hacked together by / Copyright 2020 Ross Wightman (https://github.com/rwightman) """ import jax.random as jr from objax import random from objax.typing import JaxArray def drop_path(x: JaxArray, drop_prob: float = 0., generator=random.DEFAULT_GENERATOR) -> JaxArray: """Drop paths (Stochastic Depth) ...
41.740741
108
0.71606
""" Drop Path Hacked together by / Copyright 2020 Ross Wightman (https://github.com/rwightman) """ import jax.random as jr from objax import random from objax.typing import JaxArray def drop_path(x: JaxArray, drop_prob: float = 0., generator=random.DEFAULT_GENERATOR) -> JaxArray: """Drop paths (Stochastic Depth) ...
0
0
0
0
0
0
0
0
0
8d2d318b18054d2bae8663b41f5c32f33d2b79a6
6,646
py
Python
docs_src/nbval/cover.py
discdiver/fastai_docs
ab9fc7aa66441b0ae3ce4d2fe42c706989708f41
[ "Apache-2.0" ]
59
2020-08-18T03:41:35.000Z
2022-03-23T03:51:55.000Z
docs_src/nbval/cover.py
discdiver/fastai_docs
ab9fc7aa66441b0ae3ce4d2fe42c706989708f41
[ "Apache-2.0" ]
17
2020-08-25T14:15:32.000Z
2022-03-27T02:12:19.000Z
docs_src/nbval/cover.py
discdiver/fastai_docs
ab9fc7aa66441b0ae3ce4d2fe42c706989708f41
[ "Apache-2.0" ]
89
2020-08-17T23:45:42.000Z
2022-03-27T20:53:43.000Z
""" Code to enable coverage of any external code called by the notebook. """ import os import coverage # Coverage setup/teardown code to run in kernel # Inspired by pytest-cov code. _python_setup = """\ import coverage __cov = coverage.Coverage( data_file=%r, source=%r, config_file=%r, auto_data=Tru...
34.082051
93
0.684773
""" Code to enable coverage of any external code called by the notebook. """ import os import coverage # Coverage setup/teardown code to run in kernel # Inspired by pytest-cov code. _python_setup = """\ import coverage __cov = coverage.Coverage( data_file=%r, source=%r, config_file=%r, auto_data=Tru...
0
0
0
0
0
0
0
0
0
357f9eae3ce13bf5f56bfda252ff78e9e74eab55
433
py
Python
HSapi.py
starcreep48/HearthStoneBGLite
e6be99de8b1359ac3626cab95155805982c7301d
[ "MIT" ]
2
2021-09-13T02:54:29.000Z
2021-09-13T02:55:48.000Z
HSapi.py
starcreep48/HearthStoneBGLite
e6be99de8b1359ac3626cab95155805982c7301d
[ "MIT" ]
1
2021-09-13T03:29:25.000Z
2021-09-13T03:29:25.000Z
HSapi.py
starcreep48/HearthStoneBGLite
e6be99de8b1359ac3626cab95155805982c7301d
[ "MIT" ]
null
null
null
import json from blizzardapi import BlizzardApi f = open('utils/APIClient.json',) data = json.load(f) api_client = BlizzardApi(data['client_id'], data['client_secret']) for i in range(0,6): data = api_client.hearthstone.game_data.search_cards("eu","en_US", game_mode="battlegrounds", tier=i+1, page=1) with...
24.055556
115
0.706697
import requests import json from blizzardapi import BlizzardApi f = open('utils/APIClient.json',) data = json.load(f) api_client = BlizzardApi(data['client_id'], data['client_secret']) for i in range(0,6): data = api_client.hearthstone.game_data.search_cards("eu","en_US", game_mode="battlegrounds", tier=i+1, p...
0
0
0
0
0
0
0
-6
22
7c6b4cf049dc0a46d272e08c2bb73161a1703890
439
py
Python
FastSimulation/Configuration/python/Geometries_START_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
FastSimulation/Configuration/python/Geometries_START_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
FastSimulation/Configuration/python/Geometries_START_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms # Apply Tracker and Muon misalignment process.fastSimProducer.detectorDefinition.trackerAlignmentLabel = cms.untracked.string("") misalignedTrackerGeometry.applyAlignment = True misalignedDTGeometry.applyAlignment = True misalignedCSCGeometry.applyAlignment = True
33.769231
91
0.872437
import FWCore.ParameterSet.Config as cms from FastSimulation.Configuration.Geometries_cff import * import FastSimulation.SimplifiedGeometryPropagator.fastSimProducer_cff # Apply Tracker and Muon misalignment process.fastSimProducer.detectorDefinition.trackerAlignmentLabel = cms.untracked.string("") misalignedTracker...
0
0
0
0
0
0
0
85
46
f7abf593367dd391c38c66127ed9e95f4471d6c8
3,803
py
Python
mezzanine_sync_pages/sync_pages.py
eht16/mezzanine-sync-pages
aedff9b841e59f1138fb609208149c34cebf3e32
[ "MIT" ]
1
2021-06-20T16:23:04.000Z
2021-06-20T16:23:04.000Z
mezzanine_sync_pages/sync_pages.py
eht16/mezzanine-sync-pages
aedff9b841e59f1138fb609208149c34cebf3e32
[ "MIT" ]
null
null
null
mezzanine_sync_pages/sync_pages.py
eht16/mezzanine-sync-pages
aedff9b841e59f1138fb609208149c34cebf3e32
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details.
40.457447
93
0.566658
# -*- coding: utf-8 -*- # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from collections import OrderedDict from difflib import unified_diff from os.path import splitext from pathlib import Path from mezzanine.pages.models import Page from me...
0
0
0
3,414
0
0
0
83
158
795ff5b3b99d58886be95db429158791cfb59c12
2,632
py
Python
web_app/pages.py
joejcollins/WomertonFarm
96167530d37f5aab6ae91cc8ff4583a86740e3f4
[ "MIT" ]
null
null
null
web_app/pages.py
joejcollins/WomertonFarm
96167530d37f5aab6ae91cc8ff4583a86740e3f4
[ "MIT" ]
1
2021-06-02T00:18:04.000Z
2021-06-02T00:18:04.000Z
web_app/pages.py
joejcollins/WomertonFarm
96167530d37f5aab6ae91cc8ff4583a86740e3f4
[ "MIT" ]
null
null
null
''' Base controller to deal with 500 errors ''' ''' Show the home page. ''' ''' Send the email ''' ''' Show the template based on the URL. '''
34.181818
111
0.615881
import logging import webapp2 import config import re import json import models from google.appengine.api import mail ''' Base controller to deal with 500 errors ''' class base_page_controller(webapp2.RequestHandler): """ Base pag controller """ def handle_exception(self, exception, debug): # Log the e...
0
0
0
2,266
0
0
0
-36
253
3b440d2e97a08b86babab12ddba45cf63bad0fa1
2,336
py
Python
scripts/ScottieHDI.py
iancze/ScottiePippen
500979fce8f7990f07bfcf1892608e93f0868711
[ "MIT" ]
1
2021-07-05T16:57:37.000Z
2021-07-05T16:57:37.000Z
scripts/ScottieHDI.py
iancze/ScottiePippen
500979fce8f7990f07bfcf1892608e93f0868711
[ "MIT" ]
null
null
null
scripts/ScottieHDI.py
iancze/ScottiePippen
500979fce8f7990f07bfcf1892608e93f0868711
[ "MIT" ]
1
2021-02-19T23:53:48.000Z
2021-02-19T23:53:48.000Z
#!/usr/bin/env python import argparse parser = argparse.ArgumentParser(description="Measure statistics across multiple chains.") parser.add_argument("--burn", type=int, default=0, help="How many samples to discard from the beginning of the chain for burn in.") parser.add_argument("--config", default="config.yaml", he...
27.482353
207
0.668236
#!/usr/bin/env python import argparse parser = argparse.ArgumentParser(description="Measure statistics across multiple chains.") parser.add_argument("--burn", type=int, default=0, help="How many samples to discard from the beginning of the chain for burn in.") parser.add_argument("--config", default="config.yaml", he...
0
0
0
0
0
931
0
20
66
782c34df562523395cc6b6e3d5a3fc26d56c139f
468
py
Python
archive/pygame-cardgame-old-0-1/main.py
KingJellycycle/pygame-hexwar
db56d0bba0cc7430081bc6481402c8e998dcea6a
[ "MIT" ]
null
null
null
archive/pygame-cardgame-old-0-1/main.py
KingJellycycle/pygame-hexwar
db56d0bba0cc7430081bc6481402c8e998dcea6a
[ "MIT" ]
null
null
null
archive/pygame-cardgame-old-0-1/main.py
KingJellycycle/pygame-hexwar
db56d0bba0cc7430081bc6481402c8e998dcea6a
[ "MIT" ]
null
null
null
import pygame import game pygame.init() pygame.display.set_caption('R') clock = pygame.time.Clock() fps = 60 gameDisp = pygame.display.set_mode((800, 600), pygame.HWSURFACE|pygame.DOUBLEBUF|pygame.RESIZABLE) while True: for event in pygame.event.get(): if event.type == pygame.QUIT: quitfun...
16.714286
98
0.65812
import pygame import game pygame.init() pygame.display.set_caption('R') clock = pygame.time.Clock() fps = 60 gameDisp = pygame.display.set_mode((800, 600), pygame.HWSURFACE|pygame.DOUBLEBUF|pygame.RESIZABLE) def quitfunc(): pygame.quit() quit() while True: for event in pygame.event.get(): if ...
0
0
0
0
0
23
0
0
23
67c08c3ead1d145e220d4c387aa1e388e43e0459
143
py
Python
backend/src/app/db.py
wooshifu/Blog
a8ad6a7e1e1bb312b64f54414e5d945b73df5e1d
[ "MIT" ]
null
null
null
backend/src/app/db.py
wooshifu/Blog
a8ad6a7e1e1bb312b64f54414e5d945b73df5e1d
[ "MIT" ]
3
2021-05-07T11:38:25.000Z
2022-02-26T10:26:47.000Z
backend/src/app/db.py
wooshifu/Blog
a8ad6a7e1e1bb312b64f54414e5d945b73df5e1d
[ "MIT" ]
null
null
null
from flask_sqlalchemy import SQLAlchemy from .app import app db = SQLAlchemy(app) db_engine = db.engine db_connection = db_engine.connect()
15.888889
39
0.79021
from flask_sqlalchemy import SQLAlchemy from .app import app db = SQLAlchemy(app) db_engine = db.engine db_connection = db_engine.connect()
0
0
0
0
0
0
0
0
0
2a942401302f4a6f04e567df730fec2109c6ddf7
540
py
Python
django_experiment/accounts/migrations/0009_auto_20180608_0457.py
prakashgowinji/Django_experiment
e8c9007b7b9ed3e766e800acb9f64963b2f2633b
[ "Apache-2.0" ]
null
null
null
django_experiment/accounts/migrations/0009_auto_20180608_0457.py
prakashgowinji/Django_experiment
e8c9007b7b9ed3e766e800acb9f64963b2f2633b
[ "Apache-2.0" ]
null
null
null
django_experiment/accounts/migrations/0009_auto_20180608_0457.py
prakashgowinji/Django_experiment
e8c9007b7b9ed3e766e800acb9f64963b2f2633b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-08 04:57 from __future__ import unicode_literals
24.545455
105
0.659259
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-08 04:57 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0008_auto_20180608_0454'), ] operations ...
0
0
0
330
0
0
0
27
68
116119aaea8a52ec7dbfdd93a0e0acd55babcd77
2,641
py
Python
util/data.py
coleblackman/AccDNN
932579548283a9f2da3f366e131e37c48ac58eaf
[ "Apache-2.0" ]
231
2019-08-28T16:42:55.000Z
2022-03-30T09:40:19.000Z
util/data.py
coleblackman/AccDNN
932579548283a9f2da3f366e131e37c48ac58eaf
[ "Apache-2.0" ]
13
2019-10-08T07:08:15.000Z
2021-06-23T05:58:10.000Z
util/data.py
coleblackman/AccDNN
932579548283a9f2da3f366e131e37c48ac58eaf
[ "Apache-2.0" ]
81
2019-09-24T07:11:11.000Z
2022-03-23T00:15:03.000Z
#!/usr/bin/env python
26.676768
84
0.581219
#!/usr/bin/env python from settings import * import numpy as np import struct def _bool2int(x, dw): y = 0 for i,j in enumerate(x): y += j<<(i * dw) return y def _quantize(mat, dw, dq, is_complement=True): FIX_POINT_MAX = 2 ** (dw - 1) - 1 FIX_POINT_MIN = - 2 ** (dw - 1) FIX_POINT_SCAL...
0
0
0
0
0
2,401
0
-10
228
0856d48337c436c20d03311161727a4a552f16cc
1,067
py
Python
qa/tasks/mds_pre_upgrade.py
rpratap-bot/ceph
9834961a66927ae856935591f2fd51082e2ee484
[ "MIT" ]
4
2020-04-08T03:42:02.000Z
2020-10-01T20:34:48.000Z
qa/tasks/mds_pre_upgrade.py
rpratap-bot/ceph
9834961a66927ae856935591f2fd51082e2ee484
[ "MIT" ]
93
2020-03-26T14:29:14.000Z
2020-11-12T05:54:55.000Z
qa/tasks/mds_pre_upgrade.py
rpratap-bot/ceph
9834961a66927ae856935591f2fd51082e2ee484
[ "MIT" ]
23
2020-03-24T10:28:44.000Z
2020-09-24T09:42:19.000Z
""" Prepare MDS cluster for upgrade. """ import logging import time from tasks.cephfs.filesystem import Filesystem log = logging.getLogger(__name__) def task(ctx, config): """ Prepare MDS cluster for upgrade. This task reduces ranks to 1 and stops all standbys. """ if config is None: c...
24.25
82
0.63074
""" Prepare MDS cluster for upgrade. """ import logging import time from tasks.cephfs.filesystem import Filesystem log = logging.getLogger(__name__) def task(ctx, config): """ Prepare MDS cluster for upgrade. This task reduces ranks to 1 and stops all standbys. """ if config is None: c...
0
0
0
0
0
0
0
0
0
118eede795109ec14575911abf2dab8cf71f18f0
12,991
py
Python
test/test_soft_functions.py
pythoro/npsolve
c6993dd7a10a60a09655f0252c3ad36fe7dc3af1
[ "MIT" ]
null
null
null
test/test_soft_functions.py
pythoro/npsolve
c6993dd7a10a60a09655f0252c3ad36fe7dc3af1
[ "MIT" ]
null
null
null
test/test_soft_functions.py
pythoro/npsolve
c6993dd7a10a60a09655f0252c3ad36fe7dc3af1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu May 21 15:21:59 2020 @author: Reuben """
29.93318
77
0.600955
# -*- coding: utf-8 -*- """ Created on Thu May 21 15:21:59 2020 @author: Reuben """ import unittest import numpy as np import npsolve.soft_functions as soft class Test_lim_scalar(unittest.TestCase): def setUp(self): self.vals = [-1000, 2.5, 3.5, 1000] self.limit = 3.0 def test_m100...
0
0
0
12,048
0
0
0
7
722
e6909a63b858aaab236c2ea1f74b30cc95f975a1
6,064
py
Python
chinilla/wallet/puzzles/p2_delegated_puzzle_or_hidden_puzzle.py
Chinilla/chinilla-blockchain
59bebcf94e65b74fbb53ad4929bbd79cb28be619
[ "Apache-2.0" ]
null
null
null
chinilla/wallet/puzzles/p2_delegated_puzzle_or_hidden_puzzle.py
Chinilla/chinilla-blockchain
59bebcf94e65b74fbb53ad4929bbd79cb28be619
[ "Apache-2.0" ]
null
null
null
chinilla/wallet/puzzles/p2_delegated_puzzle_or_hidden_puzzle.py
Chinilla/chinilla-blockchain
59bebcf94e65b74fbb53ad4929bbd79cb28be619
[ "Apache-2.0" ]
null
null
null
""" Pay to delegated puzzle or hidden puzzle In this puzzle program, the solution must choose either a hidden puzzle or a delegated puzzle on a given public key. The given public key is morphed by adding an offset from the hash of the hidden puzzle and itself, giving a new so-called "synthetic" public key which has t...
43.942029
112
0.805904
""" Pay to delegated puzzle or hidden puzzle In this puzzle program, the solution must choose either a hidden puzzle or a delegated puzzle on a given public key. The given public key is morphed by adding an offset from the hash of the hidden puzzle and itself, giving a new so-called "synthetic" public key which has t...
0
0
0
0
0
2,064
0
97
341
72019bd8e5e41358e23b334d8ffd731d98b0e8e6
319
py
Python
instagram_api/response/model/surface.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
13
2019-08-07T21:24:34.000Z
2020-12-12T12:23:50.000Z
instagram_api/response/model/surface.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
null
null
null
instagram_api/response/model/surface.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
null
null
null
__all__ = ['Surface', 'SurfaceInterface']
19.9375
53
0.752351
from ..mapper import PropertyMapper, ApiInterfaceBase from ..mapper.types import Timestamp, AnyType __all__ = ['Surface', 'SurfaceInterface'] class SurfaceInterface(ApiInterfaceBase): scores: AnyType rank_token: str ttl_secs: int name: str class Surface(PropertyMapper, SurfaceInterface): pass
0
0
0
128
0
0
0
56
90
1a6215d3350ac4e3303621c3a83321c45c23ef4f
6,085
py
Python
src/quality_check.py
Jasplet/SKS_Splitting
d5c3ea442e75fd9643c31575158cf350aa41a5e2
[ "MIT" ]
null
null
null
src/quality_check.py
Jasplet/SKS_Splitting
d5c3ea442e75fd9643c31575158cf350aa41a5e2
[ "MIT" ]
null
null
null
src/quality_check.py
Jasplet/SKS_Splitting
d5c3ea442e75fd9643c31575158cf350aa41a5e2
[ "MIT" ]
null
null
null
#! /usr/bin/env python ###################### # quality_check.py ###################### # A program to loop through and inspect SWS results, plot the QA result from # Splitwavepy and print the measured SKS and SKKS splitting from Sheba # A measure of measure of data quality and discernable discrepancy between results i...
47.913386
178
0.560394
#! /usr/bin/env python ###################### # quality_check.py ###################### # A program to loop through and inspect SWS results, plot the QA result from # Splitwavepy and print the measured SKS and SKKS splitting from Sheba # A measure of measure of data quality and discernable discrepancy between results i...
0
0
0
4,769
0
0
0
3
177
c5e2383a33736e97cabae7f5d8ed6150518462ce
506
py
Python
source/pkgsrc/devel/gyp/patches/patch-gyptest.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/devel/gyp/patches/patch-gyptest.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/devel/gyp/patches/patch-gyptest.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-gyptest.py,v 1.4 2014/08/21 14:49:43 he Exp $ * Add NetBSD 5, 6 and 7 target --- gyptest.py.orig 2014-07-14 14:19:50.000000000 +0000 +++ gyptest.py + 'freebsd9': ['make'], + 'netbsd5': ['make'], + 'netbsd6': ['make'], + 'netbsd7': ['make'], 'openbsd5': ['make'], 'cy...
28.111111
60
0.492095
$NetBSD: patch-gyptest.py,v 1.4 2014/08/21 14:49:43 he Exp $ * Add NetBSD 5, 6 and 7 target --- gyptest.py.orig 2014-07-14 14:19:50.000000000 +0000 +++ gyptest.py @@ -219,6 +219,10 @@ def main(argv=None): 'aix5': ['make'], 'freebsd7': ['make'], 'freebsd8': ['make'], + 'freebsd9': ['make'...
0
0
0
0
0
86
0
0
43
f23057a09466d349b3a7d0a7a4009277442d1ab7
363
py
Python
GradeFromJOJ/utils.py
makersmelx/giteaAdmin
78f9f16193ddd9387643a97bd19b098c7515c5c9
[ "MIT" ]
2
2021-06-22T09:45:13.000Z
2021-07-01T11:33:49.000Z
GradeFromJOJ/utils.py
makersmelx/GiteaCanvasHelper
78f9f16193ddd9387643a97bd19b098c7515c5c9
[ "MIT" ]
null
null
null
GradeFromJOJ/utils.py
makersmelx/GiteaCanvasHelper
78f9f16193ddd9387643a97bd19b098c7515c5c9
[ "MIT" ]
null
null
null
""" Canvas fast grading script by makersmelx <makersmelx@gmail.com> """ dotenv_path = '.env'
20.166667
59
0.548209
""" Canvas fast grading script by makersmelx <makersmelx@gmail.com> """ import os dotenv_path = '.env' def import_env(): with open(dotenv_path) as dotenv: for line in dotenv: var = line.strip().split('=') if len(var) == 2: key, value = var[0].strip(), var[1].strip...
0
0
0
0
0
234
0
-12
46
df39496dc3f788369aa2880d44850388523444c8
3,656
py
Python
pythonProject1/venv/Lib/site-packages/xdis/wordcode.py
mjtomlinson/CNE330_Python_1_Final_Project
05020806860937ef37b9a0ad2e27de4897a606de
[ "CC0-1.0" ]
1
2021-05-20T19:33:37.000Z
2021-05-20T19:33:37.000Z
pythonProject1/venv/Lib/site-packages/xdis/wordcode.py
mjtomlinson/CNE330_Python_1_Final_Project
05020806860937ef37b9a0ad2e27de4897a606de
[ "CC0-1.0" ]
4
2020-10-03T20:37:55.000Z
2020-10-04T23:11:38.000Z
pythonProject1/venv/Lib/site-packages/xdis/wordcode.py
mjtomlinson/CNE330_Python_1_Final_Project
05020806860937ef37b9a0ad2e27de4897a606de
[ "CC0-1.0" ]
null
null
null
# (C) Copyright 2018, 2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is...
35.495146
82
0.616794
# (C) Copyright 2018, 2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is...
0
0
0
0
857
0
0
39
67
911e87840601ad9e07bc653246a69b865510a4f0
1,735
py
Python
py/rotseutil/coords_operations.py
danielsela42/rotseutil
dedbe1b69ca3a12b6fad8ca9f187d274bcbd175a
[ "BSD-3-Clause" ]
2
2019-11-03T02:02:08.000Z
2022-01-19T23:05:14.000Z
py/rotseutil/coords_operations.py
danielsela42/rotseutil
dedbe1b69ca3a12b6fad8ca9f187d274bcbd175a
[ "BSD-3-Clause" ]
5
2019-04-05T04:19:18.000Z
2021-07-12T19:49:50.000Z
py/rotseutil/coords_operations.py
danielsela42/rotseutil
dedbe1b69ca3a12b6fad8ca9f187d274bcbd175a
[ "BSD-3-Clause" ]
4
2019-06-16T01:55:53.000Z
2021-01-25T21:23:31.000Z
''' Created on Jul 30, 2017 @author: Daniel Sela, Arnon Sela ''' def add_coords(coords, delta): ''' Adds (or substructs) number to (from) coords Args: coords: 235959.456 style coords delta: ss number to add (negative to sub) ''' temp = decim_2_sec(coords) temp += delta ret...
23.133333
65
0.564265
''' Created on Jul 30, 2017 @author: Daniel Sela, Arnon Sela ''' def decim_2_vec(decim): if isinstance(decim, str): decim = float(decim) neg = decim < 0 temp = abs(decim) dd = int(temp/10000.0) temp -= dd*10000.0 mm = int(temp/100.0) ss = temp-mm*100.0 if neg: if dd !...
0
0
0
0
0
662
0
0
69
c5f8e1ccf66b47e17b69d093de68e6cf6a78b345
1,028
py
Python
src/djrtime/djrtime/ping.py
amitu/rtime
6e23a2f86a2cae4399932879f0d157f8e63a8358
[ "BSD-3-Clause" ]
2
2017-04-01T14:05:58.000Z
2017-04-02T07:57:56.000Z
src/djrtime/djrtime/ping.py
amitu/rtime
6e23a2f86a2cae4399932879f0d157f8e63a8358
[ "BSD-3-Clause" ]
3
2016-11-08T08:00:08.000Z
2016-11-08T08:15:20.000Z
src/djrtime/djrtime/ping.py
amitu/rtime
6e23a2f86a2cae4399932879f0d157f8e63a8358
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) SERVER = "127.0.0.1" PORT = 6543 if __name__ == "__main__": ping()
22.347826
78
0.581712
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import json import os import socket import sys import snappy SERVER = "127.0.0.1" PORT = 6543 class Message(object): def __init__(self, host, app, name, otime, qtime=-1, rtime=-1,...
0
0
0
448
0
263
0
-49
157
7c266d199d62b0a295df3fa38288513a348bba04
4,656
py
Python
alexia/api/v1/test/test_common.py
LaudateCorpus1/alexia-1
9c0d3c90c0ffe2237299a561b755b9c17905e354
[ "BSD-3-Clause" ]
8
2015-06-29T20:01:22.000Z
2020-10-19T13:49:38.000Z
alexia/api/v1/test/test_common.py
LaudateCorpus1/alexia-1
9c0d3c90c0ffe2237299a561b755b9c17905e354
[ "BSD-3-Clause" ]
67
2015-10-05T16:57:14.000Z
2022-03-28T19:57:36.000Z
alexia/api/v1/test/test_common.py
LaudateCorpus1/alexia-1
9c0d3c90c0ffe2237299a561b755b9c17905e354
[ "BSD-3-Clause" ]
6
2015-10-05T13:54:34.000Z
2021-11-30T05:11:58.000Z
from __future__ import unicode_literals
35.272727
117
0.570447
from __future__ import unicode_literals import datetime from django.utils import timezone from alexia.apps.billing.models import ( Authorization, Order, PermanentProduct, PriceGroup, ProductGroup, Purchase, TemporaryProduct, ) from alexia.apps.scheduling.models import Event from alexia.test import TestCase ...
0
0
0
4,256
0
0
0
200
159
4e3c72c968ae87c833f9164fa2b018d79930fd4d
150,537
py
Python
clustering_ICGS.py
kpeaton/altanalyze_wikitest
93c38590d624fe75da51fbb7cffa55d8bd004a44
[ "Apache-2.0" ]
1
2018-09-01T03:00:38.000Z
2018-09-01T03:00:38.000Z
clustering_ICGS.py
kpeaton/altanalyze_wikitest
93c38590d624fe75da51fbb7cffa55d8bd004a44
[ "Apache-2.0" ]
null
null
null
clustering_ICGS.py
kpeaton/altanalyze_wikitest
93c38590d624fe75da51fbb7cffa55d8bd004a44
[ "Apache-2.0" ]
null
null
null
### clustering.py #Copyright 2005-2008 J. David Gladstone Institutes, San Francisco California #Author Nathan Salomonis - nsalomonis@gmail.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 ...
45.192735
289
0.609691
### clustering.py #Copyright 2005-2008 J. David Gladstone Institutes, San Francisco California #Author Nathan Salomonis - nsalomonis@gmail.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 ...
0
0
0
0
0
107,103
0
0
1,191
ce0314a695ab882fb5bd45d926498b8fe4832c5c
12,822
py
Python
twunnel/remote_proxy_server__ssh.py
jvansteirteghem/twunnel
6de57636c7a9df03fe8452c5bc57071aad3719a7
[ "MIT" ]
16
2015-02-09T11:45:05.000Z
2021-07-22T12:21:25.000Z
twunnel/remote_proxy_server__ssh.py
jvansteirteghem/twunnel
6de57636c7a9df03fe8452c5bc57071aad3719a7
[ "MIT" ]
null
null
null
twunnel/remote_proxy_server__ssh.py
jvansteirteghem/twunnel
6de57636c7a9df03fe8452c5bc57071aad3719a7
[ "MIT" ]
7
2015-02-23T18:38:17.000Z
2021-04-15T11:10:19.000Z
# Copyright (c) Jeroen Van Steirteghem # See LICENSE import twunnel.local_proxy_server import twunnel.logger
37.165217
243
0.62463
# Copyright (c) Jeroen Van Steirteghem # See LICENSE from twisted.conch import avatar from twisted.conch.error import ValidPublicKey from twisted.conch.ssh import channel, factory, forwarding, keys from twisted.cred import checkers, credentials, portal from twisted.cred.error import UnauthorizedLogin from twisted.inte...
0
0
0
11,418
0
685
0
200
411
ebc8743bbdd50a952b777d07ace908c04f874bec
1,384
py
Python
tests/unit/returners/test_cassandra_cql_return.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
5
2018-05-01T20:51:14.000Z
2021-11-09T05:43:00.000Z
tests/unit/returners/test_cassandra_cql_return.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
12
2015-04-15T22:17:42.000Z
2016-03-22T08:46:27.000Z
tests/unit/returners/test_cassandra_cql_return.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
7
2017-09-29T18:49:53.000Z
2021-11-09T05:42:49.000Z
# -*- coding: utf-8 -*- ''' Cassandra cql returner test cases ''' # Import Python libs from __future__ import absolute_import # Import Salt Testing libs # Import salt libs
31.454545
85
0.693642
# -*- coding: utf-8 -*- ''' Cassandra cql returner test cases ''' # Import Python libs from __future__ import absolute_import # Import Salt Testing libs from tests.support.unit import TestCase, skipIf from tests.support.mock import patch, NO_MOCK, NO_MOCK_REASON from tests.support.mixins import LoaderModuleMockMixin ...
0
959
0
0
0
0
0
137
111
f94c1eaf36512d0a8dbc9fd8550dda16f412aa27
2,031
py
Python
entrec/read_json_file.py
raviqqe/simple-entity-recognition
2649a62e2dd0a8886077b14830a3f4c095f87e2c
[ "Unlicense" ]
1
2017-11-17T13:31:50.000Z
2017-11-17T13:31:50.000Z
entrec/read_json_file.py
raviqqe/tensorflow-entrec
2649a62e2dd0a8886077b14830a3f4c095f87e2c
[ "Unlicense" ]
null
null
null
entrec/read_json_file.py
raviqqe/tensorflow-entrec
2649a62e2dd0a8886077b14830a3f4c095f87e2c
[ "Unlicense" ]
null
null
null
import qndex def def_convert_json_example(): """Define json example converter. An example is the following. ```json [ { "word": "I", "label": 0 }, { "word": "am", "label": 0 }, { "word": "Bob", "label": 1 }, { "word": ".", "label": 0 } ] ``` """ c...
29.014286
78
0.55096
import json import listpad import numpy as np import qnd import qndex import tensorflow as tf def def_convert_json_example(): """Define json example converter. An example is the following. ```json [ { "word": "I", "label": 0 }, { "word": "am", "label": 0 }, { "word": "Bob...
0
0
0
0
0
1,516
0
-29
161
8ce40496b37bb33c1b031681daeb80c47d917265
1,701
py
Python
common/RolloutStorage.py
yangzhao-666/Transfer-Learning-and-Curriculum-Learning-in-Sokoban
6e50eec7603d05781fd1653589e606085920f99c
[ "MIT" ]
5
2021-10-30T17:59:17.000Z
2022-02-03T17:31:51.000Z
common/RolloutStorage.py
yangzhao-666/PbRSS
f7bd090e75cf394033fe95e7b15ce83e331c5ad9
[ "MIT" ]
null
null
null
common/RolloutStorage.py
yangzhao-666/PbRSS
f7bd090e75cf394033fe95e7b15ce83e331c5ad9
[ "MIT" ]
null
null
null
import torch.nn as nn import torch.optim as optim import torch.autograd as autograd
33.352941
97
0.611993
import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch.autograd as autograd class RolloutStorage(): """ states: s s s s s s rewards: r r r r r actions: a a a a a masks: 1 1 1 1 1 0 returns: t ...
0
0
0
1,529
0
0
0
-2
90
5d127a5ec59076a35c86e212cd405528c52c80c9
5,726
py
Python
ni_python_styleguide/_cli.py
Adithyak1998/python-styleguide
86f162304607bbc583bec35e3e8b706b4cfa16f8
[ "MIT" ]
5
2020-08-19T15:33:12.000Z
2021-12-15T02:16:56.000Z
ni_python_styleguide/_cli.py
Adithyak1998/python-styleguide
86f162304607bbc583bec35e3e8b706b4cfa16f8
[ "MIT" ]
41
2020-08-07T14:58:12.000Z
2022-02-28T13:44:02.000Z
ni_python_styleguide/_cli.py
Adithyak1998/python-styleguide
86f162304607bbc583bec35e3e8b706b4cfa16f8
[ "MIT" ]
10
2020-08-26T21:03:32.000Z
2021-12-14T14:03:19.000Z
def _get_application_import_names(pyproject): """Return the application package name the config.""" # Otherwise override with what was specified app_name = ( pyproject.get("tool", {}) .get("ni-python-styleguide", {}) .get("application-import-names", "") ) # Allow the poe...
32.534091
96
0.645826
import contextlib import logging import pathlib from io import StringIO import click import flake8.main.application import toml from ni_python_styleguide import _acknowledge_existing_errors def _qs_or_vs(verbosity): if verbosity != 0: return f"-{'v' * verbosity if verbosity > 0 else 'q' * abs(verbosity)...
0
2,476
0
771
0
1,628
0
14
339
d4d59cd3831e6c9d543a9b2b68320d0d113b17d3
79
py
Python
module_test.py
dldldlfma/py_tutorial
efb3ddb4d2fcd26e7086198fe42144d896623ed7
[ "MIT" ]
null
null
null
module_test.py
dldldlfma/py_tutorial
efb3ddb4d2fcd26e7086198fe42144d896623ed7
[ "MIT" ]
null
null
null
module_test.py
dldldlfma/py_tutorial
efb3ddb4d2fcd26e7086198fe42144d896623ed7
[ "MIT" ]
1
2019-10-08T09:07:38.000Z
2019-10-08T09:07:38.000Z
print_hello() print_hello() print_hello()
15.8
18
0.721519
def print_hello(): print("Hello") print_hello() print_hello() print_hello()
0
0
0
0
0
16
0
0
22
72f26b83eefbceeb94a7efc7fd4d4694cf869f52
8,810
py
Python
hpccm/building_blocks/boost.py
adegomme/hpc-container-maker
fc397482f324af9b0571f235cb51ad9d2939f1c5
[ "Apache-2.0" ]
340
2018-03-26T00:11:21.000Z
2022-03-21T03:04:27.000Z
hpccm/building_blocks/boost.py
adegomme/hpc-container-maker
fc397482f324af9b0571f235cb51ad9d2939f1c5
[ "Apache-2.0" ]
103
2018-03-24T04:34:24.000Z
2022-03-31T18:49:57.000Z
hpccm/building_blocks/boost.py
adegomme/hpc-container-maker
fc397482f324af9b0571f235cb51ad9d2939f1c5
[ "Apache-2.0" ]
75
2018-05-10T15:42:11.000Z
2022-03-28T16:51:14.000Z
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
38.982301
108
0.647333
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
0
0
0
7,419
0
0
0
150
245
aeae54ae321174427717451daee60d75a3df30f2
5,933
py
Python
geotrek/signage/views.py
GuillaumeBoitel/Geotrek-admin
f14895c33fc2fe192a7cda162036f689deaa51bb
[ "BSD-2-Clause" ]
null
null
null
geotrek/signage/views.py
GuillaumeBoitel/Geotrek-admin
f14895c33fc2fe192a7cda162036f689deaa51bb
[ "BSD-2-Clause" ]
null
null
null
geotrek/signage/views.py
GuillaumeBoitel/Geotrek-admin
f14895c33fc2fe192a7cda162036f689deaa51bb
[ "BSD-2-Clause" ]
null
null
null
import logging logger = logging.getLogger(__name__)
31.727273
119
0.709085
from django.conf import settings from django.http import HttpResponse import logging from mapentity.views import (MapEntityLayer, MapEntityList, MapEntityJsonList, MapEntityFormat, MapEntityViewSet, MapEntityDetail, MapEntityDocument, MapEntityCreate, MapEntityUpdate, MapEntityDelete) fro...
0
410
0
4,131
0
0
0
588
728
e9937b9d86d8b03d5e94df8ded099f1c0118703e
2,254
py
Python
cohesity_management_sdk/models/source_throttling_configuration.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
18
2019-09-24T17:35:53.000Z
2022-03-25T08:08:47.000Z
cohesity_management_sdk/models/source_throttling_configuration.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
18
2019-03-29T19:32:29.000Z
2022-01-03T23:16:45.000Z
cohesity_management_sdk/models/source_throttling_configuration.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
16
2019-02-27T06:54:12.000Z
2021-11-16T18:10:24.000Z
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc.
36.354839
229
0.708518
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. import cohesity_management_sdk.models.throttling_configuration class SourceThrottlingConfiguration(object): """Implementation of the 'SourceThrottlingConfiguration' model. Specifies the source side throttling configuration. Attributes: cpu_...
0
1,131
0
979
0
0
0
41
46
d4cd70efb18a9c272069b7b96bdcb0b488bff82d
2,074
py
Python
server/project/apps/core/migrations/0002_auto_20170116_0637.py
CalHoll/9001
7fe371346d4fefb7b2434262da67b7e1b18057e4
[ "MIT" ]
54
2017-01-20T20:05:23.000Z
2022-02-02T12:34:33.000Z
server/project/apps/core/migrations/0002_auto_20170116_0637.py
CalHoll/9001
7fe371346d4fefb7b2434262da67b7e1b18057e4
[ "MIT" ]
104
2019-11-25T08:33:52.000Z
2021-08-02T06:17:19.000Z
server/project/apps/core/migrations/0002_auto_20170116_0637.py
CalHoll/9001
7fe371346d4fefb7b2434262da67b7e1b18057e4
[ "MIT" ]
9
2017-01-26T05:56:01.000Z
2018-05-15T16:50:19.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-01-16 06:37 from __future__ import unicode_literals
30.955224
114
0.53568
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-01-16 06:37 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ m...
0
0
0
1,862
0
0
0
30
68
54ed365fe04c45b7d3259263da4cf543e2721d5f
15,909
py
Python
ev_ASMO.py
avinashmnit30/Electric-Vehicle-Optimal-Charging
7f09bdbb9904285ddbbfeaa28cf402f7ef6f4cb4
[ "BSD-3-Clause" ]
7
2018-03-09T11:19:39.000Z
2022-01-19T13:45:20.000Z
ev_ASMO.py
avinashmnit30/Electric-Vehicle-Optimal-Charging
7f09bdbb9904285ddbbfeaa28cf402f7ef6f4cb4
[ "BSD-3-Clause" ]
null
null
null
ev_ASMO.py
avinashmnit30/Electric-Vehicle-Optimal-Charging
7f09bdbb9904285ddbbfeaa28cf402f7ef6f4cb4
[ "BSD-3-Clause" ]
1
2022-03-03T12:08:52.000Z
2022-03-03T12:08:52.000Z
# -*- coding: utf-8 -*- """ Created on Tue Dec 22 09:02:23 2015 @author: Avinash """ import numpy as np import numpy import ev_charge_schedule_modification1 as ev #import ev_charge_schedule.static as func1 #import ev_charge_schedule.dynamic as func2 import time #from numba import double from numba....
45.454286
190
0.498397
# -*- coding: utf-8 -*- """ Created on Tue Dec 22 09:02:23 2015 @author: Avinash """ import numpy as np from numpy import * import numpy from math import * import ev_charge_schedule_modification1 as ev #import ev_charge_schedule.static as func1 #import ev_charge_schedule.dynamic as func2 import tim...
0
0
0
0
0
2,782
0
-5
98
e974a8af2a36fd2e6f2f0ee548b8c2b6659b4a2f
168
py
Python
factory-ai-vision/OVMSAdaptorEdgeSolution/send_config.py
michellechena/azure-intelligent-edge-patterns
b1260b962b208880532391e7ef2148d240f489f8
[ "MIT" ]
null
null
null
factory-ai-vision/OVMSAdaptorEdgeSolution/send_config.py
michellechena/azure-intelligent-edge-patterns
b1260b962b208880532391e7ef2148d240f489f8
[ "MIT" ]
null
null
null
factory-ai-vision/OVMSAdaptorEdgeSolution/send_config.py
michellechena/azure-intelligent-edge-patterns
b1260b962b208880532391e7ef2148d240f489f8
[ "MIT" ]
null
null
null
import json import requests j = json.load(open('voe_config.json')) js = json.dumps(j) requests.post('http://YOUR_DEVICE_IP:8585/set_voe_config', json={'config': js})
21
79
0.732143
import json import requests j = json.load(open('voe_config.json')) js = json.dumps(j) requests.post('http://YOUR_DEVICE_IP:8585/set_voe_config', json={'config': js})
0
0
0
0
0
0
0
0
0
3da19e896adc58f4fe4f96e1610b8a380ae10a1d
3,066
py
Python
pptx_template/cli.py
TRANTANKHOA/pptx-template
6f756359641278e1aecb7e04abcbed01cc20826c
[ "Apache-2.0" ]
73
2017-06-23T08:58:37.000Z
2022-03-30T05:01:03.000Z
pptx_template/cli.py
TRANTANKHOA/pptx-template
6f756359641278e1aecb7e04abcbed01cc20826c
[ "Apache-2.0" ]
26
2017-06-08T01:45:36.000Z
2021-09-23T19:13:40.000Z
pptx_template/cli.py
TRANTANKHOA/pptx-template
6f756359641278e1aecb7e04abcbed01cc20826c
[ "Apache-2.0" ]
23
2017-07-05T02:29:21.000Z
2022-01-18T00:50:30.000Z
# pptx-template - import csv to powerpoint template # coding=utf-8 import sys import logging log = logging.getLogger() if __name__ == '__main__': if sys.version_info[0] == 2: reload(sys) sys.setdefaultencoding('utf-8') main()
34.449438
126
0.691129
# pptx-template - import csv to powerpoint template # coding=utf-8 import sys import codecs import logging import argparse import json import shutil import os import tempfile import openpyxl as xl from io import open, TextIOWrapper from pptx import Presentation from six import iteritems from itertools import islice ...
0
0
0
0
0
2,305
0
125
379
19741c2152941b46f43a6bcbc7448df3695d359f
621
py
Python
jacdac/power_supply/constants.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
1
2022-02-15T21:30:36.000Z
2022-02-15T21:30:36.000Z
jacdac/power_supply/constants.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
null
null
null
jacdac/power_supply/constants.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
1
2022-02-08T19:32:45.000Z
2022-02-08T19:32:45.000Z
# Autogenerated constants for Power supply service JD_SERVICE_CLASS_POWER_SUPPLY = const(0x1f40375f) JD_POWER_SUPPLY_REG_ENABLED = const(JD_REG_INTENSITY) JD_POWER_SUPPLY_REG_OUTPUT_VOLTAGE = const(JD_REG_VALUE) JD_POWER_SUPPLY_REG_MINIMUM_VOLTAGE = const(JD_REG_MIN_VALUE) JD_POWER_SUPPLY_REG_MAXIMUM_VOLTAGE = const(JD...
41.4
61
0.8438
# Autogenerated constants for Power supply service from jacdac.constants import * from jacdac.system.constants import * JD_SERVICE_CLASS_POWER_SUPPLY = const(0x1f40375f) JD_POWER_SUPPLY_REG_ENABLED = const(JD_REG_INTENSITY) JD_POWER_SUPPLY_REG_OUTPUT_VOLTAGE = const(JD_REG_VALUE) JD_POWER_SUPPLY_REG_MINIMUM_VOLTAGE = c...
0
0
0
0
0
0
0
25
44
b21bda93051987ca0e5335b33e5d4de6709a7454
379
py
Python
powerset.py
ctsan/powersets
f722ef965489072147e4486ba4b5ea274c964597
[ "MIT" ]
null
null
null
powerset.py
ctsan/powersets
f722ef965489072147e4486ba4b5ea274c964597
[ "MIT" ]
null
null
null
powerset.py
ctsan/powersets
f722ef965489072147e4486ba4b5ea274c964597
[ "MIT" ]
null
null
null
#!/usr/bin/env python from itertools import combinations from sys import argv initial_set = set(argv[1:]) final_set = set() for i in range( len(initial_set) + 1 ): final_set |= set ( combinations( initial_set, i) ) set_printer("S",initial_set) set_printer("P(S)",final_set)
21.055556
58
0.654354
#!/usr/bin/env python from itertools import combinations from sys import argv def set_printer(name,s): l = list(s) print(name, " = " ,sorted(l, key=len)) initial_set = set(argv[1:]) final_set = set() for i in range( len(initial_set) + 1 ): final_set |= set ( combinations( initial_set, i) ) ...
0
0
0
0
0
70
0
0
23
d8634f6a60eb6a37cd6c93a8f0c909c9ca2e6b5e
1,255
py
Python
main.py
trdvangraft/dataviz
2e8861c942dd57a56263637cb03d247fb9c3f891
[ "MIT" ]
null
null
null
main.py
trdvangraft/dataviz
2e8861c942dd57a56263637cb03d247fb9c3f891
[ "MIT" ]
null
null
null
main.py
trdvangraft/dataviz
2e8861c942dd57a56263637cb03d247fb9c3f891
[ "MIT" ]
null
null
null
import pandas as pd if __name__ == "__main__": pre_crisis_years = list(range(2000, 2008)) crisis_years = list(range(2008, 2012)) post_crisis_years = list(range(2013, 2016)) df = get_divorce_data() pre_crisis_df = get_mariage_information(df, pre_crisis_years, "pre_crisis_years") crisis_df = g...
36.911765
128
0.700398
import pandas as pd def get_divorce_data(): return pd.read_csv("./data/yearly_divorces.csv", delimiter=";", header=[0], index_col=[0, 1]) def get_mariage_information(df, period, period_name): period_df = df[(df.index.get_level_values('Perioden') >= period[0]) & (df.index.get_level_values('Perioden') >= perio...
0
0
0
0
0
459
0
0
46
8043038c267e6f0b8dac7db3e45758753a4ca7fc
9,695
py
Python
src/vqa/train/train_vqa.py
GuessWhatGame/vqa
c9b8bf97a66ff4d5bf1d147501b0b7220de2f120
[ "Apache-2.0" ]
14
2017-10-08T14:54:13.000Z
2021-12-28T08:25:36.000Z
src/vqa/train/train_vqa.py
GuessWhatGame/vqa
c9b8bf97a66ff4d5bf1d147501b0b7220de2f120
[ "Apache-2.0" ]
1
2019-03-14T13:29:36.000Z
2019-03-14T13:29:36.000Z
src/vqa/train/train_vqa.py
GuessWhatGame/vqa
c9b8bf97a66ff4d5bf1d147501b0b7220de2f120
[ "Apache-2.0" ]
2
2020-04-08T02:42:33.000Z
2020-09-24T11:24:37.000Z
import argparse import logging import os import tensorflow as tf from distutils.util import strtobool from multiprocessing import Pool from multiprocessing.pool import ThreadPool from generic.data_provider.iterator import Iterator from generic.tf_utils.evaluator import Evaluator, MultiGPUEvaluator from generic.tf_uti...
41.609442
149
0.691078
import argparse import logging import os import tensorflow as tf from distutils.util import strtobool from multiprocessing import Pool from multiprocessing.pool import ThreadPool from generic.data_provider.iterator import Iterator from generic.tf_utils.evaluator import Evaluator, MultiGPUEvaluator from generic.tf_uti...
0
0
0
0
0
0
0
0
0
359a0c05915e60e02083efa75833f95d7f11d6bb
5,378
py
Python
bot/cogs/fun.py
ItsDrike/CommandBot
b7409ada15d0b692e9e123a81181c6e99685d755
[ "MIT" ]
1
2020-04-24T14:00:00.000Z
2020-04-24T14:00:00.000Z
bot/cogs/fun.py
ItsDrike/CommandBot
b7409ada15d0b692e9e123a81181c6e99685d755
[ "MIT" ]
36
2020-05-22T03:28:49.000Z
2020-10-02T21:37:23.000Z
bot/cogs/fun.py
itsdrike/CommandBot
b7409ada15d0b692e9e123a81181c6e99685d755
[ "MIT" ]
2
2020-09-12T10:11:03.000Z
2020-09-15T14:39:24.000Z
from bot.bot import Bot def setup(bot: Bot) -> None: """Load the Clean cog.""" bot.add_cog(Fun(bot))
35.381579
93
0.527334
import re from random import randint, choice from discord import Color, Embed from discord.ext.commands import Cog, Context, command import aiohttp from bot import constants from bot.bot import Bot from bot.converters import DiceThrow class Fun(Cog): """ A cog for built solely for fun """ roll_pat...
0
4,638
0
391
0
0
0
57
180
04eefe5dd73d24179c71d7340fbb95bc334a2d8b
354
py
Python
examples/random_number_generator.py
gugarosa/py4research
de9acf2c2766cf1433bda05be89dfe862c8f5f5b
[ "MIT" ]
2
2021-12-01T13:09:44.000Z
2021-12-01T13:30:55.000Z
examples/random_number_generator.py
gugarosa/py4research
de9acf2c2766cf1433bda05be89dfe862c8f5f5b
[ "MIT" ]
null
null
null
examples/random_number_generator.py
gugarosa/py4research
de9acf2c2766cf1433bda05be89dfe862c8f5f5b
[ "MIT" ]
null
null
null
import py4research.math.random as r # Generates an integer random number array i = r.generate_integer_random_number(low=0, high=100, size=10) print(f'Shape: {i.shape}') print(f'Value: {i}') # Generates a random gaussian number array g = r.generate_gaussian_random_number(mean=0.5, variance=1.0, size=10) print(f'Shape:...
29.5
70
0.740113
import py4research.math.random as r # Generates an integer random number array i = r.generate_integer_random_number(low=0, high=100, size=10) print(f'Shape: {i.shape}') print(f'Value: {i}') # Generates a random gaussian number array g = r.generate_gaussian_random_number(mean=0.5, variance=1.0, size=10) print(f'Shape:...
0
0
0
0
0
0
0
0
0
14a52cc501573b68eb32586999e9cc5aeba1fa68
2,339
py
Python
examples/repr.py
crowsonkb/pyparsing-highlighting
907cc715483cb19a0beee9e3edc5443909823e98
[ "MIT" ]
5
2019-01-28T08:43:37.000Z
2022-01-18T23:12:32.000Z
examples/repr.py
crowsonkb/pyparsing-highlighting
907cc715483cb19a0beee9e3edc5443909823e98
[ "MIT" ]
null
null
null
examples/repr.py
crowsonkb/pyparsing-highlighting
907cc715483cb19a0beee9e3edc5443909823e98
[ "MIT" ]
2
2019-02-20T12:30:46.000Z
2022-01-09T23:12:42.000Z
"""A Python repr() syntax highlighter.""" from prompt_toolkit.styles import Style import pyparsing as pp from pyparsing import pyparsing_common as ppc from .repl import repl # pylint: disable=too-many-locals def parser_factory(styler): """Builds the repr() parser.""" squo = styler('class:string', "'") d...
34.910448
85
0.633177
"""A Python repr() syntax highlighter.""" from prompt_toolkit.styles import Style import pyparsing as pp from pyparsing import pyparsing_common as ppc from .repl import repl # pylint: disable=too-many-locals def parser_factory(styler): """Builds the repr() parser.""" squo = styler('class:string', "'") d...
0
0
0
0
0
0
0
0
0
2dc21f2ca9d6bae3f49ea34340750cef95613528
562
py
Python
restapicall/utils.py
olo-dw/restapicall.py
4f92635ddf6ac029501c917cabf1fb6f8a92d5f6
[ "MIT" ]
null
null
null
restapicall/utils.py
olo-dw/restapicall.py
4f92635ddf6ac029501c917cabf1fb6f8a92d5f6
[ "MIT" ]
null
null
null
restapicall/utils.py
olo-dw/restapicall.py
4f92635ddf6ac029501c917cabf1fb6f8a92d5f6
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*-coding:UTF-8 -* # # Olivier Locard
19.37931
58
0.532028
#!/usr/bin/env python # -*-coding:UTF-8 -* # # Olivier Locard import urllib class Utils(object): @staticmethod def build_uri(endpoint, uri, args): """ Build the URL using the endpoint, uri and args. :param endpoint: str :param uri: tuple :param args: dict :ret...
0
435
0
-1
0
0
0
-8
73
720608546939ff795987558e272419f930922408
723
py
Python
profiles_api/urls.py
Anoop4u777/profiles-rest-api
6cf31a6c85dbcd00515e3e7373622469f63f94df
[ "MIT" ]
null
null
null
profiles_api/urls.py
Anoop4u777/profiles-rest-api
6cf31a6c85dbcd00515e3e7373622469f63f94df
[ "MIT" ]
null
null
null
profiles_api/urls.py
Anoop4u777/profiles-rest-api
6cf31a6c85dbcd00515e3e7373622469f63f94df
[ "MIT" ]
null
null
null
from django.urls import path, include from rest_framework import routers from profiles_api import views router = routers.DefaultRouter() router.register('hello-viewset', views.HelloViewSet, base_name='hello-viewset') """ In the below registerwe need not assign the base name as we have defined it in the UserProfileV...
31.434783
79
0.766252
from django.urls import path, include from rest_framework import routers from profiles_api import views router = routers.DefaultRouter() router.register('hello-viewset', views.HelloViewSet, base_name='hello-viewset') """ In the below registerwe need not assign the base name as we have defined it in the UserProfileV...
0
0
0
0
0
0
0
0
0
f9f1ebc1bb009d16c1a66652446dfd60691e40b4
165
py
Python
practicioner_bundle/ch15-neural_style/pyimagesearch/utils/__init__.py
romanroson/pis_code
1221c39c23bec62ba419f9a324f88b0d8e5e4b5b
[ "MIT" ]
1
2020-06-07T04:02:16.000Z
2020-06-07T04:02:16.000Z
practicioner_bundle/ch15-neural_style/pyimagesearch/utils/__init__.py
romanroson/pis_code
1221c39c23bec62ba419f9a324f88b0d8e5e4b5b
[ "MIT" ]
null
null
null
practicioner_bundle/ch15-neural_style/pyimagesearch/utils/__init__.py
romanroson/pis_code
1221c39c23bec62ba419f9a324f88b0d8e5e4b5b
[ "MIT" ]
2
2020-03-25T10:51:54.000Z
2020-09-18T09:36:44.000Z
"""Import custom utils packages """ from .captchahelper import preprocess from .ranked import rank5_accuracy __all__ = [ "preprocess", "rank5_accuracy", ]
15
37
0.721212
"""Import custom utils packages """ from .captchahelper import preprocess from .ranked import rank5_accuracy __all__ = [ "preprocess", "rank5_accuracy", ]
0
0
0
0
0
0
0
0
0
738759cfb85a1b2a33c3de5e1df59d74113098e8
5,755
py
Python
osp/core/ontology/oclass_restriction.py
simphony/osp-core
8adc93b8957eb93e82e8363565bed140fa1b36f8
[ "BSD-3-Clause" ]
17
2020-04-24T12:09:32.000Z
2022-03-03T17:21:17.000Z
osp/core/ontology/oclass_restriction.py
simphony/osp-core
8adc93b8957eb93e82e8363565bed140fa1b36f8
[ "BSD-3-Clause" ]
264
2020-07-18T23:27:30.000Z
2022-03-25T15:39:22.000Z
osp/core/ontology/oclass_restriction.py
simphony/osp-core
8adc93b8957eb93e82e8363565bed140fa1b36f8
[ "BSD-3-Clause" ]
4
2020-04-24T10:37:10.000Z
2021-07-05T10:34:21.000Z
"""Restrictions on on ontology classes.""" import logging logger = logging.getLogger(__name__) def get_restriction(bnode, namespace_registry): """Return the restriction object represented by given bnode (or None).""" r = Restriction(bnode, namespace_registry) if r.rtype and r.target: return r
31.108108
77
0.621894
"""Restrictions on on ontology classes.""" from enum import Enum import rdflib import logging from rdflib.term import BNode from osp.core.ontology.attribute import OntologyAttribute from osp.core.ontology.relationship import OntologyRelationship logger = logging.getLogger(__name__) class QUANTIFIER(Enum): """Th...
0
1,955
0
3,222
0
0
0
78
180
0ec4e59f27a8848f0f11c575c0ea9d38b2a2092b
11,930
py
Python
utils/optimization.py
nghoanglong/text2sql-lgesql
7526d8a771bea8eb87f936cfb21050badb4c290f
[ "Apache-2.0" ]
59
2021-06-02T13:30:06.000Z
2022-03-22T10:06:38.000Z
utils/optimization.py
nghoanglong/text2sql-lgesql
7526d8a771bea8eb87f936cfb21050badb4c290f
[ "Apache-2.0" ]
13
2021-06-16T03:32:58.000Z
2022-03-22T07:34:47.000Z
utils/optimization.py
nghoanglong/text2sql-lgesql
7526d8a771bea8eb87f936cfb21050badb4c290f
[ "Apache-2.0" ]
15
2021-08-31T14:26:59.000Z
2022-03-18T20:07:02.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors 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/LICEN...
48.893443
181
0.643336
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors 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/LICEN...
0
0
0
4,162
0
4,566
0
32
290
c4aa69d54e80b8327f566a905333cc4dc42ce02d
6,344
py
Python
iconrpcserver/utils/icon_service/templates.py
icon-project/icon-rpc-server
ece07a48cfe987c35a583c81ee5e063c75c90a89
[ "Apache-2.0" ]
15
2018-08-24T06:00:09.000Z
2021-07-16T22:12:58.000Z
iconrpcserver/utils/icon_service/templates.py
icon-project/icon-rpc-server
ece07a48cfe987c35a583c81ee5e063c75c90a89
[ "Apache-2.0" ]
28
2018-10-16T04:46:00.000Z
2021-12-15T03:36:31.000Z
iconrpcserver/utils/icon_service/templates.py
icon-project/icon-rpc-server
ece07a48cfe987c35a583c81ee5e063c75c90a89
[ "Apache-2.0" ]
22
2018-09-10T05:45:56.000Z
2022-02-10T03:28:26.000Z
# Copyright 2018 ICON Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
29.64486
102
0.67418
# Copyright 2018 ICON Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
0
0
0
0
0
0
0
0
0
76640fcd932c2e5fe81d1524f7e41c390ce05cec
1,714
py
Python
examples/log_requests.py
fajfer/aiohttp-client-cache
bf4bc563c5b5ac5869db576ac478852d4d55ab59
[ "BSD-2-Clause", "MIT" ]
38
2020-11-14T04:23:32.000Z
2022-03-25T09:10:40.000Z
examples/log_requests.py
fajfer/aiohttp-client-cache
bf4bc563c5b5ac5869db576ac478852d4d55ab59
[ "BSD-2-Clause", "MIT" ]
83
2020-11-20T21:42:37.000Z
2022-03-29T11:19:06.000Z
examples/log_requests.py
fajfer/aiohttp-client-cache
bf4bc563c5b5ac5869db576ac478852d4d55ab59
[ "BSD-2-Clause", "MIT" ]
9
2020-11-20T21:44:06.000Z
2022-03-18T11:21:15.000Z
#!/usr/bin/env python3 """ An example of testing the cache to prove that it's not making more requests than expected. """ import asyncio from logging import basicConfig, getLogger basicConfig(level='INFO') logger = getLogger('aiohttp_client_cache.examples') # Uncomment for more verbose debug output # getLogger('aiohtt...
34.28
94
0.721704
#!/usr/bin/env python3 """ An example of testing the cache to prove that it's not making more requests than expected. """ import asyncio from contextlib import asynccontextmanager from logging import basicConfig, getLogger from unittest.mock import patch from aiohttp import ClientSession from aiohttp_client_cache imp...
0
793
276
0
0
0
0
99
136
1f2e66fdecad1edf9c14de73f8e9e4fa4de2abb6
11,292
py
Python
woltka/tests/test_ordinal.py
emikoifish/woltka
e4207bba3550b75bb153c7d094d0b1a577a15bc4
[ "BSD-3-Clause" ]
null
null
null
woltka/tests/test_ordinal.py
emikoifish/woltka
e4207bba3550b75bb153c7d094d0b1a577a15bc4
[ "BSD-3-Clause" ]
null
null
null
woltka/tests/test_ordinal.py
emikoifish/woltka
e4207bba3550b75bb153c7d094d0b1a577a15bc4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # ---------------------------------------------------------------------------- # Copyright (c) 2020--, Qiyun Zhu. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------...
36.781759
78
0.475381
#!/usr/bin/env python3 # ---------------------------------------------------------------------------- # Copyright (c) 2020--, Qiyun Zhu. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------...
0
0
0
10,529
0
0
0
184
156
9224f3ea01e3494877569ec6add7b8d068db206e
1,192
py
Python
scispack/tests/test_cli.py
fmaussion/scispack
c1edff8f3629b27af5b13f757f664ddde4a3260c
[ "Unlicense" ]
3
2018-05-14T05:48:00.000Z
2021-01-13T17:01:42.000Z
scispack/tests/test_cli.py
fmaussion/scispack
c1edff8f3629b27af5b13f757f664ddde4a3260c
[ "Unlicense" ]
null
null
null
scispack/tests/test_cli.py
fmaussion/scispack
c1edff8f3629b27af5b13f757f664ddde4a3260c
[ "Unlicense" ]
null
null
null
# Testing command line interfaces is hard. But we'll try # At least we separated our actual program from the I/O part so that we # can test that
22.923077
71
0.688758
# Testing command line interfaces is hard. But we'll try # At least we separated our actual program from the I/O part so that we # can test that import scispack from scispack.cli import cli_program def test_help(capsys): # Check that with empty arguments we return the help cli_program([]) captured = caps...
0
0
0
0
0
874
0
9
159
8f43ea62b06053557b7d22482d67b2f234edcaff
1,456
py
Python
ff_pyomo.py
mlac/ff_2018
80db4835e48b1acfeb51bd732fd3cc89273da81e
[ "Apache-2.0" ]
null
null
null
ff_pyomo.py
mlac/ff_2018
80db4835e48b1acfeb51bd732fd3cc89273da81e
[ "Apache-2.0" ]
null
null
null
ff_pyomo.py
mlac/ff_2018
80db4835e48b1acfeb51bd732fd3cc89273da81e
[ "Apache-2.0" ]
null
null
null
infinity = float('inf') model = AbstractModel() #Players model.P = Set() #Expected Scoring model.S = Set() #value of each player model.v = Param(model.P, within=PositiveReals) #expected Positions for each player model.e = Param(model.P,model.S, within=NonNegativeReals) #Lower and upper bound on each Position mode...
24.266667
68
0.740385
from pyomo.environ import * infinity = float('inf') model = AbstractModel() #Players model.P = Set() #Expected Scoring model.S = Set() #value of each player model.v = Param(model.P, within=PositiveReals) #expected Positions for each player model.e = Param(model.P,model.S, within=NonNegativeReals) #Lower and uppe...
0
0
0
0
0
241
0
6
89
a8e3e7f36e96e9a39111172042e96f7cd7ab118a
450
py
Python
config.py
kelvinmuchui/football_data
460d095a02bb2140aba18437d0a927858acd1dde
[ "MIT" ]
null
null
null
config.py
kelvinmuchui/football_data
460d095a02bb2140aba18437d0a927858acd1dde
[ "MIT" ]
null
null
null
config.py
kelvinmuchui/football_data
460d095a02bb2140aba18437d0a927858acd1dde
[ "MIT" ]
null
null
null
app_config ={ 'development':DevelopmentConfig, 'production': ProductionConfig }
15.517241
72
0.664444
class Config(object): """ Common configurations """ #Put any configurations here that are common a close all enviroment class DevelopmentConfig(Config): """ Development configurations """ DEBUG =True SQLALCHEMY_ECHO =True class ProductionConfig(Config): """ Production ...
0
0
0
292
0
0
0
0
68
de35582ee2c753e469342178d9a3b7f90b100e6b
840
py
Python
project/S17-IR-P016/code/spark1.py
suunni/sp17-i524
42dd11b914c03c741dad8a8505c3e091dc6ec412
[ "Apache-2.0" ]
2
2020-10-30T09:54:25.000Z
2021-12-14T19:13:18.000Z
project/S17-IR-P016/code/spark1.py
cloudmesh/sp17-i524
42dd11b914c03c741dad8a8505c3e091dc6ec412
[ "Apache-2.0" ]
98
2017-01-19T04:24:02.000Z
2017-10-27T11:30:50.000Z
project/S17-IR-P016/code/spark1.py
cloudmesh/sp17-i524
42dd11b914c03c741dad8a8505c3e091dc6ec412
[ "Apache-2.0" ]
294
2017-01-09T13:18:39.000Z
2018-07-13T01:32:24.000Z
from pyspark import SparkConf from pyspark import SparkContext from pyspark.mllib.regression import LabeledPoint from pyspark.mllib.tree import DecisionTree conf = SparkConf() conf.setMaster('spark://HEAD_NODE_HOSTNAME:7077') conf.setAppName('spark-basic') sc = SparkContext(conf=conf) rdd = sc.parallelize(range(1000)...
31.111111
77
0.679762
from pyspark import SparkConf from pyspark import SparkContext from pyspark.mllib.regression import LabeledPoint from pyspark.mllib.tree import DecisionTree conf = SparkConf() conf.setMaster('spark://HEAD_NODE_HOSTNAME:7077') conf.setAppName('spark-basic') sc = SparkContext(conf=conf) def mod(x): import numpy as ...
0
0
0
0
0
152
0
0
46
bc96519e04351faa2853702d74b890a59160a434
689
py
Python
sdk/python/pulumi_azure_native/policyinsights/v20190701/_enums.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/policyinsights/v20190701/_enums.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/policyinsights/v20190701/_enums.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** __all__ = [ 'ResourceDiscoveryMode', ]
34.45
115
0.728592
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from enum import Enum __all__ = [ 'ResourceDiscoveryMode', ] class ResourceDiscoveryMode(str, Enum): """ The way resources to remediate ...
0
0
0
430
0
0
0
0
46
5dc151582c42cc782a311a172925093be0d6274c
432
py
Python
heritage/migrations/0063_auto_20160718_2201.py
stewardshiptools/stewardshiptools
ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e
[ "MIT" ]
null
null
null
heritage/migrations/0063_auto_20160718_2201.py
stewardshiptools/stewardshiptools
ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e
[ "MIT" ]
11
2020-03-24T15:29:46.000Z
2022-03-11T23:14:48.000Z
heritage/migrations/0063_auto_20160718_2201.py
stewardshiptools/stewardshiptools
ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals
21.6
75
0.618056
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('heritage', '0062_auto_20160712_2030'), ] operations = [ migrations.AlterField( model_name='mtkrecord', ...
0
0
0
302
0
0
0
19
46
b10c409d37bd6c961abe0854cee623b7e329a761
1,483
py
Python
Chapter 3/03/recipe20b.py
robert0714/Python-Testing-Cookbook-Second-Edition
c7c5d59e42e9ca2874faf12a6dd201736a45ca83
[ "MIT" ]
null
null
null
Chapter 3/03/recipe20b.py
robert0714/Python-Testing-Cookbook-Second-Edition
c7c5d59e42e9ca2874faf12a6dd201736a45ca83
[ "MIT" ]
null
null
null
Chapter 3/03/recipe20b.py
robert0714/Python-Testing-Cookbook-Second-Edition
c7c5d59e42e9ca2874faf12a6dd201736a45ca83
[ "MIT" ]
null
null
null
def convert_to_basen(value, base): """Convert a base10 number to basen. >>> [convert_to_basen(i, 16) for i in range(1,16)] #doctest: +NORMALIZE_WHITESPACE ['1/16', '2/16', '3/16', '4/16', '5/16', '6/16', '7/16', '8/16', '9/16', 'a/16', 'b/16', 'c/16', 'd/16', 'e/16', 'f/16'] FUTURE: Binary may s...
32.23913
86
0.519218
def convert_to_basen(value, base): """Convert a base10 number to basen. >>> [convert_to_basen(i, 16) for i in range(1,16)] #doctest: +NORMALIZE_WHITESPACE ['1/16', '2/16', '3/16', '4/16', '5/16', '6/16', '7/16', '8/16', '9/16', 'a/16', 'b/16', 'c/16', 'd/16', 'e/16', 'f/16'] FUTURE: Binary may s...
0
0
0
0
0
664
0
0
27
944d2e1eb4378185524847145b0d9d6336d5eaa8
2,081
py
Python
tradingdb/gnosis/utils.py
gnosis/gnosisdb
b3055406fba7061c3677bfd16e19f8bc5c97db2c
[ "MIT" ]
11
2017-06-23T15:35:10.000Z
2018-04-27T06:11:25.000Z
tradingdb/gnosis/utils.py
gnosis/gnosisdb
b3055406fba7061c3677bfd16e19f8bc5c97db2c
[ "MIT" ]
42
2018-01-17T15:46:33.000Z
2018-05-08T08:13:17.000Z
tradingdb/gnosis/utils.py
gnosis/gnosisdb
b3055406fba7061c3677bfd16e19f8bc5c97db2c
[ "MIT" ]
12
2017-07-03T15:51:41.000Z
2018-03-25T17:31:54.000Z
def remove_null_values(obj): """ Remove all null values from a dictionary :param obj: dictionary :return: filtered dictionary """ if not isinstance(obj, dict): return obj for k in list(obj.keys()): _obj = obj[k] if _obj is None: del obj[k] eli...
24.77381
95
0.629986
from mpmath import mp, mpf def singleton(clazz): instances = {} def getinstance(*args, **kwargs): if clazz not in instances: instances[clazz] = clazz(*args, **kwargs) return instances[clazz] return getinstance class SingletonObject: _instances = {} def __new__(cls, ...
0
0
0
230
0
906
0
5
160
a535ed615045bbd06beb82fa2536f0065964aa3b
13,666
py
Python
adversarial_mask_rcnn/adversarial_attack.py
Mctigger/adversarial-object-segmentation
3f633f068bbb71c7ef459cf8528738ccbbbe36a1
[ "MIT" ]
null
null
null
adversarial_mask_rcnn/adversarial_attack.py
Mctigger/adversarial-object-segmentation
3f633f068bbb71c7ef459cf8528738ccbbbe36a1
[ "MIT" ]
null
null
null
adversarial_mask_rcnn/adversarial_attack.py
Mctigger/adversarial-object-segmentation
3f633f068bbb71c7ef459cf8528738ccbbbe36a1
[ "MIT" ]
1
2021-09-19T18:38:45.000Z
2021-09-19T18:38:45.000Z
import os import sys sys.path.append('modules/pytorch_mask_rcnn') import torch from model import Dataset, MaskRCNN from coco import CocoDataset, CocoConfig # Root directory of the project ROOT_DIR = os.getcwd() # Path to trained weights file COCO_MODEL_PATH = os.path.join(ROOT_DIR, "mask_rcnn_coco.pth") # Directory...
40.076246
149
0.597688
import os import sys sys.path.append('modules/pytorch_mask_rcnn') import numpy as np import torch import matplotlib.pyplot as plt from torch.autograd import Variable from torch.autograd.gradcheck import zero_gradients from model import Dataset, unmold_image, MaskRCNN, compute_losses from visualize import display_inst...
0
0
0
0
0
6,069
0
78
223