hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
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
125
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
125
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.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
fc768c735b5c2799e112fc068ad224cad82b0fd0
10,647
py
Python
src/olympia/access/tests.py
shashwatsingh/addons-server
8fce98901104349055a828b5a47865f5e8f4120b
[ "BSD-3-Clause" ]
1
2020-11-15T20:06:40.000Z
2020-11-15T20:06:40.000Z
src/olympia/access/tests.py
shashwatsingh/addons-server
8fce98901104349055a828b5a47865f5e8f4120b
[ "BSD-3-Clause" ]
null
null
null
src/olympia/access/tests.py
shashwatsingh/addons-server
8fce98901104349055a828b5a47865f5e8f4120b
[ "BSD-3-Clause" ]
null
null
null
from unittest import mock import pytest from django.contrib.auth.models import AnonymousUser from olympia import amo from olympia.access.models import Group, GroupUser from olympia.addons.models import Addon, AddonUser from olympia.amo.tests import addon_factory, TestCase, req_factory_factory from olympia.users.model...
39
79
0.695783
from unittest import mock import pytest from django.contrib.auth.models import AnonymousUser from olympia import amo from olympia.access.models import Group, GroupUser from olympia.addons.models import Addon, AddonUser from olympia.amo.tests import addon_factory, TestCase, req_factory_factory from olympia.users.model...
7,541
1,182
96
abd0635dd700fdb50e2dfeeaf201614b5959f92d
1,270
py
Python
morph_seg/seq2seq/train_many.py
e9t/morph-segmentation
c6f398166a3edc57302f0bbef897608a4c5b974d
[ "MIT" ]
null
null
null
morph_seg/seq2seq/train_many.py
e9t/morph-segmentation
c6f398166a3edc57302f0bbef897608a4c5b974d
[ "MIT" ]
null
null
null
morph_seg/seq2seq/train_many.py
e9t/morph-segmentation
c6f398166a3edc57302f0bbef897608a4c5b974d
[ "MIT" ]
1
2021-02-19T07:56:11.000Z
2021-02-19T07:56:11.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 Judit Acs <judit@sch.bme.hu> # # Distributed under terms of the MIT license. from __future__ import unicode_literals from argparse import ArgumentParser from sys import stdin from experiment import Seq2seqExperiment from data import ...
28.863636
79
0.66063
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 Judit Acs <judit@sch.bme.hu> # # Distributed under terms of the MIT license. from __future__ import unicode_literals from argparse import ArgumentParser from sys import stdin from experiment import Seq2seqExperiment from data import ...
707
0
46
ebfafc554e1a0948f8589b02a293ccdcc226d23f
7,091
py
Python
kc.py
bostrt/koala
4cb546eaa006617a9ff08204336f49b89109ecff
[ "MIT" ]
null
null
null
kc.py
bostrt/koala
4cb546eaa006617a9ff08204336f49b89109ecff
[ "MIT" ]
null
null
null
kc.py
bostrt/koala
4cb546eaa006617a9ff08204336f49b89109ecff
[ "MIT" ]
null
null
null
#!/usr/bin/python import argparse from xdg import BaseDirectory import requests import json import sys KOALA_LOGIN_FILE='login' KOALA_SERVER="http://localhost:5000/" KOALA_API_PATH="" X_KOALA_USERNAME='x-koala-username' X_KOALA_KEY='x-koala-key' parser = argparse.ArgumentParser() subparser = parser.add_subparsers() ...
32.527523
137
0.653786
#!/usr/bin/python import argparse from xdg import BaseDirectory import requests import json import sys KOALA_LOGIN_FILE='login' KOALA_SERVER="http://localhost:5000/" KOALA_API_PATH="" X_KOALA_USERNAME='x-koala-username' X_KOALA_KEY='x-koala-key' parser = argparse.ArgumentParser() subparser = parser.add_subparsers() ...
4,218
0
230
72b6a2f8f4710ded36c79ed121ddcaeef8f7c738
4,056
py
Python
enaml/wx/wx_bounded_date.py
mmckerns/enaml
ebf417b4dce9132bffa038a588ad90436a59d37e
[ "BSD-3-Clause" ]
11
2015-01-04T14:29:23.000Z
2019-12-25T05:38:37.000Z
enaml/wx/wx_bounded_date.py
mmckerns/enaml
ebf417b4dce9132bffa038a588ad90436a59d37e
[ "BSD-3-Clause" ]
36
2015-02-20T00:56:53.000Z
2020-12-04T10:02:14.000Z
enaml/wx/wx_bounded_date.py
mmckerns/enaml
ebf417b4dce9132bffa038a588ad90436a59d37e
[ "BSD-3-Clause" ]
3
2015-11-19T15:11:37.000Z
2019-03-11T23:45:02.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2012, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ import datetime from dateutil import parser as isoparser import wx from .wx_control import WxCo...
30.044444
80
0.497041
#------------------------------------------------------------------------------ # Copyright (c) 2012, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ import datetime from dateutil import parser as isoparser import wx from .wx_control import WxCo...
0
0
0
dfa3dffa027e32af24fdecf871e3d8776de4b297
1,583
py
Python
cbsapp/urls.py
gmaclinuxer/django_cbs_rest
ae754611672a5edcb5707aeb611cd09f10316d36
[ "MIT" ]
null
null
null
cbsapp/urls.py
gmaclinuxer/django_cbs_rest
ae754611672a5edcb5707aeb611cd09f10316d36
[ "MIT" ]
null
null
null
cbsapp/urls.py
gmaclinuxer/django_cbs_rest
ae754611672a5edcb5707aeb611cd09f10316d36
[ "MIT" ]
null
null
null
from django.conf.urls import url, patterns from django.contrib.auth.decorators import login_required, permission_required from django.views.generic import TemplateView from cbsapp import views as v urlpatterns = patterns( 'cbsapp.views', url(r'success/', v.MyView1.as_view()), url(r'func/', 'my_view'), ...
49.46875
112
0.674668
from django.conf.urls import url, patterns from django.contrib.auth.decorators import login_required, permission_required from django.views.generic import TemplateView from cbsapp import views as v urlpatterns = patterns( 'cbsapp.views', url(r'success/', v.MyView1.as_view()), url(r'func/', 'my_view'), ...
0
0
0
90ca6c3e11e8ee5e509aae0779e0d0d5e5783f52
211
py
Python
image_manipulation/read_img.py
amithapa/opencv_learning
010c378596647bf57e685140fcf0abd758ff88c1
[ "MIT" ]
null
null
null
image_manipulation/read_img.py
amithapa/opencv_learning
010c378596647bf57e685140fcf0abd758ff88c1
[ "MIT" ]
null
null
null
image_manipulation/read_img.py
amithapa/opencv_learning
010c378596647bf57e685140fcf0abd758ff88c1
[ "MIT" ]
null
null
null
import cv2 import numpy as np # Load an image in grayscale img = cv2.imread('football.jpg', cv2.IMREAD_GRAYSCALE) # Displaying an Image cv2.imshow("Football Picha", img) cv2.waitKey(0) cv2.destroyAllWindows()
19.181818
54
0.763033
import cv2 import numpy as np # Load an image in grayscale img = cv2.imread('football.jpg', cv2.IMREAD_GRAYSCALE) # Displaying an Image cv2.imshow("Football Picha", img) cv2.waitKey(0) cv2.destroyAllWindows()
0
0
0
9670db750edd4f1155b7e984976fca0cdcef84cd
459
py
Python
algorithms/arrays/__init__.py
timgates42/algorithms
665b169fc96e78e2f9a495a24a64f753dfa09dc1
[ "MIT" ]
22,426
2017-01-17T04:01:44.000Z
2022-03-31T12:06:16.000Z
algorithms/arrays/__init__.py
khiemtran99/algorithms
e498d4e01619b85cd4db0b150e24508946ac32d7
[ "MIT" ]
523
2017-04-18T12:05:11.000Z
2022-03-20T11:10:41.000Z
algorithms/arrays/__init__.py
khiemtran99/algorithms
e498d4e01619b85cd4db0b150e24508946ac32d7
[ "MIT" ]
4,900
2017-01-19T23:47:05.000Z
2022-03-31T10:00:47.000Z
from .delete_nth import * from .flatten import * from .garage import * from .josephus import * from .longest_non_repeat import * from .max_ones_index import * from .merge_intervals import * from .missing_ranges import * from .move_zeros import * from .plus_one import * from .rotate import * from .summarize_ranges impor...
24.157895
33
0.764706
from .delete_nth import * from .flatten import * from .garage import * from .josephus import * from .longest_non_repeat import * from .max_ones_index import * from .merge_intervals import * from .missing_ranges import * from .move_zeros import * from .plus_one import * from .rotate import * from .summarize_ranges impor...
0
0
0
a7fe7991321387bc87d988004822ea803397098e
17,795
py
Python
inforalgopanel.py
analyticd/bondpricer
04f4e4f7f4da26f66104ed3e6e8fb8b21248cec8
[ "Apache-2.0" ]
null
null
null
inforalgopanel.py
analyticd/bondpricer
04f4e4f7f4da26f66104ed3e6e8fb8b21248cec8
[ "Apache-2.0" ]
null
null
null
inforalgopanel.py
analyticd/bondpricer
04f4e4f7f4da26f66104ed3e6e8fb8b21248cec8
[ "Apache-2.0" ]
1
2020-03-04T10:47:13.000Z
2020-03-04T10:47:13.000Z
""" Inforalgo control panel Written by Alexandre Almosni alexandre.almosni@gmail.com (C) 2016 Alexandre Almosni Released under Apache 2.0 license. More info at http://www.apache.org/licenses/LICENSE-2.0 """ import wx #import datetime import wx.grid as gridlib import inforalgo from wx.lib.scrolledpanel import Scroll...
57.21865
170
0.677887
""" Inforalgo control panel Written by Alexandre Almosni alexandre.almosni@gmail.com (C) 2016 Alexandre Almosni Released under Apache 2.0 license. More info at http://www.apache.org/licenses/LICENSE-2.0 """ import wx #import datetime import wx.grid as gridlib import inforalgo from wx.lib.scrolledpanel import Scroll...
15,476
1,437
72
06b37cdda04cd8bfeb7abfb7a2c1aa6d7f04bc24
1,691
py
Python
main/urls.py
AcaciaTrading/acacia_main
b778aed98894775eeea6b999c10be6c6d7cc5ac9
[ "MIT" ]
25
2016-07-14T05:52:07.000Z
2021-01-18T19:53:50.000Z
main/urls.py
AcaciaTrading/acacia_main
b778aed98894775eeea6b999c10be6c6d7cc5ac9
[ "MIT" ]
null
null
null
main/urls.py
AcaciaTrading/acacia_main
b778aed98894775eeea6b999c10be6c6d7cc5ac9
[ "MIT" ]
12
2016-07-14T09:29:38.000Z
2021-01-18T19:53:58.000Z
from django.conf.urls import include, url from django.views.generic import TemplateView from .models import Strategy, TradingBot from . import views urlpatterns = [ # Landing page, etc url(r'^$', views.landing, name="landing"), url(r'^faq$', TemplateView.as_view(template_name="landing/faq.html"), name="fa...
45.702703
101
0.6712
from django.conf.urls import include, url from django.views.generic import TemplateView from .models import Strategy, TradingBot from . import views urlpatterns = [ # Landing page, etc url(r'^$', views.landing, name="landing"), url(r'^faq$', TemplateView.as_view(template_name="landing/faq.html"), name="fa...
0
0
0
941d9b499a6419a8999fa8b0994ace927c93a432
445
py
Python
1. Transcricao/transcricao.py
Francisco-Jair/Bioinformatica
34aed452eb5470a4556f8c4ebaccbf1a6c1a6720
[ "MIT" ]
1
2022-02-22T12:48:25.000Z
2022-02-22T12:48:25.000Z
1. Transcricao/transcricao.py
Francisco-Jair/bioinformatica
34aed452eb5470a4556f8c4ebaccbf1a6c1a6720
[ "MIT" ]
null
null
null
1. Transcricao/transcricao.py
Francisco-Jair/bioinformatica
34aed452eb5470a4556f8c4ebaccbf1a6c1a6720
[ "MIT" ]
null
null
null
dna = open('dna.txt','r') date = dna.readline() rna = "" for i in date: if i == 'T': rna+="A" elif i == 'G': rna +="C" elif i == 'C': rna+="G" elif i == "A": rna+="U" saveRna = open('rna.txt', 'w') saveRna.write(rna) saveRna.close() """ No DNA temos as bases T - A ...
12.714286
53
0.51236
dna = open('dna.txt','r') date = dna.readline() rna = "" for i in date: if i == 'T': rna+="A" elif i == 'G': rna +="C" elif i == 'C': rna+="G" elif i == "A": rna+="U" saveRna = open('rna.txt', 'w') saveRna.write(rna) saveRna.close() """ No DNA temos as bases T - A ...
0
0
0
81cb32138e038912dc915c7664f5d98d6841a538
561
py
Python
ball.py
dynamicPilot/ball_game
c3935415be18f45780e9e68d71669bbdce290774
[ "MIT" ]
null
null
null
ball.py
dynamicPilot/ball_game
c3935415be18f45780e9e68d71669bbdce290774
[ "MIT" ]
null
null
null
ball.py
dynamicPilot/ball_game
c3935415be18f45780e9e68d71669bbdce290774
[ "MIT" ]
null
null
null
""" Ball Class (based on Gameobject). """ import pygame from game_object import GameObject
25.5
82
0.645276
""" Ball Class (based on Gameobject). """ import pygame from game_object import GameObject class Ball(GameObject): def __init__(self, x_center, y_center, r, color, speed, special_effect=None): GameObject.__init__(self, x_center - r, y_center - r, r * 2, r * 2, speed) self.radius = r self....
363
2
103
d651f658ddb218b9010a9713b13222a399d0ef44
155
py
Python
src/runrex/text/__init__.py
kpwhri/regex_runner
7876fdfe499d8cefe85c9d44cd240a2f1ee689fc
[ "MIT" ]
null
null
null
src/runrex/text/__init__.py
kpwhri/regex_runner
7876fdfe499d8cefe85c9d44cd240a2f1ee689fc
[ "MIT" ]
2
2021-08-11T04:00:05.000Z
2021-08-11T04:01:01.000Z
src/runrex/text/__init__.py
kpwhri/runrex
33bb0b352084a0be6a4b94dd5a99e0db9cc43946
[ "MIT" ]
null
null
null
from .sentence import Sentence from .sentences import Sentences from .section import Section from .sections import Sections from .document import Document
25.833333
32
0.83871
from .sentence import Sentence from .sentences import Sentences from .section import Section from .sections import Sections from .document import Document
0
0
0
f83d48e61b53e1e98e2cd1a5a33dd44c84f673e1
1,037
py
Python
Strings/CountVowelSubstringofStrimg.py
haaris272k/Problem-Solving-Collection
5c8d0c36aff0d525ffec880115f5e123d0f3092b
[ "MIT" ]
1
2022-02-28T06:49:25.000Z
2022-02-28T06:49:25.000Z
Strings/CountVowelSubstringofStrimg.py
haaris272k/Problem-Solving-Collection
5c8d0c36aff0d525ffec880115f5e123d0f3092b
[ "MIT" ]
null
null
null
Strings/CountVowelSubstringofStrimg.py
haaris272k/Problem-Solving-Collection
5c8d0c36aff0d525ffec880115f5e123d0f3092b
[ "MIT" ]
null
null
null
'''A substring is a contiguous (non-empty) sequence of characters within a string. A vowel substring is a substring that only consists of vowels ('a', 'e', 'i', 'o', and 'u') and has all five vowels present in it. Given a string word, return the number of vowel substrings in word. Example 1: Input: wor...
25.292683
131
0.593057
'''A substring is a contiguous (non-empty) sequence of characters within a string. A vowel substring is a substring that only consists of vowels ('a', 'e', 'i', 'o', and 'u') and has all five vowels present in it. Given a string word, return the number of vowel substrings in word. Example 1: Input: wor...
0
0
0
529c875ae24796fe7659b77cb2d49a2a3da1d8d7
924
py
Python
commands/BaseLogger.py
WilkoV/Fusion360_ExportIt
ab32bcb8003aed9a9a5b29ae66a326db44d04df6
[ "MIT" ]
6
2020-09-20T01:01:16.000Z
2022-03-30T11:35:24.000Z
commands/BaseLogger.py
WilkoV/Fusion360_ExportIt
ab32bcb8003aed9a9a5b29ae66a326db44d04df6
[ "MIT" ]
23
2020-06-05T16:30:11.000Z
2022-01-11T06:48:10.000Z
commands/BaseLogger.py
WilkoV/Fusion360_ExportIt
ab32bcb8003aed9a9a5b29ae66a326db44d04df6
[ "MIT" ]
null
null
null
import os import logging from logging.handlers import RotatingFileHandler from .Statics import * # create format of the log message logFormatter = logging.Formatter(LOG_FORMAT) # Get the path of the running script (api command) appPath = os.path.dirname(os.path.abspath(__file__)) # add subdirectory "log" to the path...
26.4
115
0.780303
import os import logging from logging.handlers import RotatingFileHandler from .Statics import * # create format of the log message logFormatter = logging.Formatter(LOG_FORMAT) # Get the path of the running script (api command) appPath = os.path.dirname(os.path.abspath(__file__)) # add subdirectory "log" to the path...
0
0
0
54050ff19b88a09abe9558d5d18b3e79ccf0c924
805
py
Python
videoanalyst/data/target/target_impl/utils/debug_compare_densebox_target.py
TragedyN/SiamFCpp
65d80a66eb40d81ca09fa2dbf32636fbc414ec0d
[ "MIT" ]
737
2019-12-24T13:34:43.000Z
2022-03-28T11:38:24.000Z
videoanalyst/data/target/target_impl/utils/debug_compare_densebox_target.py
ShiAngWang/video_analyst
de4f86363cc408695428b423e8d6e346aa35149b
[ "MIT" ]
129
2020-02-13T04:08:28.000Z
2022-03-17T04:13:09.000Z
videoanalyst/data/target/target_impl/utils/debug_compare_densebox_target.py
ShiAngWang/video_analyst
de4f86363cc408695428b423e8d6e346aa35149b
[ "MIT" ]
179
2019-12-31T04:53:12.000Z
2022-03-25T06:32:20.000Z
import numpy as np # from IPython import embed;embed() from make_densebox_target import \ make_densebox_target as make_densebox_target_old from make_densebox_target_dev import \ make_densebox_target as make_densebox_target_new gt_boxes = np.asarray([[150, 250, 130, 60, 1]]) config_dict = dict( x_size=303, ...
32.2
69
0.740373
import numpy as np # from IPython import embed;embed() from make_densebox_target import \ make_densebox_target as make_densebox_target_old from make_densebox_target_dev import \ make_densebox_target as make_densebox_target_new gt_boxes = np.asarray([[150, 250, 130, 60, 1]]) config_dict = dict( x_size=303, ...
0
0
0
ae6ce78d2f8743264ccb5871a9860612581b3d46
7,060
py
Python
homework_1_linear_regression/main.py
Vinogradov-Mikhail/Spbu_ML_hw_19
564ed068b07656f4807ca955e6335b7e7dd5b340
[ "MIT" ]
1
2021-06-26T11:49:10.000Z
2021-06-26T11:49:10.000Z
homework_1_linear_regression/main.py
Vinogradov-Mikhail/Spbu_ML_hw_19
564ed068b07656f4807ca955e6335b7e7dd5b340
[ "MIT" ]
null
null
null
homework_1_linear_regression/main.py
Vinogradov-Mikhail/Spbu_ML_hw_19
564ed068b07656f4807ca955e6335b7e7dd5b340
[ "MIT" ]
1
2021-04-13T13:16:22.000Z
2021-04-13T13:16:22.000Z
import numpy as np import os import pandas as pd LEARNING_RATE = 0.15 REGULARISATION = 0.005 MAX_ITERATION = 15000 TARGET_COLUMN_NAME = 53 FOLD_COUNT = 5 # x^j+1 = x^j - lambda^j * grad(F(x^j)) # block of function for features # normalise values in selected column if __name__ == "__main__": main()
34.271845
163
0.658782
import numpy as np import os import pandas as pd LEARNING_RATE = 0.15 REGULARISATION = 0.005 MAX_ITERATION = 15000 TARGET_COLUMN_NAME = 53 FOLD_COUNT = 5 # x^j+1 = x^j - lambda^j * grad(F(x^j)) # block of function for features # normalise values in selected column def normalization(column): column_min = column....
6,523
0
229
ff88e0f5ccecc3c701f512768bb897a2dfbe68cb
1,035
py
Python
sis-api/test/bdd/steps/membership.serialization.py
maxbilbow/7054CEM-sis
1c5067c9afc38e340fcce046048f8ae21d267365
[ "MIT" ]
null
null
null
sis-api/test/bdd/steps/membership.serialization.py
maxbilbow/7054CEM-sis
1c5067c9afc38e340fcce046048f8ae21d267365
[ "MIT" ]
null
null
null
sis-api/test/bdd/steps/membership.serialization.py
maxbilbow/7054CEM-sis
1c5067c9afc38e340fcce046048f8ae21d267365
[ "MIT" ]
null
null
null
from datetime import date from behave import * from core.model import to_dict from core.model.membership import Membership from core.model.membership_type import MembershipType from core.utils.serialization import serialize use_step_matcher("re") @when("a serialized membership is requested") def step_impl(context)...
27.236842
118
0.72657
from datetime import date from behave import * from core.model import to_dict from core.model.membership import Membership from core.model.membership_type import MembershipType from core.utils.serialization import serialize use_step_matcher("re") @when("a serialized membership is requested") def step_impl(context)...
0
0
0
c3464931747ca0b34ee6057710e3a43db773e151
4,688
py
Python
recipes/nlopt/all/conanfile.py
ZachClayburn/conan-center-index
a69335077140e13f48976cd7acf80a9040731c4c
[ "MIT" ]
null
null
null
recipes/nlopt/all/conanfile.py
ZachClayburn/conan-center-index
a69335077140e13f48976cd7acf80a9040731c4c
[ "MIT" ]
null
null
null
recipes/nlopt/all/conanfile.py
ZachClayburn/conan-center-index
a69335077140e13f48976cd7acf80a9040731c4c
[ "MIT" ]
1
2021-03-10T04:02:57.000Z
2021-03-10T04:02:57.000Z
import glob import os from conans import ConanFile, CMake, tools
40.765217
102
0.602389
import glob import os from conans import ConanFile, CMake, tools class NloptConan(ConanFile): name = "nlopt" description = "Library for nonlinear optimization, wrapping many " \ "algorithms for global and local, constrained or " \ "unconstrained, optimization." license ...
3,487
1,112
23
92dd7ab3b9750981c6d00eedcdca0d935244823f
86
py
Python
molecule/default/tests/test_node.py
OsgiliathEnterprise/ansible-iam
8d79da2c2ae07e433166349cabe34736376b2412
[ "Apache-2.0" ]
null
null
null
molecule/default/tests/test_node.py
OsgiliathEnterprise/ansible-iam
8d79da2c2ae07e433166349cabe34736376b2412
[ "Apache-2.0" ]
null
null
null
molecule/default/tests/test_node.py
OsgiliathEnterprise/ansible-iam
8d79da2c2ae07e433166349cabe34736376b2412
[ "Apache-2.0" ]
null
null
null
"""Role testing files using testinfra.""" testinfra_hosts = ["node1.osgiliath.test"]
21.5
42
0.732558
"""Role testing files using testinfra.""" testinfra_hosts = ["node1.osgiliath.test"]
0
0
0
994fbc492089270e21f9fed2b7eebf5899d9b97c
1,443
py
Python
Mike's Playground/ep_energy.py
jhfernan/Python-Playground
e80cc0c0c39b3672780209eb4aa93379777e09d6
[ "MIT" ]
null
null
null
Mike's Playground/ep_energy.py
jhfernan/Python-Playground
e80cc0c0c39b3672780209eb4aa93379777e09d6
[ "MIT" ]
null
null
null
Mike's Playground/ep_energy.py
jhfernan/Python-Playground
e80cc0c0c39b3672780209eb4aa93379777e09d6
[ "MIT" ]
null
null
null
#Electric potential energy, the easy way to solve physics problems. #This energy is converted from potential to kinetic just like in any other situation. #The calculations based upon Energy in general can be used to design and build anything. #This application will attempt to quickly formulate Energy quantities and int...
35.195122
108
0.761608
#Electric potential energy, the easy way to solve physics problems. #This energy is converted from potential to kinetic just like in any other situation. #The calculations based upon Energy in general can be used to design and build anything. #This application will attempt to quickly formulate Energy quantities and int...
0
0
0
dc185d3385b39e1dc306be98e78f79858a569d99
3,189
py
Python
quex/engine/state_machine/algebra/TESTS/basics/TEST/test-union.py
smmckay/quex-mirror
7d75ed560e9f3a591935e59243188676eecb112a
[ "MIT" ]
null
null
null
quex/engine/state_machine/algebra/TESTS/basics/TEST/test-union.py
smmckay/quex-mirror
7d75ed560e9f3a591935e59243188676eecb112a
[ "MIT" ]
null
null
null
quex/engine/state_machine/algebra/TESTS/basics/TEST/test-union.py
smmckay/quex-mirror
7d75ed560e9f3a591935e59243188676eecb112a
[ "MIT" ]
null
null
null
#! /usr/bin/env python import sys import os sys.path.insert(0, os.environ["QUEX_PATH"]) import quex.input.regular_expression.engine as regex import quex.engine.state_machine.algebra.union as union import quex.engine.state_machine.algebra.intersection as intersection import quex.engine.state_machine.ch...
35.043956
77
0.532455
#! /usr/bin/env python import sys import os sys.path.insert(0, os.environ["QUEX_PATH"]) import quex.input.regular_expression.engine as regex import quex.engine.state_machine.algebra.union as union import quex.engine.state_machine.algebra.intersection as intersection import quex.engine.state_machine.ch...
853
0
27
999588c6a1dc028a7b974c575fa938c7f745b9cf
5,225
py
Python
hood/tests.py
Nelsonkioko/Hood_Watch
1153360c7f494c2820206c6b172b732ba3eb14fa
[ "Unlicense" ]
null
null
null
hood/tests.py
Nelsonkioko/Hood_Watch
1153360c7f494c2820206c6b172b732ba3eb14fa
[ "Unlicense" ]
5
2020-06-05T21:22:20.000Z
2021-09-08T01:02:44.000Z
hood/tests.py
Nelsonkioko/Hood_Watch
1153360c7f494c2820206c6b172b732ba3eb14fa
[ "Unlicense" ]
null
null
null
from django.test import TestCase from django.contrib.auth.models import User from .models import UserProfile,Post,Comment,Location,Category,Neighborhood,Company # Create your tests here. # Set up method #Testing instance # Set up method #Testing instance # Set up method #Testing instance ...
38.419118
170
0.697225
from django.test import TestCase from django.contrib.auth.models import User from .models import UserProfile,Post,Comment,Location,Category,Neighborhood,Company # Create your tests here. class UserProfileTestClass(TestCase): # Set up method def setUp(self): self.user = User.objects.create_user(username=...
3,885
92
767
90806d17353332cc1da92222362340c8cbbcfb77
58,542
py
Python
ReferentialGym/agents/differentiable_obverter_agent.py
Near32/ReferentialGameGym
afe22da2ac20c0d24e93b4dbd1f1ad61374d1a6c
[ "MIT" ]
19
2019-11-20T05:50:37.000Z
2022-03-15T09:10:25.000Z
ReferentialGym/agents/differentiable_obverter_agent.py
Near32/ReferentialGameGym
afe22da2ac20c0d24e93b4dbd1f1ad61374d1a6c
[ "MIT" ]
null
null
null
ReferentialGym/agents/differentiable_obverter_agent.py
Near32/ReferentialGameGym
afe22da2ac20c0d24e93b4dbd1f1ad61374d1a6c
[ "MIT" ]
5
2020-12-20T23:00:23.000Z
2022-01-06T08:42:24.000Z
import torch import torch.nn as nn import torch.nn.functional as F from .discriminative_listener import DiscriminativeListener from ..networks import choose_architecture, layer_init, BetaVAE, reg_nan, hasnan from ..utils import gumbel_softmax use_decision_head = True nbr_head_outputs = 2 not_always_argmax = True ; al...
54.055402
185
0.627601
import torch import torch.nn as nn import torch.nn.functional as F from .discriminative_listener import DiscriminativeListener from ..networks import choose_architecture, layer_init, BetaVAE, reg_nan, hasnan from ..utils import gumbel_softmax use_decision_head = True nbr_head_outputs = 2 not_always_argmax = True ; al...
3,496
54,352
46
e21398358baf0b9bacfa8e0348420ba7ffb199df
1,305
py
Python
pylabnet/scripts/pause_script.py
wi11dey/pylabnet
a6e3362f727c45aaa60e61496e858ae92e85574d
[ "MIT" ]
10
2020-01-07T23:28:49.000Z
2022-02-02T19:09:17.000Z
pylabnet/scripts/pause_script.py
wi11dey/pylabnet
a6e3362f727c45aaa60e61496e858ae92e85574d
[ "MIT" ]
249
2019-12-28T19:38:49.000Z
2022-03-28T16:45:32.000Z
pylabnet/scripts/pause_script.py
wi11dey/pylabnet
a6e3362f727c45aaa60e61496e858ae92e85574d
[ "MIT" ]
5
2020-11-17T19:45:10.000Z
2022-01-04T18:07:04.000Z
""" Set of tools to stop continuously running script from a different process via RPyC link. Steps: - the script class should have public method pause(), which will be called by client through RPyC link - once the script is instantiated, assign it as the module to PauseService instance: pause_service_instanc...
29
77
0.717241
""" Set of tools to stop continuously running script from a different process via RPyC link. Steps: - the script class should have public method pause(), which will be called by client through RPyC link - once the script is instantiated, assign it as the module to PauseService instance: pause_service_instanc...
234
0
54
a7406aae1ccc2e0f81a125ccdfc5675e620996e1
994
py
Python
sales/urls.py
sLeeNguyen/sales-support
3f0a6977c8c26743373a70b4296516b7a71ccf4a
[ "Apache-2.0" ]
1
2021-03-22T14:07:30.000Z
2021-03-22T14:07:30.000Z
sales/urls.py
sLeeNguyen/sales-support
3f0a6977c8c26743373a70b4296516b7a71ccf4a
[ "Apache-2.0" ]
null
null
null
sales/urls.py
sLeeNguyen/sales-support
3f0a6977c8c26743373a70b4296516b7a71ccf4a
[ "Apache-2.0" ]
null
null
null
from django.urls import path, re_path from . import views app_name = "sales" urlpatterns = [ re_path('^sales/$', views.SalesView.as_view(), name="sales"), re_path('^sales/search/product/$', views.SearchProductView.as_view(), name="search"), re_path('^sales/search/customer/$', views.SearchCustomerView.as_vi...
58.470588
111
0.686117
from django.urls import path, re_path from . import views app_name = "sales" urlpatterns = [ re_path('^sales/$', views.SalesView.as_view(), name="sales"), re_path('^sales/search/product/$', views.SearchProductView.as_view(), name="search"), re_path('^sales/search/customer/$', views.SearchCustomerView.as_vi...
0
0
0
90f50e1411da7d618e3c5ec957b3527c76d37691
1,673
py
Python
projects/schemas/project.py
dnlcesilva/projects
8e367d502aa0ffe3ed29f767d6ab039e6bee282f
[ "Apache-2.0" ]
6
2019-09-16T13:07:20.000Z
2021-06-02T19:02:05.000Z
projects/schemas/project.py
ndarvishev/projects
6a9855c5f8af8fad2799ef7a203e126b834c5056
[ "Apache-2.0" ]
325
2019-09-20T20:06:00.000Z
2022-03-30T15:05:49.000Z
projects/schemas/project.py
ndarvishev/projects
6a9855c5f8af8fad2799ef7a203e126b834c5056
[ "Apache-2.0" ]
17
2019-08-02T16:55:47.000Z
2021-06-26T19:13:35.000Z
# -*- coding: utf-8 -*- """Project schema.""" from datetime import datetime from typing import List, Optional from pydantic import BaseModel from projects.schemas.deployment import Deployment from projects.schemas.experiment import Experiment from projects.utils import to_camel_case
24.246377
67
0.677227
# -*- coding: utf-8 -*- """Project schema.""" from datetime import datetime from typing import List, Optional from pydantic import BaseModel from projects.schemas.deployment import Deployment from projects.schemas.experiment import Experiment from projects.utils import to_camel_case class ProjectBase(BaseModel): ...
605
662
115
06927ecbb31531d1e817ca9fc2075566e4173c8f
24,512
py
Python
main_bert_hier.py
HLTCHKUST/emotion-dialogue
0d58b339134dd9a2f386948ae474b270a77370f9
[ "MIT" ]
40
2019-04-29T09:17:48.000Z
2021-11-19T06:32:02.000Z
main_bert_hier.py
HLTCHKUST/emotion-dialogue
0d58b339134dd9a2f386948ae474b270a77370f9
[ "MIT" ]
null
null
null
main_bert_hier.py
HLTCHKUST/emotion-dialogue
0d58b339134dd9a2f386948ae474b270a77370f9
[ "MIT" ]
4
2019-09-01T10:00:56.000Z
2020-03-08T16:00:22.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from utils.data_reader import read_data ,get_data_for_bert from utils import constant from utils.utils import getMetrics from models.transformer import Encoder from models.lstm_model import HLstmModel ...
50.02449
206
0.631527
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from utils.data_reader import read_data ,get_data_for_bert from utils import constant from utils.utils import getMetrics from models.transformer import Encoder from models.lstm_model import HLstmModel ...
18,407
26
370
a15941426236155d42b21af772784162ea7806f2
1,301
py
Python
save_door_pointcloud.py
aidan-curtis/az-manipulator
0c9837110b30bdaa6e53938b6dc4bc7a26c0a474
[ "Apache-2.0" ]
null
null
null
save_door_pointcloud.py
aidan-curtis/az-manipulator
0c9837110b30bdaa6e53938b6dc4bc7a26c0a474
[ "Apache-2.0" ]
null
null
null
save_door_pointcloud.py
aidan-curtis/az-manipulator
0c9837110b30bdaa6e53938b6dc4bc7a26c0a474
[ "Apache-2.0" ]
null
null
null
import gym import pickle from mani_skill import env env = gym.make('OpenCabinetDoor-v0') # full environment list can be found in available_environments.txt env.set_env_mode(obs_mode='pointcloud', reward_type='sparse') # obs_mode can be 'state', 'pointcloud' or 'rgbd' # reward_type can be 'sparse' or 'dense' print(env...
35.162162
114
0.667948
import gym import pickle from mani_skill import env env = gym.make('OpenCabinetDoor-v0') # full environment list can be found in available_environments.txt env.set_env_mode(obs_mode='pointcloud', reward_type='sparse') # obs_mode can be 'state', 'pointcloud' or 'rgbd' # reward_type can be 'sparse' or 'dense' print(env...
0
0
0
9c2b2440971fc46632f5158c9309a0fe90f71f72
1,155
py
Python
src/brain/modelgen/model_generator.py
jmininger/peloton
268549dcd3451fac9fa983c190337fa5c6e4ee22
[ "Apache-2.0" ]
2
2021-03-29T01:29:18.000Z
2022-02-27T11:22:15.000Z
src/brain/modelgen/model_generator.py
lym953/15721-p3
c5ba8004c6f0f10472aa004303c04be1c860ade9
[ "Apache-2.0" ]
null
null
null
src/brain/modelgen/model_generator.py
lym953/15721-p3
c5ba8004c6f0f10472aa004303c04be1c860ade9
[ "Apache-2.0" ]
null
null
null
#===----------------------------------------------------------------------===# # # Peloton # # model_generator.py # # Identification: src/brain/modelgen/model_generator.py # # Copyright (c) 2015-2018, Carnegie Mellon University Database Group # #===-----------------------------------------------...
28.875
78
0.550649
#===----------------------------------------------------------------------===# # # Peloton # # model_generator.py # # Identification: src/brain/modelgen/model_generator.py # # Copyright (c) 2015-2018, Carnegie Mellon University Database Group # #===-----------------------------------------------...
565
0
23
5bf1fdc565849a670ab5fc9dd781a475c9228094
4,308
py
Python
c-abi-examples/python_example.py
kristoff-it/zig-cuckoofilter
956937fdb3a3a1163e984469153e697588e9c982
[ "MIT" ]
52
2019-05-13T00:05:06.000Z
2022-02-16T05:45:42.000Z
c-abi-examples/python_example.py
kristoff-it/zig-cuckoofilter
956937fdb3a3a1163e984469153e697588e9c982
[ "MIT" ]
null
null
null
c-abi-examples/python_example.py
kristoff-it/zig-cuckoofilter
956937fdb3a3a1163e984469153e697588e9c982
[ "MIT" ]
3
2019-12-21T16:17:16.000Z
2021-11-26T06:22:39.000Z
from cffi import FFI # On macOS dynamic libraries have the .dylib extension. Windows has .dll and linux has .so # You can obtain libcuckoofilter_c.xxx.{dylib, so, dll} either by downloading it from the latest Release on GitHub # or by compiling the library using the Zig compiler: # # $ zig build-lib -dynamic --relea...
37.789474
114
0.727252
from cffi import FFI # On macOS dynamic libraries have the .dylib extension. Windows has .dll and linux has .so # You can obtain libcuckoofilter_c.xxx.{dylib, so, dll} either by downloading it from the latest Release on GitHub # or by compiling the library using the Zig compiler: # # $ zig build-lib -dynamic --relea...
0
0
0
76ec71be256ce91c25a080b7da16a5dda57078fd
3,568
py
Python
examples/lstm_forward.py
marcinz/cunumeric
c40b038d4eb0611f7bb16d5bd11891a633ef7892
[ "Apache-2.0" ]
118
2021-04-12T18:06:59.000Z
2021-10-12T21:30:24.000Z
examples/lstm_forward.py
marcinz/cunumeric
c40b038d4eb0611f7bb16d5bd11891a633ef7892
[ "Apache-2.0" ]
51
2021-04-21T10:40:13.000Z
2021-09-10T22:09:26.000Z
examples/lstm_forward.py
marcinz/cunumeric
c40b038d4eb0611f7bb16d5bd11891a633ef7892
[ "Apache-2.0" ]
9
2021-04-14T03:07:42.000Z
2021-09-22T17:02:53.000Z
#!/usr/bin/env python # Copyright 2021 NVIDIA Corporation # # 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...
28.544
78
0.578475
#!/usr/bin/env python # Copyright 2021 NVIDIA Corporation # # 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...
1,676
0
23
b262b3d2c842e1ea438b151382ccdde9e343505a
3,377
py
Python
tests/test_index_update.py
jhong93/caption-index
5484df583c37ae68472c58b06c3ff4c3254a42b9
[ "BSD-3-Clause" ]
2
2020-11-05T20:37:32.000Z
2021-05-16T01:52:55.000Z
tests/test_index_update.py
scanner-research/caption-index
5484df583c37ae68472c58b06c3ff4c3254a42b9
[ "BSD-3-Clause" ]
null
null
null
tests/test_index_update.py
scanner-research/caption-index
5484df583c37ae68472c58b06c3ff4c3254a42b9
[ "BSD-3-Clause" ]
null
null
null
""" Build a dummy index, update it, and run tests on it. """ import os import shutil import tempfile from subprocess import check_call, CalledProcessError import captions from lib.common import get_docs_and_lexicon TEST_DATA_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), ...
37.522222
86
0.639917
""" Build a dummy index, update it, and run tests on it. """ import os import shutil import tempfile from subprocess import check_call, CalledProcessError import captions from lib.common import get_docs_and_lexicon TEST_DATA_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), ...
2,763
0
23
10e48b1c91f4da0db9bda2c7614b3932e9059adb
5,773
py
Python
snake_game/main.py
ps4449/python-games
559a15be98de4c0cef55eeee5e3e84888d8c7c39
[ "CC0-1.0" ]
null
null
null
snake_game/main.py
ps4449/python-games
559a15be98de4c0cef55eeee5e3e84888d8c7c39
[ "CC0-1.0" ]
null
null
null
snake_game/main.py
ps4449/python-games
559a15be98de4c0cef55eeee5e3e84888d8c7c39
[ "CC0-1.0" ]
null
null
null
import pygame from pygame.locals import * import time import random size = 40 # place the block at a certain position on the screen if __name__ == "__main__": game = Game() game.run()
29.605128
104
0.531093
import pygame from pygame.locals import * import time import random size = 40 class Apple: def __init__(self, parent_screen): # loading the apple image self.parent_screen = parent_screen self.apple = pygame.image.load("resources/apple.jpg").convert() self.x = size*4 self.y ...
4,969
-28
632
c33417d6722fcf82315611a3828045af6e5826a5
1,207
py
Python
manger.py
1335305660/new-project
78c0cf05ef527c7f6f2556308a4a8843d20bbbf5
[ "MIT" ]
null
null
null
manger.py
1335305660/new-project
78c0cf05ef527c7f6f2556308a4a8843d20bbbf5
[ "MIT" ]
null
null
null
manger.py
1335305660/new-project
78c0cf05ef527c7f6f2556308a4a8843d20bbbf5
[ "MIT" ]
null
null
null
from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from info import create_app, db app = create_app("development") # class Config(object): # #DEBUG = True # SQLALCHEMY_DATABASE_URI = "mysql://root:mysql@127.0.0.1:3306/python22" # SQLALCHEMY_TRACK_MODIFICATIONS = False # ...
21.553571
87
0.705882
from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from info import create_app, db app = create_app("development") # class Config(object): # #DEBUG = True # SQLALCHEMY_DATABASE_URI = "mysql://root:mysql@127.0.0.1:3306/python22" # SQLALCHEMY_TRACK_MODIFICATIONS = False # ...
0
0
0
17a2306fb6851d6bddff78688a0dc1453a4880b9
18,325
py
Python
src/app.py
afunTW/pyqt5-video-labeling
3894d21b0ea6b938a499334d8e75f8085281609b
[ "MIT" ]
6
2018-12-13T09:03:48.000Z
2020-09-04T12:45:52.000Z
src/app.py
afunTW/pyqt5-video-labeling
3894d21b0ea6b938a499334d8e75f8085281609b
[ "MIT" ]
1
2018-12-24T11:47:41.000Z
2018-12-27T03:17:58.000Z
src/app.py
afunTW/pyqt5-video-labeling
3894d21b0ea6b938a499334d8e75f8085281609b
[ "MIT" ]
null
null
null
import logging from collections import OrderedDict from copy import deepcopy from datetime import datetime, timedelta from pathlib import Path from time import sleep import cv2 import numpy as np import pandas as pd from PyQt5.QtCore import Qt, QTimer, pyqtSlot from PyQt5.QtGui import QColor, QImage, QPixmap from PyQt...
46.392405
103
0.614734
import logging from collections import OrderedDict from copy import deepcopy from datetime import datetime, timedelta from pathlib import Path from time import sleep import cv2 import numpy as np import pandas as pd from PyQt5.QtCore import Qt, QTimer, pyqtSlot from PyQt5.QtGui import QColor, QImage, QPixmap from PyQt...
6,862
11,037
23
c0c2f3c8c741f4204a3865d86fc06e4917c63b6f
650
py
Python
explore.py
kabirivan/Review_Database
5d807caf6bb1ba6515f89e744e8f85a3cc8930ad
[ "MIT" ]
null
null
null
explore.py
kabirivan/Review_Database
5d807caf6bb1ba6515f89e744e8f85a3cc8930ad
[ "MIT" ]
null
null
null
explore.py
kabirivan/Review_Database
5d807caf6bb1ba6515f89e744e8f85a3cc8930ad
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Aug 1 12:07:15 2021 @author: xavieraguas """ import sqlalchemy as db DBUSER = 'postgres' DBPASS = 'ivan' DBHOST = 'localhost' DBPORT = '5432' DBNAME = 'test' engine = db.create_engine('postgresql+psycopg2://{user}:{passwd}@{host}:{port}/{db}'.for...
23.214286
157
0.715385
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Aug 1 12:07:15 2021 @author: xavieraguas """ import sqlalchemy as db DBUSER = 'postgres' DBPASS = 'ivan' DBHOST = 'localhost' DBPORT = '5432' DBNAME = 'test' engine = db.create_engine('postgresql+psycopg2://{user}:{passwd}@{host}:{port}/{db}'.for...
0
0
0
17886f6f6da5d5e948c9ef37c8db58a42e700acf
4,489
py
Python
zeus/api/resources/repository_file_coverage_tree.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
221
2017-07-03T17:29:21.000Z
2021-12-07T19:56:59.000Z
zeus/api/resources/repository_file_coverage_tree.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
298
2017-07-04T18:08:14.000Z
2022-03-03T22:24:51.000Z
zeus/api/resources/repository_file_coverage_tree.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
24
2017-07-15T13:46:45.000Z
2020-08-16T16:14:45.000Z
from flask import current_app, request from typing import Optional from zeus.constants import Result, Status from zeus.models import Build, FileCoverage, Repository from zeus.utils.trees import build_tree from zeus.vcs import vcs_client from .base_repository import BaseRepositoryResource from ..schemas import FileCov...
35.070313
88
0.539987
from flask import current_app, request from typing import Optional from zeus.constants import Result, Status from zeus.models import Build, FileCoverage, Repository from zeus.utils.trees import build_tree from zeus.vcs import vcs_client from .base_repository import BaseRepositoryResource from ..schemas import FileCov...
1,085
2,977
23
69504db4b756a2a61be808201760321dfb4b0ace
162
py
Python
python/split-strip.py
tbedford/code-snippets
9afe36c2726829f14fa5ec11acb8214bed704938
[ "MIT" ]
null
null
null
python/split-strip.py
tbedford/code-snippets
9afe36c2726829f14fa5ec11acb8214bed704938
[ "MIT" ]
null
null
null
python/split-strip.py
tbedford/code-snippets
9afe36c2726829f14fa5ec11acb8214bed704938
[ "MIT" ]
1
2018-10-09T02:03:12.000Z
2018-10-09T02:03:12.000Z
str= ' this | is | a string ' s1, s2, s3 = str.split('|', 2) print('>%s<' % s1.strip()) print('>%s<' % s2) print('>%s<' % s3) s = str.split('|', 2) print(s)
13.5
30
0.469136
str= ' this | is | a string ' s1, s2, s3 = str.split('|', 2) print('>%s<' % s1.strip()) print('>%s<' % s2) print('>%s<' % s3) s = str.split('|', 2) print(s)
0
0
0
5f57b69dd2b732ae783dea004681c5995c52a5d4
447
py
Python
constants.py
thomscot/bamboozled
a99d76454dff47ed90b4526185468d9061fe434f
[ "MIT" ]
null
null
null
constants.py
thomscot/bamboozled
a99d76454dff47ed90b4526185468d9061fe434f
[ "MIT" ]
null
null
null
constants.py
thomscot/bamboozled
a99d76454dff47ed90b4526185468d9061fe434f
[ "MIT" ]
null
null
null
# Bamboo website specific fields BAMBOO_LOGIN = "https://your_organization.bamboohr.com/login.php" CLOCK_OUT_BTN = "Clock Out" CLOCK_IN_BTN = "Clock In" STANDARD_LOGIN = "Log in with Email and Password" LOGIN_BTN = "Log In" LOGIN_ID = "#lemail" PWD_ID = "#password" # user specific constants MAX_SLEEP = 1200 # 20 ...
20.318182
65
0.740492
# Bamboo website specific fields BAMBOO_LOGIN = "https://your_organization.bamboohr.com/login.php" CLOCK_OUT_BTN = "Clock Out" CLOCK_IN_BTN = "Clock In" STANDARD_LOGIN = "Log in with Email and Password" LOGIN_BTN = "Log In" LOGIN_ID = "#lemail" PWD_ID = "#password" # user specific constants MAX_SLEEP = 1200 # 20 ...
0
0
0
81c18a2f0356e4349077b255c0ae7722c331a8cd
753
py
Python
ballot/urls.py
josephevans/WeVoteServer
137f3037ba9984e036eb146aeeeecb4e979c21e1
[ "MIT" ]
null
null
null
ballot/urls.py
josephevans/WeVoteServer
137f3037ba9984e036eb146aeeeecb4e979c21e1
[ "MIT" ]
null
null
null
ballot/urls.py
josephevans/WeVoteServer
137f3037ba9984e036eb146aeeeecb4e979c21e1
[ "MIT" ]
null
null
null
# ballot/urls.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.conf.urls import url from . import views_admin urlpatterns = [ # views_admin url(r'^import_ballot_items/$', views_admin.ballot_items_import_from_master_server_view, name='ballot_items_import_from_master...
35.857143
119
0.743692
# ballot/urls.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.conf.urls import url from . import views_admin urlpatterns = [ # views_admin url(r'^import_ballot_items/$', views_admin.ballot_items_import_from_master_server_view, name='ballot_items_import_from_master...
0
0
0
fe3da3a126f85af39a25fe883e7ebd890af430d1
13,774
py
Python
Main_ext.py
NewGr8Player/paipaidai_spider
9e11bf730a2371fbb3ffcf624a3031ca411b7d87
[ "MIT" ]
null
null
null
Main_ext.py
NewGr8Player/paipaidai_spider
9e11bf730a2371fbb3ffcf624a3031ca411b7d87
[ "MIT" ]
null
null
null
Main_ext.py
NewGr8Player/paipaidai_spider
9e11bf730a2371fbb3ffcf624a3031ca411b7d87
[ "MIT" ]
null
null
null
import os import time import datetime import random from bs4 import BeautifulSoup from openpyxl import load_workbook from openpyxl import Workbook from selenium import webdriver data_xls_poz_map = { 1: {'name': '用户名', 'code': 'user_name'}, 2: {'name': '信用等级', 'code': 'credit_level'}, 3: {'name': '贷款金额', 'c...
37.944904
119
0.579715
import os import time import datetime import random from bs4 import BeautifulSoup from openpyxl import load_workbook from openpyxl import Workbook from selenium import webdriver data_xls_poz_map = { 1: {'name': '用户名', 'code': 'user_name'}, 2: {'name': '信用等级', 'code': 'credit_level'}, 3: {'name': '贷款金额', 'c...
14,131
0
220
159f2111ea1911cb06cdd1803e0ebeccc58ce4af
369
py
Python
back/main.py
saadlalam/issueBook
3a2519dca237bf6ac6708f88ea7d96b17de88ed3
[ "MIT" ]
null
null
null
back/main.py
saadlalam/issueBook
3a2519dca237bf6ac6708f88ea7d96b17de88ed3
[ "MIT" ]
null
null
null
back/main.py
saadlalam/issueBook
3a2519dca237bf6ac6708f88ea7d96b17de88ed3
[ "MIT" ]
null
null
null
from flask import Flask from flask_cors import CORS from app.config import properties from app.api.issues import issues app = Flask(__name__) app.register_blueprint(issues, url_prefix=f'/api/issues') CORS(app, resources={r"/*": {"origins": properties.AUTHORIZED_ORIGIN}}, supports_credentials=True) if __name__ =...
21.705882
98
0.766938
from flask import Flask from flask_cors import CORS from app.config import properties from app.api.issues import issues app = Flask(__name__) app.register_blueprint(issues, url_prefix=f'/api/issues') CORS(app, resources={r"/*": {"origins": properties.AUTHORIZED_ORIGIN}}, supports_credentials=True) if __name__ =...
0
0
0
3fd00df659d0026f50afb06f87ef017ff0c61899
950
py
Python
resources/resources_sql/inventario.py
cifpfbmoll/ollivanders-in-a-docker-pau13-loop
0f9f2589b567c57bd56a8a4161de3043d5639a8b
[ "MIT" ]
null
null
null
resources/resources_sql/inventario.py
cifpfbmoll/ollivanders-in-a-docker-pau13-loop
0f9f2589b567c57bd56a8a4161de3043d5639a8b
[ "MIT" ]
null
null
null
resources/resources_sql/inventario.py
cifpfbmoll/ollivanders-in-a-docker-pau13-loop
0f9f2589b567c57bd56a8a4161de3043d5639a8b
[ "MIT" ]
null
null
null
from flask_restful import Resource, Api # Importamos el contenido de Service from service.service_sql.service import Service # Importamos el make_response from flask import make_response, jsonify
31.666667
125
0.684211
from flask_restful import Resource, Api # Importamos el contenido de Service from service.service_sql.service import Service # Importamos el make_response from flask import make_response, jsonify class Inventario(Resource): def get(self): """Gets a list of all items. Makes a custom Response Obje...
0
730
23
54fb079e1aa8bac4a52b1b1cb1f9702e0bdf4882
124
py
Python
code/common/module/__init__.py
naschorr/hawking
cdc98b7bc90c72d634f1fe877c34e7f9908ec4a8
[ "MIT" ]
21
2017-08-06T02:47:05.000Z
2022-03-13T17:39:00.000Z
code/common/module/__init__.py
naschorr/hawking
cdc98b7bc90c72d634f1fe877c34e7f9908ec4a8
[ "MIT" ]
87
2017-12-26T17:07:59.000Z
2022-03-11T01:31:48.000Z
code/common/module/__init__.py
naschorr/hawking
cdc98b7bc90c72d634f1fe877c34e7f9908ec4a8
[ "MIT" ]
7
2019-10-23T17:30:34.000Z
2022-03-31T05:56:43.000Z
__all__ = [ 'dependency_graph', 'discoverable_module', 'module_initialization_container', 'module_manager' ]
20.666667
38
0.701613
__all__ = [ 'dependency_graph', 'discoverable_module', 'module_initialization_container', 'module_manager' ]
0
0
0
c2ef4a42503ac3566c51d91b6c6562bcc97d14d7
846
py
Python
3-2.py
chrisguilbeau/aoc2021
d043f9da81343fc2e817884e7dfd36aa71632984
[ "MIT" ]
null
null
null
3-2.py
chrisguilbeau/aoc2021
d043f9da81343fc2e817884e7dfd36aa71632984
[ "MIT" ]
null
null
null
3-2.py
chrisguilbeau/aoc2021
d043f9da81343fc2e817884e7dfd36aa71632984
[ "MIT" ]
null
null
null
from sys import argv if __name__ == '__main__': with open(argv[1], 'r') as f: lines = f.readlines() main(lines)
32.538462
67
0.478723
from sys import argv def main(lines): lenLine = len(lines[0].strip()) def getVal(g=True): candidates = lines[:] for i in range(lenLine): lenLineHalf = len(candidates) / 2. numOnes = sum(int(l[i]) for l in candidates) print(numOnes) if numOnes >= l...
694
0
23
97f7620c8abd7d1be31eac719ba83b509dfa0c24
148
py
Python
compileMain.py
noahbroyles/pyinstaller-wine
f6ca8f1ee9b7b1682fcdfc4bea5ae1dc3643338e
[ "MIT" ]
6
2021-07-29T02:42:41.000Z
2021-09-18T20:38:10.000Z
compileMain.py
noahbroyles/pyinstaller-wine
f6ca8f1ee9b7b1682fcdfc4bea5ae1dc3643338e
[ "MIT" ]
1
2021-09-10T04:22:29.000Z
2021-11-05T17:01:10.000Z
compileMain.py
noahbroyles/pyinstaller-wine
f6ca8f1ee9b7b1682fcdfc4bea5ae1dc3643338e
[ "MIT" ]
null
null
null
import subprocess subprocess.call(['pyinstaller', '/home/nbroyles/PycharmProjects/PyinstallerWineCompile/main.py', '--onefile', '-n', 'pycompile'])
49.333333
129
0.763514
import subprocess subprocess.call(['pyinstaller', '/home/nbroyles/PycharmProjects/PyinstallerWineCompile/main.py', '--onefile', '-n', 'pycompile'])
0
0
0
c7df3847e83f3a0897b70fdee785e6bb33304854
1,299
py
Python
page_object_models/admin_page_model.py
ikostan/ParaBankSeleniumAutomation
e28a886adba89b82a60831ad96a3a8f00f863116
[ "Unlicense" ]
4
2019-08-12T19:36:58.000Z
2021-09-14T18:48:27.000Z
page_object_models/admin_page_model.py
ikostan/ParaBankSeleniumAutomation
e28a886adba89b82a60831ad96a3a8f00f863116
[ "Unlicense" ]
1
2021-06-02T00:01:00.000Z
2021-06-02T00:01:00.000Z
page_object_models/admin_page_model.py
ikostan/ParaBankSeleniumAutomation
e28a886adba89b82a60831ad96a3a8f00f863116
[ "Unlicense" ]
2
2019-08-12T10:06:00.000Z
2020-12-25T05:52:40.000Z
# Created by Egor Kostan. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ from tests.config import Config from utils.driver import Driver from element_object_models.element import Element from page_object_models.base_page_model import BasePageModel from page_locators.admin...
31.682927
113
0.792148
# Created by Egor Kostan. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ from tests.config import Config from utils.driver import Driver from element_object_models.element import Element from page_object_models.base_page_model import BasePageModel from page_locators.admin...
198
0
24
c73c8bbddf84252088ca00612cf7fb4729fdd58b
722
py
Python
cmd_make_1.py
bokveizen/baselines
79f5d18e2358567c72f422c5a23df78f9f64a55d
[ "MIT" ]
null
null
null
cmd_make_1.py
bokveizen/baselines
79f5d18e2358567c72f422c5a23df78f9f64a55d
[ "MIT" ]
null
null
null
cmd_make_1.py
bokveizen/baselines
79f5d18e2358567c72f422c5a23df78f9f64a55d
[ "MIT" ]
null
null
null
''' python -m baselines.run --alg=deepq --env=BreakoutNoFrameskip-v4 --num_timesteps=0 --load_path=models/Breakout_1e7/baseline --play ''' import os game_name = 'Tennis' model_timesteps = '1e6' methods = os.listdir('models/{}_{}'.format(game_name, model_timesteps)) f = open('test_cmd_{}_{}.txt'.format(game_name, model_...
30.083333
71
0.610803
''' python -m baselines.run --alg=deepq --env=BreakoutNoFrameskip-v4 --num_timesteps=0 --load_path=models/Breakout_1e7/baseline --play ''' import os game_name = 'Tennis' model_timesteps = '1e6' methods = os.listdir('models/{}_{}'.format(game_name, model_timesteps)) f = open('test_cmd_{}_{}.txt'.format(game_name, model_...
0
0
0
d2a2fd0d5a9ffb87b1df0252da7cfe7bb7509a34
152
py
Python
pomdp_problems/osm_mos/models/__init__.py
beckymathew/pomdp-py
4864514277e49dee4b7c3fb303970de7b6a888ea
[ "MIT" ]
87
2020-02-16T03:12:10.000Z
2022-03-31T08:38:10.000Z
pomdp_problems/osm_mos/models/__init__.py
beckymathew/pomdp-py
4864514277e49dee4b7c3fb303970de7b6a888ea
[ "MIT" ]
15
2020-08-01T00:25:33.000Z
2022-02-19T22:37:11.000Z
pomdp_problems/osm_mos/models/__init__.py
beckymathew/pomdp-py
4864514277e49dee4b7c3fb303970de7b6a888ea
[ "MIT" ]
26
2020-02-20T01:15:33.000Z
2022-03-30T16:21:37.000Z
"""**Defines models, including transition, observation, reward, policy; Also includes additional components such as the sensor model and grid map.**"""
50.666667
76
0.769737
"""**Defines models, including transition, observation, reward, policy; Also includes additional components such as the sensor model and grid map.**"""
0
0
0
b8b39fac3b089ac46b471314e52359fdf3b4c34e
8,951
py
Python
learning/my_code.py
jocarias/DeepMimic
96cc21d1914d672e2d1d886cdc8d668cf40e568f
[ "MIT" ]
null
null
null
learning/my_code.py
jocarias/DeepMimic
96cc21d1914d672e2d1d886cdc8d668cf40e568f
[ "MIT" ]
null
null
null
learning/my_code.py
jocarias/DeepMimic
96cc21d1914d672e2d1d886cdc8d668cf40e568f
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from enum import Enum import pycwt import os import json import pandas import tensorflow as tf # use Bay Walker at the beginning of the training? #def is_state_vars_set_to_zero(): # return False # updates the buffer so it contains the latest ...
41.248848
135
0.612892
import numpy as np import matplotlib.pyplot as plt from enum import Enum import pycwt import os import json import pandas import tensorflow as tf class Mode(Enum): DEFAULT = 1 # not working REDUCED_STATE = 2 CWT_CNN_v1 = 3 CWT_CNN_v2 = 4 # not implemented CNN_v1 = 5 # not imp...
7,662
248
645
540bff643d4099fd17ae9a5b0fc3744981737ee4
1,811
py
Python
controllers/relevanceutils.py
ChrisHowlin/WeGotPOP-BE-Example
3cb595e1da8251a061021471e9c9b2f15edd8164
[ "MIT" ]
null
null
null
controllers/relevanceutils.py
ChrisHowlin/WeGotPOP-BE-Example
3cb595e1da8251a061021471e9c9b2f15edd8164
[ "MIT" ]
null
null
null
controllers/relevanceutils.py
ChrisHowlin/WeGotPOP-BE-Example
3cb595e1da8251a061021471e9c9b2f15edd8164
[ "MIT" ]
null
null
null
import collections
34.826923
93
0.619547
import collections class SorterList: def __init__(self, sorter_dict): ''' sorter_dict maps sorter names to functions ''' self.sorter_dict = sorter_dict self.sorter_weights = {} def add_weight(self, label, weight): self.sorter_weights[weight] = label def sort(self, list_to_...
1,506
218
69
1dcdbf88626caad0026f820c158a2011e9287b31
1,099
bzl
Python
deps/hive/repository.bzl
y0psolo/YAD
0f1f9c5140687345dee591667793d6f8ed6e29e5
[ "Apache-2.0" ]
1
2021-11-05T09:13:57.000Z
2021-11-05T09:13:57.000Z
deps/hive/repository.bzl
y0psolo/YAD
0f1f9c5140687345dee591667793d6f8ed6e29e5
[ "Apache-2.0" ]
9
2021-12-02T13:25:52.000Z
2022-01-26T14:24:05.000Z
deps/hive/repository.bzl
y0psolo/YAD
0f1f9c5140687345dee591667793d6f8ed6e29e5
[ "Apache-2.0" ]
null
null
null
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
43.96
141
0.689718
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") def hive_repository(): http_archive( name = "hive_metastore_3", build_file = "//ext/hivemetastore:BUILD", sha256 = "a2e9fb781e1b86c066d2f9c71f0210ad161bc0bd791e5999c325ffbd4354c190", strip_prefix = "ap...
994
0
23
c52412dcade129e6a09942461626c5bd366a5d2b
269
py
Python
src/google_music_utils/__init__.py
thebigmunch/google-music-utils
a562d36ade47992679daa2a97956773e30f131a1
[ "MIT" ]
2
2019-04-24T09:37:25.000Z
2020-10-22T15:05:26.000Z
src/google_music_utils/__init__.py
thebigmunch/google-music-utils
a562d36ade47992679daa2a97956773e30f131a1
[ "MIT" ]
1
2020-08-17T13:52:53.000Z
2020-08-17T13:52:53.000Z
src/google_music_utils/__init__.py
thebigmunch/google-music-utils
a562d36ade47992679daa2a97956773e30f131a1
[ "MIT" ]
1
2020-08-17T13:49:45.000Z
2020-08-17T13:49:45.000Z
from .__about__ import * from .compare import * from .constants import * from .filter import * from .metadata import * from .misc import * __all__ = [ *__about__.__all__, *compare.__all__, *constants.__all__, *filter.__all__, *metadata.__all__, *misc.__all__, ]
16.8125
24
0.724907
from .__about__ import * from .compare import * from .constants import * from .filter import * from .metadata import * from .misc import * __all__ = [ *__about__.__all__, *compare.__all__, *constants.__all__, *filter.__all__, *metadata.__all__, *misc.__all__, ]
0
0
0
7bae2575c20fa68246099177d14649c192346b89
1,224
py
Python
help/models.py
asysc2020/contentbox
5c155976e0ce7ea308d62293ab89624d97b21d09
[ "Apache-2.0" ]
39
2015-06-10T23:18:07.000Z
2021-10-21T04:29:06.000Z
help/models.py
asysc2020/contentbox
5c155976e0ce7ea308d62293ab89624d97b21d09
[ "Apache-2.0" ]
2
2016-08-22T12:38:10.000Z
2017-01-26T18:37:33.000Z
help/models.py
asysc2020/contentbox
5c155976e0ce7ea308d62293ab89624d97b21d09
[ "Apache-2.0" ]
26
2015-06-10T22:09:15.000Z
2021-06-27T15:45:15.000Z
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
31.384615
75
0.694444
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
75
458
48
c59c3389e9bb4d6d596e4c774369b19e98ff09b6
186
py
Python
a.py
danhab05/bacfrancais-ozar
8171ef704ad08bfdf2dda3907772685ee52216b2
[ "MIT" ]
null
null
null
a.py
danhab05/bacfrancais-ozar
8171ef704ad08bfdf2dda3907772685ee52216b2
[ "MIT" ]
null
null
null
a.py
danhab05/bacfrancais-ozar
8171ef704ad08bfdf2dda3907772685ee52216b2
[ "MIT" ]
null
null
null
import requests try: response = requests.get("https://raw.githubusercontent.com/danhab05/bacfrancais-ozar/master/msg.txt") msg = response.text except Exception as e: print(e)
31
105
0.741935
import requests try: response = requests.get("https://raw.githubusercontent.com/danhab05/bacfrancais-ozar/master/msg.txt") msg = response.text except Exception as e: print(e)
0
0
0
efa8c969897ba2d982f69a1d4bb36808523885d0
91
py
Python
main.py
pumassv1/FlappyBird
be82593435ea8c286816d90fe97b1b29b34ba77d
[ "MIT" ]
null
null
null
main.py
pumassv1/FlappyBird
be82593435ea8c286816d90fe97b1b29b34ba77d
[ "MIT" ]
null
null
null
main.py
pumassv1/FlappyBird
be82593435ea8c286816d90fe97b1b29b34ba77d
[ "MIT" ]
null
null
null
import GameManager if __name__ == '__main__': GameManager.GameManager().game_loop()
13
41
0.725275
import GameManager if __name__ == '__main__': GameManager.GameManager().game_loop()
0
0
0
eecb10576d383f516c4ce8715613c277c4fe0f38
45
py
Python
Trakttv.bundle/Contents/Libraries/Shared/plex_metadata/agents/__init__.py
disrupted/Trakttv.bundle
24712216c71f3b22fd58cb5dd89dad5bb798ed60
[ "RSA-MD" ]
1,346
2015-01-01T14:52:24.000Z
2022-03-28T12:50:48.000Z
Trakttv.bundle/Contents/Libraries/Shared/plex_metadata/agents/__init__.py
alcroito/Plex-Trakt-Scrobbler
4f83fb0860dcb91f860d7c11bc7df568913c82a6
[ "RSA-MD" ]
474
2015-01-01T10:27:46.000Z
2022-03-21T12:26:16.000Z
Trakttv.bundle/Contents/Libraries/Shared/plex_metadata/agents/__init__.py
alcroito/Plex-Trakt-Scrobbler
4f83fb0860dcb91f860d7c11bc7df568913c82a6
[ "RSA-MD" ]
191
2015-01-02T18:27:22.000Z
2022-03-29T10:49:48.000Z
from plex_metadata.agents.main import Agents
22.5
44
0.866667
from plex_metadata.agents.main import Agents
0
0
0
f0f92c20e0e010fd6a9aaa13e50a6539ca32d80b
36
py
Python
testing/conftest.py
cdunklau/pytest-twisted
9662dc74c9eb4c811238341c8beb67147fd7d6bb
[ "BSD-3-Clause" ]
null
null
null
testing/conftest.py
cdunklau/pytest-twisted
9662dc74c9eb4c811238341c8beb67147fd7d6bb
[ "BSD-3-Clause" ]
null
null
null
testing/conftest.py
cdunklau/pytest-twisted
9662dc74c9eb4c811238341c8beb67147fd7d6bb
[ "BSD-3-Clause" ]
null
null
null
pytest_plugins = "_pytest.pytester"
18
35
0.805556
pytest_plugins = "_pytest.pytester"
0
0
0
22205fde61740520af75862d5eb2109b026f85da
822
py
Python
tool/pretty_print.py
MageWeiG/karonte
2ffe649557adccdd3c2c77c0ae0a5f27a385fdcb
[ "BSD-2-Clause" ]
1
2021-04-15T12:00:56.000Z
2021-04-15T12:00:56.000Z
tool/pretty_print.py
cascades-sjtu/karonte
2ffe649557adccdd3c2c77c0ae0a5f27a385fdcb
[ "BSD-2-Clause" ]
null
null
null
tool/pretty_print.py
cascades-sjtu/karonte
2ffe649557adccdd3c2c77c0ae0a5f27a385fdcb
[ "BSD-2-Clause" ]
1
2021-06-09T07:37:59.000Z
2021-06-09T07:37:59.000Z
import subprocess as sp import sys try: res_path = sys.argv[1] except: print "Usage: {} karonte_result_file".format(sys.argv[0]) sys.exit(1) o, e = exec_cmd("grep -r 'Sink' {} | sort | cut -d\" \" -f1-5 |sort|uniq ".format(res_path)) counter = 1 alerts = [x for x in o.split('\n') if x] for alert in ale...
28.344828
92
0.508516
import subprocess as sp import sys def exec_cmd(cmd): p = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.PIPE, stdin=sp.PIPE, shell=True) return p.communicate() try: res_path = sys.argv[1] except: print "Usage: {} karonte_result_file".format(sys.argv[0]) sys.exit(1) o...
139
0
23
aa8b58965f14c21450f4461dd381678cbd10e333
292
py
Python
accredible_certificate/urls.py
gymnasium/accredible
6af763d0ed6342b60063156252630a3517ccf9c9
[ "MIT" ]
null
null
null
accredible_certificate/urls.py
gymnasium/accredible
6af763d0ed6342b60063156252630a3517ccf9c9
[ "MIT" ]
1
2021-07-14T09:41:40.000Z
2021-09-09T08:38:30.000Z
accredible_certificate/urls.py
gymnasium/accredible
6af763d0ed6342b60063156252630a3517ccf9c9
[ "MIT" ]
2
2021-04-27T18:54:58.000Z
2021-04-27T18:56:10.000Z
from django.conf.urls import url from views import request_certificate from views import update_certificate urlpatterns = [ url(r'^request_certificate$', request_certificate, name='request_certificate'), url(r'^update_certificate$', update_certificate, name='update_certificate') ]
29.2
83
0.794521
from django.conf.urls import url from views import request_certificate from views import update_certificate urlpatterns = [ url(r'^request_certificate$', request_certificate, name='request_certificate'), url(r'^update_certificate$', update_certificate, name='update_certificate') ]
0
0
0
f92aa2b10021aa616f6c7921d8ffd714203aff4c
2,914
py
Python
workspace/lstm.py
kingaza/keras-gp
0b62224d2fd727143c70385a0a5b40bdc09c5bd8
[ "MIT" ]
null
null
null
workspace/lstm.py
kingaza/keras-gp
0b62224d2fd727143c70385a0a5b40bdc09c5bd8
[ "MIT" ]
null
null
null
workspace/lstm.py
kingaza/keras-gp
0b62224d2fd727143c70385a0a5b40bdc09c5bd8
[ "MIT" ]
null
null
null
""" LSTM regression on Actuator data. """ from __future__ import print_function import numpy as np np.random.seed(42) # Keras from keras.optimizers import Adagrad, Adam, SGD, RMSprop from keras.callbacks import EarlyStopping # Model assembling and executing from kgp.utils.assemble import load_NN_configs, assemble fr...
26.490909
78
0.630405
""" LSTM regression on Actuator data. """ from __future__ import print_function import numpy as np np.random.seed(42) # Keras from keras.optimizers import Adagrad, Adam, SGD, RMSprop from keras.callbacks import EarlyStopping # Model assembling and executing from kgp.utils.assemble import load_NN_configs, assemble fr...
2,379
0
69
4added1dcf5282a6a76f81b50fe069ac71b6ba40
396
py
Python
scripts/deploy_rinkeby.py
taronsung/registry
2271af2cb5d4ed2fdeeb9f5e1958895437129f60
[ "MIT" ]
9
2021-12-15T18:17:32.000Z
2022-03-05T03:01:41.000Z
scripts/deploy_rinkeby.py
taronsung/registry
2271af2cb5d4ed2fdeeb9f5e1958895437129f60
[ "MIT" ]
null
null
null
scripts/deploy_rinkeby.py
taronsung/registry
2271af2cb5d4ed2fdeeb9f5e1958895437129f60
[ "MIT" ]
9
2021-09-26T13:35:28.000Z
2022-03-22T03:49:50.000Z
from brownie import ( Registry, accounts, ) RINKEBY_RESOLVER_ADDRESS = "0x5713a9cCdB31fBa207Fc4Fac7ee398eab3ecB3A6"
17.217391
71
0.646465
from brownie import ( Registry, accounts, ) RINKEBY_RESOLVER_ADDRESS = "0x5713a9cCdB31fBa207Fc4Fac7ee398eab3ecB3A6" def main(): a = accounts.load("renft-test-1") beneficiary, admin = a, a from_a = {"from": a} registry = Registry.deploy( RINKEBY_RESOLVER_ADDRESS, beneficiary,...
248
0
23
3a9219b0c39486bea2f7a119107987d88d463d77
7,570
py
Python
ringity/tests/test_ring_score_flavours.py
ClusterDuck123/ringity
44505d192b72a1d47f6b7b0a90f0db83d98b6156
[ "MIT" ]
null
null
null
ringity/tests/test_ring_score_flavours.py
ClusterDuck123/ringity
44505d192b72a1d47f6b7b0a90f0db83d98b6156
[ "MIT" ]
null
null
null
ringity/tests/test_ring_score_flavours.py
ClusterDuck123/ringity
44505d192b72a1d47f6b7b0a90f0db83d98b6156
[ "MIT" ]
null
null
null
import inspect import unittest import numpy as np from ringity.ring_scores import ( gap_ring_score, geometric_ring_score, linear_ring_score, amplitude_ring_score, entropy_ring_sco...
41.36612
87
0.570542
import inspect import unittest import numpy as np from ringity.ring_scores import ( gap_ring_score, geometric_ring_score, linear_ring_score, amplitude_ring_score, entropy_ring_sco...
6,473
46
391
a766d4b53b3f09d8e3c9a8580a681b0f972d74e1
19,914
py
Python
cleanup_manager.py
univ-of-utah-marriott-library-apple/trashman
dbe079d2b6d960727aa9f0c2e49fecb3f7fff7d0
[ "MIT" ]
26
2015-03-09T20:48:03.000Z
2020-07-10T16:57:11.000Z
cleanup_manager.py
univ-of-utah-marriott-library-apple/trashman
dbe079d2b6d960727aa9f0c2e49fecb3f7fff7d0
[ "MIT" ]
8
2015-02-27T01:03:55.000Z
2015-05-27T22:01:42.000Z
cleanup_manager.py
univ-of-utah-marriott-library-apple/trashman
dbe079d2b6d960727aa9f0c2e49fecb3f7fff7d0
[ "MIT" ]
2
2016-01-05T17:11:09.000Z
2020-07-10T16:57:12.000Z
#!/usr/bin/env python import cleanup_management import argparse import datetime import os import re import sys import time try: from management_tools import loggers from management_tools import fs_analysis as fsa # Check for MT version 1.8.1 if not "bytes" in dir(fsa.Filesystem): raise Impor...
37.931429
259
0.634227
#!/usr/bin/env python import cleanup_management import argparse import datetime import os import re import sys import time try: from management_tools import loggers from management_tools import fs_analysis as fsa # Check for MT version 1.8.1 if not "bytes" in dir(fsa.Filesystem): raise Impor...
2,832
0
23
7c070276fab5338ad41e70f47fe89aa56cc475ae
14,302
py
Python
datablend/core/widgets/tidy.py
bahp/datablend
f0b69a012af6ea7cedc9210d46b3047d8e0bf504
[ "FTL", "RSA-MD", "CECILL-B" ]
null
null
null
datablend/core/widgets/tidy.py
bahp/datablend
f0b69a012af6ea7cedc9210d46b3047d8e0bf504
[ "FTL", "RSA-MD", "CECILL-B" ]
1
2021-05-26T13:09:08.000Z
2021-05-26T13:09:08.000Z
datablend/core/widgets/tidy.py
bahp/datablend
f0b69a012af6ea7cedc9210d46b3047d8e0bf504
[ "FTL", "RSA-MD", "CECILL-B" ]
null
null
null
# Libraries import copy import numpy as np import pandas as pd # DataBlend Library from datablend.core.widgets.base import BaseWidget from datablend.core.consistency import report_unique_value from datablend.utils.pandas import str2func # -------------------------------------------- # Methods # ----------------------...
27.933594
87
0.539155
# Libraries import copy import numpy as np import pandas as pd # DataBlend Library from datablend.core.widgets.base import BaseWidget from datablend.core.consistency import report_unique_value from datablend.utils.pandas import str2func # -------------------------------------------- # Methods # ----------------------...
0
0
0
abcb88cbe5d73105b047caca971e4db3714f84d2
3,193
py
Python
rodolphe/utils/templatetags/markup.py
entwanne/Rodolphe
6187ef2af0033eb2de22268930d4cb72df73ff1d
[ "BSD-2-Clause" ]
3
2015-01-28T08:40:54.000Z
2015-02-18T15:35:31.000Z
rodolphe/utils/templatetags/markup.py
entwanne/Rodolphe
6187ef2af0033eb2de22268930d4cb72df73ff1d
[ "BSD-2-Clause" ]
5
2015-01-27T19:18:03.000Z
2015-02-02T13:52:10.000Z
rodolphe/utils/templatetags/markup.py
entwanne/Rodolphe
6187ef2af0033eb2de22268930d4cb72df73ff1d
[ "BSD-2-Clause" ]
null
null
null
from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from main.models import Post from utils.templatetags.post_color import post_color import markdown register = template.Library() disable_image...
35.477778
80
0.625431
from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from main.models import Post from utils.templatetags.post_color import post_color import markdown register = template.Library() class Disabl...
1,993
390
290
84327810ccdee89f192c4303c42f9b18872d2775
1,365
py
Python
android/android_9/frameworks/rs/tests/lldb/tests/testcases/test_language.py
yakuizhao/intel-vaapi-driver
b2bb0383352694941826543a171b557efac2219b
[ "MIT" ]
null
null
null
android/android_9/frameworks/rs/tests/lldb/tests/testcases/test_language.py
yakuizhao/intel-vaapi-driver
b2bb0383352694941826543a171b557efac2219b
[ "MIT" ]
null
null
null
android/android_9/frameworks/rs/tests/lldb/tests/testcases/test_language.py
yakuizhao/intel-vaapi-driver
b2bb0383352694941826543a171b557efac2219b
[ "MIT" ]
null
null
null
# Copyright (C) 2016 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
34.125
74
0.637363
# Copyright (C) 2016 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
455
0
27
a422741767c6974b9cf6a2e8c40f43ffef9452f5
65
py
Python
detector/models/__init__.py
insightcs/CenterNet
277ab04321285023ce4f0f2e7d81ef52252d4019
[ "MIT" ]
null
null
null
detector/models/__init__.py
insightcs/CenterNet
277ab04321285023ce4f0f2e7d81ef52252d4019
[ "MIT" ]
null
null
null
detector/models/__init__.py
insightcs/CenterNet
277ab04321285023ce4f0f2e7d81ef52252d4019
[ "MIT" ]
1
2019-08-15T02:28:32.000Z
2019-08-15T02:28:32.000Z
# coding: utf-8 # @Author: oliver # @Date: 2019-07-14 18:50:35
16.25
30
0.615385
# coding: utf-8 # @Author: oliver # @Date: 2019-07-14 18:50:35
0
0
0
821c1cb024ace41399ce88b1b14b051eef02c0b9
968
py
Python
tests/test_cmakeutil.py
python-cmaketools/python-cmaketools
c7988584ff3ee0a873a8cbb03997a80f16efc93b
[ "MIT" ]
19
2020-06-29T19:25:31.000Z
2022-03-27T13:48:15.000Z
tests/test_cmakeutil.py
python-cmaketools/python-cmaketools
c7988584ff3ee0a873a8cbb03997a80f16efc93b
[ "MIT" ]
2
2020-08-11T02:03:57.000Z
2020-11-26T16:05:49.000Z
tests/test_cmakeutil.py
python-cmaketools/python-cmaketools
c7988584ff3ee0a873a8cbb03997a80f16efc93b
[ "MIT" ]
1
2021-07-28T04:45:54.000Z
2021-07-28T04:45:54.000Z
import pytest import cmakeutils # findexe(cmd) # run(*args, path=findexe("cmake"), **runargs) # validate(cmakePath=findexe("cmake")) # configured(buildDir) # clear(buildDir) # configure( # root_dir, # build_dir, # *args, # build_type="Release", # cmakePath=findexe("cmake"), # need_msvc=False, #...
22.511628
78
0.643595
import pytest import cmakeutils def test_hello(): hello.say_hello() # findexe(cmd) # run(*args, path=findexe("cmake"), **runargs) # validate(cmakePath=findexe("cmake")) # configured(buildDir) # clear(buildDir) # configure( # root_dir, # build_dir, # *args, # build_type="Release", # cmakePath=f...
18
0
23
1e5200e1c4f80d9919e68f8b767d93b22a65ef04
9,682
py
Python
sourcecode/final.py
18101224/final
5b5351db843a7fbe3bcf56ea26cf5c78c2067840
[ "MIT" ]
null
null
null
sourcecode/final.py
18101224/final
5b5351db843a7fbe3bcf56ea26cf5c78c2067840
[ "MIT" ]
null
null
null
sourcecode/final.py
18101224/final
5b5351db843a7fbe3bcf56ea26cf5c78c2067840
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import pandas as pd import statsmodels.formula.api as smf from scipy import stats pcr=np.array(data('pcr.txt'))#pcr 날짜 전체확진자 국내발생 해외유입 사망자 vaccine=np.array(data('vaccine.txt'))#vaccine 날짜 전체1차 전체2차 전체3차 AZ1 AZ2 F1 F2 Y1 M1 M2 F3 M3 Y3 lmp='local maximum point' #전체 확진자 ...
45.242991
125
0.524375
import numpy as np import matplotlib.pyplot as plt import pandas as pd import statsmodels.formula.api as smf from scipy import stats def data(filename): f= open(filename,'r') data=[] i=1 for line in f.readlines(): newline=line.split() newline[0]=i #날짜는 그냥 경과일로 i+=1 for in...
1,244
0
110
c512aa92c383df3f1dcf5bb0e62ce0d0f68db5be
4,345
py
Python
tests/testPandas.py
paszkow/AMICI
a0407673453d6e18a9abec5b6f73758dd09f7aaf
[ "BSD-3-Clause" ]
null
null
null
tests/testPandas.py
paszkow/AMICI
a0407673453d6e18a9abec5b6f73758dd09f7aaf
[ "BSD-3-Clause" ]
null
null
null
tests/testPandas.py
paszkow/AMICI
a0407673453d6e18a9abec5b6f73758dd09f7aaf
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 """Tests for ``amici.pandas``""" import sys import amici import unittest import os import copy import numpy as np import itertools class TestAmiciPandasImportExport(unittest.TestCase): """ TestCase class for testing csv import using pandas """ if __name__ == '__main__': suit...
33.945313
80
0.502186
#!/usr/bin/env python3 """Tests for ``amici.pandas``""" import sys import amici import unittest import os import copy import numpy as np import itertools class TestAmiciPandasImportExport(unittest.TestCase): """ TestCase class for testing csv import using pandas """ def setUp(self): self.de...
3,823
0
108
0ac753e49f2cb4a101e3401e052d2ae468ef4b7e
15,675
py
Python
tg_bot/modules/blacklist2.py
shubhanshdj/AlexaRobot
8a94c1f81df10efa7e5208572154794a097117ea
[ "MIT" ]
1
2020-11-30T10:14:15.000Z
2020-11-30T10:14:15.000Z
tg_bot/modules/blacklist2.py
pro-boy/AlexaRobot
8a94c1f81df10efa7e5208572154794a097117ea
[ "MIT" ]
null
null
null
tg_bot/modules/blacklist2.py
pro-boy/AlexaRobot
8a94c1f81df10efa7e5208572154794a097117ea
[ "MIT" ]
2
2020-12-03T05:45:52.000Z
2021-12-24T13:33:42.000Z
import html from typing import Optional, List import telegram.ext as tg from telegram import Message, Chat, Update, Bot, ParseMode, User, MessageEntity from telegram import TelegramError from telegram.error import BadRequest from telegram.ext import CommandHandler, MessageHandler, Filters from telegram.ext.dispatcher ...
40.926893
186
0.726699
import html from typing import Optional, List import telegram.ext as tg from telegram import Message, Chat, Update, Bot, ParseMode, User, MessageEntity from telegram import TelegramError from telegram.error import BadRequest from telegram.ext import CommandHandler, MessageHandler, Filters from telegram.ext.dispatcher ...
12,764
0
202
e5417681d7dbdb45c5a95e4b7a45735e6c816470
2,081
py
Python
src/rogerthat/models/forms.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/rogerthat/models/forms.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/rogerthat/models/forms.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
33.031746
99
0.731379
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
418
834
69
4202c94c4a49de158b5aeecaceedfb58fe27e261
2,796
py
Python
examples/FastAPI/fastapi_with_authentication_example_app.py
y-tree-limited/pyctuator
70ebdebf263c727fa8245cc706c451ffa54468e8
[ "Apache-2.0" ]
118
2020-04-26T14:32:57.000Z
2022-03-28T08:46:32.000Z
examples/FastAPI/fastapi_with_authentication_example_app.py
y-tree-limited/pyctuator
70ebdebf263c727fa8245cc706c451ffa54468e8
[ "Apache-2.0" ]
63
2020-04-29T03:38:40.000Z
2021-12-29T21:54:52.000Z
examples/FastAPI/fastapi_with_authentication_example_app.py
y-tree-limited/pyctuator
70ebdebf263c727fa8245cc706c451ffa54468e8
[ "Apache-2.0" ]
10
2020-04-28T10:00:25.000Z
2021-11-17T16:32:00.000Z
import datetime import logging import random import secrets from fastapi import FastAPI, Depends, APIRouter, HTTPException from fastapi.security import HTTPBasicCredentials, HTTPBasic from starlette import status from uvicorn import Server from uvicorn.config import Config from pyctuator.pyctuator import Pyctuator m...
31.772727
117
0.723176
import datetime import logging import random import secrets from fastapi import FastAPI, Depends, APIRouter, HTTPException from fastapi.security import HTTPBasicCredentials, HTTPBasic from starlette import status from uvicorn import Server from uvicorn.config import Config from pyctuator.pyctuator import Pyctuator m...
846
309
68
0f3bde7a5f16b1078aca2269753ccd57a1af5b08
3,978
py
Python
d2l-en/d2l/data/base.py
mru4913/Object-Detection-in-Python
bcd16ac602f011292bd1d5540ef3833cd3fd7c72
[ "MIT" ]
null
null
null
d2l-en/d2l/data/base.py
mru4913/Object-Detection-in-Python
bcd16ac602f011292bd1d5540ef3833cd3fd7c72
[ "MIT" ]
null
null
null
d2l-en/d2l/data/base.py
mru4913/Object-Detection-in-Python
bcd16ac602f011292bd1d5540ef3833cd3fd7c72
[ "MIT" ]
null
null
null
import os import random import numpy as np import zipfile import collections from mxnet import nd, gluon from mxnet.gluon import utils as gutils, data as gdata def data_iter_consecutive(corpus_indices, batch_size, num_steps, ctx=None): """Sample mini-batches in a consecutive order from sequential data.""" # O...
41.010309
78
0.655103
import os import random import numpy as np import zipfile import collections from mxnet import nd, gluon from mxnet.gluon import utils as gutils, data as gdata def data_iter_consecutive(corpus_indices, batch_size, num_steps, ctx=None): """Sample mini-batches in a consecutive order from sequential data.""" # O...
1,268
-1
156
7e07daafd8a6a7a05ed4dc0e050f30d6cb88cba4
7,592
py
Python
cadence/parsers/txtparsing.py
quadrismegistus/cadence
580c98d7030a18f093ffc8040e241210c7ffec3c
[ "MIT" ]
12
2021-03-29T17:41:26.000Z
2022-02-03T07:30:05.000Z
cadence/parsers/txtparsing.py
quadrismegistus/cadence
580c98d7030a18f093ffc8040e241210c7ffec3c
[ "MIT" ]
1
2021-03-30T11:12:44.000Z
2021-03-30T14:56:50.000Z
cadence/parsers/txtparsing.py
quadrismegistus/cadence
580c98d7030a18f093ffc8040e241210c7ffec3c
[ "MIT" ]
3
2021-03-29T18:52:27.000Z
2022-01-15T06:50:21.000Z
from ..imports import * # loading txt/strings # def to_lineparts(linetxt,seps=set(',:;–—()[].!?'),min_len=1,max_len=25): # o=[] # for sent in to_sents_str(linetxt): # toks=tokenize_agnostic(sent) # ophrase=[] # for tok in toks: # ophrase+=[tok] # #...
28.223048
104
0.585485
from ..imports import * # loading txt/strings def to_txt(txt_or_fn): # load txt if not txt_or_fn: return if os.path.exists(txt_or_fn): with open(txt_or_fn,encoding='utf-8',errors='replace') as f: txt=f.read() else: txt=txt_or_fn # clean? txt=txt.replace(...
5,764
0
308
2d911aa0e859a155d922fad698df5359ad99763e
3,681
py
Python
assignment_1/code/mlp_numpy.py
askliar/deep_learning
e61b2391a3258d18719bf12d9ed1404620ce6c02
[ "MIT" ]
null
null
null
assignment_1/code/mlp_numpy.py
askliar/deep_learning
e61b2391a3258d18719bf12d9ed1404620ce6c02
[ "MIT" ]
null
null
null
assignment_1/code/mlp_numpy.py
askliar/deep_learning
e61b2391a3258d18719bf12d9ed1404620ce6c02
[ "MIT" ]
2
2019-03-31T15:03:00.000Z
2020-11-14T10:56:31.000Z
""" This module implements a multi-layer perceptron (MLP) in NumPy. You should fill in code into indicated sections. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from modules import * from functools import reduce class MLP(object): """ This clas...
31.194915
106
0.589785
""" This module implements a multi-layer perceptron (MLP) in NumPy. You should fill in code into indicated sections. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from modules import * from functools import reduce class MLP(object): """ This clas...
0
0
0
4086f4df4d959477f15d23965e2994ef06840139
702
py
Python
project/Fast/django/auth/password.py
fael07/DRF-Project
f65b4177e56e7209d2369ba9d6d81bfe00321052
[ "MIT" ]
null
null
null
project/Fast/django/auth/password.py
fael07/DRF-Project
f65b4177e56e7209d2369ba9d6d81bfe00321052
[ "MIT" ]
null
null
null
project/Fast/django/auth/password.py
fael07/DRF-Project
f65b4177e56e7209d2369ba9d6d81bfe00321052
[ "MIT" ]
null
null
null
from django.contrib import auth from backend.accounts import User
30.521739
96
0.722222
from django.contrib import auth from backend.accounts import User def check_password(request, current_password: str, field_error: str): user = auth.authenticate(request, username=request.user.username, password=current_password) if user is not None: return {'status': 'valid', 'errors': {}} else: ...
564
0
69
d143fc27b9190e03cf527fd6bd1f70e0e680e691
520
py
Python
wodoo/wait/tcp.py
mt-software-de/wodoo
251d33b4bde69c6f7a0f4b4b83933f59c276b861
[ "MIT" ]
1
2022-01-17T13:09:52.000Z
2022-01-17T13:09:52.000Z
wodoo/wait/tcp.py
mt-software-de/wodoo
251d33b4bde69c6f7a0f4b4b83933f59c276b861
[ "MIT" ]
1
2022-03-29T07:55:35.000Z
2022-03-29T07:55:35.000Z
wodoo/wait/tcp.py
mt-software-de/wodoo
251d33b4bde69c6f7a0f4b4b83933f59c276b861
[ "MIT" ]
2
2022-01-27T15:27:54.000Z
2022-02-25T10:08:07.000Z
#!/usr/bin/env python import socket from .decorator import timeout @timeout @timeout # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
18.571429
59
0.642308
#!/usr/bin/env python import socket from .decorator import timeout @timeout def closed(port, host='localhost', timeout=300): try: s = socket.create_connection((host, port), timeout) s.close() except socket.error: return True @timeout def open(port, host='localhost', timeout=300): ...
329
0
44
01b51c4da25c877ec4d36b1334c1a8568a1ae211
1,282
py
Python
ocr/extract_pdf.py
mxbi/zoomintobooks
7b46020e67005a50abed8a50b62a65409e707ad1
[ "CC0-1.0" ]
3
2021-07-22T10:45:42.000Z
2021-11-04T07:21:17.000Z
ocr/extract_pdf.py
mxbi/zoomintobooks
7b46020e67005a50abed8a50b62a65409e707ad1
[ "CC0-1.0" ]
null
null
null
ocr/extract_pdf.py
mxbi/zoomintobooks
7b46020e67005a50abed8a50b62a65409e707ad1
[ "CC0-1.0" ]
null
null
null
from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from pdfminer.pdfdocument import PDFDocument from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.pdfpage import PDFPage from pdfminer.pdfparser import PDFParser from io import StringIO import sys ...
27.276596
85
0.680187
from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from pdfminer.pdfdocument import PDFDocument from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.pdfpage import PDFPage from pdfminer.pdfparser import PDFParser from io import StringIO import sys ...
0
0
0
120c9556aef60cedb0a66ff92b148942acafadb3
2,665
py
Python
curate_export/test_clean_up_standard_json.py
ndlib/mellon-manifest-pipeline
aa90494e73fbc30ce701771ac653d28d533217db
[ "Apache-2.0" ]
1
2021-06-27T15:16:13.000Z
2021-06-27T15:16:13.000Z
curate_export/test_clean_up_standard_json.py
ndlib/marble-manifest-pipeline
abc036e4c81a8a5e938373a43153e2492a17cbf8
[ "Apache-2.0" ]
8
2019-11-05T18:58:23.000Z
2021-09-03T14:54:42.000Z
curate_export/test_clean_up_standard_json.py
ndlib/mellon-manifest-pipeline
aa90494e73fbc30ce701771ac653d28d533217db
[ "Apache-2.0" ]
null
null
null
# test_clean_up_standard_json.py """ test clean_up_standard_json """ import _set_path # noqa import unittest # import json import os from pathlib import Path from clean_up_standard_json import _fix_level, _fix_ids from pipelineutilities.pipeline_config import setup_pipeline_config # noqa: E402 local_folder = os.pat...
36.506849
99
0.510319
# test_clean_up_standard_json.py """ test clean_up_standard_json """ import _set_path # noqa import unittest # import json import os from pathlib import Path from clean_up_standard_json import _fix_level, _fix_ids from pipelineutilities.pipeline_config import setup_pipeline_config # noqa: E402 local_folder = os.pat...
1,985
0
80
583b3ad7c8f10aad50bf022f40068e9e6bae9f76
455
py
Python
backend/posts/serializers.py
dokenzy/singlecolumn
5001a8a870775fb1c2ee5dcf7f92ee04208a696a
[ "MIT" ]
1
2017-07-03T20:43:52.000Z
2017-07-03T20:43:52.000Z
backend/posts/serializers.py
dokenzy/singlecolumn
5001a8a870775fb1c2ee5dcf7f92ee04208a696a
[ "MIT" ]
null
null
null
backend/posts/serializers.py
dokenzy/singlecolumn
5001a8a870775fb1c2ee5dcf7f92ee04208a696a
[ "MIT" ]
null
null
null
from rest_framework.serializers import ( ModelSerializer, SerializerMethodField, ) from .models import Post
18.2
40
0.540659
from rest_framework.serializers import ( ModelSerializer, SerializerMethodField, ) from .models import Post class PostSerializer(ModelSerializer): user = SerializerMethodField() class Meta: model = Post() fields = ( 'id', 'title', 'content', ...
32
282
23
1e5bebdfab63defc55dc1d60d88d7e212e7e3929
1,266
py
Python
tests/test_scene_rendering/test_opengl_renderer.py
Timmmm/manim
d9958b36a199fa13389430dab971988af4488d63
[ "MIT" ]
5
2019-02-22T14:10:08.000Z
2022-03-13T01:03:49.000Z
tests/test_scene_rendering/test_opengl_renderer.py
Timmmm/manim
d9958b36a199fa13389430dab971988af4488d63
[ "MIT" ]
17
2021-04-10T13:47:17.000Z
2021-05-17T21:25:30.000Z
tests/test_scene_rendering/test_opengl_renderer.py
Timmmm/manim
d9958b36a199fa13389430dab971988af4488d63
[ "MIT" ]
1
2019-03-22T14:33:25.000Z
2019-03-22T14:33:25.000Z
import pytest from manim.renderer.opengl_renderer import OpenGLRenderer from .simple_scenes import * @pytest.mark.parametrize("enable_preview", [False]) def testGetFrameWithPreviewDisabled(use_opengl_renderer): """Get frame is able to fetch frame with the correct dimensions when preview is disabled""" scene...
32.461538
95
0.746445
import pytest from manim.renderer.opengl_renderer import OpenGLRenderer from .simple_scenes import * @pytest.mark.parametrize("enable_preview", [False]) def testGetFrameWithPreviewDisabled(use_opengl_renderer): """Get frame is able to fetch frame with the correct dimensions when preview is disabled""" scene...
0
0
0
48052446b3a90685e9fccf777a5da9bfcd043995
187
py
Python
ABC/141/b.py
fumiyanll23/AtCoder
362ca9fcacb5415c1458bc8dee5326ba2cc70b65
[ "MIT" ]
null
null
null
ABC/141/b.py
fumiyanll23/AtCoder
362ca9fcacb5415c1458bc8dee5326ba2cc70b65
[ "MIT" ]
null
null
null
ABC/141/b.py
fumiyanll23/AtCoder
362ca9fcacb5415c1458bc8dee5326ba2cc70b65
[ "MIT" ]
null
null
null
S = str(input()) flag = True for i in range(len(S)): if i%2==0 and S[i]=="L": flag = False elif i%2!=0 and S[i]=="R": flag = False if flag: print("Yes") else: print("No")
15.583333
28
0.529412
S = str(input()) flag = True for i in range(len(S)): if i%2==0 and S[i]=="L": flag = False elif i%2!=0 and S[i]=="R": flag = False if flag: print("Yes") else: print("No")
0
0
0
4dd7bd9ef39a8e822b82d7d40959db6130910af9
221
py
Python
desafios-py/intermediario/d0000-palindromo/d0000-palindromo-v0.py
Lsitjs/challenges-python
fbbfa4d7860ee8efa4d0d3eee4999ea379933224
[ "MIT" ]
null
null
null
desafios-py/intermediario/d0000-palindromo/d0000-palindromo-v0.py
Lsitjs/challenges-python
fbbfa4d7860ee8efa4d0d3eee4999ea379933224
[ "MIT" ]
null
null
null
desafios-py/intermediario/d0000-palindromo/d0000-palindromo-v0.py
Lsitjs/challenges-python
fbbfa4d7860ee8efa4d0d3eee4999ea379933224
[ "MIT" ]
null
null
null
palavra=input("Digite uma palavra: ") x=0 y=len(palavra)-1 while x != len(palavra): if palavra[x]==palavra[y]: resp='É palíndromo' else: resp='Não é palíndromo' y=y-1 x=x+1 print(resp)
13.8125
37
0.579186
palavra=input("Digite uma palavra: ") x=0 y=len(palavra)-1 while x != len(palavra): if palavra[x]==palavra[y]: resp='É palíndromo' else: resp='Não é palíndromo' y=y-1 x=x+1 print(resp)
0
0
0
3f994d86886b7880cf60c124336fdc74b1a7d4f4
2,675
py
Python
getgauge/executor.py
surevs/gauge-python
2d91295c59d8cbbd3aec221cc1349805fbc01697
[ "MIT" ]
null
null
null
getgauge/executor.py
surevs/gauge-python
2d91295c59d8cbbd3aec221cc1349805fbc01697
[ "MIT" ]
null
null
null
getgauge/executor.py
surevs/gauge-python
2d91295c59d8cbbd3aec221cc1349805fbc01697
[ "MIT" ]
null
null
null
import inspect import os import sys import time import traceback from getgauge.messages.messages_pb2 import Message from getgauge.messages.spec_pb2 import ProtoExecutionResult from getgauge.registry import registry, MessagesStore, ScreenshotsStore
41.153846
111
0.785794
import inspect import os import sys import time import traceback from getgauge.messages.messages_pb2 import Message from getgauge.messages.spec_pb2 import ProtoExecutionResult from getgauge.registry import registry, MessagesStore, ScreenshotsStore def set_response_values(request, response): response.messageType ...
2,258
0
161
f74700b56454b7123c1ce8e494c30c4b8aec9669
645
py
Python
tests/unit/more/debian/database/test_redis.py
timgates42/provy
ca3d5e96a2210daf3c1fd4b96e047efff152db14
[ "MIT" ]
15
2015-01-28T15:49:28.000Z
2021-09-02T18:49:46.000Z
tests/unit/more/debian/database/test_redis.py
timgates42/provy
ca3d5e96a2210daf3c1fd4b96e047efff152db14
[ "MIT" ]
null
null
null
tests/unit/more/debian/database/test_redis.py
timgates42/provy
ca3d5e96a2210daf3c1fd4b96e047efff152db14
[ "MIT" ]
3
2016-12-05T07:08:11.000Z
2021-12-26T04:31:05.000Z
from mock import call from nose.tools import istest from provy.more.debian import AptitudeRole, RedisRole from tests.unit.tools.helpers import ProvyTestCase
33.947368
89
0.725581
from mock import call from nose.tools import istest from provy.more.debian import AptitudeRole, RedisRole from tests.unit.tools.helpers import ProvyTestCase class RedisRoleTest(ProvyTestCase): def setUp(self): super(RedisRoleTest, self).setUp() self.role = RedisRole(prov=None, context={}) @i...
384
79
23
a1878cab6338abebe5e936ce8d4def614323fae8
2,416
py
Python
src/create_outputs.py
Lakoc/bachelor_thesis
685a81901ac19a318237772f24df1b1e94772b26
[ "MIT" ]
null
null
null
src/create_outputs.py
Lakoc/bachelor_thesis
685a81901ac19a318237772f24df1b1e94772b26
[ "MIT" ]
null
null
null
src/create_outputs.py
Lakoc/bachelor_thesis
685a81901ac19a318237772f24df1b1e94772b26
[ "MIT" ]
null
null
null
from argparse import ArgumentParser from os import listdir from os.path import isfile, join from shutil import copyfile from progress.bar import Bar from io_operations.load_files import load_stats_overall, load_texts, load_stats from outputs.create_html_output import create_output from helpers.dir_exist import create_i...
43.927273
136
0.670116
from argparse import ArgumentParser from os import listdir from os.path import isfile, join from shutil import copyfile from progress.bar import Bar from io_operations.load_files import load_stats_overall, load_texts, load_stats from outputs.create_html_output import create_output from helpers.dir_exist import create_i...
0
0
0
f3d3b25cf01beea5cdce98910551ed49ca2af088
1,038
py
Python
plot.py
L-Limbu/Solar-system
e3a49982aac6d3d09e7c7dad3cfc2520ba3d93e9
[ "MIT" ]
null
null
null
plot.py
L-Limbu/Solar-system
e3a49982aac6d3d09e7c7dad3cfc2520ba3d93e9
[ "MIT" ]
null
null
null
plot.py
L-Limbu/Solar-system
e3a49982aac6d3d09e7c7dad3cfc2520ba3d93e9
[ "MIT" ]
null
null
null
from data import initail import numpy as np import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties data = np.load('./data/Orbits.npy') Names = initail.Names N = Names.shape[0] plotxy() plotxz()
26.615385
78
0.617534
from data import initail import numpy as np import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties data = np.load('./data/Orbits.npy') Names = initail.Names N = Names.shape[0] def plotxy(): Positions = data[:,:,(0,1)] for k in range(N): plt.plot(Positions[:,k,0], Position...
763
0
46
3c4fe09e0f93b31f9c940807bb6257779ee35314
1,691
py
Python
Supervised/Classification/NaiveBayes/classif_naive_bayes.py
neohope/MLStudy
bba16587e4f3efe11c926030f6bbcff6db0dde14
[ "BSD-3-Clause" ]
2
2018-12-31T08:10:36.000Z
2020-04-23T11:47:50.000Z
Supervised/Classification/NaiveBayes/classif_naive_bayes.py
neohope/MLStudy
bba16587e4f3efe11c926030f6bbcff6db0dde14
[ "BSD-3-Clause" ]
null
null
null
Supervised/Classification/NaiveBayes/classif_naive_bayes.py
neohope/MLStudy
bba16587e4f3efe11c926030f6bbcff6db0dde14
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- """ 工具类 利用决策树进行分类处理 贝叶斯公式 p(xy)=p(x|y)p(y)=p(y|x)p(x) p(x|y)=p(y|x)p(x)/p(y) """ import numpy as np def train_naive_bayes(train_mat, train_category): """ 朴素贝叶斯分类 :param train_mat: 训练文本 :param train_category: 对应的文本类别 :return: """ train_doc_num =...
23.816901
99
0.596688
#!/usr/bin/python # -*- coding: UTF-8 -*- """ 工具类 利用决策树进行分类处理 贝叶斯公式 p(xy)=p(x|y)p(y)=p(y|x)p(x) p(x|y)=p(y|x)p(x)/p(y) """ import numpy as np def train_naive_bayes(train_mat, train_category): """ 朴素贝叶斯分类 :param train_mat: 训练文本 :param train_category: 对应的文本类别 :return: """ train_doc_num =...
0
0
0
b331821272bde1b55f5b1ec94fe54e79784193d4
131
py
Python
INF1511/Chapter2/Loops/continueex1.py
GalliWare/UNISA-studies
32bab94930b176c4dfe943439781ef102896fab5
[ "Unlicense" ]
null
null
null
INF1511/Chapter2/Loops/continueex1.py
GalliWare/UNISA-studies
32bab94930b176c4dfe943439781ef102896fab5
[ "Unlicense" ]
null
null
null
INF1511/Chapter2/Loops/continueex1.py
GalliWare/UNISA-studies
32bab94930b176c4dfe943439781ef102896fab5
[ "Unlicense" ]
null
null
null
# example of using continue in a loop k = 1 while k <= 10: if k == 7: k += 1 continue print(k) k = k+1
14.555556
37
0.473282
# example of using continue in a loop k = 1 while k <= 10: if k == 7: k += 1 continue print(k) k = k+1
0
0
0
6deded657b8240a9551f12f7dcf718426f908be0
4,120
py
Python
async_stripe/api_resources/list_object.py
bhch/async-stripe
75d934a8bb242f664e7be30812c12335cf885287
[ "MIT", "BSD-3-Clause" ]
8
2021-05-29T08:57:58.000Z
2022-02-19T07:09:25.000Z
async_stripe/api_resources/list_object.py
bhch/async-stripe
75d934a8bb242f664e7be30812c12335cf885287
[ "MIT", "BSD-3-Clause" ]
5
2021-05-31T10:18:36.000Z
2022-01-25T11:39:03.000Z
async_stripe/api_resources/list_object.py
bhch/async-stripe
75d934a8bb242f664e7be30812c12335cf885287
[ "MIT", "BSD-3-Clause" ]
1
2021-05-29T13:27:10.000Z
2021-05-29T13:27:10.000Z
import stripe from stripe import api_requestor, six, util from stripe.stripe_object import StripeObject from stripe.six.moves.urllib.parse import quote_plus stripe.ListObject.list = list_patch stripe.ListObject.create = create_patch stripe.ListObject.retrieve = retrieve_patch stripe.ListObject._request = _request_p...
26.753247
79
0.672816
import stripe from stripe import api_requestor, six, util from stripe.stripe_object import StripeObject from stripe.six.moves.urllib.parse import quote_plus async def list_patch( self, api_key=None, stripe_version=None, stripe_account=None, **params ): stripe_object = await self._request( "get", ...
3,475
0
161
8cd35bbeb7e6ca7e7a590bf9f39dd054c38fb277
3,199
py
Python
student_code/mohamedMahmoud/4_vidio_games.py
pranjal-teaching/asd-class
446fbf9fcc5b5491e4498ef99d7b81c108580268
[ "MIT" ]
2
2022-01-17T13:13:23.000Z
2022-03-02T18:25:24.000Z
student_code/mohamedMahmoud/4_vidio_games.py
pranjal-teaching/CP1895-ASD-2022Winter
446fbf9fcc5b5491e4498ef99d7b81c108580268
[ "MIT" ]
null
null
null
student_code/mohamedMahmoud/4_vidio_games.py
pranjal-teaching/CP1895-ASD-2022Winter
446fbf9fcc5b5491e4498ef99d7b81c108580268
[ "MIT" ]
3
2022-01-12T17:58:44.000Z
2022-01-16T15:17:58.000Z
import pickle if __name__ == "__main__": main()
27.110169
78
0.562051
import pickle def save(book_catalog): with open("book_file.bin", "wb") as file: pickle.dump(book_catalog, file) def load(): with open("book_file.bin", "rb") as file: print(pickle.load(file)) def clear(book_catalog): book_catalog.clear() def show_book(book_catalog): title = input(...
2,929
0
207
337d20738799098b13ddb1fa72868e0d9905847b
3,063
py
Python
scripts/hp_tuning/lgb_tuning.py
riccardopoiani/recsys_2019
47a44d2f7d85e76e31dacf4ba2e69721d010b6b8
[ "MIT" ]
2
2020-10-01T11:08:32.000Z
2020-11-25T11:05:37.000Z
scripts/hp_tuning/lgb_tuning.py
riccardopoiani/recsys_2019
47a44d2f7d85e76e31dacf4ba2e69721d010b6b8
[ "MIT" ]
null
null
null
scripts/hp_tuning/lgb_tuning.py
riccardopoiani/recsys_2019
47a44d2f7d85e76e31dacf4ba2e69721d010b6b8
[ "MIT" ]
1
2020-10-01T11:08:33.000Z
2020-10-01T11:08:33.000Z
from datetime import datetime import numpy as np import pandas as pd from course_lib.Base.Evaluation.Evaluator import EvaluatorHoldout from src.data_management.New_DataSplitter_leave_k_out import New_DataSplitter_leave_k_out from src.data_management.RecSys2019Reader import RecSys2019Reader from src.data_management.da...
47.859375
114
0.70617
from datetime import datetime import numpy as np import pandas as pd from course_lib.Base.Evaluation.Evaluator import EvaluatorHoldout from src.data_management.New_DataSplitter_leave_k_out import New_DataSplitter_leave_k_out from src.data_management.RecSys2019Reader import RecSys2019Reader from src.data_management.da...
0
0
0
3f563d6b84f13639c6a476c75a1cf79492a28ab2
4,530
py
Python
repo/script.module.liveresolver/lib/liveresolver/modules/constants.py
Hades01/Addons
710da97ac850197498a3cd64be1811c593610add
[ "Apache-2.0" ]
3
2020-03-03T13:21:44.000Z
2021-07-21T09:53:31.000Z
repo/script.module.liveresolver/lib/liveresolver/modules/constants.py
Hades01/Addons
710da97ac850197498a3cd64be1811c593610add
[ "Apache-2.0" ]
null
null
null
repo/script.module.liveresolver/lib/liveresolver/modules/constants.py
Hades01/Addons
710da97ac850197498a3cd64be1811c593610add
[ "Apache-2.0" ]
2
2020-04-01T22:11:12.000Z
2020-05-07T23:54:52.000Z
resolver_dict={ 'sawlive.tv': 'sawlive', 'streamking.co': 'streamking', 'streamking.cc': 'streamking', 'castalba.tv' : 'castalba', 'p2pcast.tv' : 'p2pcast', 'p2pcast.tech' : 'p2pcast', 'finecast.tv' : 'finecast', 'filmon.com' : 'filmo...
37.131148
91
0.463797
def flash_ver(): return 'WIN\\2021,0,0,242' def get_shockwave(): return 'ShockwaveFlash/21.0.0.242' def blacklist(): black = ['advert', 'banner', 'bet', 'c4.zedo', 'chat', 'chatango', '.css', 'histats'] resolver_dict={ 'sawlive.tv': 'sawlive', 'streamking.co': 'streamking', ...
155
0
75
8622f027030f34b58bac4104d7574f310268b6c0
32,799
py
Python
framework/oktopus/solver/oktopus/oktopus_utils.py
charlee593/oktopus_framework
2835c44c61d1b6170682f014450b8c2203786347
[ "MIT" ]
1
2022-02-21T12:03:17.000Z
2022-02-21T12:03:17.000Z
framework/oktopus/solver/oktopus/oktopus_utils.py
charlee593/oktopus_framework
2835c44c61d1b6170682f014450b8c2203786347
[ "MIT" ]
4
2020-07-02T00:56:32.000Z
2020-07-02T00:56:45.000Z
framework/oktopus/solver/oktopus/oktopus_utils.py
charlee593/oktopus_framework
2835c44c61d1b6170682f014450b8c2203786347
[ "MIT" ]
1
2022-02-21T12:03:03.000Z
2022-02-21T12:03:03.000Z
""" oktopus algorithm related utils """ import random, statistics from multiprocessing import Pool from collections import defaultdict, deque from sys import maxint import networkx as nx from cytoolz import merge, partial from nx_disjoint_paths import edge_disjoint_paths from ...multicast.session import Session ...
36.082508
221
0.583158
""" oktopus algorithm related utils """ import random, statistics from multiprocessing import Pool from collections import defaultdict, deque from sys import maxint import networkx as nx from cytoolz import merge, partial from nx_disjoint_paths import edge_disjoint_paths from ...multicast.session import Session de...
31,480
1
815
6ad4b0307023ca0f07b1c891343ae1a90f5a5ad5
6,436
py
Python
llvm/utils/lit/tests/shtest-format.py
medismailben/llvm-project
e334a839032fe500c3bba22bf976ab7af13ce1c1
[ "Apache-2.0" ]
158
2016-07-21T10:45:05.000Z
2022-03-25T00:56:20.000Z
llvm/utils/lit/tests/shtest-format.py
medismailben/llvm-project
e334a839032fe500c3bba22bf976ab7af13ce1c1
[ "Apache-2.0" ]
59
2019-02-26T18:57:27.000Z
2020-08-04T20:49:55.000Z
llvm/utils/lit/tests/shtest-format.py
medismailben/llvm-project
e334a839032fe500c3bba22bf976ab7af13ce1c1
[ "Apache-2.0" ]
62
2016-08-29T17:28:11.000Z
2021-12-29T17:55:58.000Z
# Check the various features of the ShTest format. # # RUN: rm -f %t.xml # RUN: not %{lit} -j 1 -v %{inputs}/shtest-format --xunit-xml-output %t.xml > %t.out # RUN: FileCheck < %t.out %s # RUN: FileCheck --check-prefix=XUNIT < %t.xml %s # END. # CHECK: -- Testing: # CHECK: PASS: shtest-format :: argv0.txt # CHECK: F...
39.243902
120
0.669204
# Check the various features of the ShTest format. # # RUN: rm -f %t.xml # RUN: not %{lit} -j 1 -v %{inputs}/shtest-format --xunit-xml-output %t.xml > %t.out # RUN: FileCheck < %t.out %s # RUN: FileCheck --check-prefix=XUNIT < %t.xml %s # END. # CHECK: -- Testing: # CHECK: PASS: shtest-format :: argv0.txt # CHECK: F...
0
0
0
f9487af1aa537fd2d0666a16755714386c4969fb
6,524
py
Python
generators/generate.py
adan82/ck2map
6ec3cb3b4edc8eded07cf05add452da5b1979ed7
[ "MIT" ]
11
2016-01-09T04:30:58.000Z
2019-05-21T21:59:49.000Z
generators/generate.py
adan82/ck2map
6ec3cb3b4edc8eded07cf05add452da5b1979ed7
[ "MIT" ]
1
2016-04-20T20:54:16.000Z
2016-04-23T11:24:33.000Z
generators/generate.py
adan82/ck2map
6ec3cb3b4edc8eded07cf05add452da5b1979ed7
[ "MIT" ]
4
2016-08-27T14:08:58.000Z
2019-12-10T09:13:54.000Z
# -*- coding: utf-8 -*- """ Program for generating a GeoJSON-file from provinces.bmp. This is the main file responsible for running the show. Author: Erkki Mattila, 2014-2015 """ from PIL import Image import time, csv from marcher import Marcher def read_definition(definition): """Function for reading valid ro...
33.979167
186
0.549663
# -*- coding: utf-8 -*- """ Program for generating a GeoJSON-file from provinces.bmp. This is the main file responsible for running the show. Author: Erkki Mattila, 2014-2015 """ from PIL import Image import time, csv from marcher import Marcher def read_definition(definition): """Function for reading valid ro...
0
0
0
e19e85de2a44d1cde75578d8e12473f68991ebfc
3,142
py
Python
litter_getter/hero.py
shapiromatron/get_litter
82caf8caae3cfbeee8b764c9c9e735d420819f06
[ "MIT" ]
5
2017-09-20T21:22:05.000Z
2020-05-20T21:36:27.000Z
litter_getter/hero.py
shapiromatron/get_litter
82caf8caae3cfbeee8b764c9c9e735d420819f06
[ "MIT" ]
null
null
null
litter_getter/hero.py
shapiromatron/get_litter
82caf8caae3cfbeee8b764c9c9e735d420819f06
[ "MIT" ]
3
2017-05-22T13:41:40.000Z
2018-07-23T13:19:35.000Z
import json import logging from typing import Any, Dict, List, Optional import requests from . import utils class HEROFetch: """ Handler to search and retrieve literature from US EPA's HERO database. Given a list of HERO IDs, fetch the content for each one and return a list of dictionaries of ci...
35.303371
115
0.62317
import json import logging from typing import Any, Dict, List, Optional import requests from . import utils def _parse_pseudo_json(d: Dict, field: str) -> Any: # built-in json parser doesn't identify nulls in HERO returns v = d.get(field, None) if v == "null": return None else: retur...
2,522
0
150
f82666bf3ca7532e091d7760de7ca0a9cc54a890
171
py
Python
Python/Kattis/Naive/apaxiaaans.py
kchevali/OnlineJudge
c1d1894078fa45eef05c8785aba29758d9adf0c6
[ "MIT" ]
null
null
null
Python/Kattis/Naive/apaxiaaans.py
kchevali/OnlineJudge
c1d1894078fa45eef05c8785aba29758d9adf0c6
[ "MIT" ]
null
null
null
Python/Kattis/Naive/apaxiaaans.py
kchevali/OnlineJudge
c1d1894078fa45eef05c8785aba29758d9adf0c6
[ "MIT" ]
null
null
null
s = input() size = 0 while size != len(s): size = len(s) for i in range(26): letter = chr(ord("a") + i) s = s.replace(letter * 2, letter) print(s)
19
41
0.508772
s = input() size = 0 while size != len(s): size = len(s) for i in range(26): letter = chr(ord("a") + i) s = s.replace(letter * 2, letter) print(s)
0
0
0