hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
15c7bb60cb2e8ad87a7bda89b5d645f9ccbc4651
1,301
py
Python
data_helper.py
ace18zz/COM3610-Sentiment-Detection-and-Tracking-in-Social-Media-Streams
466536b7c6bb592ef1461e13e5b3a402819b6398
[ "MIT" ]
null
null
null
data_helper.py
ace18zz/COM3610-Sentiment-Detection-and-Tracking-in-Social-Media-Streams
466536b7c6bb592ef1461e13e5b3a402819b6398
[ "MIT" ]
null
null
null
data_helper.py
ace18zz/COM3610-Sentiment-Detection-and-Tracking-in-Social-Media-Streams
466536b7c6bb592ef1461e13e5b3a402819b6398
[ "MIT" ]
null
null
null
''' Author: your name Date: 2021-05-17 03:11:15 LastEditTime: 2021-05-18 14:46:09 LastEditors: Please set LastEditors Description: In User Settings Edit FilePath: /twitterSententAnalyse 2/data_helper.py ''' #coding:utf-8 stops = loadStops() X, y = getTxt() X_feather = [] fw = open('./filter_txt_train_...
25.509804
71
0.554958
''' Author: your name Date: 2021-05-17 03:11:15 LastEditTime: 2021-05-18 14:46:09 LastEditors: Please set LastEditors Description: In User Settings Edit FilePath: /twitterSententAnalyse 2/data_helper.py ''' #coding:utf-8 from ext_en import * import sys def loadStops(): stops = [] with open('./sto...
0
0
0
0
0
554
0
-12
96
36be5a7e634805e69a55d92b7163a3190282a05b
4,044
py
Python
cli/sawtooth_cli/network_command/peers.py
RomarQ/sawtooth-core
b900f4f3a2ffda9f6fb32a57fd4eacc41be86e5a
[ "Apache-2.0" ]
1,530
2016-05-07T16:13:52.000Z
2022-03-30T04:32:48.000Z
cli/sawtooth_cli/network_command/peers.py
RomarQ/sawtooth-core
b900f4f3a2ffda9f6fb32a57fd4eacc41be86e5a
[ "Apache-2.0" ]
906
2016-05-11T16:45:17.000Z
2022-01-27T19:24:21.000Z
cli/sawtooth_cli/network_command/peers.py
RomarQ/sawtooth-core
b900f4f3a2ffda9f6fb32a57fd4eacc41be86e5a
[ "Apache-2.0" ]
891
2016-05-11T16:45:32.000Z
2022-03-20T07:25:46.000Z
# Copyright 2018 Intel 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 law or agreed to in wri...
28.27972
80
0.642928
# Copyright 2018 Intel 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 law or agreed to in wri...
0
0
0
0
0
2,886
0
168
296
496e311b9e9f78f4ce9833d11ae1ce300d6e3c15
4,011
py
Python
pjproject_android/pkgconfig.py
WachterJud/qaul.net_legacy
9c2be0a38ad6e90fadc0d1150340e37d220997ae
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
1
2019-07-30T14:44:29.000Z
2019-07-30T14:44:29.000Z
pjproject_android/pkgconfig.py
WachterJud/qaul.net_legacy
9c2be0a38ad6e90fadc0d1150340e37d220997ae
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pjproject_android/pkgconfig.py
WachterJud/qaul.net_legacy
9c2be0a38ad6e90fadc0d1150340e37d220997ae
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
import sys import os REMOVE_THESE = ["-I/usr/include", "-I/usr/include/", "-L/usr/lib", "-L/usr/lib/"] if __name__ == "__main__": pkg_names = [] pkg_dict = {} commands = [] exist_check = False for i in range(1,len(sys.argv)): if sys.argv[i][0] == '-': cmd = sys.argv[i] commands.append(cmd) if cmd=='...
23.319767
99
0.630765
import sys import os REMOVE_THESE = ["-I/usr/include", "-I/usr/include/", "-L/usr/lib", "-L/usr/lib/"] class Pkg: def __init__(self, pkg_name): self.name = pkg_name self.priority = 0 self.vars = {} def parse(self, pkg_config_path): f = None for pkg_path in pkg_config_path.split(':'): if pkg_path[-1] !...
0
0
0
1,687
0
317
0
0
46
752524c18d71f5aeef66f7d24378493d86dd4a29
1,875
py
Python
channels_jobmanager/migrations/0001_initial.py
datadvance/DjangoChannelsJobmanager
7c7bd4e5c8bdb9bc8c4d9d1018a286321ddbef72
[ "MIT" ]
6
2018-06-27T12:33:51.000Z
2018-06-28T10:47:34.000Z
channels_jobmanager/migrations/0001_initial.py
datadvance/DjangoChannelsJobmanager
7c7bd4e5c8bdb9bc8c4d9d1018a286321ddbef72
[ "MIT" ]
null
null
null
channels_jobmanager/migrations/0001_initial.py
datadvance/DjangoChannelsJobmanager
7c7bd4e5c8bdb9bc8c4d9d1018a286321ddbef72
[ "MIT" ]
null
null
null
# Generated by Django 2.0.6 on 2018-06-20 10:24
44.642857
228
0.605333
# Generated by Django 2.0.6 on 2018-06-20 10:24 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import jsonfield.fields import uuid class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(setti...
0
0
0
1,659
0
0
0
33
134
5c7beda1d4d9d9ea4d2b4753ca805b5cb43200a3
556
py
Python
bii-ide/bii_ide/common/biicode/biicode_dependencies.py
biicode/bii-ide
5565859bcfc28f22f095f8a353325270192fbffc
[ "MIT" ]
2
2015-01-15T09:50:38.000Z
2015-01-27T14:00:59.000Z
bii-ide/bii_ide/common/biicode/biicode_dependencies.py
biicode/bii-ide
5565859bcfc28f22f095f8a353325270192fbffc
[ "MIT" ]
null
null
null
bii-ide/bii_ide/common/biicode/biicode_dependencies.py
biicode/bii-ide
5565859bcfc28f22f095f8a353325270192fbffc
[ "MIT" ]
2
2015-04-20T21:39:54.000Z
2016-05-29T07:21:54.000Z
finder = {"Linux": "which", "Darwin": "which", "Windows": "where"}
24.173913
60
0.566547
import subprocess import sys import platform import os finder = {"Linux": "which", "Darwin": "which", "Windows": "where"} def dependencies_finder(): p = subprocess.Popen([finder[platform.system()], 'bii'], stdout=subprocess.PIPE, stderr=subpro...
0
0
0
0
0
389
0
-33
111
6b9ff6c3a986ee07237c5eecc3dc4397f2203ada
972
py
Python
LeetCode/String/1371. Find the Longest Substring Containing Vowels in Even Counts.py
thehanemperor/LeetCode
8d120162657a1e29c3e821b51ac4121300fc7a12
[ "MIT" ]
null
null
null
LeetCode/String/1371. Find the Longest Substring Containing Vowels in Even Counts.py
thehanemperor/LeetCode
8d120162657a1e29c3e821b51ac4121300fc7a12
[ "MIT" ]
null
null
null
LeetCode/String/1371. Find the Longest Substring Containing Vowels in Even Counts.py
thehanemperor/LeetCode
8d120162657a1e29c3e821b51ac4121300fc7a12
[ "MIT" ]
null
null
null
# MEDIUM # cur records the count of "aeiou" # cur & 1 = the records of a % 2 # cur & 2 = the records of e % 2 # cur & 4 = the records of i % 2 # cur & 8 = the records of o % 2 # cur & 16 = the records of u % 2 # seen note the index of first occurrence of cur # a e ...
33.517241
88
0.403292
# MEDIUM # cur records the count of "aeiou" # cur & 1 = the records of a % 2 # cur & 2 = the records of e % 2 # cur & 4 = the records of i % 2 # cur & 8 = the records of o % 2 # cur & 16 = the records of u % 2 # seen note the index of first occurrence of cur # a e ...
0
0
0
369
0
0
0
0
23
109b484042bca981645598724b609d879545a1e6
1,261
py
Python
sztuczna_inteligencja/2-lab/komandosASTAR.py
Magikis/Uniwersity
06964ef31d721af85740df1dce3f966006ab9f78
[ "MIT" ]
12
2017-11-30T08:45:48.000Z
2018-04-26T14:15:45.000Z
sztuczna_inteligencja/2-lab/komandosASTAR.py
Magikis/Uniwersity
06964ef31d721af85740df1dce3f966006ab9f78
[ "MIT" ]
null
null
null
sztuczna_inteligencja/2-lab/komandosASTAR.py
Magikis/Uniwersity
06964ef31d721af85740df1dce3f966006ab9f78
[ "MIT" ]
9
2017-10-16T09:42:59.000Z
2018-01-27T19:48:45.000Z
if __name__ == '__main__': mem = set() initState = getInitialState() randPath = [] path = [] # for i in range(140): # move = random.choice(getMoves()) # initState = apllyMove(initState, move) # randPath.append(move) path = aStar(mem, initState, h) saveOtput(randPat...
28.659091
65
0.529738
from komandos import * import heapq as H def aStar(mem, initalState, heuristic): nodes = 0 mem.clear() mem.add(initalState) queue = [] queue.append((0, 0, initalState, [])) while queue: nodes += 1 # if nodes % 100000 == 0: # print('NODES_{}'.format(nodes), end='') ...
0
0
0
0
0
867
0
-3
67
d2c0d59792337935b6f55cddc7d30ccc0dd9e648
2,719
py
Python
2021-01/demo20-1.py
zhouyuanmin/MyDemo
664977a6243992c77931e58b98f5262745759d1a
[ "MIT" ]
null
null
null
2021-01/demo20-1.py
zhouyuanmin/MyDemo
664977a6243992c77931e58b98f5262745759d1a
[ "MIT" ]
null
null
null
2021-01/demo20-1.py
zhouyuanmin/MyDemo
664977a6243992c77931e58b98f5262745759d1a
[ "MIT" ]
null
null
null
# import time # import random # seed = 1 # list1 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] # temp = random.randint(0, 25) # count = 0 # for i in range(0,100): # if i % 9 == 0 and i <= 81: # print(str(i) + ':' + list...
24.944954
140
0.447223
# import time # import random # seed = 1 # list1 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] # temp = random.randint(0, 25) # count = 0 # for i in range(0,100): # if i % 9 == 0 and i <= 81: # print(str(i) + ':' + list...
696
0
0
0
0
0
0
0
0
f60a572537dba80613b967a061f1489eb08b1f8d
2,168
py
Python
examples/poll_example.py
Hofei90/telegram_api
8e910e15d7147db4b3828fa6fd1cfe2f5d33c077
[ "MIT" ]
null
null
null
examples/poll_example.py
Hofei90/telegram_api
8e910e15d7147db4b3828fa6fd1cfe2f5d33c077
[ "MIT" ]
4
2019-04-24T12:56:34.000Z
2020-06-25T20:16:56.000Z
examples/poll_example.py
Hofei90/telegram_api
8e910e15d7147db4b3828fa6fd1cfe2f5d33c077
[ "MIT" ]
null
null
null
import os import telegram_bot_api as api SKRIPTPFAD = os.path.abspath(os.path.dirname(__file__)) CONFIG = config_laden() USER = CONFIG["telegram"]["user"] BOT = api.Bot(CONFIG["telegram"]["token"]) ANTWORTEN = ["Komme gleich", "1 Min", "5 Min"] if __name__ == "__main__": main()
27.794872
86
0.635609
import os import time import toml import telegram_bot_api as api def config_laden(): configfile = os.path.join(SKRIPTPFAD, "vorlage_example_cfg.toml") with open(configfile) as file: return toml.loads(file.read()) SKRIPTPFAD = os.path.abspath(os.path.dirname(__file__)) CONFIG = config_laden() USER...
0
0
0
1,080
0
653
0
-20
160
ed0aaf22952503c583362871b4936f5c75ae6d9f
4,792
py
Python
main.py
sunsetmountain/gcpBudgetMonitoring
0818cf5d6ce0dfd373c3fcff3470906eb5302760
[ "MIT" ]
null
null
null
main.py
sunsetmountain/gcpBudgetMonitoring
0818cf5d6ce0dfd373c3fcff3470906eb5302760
[ "MIT" ]
null
null
null
main.py
sunsetmountain/gcpBudgetMonitoring
0818cf5d6ce0dfd373c3fcff3470906eb5302760
[ "MIT" ]
null
null
null
import base64 import logging import json def handle_notification(event, context): """Triggered from a message on a Cloud Pub/Sub topic. Args: event (dict): Event payload. context (google.cloud.functions.Context): Metadata for the event. """ pubsub_message = base64.b64decode(event['dat...
43.963303
183
0.691152
import base64 import logging import json from calendar import monthrange import datetime from httplib2 import Http from json import dumps def handle_notification(event, context): """Triggered from a message on a Cloud Pub/Sub topic. Args: event (dict): Event payload. context (google.cloud.fun...
0
0
0
0
0
2,726
0
9
165
7f52994b7156dbe1243c5663af9d59ad23d89c7e
6,970
py
Python
attendanceGui.py
vuwestin/AttendanceTaker
0209ec64ad79180fd97c9e375ccf8ae1b55ca660
[ "MIT" ]
null
null
null
attendanceGui.py
vuwestin/AttendanceTaker
0209ec64ad79180fd97c9e375ccf8ae1b55ca660
[ "MIT" ]
null
null
null
attendanceGui.py
vuwestin/AttendanceTaker
0209ec64ad79180fd97c9e375ccf8ae1b55ca660
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
32.268519
189
0.699713
from attendanceTaker import Student, classDatabase import tkinter as tk class attendanceGui(tk.Tk): def __init__(self, *args, **kwargs): tk.Tk.__init__(self, *args, **kwargs) self.classDb = classDatabase("courseName", "leaderName", "dayAndTimeOfSession", "numSessions") #self.classDb.readDatabase("attendance.t...
0
0
0
6,616
0
107
0
28
182
223944df2603e7c3ba409e514cd2839bc021b579
134
py
Python
topojoin/__init__.py
SimmonsRitchie/topojoin
5c5848ae05a249c38babdc449dbd89df1b644b61
[ "MIT" ]
1
2020-08-04T04:36:05.000Z
2020-08-04T04:36:05.000Z
topojoin/__init__.py
SimmonsRitchie/topojoin
5c5848ae05a249c38babdc449dbd89df1b644b61
[ "MIT" ]
null
null
null
topojoin/__init__.py
SimmonsRitchie/topojoin
5c5848ae05a249c38babdc449dbd89df1b644b61
[ "MIT" ]
null
null
null
"""Top-level package for TopoJoin.""" __author__ = "DSR" __email__ = "info@simmonsritchie.com" __version__ = "__version__ = '0.3.1'"
22.333333
37
0.701493
"""Top-level package for TopoJoin.""" __author__ = "DSR" __email__ = "info@simmonsritchie.com" __version__ = "__version__ = '0.3.1'"
0
0
0
0
0
0
0
0
0
74d5ead0146bebed5e35db9f31f7e4195759c558
17,127
py
Python
protein_pka/mcce/mcce.py
SCP-028/UGA
6c150ee2728a0c83ab88db9b2e137deb9c3f94f3
[ "Apache-2.0" ]
null
null
null
protein_pka/mcce/mcce.py
SCP-028/UGA
6c150ee2728a0c83ab88db9b2e137deb9c3f94f3
[ "Apache-2.0" ]
1
2019-10-07T17:34:49.000Z
2019-10-07T17:34:49.000Z
protein_pka/mcce/mcce.py
SCP-028/UGA
6c150ee2728a0c83ab88db9b2e137deb9c3f94f3
[ "Apache-2.0" ]
1
2019-01-10T07:33:07.000Z
2019-01-10T07:33:07.000Z
#!python3 """ Predict protein pKa based on MCCE method. http://pka.engr.ccny.cuny.edu/ Require MCCE 3.0 to work: https://anaconda.org/SalahSalah/mcce/files """ import locale import logging import os import sys from multiprocessing import Pool # Sapelo Locale is broken, quick fix locale.setlocale(locale....
40.016355
167
0.527179
#!python3 """ Predict protein pKa based on MCCE method. http://pka.engr.ccny.cuny.edu/ Require MCCE 3.0 to work: https://anaconda.org/SalahSalah/mcce/files """ import asyncio import glob import gzip import locale import logging import math import os import re import shutil import subprocess import sys...
0
0
978
14,204
0
0
0
-76
303
eec845711b94d039c2036a3c956f5be998a02f7f
2,433
py
Python
meraki/models/update_network_traffic_analysis_settings_model.py
bossypants22/python-sdk-test
37701d62dc18c2abb910eb790ab978913adcaf7b
[ "MIT" ]
37
2019-04-24T14:01:33.000Z
2022-01-28T01:37:21.000Z
meraki/models/update_network_traffic_analysis_settings_model.py
ankita66666666/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
10
2019-07-09T16:35:11.000Z
2021-12-07T03:47:53.000Z
meraki/models/update_network_traffic_analysis_settings_model.py
ankita66666666/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
17
2019-04-30T23:53:21.000Z
2022-02-07T22:57:44.000Z
# -*- coding: utf-8 -*- """ meraki This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ). """
33.328767
140
0.634196
# -*- coding: utf-8 -*- """ meraki This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ). """ import meraki.models.custom_pie_chart_item_model class UpdateNetworkTrafficAnalysisSettingsModel(object): """Implementation of the 'updateNetworkTrafficAnalysisS...
0
1,075
0
1,131
0
0
0
27
49
852b4d6653795d573b39ff6adfb58dab19bbc906
2,989
py
Python
questions/q351_largest_BST_subtree_size/code.py
aadhityasw/Competitive-Programs
901a48d35f024a3a87c32a45b7f4531e8004a203
[ "MIT" ]
null
null
null
questions/q351_largest_BST_subtree_size/code.py
aadhityasw/Competitive-Programs
901a48d35f024a3a87c32a45b7f4531e8004a203
[ "MIT" ]
1
2021-05-15T07:56:51.000Z
2021-05-15T07:56:51.000Z
questions/q351_largest_BST_subtree_size/code.py
aadhityasw/Competitive-Programs
901a48d35f024a3a87c32a45b7f4531e8004a203
[ "MIT" ]
null
null
null
# Return the size of the largest sub-tree which is also a BST import sys sys.setrecursionlimit(1000000) # Tree Node # Function to Build Tree if __name__ == "__main__": t = int(input()) for _ in range(0, t): s = input() root = buildTree(s) print(largestBst(root))
23.535433
61
0.52827
def recurse(root) : if root is None : return (None, None, 0) if root.left is None and root.right is None : return (root.data, root.data, 1) if root.left and root.right : left = False left_part = recurse(root.left) (l1, r1, s1) = left_part if r1 is no...
0
0
0
94
0
2,467
0
8
111
036e451730e5775a3e9f11a7159dc78fabeb20d8
1,588
py
Python
iButton.py
sgreene570/cshrgbledsign
4845b92c3d23346e58cb293d0a4eebb2f1caa2eb
[ "MIT" ]
3
2016-12-01T05:40:00.000Z
2017-04-19T20:42:16.000Z
iButton.py
sgreene570/cshrgbledsign
4845b92c3d23346e58cb293d0a4eebb2f1caa2eb
[ "MIT" ]
null
null
null
iButton.py
sgreene570/cshrgbledsign
4845b92c3d23346e58cb293d0a4eebb2f1caa2eb
[ "MIT" ]
1
2016-12-02T22:43:56.000Z
2016-12-02T22:43:56.000Z
if __name__ == "__main__": main()
24.060606
63
0.547229
import os import time import csh_ldap as ldap import login def main(): global cshldap cshldap = ldap.CSHLDAP(login.ldap_user, login.ldap_pass) get_ibutton() def find_user(varID): ibutton = varID.strip() ibutton = "*" + ibutton[3:] + "01" try: member = cshldap.get_member_ibutton(ibu...
0
0
0
0
0
1,393
0
-29
180
6091acc7b448a2f01f3f747403b3166b9a7b9b41
1,616
py
Python
django/contrib/gis/db/backends/postgis/const.py
uskudnik/django
828e3b1335e2614d338a630fd5b5f88d38a6b5d2
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
django/contrib/gis/db/backends/postgis/const.py
uskudnik/django
828e3b1335e2614d338a630fd5b5f88d38a6b5d2
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
django/contrib/gis/db/backends/postgis/const.py
uskudnik/django
828e3b1335e2614d338a630fd5b5f88d38a6b5d2
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
""" PostGIS to GDAL conversion constant definitions """ # Lookup to convert pixel type values from GDAL to PostGIS GDAL_TO_POSTGIS = [None, 4, 6, 5, 8, 7, 10, 11, None, None, None, None] # Lookup to convert pixel type values from PostGIS to GDAL POSTGIS_TO_GDAL = [1, 1, 1, 3, 1, 3, 2, 5, 4, None, 6, 7, None, None] # ...
34.382979
99
0.67203
""" PostGIS to GDAL conversion constant definitions """ # Lookup to convert pixel type values from GDAL to PostGIS GDAL_TO_POSTGIS = [None, 4, 6, 5, 8, 7, 10, 11, None, None, None, None] # Lookup to convert pixel type values from PostGIS to GDAL POSTGIS_TO_GDAL = [1, 1, 1, 3, 1, 3, 2, 5, 4, None, 6, 7, None, None] # ...
0
0
0
0
0
0
0
0
0
bb106129f0112d84d2e32ff27e94398adec95e67
1,426
py
Python
BinarySearch/81_SearchInRotatedSortedArrayII.py
cls1991/leetcode
0fd165afa2ec339a6f194bc57f8810e66cd2822b
[ "MIT" ]
180
2018-01-25T01:50:04.000Z
2021-11-09T11:47:45.000Z
BinarySearch/81_SearchInRotatedSortedArrayII.py
cls1991/leetcode
0fd165afa2ec339a6f194bc57f8810e66cd2822b
[ "MIT" ]
6
2018-01-25T07:51:51.000Z
2019-10-26T14:10:53.000Z
BinarySearch/81_SearchInRotatedSortedArrayII.py
cls1991/leetcode
0fd165afa2ec339a6f194bc57f8810e66cd2822b
[ "MIT" ]
29
2018-01-25T01:55:58.000Z
2019-09-02T07:19:59.000Z
# coding: utf8 """ : https://leetcode.com/problems/search-in-rotated-sorted-array-ii/description. : Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose an array sorted in ascending order is rotated a...
26.407407
98
0.509116
# coding: utf8 """ 题目链接: https://leetcode.com/problems/search-in-rotated-sorted-array-ii/description. 题目描述: Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose an array sorted in ascending order is r...
42
0
0
859
0
0
0
0
23
1819f0d4ecff30e9287a66fc50d70f8f967d0afb
14,951
py
Python
rootfs/api/tests/test_domain.py
jianxiaoguo/controller
8cc1e11601e5725e583f0fa82cdb2c10872ca485
[ "Apache-2.0" ]
null
null
null
rootfs/api/tests/test_domain.py
jianxiaoguo/controller
8cc1e11601e5725e583f0fa82cdb2c10872ca485
[ "Apache-2.0" ]
19
2020-07-30T06:31:29.000Z
2022-03-14T07:33:44.000Z
rootfs/api/tests/test_domain.py
jianxiaoguo/controller
8cc1e11601e5725e583f0fa82cdb2c10872ca485
[ "Apache-2.0" ]
9
2020-07-30T02:50:12.000Z
2020-12-11T06:44:19.000Z
""" Unit tests for the Drycc api app. Run the tests with "./manage.py test api" """ from django.contrib.auth import get_user_model User = get_user_model()
41.301105
92
0.568858
""" Unit tests for the Drycc api app. Run the tests with "./manage.py test api" """ from unittest import mock from django.contrib.auth import get_user_model from django.core.cache import cache from django.conf import settings from rest_framework.authtoken.models import Token from api.models import Domain from api.te...
100
0
0
14,501
0
0
0
69
179
75c315b7a7ce4f646d9fa116e0081007d2e70f6e
159
py
Python
com/LimePencil/Q8674/Tabliczka.py
LimePencil/baekjoonProblems
61eeeeb875585d165d9e39ecdb3d905b4ba6aa87
[ "MIT" ]
null
null
null
com/LimePencil/Q8674/Tabliczka.py
LimePencil/baekjoonProblems
61eeeeb875585d165d9e39ecdb3d905b4ba6aa87
[ "MIT" ]
null
null
null
com/LimePencil/Q8674/Tabliczka.py
LimePencil/baekjoonProblems
61eeeeb875585d165d9e39ecdb3d905b4ba6aa87
[ "MIT" ]
null
null
null
import sys input = sys.stdin.readline w,h = list(map(int,input().split(" "))) if h%2 ==0 or w%2==0: print("0") elif h>=w: print(w) else: print(h)
14.454545
39
0.566038
import sys input = sys.stdin.readline w,h = list(map(int,input().split(" "))) if h%2 ==0 or w%2==0: print("0") elif h>=w: print(w) else: print(h)
0
0
0
0
0
0
0
0
0
56ffd2a76d5be6ebe2756fda990f9b8c0be07cba
3,321
py
Python
todone/commands/list.py
safnuk/todone
e6373b69b8159cffb8d1b7ed7b1f5810c4e1e7df
[ "Apache-2.0" ]
null
null
null
todone/commands/list.py
safnuk/todone
e6373b69b8159cffb8d1b7ed7b1f5810c4e1e7df
[ "Apache-2.0" ]
null
null
null
todone/commands/list.py
safnuk/todone
e6373b69b8159cffb8d1b7ed7b1f5810c4e1e7df
[ "Apache-2.0" ]
null
null
null
"""Module for searching the database based on user-supplied queries, and display the result to the user. """ from todone import backend from todone import printers def list_items(args): """ Print a list of todos matching given search terms. usage: todone list [.file] [folder/] [tags and keywords] Se...
33.21
79
0.658838
"""Module for searching the database based on user-supplied queries, and display the result to the user. """ from todone import backend from todone import printers from todone.parser import factory def list_items(args): """ Print a list of todos matching given search terms. usage: todone list [.file] [fo...
0
0
0
0
0
847
0
12
68
9bbef3c56a3d69df44fbec3dfb0d6aed70a16946
2,773
py
Python
src/neuronalNetwork.py
ramevaf/AICars
0996f6f79875246aa23c8fe68e8ca80fe4127f96
[ "MIT" ]
null
null
null
src/neuronalNetwork.py
ramevaf/AICars
0996f6f79875246aa23c8fe68e8ca80fe4127f96
[ "MIT" ]
null
null
null
src/neuronalNetwork.py
ramevaf/AICars
0996f6f79875246aa23c8fe68e8ca80fe4127f96
[ "MIT" ]
null
null
null
''' This module contains the Neuronaletwork class and its methods. Created on 29.09.2019 @author: D.Ramonat '''
41.38806
93
0.623512
''' This module contains the Neuronaletwork class and its methods. Created on 29.09.2019 @author: D.Ramonat ''' import numpy as np class NeuronalNetwork: def __init__(self, structure): ''' Constructor :param structure: contains the number of neurons in the respective ...
0
0
0
2,618
0
0
0
-3
45
da86ae199461a628bc11e0e67da77a710ff55631
1,666
py
Python
piqe_ocp_lib/tests/monitoring/test_ocp_cluster_stats_prometheus.py
bhavikbhavsar/piqe-ocp-lib
4aa64e9ebbec422cdf93150fcb451ca7e529b451
[ "Apache-2.0" ]
4
2020-05-12T13:59:07.000Z
2021-08-02T19:21:54.000Z
piqe_ocp_lib/tests/monitoring/test_ocp_cluster_stats_prometheus.py
bhavikbhavsar/piqe-ocp-lib
4aa64e9ebbec422cdf93150fcb451ca7e529b451
[ "Apache-2.0" ]
53
2020-05-05T16:44:52.000Z
2021-12-07T07:34:56.000Z
piqe_ocp_lib/tests/monitoring/test_ocp_cluster_stats_prometheus.py
bhavikbhavsar/piqe-ocp-lib
4aa64e9ebbec422cdf93150fcb451ca7e529b451
[ "Apache-2.0" ]
18
2020-03-18T18:18:33.000Z
2021-08-16T10:08:59.000Z
import logging from piqe_ocp_lib import __loggername__ logger = logging.getLogger(__loggername__)
43.842105
100
0.770708
import logging import pytest from piqe_ocp_lib import __loggername__ from piqe_ocp_lib.api.monitoring.ocp_cluster_stats_prometheus import OcpClusterStatsPrometheus logger = logging.getLogger(__loggername__) @pytest.fixture(scope="session") def ocp_cluster_stats_prom(get_kubeconfig): return OcpClusterStatsProme...
0
125
0
1,283
0
0
0
65
91
aa8eccb8250d50cd4bf852b7cc6d79f38837fac2
3,808
py
Python
backend/swagger_server/models/audit_log_entry.py
Lend88/libresign
9537f39a696fa5f3433052406329d77d528b6cf9
[ "MIT" ]
6
2019-01-29T05:58:37.000Z
2021-11-02T22:47:02.000Z
backend/swagger_server/models/audit_log_entry.py
Lend88/libresign
9537f39a696fa5f3433052406329d77d528b6cf9
[ "MIT" ]
9
2020-09-09T04:53:01.000Z
2022-03-08T22:52:18.000Z
backend/swagger_server/models/audit_log_entry.py
Lend88/libresign
9537f39a696fa5f3433052406329d77d528b6cf9
[ "MIT" ]
4
2019-01-29T07:38:55.000Z
2021-10-16T21:06:42.000Z
# coding: utf-8 from __future__ import absolute_import from .. import util
29.068702
104
0.600578
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from .base_model_ import Model from .. import util class AuditLogEntry(Model): """NOTE: This class is auto generated by the swagger code generator program. D...
0
2,442
0
1,139
0
0
0
31
119
979feae2b64e41c35c8f70c11a56566cc76b3fc4
1,383
py
Python
Network Simulation/C language/Pb-Ps/data/Plot.py
shahmari/Prevention_and_Quarantine_on_SIR
9173fd3feaa86a79d829ee653ec2c70f678e2ac3
[ "MIT" ]
1
2021-08-25T09:56:10.000Z
2021-08-25T09:56:10.000Z
Network Simulation/C language/Pb-Ps/data/Plot.py
shahmari/Prevention_and_Quarantine_on_SIR
9173fd3feaa86a79d829ee653ec2c70f678e2ac3
[ "MIT" ]
null
null
null
Network Simulation/C language/Pb-Ps/data/Plot.py
shahmari/Prevention_and_Quarantine_on_SIR
9173fd3feaa86a79d829ee653ec2c70f678e2ac3
[ "MIT" ]
null
null
null
# To add a new cell, type '# %%' # To add a new markdown cell, type '# %% [markdown]' # %% import numpy as np import matplotlib.pyplot as plt # %% file_list=[] for i in range(50): file_list.append('Ps-Pb{}.csv'.format(i)) rdata=np.ndarray((50,50,50)) rd_mean=np.ndarray((50,50)) for i in range(50): file=np.loa...
23.05
71
0.650036
# To add a new cell, type '# %%' # To add a new markdown cell, type '# %% [markdown]' # %% import numpy as np import matplotlib.pyplot as plt # %% file_list=[] for i in range(50): file_list.append('Ps-Pb{}.csv'.format(i)) rdata=np.ndarray((50,50,50)) rd_mean=np.ndarray((50,50)) for i in range(50): file=np.loa...
0
0
0
0
0
0
0
0
0
43bf3359b94d2b73744ff9f437a8c81bbdefe7bc
22,576
py
Python
zaqar/transport/validation.py
ISCAS-VDI/zaqar
5c1aedbef1930565a46cc60b1a9d5d5e238f174d
[ "Apache-2.0" ]
null
null
null
zaqar/transport/validation.py
ISCAS-VDI/zaqar
5c1aedbef1930565a46cc60b1a9d5d5e238f174d
[ "Apache-2.0" ]
null
null
null
zaqar/transport/validation.py
ISCAS-VDI/zaqar
5c1aedbef1930565a46cc60b1a9d5d5e238f174d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2013 Rackspace, Inc. # Copyright (c) 2015 Catalyst IT Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
40.028369
79
0.607282
# Copyright (c) 2013 Rackspace, Inc. # Copyright (c) 2015 Catalyst IT Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
0
0
0
19,015
0
67
0
-3
159
310027775251a25345760cd9ea562fcd1607d396
2,438
py
Python
assignments/ps5-template/solve_tilt.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
1
2022-02-26T13:52:31.000Z
2022-02-26T13:52:31.000Z
assignments/ps5-template/solve_tilt.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
null
null
null
assignments/ps5-template/solve_tilt.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
null
null
null
def solve_tilt(B, t): ''' Input: B | Starting board configuration t | Tuple t = (x, y) representing the target square Output: M | List of moves that solves B (or None if B not solvable) ''' M = [] ################## # YOUR CODE HERE # ################## return M #######...
32.506667
71
0.350287
def solve_tilt(B, t): ''' Input: B | Starting board configuration t | Tuple t = (x, y) representing the target square Output: M | List of moves that solves B (or None if B not solvable) ''' M = [] ################## # YOUR CODE HERE # ################## return M #######...
0
0
0
0
0
0
0
0
0
0d4c68181df187231c7452e046bd203646f84ebf
733
py
Python
Problem 07/advent7b.py
mankybansal/advent-of-code-2020
62b389c52d488ea88443b564b6b6b89fd7b5290b
[ "Apache-2.0" ]
null
null
null
Problem 07/advent7b.py
mankybansal/advent-of-code-2020
62b389c52d488ea88443b564b6b6b89fd7b5290b
[ "Apache-2.0" ]
null
null
null
Problem 07/advent7b.py
mankybansal/advent-of-code-2020
62b389c52d488ea88443b564b6b6b89fd7b5290b
[ "Apache-2.0" ]
null
null
null
ad_list = {} for line in open('input.txt', 'r').readlines(): rules = line.strip().replace('.', '').replace('contain', '').replace(',', ' ').split(' ') master_key = None for i in range(len(rules)): if i == 0: split_rule = rules[i].split(' ') key = split_rule[0] + split_rule[1] if key not in ad_list: ...
25.275862
91
0.622101
ad_list = {} for line in open('input.txt', 'r').readlines(): rules = line.strip().replace('.', '').replace('contain', '').replace(',', ' ').split(' ') master_key = None for i in range(len(rules)): if i == 0: split_rule = rules[i].split(' ') key = split_rule[0] + split_rule[1] if key not in ad_list: ...
0
0
0
0
0
135
0
0
23
398f084171b85e93a22c9f974a994550bcc35634
1,019
py
Python
DAGs/1.x/dag-run-var.py
094459/blog-mwaa-variables
4ad92bc778c1acd7afb2d3ba4f03b13c674d1274
[ "MIT" ]
1
2021-08-02T22:54:30.000Z
2021-08-02T22:54:30.000Z
DAGs/1.x/dag-run-var.py
094459/blog-mwaa-variables
4ad92bc778c1acd7afb2d3ba4f03b13c674d1274
[ "MIT" ]
null
null
null
DAGs/1.x/dag-run-var.py
094459/blog-mwaa-variables
4ad92bc778c1acd7afb2d3ba4f03b13c674d1274
[ "MIT" ]
null
null
null
from airflow import DAG from airflow.operators.bash_operator import BashOperator from airflow.utils.dates import days_ago with DAG( dag_id="airflow_variables_atruntime", schedule_interval=None, catchup=False, start_date=days_ago(1)) as dag: get_var_filename = BashOperator( task_id="get_var...
42.458333
166
0.712463
from airflow import DAG from airflow.operators.bash_operator import BashOperator from airflow.utils.dates import days_ago with DAG( dag_id="airflow_variables_atruntime", schedule_interval=None, catchup=False, start_date=days_ago(1)) as dag: get_var_filename = BashOperator( task_id="get_var...
0
0
0
0
0
0
0
0
0
742d56ff81c4a523a35051ac2e424c33bf54fbb9
7,877
py
Python
sasdocs/project.py
benjamincorcoran/sasdocs
cbcc022d47c4dc4b3b8f37189b951be3cc4b4648
[ "MIT" ]
5
2020-02-14T12:32:01.000Z
2021-12-20T10:01:10.000Z
sasdocs/project.py
benjamincorcoran/sasdocs
cbcc022d47c4dc4b3b8f37189b951be3cc4b4648
[ "MIT" ]
45
2019-12-26T19:00:33.000Z
2021-04-21T14:16:34.000Z
sasdocs/project.py
benjamincorcoran/sasdocs
cbcc022d47c4dc4b3b8f37189b951be3cc4b4648
[ "MIT" ]
null
null
null
import datetime
34.700441
124
0.596166
import re import datetime import logging import pathlib import datetime import jinja2 import importlib.resources as pkg_resources from collections import Counter from . import templates, format_logger from .program import sasProgram class sasProject(object): """ Abstracted SAS project c...
0
0
0
7,578
0
0
0
19
238
0192ea60b65fdb8c659fb3e983ac74af93a1b3af
18,146
py
Python
web/JPS_EMISSIONS/python/latest/main.py
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
011aee78c016b76762eaf511c78fabe3f98189f4
[ "MIT" ]
21
2021-03-08T01:58:25.000Z
2022-03-09T15:46:16.000Z
web/JPS_EMISSIONS/python/latest/main.py
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
011aee78c016b76762eaf511c78fabe3f98189f4
[ "MIT" ]
63
2021-05-04T15:05:30.000Z
2022-03-23T14:32:29.000Z
web/JPS_EMISSIONS/python/latest/main.py
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
011aee78c016b76762eaf511c78fabe3f98189f4
[ "MIT" ]
15
2021-03-08T07:52:03.000Z
2022-03-29T04:46:20.000Z
# ## PART 2 - read the power plant database, select different type power plant, and reference plant emission for both ccs and baseline import pandas as pd import sys import json # import time from screen_ccs import ccs_screen from emission_ccs import emission_aggregation_ccs from post_process_ccs import bau_ccs_post,...
38.608511
327
0.705279
# ## PART 2 - read the power plant database, select different type power plant, and reference plant emission for both ccs and baseline import pandas as pd import sys import json # import time from screen_ccs import ccs_screen from emission_ccs import emission_aggregation_ccs from post_process_ccs import bau_ccs_post,...
0
0
0
0
0
0
0
0
0
7eb78edf8a3f1ed58f4fc20d6c5b9eaba2c53668
633
py
Python
Player.py
hypnotic322/ping_pong
269d6936bf4cc4e49f7566224670e7d14d063136
[ "CC0-1.0" ]
null
null
null
Player.py
hypnotic322/ping_pong
269d6936bf4cc4e49f7566224670e7d14d063136
[ "CC0-1.0" ]
null
null
null
Player.py
hypnotic322/ping_pong
269d6936bf4cc4e49f7566224670e7d14d063136
[ "CC0-1.0" ]
null
null
null
#- - ( )
37.235294
64
0.595577
from pygame import * from GameSprite import GameSprite #класс-наследник для спрайта-игрока (управляется стрелками) class Player(GameSprite): def update_r(self): keys = key.get_pressed() if keys[K_UP] and self.rect.y > 5: self.rect.y -= self.speed if keys[K_DOWN] and self....
100
0
0
492
0
0
0
11
69
2f5e7d4cf2a9e75233b5bc534bfedc2535861d5a
15,723
py
Python
src/Sentence_Extraction.py
German-NLP-Group/german-transformer-training
0e5a53215a1837fdb10cf1a774fa0059069c6c25
[ "BSD-2-Clause" ]
15
2020-08-15T12:27:02.000Z
2021-09-17T15:32:22.000Z
src/Sentence_Extraction.py
PhilipMay/german-transformer-training
0e5a53215a1837fdb10cf1a774fa0059069c6c25
[ "BSD-2-Clause" ]
2
2020-09-24T12:38:53.000Z
2021-03-05T17:31:30.000Z
src/Sentence_Extraction.py
PhilipMay/german-transformer-training
0e5a53215a1837fdb10cf1a774fa0059069c6c25
[ "BSD-2-Clause" ]
1
2021-03-18T10:45:44.000Z
2021-03-18T10:45:44.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 30 22:57:06 2020 @author: philipp """ # ============================================================================= # Data Prep # ============================================================================= #with open('data/start.txt', 'r') as ...
34.180435
103
0.507092
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 30 22:57:06 2020 @author: philipp """ # ============================================================================= # Data Prep # ============================================================================= #with open('data/start.txt', 'r') as ...
2
1,216
0
0
3,140
807
0
-16
237
eb8764ee4f65524733f6f787900731f8421530c7
2,433
py
Python
samples/jax/tools/numpy_representation.py
fgolemo/segar
8e21f8ee01bc72adb84dec7998b014d11d2b1fbe
[ "MIT" ]
19
2022-02-16T18:45:12.000Z
2022-03-25T10:42:19.000Z
samples/jax/tools/numpy_representation.py
microsoft/segar
78463968238482ae035121504458dd0909107e10
[ "MIT" ]
4
2022-02-16T22:58:00.000Z
2022-03-02T23:11:10.000Z
samples/jax/tools/numpy_representation.py
fgolemo/segar
8e21f8ee01bc72adb84dec7998b014d11d2b1fbe
[ "MIT" ]
5
2022-02-17T01:46:18.000Z
2022-03-21T21:21:19.000Z
__author__ = "R Devon Hjelm, Bogdan Mazoure, Florian Golemo" __copyright__ = "Copyright (c) Microsoft Corporation and Mila - Quebec AI " \ "Institute" __license__ = "MIT" import jax.numpy as jnp if __name__ == '__main__': np_model = NumpyRepresentation(n_action=2) obs = jnp.ones(shape=(64, 64...
36.313433
79
0.561036
__author__ = "R Devon Hjelm, Bogdan Mazoure, Florian Golemo" __copyright__ = "Copyright (c) Microsoft Corporation and Mila - Quebec AI " \ "Institute" __license__ = "MIT" from flax.training.train_state import TrainState from flax.training import checkpoints import jax.numpy as jnp import jax import opt...
0
0
0
1,872
0
0
0
31
157
e1251476b3853c06125fbc5d0140d6f62c8ca04f
4,803
py
Python
Scrapers/maverik_scraper.py
chanson02/ny-bb-scrapers
4239872653d239ef19dc377fe0adb1f1548cd875
[ "MIT" ]
null
null
null
Scrapers/maverik_scraper.py
chanson02/ny-bb-scrapers
4239872653d239ef19dc377fe0adb1f1548cd875
[ "MIT" ]
null
null
null
Scrapers/maverik_scraper.py
chanson02/ny-bb-scrapers
4239872653d239ef19dc377fe0adb1f1548cd875
[ "MIT" ]
null
null
null
import json import time from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys driver = webdriver.Chrome('../chromedriver.exe') driver.maximize_window() driver.get("https://loyalty.maverik.com/locations/map") chain = {"name": "M...
38.119048
897
0.736623
import json import time import pdb import re import traceback from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC fr...
0
0
0
0
0
2,749
0
115
316
86f134f3daad7dc53e0dde0677ce31a0c76762b2
3,321
py
Python
k8s/monitoring/kubemon.py
open-covid-data/healthmap-gdo-temp
5af5c9e2f7dcefa9039dc6b3a2e2c5094566fc2e
[ "MIT" ]
5
2020-04-16T13:54:24.000Z
2020-07-06T13:42:10.000Z
k8s/monitoring/kubemon.py
open-covid-data/healthmap-gdo-temp
5af5c9e2f7dcefa9039dc6b3a2e2c5094566fc2e
[ "MIT" ]
487
2020-04-16T00:56:09.000Z
2020-07-27T09:09:29.000Z
k8s/monitoring/kubemon.py
open-covid-data/healthmap-gdo-temp
5af5c9e2f7dcefa9039dc6b3a2e2c5094566fc2e
[ "MIT" ]
null
null
null
""" Monitor Global.health Kubernetes pods to see if any are stuck in Pending status for a while. If such pods are present, notify on Slack. IMPORTANT: The kubernetes Python package needs to be kept in sync with the EKS Kubernetes version. The compatibility matrix for the client Python library is at https://git...
31.628571
89
0.694369
""" Monitor Global.health Kubernetes pods to see if any are stuck in Pending status for a while. If such pods are present, notify on Slack. IMPORTANT: The kubernetes Python package needs to be kept in sync with the EKS Kubernetes version. The compatibility matrix for the client Python library is at https://git...
3
0
0
0
0
873
0
-5
90
ec4ea648bbf85751e473866e84f114644fa23de4
826
py
Python
setup.py
ninjaotoko/djblog_wordpress_importer
2c59310d5b69e5cad4063656137d330918898bd8
[ "BSD-3-Clause" ]
null
null
null
setup.py
ninjaotoko/djblog_wordpress_importer
2c59310d5b69e5cad4063656137d330918898bd8
[ "BSD-3-Clause" ]
null
null
null
setup.py
ninjaotoko/djblog_wordpress_importer
2c59310d5b69e5cad4063656137d330918898bd8
[ "BSD-3-Clause" ]
null
null
null
# -*- coding:utf8 -*- # # Copyright (c) 2014 Xavier Lesa <xavierlesa@gmail.com>. #All rights reserved. # Distributed under the BSD license, see LICENSE from setuptools import setup, find_packages setup(name='djblog_wordpress_importer', version='0.1', description="Herramienta para migrar wordpress a d...
33.04
93
0.646489
# -*- coding:utf8 -*- # # Copyright (c) 2014 Xavier Lesa <xavierlesa@gmail.com>. # All rights reserved. # Distributed under the BSD license, see LICENSE from setuptools import setup, find_packages import sys, os setup(name='djblog_wordpress_importer', version='0.1', description="Herramienta para migr...
4
0
0
0
0
0
0
-7
22
7c33daca24e569da0a231459053482e72ffd3c2e
10,607
py
Python
cogdl/data/data.py
xssstory/cogdl
ae8de495c365993f19f04774f083960fd282c2a3
[ "MIT" ]
null
null
null
cogdl/data/data.py
xssstory/cogdl
ae8de495c365993f19f04774f083960fd282c2a3
[ "MIT" ]
null
null
null
cogdl/data/data.py
xssstory/cogdl
ae8de495c365993f19f04774f083960fd282c2a3
[ "MIT" ]
null
null
null
import scipy.sparse as sparse
38.017921
104
0.601112
import re import torch import numpy as np import scipy.sparse as sparse from torch_geometric.data import Data as pyg_data class Data(object): r"""A plain old python object modeling a single graph with various (optional) attributes: Args: x (Tensor, optional): Node feature matrix with shape :obj:...
0
1,074
0
9,386
0
0
0
4
112
90183bb1e23adc8c3232b56ac3c0c0c9c8012620
5,155
py
Python
plugin/plugins/nrft/src/check_nrft_nb_batch.py
crazy-canux/xPlugin_Monitoring
4a66d26f9d2982609489eaa0f57d6afb16aca37c
[ "Apache-2.0" ]
2
2015-12-17T04:00:30.000Z
2015-12-22T11:49:01.000Z
plugin/plugins/nrft/src/check_nrft_nb_batch.py
crazy-canux/xPlugin_Monitoring
4a66d26f9d2982609489eaa0f57d6afb16aca37c
[ "Apache-2.0" ]
null
null
null
plugin/plugins/nrft/src/check_nrft_nb_batch.py
crazy-canux/xPlugin_Monitoring
4a66d26f9d2982609489eaa0f57d6afb16aca37c
[ "Apache-2.0" ]
1
2017-02-20T22:57:17.000Z
2017-02-20T22:57:17.000Z
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # Copyright (C) 2015 Canux CHENG <canuxcheng@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including witho...
38.185185
78
0.564694
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # Copyright (C) 2015 Canux CHENG <canuxcheng@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including witho...
0
0
0
1,815
0
0
0
31
44
edeec0965d66e9775459654b8010223ab2b38ced
1,591
py
Python
main.py
Smaniac1/01-Guessing
19f09031bd2907929f2e2ac70e45b793ea4a87eb
[ "MIT" ]
null
null
null
main.py
Smaniac1/01-Guessing
19f09031bd2907929f2e2ac70e45b793ea4a87eb
[ "MIT" ]
null
null
null
main.py
Smaniac1/01-Guessing
19f09031bd2907929f2e2ac70e45b793ea4a87eb
[ "MIT" ]
null
null
null
import random Quit = False while not Quit: #Start up message to the user print("Hello user, this program allows you to play a guessing game"\ " with the computer. The computer will select a number between 1 and"\ " your max number and you will have to guess which number the computer has"\ " select...
34.586957
85
0.636706
import random Quit = False while not Quit: #Start up message to the user print("Hello user, this program allows you to play a guessing game"\ " with the computer. The computer will select a number between 1 and"\ " your max number and you will have to guess which number the computer has"\ " select...
0
0
0
0
0
0
0
0
0
619a0830c73d2526e60ce4d6b6445ebb1a0e8f1c
156
py
Python
lino_xl/lib/online/__init__.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
1
2018-01-12T14:09:48.000Z
2018-01-12T14:09:48.000Z
lino_xl/lib/online/__init__.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
1
2019-09-10T05:03:47.000Z
2019-09-10T05:03:47.000Z
lino_xl/lib/online/__init__.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
null
null
null
"""A package to differentiate between the "standard" `users` module and the version with online registration .. autosummary:: :toctree: users """
15.6
60
0.705128
"""A package to differentiate between the "standard" `users` module and the version with online registration .. autosummary:: :toctree: users """
0
0
0
0
0
0
0
0
0
514621a0235804c4c7a393dc5ca7be87092a87f3
1,231
py
Python
development/migrations/0003_auto_20171006_1429.py
damgambit/james-gattuso-realty
f1ef70a2d4e8d4cbc2d5774f92891560b89ec63b
[ "Apache-2.0" ]
null
null
null
development/migrations/0003_auto_20171006_1429.py
damgambit/james-gattuso-realty
f1ef70a2d4e8d4cbc2d5774f92891560b89ec63b
[ "Apache-2.0" ]
4
2020-02-12T00:07:36.000Z
2021-12-13T19:46:18.000Z
development/migrations/0003_auto_20171006_1429.py
damgambit/james-gattuso-realty
f1ef70a2d4e8d4cbc2d5774f92891560b89ec63b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-06 14:29 from __future__ import unicode_literals
30.02439
67
0.595451
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-06 14:29 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('development', '0002_auto_20171005_1911'), ] operations = [ migrations.Alter...
0
0
0
1,052
0
0
0
19
46
b28de891c603a05a76b0cf095b7e5769bfbfc711
79
py
Python
examples/all_of_model_models.py
n0npax/OpenAlchemy
ba1ff4e38c5721ff2a5f1a24e3db58792869d20c
[ "Apache-2.0" ]
null
null
null
examples/all_of_model_models.py
n0npax/OpenAlchemy
ba1ff4e38c5721ff2a5f1a24e3db58792869d20c
[ "Apache-2.0" ]
null
null
null
examples/all_of_model_models.py
n0npax/OpenAlchemy
ba1ff4e38c5721ff2a5f1a24e3db58792869d20c
[ "Apache-2.0" ]
null
null
null
from open_alchemy import init_yaml init_yaml("all-of-model-example-spec.yml")
19.75
42
0.810127
from open_alchemy import init_yaml init_yaml("all-of-model-example-spec.yml")
0
0
0
0
0
0
0
0
0
73698cea73e0ee40d719751cf0efe4cef0bdb076
466
py
Python
Python/Rock_paper-scissor/paper.py
janvi16/-HACKTOBERFEST2K20
aa9c8b6f7feb245793c0a003ba6fbea3fca9ca22
[ "Apache-2.0" ]
30
2020-10-07T09:16:29.000Z
2020-10-19T06:50:37.000Z
Python/Rock_paper-scissor/paper.py
janvi16/-HACKTOBERFEST2K20
aa9c8b6f7feb245793c0a003ba6fbea3fca9ca22
[ "Apache-2.0" ]
70
2020-10-07T03:26:13.000Z
2020-10-25T06:58:07.000Z
Python/Rock_paper-scissor/paper.py
janvi16/-HACKTOBERFEST2K20
aa9c8b6f7feb245793c0a003ba6fbea3fca9ca22
[ "Apache-2.0" ]
280
2020-10-07T03:39:21.000Z
2020-10-25T07:16:33.000Z
from random import randint import utils objs = ["Rock", "Paper", "Scissor"] computer = objs[randint(0, 2)] playing = True while playing: player = input("Rock, Paper or Scissor ? ") computer = objs[randint(0, 2)] print(utils.getWinner(player, computer)) key = input( """ 1. To...
17.259259
50
0.583691
from random import randint import utils objs = ["Rock", "Paper", "Scissor"] computer = objs[randint(0, 2)] playing = True while playing: player = input("Rock, Paper or Scissor ? ") computer = objs[randint(0, 2)] print(utils.getWinner(player, computer)) key = input( """ 1. To...
0
0
0
0
0
0
0
0
0
a2c198e5b3eef3213a7a50764454138d1797856d
3,156
py
Python
brainspell/deploy.py
akeshavan/brainspell-neo
05259770a9928d01adaaa028e9d2115750c4fe03
[ "MIT" ]
7
2017-06-25T18:44:30.000Z
2019-06-06T20:05:36.000Z
brainspell/deploy.py
akeshavan/brainspell-neo
05259770a9928d01adaaa028e9d2115750c4fe03
[ "MIT" ]
57
2017-03-25T01:54:37.000Z
2019-06-05T18:08:16.000Z
brainspell/deploy.py
akeshavan/brainspell-neo
05259770a9928d01adaaa028e9d2115750c4fe03
[ "MIT" ]
6
2017-04-15T16:18:15.000Z
2018-01-19T00:22:24.000Z
""" A deployment script that accomplishes the following: Sets up a handler for the endpoint /deploy, which when triggered on a production port: 1) Navigates into a "debug" directory, where it pulls the latest copy of Brainspell from GitHub (or clones a copy, if one doesn't already exist) 2) Starts the "debug" Brainsp...
42.08
161
0.682826
""" A deployment script that accomplishes the following: Sets up a handler for the endpoint /deploy, which when triggered on a production port: 1) Navigates into a "debug" directory, where it pulls the latest copy of Brainspell from GitHub (or clones a copy, if one doesn't already exist) 2) Starts the "debug" Brainsp...
0
0
0
1,834
0
0
0
-16
158
118b7a5fdf0fc04ab5868e2097e62ce3a5802e90
1,842
py
Python
packages/OpenCV/nodes/OpenCV___SaveImage0/OpenCV___SaveImage0___METACODE.py
lidong1266/Ryven-Switch
68d1f71e81d6564196f44ca49d5903f06db6a4d9
[ "MIT" ]
18
2021-01-18T09:52:41.000Z
2022-03-22T10:48:44.000Z
packages/OpenCV/nodes/OpenCV___SaveImage0/OpenCV___SaveImage0___METACODE.py
xamofb-xsk/Ryven
8c3dcc613098863ae9fb747e62c0bb9d9eb4cef1
[ "MIT" ]
null
null
null
packages/OpenCV/nodes/OpenCV___SaveImage0/OpenCV___SaveImage0___METACODE.py
xamofb-xsk/Ryven
8c3dcc613098863ae9fb747e62c0bb9d9eb4cef1
[ "MIT" ]
3
2021-01-18T09:49:42.000Z
2022-03-22T10:48:47.000Z
# API METHODS # self.main_widget <- access to main widget # Ports # self.input(index) <- access to input data # set_output_val(index, val) <- set output data port value # self.exec_output(index) <- executes an execution output # self.create_new_input(type_, label, widget_nam...
27.909091
83
0.60532
from NIENV import * # API METHODS # self.main_widget <- access to main widget # Ports # self.input(index) <- access to input data # set_output_val(index, val) <- set output data port value # self.exec_output(index) <- executes an execution output # self.create_new_input(type...
0
0
0
1,055
0
0
0
-13
68
c54a81616f05eb2e66465abf762e6472dcb2c69f
1,032
py
Python
src_doit/js.py
hat-open/hat-util
88729b163bfa0dd6b3e4eed9a089895aa6a684d6
[ "Apache-2.0" ]
1
2022-02-01T13:42:09.000Z
2022-02-01T13:42:09.000Z
src_doit/js.py
hat-open/hat-util
88729b163bfa0dd6b3e4eed9a089895aa6a684d6
[ "Apache-2.0" ]
null
null
null
src_doit/js.py
hat-open/hat-util
88729b163bfa0dd6b3e4eed9a089895aa6a684d6
[ "Apache-2.0" ]
null
null
null
from pathlib import Path from hat.doit.js import (run_eslint) __all__ = ['task_js_build', 'task_js_check', 'task_js_deps'] build_js_dir = Path('build/js') src_js_dir = Path('src_js') readme_path = Path('README.rst') def task_js_build(): """JavaScript - build""" return {'actions': [b...
23.454545
60
0.584302
from pathlib import Path from hat.doit import common from hat.doit.js import (build_npm, run_eslint) __all__ = ['task_js_build', 'task_js_check', 'task_js_deps'] build_js_dir = Path('build/js') src_js_dir = Path('src_js') readme_path = Path('README.rst') def task_js...
0
0
0
0
0
306
0
42
50
7056942e80018b443e8d3dc005bbac35db071d61
3,339
py
Python
mdssdk/fcns.py
akshatha-s13/mdssdk
615a5528d0af1201e8fe8f305c62b258e5433990
[ "Apache-2.0" ]
null
null
null
mdssdk/fcns.py
akshatha-s13/mdssdk
615a5528d0af1201e8fe8f305c62b258e5433990
[ "Apache-2.0" ]
null
null
null
mdssdk/fcns.py
akshatha-s13/mdssdk
615a5528d0af1201e8fe8f305c62b258e5433990
[ "Apache-2.0" ]
null
null
null
import logging log = logging.getLogger(__name__)
29.8125
79
0.545373
import logging import re from .connection_manager.errors import CLIError log = logging.getLogger(__name__) class Fcns(object): def __init__(self, switch): self.__swobj = switch def database(self, vsan=None, fcid=None, detail=False): cmd = "show fcns database" if fcid is not None: ...
0
1,496
0
1,710
0
0
0
14
68
4891533bd7a0213b27acb0112898f0244531468b
3,410
py
Python
src/ThaiPersonalCardExtract/utils.py
ggafiled/ThaiPersonalCardExtract
7747086ff4d28ad9ec04f8ca7d68ac6e6f393cd4
[ "Apache-2.0" ]
12
2021-08-11T08:48:48.000Z
2022-02-10T03:06:34.000Z
src/ThaiPersonalCardExtract/utils.py
ggafiled/ThaiPersonalCardExtract
7747086ff4d28ad9ec04f8ca7d68ac6e6f393cd4
[ "Apache-2.0" ]
2
2021-08-21T16:14:39.000Z
2022-02-17T15:31:07.000Z
src/ThaiPersonalCardExtract/utils.py
ggafiled/ThaiPersonalCardExtract
7747086ff4d28ad9ec04f8ca7d68ac6e6f393cd4
[ "Apache-2.0" ]
7
2021-08-11T09:32:02.000Z
2022-03-26T13:56:46.000Z
import numpy as np def convertScale(img, alpha, beta): """Add bias and gain to an image with saturation arithmetics. Unlike cv2.convertScaleAbs, it does not take an absolute value, which would lead to nonsensical results (e.g., a pixel at 44 with alpha = 3 and beta = -210 becomes 78 with OpenCV, whe...
31.869159
120
0.676833
from enum import Enum import cv2 import numpy as np class Language(Enum): THAI = 'tha' ENGLISH = 'eng' MIX = 'mix' def __str__(self): return self.value class Provider(Enum): EASYOCR = 'easyocr' TESSERACT = 'tesseract' DEFAULT = 'default' def __str__(self): return se...
0
0
0
331
0
2,334
0
-11
181
ec1e83b61d34e793bf15866f24a7fc264fe80cfc
4,096
py
Python
adv_train/scripts/test_langevin.py
ChiaraRgnz/Adversarial-Training
637c4d2a1fea5e05294735952146dde2ebc1263c
[ "MIT" ]
null
null
null
adv_train/scripts/test_langevin.py
ChiaraRgnz/Adversarial-Training
637c4d2a1fea5e05294735952146dde2ebc1263c
[ "MIT" ]
null
null
null
adv_train/scripts/test_langevin.py
ChiaraRgnz/Adversarial-Training
637c4d2a1fea5e05294735952146dde2ebc1263c
[ "MIT" ]
1
2022-01-31T06:14:41.000Z
2022-01-31T06:14:41.000Z
# Should test if the langevin actually produces adversarial against a pretrained classifier from adv_train.dynamic import Attacker import torch import torch.nn as nn if __name__ == "__main__": parser = Attacker.add_arguments() parser = LangevinAttack.add_arguments(parser) args = parser.parse_args() ...
30.117647
91
0.591797
# Should test if the langevin actually produces adversarial against a pretrained classifier from adv_train.launcher import Launcher from adv_train.model import ( DatasetType, MnistModel, CifarModel, load_classifier, load_dataset, ) from adv_train.dynamic import Attacker from adv_train.dataset import...
0
1,294
0
2,103
0
0
0
145
155
67d03d4275ac805b177fc497641efceef96e964a
955
py
Python
ITE-428/Databases/pracSqlExtra12.py
richeyphu/ITE-428-LAB
c68fdddb7bbfa8b74a58a0b26bdcb4565af3b08b
[ "MIT" ]
1
2021-07-14T11:12:19.000Z
2021-07-14T11:12:19.000Z
ITE-428/Databases/pracSqlExtra12.py
richeyphu/ITE-428-LAB
c68fdddb7bbfa8b74a58a0b26bdcb4565af3b08b
[ "MIT" ]
null
null
null
ITE-428/Databases/pracSqlExtra12.py
richeyphu/ITE-428-LAB
c68fdddb7bbfa8b74a58a0b26bdcb4565af3b08b
[ "MIT" ]
null
null
null
if __name__ == '__main__': dbname = "myDatabase/Sqlite_Northwind.sqlite3" sales = [int(input(" : "))] sqlQuery(dbname, sales)
27.285714
88
0.542408
import sqlite3 def sqlQuery(db, args=[]): with (sqlite3.connect(db)) as conn: conn.row_factory = sqlite3.Row sql_command = '''SELECT p.ProductId, ProductName, count(p.ProductId) as NoSales FROM Products p JOIN OrdersDetails o ON p.ProductId...
147
0
0
0
0
659
0
-7
98
9c9eb60291265597b2eadc48b9e32d0f236e3856
1,027
py
Python
xontrib/ipysh.py
c6401/xontrib-ipython-shell-magic
933545e7d5f7091ce61d9b115c5386b10450312a
[ "MIT" ]
null
null
null
xontrib/ipysh.py
c6401/xontrib-ipython-shell-magic
933545e7d5f7091ce61d9b115c5386b10450312a
[ "MIT" ]
1
2021-08-18T16:20:51.000Z
2021-08-18T16:20:51.000Z
xontrib/ipysh.py
c6401/xontrib-ipython-shell-magic
933545e7d5f7091ce61d9b115c5386b10450312a
[ "MIT" ]
null
null
null
import re __all__ = ( 'ish_out', 'ish_run', ) expression_str = r'\!([^\(\[].*)' expression = re.compile(expression_str) assignment = re.compile(r'([a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*' + expression_str)
27.026316
114
0.591042
import re import subprocess from IPython.utils.text import SList __all__ = ( 'ish_out', 'ish_run', ) expression_str = r'\!([^\(\[].*)' expression = re.compile(expression_str) assignment = re.compile(r'([a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*' + expression_str) def ish_out(command): print(subprocess.run(command,...
0
493
0
0
0
201
0
11
114
a6c2ae05084aff02094ef04e7173c8bf632f93c6
1,011
py
Python
astrality/tests/module/test_setup_action_block.py
fossabot/astrality
25666adf3519a7fc8389e43a974eb8e7d1e60b35
[ "MIT" ]
111
2018-03-19T12:56:35.000Z
2022-02-05T11:19:04.000Z
astrality/tests/module/test_setup_action_block.py
fossabot/astrality
25666adf3519a7fc8389e43a974eb8e7d1e60b35
[ "MIT" ]
120
2018-02-22T11:23:08.000Z
2021-03-25T22:13:47.000Z
astrality/tests/module/test_setup_action_block.py
fossabot/astrality
25666adf3519a7fc8389e43a974eb8e7d1e60b35
[ "MIT" ]
7
2018-04-06T14:28:33.000Z
2020-03-18T20:25:59.000Z
"""Tests for handling setup action blocks in ModuleManager.""" from pathlib import Path from astrality.module import ModuleManager def test_that_setup_block_is_only_executed_once(tmpdir): """Setup blocks in modules should only be performed once.""" touched = Path(tmpdir, 'touched.tmp') modules = { ...
27.324324
68
0.644906
"""Tests for handling setup action blocks in ModuleManager.""" from pathlib import Path from astrality.module import ModuleManager def test_that_setup_block_is_only_executed_once(tmpdir): """Setup blocks in modules should only be performed once.""" touched = Path(tmpdir, 'touched.tmp') modules = { ...
0
0
0
0
0
0
0
0
0
2eb9b1394a4644af3c8cacdca8f50c5ceeb578e7
26,419
py
Python
experiments/higgs/higgs/source/runtime/layout.py
fabianmuehlboeck/monnom
609b307d9fa9e6641443f34dbcc0b035b34d3044
[ "BSD-3-Clause", "MIT" ]
2
2021-11-16T20:58:02.000Z
2021-12-05T18:15:41.000Z
experiments/higgs/higgs/source/runtime/layout.py
fabianmuehlboeck/monnom
609b307d9fa9e6641443f34dbcc0b035b34d3044
[ "BSD-3-Clause", "MIT" ]
null
null
null
experiments/higgs/higgs/source/runtime/layout.py
fabianmuehlboeck/monnom
609b307d9fa9e6641443f34dbcc0b035b34d3044
[ "BSD-3-Clause", "MIT" ]
null
null
null
import sys from copy import deepcopy D_OUT_FILE = 'runtime/layout.d' JS_OUT_FILE = 'runtime/layout.js' JS_DEF_PREFIX = '$rt_' # Type sizes in bytes typeSize = { 'uint8':1, 'uint16':2, 'uint32':4, 'uint64':8, 'int8':1, 'int16':2, 'int32':4, 'int64':8, 'float64':8, 'rawptr':8, ...
28.105319
137
0.523828
import sys import string from copy import deepcopy D_OUT_FILE = 'runtime/layout.d' JS_OUT_FILE = 'runtime/layout.js' JS_DEF_PREFIX = '$rt_' # Type sizes in bytes typeSize = { 'uint8':1, 'uint16':2, 'uint32':4, 'uint64':8, 'int8':1, 'int16':2, 'int32':4, 'int64':8, 'float64':8, ...
0
0
0
7,591
0
353
0
-8
458
54ca825ceaa589ccd5a09e3f4b4eda87fbe86de1
3,280
py
Python
seisflows/system/tiger_md_gpu.py
chukren/seisflows
c4a5a8a9411b365c9bba818f6ed3ba03f24e681b
[ "BSD-2-Clause" ]
1
2017-08-31T09:11:39.000Z
2017-08-31T09:11:39.000Z
seisflows/system/tiger_md_gpu.py
chukren/seisflows
c4a5a8a9411b365c9bba818f6ed3ba03f24e681b
[ "BSD-2-Clause" ]
null
null
null
seisflows/system/tiger_md_gpu.py
chukren/seisflows
c4a5a8a9411b365c9bba818f6ed3ba03f24e681b
[ "BSD-2-Clause" ]
1
2020-04-16T08:38:49.000Z
2020-04-16T08:38:49.000Z
from seisflows.tools.config import SeisflowsParameters, SeisflowsPaths PAR = SeisflowsParameters() PATH = SeisflowsPaths()
31.538462
128
0.558537
import os import sys from os.path import abspath, join from seisflows.tools import unix from seisflows.tools.code import call, findpath, saveobj from seisflows.tools.config import ParameterError, custom_import, \ SeisflowsObjects, SeisflowsParameters, SeisflowsPaths PAR = SeisflowsParameters() PATH = SeisflowsPa...
0
0
0
2,929
0
0
0
90
135
b1eceb58e10379816e758b6eb289db3e703e794c
14,441
py
Python
archived/v0/code/ext_genepheno_candidates.py
HazyResearch/dd-genomics
3e3f272327d4c29daa53347b7ddb20ea1a9ae78a
[ "Apache-2.0" ]
13
2015-04-03T04:55:54.000Z
2021-11-08T06:19:09.000Z
archived/v0/code/ext_genepheno_candidates.py
HazyResearch/dd-genomics
3e3f272327d4c29daa53347b7ddb20ea1a9ae78a
[ "Apache-2.0" ]
85
2015-04-29T02:35:42.000Z
2015-08-03T18:37:41.000Z
archived/v0/code/ext_genepheno_candidates.py
HazyResearch/dd-genomics
3e3f272327d4c29daa53347b7ddb20ea1a9ae78a
[ "Apache-2.0" ]
7
2015-04-02T23:38:25.000Z
2022-02-18T12:22:44.000Z
#! /usr/bin/env python3 import fileinput import random import re from dstruct.Mention import Mention from dstruct.Sentence import Sentence from dstruct.Relation import Relation from helper.dictionaries import load_dict from helper.easierlife import get_dict_from_TSVline, no_op, TSVstring2list # Load the gene<->hpote...
49.119048
79
0.532096
#! /usr/bin/env python3 import fileinput import random import re from dstruct.Mention import Mention from dstruct.Sentence import Sentence from dstruct.Relation import Relation from helper.dictionaries import load_dict from helper.easierlife import get_dict_from_TSVline, no_op, TSVstring2list # Load the gene<->hpote...
0
0
0
0
0
1,257
0
0
22
acabce901b355b7c739c040859fb887508e7978a
5,806
py
Python
exercises/adaboost_scenario.py
noamwino/IML.HUJI
0b1b6f333a16200fa7717af1be12e5f38694b74c
[ "MIT" ]
null
null
null
exercises/adaboost_scenario.py
noamwino/IML.HUJI
0b1b6f333a16200fa7717af1be12e5f38694b74c
[ "MIT" ]
null
null
null
exercises/adaboost_scenario.py
noamwino/IML.HUJI
0b1b6f333a16200fa7717af1be12e5f38694b74c
[ "MIT" ]
null
null
null
import numpy as np from typing import Tuple def generate_data(n: int, noise_ratio: float) -> Tuple[np.ndarray, np.ndarray]: """ Generate a dataset in R^2 of specified size Parameters ---------- n: int Number of samples to generate noise_ratio: float Ratio of labels to invert ...
42.379562
117
0.629866
import numpy as np from typing import Tuple from IMLearn.metalearners.adaboost import AdaBoost from IMLearn.learners.classifiers import DecisionStump from utils import * import plotly.graph_objects as go from plotly.subplots import make_subplots from IMLearn.metrics.loss_functions import accuracy def generate_data(n:...
0
0
0
0
0
4,416
0
122
247
2ed83bf71183bf748436ac2bee2e9d5ee525fe75
3,548
py
Python
src/sas/sasgui/perspectives/fitting/resultpanel.py
andyfaff/sasview
c00a797ab9c4ddc60f0fa8a64ae8a2067c225921
[ "BSD-3-Clause" ]
null
null
null
src/sas/sasgui/perspectives/fitting/resultpanel.py
andyfaff/sasview
c00a797ab9c4ddc60f0fa8a64ae8a2067c225921
[ "BSD-3-Clause" ]
null
null
null
src/sas/sasgui/perspectives/fitting/resultpanel.py
andyfaff/sasview
c00a797ab9c4ddc60f0fa8a64ae8a2067c225921
[ "BSD-3-Clause" ]
null
null
null
""" FitPanel class contains fields allowing to fit models and data :note: For Fit to be performed the user should check at least one parameter on fit Panel window. """ import wx import wx.lib.newevent (PlotResultEvent, EVT_PLOT_RESULT) = wx.lib.newevent.NewEvent()
35.48
98
0.644307
""" FitPanel class contains fields allowing to fit models and data :note: For Fit to be performed the user should check at least one parameter on fit Panel window. """ import wx import wx.lib.newevent from wx.aui import AuiNotebook as Notebook import datetime from bumps.gui.convergence_view import Convergence...
0
0
0
2,892
0
0
0
200
180
29ecccaeaaefda909eced886e9f6ccfb802c9ab1
1,360
py
Python
binary_search_unsorted.py
paigelarson/Lessons
842a6df67551c781acf4243bb40ee8dc04a932cb
[ "MIT" ]
null
null
null
binary_search_unsorted.py
paigelarson/Lessons
842a6df67551c781acf4243bb40ee8dc04a932cb
[ "MIT" ]
null
null
null
binary_search_unsorted.py
paigelarson/Lessons
842a6df67551c781acf4243bb40ee8dc04a932cb
[ "MIT" ]
null
null
null
from random import randint from random_word import RandomWords random_num_list=[] for i in range(200): random_num_list.append(randint(0,1000)) r = RandomWords() random_word_list=r.get_random_words() list_type=input("Which type of list would you like to sort and search, words or numbers?") if lis...
19.428571
122
0.633824
from random import randint from random_word import RandomWords def mysort(my_list): new_list=[] while my_list: min=my_list[0] for i in my_list: if i<min: min=i new_list.append(min) my_list.remove(min) return new_list def binary(arr, x): low=0 high=len(arr)-1 ...
0
0
0
0
0
413
0
0
50
5bb069bab349991d6869642252a999be8287805a
4,513
py
Python
integrationtest/vm/virtualrouter/destroy_none_vr_vms.py
sherry546/zstack-woodpecker
54a37459f2d72ce6820974feaa6eb55772c3d2ce
[ "Apache-2.0" ]
2
2016-03-23T08:45:44.000Z
2017-06-26T02:40:46.000Z
integrationtest/vm/virtualrouter/destroy_none_vr_vms.py
KevinDavidMitnick/zstack-woodpecker
96257faaf3c362168d008bdb47002025ad669b24
[ "Apache-2.0" ]
null
null
null
integrationtest/vm/virtualrouter/destroy_none_vr_vms.py
KevinDavidMitnick/zstack-woodpecker
96257faaf3c362168d008bdb47002025ad669b24
[ "Apache-2.0" ]
1
2017-05-19T06:40:40.000Z
2017-05-19T06:40:40.000Z
''' Cleanup all VMs (find from ZStack database). It is mainly for debuging. @author: Youyk ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import apibinding.inventory as inventory thread_threshold=1000 session_uuid = None session_to = None session_mc = None
35.81746
105
0.671837
''' Cleanup all VMs (find from ZStack database). It is mainly for debuging. @author: Youyk ''' import threading import time import sys import zstackwoodpecker.operations.resource_operations as res_ops import zstackwoodpecker.operations.config_operations as con_ops import zstackwoodpecker.operations.net_operations a...
0
0
0
0
0
3,755
0
179
269
0a9dad405f706381771e6ea0364a9fb2d5566d96
8,201
py
Python
workshop3/src/NEL_Jacques-212588109-workshop3/mcts.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
workshop3/src/NEL_Jacques-212588109-workshop3/mcts.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
workshop3/src/NEL_Jacques-212588109-workshop3/mcts.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Tuple from time import perf_counter import numpy as np from common.util import argmax def uct_search(init_state, util_fn: Callable[[Tuple[int, ...]], float], selection_criteria: str = 'max_child', exploration_bias: flo...
32.41502
100
0.556883
from __future__ import annotations from typing import Tuple, List from random import randint from time import perf_counter import numpy as np from common.util import argmax from common.ticktack import * class Node: parent: Node = None # node's parent state: Tuple[int, ...] = None # state...
0
0
0
1,266
0
892
0
19
124
f46a0453bc721f21093cb4d73085465742749467
28,995
py
Python
warden/api/routes.py
pathtoknowhere/warden
3cff5378bf5e47132c3ddf38b9b9caf1085c7e46
[ "MIT" ]
null
null
null
warden/api/routes.py
pathtoknowhere/warden
3cff5378bf5e47132c3ddf38b9b9caf1085c7e46
[ "MIT" ]
null
null
null
warden/api/routes.py
pathtoknowhere/warden
3cff5378bf5e47132c3ddf38b9b9caf1085c7e46
[ "MIT" ]
null
null
null
from flask import (Blueprint) api = Blueprint('api', __name__) # API End Point checks for wallet activity # Gets a local pickle file and dumps - does not work with pandas df # Do not include extension pkl on argument # API End Point with all WARden metadata # Returns a JSON with Test Response on TOR # A...
34.807923
143
0.613002
from flask import (Blueprint, flash, request, current_app, jsonify, Response) from warden_modules import (warden_metadata, positions_dynamic, generatenav, specter_df, current_path, regenerate_nav, home_path...
0
25,791
0
0
0
471
0
456
1,095
b8b90853e75374d2c2f02d73b3181e8fc358fe59
438
py
Python
demo/security.py
bogdan-veliscu/learn-flask
bc587abaa6049ca15bc390bb37356d657c01550a
[ "Apache-2.0" ]
null
null
null
demo/security.py
bogdan-veliscu/learn-flask
bc587abaa6049ca15bc390bb37356d657c01550a
[ "Apache-2.0" ]
null
null
null
demo/security.py
bogdan-veliscu/learn-flask
bc587abaa6049ca15bc390bb37356d657c01550a
[ "Apache-2.0" ]
null
null
null
from user import User users = [ User(1, 'bogdan', 's3cret'), User(2, 'georgi', "pass") ] user_mapping = {u.username: u for u in users} userid_mapping = {u.id: u for u in users}
20.857143
45
0.666667
from user import User users = [ User(1, 'bogdan', 's3cret'), User(2, 'georgi', "pass") ] user_mapping = {u.username: u for u in users} userid_mapping = {u.id: u for u in users} def authenticate(username, password): user = user_mapping.get(username, None) if user and user.password == password: ...
0
0
0
0
0
203
0
0
46
cd1b8f7052e978aa6ae994c255ef1fa0d50e8c47
1,938
py
Python
third_party/ffmpeg/PRESUBMIT.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/ffmpeg/PRESUBMIT.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/ffmpeg/PRESUBMIT.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for FFmpeg repository. Does the following: - Warns users that changes must be submitted via Gerrit. - Warns users when a change is m...
32.847458
79
0.720846
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for FFmpeg repository. Does the following: - Warns users that changes must be submitted via Gerrit. - Warns users when a change is m...
0
0
0
0
0
192
0
-4
45
115598580691b7652be83137464d81aa5043395d
12,235
py
Python
hsstock/utils/date_util.py
hsstock/hsstock
f8841331022e8844537a5c5b08d047e2cc328856
[ "Apache-2.0" ]
2
2018-10-04T08:04:24.000Z
2021-01-21T06:58:30.000Z
hsstock/utils/date_util.py
hsstock/hsstock
f8841331022e8844537a5c5b08d047e2cc328856
[ "Apache-2.0" ]
null
null
null
hsstock/utils/date_util.py
hsstock/hsstock
f8841331022e8844537a5c5b08d047e2cc328856
[ "Apache-2.0" ]
1
2018-10-20T09:39:50.000Z
2018-10-20T09:39:50.000Z
from datetime import datetime import six as six """""" K_DEFAULT_DT_FMT2 = "%Y-%m-%d" def str_to_datetime(date_str, fmt=K_DEFAULT_DT_FMT2, fix=True): """ datetime.datetime eg. '2016-01-01' > datetime.datetime(2016, 1, 1, 0, 0) :param date_str: %Y-%m-%d streg. '2016-01-01' :param fmt: date_str%Y-%m-%...
30.81864
111
0.58586
import time from datetime import datetime, date, timedelta import six as six class DateUtil(): def __init__(self): pass @staticmethod def getDatetimeToday(): return date.today() @staticmethod def getDatetimeToday3(): today = datetime.today() return today.strftime(...
2,229
5,195
0
1,027
0
1,003
0
7
68
a5af6c0ce2e69540230f8212a70815a1f85ad977
2,158
py
Python
rapport/models.py
amineadmane/AutoCare
f4339cdc2d78c985b77b7b1cc469bae67728086b
[ "MIT" ]
null
null
null
rapport/models.py
amineadmane/AutoCare
f4339cdc2d78c985b77b7b1cc469bae67728086b
[ "MIT" ]
null
null
null
rapport/models.py
amineadmane/AutoCare
f4339cdc2d78c985b77b7b1cc469bae67728086b
[ "MIT" ]
null
null
null
# Create your models here.
39.236364
87
0.696478
from django.db import models from mission.models import Vehicule, Conducteur from users.models import User # Create your models here. class RapportSignalProbleme(models.Model): description = models.TextField(null=False, blank=False) vehicule = models.ForeignKey(Vehicule,on_delete=models.CASCADE, null=False) ...
0
0
0
1,951
0
0
0
41
135
e659798959ccc9578bd6057f02b19c89f7c9f6ea
5,763
py
Python
blocking_cache/test/MultiCacheTestCases.py
cornell-brg/pymtl3-mem
458cbc0c667cf8645aad0e33489458eb696f6928
[ "BSD-3-Clause" ]
4
2020-03-13T11:35:30.000Z
2020-04-21T03:01:34.000Z
blocking_cache/test/MultiCacheTestCases.py
cornell-brg/pymtl3-mem
458cbc0c667cf8645aad0e33489458eb696f6928
[ "BSD-3-Clause" ]
4
2020-01-07T20:58:32.000Z
2020-04-01T22:02:31.000Z
blocking_cache/test/MultiCacheTestCases.py
cornell-brg/pymtl3-mem
458cbc0c667cf8645aad0e33489458eb696f6928
[ "BSD-3-Clause" ]
2
2020-09-08T19:34:52.000Z
2021-06-18T14:58:47.000Z
""" ========================================================================= MultiCacheTestCases.py ========================================================================= Test cases for multicache configs Author : Xiaoyu Yan (xy97), Eric Tang (et396) Date : 13 April 2020 """ # Main test memory for dmapped test...
44.330769
94
0.490023
""" ========================================================================= MultiCacheTestCases.py ========================================================================= Test cases for multicache configs Author : Xiaoyu Yan (xy97), Eric Tang (et396) Date : 13 April 2020 """ import pytest from test.sim_utils i...
0
914
0
5
0
4,230
0
85
207
96ed53e2484dd4c575af3c463e44f6ef77c182be
2,641
py
Python
services/weather.py
aalcala07/home_dashboard
3a6606f4afc457d44fc238972bc7e8d36a64ba7b
[ "MIT" ]
null
null
null
services/weather.py
aalcala07/home_dashboard
3a6606f4afc457d44fc238972bc7e8d36a64ba7b
[ "MIT" ]
6
2022-02-11T14:14:08.000Z
2022-02-26T05:15:29.000Z
services/weather.py
aalcala07/home_dashboard
3a6606f4afc457d44fc238972bc7e8d36a64ba7b
[ "MIT" ]
1
2022-02-11T01:19:02.000Z
2022-02-11T01:19:02.000Z
import json OPEN_WEATHER_MAP_API_URL = "https://api.openweathermap.org" with open('cache/services.json') as json_file: service_config = json.load(json_file) configs = [service['configs'] for service in service_config['services'] if service['service'] == 'weather'][0] # Request data from API # Get data from cach...
31.819277
183
0.664142
import requests, json from os.path import exists from decouple import config import logging OPEN_WEATHER_MAP_API_URL = "https://api.openweathermap.org" with open('cache/services.json') as json_file: service_config = json.load(json_file) configs = [service['configs'] for service in service_config['services'] if se...
0
0
0
0
0
2,047
0
14
200
7ce4af0cf9f76cffec16110c3f2022883f828de9
204
py
Python
mini-scripts/Python_RegEx_metacharacters__end_with.txt.py
Web-Dev-Collaborative/PYTHON_PRAC
856f902fb43dcccae168d34ee6aacc02427a7ac6
[ "MIT" ]
5
2021-06-02T23:44:25.000Z
2021-12-27T16:21:57.000Z
mini-scripts/Python_RegEx_metacharacters__end_with.txt.py
Web-Dev-Collaborative/PYTHON_PRAC
856f902fb43dcccae168d34ee6aacc02427a7ac6
[ "MIT" ]
22
2021-05-31T01:33:25.000Z
2021-10-18T18:32:39.000Z
mini-scripts/Python_RegEx_metacharacters__end_with.txt.py
Web-Dev-Collaborative/PYTHON_PRAC
856f902fb43dcccae168d34ee6aacc02427a7ac6
[ "MIT" ]
3
2021-06-19T03:37:47.000Z
2021-08-31T00:49:51.000Z
import re txt = "hello world" # Check if the string ends with 'world': x = re.findall("world$", txt) if x: print("Yes, the string ends with 'world'") else: print("No match") # Author: Bryan G
15.692308
46
0.632353
import re txt = "hello world" # Check if the string ends with 'world': x = re.findall("world$", txt) if x: print("Yes, the string ends with 'world'") else: print("No match") # Author: Bryan G
0
0
0
0
0
0
0
0
0
e284bdf8197d5c25272d53dac5816af3341fd2f8
1,446
py
Python
dlk/python/dlk/frontend/base.py
toohsk/blueoil
596922caa939db9c5ecbac3286fbf6f703865ee6
[ "Apache-2.0" ]
null
null
null
dlk/python/dlk/frontend/base.py
toohsk/blueoil
596922caa939db9c5ecbac3286fbf6f703865ee6
[ "Apache-2.0" ]
1
2018-11-21T07:06:17.000Z
2018-11-21T07:06:17.000Z
dlk/python/dlk/frontend/base.py
toohsk/blueoil
596922caa939db9c5ecbac3286fbf6f703865ee6
[ "Apache-2.0" ]
2
2019-02-08T10:03:34.000Z
2019-03-20T06:25:55.000Z
# -*- coding: utf-8 -*- # Copyright 2018 The Blueoil Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
26.290909
79
0.578838
# -*- coding: utf-8 -*- # Copyright 2018 The Blueoil Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
0
522
0
100
0
0
0
25
67
9eab3df60bae334b85cf23312305a03c5374fbad
364
py
Python
backend/GDVoteSys/apps/migrations/0008_auto_20201218_1104.py
isatisroot/GDTPS
92a599751d46c1a36149de3e283d8c63aa66d1f9
[ "Xnet", "X11" ]
null
null
null
backend/GDVoteSys/apps/migrations/0008_auto_20201218_1104.py
isatisroot/GDTPS
92a599751d46c1a36149de3e283d8c63aa66d1f9
[ "Xnet", "X11" ]
null
null
null
backend/GDVoteSys/apps/migrations/0008_auto_20201218_1104.py
isatisroot/GDTPS
92a599751d46c1a36149de3e283d8c63aa66d1f9
[ "Xnet", "X11" ]
null
null
null
# Generated by Django 3.0.6 on 2020-12-18 03:04
19.157895
47
0.585165
# Generated by Django 3.0.6 on 2020-12-18 03:04 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('apps', '0007_auto_20201218_1039'), ] operations = [ migrations.RenameField( model_name='meeting', old_name='addrress', ...
0
0
0
258
0
0
0
11
46
b9dae700c2d4cf24d05cfadeff4203e1c2368b8f
1,753
py
Python
tests/st/ops/ascend/test_tbe_ops/test_greater.py
unseenme/mindspore
4ba052f0cd9146ac0ccc4880a778706f1b2d0af8
[ "Apache-2.0" ]
2
2020-04-28T03:49:10.000Z
2020-04-28T03:49:13.000Z
tests/st/ops/ascend/test_tbe_ops/test_greater.py
unseenme/mindspore
4ba052f0cd9146ac0ccc4880a778706f1b2d0af8
[ "Apache-2.0" ]
null
null
null
tests/st/ops/ascend/test_tbe_ops/test_greater.py
unseenme/mindspore
4ba052f0cd9146ac0ccc4880a778706f1b2d0af8
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
34.372549
78
0.691386
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
254
0
184
0
257
0
70
223
08172a7fdd318c375c9231880e991298a8fdd444
10,614
py
Python
web2py/applications/rip/modules/VmOperations.py
2spmohanty/vcenter-automation
1d10b765ef335087902b0194ed12a61e53807987
[ "Apache-2.0" ]
1
2019-10-02T13:25:03.000Z
2019-10-02T13:25:03.000Z
web2py/applications/rip/modules/VmOperations.py
2spmohanty/vcenter-automation
1d10b765ef335087902b0194ed12a61e53807987
[ "Apache-2.0" ]
null
null
null
web2py/applications/rip/modules/VmOperations.py
2spmohanty/vcenter-automation
1d10b765ef335087902b0194ed12a61e53807987
[ "Apache-2.0" ]
1
2021-11-05T09:51:02.000Z
2021-11-05T09:51:02.000Z
import pyVmomi from pyVmomi import vim, vmodl from DatacenterPrac import Login, GetCluster, GetDatacenter, get_obj, GetClusters from clusterPrac import GetHostsInClusters import status from VMPrac import find_obj, get_container_view, collect_properties import multiprocessing from multiprocessing.dummy import Pool as Th...
30.412607
163
0.592896
import pyVmomi from pyVmomi import vim, vmodl from DatacenterPrac import Login,GetCluster,GetDatacenter,get_obj,GetClusters from clusterPrac import GetHostsInClusters import status from VMPrac import find_obj,get_container_view,collect_properties import multiprocessing from multiprocessing.dummy import Pool as ThreadPo...
0
0
0
0
0
7,966
0
-6
115
711e7df3699b858ec5ecc93f2a9be8160a8cd912
759
py
Python
__init__.py
Kurokitu/maimaiDX
7c800ad220b300b6a71c36734a3a3f5c42dea796
[ "MIT" ]
31
2021-08-12T08:39:31.000Z
2022-03-31T03:57:53.000Z
__init__.py
Kurokitu/maimaiDX
7c800ad220b300b6a71c36734a3a3f5c42dea796
[ "MIT" ]
7
2021-09-12T17:47:36.000Z
2022-03-10T00:50:49.000Z
__init__.py
Kurokitu/maimaiDX
7c800ad220b300b6a71c36734a3a3f5c42dea796
[ "MIT" ]
14
2021-09-14T08:24:29.000Z
2022-03-04T18:45:02.000Z
import os, json from typing import List, Dict from hoshino.log import new_logger log = new_logger('maimaiDX') static = os.path.join(os.path.dirname(__file__), 'static') arcades_json = os.path.join(os.path.dirname(__file__), 'arcades.json') if not os.path.exists(arcades_json): raise 'arcades.json' arca...
34.5
83
0.677207
import os, json from typing import List, Dict from hoshino.log import new_logger log = new_logger('maimaiDX') static = os.path.join(os.path.dirname(__file__), 'static') arcades_json = os.path.join(os.path.dirname(__file__), 'arcades.json') if not os.path.exists(arcades_json): raise '请安装arcades.json文件' ...
15
0
0
0
0
0
0
0
0
e302e4ab91ddf5d09900ee41e53487821c29002d
848
py
Python
functional test automation/webdriver/chromedriver with browsermob proxy on python/script.py
4qu3l3c4r4/Automation-Test-Knowledge-Base
7f6f1ba374d9277647bde6a7feaa6a6e8b53ae8f
[ "MIT" ]
191
2015-01-11T10:47:03.000Z
2022-03-14T09:14:50.000Z
functional test automation/webdriver/chromedriver with browsermob proxy on python/script.py
TATJAVAPavelKlindziuk/at.info-knowledge-base
7f6f1ba374d9277647bde6a7feaa6a6e8b53ae8f
[ "MIT" ]
2
2021-06-04T02:10:01.000Z
2022-03-31T20:21:06.000Z
functional test automation/webdriver/chromedriver with browsermob proxy on python/script.py
TATJAVAPavelKlindziuk/at.info-knowledge-base
7f6f1ba374d9277647bde6a7feaa6a6e8b53ae8f
[ "MIT" ]
175
2015-01-09T16:45:09.000Z
2022-02-12T23:54:23.000Z
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import NoSuchElementException ElementNotVisibleException from browsermobproxy import Server import ur...
30.285714
63
0.78066
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import NoSuchElementException, ElementNotVisibleException from browsermobproxy import Server import u...
0
0
0
0
0
0
0
1
0
9c32b01abcbb815a323cd7c3687055b5fdcd01bf
1,667
py
Python
test/PushConsumer.py
GangLuICT/RMQ-Client4Python
5a7cfe2efc1e6c009090b891d0a4fb0dc03ce3e4
[ "MIT" ]
32
2016-08-26T02:35:42.000Z
2021-12-03T02:31:45.000Z
test/PushConsumer.py
GangLuICT/RMQ-Client4Python
5a7cfe2efc1e6c009090b891d0a4fb0dc03ce3e4
[ "MIT" ]
null
null
null
test/PushConsumer.py
GangLuICT/RMQ-Client4Python
5a7cfe2efc1e6c009090b891d0a4fb0dc03ce3e4
[ "MIT" ]
11
2016-12-14T09:17:33.000Z
2021-01-08T13:31:07.000Z
#!/usr/bin/python # -*- coding:utf-8 -*- import logging logger = logging.getLogger("PushConsumer") # import sys sys.path.append("..") import settings_MQ as settings #JVM jvmPath = getDefaultJVMPath() startJVM(jvmPath, settings.JVM_OPTIONS, "-Djava.ext.dirs="+settings.JAVA_EXT_DIRS) #startJVM(jvmPath, "-Djava.class.p...
29.245614
84
0.769646
#!/usr/bin/python # -*- coding:utf-8 -*- import logging logger = logging.getLogger("PushConsumer") #导入上级目录模块 import sys sys.path.append("..") import settings_MQ as settings #启动JVM from jpype import * jvmPath = getDefaultJVMPath() startJVM(jvmPath, settings.JVM_OPTIONS, "-Djava.ext.dirs="+settings.JAVA_EXT_DIRS) #sta...
282
0
0
0
0
0
0
28
22
50494232cb37bbd44d80e6b47816854f9df9e752
734
py
Python
content/post/example.py
fboehm/blogdown-xmin
eda1ffb90645786f556fda89d748be4929ec3a1b
[ "MIT" ]
null
null
null
content/post/example.py
fboehm/blogdown-xmin
eda1ffb90645786f556fda89d748be4929ec3a1b
[ "MIT" ]
null
null
null
content/post/example.py
fboehm/blogdown-xmin
eda1ffb90645786f556fda89d748be4929ec3a1b
[ "MIT" ]
null
null
null
import numpy from numpy.random import RandomState from numpy.linalg import cholesky as chol from limmbo.core.vdsimple import vd_reml from limmbo.io.input import InputData random = RandomState(15) N = 100 S = 1000 P = 3 snps = (random.rand(N, S) < 0.2).astype(float) kinship = numpy.dot(snps, snps.T) / float(10) y = ran...
29.36
51
0.739782
import numpy from numpy.random import RandomState from numpy.linalg import cholesky as chol from limmbo.core.vdsimple import vd_reml from limmbo.io.input import InputData random = RandomState(15) N = 100 S = 1000 P = 3 snps = (random.rand(N, S) < 0.2).astype(float) kinship = numpy.dot(snps, snps.T) / float(10) y = ran...
0
0
0
0
0
0
0
0
0
3f910aeb4d99e9e9031c69db1e7f38ffa5b6271f
1,206
py
Python
cpmpy/pigeon_hole.py
hakank/hakank
313e5c0552569863047f6ce9ae48ea0f6ec0c32b
[ "MIT" ]
279
2015-01-10T09:55:35.000Z
2022-03-28T02:34:03.000Z
cpmpy/pigeon_hole.py
hakank/hakank
313e5c0552569863047f6ce9ae48ea0f6ec0c32b
[ "MIT" ]
10
2017-10-05T15:48:50.000Z
2021-09-20T12:06:52.000Z
cpmpy/pigeon_hole.py
hakank/hakank
313e5c0552569863047f6ce9ae48ea0f6ec0c32b
[ "MIT" ]
83
2015-01-20T03:44:00.000Z
2022-03-13T23:53:06.000Z
""" Pigeon hole problem in cpmpy. ftp://ftp.inria.fr/INRIA/Projects/contraintes/publications/CLP-FD/plilp94.html ''' pigeon: the pigeon-hole problem consists in putting n pigeons in m pigeon-holes (at most 1 pigeon per hole). The boolean formulation uses n m variables to indicate, for each pigeon, its hole number. Ob...
23.647059
92
0.678275
""" Pigeon hole problem in cpmpy. ftp://ftp.inria.fr/INRIA/Projects/contraintes/publications/CLP-FD/plilp94.html ''' pigeon: the pigeon-hole problem consists in putting n pigeons in m pigeon-holes (at most 1 pigeon per hole). The boolean formulation uses n × m variables to indicate, for each pigeon, its hole number. O...
2
0
0
0
0
529
0
-5
132
2c3beeaf32055f3520f70b13ccb503bb41f01910
3,071
py
Python
jira_gantt_demo.py
bobk/jiracharts
2b7c700eea5a99e8450408e8835b54e110892fd6
[ "MIT" ]
null
null
null
jira_gantt_demo.py
bobk/jiracharts
2b7c700eea5a99e8450408e8835b54e110892fd6
[ "MIT" ]
null
null
null
jira_gantt_demo.py
bobk/jiracharts
2b7c700eea5a99e8450408e8835b54e110892fd6
[ "MIT" ]
null
null
null
# http://github.com/bobk/jiracharts # # This example code set uses various charting libraries, Python with jira-python and # PowerShell with JiraPS to demonstrate generating useful charts and visualizations from Jira data # in this program we use both the gantt and plotly libraries as examples # all variabl...
48.746032
158
0.722566
# http://github.com/bobk/jiracharts # # This example code set uses various charting libraries, Python with jira-python and # PowerShell with JiraPS to demonstrate generating useful charts and visualizations from Jira data from jira import JIRA import os import datetime # in this program we use both the gantt...
0
0
0
0
0
2,495
0
-8
134
acb9334d64f5ab1ebdf08b5ba2bae76001fb9de8
7,698
py
Python
train.py
hopems7/Image-Classifier
20d5e56269909b9240da62fba3b949a64513c3bf
[ "MIT" ]
null
null
null
train.py
hopems7/Image-Classifier
20d5e56269909b9240da62fba3b949a64513c3bf
[ "MIT" ]
null
null
null
train.py
hopems7/Image-Classifier
20d5e56269909b9240da62fba3b949a64513c3bf
[ "MIT" ]
null
null
null
# imports here # torchvision.datasets import ImageFolder print("Stop 1 - after imports") if __name__ == "__main__": main()
40.515789
147
0.573915
# imports here import argparse import time import torch from torch import nn from torch import optim import torch.nn.functional as F import torchvision from torchvision import datasets, models, transforms import matplotlib.pyplot as plt from collections import OrderedDict # torchvision.datasets import ImageFolder from...
0
0
0
0
0
7,037
0
49
399
c6c28e50c265fd0709ef305063d99b46f340c8f8
24
py
Python
tests/template_loader/__init__.py
dwatkinsweb/django-skin
925db5313f564e2edca0ea2419b5d7b752a7a518
[ "MIT" ]
3
2015-10-07T17:59:01.000Z
2017-11-16T11:19:13.000Z
tests/template_loader/__init__.py
dwatkinsweb/django-skin
925db5313f564e2edca0ea2419b5d7b752a7a518
[ "MIT" ]
null
null
null
tests/template_loader/__init__.py
dwatkinsweb/django-skin
925db5313f564e2edca0ea2419b5d7b752a7a518
[ "MIT" ]
2
2017-11-15T01:25:56.000Z
2022-01-06T23:39:32.000Z
__author__ = 'dwatkins'
12
23
0.75
__author__ = 'dwatkins'
0
0
0
0
0
0
0
0
0
ed96689ed757d8216e0bf5bc388e12340fe4031c
662
py
Python
minifold/ipynb.py
nokia/minifold
3687d32ab6119dc8293ae370c8c4ba9bbbb47deb
[ "BSD-3-Clause" ]
15
2018-09-03T09:40:59.000Z
2021-07-16T16:14:46.000Z
src/ipynb.py
Infinite-Blue-1042/minifold
cd0aa9207f9e1819ed2ecbb24373cdcfe27abd16
[ "BSD-3-Clause" ]
null
null
null
src/ipynb.py
Infinite-Blue-1042/minifold
cd0aa9207f9e1819ed2ecbb24373cdcfe27abd16
[ "BSD-3-Clause" ]
8
2019-01-25T07:18:59.000Z
2021-04-07T17:54:54.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of the minifold project. # https://github.com/nokia/minifold __author__ = "Marc-Olivier Buob" __maintainer__ = "Marc-Olivier Buob" __email__ = "marc-olivier.buob@nokia-bell-labs.com" __copyright__ = "Copyright (C) 2018, Nokia" __license__ ...
27.583333
93
0.663142
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of the minifold project. # https://github.com/nokia/minifold __author__ = "Marc-Olivier Buob" __maintainer__ = "Marc-Olivier Buob" __email__ = "marc-olivier.buob@nokia-bell-labs.com" __copyright__ = "Copyright (C) 2018, Nokia" __license__ ...
0
0
0
0
0
0
0
0
0
6741da8a9b36218872414ff33253005a1ce3fbdc
362
bzl
Python
rules/jvm.bzl
tjarvstrand/rules_scala
ff423d8bdd0e5383f8f2c048ffd7704bb51a91bf
[ "Apache-2.0" ]
53
2019-01-07T23:15:32.000Z
2021-09-24T00:27:40.000Z
rules/jvm.bzl
tjarvstrand/rules_scala
ff423d8bdd0e5383f8f2c048ffd7704bb51a91bf
[ "Apache-2.0" ]
101
2019-01-05T04:52:40.000Z
2021-01-29T16:48:58.000Z
rules/jvm.bzl
tjarvstrand/rules_scala
ff423d8bdd0e5383f8f2c048ffd7704bb51a91bf
[ "Apache-2.0" ]
24
2019-01-23T07:54:28.000Z
2022-02-10T19:42:07.000Z
load("//rules/jvm:private/label.bzl", _labeled_jars_implementation = "labeled_jars_implementation") # For bedtime reading: # https://github.com/bazelbuild/bazel/issues/4584 # https://groups.google.com/forum/#!topic/bazel-discuss/mt2llfwzmac labeled_jars = aspect( implementation = _labeled_jars_implementation, ...
32.909091
99
0.765193
load("//rules/jvm:private/label.bzl", _labeled_jars_implementation = "labeled_jars_implementation") # For bedtime reading: # https://github.com/bazelbuild/bazel/issues/4584 # https://groups.google.com/forum/#!topic/bazel-discuss/mt2llfwzmac labeled_jars = aspect( implementation = _labeled_jars_implementation, ...
0
0
0
0
0
0
0
0
0
e5310cbec155ea0ade26865aac5fe549b87cf496
290
py
Python
tests/classes/simple_auth_code.py
Jesse-Yung/jsonclasses
d40c52aec42bcb978a80ceb98b93ab38134dc790
[ "MIT" ]
50
2021-08-18T08:08:04.000Z
2022-03-20T07:23:26.000Z
tests/classes/simple_auth_code.py
Jesse-Yung/jsonclasses
d40c52aec42bcb978a80ceb98b93ab38134dc790
[ "MIT" ]
1
2021-02-21T03:18:09.000Z
2021-03-08T01:07:52.000Z
tests/classes/simple_auth_code.py
Jesse-Yung/jsonclasses
d40c52aec42bcb978a80ceb98b93ab38134dc790
[ "MIT" ]
8
2021-07-01T02:39:15.000Z
2021-12-10T02:20:18.000Z
from __future__ import annotations
26.363636
71
0.77931
from __future__ import annotations from typing import Optional from jsonclasses import jsonclass, types @jsonclass class SimpleAuthCode: calling_code: Optional[str] = types.str.presentwith('phone_number') phone_number: Optional[str] = types.str code: str = types.str.required
0
162
0
0
0
0
0
25
67
16d294a6ffd5136b2ca8795b8d0d9efff3e2c7c0
17,534
py
Python
APC400000/ScrollableList.py
martinpechmann/APC400000
0783dd2f7c3846684f785b15e651c61edf95e27c
[ "BSD-Source-Code" ]
6
2019-09-15T18:46:49.000Z
2021-09-10T06:36:10.000Z
APC400000/ScrollableList.py
martinpechmann/APC400000
0783dd2f7c3846684f785b15e651c61edf95e27c
[ "BSD-Source-Code" ]
3
2015-06-14T22:47:01.000Z
2015-06-17T14:24:47.000Z
APC400000/ScrollableList.py
martinpechmann/APC400000
0783dd2f7c3846684f785b15e651c61edf95e27c
[ "BSD-Source-Code" ]
1
2016-12-21T12:18:14.000Z
2016-12-21T12:18:14.000Z
# Embedded file name: c:\Jenkins\live\output\win_32_static\Release\midi-remote-scripts\Push\ScrollableList.py from __future__ import with_statement
39.940774
162
0.678853
# Embedded file name: c:\Jenkins\live\output\win_32_static\Release\midi-remote-scripts\Push\ScrollableList.py from __future__ import with_statement from functools import partial from _Framework.Control import ButtonControl, EncoderControl, control_list from _Framework.CompoundComponent import CompoundComponent from _Fr...
0
2,376
0
14,440
0
0
0
252
314
ed7f640db0df0ad410d1d1d529fb36cc323cbfe7
7,376
py
Python
interface.py
wangechimk/password-locker
098e8ea3fd5f145416acd897f66e6e48ab94fad6
[ "MIT" ]
null
null
null
interface.py
wangechimk/password-locker
098e8ea3fd5f145416acd897f66e6e48ab94fad6
[ "MIT" ]
null
null
null
interface.py
wangechimk/password-locker
098e8ea3fd5f145416acd897f66e6e48ab94fad6
[ "MIT" ]
null
null
null
from locker import User, Credentials function() def create_user(username, password): ''' Function to create a new user with a username and password ''' return User(username, password) def save_user(user): ''' Function to save a new user ''' user.save_user() def display_user(): ...
35.12381
142
0.539317
from locker import User, Credentials def function(): print(" __ __ __ ") print("| | | | | | ") print("| |__| | | | ") print("| __ | | | ") print("| | | | | | ") print("|__| |__| |__| ") function() def create_user(username, password): ''' Function to create a ...
45
0
0
0
0
5,694
0
0
69
d6ca7107dca220bd065ae762b2e3cc75fdc14130
151
py
Python
instructors/lessons/practical_utils/examples/in_class/1_answer_ashwini.py
mgadagin/PythonClass
70b370362d75720b3fb0e1d6cc8158f9445e9708
[ "MIT" ]
46
2017-09-27T20:19:36.000Z
2020-12-08T10:07:19.000Z
instructors/lessons/practical_utils/examples/in_class/1_answer_ashwini.py
mgadagin/PythonClass
70b370362d75720b3fb0e1d6cc8158f9445e9708
[ "MIT" ]
6
2018-01-09T08:07:37.000Z
2020-09-07T12:25:13.000Z
instructors/lessons/practical_utils/examples/in_class/1_answer_ashwini.py
mgadagin/PythonClass
70b370362d75720b3fb0e1d6cc8158f9445e9708
[ "MIT" ]
18
2017-10-10T02:06:51.000Z
2019-12-01T10:18:13.000Z
import datetime dt = '21/03/2012' day, month, year = (int(x) for x in dt.split('/')) ans = datetime.date(year, month, day) print ans.strftime("%A")
30.2
54
0.642384
import datetime dt = '21/03/2012' day, month, year = (int(x) for x in dt.split('/')) ans = datetime.date(year, month, day) print ans.strftime("%A")
0
0
0
0
0
0
0
0
0
e621b823641691f1b5003f94127d4245a6724492
429
py
Python
011.RemoveElement.py
br71/challenges
355cd4984cf5e7f81827f306841ddc7b9382a820
[ "Apache-2.0" ]
null
null
null
011.RemoveElement.py
br71/challenges
355cd4984cf5e7f81827f306841ddc7b9382a820
[ "Apache-2.0" ]
null
null
null
011.RemoveElement.py
br71/challenges
355cd4984cf5e7f81827f306841ddc7b9382a820
[ "Apache-2.0" ]
null
null
null
nums = [2,1,0,1,2,2,3,0,4,2] val = 2 s = Solution() print(s.removeElement(nums,val))
15.888889
44
0.391608
class Solution: def removeElement(self,nums,val) -> int: i = 0 j = len(nums) while True: if nums[i] == val: del nums[i] j = j - 1 else: i = i +1 if i == j: break print (nu...
0
0
0
320
0
0
0
0
22
285a7dd054f231627b9c6e65b8de5c6c71ff61dc
2,861
py
Python
plentshwoitre.py
jedav/plentshwoitre
0fda2efdf0d3eef4f5d9735a12ff35b907b1d362
[ "MIT" ]
2
2020-02-23T20:44:08.000Z
2020-12-10T17:12:08.000Z
plentshwoitre.py
jedav/plentshwoitre
0fda2efdf0d3eef4f5d9735a12ff35b907b1d362
[ "MIT" ]
null
null
null
plentshwoitre.py
jedav/plentshwoitre
0fda2efdf0d3eef4f5d9735a12ff35b907b1d362
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 onsets = [ "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "v", "w", "pl", "bl", "kl", "l", "pr", "br", "tr", "dr", "kr", "r", "tw", "dw", "w", "kw", "pw", "fl", "sl", "d", "l", "fr", "r", "r...
12.226496
93
0.47396
#!/usr/bin/env python3 import argparse import random onsets = [ "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "v", "w", "pl", "bl", "kl", "ɡl", "pr", "br", "tr", "dr", "kr", "ɡr", "tw", "dw", "ɡw", "kw", "pw", "fl", "sl",...
80
0
0
0
0
1,181
0
-14
137
8db9f1005f6ba3b0c94e86e59866a00dacf65a7b
525
py
Python
20-functions/scope.py
ehsankorhani/python-lessons
a1974cb2b43b73751fc4737e3e3aa830aa16a644
[ "MIT" ]
null
null
null
20-functions/scope.py
ehsankorhani/python-lessons
a1974cb2b43b73751fc4737e3e3aa830aa16a644
[ "MIT" ]
null
null
null
20-functions/scope.py
ehsankorhani/python-lessons
a1974cb2b43b73751fc4737e3e3aa830aa16a644
[ "MIT" ]
null
null
null
# def f(): # print (x, id(x)) # x = 99 # print (x, id(x)) # f() # # ---------------- # def f(): # x = 100 # print (x, id(x)) # f() # # print (x) # # ---------------- # def f(): # x = 100 # print (x, id(x)) # x = 99 # print (x, id(x)) # f() # print (x, id(x)) # # ---------------- # def f(): ...
10.294118
26
0.300952
# def f(): # print (x, id(x)) # x = 99 # print (x, id(x)) # f() # # ---------------- # def f(): # x = 100 # print (x, id(x)) # f() # # print (x) # # ---------------- # def f(): # x = 100 # print (x, id(x)) # x = 99 # print (x, id(x)) # f() # print (x, id(x)) # # ---------------- # def f(): ...
0
0
0
0
0
33
0
0
23
4cdcaba19b94f24b30f90160f4d645dfc15fbb94
359
py
Python
ex033guanabara.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
ex033guanabara.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
ex033guanabara.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
n1=int(input('digite um numero')) n2=int(input('digite um numero')) n3=int(input('digite um numero')) maior = n1 if n2 > n1 and n2 > n3 : maior = n2 if n3 > n1 and n3 >n2 : maior = n3 menor = n1 if n2 < n1 and n2 < n3 : menor = n2 if n3 < n1 and n3 < n2 : menor = n3 print ('{} o MAIOR'.format(maior)...
19.944444
36
0.590529
n1=int(input('digite um numero')) n2=int(input('digite um numero')) n3=int(input('digite um numero')) maior = n1 if n2 > n1 and n2 > n3 : maior = n2 if n3 > n1 and n3 >n2 : maior = n3 menor = n1 if n2 < n1 and n2 < n3 : menor = n2 if n3 < n1 and n3 < n2 : menor = n3 print ('{} é o MAIOR'.format(maior...
4
0
0
0
0
0
0
0
0
1592d18a13e759416b2fd68ded0e59434dc5f0a7
2,645
py
Python
VMTranslator.py
jamespolley/VM-Translator
2d573f5234d956a5fe4d5b9c607b4e98e04b403e
[ "MIT" ]
1
2022-02-21T13:56:28.000Z
2022-02-21T13:56:28.000Z
VMTranslator.py
jamespolley/VM-Translator
2d573f5234d956a5fe4d5b9c607b4e98e04b403e
[ "MIT" ]
null
null
null
VMTranslator.py
jamespolley/VM-Translator
2d573f5234d956a5fe4d5b9c607b4e98e04b403e
[ "MIT" ]
null
null
null
# To Do: improve docstrings import sys if __name__ == "__main__": if len(sys.argv) < 2: raise Exception() # To Do - elaborate else: input_files = sys.argv[1] output_file = sys.argv[2] vmt = VMTranslator(input_files, output_file)
32.654321
117
0.612476
# To Do: improve docstrings from Parser import Parser from CodeWriter import CodeWriter import sys import os class VMTranslator: """ Main class. Handles input, reads the VM file, writes to the assembly file, and drives the VM translation process. """ def __init__(self, input, include_comments=True, ...
0
812
0
1,469
0
0
0
4
90
d4c9e01d80c78bb98917cb8816051aa01abb469d
728
py
Python
misc/doc/sources/apis/ja-http/example_send_misc.py
ibsindsrt/Jasmin-SMPP
0645b892e5c6a2eb436bb15c019fffa5d13898c0
[ "Apache-2.0" ]
null
null
null
misc/doc/sources/apis/ja-http/example_send_misc.py
ibsindsrt/Jasmin-SMPP
0645b892e5c6a2eb436bb15c019fffa5d13898c0
[ "Apache-2.0" ]
null
null
null
misc/doc/sources/apis/ja-http/example_send_misc.py
ibsindsrt/Jasmin-SMPP
0645b892e5c6a2eb436bb15c019fffa5d13898c0
[ "Apache-2.0" ]
null
null
null
# Python example # http://jasminsms.com import urllib2 import urllib baseParams = {'username':'foo', 'password':'bar', 'to':'+336222172', 'content':'Hello'} # Sending long content (more than 160 chars): baseParams['content'] = 'Very long message ...........................................................................
45.5
224
0.53022
# Python example # http://jasminsms.com import urllib2 import urllib baseParams = {'username':'foo', 'password':'bar', 'to':'+336222172', 'content':'Hello'} # Sending long content (more than 160 chars): baseParams['content'] = 'Very long message ...........................................................................
0
0
0
0
0
0
0
0
0
db581a7f7fcb3566e2addad4b3945f995686c5f1
39
py
Python
proj_template/__init__.py
masmangan/proj-template
4d2b26cfc59d1df00d181c7a5073eb88fba48b36
[ "MIT" ]
null
null
null
proj_template/__init__.py
masmangan/proj-template
4d2b26cfc59d1df00d181c7a5073eb88fba48b36
[ "MIT" ]
null
null
null
proj_template/__init__.py
masmangan/proj-template
4d2b26cfc59d1df00d181c7a5073eb88fba48b36
[ "MIT" ]
null
null
null
"""Initialize proj-template module."""
19.5
38
0.717949
"""Initialize proj-template module."""
0
0
0
0
0
0
0
0
0
626d721b04010a74c03b4b5c03b52f130af3c1b2
602
py
Python
src/pkgcheck/__init__.py
CyberTailor/pkgcheck
7a20b0eb6aad70cf88e085632261a1830b50e568
[ "BSD-3-Clause" ]
null
null
null
src/pkgcheck/__init__.py
CyberTailor/pkgcheck
7a20b0eb6aad70cf88e085632261a1830b50e568
[ "BSD-3-Clause" ]
null
null
null
src/pkgcheck/__init__.py
CyberTailor/pkgcheck
7a20b0eb6aad70cf88e085632261a1830b50e568
[ "BSD-3-Clause" ]
null
null
null
from importlib import import_module as _import from .api import keywords, scan from .base import PkgcheckException from .results import Result __all__ = ('keywords', 'scan', 'PkgcheckException', 'Result') __title__ = 'pkgcheck' __version__ = '0.10.10' def __getattr__(name): """Provide import access to keyword c...
24.08
74
0.699336
from importlib import import_module as _import from .api import keywords, scan from .base import PkgcheckException from .results import Result __all__ = ('keywords', 'scan', 'PkgcheckException', 'Result') __title__ = 'pkgcheck' __version__ = '0.10.10' def __getattr__(name): """Provide import access to keyword c...
0
0
0
0
0
38
0
0
23
e94dfbcace5ad7158b789cb626816432909e8ed2
962
py
Python
setup.py
deepomicslab/SuperTLD
92e70c03cb59283d0c11e6b775fd90d1dee486b3
[ "MIT" ]
null
null
null
setup.py
deepomicslab/SuperTLD
92e70c03cb59283d0c11e6b775fd90d1dee486b3
[ "MIT" ]
null
null
null
setup.py
deepomicslab/SuperTLD
92e70c03cb59283d0c11e6b775fd90d1dee486b3
[ "MIT" ]
null
null
null
# _*_ coding: utf-8 _*_ """ Time: 2022/3/7 15:37 Author: ZHANG Yuwei Version: V 0.2 File: setup.py Describe: """ import setuptools # Reads the content of your README.md into a variable to be used in the setup below with open("./README.md", "r") as fh: long_description = fh.read() setupt...
31.032258
89
0.655925
# _*_ coding: utf-8 _*_ """ Time: 2022/3/7 15:37 Author: ZHANG Yuwei Version: V 0.2 File: setup.py Describe: """ import setuptools # Reads the content of your README.md into a variable to be used in the setup below with open("./README.md", "r") as fh: long_description = fh.read() setupt...
0
0
0
0
0
0
0
0
0
8b52f16235fdae18bffdc8d777431fd113a3d532
9,471
py
Python
examples/plot_lesson_stats.py
alekspog/Stepik-API
9d164d9dc5360e726205456c84404659409805b9
[ "MIT" ]
36
2016-12-12T18:33:10.000Z
2021-11-12T12:18:37.000Z
examples/plot_lesson_stats.py
alekspog/Stepik-API
9d164d9dc5360e726205456c84404659409805b9
[ "MIT" ]
20
2016-08-25T12:16:02.000Z
2020-09-29T08:38:08.000Z
examples/plot_lesson_stats.py
alekspog/Stepik-API
9d164d9dc5360e726205456c84404659409805b9
[ "MIT" ]
15
2016-08-25T09:57:26.000Z
2022-03-12T07:33:21.000Z
# Run with Python 3 import requests import pandas as pd import math '''This example demonstrates how to get lessons data via Stepik-API and why it can be useful.''' '''We download lessons' data one by one, then we make plots to see how much the loss of the people depends on the lesson time ''' plots_message = '<br ...
41.539474
112
0.616302
# Run with Python 3 import requests import pandas as pd import math import copy '''This example demonstrates how to get lessons data via Stepik-API and why it can be useful.''' '''We download lessons' data one by one, then we make plots to see how much the loss of the people depends on the lesson time ''' plots_mes...
0
0
0
4,287
0
0
0
-10
44
64b8b7ccdefb932d196593bd583873ca52de4f50
224
py
Python
tests/baidu/test.py
marvinren/aiautomation
639f57f502104dd170dca24dd9ff15d80c031e21
[ "MIT" ]
null
null
null
tests/baidu/test.py
marvinren/aiautomation
639f57f502104dd170dca24dd9ff15d80c031e21
[ "MIT" ]
null
null
null
tests/baidu/test.py
marvinren/aiautomation
639f57f502104dd170dca24dd9ff15d80c031e21
[ "MIT" ]
null
null
null
from aiautomation.testcase.test_plan import TestPlanRunner, PlanInfo plan = PlanInfo('4', '', None , None, '119', '1000', '0', '0') t = TestPlanRunner(plan=plan) t.add_case("", "") t.start()
24.888889
68
0.642857
from aiautomation.testcase.test_plan import TestPlanRunner, PlanInfo plan = PlanInfo('4', '自动化测试', None , None, '119', '1000', '0', '0') t = TestPlanRunner(plan=plan) t.add_case("百度搜索", "一般百度搜索") t.start()
45
0
0
0
0
0
0
0
0
a23f8b83ff0dbbfcaab3ab31c45989f156182b9e
1,220
py
Python
server_plugin/hello.py
Elovir/server_plugin
a56850725f0fdc8b358893fb7d4b8d6c6f03fcdf
[ "MIT" ]
null
null
null
server_plugin/hello.py
Elovir/server_plugin
a56850725f0fdc8b358893fb7d4b8d6c6f03fcdf
[ "MIT" ]
null
null
null
server_plugin/hello.py
Elovir/server_plugin
a56850725f0fdc8b358893fb7d4b8d6c6f03fcdf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask import os os.putenv('LANG', 'en_US.UTF-8') os.putenv('LC_ALL', 'en_US.UTF-8') app = Flask(__name__) # @app.route('/') # def index(): # if 'username' in session: # return 'Logged in as %s' % escape(session['username']) # return '...
23.921569
68
0.592623
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, session, redirect, url_for, escape, request import os os.putenv('LANG', 'en_US.UTF-8') os.putenv('LC_ALL', 'en_US.UTF-8') app = Flask(__name__) @app.route('/t') def index(): if 'username' in session: return 'Logged in as %s' % esca...
0
228
0
0
0
0
0
45
46
c98412ea0792f226057cb9e3d9d0d53f6b568adb
1,039
py
Python
storagelevel.py
nickyongzhang/pyspark_learning
1942f7c9a2b23858903868c4b9accd9bcf5889ff
[ "Apache-2.0" ]
null
null
null
storagelevel.py
nickyongzhang/pyspark_learning
1942f7c9a2b23858903868c4b9accd9bcf5889ff
[ "Apache-2.0" ]
null
null
null
storagelevel.py
nickyongzhang/pyspark_learning
1942f7c9a2b23858903868c4b9accd9bcf5889ff
[ "Apache-2.0" ]
null
null
null
#! encoding=utf8 # To decide the storage of RDD, there are different storage levels, which are given below - # DISK_ONLY = StorageLevel(True, False, False, False, 1) # DISK_ONLY_2 = StorageLevel(True, False, False, False, 2) # MEMORY_AND_DISK = StorageLevel(True, True, False, False, 1) # MEMORY_AND_DISK_2 = Storage...
30.558824
91
0.741097
#! encoding=utf8 # To decide the storage of RDD, there are different storage levels, which are given below - # DISK_ONLY = StorageLevel(True, False, False, False, 1) # DISK_ONLY_2 = StorageLevel(True, False, False, False, 2) # MEMORY_AND_DISK = StorageLevel(True, True, False, False, 1) # MEMORY_AND_DISK_2 = Storage...
0
0
0
0
0
0
0
0
0