hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
07316d4ee1496cde23d8a0d1f792c8012b4e7beb
10,241
py
Python
translators/cameras/interactive.py
Mango-3/blenderseed
e13f09becf396f1691c26a8d0bfff9cc05f75e42
[ "MIT" ]
256
2015-03-29T06:17:49.000Z
2022-03-31T03:45:52.000Z
translators/cameras/interactive.py
Mango-3/blenderseed
e13f09becf396f1691c26a8d0bfff9cc05f75e42
[ "MIT" ]
366
2017-02-06T18:45:01.000Z
2021-09-22T07:25:13.000Z
translators/cameras/interactive.py
Mango-3/blenderseed
e13f09becf396f1691c26a8d0bfff9cc05f75e42
[ "MIT" ]
56
2015-03-09T09:02:57.000Z
2022-01-07T15:53:43.000Z
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2019 Jonathan Dent, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy # ...
38.212687
127
0.670052
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2019 Jonathan Dent, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy # ...
7,992
0
484
cb12f33d54e3b4108ba318c0b12c85eee1246ed8
1,263
py
Python
10_verify_parentheses_recursion.py
MichaelORegan/52960_MPP_Assignment2_Recursion
5b7b5b6a9ec0f4505e52ce3e6b9dde6f9c19d37b
[ "Apache-2.0" ]
null
null
null
10_verify_parentheses_recursion.py
MichaelORegan/52960_MPP_Assignment2_Recursion
5b7b5b6a9ec0f4505e52ce3e6b9dde6f9c19d37b
[ "Apache-2.0" ]
null
null
null
10_verify_parentheses_recursion.py
MichaelORegan/52960_MPP_Assignment2_Recursion
5b7b5b6a9ec0f4505e52ce3e6b9dde6f9c19d37b
[ "Apache-2.0" ]
null
null
null
# https://stackoverflow.com/questions/18007995/recursive-method-for-parentheses-balancing-python # define the function, string n with (), # i in n start at 0, counter start at 0 a = "(()()" print(verify_parentheses(a)) b = "(()" print(verify_parentheses(b)) c = "(())" print(verify_parentheses(c)) d = ")(()" print(ve...
33.236842
96
0.669834
# https://stackoverflow.com/questions/18007995/recursive-method-for-parentheses-balancing-python # define the function, string n with (), # i in n start at 0, counter start at 0 def verify_parentheses(n, i=0, counter=0): # if there is nothing in the string if i == len(n): # return 0 balanced True return ...
780
0
22
91e093e528512619f8675d6d0cf7088745b79ad3
12,472
py
Python
app/reader.py
rshariffdeen/CPR
4863c602d3c291611251d4823590e7c7553aa633
[ "MIT" ]
26
2021-04-07T11:29:13.000Z
2022-03-28T15:20:38.000Z
app/reader.py
rshariffdeen/CPR
4863c602d3c291611251d4823590e7c7553aa633
[ "MIT" ]
null
null
null
app/reader.py
rshariffdeen/CPR
4863c602d3c291611251d4823590e7c7553aa633
[ "MIT" ]
5
2021-04-07T18:33:02.000Z
2021-10-29T23:23:00.000Z
import json import pickle import re from app import emitter, definitions, values from six.moves import cStringIO import os from pysmt.smtlib.parser import SmtLibParser def collect_symbolic_expression(log_path): """ This function will read the output log of a klee concolic execution and extract symbolic e...
39.719745
107
0.569596
import json import pickle import re from app import emitter, definitions, values from six.moves import cStringIO import os from pysmt.smtlib.parser import SmtLibParser def read_json(file_path): json_data = None if os.path.isfile(file_path): with open(file_path, 'r') as in_file: content = i...
2,733
0
161
60fbd717947dcb1d64d92cb125539095585a254e
875
py
Python
ServerAPI/controller/model/image_classification.py
catalina-bejan/bachelor-graduation-thesis
e3b1bc67c153199a6188fcf1358dac0279b5b9a7
[ "MIT" ]
null
null
null
ServerAPI/controller/model/image_classification.py
catalina-bejan/bachelor-graduation-thesis
e3b1bc67c153199a6188fcf1358dac0279b5b9a7
[ "MIT" ]
null
null
null
ServerAPI/controller/model/image_classification.py
catalina-bejan/bachelor-graduation-thesis
e3b1bc67c153199a6188fcf1358dac0279b5b9a7
[ "MIT" ]
null
null
null
import cv2 import numpy as np from keras.models import load_model from model.image_classification_class import ImageClassification export_path_keras = "C:\\Users\\catal\\Facultate\\an4\\licenta\\modele antrenate\\modelBinaryClassificationFoodOrNotfood-VGG16.h5" model = load_model(export_path_keras) classtolabel...
43.75
131
0.737143
import cv2 import numpy as np from keras.models import load_model from model.image_classification_class import ImageClassification export_path_keras = "C:\\Users\\catal\\Facultate\\an4\\licenta\\modele antrenate\\modelBinaryClassificationFoodOrNotfood-VGG16.h5" model = load_model(export_path_keras) classtolabel...
501
0
24
9755f5e7b50aa49441c03b4099cf6b938adf75a5
7,139
py
Python
typing/ui.py
zhuning1999/PythonCode
8ca9aed385af64763c79a13f1bf9c5b67b0c8a63
[ "MIT" ]
28
2019-11-08T03:09:59.000Z
2022-03-09T06:59:04.000Z
typing/ui.py
zhuning1999/PythonCode
8ca9aed385af64763c79a13f1bf9c5b67b0c8a63
[ "MIT" ]
null
null
null
typing/ui.py
zhuning1999/PythonCode
8ca9aed385af64763c79a13f1bf9c5b67b0c8a63
[ "MIT" ]
50
2019-09-17T15:28:34.000Z
2022-03-29T09:10:12.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'e:/Code/MyQT/typing/typing.ui' # # Created by: PyQt5 UI code generator 5.13.0 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
50.274648
114
0.688332
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'e:/Code/MyQT/typing/typing.ui' # # Created by: PyQt5 UI code generator 5.13.0 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, F...
6,828
1
81
9247df721077d723c08d1d772c85af2d677920fb
161
py
Python
Beginner/1072.py
LorranSutter/URI-Online-Judge
aef885b9a7caa83484cf172e29eea8ec92fc3627
[ "MIT" ]
null
null
null
Beginner/1072.py
LorranSutter/URI-Online-Judge
aef885b9a7caa83484cf172e29eea8ec92fc3627
[ "MIT" ]
null
null
null
Beginner/1072.py
LorranSutter/URI-Online-Judge
aef885b9a7caa83484cf172e29eea8ec92fc3627
[ "MIT" ]
null
null
null
N = int(input()) soma = 0 for k in range(N): X = int(input()) if X >= 10 and X <= 20: soma+=1 print("%d in" % (soma)) print("%d out" % (abs(N-soma)))
14.636364
35
0.496894
N = int(input()) soma = 0 for k in range(N): X = int(input()) if X >= 10 and X <= 20: soma+=1 print("%d in" % (soma)) print("%d out" % (abs(N-soma)))
0
0
0
1d8e82bf0d960e6552dc03b0df3d962f83baba44
2,715
py
Python
qualipy/utils/object_extraction.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
qualipy/utils/object_extraction.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
qualipy/utils/object_extraction.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
"""Python wrapper for the object extraction algorithm found in https://github.com/assamite/CmCode """ import os import tempfile from ctypes import cdll, c_char_p, c_bool import cv2 from .utils import file_cache def _saliency(image_path, saliency_map_path, saliency_mask_path): """Python wrapper for running the ...
30.166667
77
0.707919
"""Python wrapper for the object extraction algorithm found in https://github.com/assamite/CmCode """ import os import tempfile from ctypes import cdll, c_char_p, c_bool import cv2 from .utils import file_cache def _saliency(image_path, saliency_map_path, saliency_mask_path): """Python wrapper for running the ...
79
0
23
1e18cf6bb69a10bca9d87f12289ac734e8051fb2
2,228
py
Python
src/django_sorting_bootstrap/util.py
jayhardee9/django-sorting-bootstrap
c8e1a8a62d7eb316b984c6f1f38a6d35d6055bae
[ "MIT" ]
null
null
null
src/django_sorting_bootstrap/util.py
jayhardee9/django-sorting-bootstrap
c8e1a8a62d7eb316b984c6f1f38a6d35d6055bae
[ "MIT" ]
null
null
null
src/django_sorting_bootstrap/util.py
jayhardee9/django-sorting-bootstrap
c8e1a8a62d7eb316b984c6f1f38a6d35d6055bae
[ "MIT" ]
null
null
null
"""Util module.""" import six from django.db import models from django.db.models.fields.related import ForeignObjectRel as RelatedObject from django.forms.forms import pretty_name from django.utils.encoding import force_str from django.utils.encoding import force_text def label_for_field(name, model, return_attr=Fals...
35.365079
84
0.572711
"""Util module.""" import six from django.db import models from django.db.models.fields.related import ForeignObjectRel as RelatedObject from django.forms.forms import pretty_name from django.utils.encoding import force_str from django.utils.encoding import force_text def label_for_field(name, model, return_attr=Fals...
0
0
0
8833957eac9f85195044f702cec2b2d76beacc48
303
py
Python
calculator.py
quattrococodrilo/cal
739f3c36333de2c3915d105eeb164c13e0726913
[ "MIT" ]
null
null
null
calculator.py
quattrococodrilo/cal
739f3c36333de2c3915d105eeb164c13e0726913
[ "MIT" ]
null
null
null
calculator.py
quattrococodrilo/cal
739f3c36333de2c3915d105eeb164c13e0726913
[ "MIT" ]
null
null
null
if __name__ == '__main__': from sys import argv cal = Calculator(int(argv[1]), int(argv[2])) print(cal.square())
18.9375
64
0.561056
class Calculator: def __init__(self, a, b): self.a = a self.b = b def square(self): return 'a:{}\nb:{}'.format(self.a*self.a, self.b*self.b) if __name__ == '__main__': from sys import argv cal = Calculator(int(argv[1]), int(argv[2])) print(cal.square())
103
-4
75
71e4541950059597eee92bdba38dc1378bb73cf2
485
py
Python
Algo and DSA/LeetCode-Solutions-master/Python/longest-substring-of-all-vowels-in-order.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
3,269
2018-10-12T01:29:40.000Z
2022-03-31T17:58:41.000Z
Algo and DSA/LeetCode-Solutions-master/Python/longest-substring-of-all-vowels-in-order.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
53
2018-12-16T22:54:20.000Z
2022-02-25T08:31:20.000Z
Algo and DSA/LeetCode-Solutions-master/Python/longest-substring-of-all-vowels-in-order.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
1,236
2018-10-12T02:51:40.000Z
2022-03-30T13:30:37.000Z
# Time: O(n) # Space: O(1)
23.095238
47
0.4
# Time: O(n) # Space: O(1) class Solution(object): def longestBeautifulSubstring(self, word): """ :type word: str :rtype: int """ result = 0 l = cnt = 1 for i in xrange(len(word)-1): if word[i] > word[i+1]: l = cnt = 1 ...
0
434
23
2d448f9a1d01616b7380b8a27fb7014df2302d0a
3,342
py
Python
server/scraper.py
lkrjangid1/ggsipu_notice
79bb8f7a1f41a473a4cf37e414002c855c075301
[ "BSD-3-Clause" ]
1
2021-06-29T17:53:47.000Z
2021-06-29T17:53:47.000Z
server/scraper.py
lkrjangid1/ggsipu_notice
79bb8f7a1f41a473a4cf37e414002c855c075301
[ "BSD-3-Clause" ]
null
null
null
server/scraper.py
lkrjangid1/ggsipu_notice
79bb8f7a1f41a473a4cf37e414002c855c075301
[ "BSD-3-Clause" ]
null
null
null
from apscheduler.schedulers.background import BackgroundScheduler from pyfcm import FCMNotification from flask import Flask, render_template from bs4 import BeautifulSoup import requests from urllib import parse import pyrebase from config import config from keys import api_key from collections import OrderedDict noti...
29.839286
118
0.607421
from apscheduler.schedulers.background import BackgroundScheduler from pyfcm import FCMNotification from flask import Flask, render_template from bs4 import BeautifulSoup import requests from urllib import parse import pyrebase from config import config from keys import api_key from collections import OrderedDict noti...
2,502
0
91
cbf550b050546a555c04b3a440547431b191443a
175
py
Python
zipa/__init__.py
PressLabs/zipa
69950f803b1c5f6fb7147f67bf2301c58590ba5d
[ "Apache-2.0" ]
24
2015-02-10T15:12:55.000Z
2017-03-27T15:41:18.000Z
zipa/__init__.py
PressLabs/zipa
69950f803b1c5f6fb7147f67bf2301c58590ba5d
[ "Apache-2.0" ]
6
2015-03-12T15:54:13.000Z
2017-07-28T12:48:10.000Z
zipa/__init__.py
presslabs/zipa
69950f803b1c5f6fb7147f67bf2301c58590ba5d
[ "Apache-2.0" ]
1
2015-03-10T12:13:48.000Z
2015-03-10T12:13:48.000Z
import sys from .module import register_module, ModuleImporter if sys.version_info >= (3, 0): sys.meta_path.append(ModuleImporter(__name__)) register_module(__name__)
17.5
51
0.777143
import sys from .module import register_module, ModuleImporter if sys.version_info >= (3, 0): sys.meta_path.append(ModuleImporter(__name__)) register_module(__name__)
0
0
0
cb3aebff8002075f651eaefdd377252634409a24
9,424
py
Python
a_processing/GyrSimulator.py
TheOne-1/Strike_Index_Estimation
414f8e36714710c5cb559f53cb34be7d9441fb33
[ "MIT" ]
null
null
null
a_processing/GyrSimulator.py
TheOne-1/Strike_Index_Estimation
414f8e36714710c5cb559f53cb34be7d9441fb33
[ "MIT" ]
null
null
null
a_processing/GyrSimulator.py
TheOne-1/Strike_Index_Estimation
414f8e36714710c5cb559f53cb34be7d9441fb33
[ "MIT" ]
null
null
null
import numpy as np from SharedProcessors.const import RAW_DATA_PATH, TRIAL_NAMES, MOCAP_SAMPLE_RATE import matplotlib.pyplot as plt import scipy.interpolate as interpo from ViconReader import ViconReader
47.12
117
0.65747
import numpy as np from SharedProcessors.const import RAW_DATA_PATH, TRIAL_NAMES, MOCAP_SAMPLE_RATE import matplotlib.pyplot as plt import scipy.interpolate as interpo from ViconReader import ViconReader class GyrSimulator: def __init__(self, subject_folder, segment, static_start=0, static_end=8): """ ...
7,228
1,968
23
f3c97d5816d7252519e6501222b70eca4569e6ad
6,261
py
Python
word_replacer.py
Le-onardo/Word-Replacer
2fcc1beeca4d89849a45d43e9e3940b32d8ee197
[ "MIT" ]
null
null
null
word_replacer.py
Le-onardo/Word-Replacer
2fcc1beeca4d89849a45d43e9e3940b32d8ee197
[ "MIT" ]
null
null
null
word_replacer.py
Le-onardo/Word-Replacer
2fcc1beeca4d89849a45d43e9e3940b32d8ee197
[ "MIT" ]
null
null
null
""" A word replacer to make a dumb sentence sound verysmart. Leonardo Martinho 2017 """ import API import argparse import re from nltk import pos_tag import sys from pathlib2 import Path def sanitize_for_url(word): """ Sanitizing of a word with a regex search string - everything that is not alphanumeric, a space or ...
34.213115
125
0.714423
""" A word replacer to make a dumb sentence sound verysmart. Leonardo Martinho 2017 """ import API import argparse import re from nltk import pos_tag import sys from pathlib2 import Path def sanitize_for_url(word): """ Sanitizing of a word with a regex search string - everything that is not alphanumeric, a space or ...
0
0
0
e2f09641cf2eb48098bb6a49c04aca4130081f7f
2,682
pyw
Python
keylogger_final.pyw
andresflorezp/KEYLOGGERS
50bf0c5ed4cf8b6f31557554295366b49a2564a5
[ "MIT" ]
null
null
null
keylogger_final.pyw
andresflorezp/KEYLOGGERS
50bf0c5ed4cf8b6f31557554295366b49a2564a5
[ "MIT" ]
null
null
null
keylogger_final.pyw
andresflorezp/KEYLOGGERS
50bf0c5ed4cf8b6f31557554295366b49a2564a5
[ "MIT" ]
null
null
null
import pyHook,pythoncom,sys,logging import time,datetime import win32console import win32gui import os window = win32console.GetConsoleWindow() win32gui.ShowWindow(window,0) root_dir = os.path.split(os.path.realpath(__file__))[0] log_file=os.path.join("C:\\Users\\Solid\\Desktop\\key","log_file.txt") buffer="" pause_p...
25.542857
74
0.592095
import pyHook,pythoncom,sys,logging import time,datetime import win32console import win32gui import os window = win32console.GetConsoleWindow() win32gui.ShowWindow(window,0) root_dir = os.path.split(os.path.realpath(__file__))[0] log_file=os.path.join("C:\\Users\\Solid\\Desktop\\key","log_file.txt") buffer="" pause_p...
1,909
0
113
a821e039c41258f9daa91db8b278081ab437dbee
928
py
Python
Backend/test/shell.py
AlbatrossBill/COSC4P02Project
c48682c014ab9de4847d46cffc710d386db93c0f
[ "MIT" ]
4
2022-01-15T22:04:06.000Z
2022-01-24T01:46:46.000Z
Backend/test/shell.py
AlbatrossBill/COSC4P02Project
c48682c014ab9de4847d46cffc710d386db93c0f
[ "MIT" ]
null
null
null
Backend/test/shell.py
AlbatrossBill/COSC4P02Project
c48682c014ab9de4847d46cffc710d386db93c0f
[ "MIT" ]
1
2022-01-24T01:31:57.000Z
2022-01-24T01:31:57.000Z
import nltk import string import requests import json from io import StringIO from html.parser import HTMLParser import os import time from sys import platform path = "" if platform == "linux" or platform == "linux2": path = os.path.dirname(os.path.realpath(__file__)).replace("test","data/nltk") elif ...
27.294118
84
0.68319
import nltk import string import requests import json from io import StringIO from html.parser import HTMLParser import os import time from sys import platform path = "" if platform == "linux" or platform == "linux2": path = os.path.dirname(os.path.realpath(__file__)).replace("test","data/nltk") elif ...
271
0
50
a4e31a5118a7c17d5533df00fef70f99c73e481d
3,384
py
Python
backtester/timeRule/custom_time_rule.py
udayraj-gupta/Auquan
501b602036f7e2cceed1d63d1c449d249d10e603
[ "Apache-2.0" ]
null
null
null
backtester/timeRule/custom_time_rule.py
udayraj-gupta/Auquan
501b602036f7e2cceed1d63d1c449d249d10e603
[ "Apache-2.0" ]
null
null
null
backtester/timeRule/custom_time_rule.py
udayraj-gupta/Auquan
501b602036f7e2cceed1d63d1c449d249d10e603
[ "Apache-2.0" ]
null
null
null
from backtester.timeRule.time_rule import TimeRule from datetime import datetime, timedelta import pandas as pd from pandas.tseries.offsets import CustomBusinessHour from pandas.tseries.offsets import CustomBusinessDay
49.043478
199
0.67435
from backtester.timeRule.time_rule import TimeRule from datetime import datetime, timedelta import pandas as pd from pandas.tseries.offsets import CustomBusinessHour from pandas.tseries.offsets import CustomBusinessDay class CustomTimeRule(TimeRule): def __init__(self, startDate, endDate, startTime='9:00', endTime...
2,971
10
184
47c7d774e8e4892f6f712ec9c5fe45be0e8b684c
2,458
py
Python
responder.py
kadnan/GmailAutoresponder
5c7ad29f518e870bef918929cb932ed296cede3c
[ "MIT" ]
13
2016-12-21T16:29:23.000Z
2021-05-04T07:04:53.000Z
responder.py
kadnan/GmailAutoresponder
5c7ad29f518e870bef918929cb932ed296cede3c
[ "MIT" ]
null
null
null
responder.py
kadnan/GmailAutoresponder
5c7ad29f518e870bef918929cb932ed296cede3c
[ "MIT" ]
8
2017-01-30T16:49:15.000Z
2020-10-14T04:46:02.000Z
from selenium import webdriver from time import sleep driver = None driver = webdriver.Firefox() SENDER = '<SENDER NAME>' GMAIL_USER = '<Your Gmail ID>' GMAIL_PASSWORD = '<Your Gmail ID>' MESSAGE = 'I will get back to you soon. \n Thanks' MESSAGE = 'I will get back to you soon. \n Thanks' if __name__ == '__main__...
22.971963
74
0.554516
from selenium import webdriver from time import sleep driver = None driver = webdriver.Firefox() SENDER = '<SENDER NAME>' GMAIL_USER = '<Your Gmail ID>' GMAIL_PASSWORD = '<Your Gmail ID>' MESSAGE = 'I will get back to you soon. \n Thanks' MESSAGE = 'I will get back to you soon. \n Thanks' def access_gmail(): tr...
1,901
0
46
37e1ee9234b99297ab91a72b35c6dd6ef69e8597
2,554
py
Python
fuck_papers/models.py
ZhengXinyue/flask
fda03f0f6c89337be79d699f54f8d219b1c1571a
[ "MIT" ]
2
2020-05-27T08:55:40.000Z
2020-07-01T01:49:33.000Z
fuck_papers/models.py
ZhengXinyue/fuck_papers
fda03f0f6c89337be79d699f54f8d219b1c1571a
[ "MIT" ]
null
null
null
fuck_papers/models.py
ZhengXinyue/fuck_papers
fda03f0f6c89337be79d699f54f8d219b1c1571a
[ "MIT" ]
null
null
null
from datetime import datetime from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin, current_user from fuck_papers.extensions import db
34.986301
85
0.707126
from datetime import datetime from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin, current_user from fuck_papers.extensions import db class User(db.Model, UserMixin): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(20), uniq...
398
1,868
92
5c279c9fef6cf0adca549a9977b32043eb636fec
4,868
py
Python
storyscript/compiler/semantics/functions/MutationBuilder.py
marqov/storyscript
4b99ff904305109cfb4310cb504127e2649ba44a
[ "MIT" ]
1
2019-05-06T14:04:40.000Z
2019-05-06T14:04:40.000Z
storyscript/compiler/semantics/functions/MutationBuilder.py
marqov/storyscript
4b99ff904305109cfb4310cb504127e2649ba44a
[ "MIT" ]
null
null
null
storyscript/compiler/semantics/functions/MutationBuilder.py
marqov/storyscript
4b99ff904305109cfb4310cb504127e2649ba44a
[ "MIT" ]
null
null
null
from storyscript.compiler.semantics.functions.Mutation import Mutation from storyscript.compiler.semantics.types.GenericTypes import \ GenericType, ListGenericType, MapGenericType, TypeSymbol from storyscript.compiler.semantics.types.Types import AnyType, BaseType, \ BooleanType, FloatType, IntType, NoneType, R...
30.236025
79
0.573541
from storyscript.compiler.semantics.functions.Mutation import Mutation from storyscript.compiler.semantics.types.GenericTypes import \ GenericType, ListGenericType, MapGenericType, TypeSymbol from storyscript.compiler.semantics.types.Types import AnyType, BaseType, \ BooleanType, FloatType, IntType, NoneType, R...
0
0
0
e02268a0a359842a6ba9e4f3ac2ad95e395dc605
1,039
py
Python
misc/bot.py
schollz/kiki
5ed8f5f4b92018912fd6bda3499ad4c5a97ab496
[ "MIT" ]
45
2018-01-15T01:13:11.000Z
2022-03-10T18:12:09.000Z
misc/bot.py
schollz/kiki
5ed8f5f4b92018912fd6bda3499ad4c5a97ab496
[ "MIT" ]
7
2017-12-30T03:20:31.000Z
2021-02-25T01:32:27.000Z
misc/bot.py
schollz/kiki
5ed8f5f4b92018912fd6bda3499ad4c5a97ab496
[ "MIT" ]
3
2018-01-24T19:25:37.000Z
2018-12-29T10:30:49.000Z
import json, requests content = """**My source code:** ``` import json, requests quote_response = requests.get("https://quotes.schollz.com/subject/friend.json") quote = quote_response.json()[0] if len(quote['Name']) == 0: quote['Name'] = 'Unknown' content = "<p>“{q[Text]}”</p><p>- <em>{q[Name]}</em></p>".format(q=qu...
34.633333
79
0.662175
import json, requests content = """**My source code:** ``` import json, requests quote_response = requests.get("https://quotes.schollz.com/subject/friend.json") quote = quote_response.json()[0] if len(quote['Name']) == 0: quote['Name'] = 'Unknown' content = "<p>“{q[Text]}”</p><p>- <em>{q[Name]}</em></p>".format(q=qu...
0
0
0
067691cfc031dd15c3f9260376deef463c5edfe8
649
py
Python
zappit-project/posts/models.py
marcosalves-bitg/django_course
4537ca90a83c827c86e28bb33ba7a281183e354b
[ "CC0-1.0" ]
null
null
null
zappit-project/posts/models.py
marcosalves-bitg/django_course
4537ca90a83c827c86e28bb33ba7a281183e354b
[ "CC0-1.0" ]
null
null
null
zappit-project/posts/models.py
marcosalves-bitg/django_course
4537ca90a83c827c86e28bb33ba7a281183e354b
[ "CC0-1.0" ]
null
null
null
from django.db import models from django.contrib.auth.models import User
28.217391
62
0.718028
from django.db import models from django.contrib.auth.models import User class Base(models.Model): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) # ativo = models.BooleanField(default=True) class Meta: abstract = True class Post(Base): ...
0
507
69
78efd463642f69dceb77865e6f397fed1965cdda
491
py
Python
tests/radish/steps_german.py
tuxrosi/radish
b21fa751f8dfc4309451476151c810b44975babb
[ "MIT" ]
null
null
null
tests/radish/steps_german.py
tuxrosi/radish
b21fa751f8dfc4309451476151c810b44975babb
[ "MIT" ]
null
null
null
tests/radish/steps_german.py
tuxrosi/radish
b21fa751f8dfc4309451476151c810b44975babb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ radish ~~~~~~ Behavior Driven Development tool for Python - the root from red to green Copyright: MIT, Timo Furrer <tuxtimo@gmail.com> """ from radish import step @step("Gegeben sei etwas") def have_a_step(step): "Given I have a step" pass @step("Wenn ich etw...
15.34375
76
0.647658
# -*- coding: utf-8 -*- """ radish ~~~~~~ Behavior Driven Development tool for Python - the root from red to green Copyright: MIT, Timo Furrer <tuxtimo@gmail.com> """ from radish import step @step("Gegeben sei etwas") def have_a_step(step): "Given I have a step" pass @step("Wenn ich etw...
0
0
0
0159da13dd902b319b803e84eaf59ce48e0e0232
1,642
py
Python
applications/ConstitutiveModelsApplication/tests/examples/real_cam_clay_example/call_constitutive_model.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/ConstitutiveModelsApplication/tests/examples/real_cam_clay_example/call_constitutive_model.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/ConstitutiveModelsApplication/tests/examples/real_cam_clay_example/call_constitutive_model.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # Time control starts import time as timer print(timer.ctime()) # Measure process time t0p = timer.clock() # Measure wall time t0w = timer.time() # Import kratos core and application...
26.918033
134
0.733861
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # Time control starts import time as timer print(timer.ctime()) # Measure process time t0p = timer.clock() # Measure wall time t0w = timer.time() def StartTimeMeasuring(): # Measu...
304
0
46
1e47b861698c615b3e51c5732e15247f9d7043ce
1,235
py
Python
homura/modules/loss.py
forkbabu/homura
3c2ba10593831af09ca7e5812c6471884cb4ec50
[ "Apache-2.0" ]
102
2018-05-25T05:59:09.000Z
2022-03-08T22:38:44.000Z
homura/modules/loss.py
forkbabu/homura
3c2ba10593831af09ca7e5812c6471884cb4ec50
[ "Apache-2.0" ]
31
2018-04-22T17:35:40.000Z
2021-12-07T19:06:18.000Z
homura/modules/loss.py
forkbabu/homura
3c2ba10593831af09ca7e5812c6471884cb4ec50
[ "Apache-2.0" ]
24
2019-02-05T11:39:37.000Z
2022-02-09T01:01:25.000Z
import warnings from functools import partial import torch from torch import nn from .functional import cross_entropy_with_smoothing, cross_entropy_with_softlabels
33.378378
108
0.651012
import warnings from functools import partial import torch from torch import nn from .functional import cross_entropy_with_smoothing, cross_entropy_with_softlabels class _LossFunction(nn.Module): def forward(self, input: torch.Tensor, target: torch.Tensor ) -> tor...
866
53
147
3de1a01766e56a9e2051fe4a67ccb9096dc5e2ac
1,603
py
Python
examples/verbose-example.py
mtzgroup/tcpb-client
162cecde1652a267ec1e956f16a34dccd539f436
[ "MIT" ]
null
null
null
examples/verbose-example.py
mtzgroup/tcpb-client
162cecde1652a267ec1e956f16a34dccd539f436
[ "MIT" ]
16
2021-02-21T05:24:44.000Z
2022-03-03T01:05:25.000Z
examples/verbose-example.py
mtzgroup/tcpb-client
162cecde1652a267ec1e956f16a34dccd539f436
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Basic TCProtobufClient usage import sys from tcpb import TCProtobufClient # Water system atoms = ["O", "H", "H"] geom = [ 0.00000, 0.00000, -0.06852, 0.00000, -0.79069, 0.54370, 0.00000, 0.79069, 0.54370, ] # Default geom is bohr, but this in angstrom if le...
23.925373
76
0.660636
#!/usr/bin/env python # Basic TCProtobufClient usage import sys from tcpb import TCProtobufClient # Water system atoms = ["O", "H", "H"] geom = [ 0.00000, 0.00000, -0.06852, 0.00000, -0.79069, 0.54370, 0.00000, 0.79069, 0.54370, ] # Default geom is bohr, but this in angstrom if le...
0
0
0
6b0d4b465345f52d8d010f36e5c8bb6d56732210
5,036
py
Python
n26/api.py
sdabbo/python-n26
c3390a2fc7fd8fca0441532f555e0145994b32a4
[ "MIT" ]
null
null
null
n26/api.py
sdabbo/python-n26
c3390a2fc7fd8fca0441532f555e0145994b32a4
[ "MIT" ]
null
null
null
n26/api.py
sdabbo/python-n26
c3390a2fc7fd8fca0441532f555e0145994b32a4
[ "MIT" ]
null
null
null
import requests from n26 import config url = 'https://api.tech26.de' # Api class can be imported as a library in order to use it within applications # constructor accepting None to maintain backward compatibility # TODO: this method will check if token is valid, if not it will run get_token # IDEA: @ge...
41.966667
117
0.664615
import requests from n26 import config url = 'https://api.tech26.de' # Api class can be imported as a library in order to use it within applications class Api(object): # constructor accepting None to maintain backward compatibility def __init__(self, cfg=None): if not cfg: cfg = config.ge...
4,250
-3
451
3b3d96eeae63b6769a52f174f4855592e18a3d1c
858
py
Python
tests_api/utils/http_manager.py
LoshmanovNA/pet-project
127e8efc11738ef681220dc7dece18dd3f14ec08
[ "MIT" ]
1
2020-01-18T18:18:33.000Z
2020-01-18T18:18:33.000Z
tests_api/utils/http_manager.py
LoshmanovNA/moesk
127e8efc11738ef681220dc7dece18dd3f14ec08
[ "MIT" ]
3
2021-03-31T19:32:57.000Z
2021-12-13T20:33:50.000Z
tests_api/utils/http_manager.py
LoshmanovNA/moesk
127e8efc11738ef681220dc7dece18dd3f14ec08
[ "MIT" ]
null
null
null
import requests
25.235294
70
0.56993
import requests class HttpManager: headers = { 'Content-Type': 'application/json', 'charset': 'utf-8', } @staticmethod def auth(url, data): result = requests.post(url, data=data) response = result.json() HttpManager.headers['X-User-Token'] = response["sessionId...
547
271
23
ca7c76933b7d336d63c05542145ea2269123987d
1,356
py
Python
watchmen/topic/storage/topic_relation_storage.py
luke0623/watchmen-matryoshka-doll
77d7929c2d298ec814dd7e89132861da97a55a26
[ "MIT" ]
null
null
null
watchmen/topic/storage/topic_relation_storage.py
luke0623/watchmen-matryoshka-doll
77d7929c2d298ec814dd7e89132861da97a55a26
[ "MIT" ]
null
null
null
watchmen/topic/storage/topic_relation_storage.py
luke0623/watchmen-matryoshka-doll
77d7929c2d298ec814dd7e89132861da97a55a26
[ "MIT" ]
null
null
null
# from watchmen.common.storage.engine.storage_engine import get_client # from watchmen.topic.topic_relationship import TopicRelationship # # db = get_client() # # topic_relation_collections = db.get_collection('topic_relation_collections') # # # def save_topic_relationship(topic_relation: TopicRelationship): # resu...
39.882353
120
0.756637
# from watchmen.common.storage.engine.storage_engine import get_client # from watchmen.topic.topic_relationship import TopicRelationship # # db = get_client() # # topic_relation_collections = db.get_collection('topic_relation_collections') # # # def save_topic_relationship(topic_relation: TopicRelationship): # resu...
0
0
0
3398cf47cea9385f2b93d0d64e5e1a20763f78d9
3,594
py
Python
snowshu/core/utils.py
pfleischerHU/snowshu
8008a588b00a0ed8cb28c96c8032c4a8be479b5d
[ "Apache-2.0" ]
11
2020-02-27T23:09:43.000Z
2022-03-30T08:19:49.000Z
snowshu/core/utils.py
ankur112358/snowshu
f4f596d08e6441a96fe0adcbc699cf7613fc59e0
[ "Apache-2.0" ]
66
2020-02-20T17:07:20.000Z
2022-03-18T19:53:20.000Z
snowshu/core/utils.py
ankur112358/snowshu
f4f596d08e6441a96fe0adcbc699cf7613fc59e0
[ "Apache-2.0" ]
8
2020-02-20T00:29:26.000Z
2022-03-29T14:59:41.000Z
import os import re from importlib import import_module from pathlib import Path from typing import TYPE_CHECKING, Any, Optional, TextIO, Type, Union import yaml from snowshu.logger import Logger if TYPE_CHECKING: from snowshu.adapters.base_sql_adapter import BaseSQLAdapter from snowshu.adapters.source_adapt...
34.557692
119
0.662215
import os import re from importlib import import_module from pathlib import Path from typing import TYPE_CHECKING, Any, Optional, TextIO, Type, Union import yaml from snowshu.logger import Logger if TYPE_CHECKING: from snowshu.adapters.base_sql_adapter import BaseSQLAdapter from snowshu.adapters.source_adapt...
884
0
46
0e4be924e3a16223cf51a4f2906924797d662264
1,181
py
Python
qubits/tests/test_command_line.py
thespacedoctor/qubits
3c02ace7226389841c6bb838d045c11bed61a3c2
[ "MIT" ]
3
2018-09-25T09:32:55.000Z
2021-11-17T11:35:17.000Z
qubits/tests/test_command_line.py
thespacedoctor/qubits
3c02ace7226389841c6bb838d045c11bed61a3c2
[ "MIT" ]
1
2018-03-16T16:04:52.000Z
2018-03-16T16:04:52.000Z
qubits/tests/test_command_line.py
thespacedoctor/qubits
3c02ace7226389841c6bb838d045c11bed61a3c2
[ "MIT" ]
2
2017-07-16T08:23:41.000Z
2021-02-23T12:49:17.000Z
import os import nose from qubits import command_line as cl # SETUP AND TEARDOWN FIXTURE FUNCTIONS FOR THE ENTIRE MODULE def setUpModule(): "set up test fixtures" moduleDirectory = os.path.dirname(__file__) + "/../tests" # SETUP PATHS TO COMMONG DIRECTORIES FOR TEST DATA global pathToOutputDir, path...
24.102041
63
0.676545
import os import nose from qubits import command_line as cl # SETUP AND TEARDOWN FIXTURE FUNCTIONS FOR THE ENTIRE MODULE def setUpModule(): "set up test fixtures" moduleDirectory = os.path.dirname(__file__) + "/../tests" # SETUP PATHS TO COMMONG DIRECTORIES FOR TEST DATA global pathToOutputDir, path...
327
106
73
d9fcfba39ce9b0cc4de68124a0d0567151561b88
949
py
Python
tests/components/gree/common.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
6
2017-08-02T19:26:39.000Z
2020-03-14T22:47:41.000Z
tests/components/gree/common.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
60
2020-08-03T07:32:56.000Z
2022-03-31T06:02:07.000Z
tests/components/gree/common.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
14
2018-08-19T16:28:26.000Z
2021-09-02T18:26:53.000Z
"""Common helpers for gree test cases.""" from unittest.mock import AsyncMock, Mock def build_device_info_mock( name="fake-device-1", ipAddress="1.1.1.1", mac="aabbcc112233" ): """Build mock device info structure.""" mock = Mock(ip=ipAddress, port=7000, mac=mac) mock.name = name return mock def ...
26.361111
85
0.621707
"""Common helpers for gree test cases.""" from unittest.mock import AsyncMock, Mock def build_device_info_mock( name="fake-device-1", ipAddress="1.1.1.1", mac="aabbcc112233" ): """Build mock device info structure.""" mock = Mock(ip=ipAddress, port=7000, mac=mac) mock.name = name return mock def ...
0
0
0
b88c584281f4549b3eec2f2391c130cb0a29fd11
383
py
Python
antistasi_console_log_parser/data/regexes.py
Giddius/Antistasi_Console_Log_Parser
78f8d1807eb1bde78578c0836110691e286e6935
[ "MIT" ]
null
null
null
antistasi_console_log_parser/data/regexes.py
Giddius/Antistasi_Console_Log_Parser
78f8d1807eb1bde78578c0836110691e286e6935
[ "MIT" ]
null
null
null
antistasi_console_log_parser/data/regexes.py
Giddius/Antistasi_Console_Log_Parser
78f8d1807eb1bde78578c0836110691e286e6935
[ "MIT" ]
null
null
null
import re PLAYER_NAME_AND_ID_REGEX = re.compile(r"[\s\d]\d\:[0123456]\d\:[0123456]\d\sPlayer\s(?P<player_name>(?!headlessclient).*)\s(connected)\s\(id\=(?P<steam_id>\d+)\)", re.IGNORECASE) CONNECT_REGEX = re.compile(r"^\s?(?P<hour>[0-24]?\d)\:(?P<minute>[0123456]\d)\:(?P<second>[0123456]\d)\sPlayer\s(?P<player_name>...
54.714286
190
0.644909
import re PLAYER_NAME_AND_ID_REGEX = re.compile(r"[\s\d]\d\:[0123456]\d\:[0123456]\d\sPlayer\s(?P<player_name>(?!headlessclient).*)\s(connected)\s\(id\=(?P<steam_id>\d+)\)", re.IGNORECASE) CONNECT_REGEX = re.compile(r"^\s?(?P<hour>[0-24]?\d)\:(?P<minute>[0123456]\d)\:(?P<second>[0123456]\d)\sPlayer\s(?P<player_name>...
0
0
0
9d506ebf4591d3268604383d55ef968550544a4b
84
py
Python
ivfit/__init__.py
nitrocalcite/ivfit
2c41ab786b2725ff4529600707d547ca3d63afcf
[ "Apache-2.0" ]
null
null
null
ivfit/__init__.py
nitrocalcite/ivfit
2c41ab786b2725ff4529600707d547ca3d63afcf
[ "Apache-2.0" ]
5
2021-04-16T22:47:05.000Z
2021-11-04T18:21:44.000Z
ivfit/__init__.py
nitrocalcite/ivfit
2c41ab786b2725ff4529600707d547ca3d63afcf
[ "Apache-2.0" ]
null
null
null
from .interactive_guess import InteractiveGuessSession from .util import load, save
28
54
0.857143
from .interactive_guess import InteractiveGuessSession from .util import load, save
0
0
0
bd4a98586fcf4264f4c4a9d5624254f4cb4c8da5
209
py
Python
calenderprogram.py
Ratheshprabakar/Python-Programs
fca9d4f0b5f5f5693b3d7e25c6d890f4973dc19e
[ "MIT" ]
2
2019-07-10T06:32:05.000Z
2019-11-13T07:52:53.000Z
calenderprogram.py
Ratheshprabakar/Python-Programs
fca9d4f0b5f5f5693b3d7e25c6d890f4973dc19e
[ "MIT" ]
null
null
null
calenderprogram.py
Ratheshprabakar/Python-Programs
fca9d4f0b5f5f5693b3d7e25c6d890f4973dc19e
[ "MIT" ]
1
2019-10-12T06:56:13.000Z
2019-10-12T06:56:13.000Z
#Python program to display calender for particular month import calendar if __name__=='__main__': main()
23.222222
56
0.717703
#Python program to display calender for particular month import calendar def main(): x=int(input("Enter Month:\t")) y=int(input("Enter Year:\t")) print(calendar.month(y,x)) if __name__=='__main__': main()
81
0
22
147dbc6eba3bcf4488dfba6d28ede59cd9ff8496
1,718
py
Python
examples/pybullet/gym/pybullet_envs/ARS/train_ars.py
arocchi/bullet3
5183ee51b1bf0fa5c3c3636299bbae0d85bb5c5a
[ "Zlib" ]
null
null
null
examples/pybullet/gym/pybullet_envs/ARS/train_ars.py
arocchi/bullet3
5183ee51b1bf0fa5c3c3636299bbae0d85bb5c5a
[ "Zlib" ]
null
null
null
examples/pybullet/gym/pybullet_envs/ARS/train_ars.py
arocchi/bullet3
5183ee51b1bf0fa5c3c3636299bbae0d85bb5c5a
[ "Zlib" ]
null
null
null
"""TODO(jietan): DO NOT SUBMIT without one-line documentation for train_ars. blaze build -c opt //experimental/users/jietan/ARS:train_ars blaze-bin/experimental/users/jietan/ARS/train_ars \ --logdir=/cns/ij-d/home/jietan/experiment/ARS/test1 \ --config_name=MINITAUR_GYM_CONFIG """ from __future__ import absolute_impo...
26.430769
87
0.718277
"""TODO(jietan): DO NOT SUBMIT without one-line documentation for train_ars. blaze build -c opt //experimental/users/jietan/ARS:train_ars blaze-bin/experimental/users/jietan/ARS/train_ars \ --logdir=/cns/ij-d/home/jietan/experiment/ARS/test1 \ --config_name=MINITAUR_GYM_CONFIG """ from __future__ import absolute_impo...
887
0
46
c04c45ad30a303bbe84b500bf7cd221213d8b9ac
5,885
py
Python
lab4/traces-driver.py
CaoYuchen/CMU15513
753a46c80df238699b316c518b29d114ca19e52d
[ "MIT" ]
2
2022-03-19T21:29:37.000Z
2022-03-20T16:31:11.000Z
lab4/traces-driver.py
CaoYuchen/CMU15513
753a46c80df238699b316c518b29d114ca19e52d
[ "MIT" ]
null
null
null
lab4/traces-driver.py
CaoYuchen/CMU15513
753a46c80df238699b316c518b29d114ca19e52d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ''' This file tests student written cachelab traces. It tests them by running traces on csim-ref and comparing the hits/misses/evictions with the expected hits/misses/evictions. It also checks if the trace is well formatted. If run with the -f [tracefile] it only judges whether tracefile is wel...
29.133663
93
0.592014
#!/usr/bin/env python3 ''' This file tests student written cachelab traces. It tests them by running traces on csim-ref and comparing the hits/misses/evictions with the expected hits/misses/evictions. It also checks if the trace is well formatted. If run with the -f [tracefile] it only judges whether tracefile is wel...
1,960
0
46
3555ffd5cdaeb4bc65bc9f813dc54f6811eb6978
3,046
py
Python
imagenet/imagenet_sis_training_util.py
b-carter/overinterpretation
211d25c83d97e3238109e5c611c1af696989d3b6
[ "MIT" ]
16
2021-11-02T09:53:35.000Z
2022-02-16T11:42:35.000Z
imagenet/imagenet_sis_training_util.py
b-carter/overinterpretation
211d25c83d97e3238109e5c611c1af696989d3b6
[ "MIT" ]
1
2021-12-30T17:33:11.000Z
2021-12-30T17:33:11.000Z
imagenet/imagenet_sis_training_util.py
b-carter/overinterpretation
211d25c83d97e3238109e5c611c1af696989d3b6
[ "MIT" ]
4
2021-12-18T12:48:55.000Z
2022-02-16T09:35:17.000Z
"""Util for training on SIS/backselect subsets.""" import glob import numpy as np import os import torch import torchvision import imagenet_backselect class BackselectSubsetsImageNetDataset(torchvision.datasets.ImageNet): """Dataset of backselect pixel subsets on ImageNet. Args: sis_dir (str): Pat...
36.698795
78
0.677282
"""Util for training on SIS/backselect subsets.""" import glob import numpy as np import os import torch import torchvision import imagenet_backselect def _get_basename_without_extension(filepath): return os.path.basename(filepath).split('.')[0] class BackselectSubsetsImageNetDataset(torchvision.datasets.Imag...
745
0
50
8188af67924b5573f186e861a45e5998b8cd5c58
37,456
py
Python
commp.py
jkjium/pyMAVEN
977f1e43145601ce4a61a2e01261858fd4c2be43
[ "MIT" ]
null
null
null
commp.py
jkjium/pyMAVEN
977f1e43145601ce4a61a2e01261858fd4c2be43
[ "MIT" ]
null
null
null
commp.py
jkjium/pyMAVEN
977f1e43145601ce4a61a2e01261858fd4c2be43
[ "MIT" ]
null
null
null
import sys import os import time import math from itertools import groupby import operator as op import numpy as np from scipy.cluster.hierarchy import dendrogram from scipy.cluster.hierarchy import linkage from scipy.cluster.hierarchy import fcluster import itertools import inspect import collections ...
43.003444
1,153
0.46265
import sys import os import time import math from itertools import groupby import operator as op import numpy as np from scipy.cluster.hierarchy import dendrogram from scipy.cluster.hierarchy import linkage from scipy.cluster.hierarchy import fcluster import itertools import inspect import collections ...
13,784
0
706
3160d6cb87623716e4abf34ad58c528aaacbfd09
1,643
py
Python
server/modules/friends.py
cs460-group1/chat-server
e7d0f799f401bce8b1b776193e5ad2b3ee8c8bbf
[ "MIT" ]
1
2016-05-03T22:04:07.000Z
2016-05-03T22:04:07.000Z
server/modules/friends.py
cs460-group1/chat-server
e7d0f799f401bce8b1b776193e5ad2b3ee8c8bbf
[ "MIT" ]
null
null
null
server/modules/friends.py
cs460-group1/chat-server
e7d0f799f401bce8b1b776193e5ad2b3ee8c8bbf
[ "MIT" ]
null
null
null
from server.modules import accounts import pickle """ Manages friend connections between users. """ class FriendManager: """ Gets a list of friends for a given user. """ """ Adds a user as a friend for a given user. """ """ Remove a user as a friend for a given user. """ ""...
26.5
82
0.628728
from server.modules import accounts import pickle """ Manages friend connections between users. """ class FriendManager: def __init__(self): try: with open('friends.pickle', 'rb') as f: self.friends = pickle.load(f) except FileNotFoundError: self.friends = {...
1,116
0
130
9c5fc9cee19eaf97d1aa2472f728eeff0be3ebd9
10,468
py
Python
ilv/vis_log.py
yuyu2172/ilv
e9d9ca6d3d3c8653ac5b2959193c7ebd2738fa6a
[ "MIT" ]
null
null
null
ilv/vis_log.py
yuyu2172/ilv
e9d9ca6d3d3c8653ac5b2959193c7ebd2738fa6a
[ "MIT" ]
null
null
null
ilv/vis_log.py
yuyu2172/ilv
e9d9ca6d3d3c8653ac5b2959193c7ebd2738fa6a
[ "MIT" ]
null
null
null
import bokeh.plotting import bokeh.models.layouts import collections import numpy as np import warnings from ilv.utils import filter_dict from ilv.utils import list_of_dict_to_dict_of_list from ilv.utils import moving_average_1d np.random.seed(1) colors_10_indices = np.random.permutation(10) colors_255_indices = np....
36.989399
82
0.624475
import bokeh.plotting import bokeh.models.layouts import collections import numpy as np import warnings from ilv.utils import filter_dict from ilv.utils import list_of_dict_to_dict_of_list from ilv.utils import moving_average_1d np.random.seed(1) colors_10_indices = np.random.permutation(10) colors_255_indices = np....
1,841
0
26
2f2fdfe7bbf693fa943e54c5e6b6a42471543a51
5,786
py
Python
dynaconf/vendor/click/termui.py
sephiartlist/dynaconf
9c5f60b289c1f0fa3f899f1962a8fe5712c74eab
[ "MIT" ]
2,293
2015-08-14T22:39:31.000Z
2022-03-31T12:44:49.000Z
dynaconf/vendor/click/termui.py
sephiartlist/dynaconf
9c5f60b289c1f0fa3f899f1962a8fe5712c74eab
[ "MIT" ]
676
2015-08-20T19:29:56.000Z
2022-03-31T13:45:51.000Z
dynaconf/vendor/click/termui.py
sephiartlist/dynaconf
9c5f60b289c1f0fa3f899f1962a8fe5712c74eab
[ "MIT" ]
255
2015-12-02T21:16:33.000Z
2022-03-20T22:03:46.000Z
_C=True _B=False _A=None import inspect,io,itertools,os,struct,sys from ._compat import DEFAULT_COLUMNS,get_winterm_size,isatty,strip_ansi,WIN from .exceptions import Abort from .exceptions import UsageError from .globals import resolve_color_default from .types import Choice from .types import convert_type from .types...
42.859259
560
0.736606
_C=True _B=False _A=None import inspect,io,itertools,os,struct,sys from ._compat import DEFAULT_COLUMNS,get_winterm_size,isatty,strip_ansi,WIN from .exceptions import Abort from .exceptions import UsageError from .globals import resolve_color_default from .types import Choice from .types import convert_type from .types...
4,708
0
374
72e83a7fc117c891a0d942f6a5803722df510fa3
5,333
py
Python
disent/data/groundtruth/_xyobject.py
neonkitchen/disent
0f45fefea03473690dfdbf48ef83f6e17ca9b8b3
[ "MIT" ]
null
null
null
disent/data/groundtruth/_xyobject.py
neonkitchen/disent
0f45fefea03473690dfdbf48ef83f6e17ca9b8b3
[ "MIT" ]
null
null
null
disent/data/groundtruth/_xyobject.py
neonkitchen/disent
0f45fefea03473690dfdbf48ef83f6e17ca9b8b3
[ "MIT" ]
1
2022-01-18T06:43:33.000Z
2022-01-18T06:43:33.000Z
# ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ # MIT License # # Copyright (c) 2021 Nathan Juraj Michlo # # 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 Softwar...
35.317881
142
0.508532
# ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ # MIT License # # Copyright (c) 2021 Nathan Juraj Michlo # # 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 Softwar...
1,351
0
110
0faa394c0bc104df623c3935921a4a91f036c076
1,188
py
Python
utils.py
MingyuLi19910814/pix2pix-Anime-Sketch-Colorization-Pytorch
3543190b1116c9d979f8cfc95bdc8f23d49d20e6
[ "MIT" ]
1
2022-02-15T06:04:40.000Z
2022-02-15T06:04:40.000Z
utils.py
MingyuLi19910814/pix2pix-Anime-Sketch-Colorization-Pytorch
3543190b1116c9d979f8cfc95bdc8f23d49d20e6
[ "MIT" ]
null
null
null
utils.py
MingyuLi19910814/pix2pix-Anime-Sketch-Colorization-Pytorch
3543190b1116c9d979f8cfc95bdc8f23d49d20e6
[ "MIT" ]
null
null
null
from torchvision import transforms from torchvision.datasets import ImageFolder from torch.utils.data.dataloader import DataLoader from config import cfg import os import shutil def get_dataloader(path, shuffle=True): """ create a Dataloader of the images in the folder :param path: path containing the imag...
34.941176
76
0.636364
from torchvision import transforms from torchvision.datasets import ImageFolder from torch.utils.data.dataloader import DataLoader from config import cfg import os import shutil def get_dataloader(path, shuffle=True): """ create a Dataloader of the images in the folder :param path: path containing the imag...
0
0
0
3e7d343e4b13f92bf10fa6a94e6976abde4b8d40
19
py
Python
logparser/SLCT/__init__.py
tyronevb/logparser
3dcd1e1892fb65c344f3b5010298e3dfd88f33ed
[ "MIT" ]
1
2021-08-05T06:40:02.000Z
2021-08-05T06:40:02.000Z
logparser/SLCT/__init__.py
tyronevb/logparser
3dcd1e1892fb65c344f3b5010298e3dfd88f33ed
[ "MIT" ]
null
null
null
logparser/SLCT/__init__.py
tyronevb/logparser
3dcd1e1892fb65c344f3b5010298e3dfd88f33ed
[ "MIT" ]
1
2022-01-20T11:01:43.000Z
2022-01-20T11:01:43.000Z
from .SLCT import *
19
19
0.736842
from .SLCT import *
0
0
0
98d3b032d4d7191b2744b3e74cb3ec52eccd9d59
26,837
py
Python
src/telegram.py
chrishasl/SmartNodeMonitorBot
62a76a6d92ec62cee4b1d95b1e4a71ada1a3ec53
[ "MIT" ]
null
null
null
src/telegram.py
chrishasl/SmartNodeMonitorBot
62a76a6d92ec62cee4b1d95b1e4a71ada1a3ec53
[ "MIT" ]
null
null
null
src/telegram.py
chrishasl/SmartNodeMonitorBot
62a76a6d92ec62cee4b1d95b1e4a71ada1a3ec53
[ "MIT" ]
null
null
null
## # Part of `SmartNodeMonitorBot` # # Copyright 2018 dustinface # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy,...
32.294826
113
0.592056
## # Part of `SmartNodeMonitorBot` # # Copyright 2018 dustinface # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy,...
19,589
31
1,604
22d2df13043324573ead66b0b22ac1073f674b83
3,641
py
Python
train_predict/load_model_not_exclusions.py
Swarchal/transfer_learning_across_cell_lines
2e17c37267a1d03d67340fdb99cf9c1c1a0ebe12
[ "MIT" ]
null
null
null
train_predict/load_model_not_exclusions.py
Swarchal/transfer_learning_across_cell_lines
2e17c37267a1d03d67340fdb99cf9c1c1a0ebe12
[ "MIT" ]
null
null
null
train_predict/load_model_not_exclusions.py
Swarchal/transfer_learning_across_cell_lines
2e17c37267a1d03d67340fdb99cf9c1c1a0ebe12
[ "MIT" ]
null
null
null
""" module docstring """ import os import sys import torch import glob from random import shuffle import numpy as np from PIL import Image from skimage import io from torch import nn from torch.autograd import Variable from torch.utils.data import Dataset, DataLoader from torchvision import models, transforms import ma...
33.712963
159
0.700906
""" module docstring """ import os import sys import torch import glob from random import shuffle import numpy as np from PIL import Image from skimage import io from torch import nn from torch.autograd import Variable from torch.utils.data import Dataset, DataLoader from torchvision import models, transforms import ma...
0
0
0
cecc124801fec60a1ee8a0fb79ecc4941d1c35ac
341
py
Python
dp_conceptual_search/api/healthcheck/services.py
flaxandteal/dp-conceptual-search
16c6383a61ba5b7069337c2626a0dc243bfe9d35
[ "MIT" ]
3
2018-05-10T16:49:27.000Z
2022-03-29T15:23:04.000Z
dp_conceptual_search/api/healthcheck/services.py
flaxandteal/dp-conceptual-search
16c6383a61ba5b7069337c2626a0dc243bfe9d35
[ "MIT" ]
2
2018-09-20T06:37:27.000Z
2018-11-12T12:05:08.000Z
dp_conceptual_search/api/healthcheck/services.py
flaxandteal/dp-conceptual-search
16c6383a61ba5b7069337c2626a0dc243bfe9d35
[ "MIT" ]
3
2018-06-25T10:48:43.000Z
2021-04-11T08:01:27.000Z
""" Define an enum of all services to health check """ from .healthchecks.healthcheck import HealthCheck from .healthchecks import ElasticsearchHealthCheck, DpFastTextHealthCheck from enum import Enum
24.357143
73
0.803519
""" Define an enum of all services to health check """ from .healthchecks.healthcheck import HealthCheck from .healthchecks import ElasticsearchHealthCheck, DpFastTextHealthCheck from enum import Enum class Service(Enum): elasticsearch: HealthCheck = ElasticsearchHealthCheck() dp_fasttext: HealthCheck = DpF...
0
114
23
a3d65e4ed8eab5699bf05495b2d748ac709915fb
1,458
py
Python
lib/common/error.py
smallstrong0/easy_python
c6794bf290731beb9b3cab94f815880befb37d9b
[ "MIT" ]
2
2020-09-16T09:32:09.000Z
2021-02-10T12:09:40.000Z
lib/common/error.py
smallstrong0/easy_python
c6794bf290731beb9b3cab94f815880befb37d9b
[ "MIT" ]
null
null
null
lib/common/error.py
smallstrong0/easy_python
c6794bf290731beb9b3cab94f815880befb37d9b
[ "MIT" ]
null
null
null
# ! /usr/bin/env python # -*- coding: utf-8 -*- from enum import Enum from tornado.web import HTTPError status_0 = dict(status_code=405, reason='Method not allowed.') status_1 = dict(status_code=404, reason='API not found.') # 示例相关 # 测试相关
28.038462
65
0.638546
# ! /usr/bin/env python # -*- coding: utf-8 -*- from enum import Enum from tornado.web import HTTPError status_0 = dict(status_code=405, reason='Method not allowed.') status_1 = dict(status_code=404, reason='API not found.') class BMCError(HTTPError): def __init__(self, error): if isinstance(error, tupl...
256
1,089
116
c4227b0c30d4f78bec2a43c1f846bc4c5aab1df0
2,815
py
Python
model/medical_inpatient_medication.py
IDRISSOUM/hospital_management
56a768f29269a77bc890d40479a8aacb90867189
[ "Unlicense" ]
null
null
null
model/medical_inpatient_medication.py
IDRISSOUM/hospital_management
56a768f29269a77bc890d40479a8aacb90867189
[ "Unlicense" ]
null
null
null
model/medical_inpatient_medication.py
IDRISSOUM/hospital_management
56a768f29269a77bc890d40479a8aacb90867189
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # Part of BrowseInfo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api, _ from datetime import date,datetime # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:s
61.195652
150
0.647957
# -*- coding: utf-8 -*- # Part of BrowseInfo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api, _ from datetime import date,datetime class medical_inpatient_medication(models.Model): _name = 'medical.inpatient.medication' _rec_name = 'medical_medicament_id' ...
0
2,543
23
31be14b649c4c5f9b77438eb1c5afdf4d4a29ad6
1,995
py
Python
face-detection.py
twesix-learn/python-opencv
6adac53f1ebdbe0e1f8b62a03c872571277a06ba
[ "MIT" ]
null
null
null
face-detection.py
twesix-learn/python-opencv
6adac53f1ebdbe0e1f8b62a03c872571277a06ba
[ "MIT" ]
null
null
null
face-detection.py
twesix-learn/python-opencv
6adac53f1ebdbe0e1f8b62a03c872571277a06ba
[ "MIT" ]
null
null
null
import cv2 as cv WIDTH = 400 HEIGHT = 300 ID_WIDTH = 3 ID_HEIGHT = 4 cap = cv.VideoCapture(0) cap.set(ID_WIDTH, WIDTH) cap.set(ID_HEIGHT, HEIGHT) face_engine = cv.CascadeClassifier('data/haarcascades/haarcascade_frontalface_default.xml') eye_engine = cv.CascadeClassifier('data/haarcascades/haarcascade_eye.xml') smile...
33.25
113
0.542857
import cv2 as cv WIDTH = 400 HEIGHT = 300 ID_WIDTH = 3 ID_HEIGHT = 4 cap = cv.VideoCapture(0) cap.set(ID_WIDTH, WIDTH) cap.set(ID_HEIGHT, HEIGHT) face_engine = cv.CascadeClassifier('data/haarcascades/haarcascade_frontalface_default.xml') eye_engine = cv.CascadeClassifier('data/haarcascades/haarcascade_eye.xml') smile...
1,589
0
23
66795b1e7e079f496a683d1ef32c03b15d195ceb
10,900
py
Python
Project/find_lane_pixels.py
anastasia-spb/CarND-Advanced-Lane-Lines
d7eef2fccbfb639abb4e8b98b5169f0a45e1d448
[ "MIT" ]
null
null
null
Project/find_lane_pixels.py
anastasia-spb/CarND-Advanced-Lane-Lines
d7eef2fccbfb639abb4e8b98b5169f0a45e1d448
[ "MIT" ]
null
null
null
Project/find_lane_pixels.py
anastasia-spb/CarND-Advanced-Lane-Lines
d7eef2fccbfb639abb4e8b98b5169f0a45e1d448
[ "MIT" ]
null
null
null
import numpy as np import cv2 import glob import matplotlib.pyplot as plt import find_lane_pixels_convolution def find_good_indexis_in_window(out_img, window_idx, nonzerox, nonzeroy, window_height, current_pos, margin=100, visu=False): ''' Calculate good (==nonzero) indices ins...
38.928571
135
0.685872
import numpy as np import cv2 import glob import matplotlib.pyplot as plt import find_lane_pixels_convolution def find_good_indexis_in_window(out_img, window_idx, nonzerox, nonzeroy, window_height, current_pos, margin=100, visu=False): ''' Calculate good (==nonzero) indices ins...
497
0
23
0a968dc3fa12c99cb47ff7c3b761ed573e767f28
383
py
Python
exercicios-Python/desaf79.py
marcelo-py/Exercicios-Python
d654d54821983897dbc377a2d3db97671dd75b5b
[ "MIT" ]
null
null
null
exercicios-Python/desaf79.py
marcelo-py/Exercicios-Python
d654d54821983897dbc377a2d3db97671dd75b5b
[ "MIT" ]
null
null
null
exercicios-Python/desaf79.py
marcelo-py/Exercicios-Python
d654d54821983897dbc377a2d3db97671dd75b5b
[ "MIT" ]
null
null
null
numero = [] while True: numeros = int(input('Digite um número ')) if numeros not in numero: numero.append(numeros) numero.sort() else: print('Valor duplicado! Ignorado') sn = str(input('Deseja continuar? [S/N]: ')) while not sn in 'SsNn': sn = str(input('Deseja contin...
25.533333
52
0.569191
numero = [] while True: numeros = int(input('Digite um número ')) if numeros not in numero: numero.append(numeros) numero.sort() else: print('Valor duplicado! Ignorado') sn = str(input('Deseja continuar? [S/N]: ')) while not sn in 'SsNn': sn = str(input('Deseja contin...
0
0
0
adc45c092330ec7b33253166f13e805f32a5f21b
4,758
py
Python
Image_preprocess.py
lixuekai2001/Deep-learning-aided-porous-media-hydrodynamic-analysis-and-three-dimensional-reconstruction
193c9bf8dc0571b4c3f639ad4fd10aef7b0dda10
[ "Apache-2.0" ]
3
2022-02-17T12:40:37.000Z
2022-03-24T20:25:52.000Z
Image_preprocess.py
HuysmanWang/Deep-learning-aided-porous-media-hydrodynamic-analysis-and-three-dimensional-reconstruction
193c9bf8dc0571b4c3f639ad4fd10aef7b0dda10
[ "Apache-2.0" ]
null
null
null
Image_preprocess.py
HuysmanWang/Deep-learning-aided-porous-media-hydrodynamic-analysis-and-three-dimensional-reconstruction
193c9bf8dc0571b4c3f639ad4fd10aef7b0dda10
[ "Apache-2.0" ]
null
null
null
#Any image input no matter what scale it belongs, should through following steps that used for Image segmentation task #Including two parts: # 1. Segmentation training set prepare 8000->800->choose 5 label->label me # 2. Segmentation model predict from PIL import Image import cv2 import os import random import json ...
33.744681
118
0.688525
#Any image input no matter what scale it belongs, should through following steps that used for Image segmentation task #Including two parts: # 1. Segmentation training set prepare 8000->800->choose 5 label->label me # 2. Segmentation model predict from PIL import Image import cv2 import os import random import json ...
3,685
0
183
30f4e51e9457320f48033005baae3d7aa65016b1
21,442
py
Python
test/transforms.py
DefTruth/landmarksaug
71d978a062e4a7c8fe90ca62c8dff109ea7718e7
[ "MIT" ]
56
2022-02-08T06:45:02.000Z
2022-03-27T14:03:08.000Z
test/transforms.py
DefTruth/pylandmarks
71d978a062e4a7c8fe90ca62c8dff109ea7718e7
[ "MIT" ]
9
2022-02-15T12:32:34.000Z
2022-03-31T14:12:06.000Z
test/transforms.py
DefTruth/pylandmarks
71d978a062e4a7c8fe90ca62c8dff109ea7718e7
[ "MIT" ]
8
2022-02-15T09:17:51.000Z
2022-03-27T14:03:08.000Z
import cv2 import numpy as np import torchvision # import albumentations from torch import Tensor from typing import Tuple import torchlm if __name__ == "__main__": print(torchlm.albumentations_is_available()) test_torchlm_transforms_pipeline() test_torchlm_transform_mask() test_torch...
34.752026
100
0.682725
import cv2 import numpy as np import torchvision # import albumentations from torch import Tensor from typing import Tuple import torchlm def callable_array_noop( img: np.ndarray, landmarks: np.ndarray ) -> Tuple[np.ndarray, np.ndarray]: # Do some transform here ... return img.astype(np.uint3...
20,280
0
368
58f92e5aafd1bca0b5099b6f6ba5284e3b254216
15,037
py
Python
pytest_localstack/session.py
xiang-zhu/pytest-localstack
cc0e3e359e51381e4ccc148f6ca6a8b80aaf0051
[ "MIT" ]
null
null
null
pytest_localstack/session.py
xiang-zhu/pytest-localstack
cc0e3e359e51381e4ccc148f6ca6a8b80aaf0051
[ "MIT" ]
null
null
null
pytest_localstack/session.py
xiang-zhu/pytest-localstack
cc0e3e359e51381e4ccc148f6ca6a8b80aaf0051
[ "MIT" ]
null
null
null
"""Run and interact with a Localstack container.""" import logging import os import string import time from copy import copy from packaging import version from pytest_localstack import ( constants, container, exceptions, plugin, service_checks, utils, ) logger = logging.getLogger(__name__) ...
36.67561
86
0.612489
"""Run and interact with a Localstack container.""" import logging import os import string import time from copy import copy from packaging import version from pytest_localstack import ( constants, container, exceptions, plugin, service_checks, utils, ) logger = logging.getLogger(__name__) ...
3,527
0
108
00081b83299676c2cecbccc1eff0d4b028cf2638
7,828
py
Python
grammar_generation.py
gmh14/data_efficient_grammar
7a25cecddc9510deeac7fd816715fd7b69103d85
[ "MIT" ]
15
2022-02-18T22:23:14.000Z
2022-03-24T10:54:46.000Z
grammar_generation.py
gmh14/data_efficient_grammar
7a25cecddc9510deeac7fd816715fd7b69103d85
[ "MIT" ]
null
null
null
grammar_generation.py
gmh14/data_efficient_grammar
7a25cecddc9510deeac7fd816715fd7b69103d85
[ "MIT" ]
2
2022-02-23T06:57:50.000Z
2022-03-24T10:54:24.000Z
from rdkit import Chem from functools import partial from multiprocessing import Pool from fuseprop import find_clusters, extract_subgraph, get_mol, get_smiles, find_fragments from copy import deepcopy import numpy as np import torch import argparse from private import * from agent import sample
41.2
184
0.640904
from rdkit import Chem from functools import partial from multiprocessing import Pool from fuseprop import find_clusters, extract_subgraph, get_mol, get_smiles, find_fragments from copy import deepcopy import numpy as np import torch import argparse from private import * from agent import sample def data_processing(i...
7,435
0
92
4918724c0c4afe3ed2727c4e18a1d4f3b57d1839
16,719
py
Python
scripts/add_doc_comments.py
f0rki/capstone-sys
83544fb3724732bfdffbc947c9fa348f3a9bedbb
[ "MIT" ]
2
2018-07-21T16:37:18.000Z
2018-12-13T18:43:09.000Z
scripts/add_doc_comments.py
f0rki/capstone-sys
83544fb3724732bfdffbc947c9fa348f3a9bedbb
[ "MIT" ]
null
null
null
scripts/add_doc_comments.py
f0rki/capstone-sys
83544fb3724732bfdffbc947c9fa348f3a9bedbb
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Apply a patch that adds Rust doc comments to bindgen-generated Rust source. To run unittests: python -m unittest -v add_doc_comments """ # pylint: disable=too-few-public-methods from __future__ import print_function import argparse import logging import re import unittest INDENT_PAT...
29.383128
80
0.597404
#!/usr/bin/env python """ Apply a patch that adds Rust doc comments to bindgen-generated Rust source. To run unittests: python -m unittest -v add_doc_comments """ # pylint: disable=too-few-public-methods from __future__ import print_function import argparse import logging import re import unittest INDENT_PAT...
3,566
59
978
e68cbe53b19211abab9194df5d2cd7ba4c98e406
310
py
Python
bench/cacheout.py
scopatz/PyTables
05a74def785688abd802224a5ba44393a701ebc7
[ "BSD-3-Clause" ]
9
2021-09-28T05:20:22.000Z
2022-03-16T11:09:06.000Z
bench/cacheout.py
scopatz/PyTables
05a74def785688abd802224a5ba44393a701ebc7
[ "BSD-3-Clause" ]
null
null
null
bench/cacheout.py
scopatz/PyTables
05a74def785688abd802224a5ba44393a701ebc7
[ "BSD-3-Clause" ]
9
2018-09-14T02:42:36.000Z
2021-07-12T02:37:45.000Z
# Program to clean out the filesystem cache import numpy a = numpy.arange(1000 * 100 * 125, dtype='f8') # 100 MB of RAM b = a * 3 # Another 100 MB # delete the reference to the booked memory del a del b # Do a loop to fully recharge the python interpreter j = 2 for i in range(1000 * 1000): j += i * 2
22.142857
63
0.674194
# Program to clean out the filesystem cache import numpy a = numpy.arange(1000 * 100 * 125, dtype='f8') # 100 MB of RAM b = a * 3 # Another 100 MB # delete the reference to the booked memory del a del b # Do a loop to fully recharge the python interpreter j = 2 for i in range(1000 * 1000): j += i * 2
0
0
0
cd581c1618f740914bd9b2e1f617f1cae66a455c
936
py
Python
load_camera_info_test.py
drewm1980/multi_view_stereo_benchmark
748bfa1ca09a53f27c95a2bd0c7750831821b85c
[ "MIT" ]
6
2016-10-28T13:58:33.000Z
2022-03-03T08:29:58.000Z
load_camera_info_test.py
drewm1980/multi_view_stereo_benchmark
748bfa1ca09a53f27c95a2bd0c7750831821b85c
[ "MIT" ]
null
null
null
load_camera_info_test.py
drewm1980/multi_view_stereo_benchmark
748bfa1ca09a53f27c95a2bd0c7750831821b85c
[ "MIT" ]
5
2016-10-28T15:33:18.000Z
2020-10-07T14:57:59.000Z
#!/usr/bin/env python3 # Test code for functions that load halcon intrinsics and extrinsics from load_camera_info import * testDataPath = Path('data_for_unit_tests/extrinsics_for_testing') if __name__=='__main__': test_that_pose_types_are_consistent()
44.571429
148
0.737179
#!/usr/bin/env python3 # Test code for functions that load halcon intrinsics and extrinsics from load_camera_info import * testDataPath = Path('data_for_unit_tests/extrinsics_for_testing') def test_that_pose_types_are_consistent(): num_cameras = 12 for i in range(num_cameras): file_path_homogeneous =...
654
0
23
2425cf1b875c42fe6fcd8c3971fd6883419e2956
5,691
py
Python
dataset/AoDist_dataset.py
priestlab/aorta_houghcircle
ebf87dcc95c96413f345777a9c0d26df8e9bf3fc
[ "Apache-2.0" ]
2
2020-09-05T13:40:01.000Z
2021-07-05T16:55:27.000Z
dataset/AoDist_dataset.py
priestlab/aorta_houghcircle
ebf87dcc95c96413f345777a9c0d26df8e9bf3fc
[ "Apache-2.0" ]
null
null
null
dataset/AoDist_dataset.py
priestlab/aorta_houghcircle
ebf87dcc95c96413f345777a9c0d26df8e9bf3fc
[ "Apache-2.0" ]
null
null
null
from __future__ import division import numpy as np from pydicom import dcmread from pydicom.filebase import DicomBytesIO from zipfile import ZipFile from torch.utils.data import Dataset from skimage.exposure import rescale_intensity import pandas as pd from scipy.ndimage import center_of_mass from dataset.processing...
33.674556
86
0.599192
from __future__ import division import numpy as np from pydicom import dcmread from pydicom.filebase import DicomBytesIO from zipfile import ZipFile from torch.utils.data import Dataset from skimage.exposure import rescale_intensity import pandas as pd from scipy.ndimage import center_of_mass from dataset.processing...
2,788
0
143
7cce13d6b49c59e064c0b3655e99a28e284fff0a
572
py
Python
students/K33401/laboratory_works/Kasatkin_Daniil/LR1/Task_2/server.py
aytakr/ITMO_ICT_WebDevelopment_2021-2022
57c0eef5e1f413c7f031ee001d59e5122f990f26
[ "MIT" ]
7
2021-09-02T08:20:58.000Z
2022-01-12T11:48:07.000Z
students/K33401/laboratory_works/Kasatkin_Daniil/LR1/Task_2/server.py
aytakr/ITMO_ICT_WebDevelopment_2021-2022
57c0eef5e1f413c7f031ee001d59e5122f990f26
[ "MIT" ]
76
2021-09-17T23:01:50.000Z
2022-03-18T16:42:03.000Z
students/K33401/laboratory_works/Kasatkin_Daniil/LR1/Task_2/server.py
aytakr/ITMO_ICT_WebDevelopment_2021-2022
57c0eef5e1f413c7f031ee001d59e5122f990f26
[ "MIT" ]
60
2021-09-04T16:47:39.000Z
2022-03-21T04:41:27.000Z
import random import socket import time import math server = socket.socket() host = '127.0.0.1' port = 8000 server.bind((host, port)) print('Start on:', host, port) print('URL', (host, port)) server.listen(5) while True: conn, (client_host, client_port) = server.accept() print('Got connection', c...
26
66
0.631119
import random import socket import time import math server = socket.socket() host = '127.0.0.1' port = 8000 server.bind((host, port)) print('Start on:', host, port) print('URL', (host, port)) server.listen(5) while True: conn, (client_host, client_port) = server.accept() print('Got connection', c...
0
0
0
b9a76f20f5fc597be8673eb5a3fb54a3da5aaf3f
15,636
py
Python
playbooks/monitoring/files/sensu_plugins/check_3ware_raid.py
blueboxjesse/ursula
c1318ac84a60110d61df745b744d493b5fc2dabf
[ "MIT" ]
null
null
null
playbooks/monitoring/files/sensu_plugins/check_3ware_raid.py
blueboxjesse/ursula
c1318ac84a60110d61df745b744d493b5fc2dabf
[ "MIT" ]
null
null
null
playbooks/monitoring/files/sensu_plugins/check_3ware_raid.py
blueboxjesse/ursula
c1318ac84a60110d61df745b744d493b5fc2dabf
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Author: Hari Sekhon # Date: 2007-02-20 17:49:00 +0000 (Tue, 20 Feb 2007) # # http://github.com/harisekhon # # License: see accompanying LICENSE file # """Nagios plugin to test the state of all 3ware raid arrays and/or drives on all 3ware controllers on the local machine. Requires the t...
33.197452
82
0.538309
#!/usr/bin/env python # # Author: Hari Sekhon # Date: 2007-02-20 17:49:00 +0000 (Tue, 20 Feb 2007) # # http://github.com/harisekhon # # License: see accompanying LICENSE file # """Nagios plugin to test the state of all 3ware raid arrays and/or drives on all 3ware controllers on the local machine. Requires the t...
0
0
0
7682fc21b3bbaf6bb08a6112976b7e9a85474dba
380
py
Python
keras2saved_model.py
tfkeras/food101-cloudml
1c44a26d65f09c547164b2f00a273ce6854db936
[ "Apache-2.0" ]
1
2021-06-22T02:16:39.000Z
2021-06-22T02:16:39.000Z
keras2saved_model.py
tfandkusu/food101-cloudml
1c44a26d65f09c547164b2f00a273ce6854db936
[ "Apache-2.0" ]
null
null
null
keras2saved_model.py
tfandkusu/food101-cloudml
1c44a26d65f09c547164b2f00a273ce6854db936
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import model import shutil # Kerasのモデルを読み込む model = model.make() # ニューラルの重みを読み込む model.load_weights("weight.hdf5") # TensorFlowのセッションを取得 sess = tf.keras.backend.get_session() # SavedModelを出力 shutil.rmtree("saved_model/",True) tf.saved_model.simple_save(sess,"saved_model/", inputs={'input': ...
23.75
47
0.755263
import tensorflow as tf import model import shutil # Kerasのモデルを読み込む model = model.make() # ニューラルの重みを読み込む model.load_weights("weight.hdf5") # TensorFlowのセッションを取得 sess = tf.keras.backend.get_session() # SavedModelを出力 shutil.rmtree("saved_model/",True) tf.saved_model.simple_save(sess,"saved_model/", inputs={'input': ...
0
0
0
d1f46b40ef95bd755439e465f2090b228fc5bbaa
6,154
py
Python
examples/tracking_example.py
klecknerlab/muvi
f7731af71d316678f9b52dd8771718d8d97bb02c
[ "Apache-2.0" ]
null
null
null
examples/tracking_example.py
klecknerlab/muvi
f7731af71d316678f9b52dd8771718d8d97bb02c
[ "Apache-2.0" ]
null
null
null
examples/tracking_example.py
klecknerlab/muvi
f7731af71d316678f9b52dd8771718d8d97bb02c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # # Copyright 2021 Dustin Kleckner # # 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 ...
32.909091
109
0.642346
#!/usr/bin/python3 # # Copyright 2021 Dustin Kleckner # # 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 ...
1,082
-2
124
0b0783e12bc631945609d99eea00b9b6ff4f4b05
738
py
Python
warn_transformer/transformers/ut.py
chriszs/warn-transformer
62b6dc9116a81daefff424e2118e4a66ee642ba3
[ "Apache-2.0" ]
3
2022-02-18T22:21:00.000Z
2022-03-24T21:24:29.000Z
warn_transformer/transformers/ut.py
chriszs/warn-transformer
62b6dc9116a81daefff424e2118e4a66ee642ba3
[ "Apache-2.0" ]
20
2022-02-20T01:00:07.000Z
2022-03-25T18:18:56.000Z
warn_transformer/transformers/ut.py
chriszs/warn-transformer
62b6dc9116a81daefff424e2118e4a66ee642ba3
[ "Apache-2.0" ]
2
2022-02-25T02:50:00.000Z
2022-03-14T16:32:22.000Z
from datetime import datetime from ..schema import BaseTransformer class Transformer(BaseTransformer): """Transform Utah raw data for consolidation.""" postal_code = "UT" fields = dict( company="Company Name", location="Location", notice_date="Date of Notice", jobs="Affec...
26.357143
52
0.562331
from datetime import datetime from ..schema import BaseTransformer class Transformer(BaseTransformer): """Transform Utah raw data for consolidation.""" postal_code = "UT" fields = dict( company="Company Name", location="Location", notice_date="Date of Notice", jobs="Affec...
0
0
0
80f2f8d660ab42b50770dfc205e7973ace8600d8
1,676
py
Python
tool_parsedata.py
songwzup/PO-sLDA
27ac5e394c9fbff20d70debb5c9c1b4ace7cf221
[ "MIT" ]
1
2022-03-18T08:17:27.000Z
2022-03-18T08:17:27.000Z
tool_parsedata.py
songwzup/PO-sLDA
27ac5e394c9fbff20d70debb5c9c1b4ace7cf221
[ "MIT" ]
null
null
null
tool_parsedata.py
songwzup/PO-sLDA
27ac5e394c9fbff20d70debb5c9c1b4ace7cf221
[ "MIT" ]
null
null
null
#encoding:utf8 ''' Created on 2016-4-5 @author: hadoop ''' import os # t.write(ll[1]) parse_ldac_to_mrslda()
35.659574
103
0.573986
#encoding:utf8 ''' Created on 2016-4-5 @author: hadoop ''' import os def parse_ldac_to_mrslda(): docfile='/home/hadoop/workspace/slda/images/train-data.dat' labfile='/home/hadoop/workspace/slda/images/train-label.dat' targetfile='/home/hadoop/workspace/slda/images/train1.txt' t=open(targetfile,'w...
1,471
0
67
88160d035b5a9af846936951221a013201a88eff
394
py
Python
Tutorial/function.py
amkolhar/PythonBytes
510da8f589aad52d4ee81da0ef612a2b7f515260
[ "Apache-2.0" ]
null
null
null
Tutorial/function.py
amkolhar/PythonBytes
510da8f589aad52d4ee81da0ef612a2b7f515260
[ "Apache-2.0" ]
null
null
null
Tutorial/function.py
amkolhar/PythonBytes
510da8f589aad52d4ee81da0ef612a2b7f515260
[ "Apache-2.0" ]
null
null
null
# Atharv Kolhar # Python Bytes """ Functions """ # Definition of Function # Use of function c = 10 d = 8 total = add(c, d) diff = subtract(c, d) print(total) print(diff) e = 30 f = 20 ef_total = add(e, f) ef_diff = subtract(e, f) print(ef_total, ef_diff) # End
9.609756
27
0.606599
# Atharv Kolhar # Python Bytes """ Functions """ # Definition of Function def add(a:int, b:int): total = a+ b return total def subtract(a:int, b:int): diff = a - b return diff # Use of function c = 10 d = 8 total = add(c, d) diff = subtract(c, d) print(total) print(diff) e = 30 f = 20 ef_to...
78
0
45
8cb583e9820226bc4a884da21f95d1e7aa3956e1
2,658
py
Python
air_hockey/circle.py
Gabo-Tor/air-hockey
fc949075812da9c5fb5bbb511a717c4aa51640b3
[ "MIT" ]
3
2019-02-03T17:16:03.000Z
2020-09-18T18:04:52.000Z
air_hockey/circle.py
Gabo-Tor/air-hockey
fc949075812da9c5fb5bbb511a717c4aa51640b3
[ "MIT" ]
null
null
null
air_hockey/circle.py
Gabo-Tor/air-hockey
fc949075812da9c5fb5bbb511a717c4aa51640b3
[ "MIT" ]
3
2020-02-25T03:50:04.000Z
2021-11-16T15:09:29.000Z
import numpy as np from abc import ABC import air_hockey.vector as V import air_hockey.phy_const as P # updates position and velocity # updates position and velocity
35.918919
117
0.670053
import numpy as np from abc import ABC import air_hockey.vector as V import air_hockey.phy_const as P class Circle(ABC): def __init__(self, position, radius, borders, mass, maximum_speed, friction, body_restitution, wall_restitution): self.position = np.array(position, dtype=np.float32) self._veloc...
2,062
-5
426
68a33c652f6d8b0c509ca0e3cb28e9e29693d8a2
1,917
py
Python
typot/api.py
chakki-works/typot
8ed20fc2102acccc8703aae4d206d3906f5dca47
[ "Apache-2.0" ]
345
2017-05-30T10:04:54.000Z
2022-02-18T07:49:39.000Z
typot/api.py
chakki-works/typot
8ed20fc2102acccc8703aae4d206d3906f5dca47
[ "Apache-2.0" ]
4
2017-05-31T00:30:30.000Z
2017-12-11T17:08:40.000Z
typot/api.py
chakki-works/typot
8ed20fc2102acccc8703aae4d206d3906f5dca47
[ "Apache-2.0" ]
17
2017-06-05T10:40:32.000Z
2020-04-20T09:03:39.000Z
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "../")) import hug from typot.pull_request import PullRequest from typot.spell_checker import SpellChecker version = 1 @hug.get("/ping", versions=version) @hug.local() @hug.post("/typot", versions=version) @hug.local()
29.953125
87
0.608764
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "../")) import hug from typot.pull_request import PullRequest from typot.spell_checker import SpellChecker version = 1 @hug.get("/ping", versions=version) @hug.local() def ping(): return {"ping": "works fine!"} @hug.post("/typot", ve...
1,547
0
67
c6374aa4ae03dfe1b95f657b9e58e878da842161
342
py
Python
Examples/WorkshopCopper12/task2.2.py
pombreda/pyamg
ecd464de4d16e16bc905d84df181025ddf3c1958
[ "BSD-3-Clause" ]
1
2018-07-03T15:32:01.000Z
2018-07-03T15:32:01.000Z
Examples/WorkshopCopper12/task2.2.py
pombreda/pyamg
ecd464de4d16e16bc905d84df181025ddf3c1958
[ "BSD-3-Clause" ]
null
null
null
Examples/WorkshopCopper12/task2.2.py
pombreda/pyamg
ecd464de4d16e16bc905d84df181025ddf3c1958
[ "BSD-3-Clause" ]
null
null
null
from pyamg import gallery, smoothed_aggregation_solver from numpy import ones from pylab import * A = gallery.poisson( (100,100), format='csr') ml = smoothed_aggregation_solver(A, smooth='simple') b = ones((A.shape[0],1)); res=[] x = ml.solve(b, tol=1e-8, residuals=res) semilogy(res[1:]) xlabel('iteration') ylabel('r...
24.428571
54
0.722222
from pyamg import gallery, smoothed_aggregation_solver from numpy import ones from pylab import * A = gallery.poisson( (100,100), format='csr') ml = smoothed_aggregation_solver(A, smooth='simple') b = ones((A.shape[0],1)); res=[] x = ml.solve(b, tol=1e-8, residuals=res) semilogy(res[1:]) xlabel('iteration') ylabel('r...
0
0
0
730b9c749493d56b5adb0b6fab1fccd139408f77
6,529
py
Python
nni/algorithms/compression/v2/pytorch/base/pruner.py
ggzhang0071/nni
f4145e62d89c3ca383cf00f2de5dfd2d1025ad92
[ "MIT" ]
9,680
2019-05-07T01:42:30.000Z
2022-03-31T16:48:33.000Z
nni/algorithms/compression/v2/pytorch/base/pruner.py
soma2000-lang/nni
eaad98528c7aa714c9848800d607d6aa3bdd531d
[ "MIT" ]
1,957
2019-05-06T21:44:21.000Z
2022-03-31T09:21:53.000Z
nni/algorithms/compression/v2/pytorch/base/pruner.py
soma2000-lang/nni
eaad98528c7aa714c9848800d607d6aa3bdd531d
[ "MIT" ]
1,571
2019-05-07T06:42:55.000Z
2022-03-31T03:19:24.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import logging from typing import Dict, List, Optional, Tuple import torch from torch import Tensor from torch.nn import Module from .compressor import Compressor, LayerInfo _logger = logging.getLogger(__name__) __all__ = ['Pruner'] class ...
38.633136
120
0.613877
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import logging from typing import Dict, List, Optional, Tuple import torch from torch import Tensor from torch.nn import Module from .compressor import Compressor, LayerInfo _logger = logging.getLogger(__name__) __all__ = ['Pruner'] class P...
442
1,153
50
ce273ae989e6977b59a1ff8136e89d02aaf7eff5
5,019
py
Python
pcapkit/protocols/link/link.py
binref/PyPCAPKit
7c5ba2cfa95bdc80a95b53b6669340a8783d2ad9
[ "BSD-3-Clause" ]
3
2018-01-21T15:22:21.000Z
2018-06-22T01:27:59.000Z
pcapkit/protocols/link/link.py
binref/PyPCAPKit
7c5ba2cfa95bdc80a95b53b6669340a8783d2ad9
[ "BSD-3-Clause" ]
null
null
null
pcapkit/protocols/link/link.py
binref/PyPCAPKit
7c5ba2cfa95bdc80a95b53b6669340a8783d2ad9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """root link layer protocol :mod:`pcapkit.protocols.link.link` contains :class:`~pcapkit.protocols.link.link.Link`, which is a base class for link layer protocols, e.g. :class:`~pcapkit.protocols.link.link.arp.ARP`/InARP, :class:`~pcapkit.protocols.link.link.ethernet.Ethernet`, :class:`~pcapkit...
36.635036
111
0.54214
# -*- coding: utf-8 -*- """root link layer protocol :mod:`pcapkit.protocols.link.link` contains :class:`~pcapkit.protocols.link.link.Link`, which is a base class for link layer protocols, e.g. :class:`~pcapkit.protocols.link.link.arp.ARP`/InARP, :class:`~pcapkit.protocols.link.link.ethernet.Ethernet`, :class:`~pcapkit...
0
0
0
4f4bfd29b9f7d0d5e252d749e44fe22c9f1943ed
7,375
py
Python
com/vmware/vapi/metadata_client.py
vishal-12/vsphere-automation-sdk-python
9cf363971db77ea5a12928eecd5cf5170a7fcd8a
[ "MIT" ]
null
null
null
com/vmware/vapi/metadata_client.py
vishal-12/vsphere-automation-sdk-python
9cf363971db77ea5a12928eecd5cf5170a7fcd8a
[ "MIT" ]
null
null
null
com/vmware/vapi/metadata_client.py
vishal-12/vsphere-automation-sdk-python
9cf363971db77ea5a12928eecd5cf5170a7fcd8a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- # Copyright 2019 VMware, Inc. All rights reserved. # AUTO GENERATED FILE -- DO NOT MODIFY! # # vAPI stub file for package com.vmware.vapi.metadata. #--------------------------------------------------------------------...
32.777778
90
0.629017
# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- # Copyright 2019 VMware, Inc. All rights reserved. # AUTO GENERATED FILE -- DO NOT MODIFY! # # vAPI stub file for package com.vmware.vapi.metadata. #--------------------------------------------------------------------...
0
419
23
863526abc5f761d3e92bc0e0131bd27ecc296fff
8,991
py
Python
server/test_levelmodel.py
nissafors/pelletmeter
290d595d9e9c220dd78c66f0eec34291bb7d8578
[ "MIT" ]
null
null
null
server/test_levelmodel.py
nissafors/pelletmeter
290d595d9e9c220dd78c66f0eec34291bb7d8578
[ "MIT" ]
null
null
null
server/test_levelmodel.py
nissafors/pelletmeter
290d595d9e9c220dd78c66f0eec34291bb7d8578
[ "MIT" ]
null
null
null
__copyright__ = "Copyright (C) 2021 Andreas Andersson" import unittest, datetime, os from levelmodel import LevelModel TEST_DB = "test_pelletmeter.db" class TestLevelModel(unittest.TestCase): """Unit tests for the levelmodel.py module.""" @classmethod class TimeStamp: """Class to produce fake timestamp...
40.683258
123
0.61784
__copyright__ = "Copyright (C) 2021 Andreas Andersson" import unittest, datetime, os from levelmodel import LevelModel TEST_DB = "test_pelletmeter.db" class TestLevelModel(unittest.TestCase): """Unit tests for the levelmodel.py module.""" @classmethod def setUpClass(cls): cls.ts = TimeStamp() ...
7,323
0
431
337a62eda4d23e84b4896b6ecb5c612ce2e2d51d
710
py
Python
Example1.py
HeartAttack417/labs7
eb91d91ea6df6aa7166ed49e4f037c8152c8d8bb
[ "MIT" ]
null
null
null
Example1.py
HeartAttack417/labs7
eb91d91ea6df6aa7166ed49e4f037c8152c8d8bb
[ "MIT" ]
null
null
null
Example1.py
HeartAttack417/labs7
eb91d91ea6df6aa7166ed49e4f037c8152c8d8bb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- if __name__ == '__main__': with open('text.txt', 'r', encoding="utf8") as f: text = f.read() # Заменить символы конца предложения. text = text.replace("!", ".") text = text.replace("?", ".") # Удалить все многоточия. while ".....
26.296296
54
0.504225
#!/usr/bin/env python3 # -*- coding: utf-8 -*- if __name__ == '__main__': with open('text.txt', 'r', encoding="utf8") as f: text = f.read() # Заменить символы конца предложения. text = text.replace("!", ".") text = text.replace("?", ".") # Удалить все многоточия. while ".....
0
0
0
d80dde04918fab03558372df7dc84f4228e60f6d
2,470
py
Python
tests/opwen_email_server/utils/test_temporary.py
kulado/mailserver
d05c0b2e8d8c97b7b7a08028a9eacd4427a59c4b
[ "Apache-2.0" ]
15
2020-07-06T02:33:15.000Z
2021-08-09T19:24:11.000Z
tests/opwen_email_server/utils/test_temporary.py
kulado/mailserver
d05c0b2e8d8c97b7b7a08028a9eacd4427a59c4b
[ "Apache-2.0" ]
298
2016-12-24T20:19:56.000Z
2020-04-29T03:13:21.000Z
tests/opwen_email_server/utils/test_temporary.py
sbathgate/lokole
a4e3fa5da5373880f6783379f7ef8d843e4cc79d
[ "Apache-2.0" ]
12
2017-06-05T12:13:35.000Z
2020-01-23T03:26:05.000Z
from os import remove from os.path import isfile from tempfile import NamedTemporaryFile from unittest import TestCase from opwen_email_server.utils import temporary
34.788732
104
0.702429
from os import remove from os.path import isfile from tempfile import NamedTemporaryFile from unittest import TestCase from opwen_email_server.utils import temporary class CreateTempFilenameTests(TestCase): def test_creates_new_file(self): filename = temporary.create_tempfilename() self.assertFi...
1,905
28
368
00bf1cef38e5cf147ef7f93046993b5ca588c00f
68,781
py
Python
cxs/app/reduce/rsvf.py
ajvazquez/CXS338
fca77807073f75670f2e7a99011dc198cc7c9829
[ "MIT" ]
1
2021-11-05T02:38:45.000Z
2021-11-05T02:38:45.000Z
cxs/app/reduce/rsvf.py
ajvazquez/CXS338
fca77807073f75670f2e7a99011dc198cc7c9829
[ "MIT" ]
null
null
null
cxs/app/reduce/rsvf.py
ajvazquez/CXS338
fca77807073f75670f2e7a99011dc198cc7c9829
[ "MIT" ]
null
null
null
#!/usr/bin/python # #The MIT CorrelX Correlator # #https://github.com/MITHaystack/CorrelX #Contact: correlX@haystack.mit.edu #Project leads: Victor Pankratius, Pedro Elosegui Project developer: A.J. Vazquez Alvarez # #Copyright 2017 MIT Haystack Observatory # #Permission is hereby granted, free of charge, to any person...
45.250658
461
0.506971
#!/usr/bin/python # #The MIT CorrelX Correlator # #https://github.com/MITHaystack/CorrelX #Contact: correlX@haystack.mit.edu #Project leads: Victor Pankratius, Pedro Elosegui Project developer: A.J. Vazquez Alvarez # #Copyright 2017 MIT Haystack Observatory # #Permission is hereby granted, free of charge, to any person...
43,697
0
69
8f147274106276aeb48ce58b7592cb5c24e02f0b
158
py
Python
PyMess/BowShock/__init__.py
mattkjames7/PyMess
f2c68285a7845a24d98284e20ed4292ed5e58138
[ "MIT" ]
null
null
null
PyMess/BowShock/__init__.py
mattkjames7/PyMess
f2c68285a7845a24d98284e20ed4292ed5e58138
[ "MIT" ]
null
null
null
PyMess/BowShock/__init__.py
mattkjames7/PyMess
f2c68285a7845a24d98284e20ed4292ed5e58138
[ "MIT" ]
null
null
null
from .CalcBSRss import CalcBSRss from .GetBSCrossings import GetBSCrossings from .GetSolarWindTimes import GetSolarWindTimes from .OverlayBS import OverlayBS
31.6
48
0.873418
from .CalcBSRss import CalcBSRss from .GetBSCrossings import GetBSCrossings from .GetSolarWindTimes import GetSolarWindTimes from .OverlayBS import OverlayBS
0
0
0
694f67498236e96e56dec72f7a6441fdb615599f
403
py
Python
baiji/package_version.py
metabolize-forks/baiji
f00c8c3848d826a6d3c931abf970e934bf6b8cdd
[ "Apache-2.0" ]
null
null
null
baiji/package_version.py
metabolize-forks/baiji
f00c8c3848d826a6d3c931abf970e934bf6b8cdd
[ "Apache-2.0" ]
null
null
null
baiji/package_version.py
metabolize-forks/baiji
f00c8c3848d826a6d3c931abf970e934bf6b8cdd
[ "Apache-2.0" ]
null
null
null
# This version number is stored here instead of in `__init__.py` because # namespace packages and the packages which live inside them can be imported # in any order, which means their contents are supposed to be identical. If # their contents differ, Python makes no guarantee about which one is loaded. # # See https://...
44.777778
77
0.774194
# This version number is stored here instead of in `__init__.py` because # namespace packages and the packages which live inside them can be imported # in any order, which means their contents are supposed to be identical. If # their contents differ, Python makes no guarantee about which one is loaded. # # See https://...
0
0
0
520cc76a985cf325d4e0ab14615ca6e763d1f097
196
py
Python
tests/conftest.py
kelar86/detectem
b1ecc3543b7c44ee76c4cac0d3896a7747bf86c1
[ "MIT" ]
85
2017-10-29T20:10:15.000Z
2022-01-05T08:14:35.000Z
tests/conftest.py
kelar86/detectem
b1ecc3543b7c44ee76c4cac0d3896a7747bf86c1
[ "MIT" ]
11
2018-01-09T17:46:24.000Z
2022-03-20T16:41:42.000Z
tests/conftest.py
kelar86/detectem
b1ecc3543b7c44ee76c4cac0d3896a7747bf86c1
[ "MIT" ]
22
2017-12-12T23:35:43.000Z
2022-02-27T16:21:53.000Z
import pytest @pytest.fixture
17.818182
62
0.729592
import pytest def pytest_addoption(parser): parser.addoption("--plugin", action="store", default=None) @pytest.fixture def plugin(request): return request.config.getoption("--plugin")
118
0
45
1d42e50b9e85d06acf526c6ecaa23b091c78c3a0
1,858
py
Python
cs143sim/constants.py
jvanbrug/cs143sim
4e510a7669a534b55b606cbe175142104ae4a92c
[ "MIT" ]
null
null
null
cs143sim/constants.py
jvanbrug/cs143sim
4e510a7669a534b55b606cbe175142104ae4a92c
[ "MIT" ]
null
null
null
cs143sim/constants.py
jvanbrug/cs143sim
4e510a7669a534b55b606cbe175142104ae4a92c
[ "MIT" ]
null
null
null
"""This file contains all constant definitions .. moduleauthor:: Lan Hongjian <lanhongjianlr@gmail.com> .. moduleauthor:: Yamei Ou <oym111@gmail.com> .. moduleauthor:: Samuel Richerd <dondiego152@gmail.com> .. moduleauthor:: Jan Van Bruggen <jancvanbruggen@gmail.com> .. moduleauthor:: Junlin Zhang <neicullyn@gmail.com...
35.056604
73
0.760495
"""This file contains all constant definitions .. moduleauthor:: Lan Hongjian <lanhongjianlr@gmail.com> .. moduleauthor:: Yamei Ou <oym111@gmail.com> .. moduleauthor:: Samuel Richerd <dondiego152@gmail.com> .. moduleauthor:: Jan Van Bruggen <jancvanbruggen@gmail.com> .. moduleauthor:: Junlin Zhang <neicullyn@gmail.com...
0
0
0
a81adf63d72f1a2f989e0139b0e5305ac862b3b5
8,062
py
Python
ekorpkit/io/file.py
entelecheia/eKorpKit
9521ae4c4749419fa2b088d1b9e518e5927b7cb8
[ "CC-BY-4.0" ]
2
2021-09-15T04:12:07.000Z
2022-02-04T02:44:09.000Z
ekorpkit/io/file.py
entelecheia/eKorpKit
9521ae4c4749419fa2b088d1b9e518e5927b7cb8
[ "CC-BY-4.0" ]
null
null
null
ekorpkit/io/file.py
entelecheia/eKorpKit
9521ae4c4749419fa2b088d1b9e518e5927b7cb8
[ "CC-BY-4.0" ]
null
null
null
import logging import os import pandas as pd from glob import glob from pathlib import Path, PosixPath, WindowsPath from ekorpkit.utils.func import elapsed_timer log = logging.getLogger(__name__)
32.772358
86
0.601092
import logging import os import pandas as pd from glob import glob from pathlib import Path, PosixPath, WindowsPath from ekorpkit.utils.func import elapsed_timer log = logging.getLogger(__name__) def get_filepaths( filename_patterns, base_dir=None, recursive=True, verbose=True, **kwargs ): if isinstance(fil...
7,696
0
161
7cb3685455f7089c126639294b925b5582275fda
6,513
py
Python
t7.py
andreum/user-movie-embedding
0766b4fa6d61ebaf9994e61ca611dc256cd38a24
[ "MIT" ]
null
null
null
t7.py
andreum/user-movie-embedding
0766b4fa6d61ebaf9994e61ca611dc256cd38a24
[ "MIT" ]
null
null
null
t7.py
andreum/user-movie-embedding
0766b4fa6d61ebaf9994e61ca611dc256cd38a24
[ "MIT" ]
null
null
null
# # andre@corp.insite.com.br # 2017-10-10 # Codigo que faz regressao simples e encontra embeddings # # a ideia aqui e a seguinte: # - carregar dados do movielens # - inicializar o embedding de forma aleatoria # - encontrar os embeddings de filmes e de usuarios que gerem o menor erro possivel # from __future__ impo...
43.42
158
0.690772
# # andre@corp.insite.com.br # 2017-10-10 # Codigo que faz regressao simples e encontra embeddings # # a ideia aqui e a seguinte: # - carregar dados do movielens # - inicializar o embedding de forma aleatoria # - encontrar os embeddings de filmes e de usuarios que gerem o menor erro possivel # from __future__ impo...
673
0
46
3344c70063e2ed3452b6c541f899f38f2108e9af
14,196
py
Python
siamese.py
matthias-wright/siamese_architecture
a397847ddf49b2972f96a01696bbe22c70135e0e
[ "MIT" ]
null
null
null
siamese.py
matthias-wright/siamese_architecture
a397847ddf49b2972f96a01696bbe22c70135e0e
[ "MIT" ]
null
null
null
siamese.py
matthias-wright/siamese_architecture
a397847ddf49b2972f96a01696bbe22c70135e0e
[ "MIT" ]
null
null
null
import torch import torchvision import torch.autograd as autograd import model import autoencoder import util import os
46.090909
120
0.63687
import torch import torchvision import torch.autograd as autograd import model import autoencoder import util import os class Siamese: def __init__(self, in_path_photo=None, in_path_oil=None, autoencoder_path=None, num_epochs=100, batch_size=50, learning_rate=0.0002, recon_loss_weight=10, penalt...
1,980
12,072
23
a18f666f17c04d384b131daed25c2d334ca96769
3,218
py
Python
app.py
kmswlee/ainized-UGATIT
c3d0dc5dbe956de886baf1fa654e33a1249a8443
[ "MIT" ]
94
2020-03-05T06:55:28.000Z
2022-01-26T05:29:59.000Z
app.py
kmswlee/ainized-UGATIT
c3d0dc5dbe956de886baf1fa654e33a1249a8443
[ "MIT" ]
null
null
null
app.py
kmswlee/ainized-UGATIT
c3d0dc5dbe956de886baf1fa654e33a1249a8443
[ "MIT" ]
24
2020-03-28T02:20:34.000Z
2022-02-24T17:50:09.000Z
import io import numpy as np import tensorflow as tf import cv2 from flask import Flask, request, send_file, jsonify from UGATIT import UGATIT from main import parse_args from utils import inverse_transform, show_all_variables, merge with tf.Session(config=tf.ConfigProto(allow_soft_placement=True)) as sess: ...
34.602151
93
0.68179
import io import numpy as np import tensorflow as tf import cv2 from flask import Flask, request, send_file, jsonify from UGATIT import UGATIT from main import parse_args from utils import inverse_transform, show_all_variables, merge def load_test_data_from_memory(buffer, size): bytes_as_np_array = np.frombuffe...
2,006
0
230
6c45f3a53a82894dda0e1edb0699c493fc09728a
1,599
py
Python
sage/models.py
one-two-four-cee-four-one-plus/sage-project
2192ef60d8d3330586147a8ca93f899ef346ed42
[ "WTFPL" ]
null
null
null
sage/models.py
one-two-four-cee-four-one-plus/sage-project
2192ef60d8d3330586147a8ca93f899ef346ed42
[ "WTFPL" ]
null
null
null
sage/models.py
one-two-four-cee-four-one-plus/sage-project
2192ef60d8d3330586147a8ca93f899ef346ed42
[ "WTFPL" ]
null
null
null
from django.db import models from django.core.files.storage import FileSystemStorage from django.conf import settings media_storage = FileSystemStorage( location=f'{settings.BASE_DIR}/media/', base_url=f'/media/' )
22.842857
70
0.618512
from django.db import models from django.core.files.storage import FileSystemStorage from django.conf import settings class BaseComponent: @property def html(self): raise NotImplementedError() class Component(models.Model, BaseComponent): related = models.ManyToManyField('self', ...
57
1,121
188
f7cef1e63e591ab0850393524c7e1fc080e6cb94
1,375
py
Python
tests/__init__.py
virtdevninja/pyvmomi-ce
c14de2e0cdcb891dbaaf59cd4da5ebbdb05f5f9e
[ "Apache-2.0" ]
2
2015-09-09T16:31:26.000Z
2015-09-10T06:39:53.000Z
tests/__init__.py
virtdevninja/pyvmomi-ce
c14de2e0cdcb891dbaaf59cd4da5ebbdb05f5f9e
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
virtdevninja/pyvmomi-ce
c14de2e0cdcb891dbaaf59cd4da5ebbdb05f5f9e
[ "Apache-2.0" ]
null
null
null
# VMware vSphere Python SDK # Copyright (c) 2008-2014 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
32.738095
78
0.752
# VMware vSphere Python SDK # Copyright (c) 2008-2014 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
440
16
96
909b849e9ca7347c9dfc689df554047c11350a7a
6,271
py
Python
SetPalette.glyphsPalette/Contents/Resources/plugin.py
mekkablue/SetPalette
39baace27db97fb8b903b0351b5b2cf7dac5eea0
[ "Apache-2.0" ]
null
null
null
SetPalette.glyphsPalette/Contents/Resources/plugin.py
mekkablue/SetPalette
39baace27db97fb8b903b0351b5b2cf7dac5eea0
[ "Apache-2.0" ]
null
null
null
SetPalette.glyphsPalette/Contents/Resources/plugin.py
mekkablue/SetPalette
39baace27db97fb8b903b0351b5b2cf7dac5eea0
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 from __future__ import division, print_function, unicode_literals ########################################################################################################### # # # Palette Plugin # # Read the docs: # https://github.com/schriftgestalt/GlyphsSDK/tree/master/Python%20Templates/Palette # ...
33.179894
107
0.711529
# encoding: utf-8 from __future__ import division, print_function, unicode_literals ########################################################################################################### # # # Palette Plugin # # Read the docs: # https://github.com/schriftgestalt/GlyphsSDK/tree/master/Python%20Templates/Palette # ...
4,468
1,264
23
857a51a208f25f98018a0a65c2325752d3ca4c54
567
py
Python
frameioclient/services/logs.py
Frameio/python-frameio-client
005020fd369245627e376fb8a5eaa3064a33438e
[ "MIT" ]
33
2018-07-29T14:04:54.000Z
2022-03-18T16:22:10.000Z
frameioclient/services/logs.py
Frameio/python-frameio-client
005020fd369245627e376fb8a5eaa3064a33438e
[ "MIT" ]
31
2019-07-23T16:11:45.000Z
2021-08-03T01:32:41.000Z
frameioclient/services/logs.py
Frameio/python-frameio-client
005020fd369245627e376fb8a5eaa3064a33438e
[ "MIT" ]
16
2018-10-04T10:53:20.000Z
2022-03-04T09:11:15.000Z
from ..lib.service import Service
24.652174
73
0.589065
from ..lib.service import Service class AuditLogs(Service): def list(self, account_id): """ Get audit logs for the currently authenticated account. Args: account_id (uuid): Account ID you want to get audit logs for. Example:: client.logs.list( a...
0
509
23
88e8dc35298e4e67f4a3c8d29d246a380cfa8331
620
py
Python
src/Tikzifyables/Doubleable.py
Lovely-XPP/tkzgeom
bf68e139dc05f759542d6611f4dc07f4f2727b92
[ "MIT" ]
41
2021-11-24T05:54:08.000Z
2022-03-26T10:19:30.000Z
src/Tikzifyables/Doubleable.py
Lovely-XPP/tkzgeom
bf68e139dc05f759542d6611f4dc07f4f2727b92
[ "MIT" ]
1
2022-02-28T04:34:51.000Z
2022-03-07T10:49:27.000Z
src/Tikzifyables/Doubleable.py
Lovely-XPP/tkzgeom
bf68e139dc05f759542d6611f4dc07f4f2727b92
[ "MIT" ]
10
2021-11-24T07:35:17.000Z
2022-03-25T18:42:14.000Z
from Tikzifyables.Colourable.Colourable import Colourable
32.631579
75
0.579032
from Tikzifyables.Colourable.Colourable import Colourable class Doubleable(Colourable): def __init__(self, item): """Construct Doubleable.""" self.item = item def tikzify_double(self): """Turn double line into tikz code.""" if self.item["line"]["double"]["distance"] == 0.0: ...
0
538
23
87ceeddd149b4d0b8dbf81a56d3fa9a84721db55
33,855
py
Python
python/sb_convertFootage.py
simonbjork/sb-nuke-tools
b8ec375199700e77bff7cc50b489a3ac755a6b6a
[ "MIT" ]
null
null
null
python/sb_convertFootage.py
simonbjork/sb-nuke-tools
b8ec375199700e77bff7cc50b489a3ac755a6b6a
[ "MIT" ]
null
null
null
python/sb_convertFootage.py
simonbjork/sb-nuke-tools
b8ec375199700e77bff7cc50b489a3ac755a6b6a
[ "MIT" ]
null
null
null
################ """ sb_convertFootage Simon Bjork August 2014 bjork.simon@gmail.com Version 1.3 (May 2015) Synopsis: Speed up the process of converting footage (Read nodes) to another format/resolution/colorspace/naming convention. OS: Windows/OSX/Linux CAUTION: The script uses the Python threading module,...
37.784598
786
0.706336
################ """ sb_convertFootage Simon Bjork August 2014 bjork.simon@gmail.com Version 1.3 (May 2015) Synopsis: Speed up the process of converting footage (Read nodes) to another format/resolution/colorspace/naming convention. OS: Windows/OSX/Linux CAUTION: The script uses the Python threading module,...
27,397
2,646
182
ffbce44dbbcf2ae5cf2f47d62ad647d85dd0e6e4
696
py
Python
quick_seqs.py
mwcotton/Insecttron
d10c21d61ea2324e26cf34a6a81f33baa79dba7e
[ "MIT" ]
null
null
null
quick_seqs.py
mwcotton/Insecttron
d10c21d61ea2324e26cf34a6a81f33baa79dba7e
[ "MIT" ]
null
null
null
quick_seqs.py
mwcotton/Insecttron
d10c21d61ea2324e26cf34a6a81f33baa79dba7e
[ "MIT" ]
null
null
null
import sys import glob import bladapter as bl _, pathin, pathout = sys.argv top_contigs = bl.load_contigs(pathin) names = {contig.species:contig.name for contig in top_contigs} files = {spec:glob.glob('../wgot/fastas/*{}*'.format(spec))[0] for spec in bl.spec_list} for contig in top_contigs: whole_file = open(...
27.84
88
0.653736
import sys import glob import bladapter as bl _, pathin, pathout = sys.argv top_contigs = bl.load_contigs(pathin) names = {contig.species:contig.name for contig in top_contigs} files = {spec:glob.glob('../wgot/fastas/*{}*'.format(spec))[0] for spec in bl.spec_list} for contig in top_contigs: whole_file = open(...
0
0
0
4453bbec8fc4c7b1778dc9808fb9ca3b185d30d4
509
py
Python
gamma/figB_calc.py
Non-random-connectivity-comes-in-pairs/code
9ee15b731847ea1118747b2fb037943e1dae5419
[ "MIT" ]
null
null
null
gamma/figB_calc.py
Non-random-connectivity-comes-in-pairs/code
9ee15b731847ea1118747b2fb037943e1dae5419
[ "MIT" ]
null
null
null
gamma/figB_calc.py
Non-random-connectivity-comes-in-pairs/code
9ee15b731847ea1118747b2fb037943e1dae5419
[ "MIT" ]
null
null
null
from gamma_functions import * import numpy as np from scipy.optimize import brentq import scipy.integrate as integrate # mu = \int_0^1 x f_ab(x) dx # Given mu,a what is b? mu = 0.1 a_ns = [] b_ns = [] for a in np.logspace(np.log10(0.2),np.log10(98),500): a_ns.append(a) b = brentq(root_f, 0.5*mu/a, 5*...
14.542857
60
0.628684
from gamma_functions import * import numpy as np from scipy.optimize import brentq import scipy.integrate as integrate # mu = \int_0^1 x f_ab(x) dx # Given mu,a what is b? def root_f(b): return integrate.quad(lambda x: x*fT(x,a,b),0,1)[0] - mu mu = 0.1 a_ns = [] b_ns = [] for a in np.logspace(np.log10(0....
55
0
23
912ae17da58d8634664d9c3570325502c0669043
13,619
py
Python
test/test_dslite.py
halvors/vpp
fdc17b1ae7743bc37d4e08467d0295d6f277ec12
[ "Apache-2.0" ]
null
null
null
test/test_dslite.py
halvors/vpp
fdc17b1ae7743bc37d4e08467d0295d6f277ec12
[ "Apache-2.0" ]
null
null
null
test/test_dslite.py
halvors/vpp
fdc17b1ae7743bc37d4e08467d0295d6f277ec12
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import socket import unittest import struct import random from framework import tag_fixme_vpp_workers from framework import VppTestCase, VppTestRunner import scapy.compat from scapy.layers.inet import IP, TCP, UDP, ICMP from scapy.layers.inet import IPerror, TCPerror, UDPerror, ICMPerror from ...
40.775449
78
0.63896
#!/usr/bin/env python3 import socket import unittest import struct import random from framework import tag_fixme_vpp_workers from framework import VppTestCase, VppTestRunner import scapy.compat from scapy.layers.inet import IP, TCP, UDP, ICMP from scapy.layers.inet import IPerror, TCPerror, UDPerror, ICMPerror from ...
2,915
0
265
44cc8d89fc2a1a815a7b64929c6e8d64f23faceb
447
py
Python
modlist/modlist_utils.py
c0ding/modlist-api
3a4a471384fb552da0e81ab0adaf25976ab10037
[ "Apache-2.0" ]
2
2015-01-25T11:41:37.000Z
2015-04-07T15:20:40.000Z
modlist/modlist_utils.py
c0ding/modlist-api
3a4a471384fb552da0e81ab0adaf25976ab10037
[ "Apache-2.0" ]
null
null
null
modlist/modlist_utils.py
c0ding/modlist-api
3a4a471384fb552da0e81ab0adaf25976ab10037
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- __title__ = 'modlist' __version__ = '0.1' __author__ = '@c0ding' __repo__ = 'https://github.com/c0ding/modlist-api' __license__ = 'Apache v2.0 License' MODLIST_ENTRYPOINT = 'http://modlist.mcf.li/api/v3/' def entrypoint(*suffix): """ Returns the entrypoint URL for the ...
22.35
52
0.695749
#!/usr/bin/env python # -*- coding: utf-8 -*- __title__ = 'modlist' __version__ = '0.1' __author__ = '@c0ding' __repo__ = 'https://github.com/c0ding/modlist-api' __license__ = 'Apache v2.0 License' MODLIST_ENTRYPOINT = 'http://modlist.mcf.li/api/v3/' def entrypoint(*suffix): """ Returns the entrypoint URL for the ...
0
0
0
e99aa9d9881c4715109428f89acb89e7c214151d
11,392
py
Python
spotifAI/data/get_new_music_friday_data.py
Vantage-AI/spotifAI
b209da62fceda2e3e371132727231d987bcf510b
[ "MIT" ]
null
null
null
spotifAI/data/get_new_music_friday_data.py
Vantage-AI/spotifAI
b209da62fceda2e3e371132727231d987bcf510b
[ "MIT" ]
5
2022-03-15T14:04:21.000Z
2022-03-24T23:45:51.000Z
spotifAI/data/get_new_music_friday_data.py
Vantage-AI/spotifAI
b209da62fceda2e3e371132727231d987bcf510b
[ "MIT" ]
null
null
null
"""Script that scrapes the global Spotify playlist 'new music friday'. 100 newly released tracks are fetched from the playlist and enriched with additional features obtained via the Spotify API. """ import logging import time from datetime import datetime from typing import List, Tuple import pandas as pd import spo...
33.804154
88
0.620787
"""Script that scrapes the global Spotify playlist 'new music friday'. 100 newly released tracks are fetched from the playlist and enriched with additional features obtained via the Spotify API. """ import logging import time from datetime import datetime from typing import List, Tuple import pandas as pd import spo...
500
0
27
1f9d4b08b3a6c23f093a2ae3474e0b789effb0d5
2,747
py
Python
sparrow-research/app/layoutlmv2_cord_inference.py
katanaml/sparrow
0d89fceb9b2d7e16a02ce164e3a2f04b0697c09b
[ "Apache-2.0" ]
21
2022-01-14T06:32:32.000Z
2022-03-31T09:04:28.000Z
sparrow-research/app/layoutlmv2_cord_inference.py
katanaml/sparrow
0d89fceb9b2d7e16a02ce164e3a2f04b0697c09b
[ "Apache-2.0" ]
1
2022-03-31T11:05:15.000Z
2022-03-31T15:55:52.000Z
sparrow-research/app/layoutlmv2_cord_inference.py
katanaml/sparrow
0d89fceb9b2d7e16a02ce164e3a2f04b0697c09b
[ "Apache-2.0" ]
5
2022-01-18T02:13:17.000Z
2022-03-27T12:29:44.000Z
from datasets import load_dataset datasets = load_dataset("katanaml/cord") # example = datasets["validation"][1] # from PIL import Image, ImageDraw, ImageFont image = Image.open(example['image_path']) image = image.convert("RGB") # from transformers import LayoutLMv2Processor processor = LayoutLMv2Processor.fr...
23.478632
112
0.730615
from datasets import load_dataset datasets = load_dataset("katanaml/cord") # example = datasets["validation"][1] # from PIL import Image, ImageDraw, ImageFont image = Image.open(example['image_path']) image = image.convert("RGB") # from transformers import LayoutLMv2Processor processor = LayoutLMv2Processor.fr...
315
0
69
fddf2d1ed86ad062a9c7a89a9ca59e7c27bdfafb
13,674
py
Python
src/icp/apps/modeling/tests.py
project-icp/bee-pollinator-app
9357755e6d78e1bf8594de1b777d02318bb3e54f
[ "Apache-2.0" ]
6
2016-10-14T18:54:39.000Z
2021-06-03T21:04:27.000Z
src/icp/apps/modeling/tests.py
project-icp/bee-pollinator-app
9357755e6d78e1bf8594de1b777d02318bb3e54f
[ "Apache-2.0" ]
528
2016-10-14T17:38:54.000Z
2022-02-26T10:53:21.000Z
src/icp/apps/modeling/tests.py
project-icp/bee-pollinator-app
9357755e6d78e1bf8594de1b777d02318bb3e54f
[ "Apache-2.0" ]
2
2016-10-17T18:06:38.000Z
2020-10-23T09:48:24.000Z
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.contrib.auth.models import User from django.test import TestCase from rest_framework.test import APIClient
33.108959
79
0.628638
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.contrib.auth.models import User from django.test import TestCase from rest_framework.test import APIClient class APIAccessTestCase(TestCase): def setUp(self): ...
12,275
13
1,130
d55817cb6dd247124c50009f7db4fb963c585e40
93
py
Python
examples/index.py
pitak3scirpt/line-bot-sdk-python
37b81a2adb6248b30883d16465b365c800e3b358
[ "Apache-2.0" ]
null
null
null
examples/index.py
pitak3scirpt/line-bot-sdk-python
37b81a2adb6248b30883d16465b365c800e3b358
[ "Apache-2.0" ]
null
null
null
examples/index.py
pitak3scirpt/line-bot-sdk-python
37b81a2adb6248b30883d16465b365c800e3b358
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python print "Content-type: text/html\n\n" print "<html>Hello world!</html>"
18.6
35
0.688172
#!/usr/bin/env python print "Content-type: text/html\n\n" print "<html>Hello world!</html>"
0
0
0