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
09f68ac9516db807bd112b0783e36067ee23def6
373
py
Python
Algorithms/Root Algorithms/hash.py
Ahmad-Fahad/Python
5a5f8f3395f7085947430b8309f6af70b2e25a77
[ "Apache-2.0" ]
null
null
null
Algorithms/Root Algorithms/hash.py
Ahmad-Fahad/Python
5a5f8f3395f7085947430b8309f6af70b2e25a77
[ "Apache-2.0" ]
null
null
null
Algorithms/Root Algorithms/hash.py
Ahmad-Fahad/Python
5a5f8f3395f7085947430b8309f6af70b2e25a77
[ "Apache-2.0" ]
null
null
null
intgr = 11 flt = 11.11 stng = "Eleven" tple = (1,2) lst = [1,2,3,4,5] h_i = hash(intgr) h_f = hash(flt) h_s = hash(stng) h_t = hash(tple) #h_l = hash(lst) print("hash of {} is {} ".format(intgr,h_i)) print("hash of {} is {} ".format(flt,h_f)) print("hash of {} is {} ".format(stng,h_s)) print("hash of {} is ...
21.941176
44
0.581769
intgr = 11 flt = 11.11 stng = "Eleven" tple = (1,2) lst = [1,2,3,4,5] h_i = hash(intgr) h_f = hash(flt) h_s = hash(stng) h_t = hash(tple) #h_l = hash(lst) print("hash of {} is {} ".format(intgr,h_i)) print("hash of {} is {} ".format(flt,h_f)) print("hash of {} is {} ".format(stng,h_s)) print("hash of {} is ...
0
0
0
43491ee16935885c90b9bd5ca040626a1f97ff54
876
py
Python
examples/line_performance.py
brisvag/pygfx
02e1f5ff92f50899ca990b712016e10d2914fcaf
[ "BSD-2-Clause" ]
60
2020-06-20T09:25:37.000Z
2022-03-31T23:06:30.000Z
examples/line_performance.py
brisvag/pygfx
02e1f5ff92f50899ca990b712016e10d2914fcaf
[ "BSD-2-Clause" ]
190
2020-06-17T09:11:43.000Z
2022-03-31T17:42:19.000Z
examples/line_performance.py
brisvag/pygfx
02e1f5ff92f50899ca990b712016e10d2914fcaf
[ "BSD-2-Clause" ]
2
2021-03-04T08:19:14.000Z
2022-01-02T16:31:15.000Z
""" Display a line depicting a noisy signal consisting of a lot of points. """ import numpy as np import pygfx as gfx from PySide6 import QtWidgets from wgpu.gui.qt import WgpuCanvas app = QtWidgets.QApplication([]) canvas = WgpuCanvas() renderer = gfx.WgpuRenderer(canvas) scene = gfx.Scene() # todo: crank this ...
23.052632
70
0.715753
""" Display a line depicting a noisy signal consisting of a lot of points. """ import numpy as np import pygfx as gfx from PySide6 import QtWidgets from wgpu.gui.qt import WgpuCanvas app = QtWidgets.QApplication([]) canvas = WgpuCanvas() renderer = gfx.WgpuRenderer(canvas) scene = gfx.Scene() # todo: crank this ...
0
0
0
c9e4f85d31f172455a07017ac64f346ecb9cacb0
275
py
Python
rocket_erp/apps/api/serializers/accounts.py
dimmy2000/rocket-erp
3accc0f1a1fa4faafd9165064c8d20abbb745324
[ "MIT" ]
null
null
null
rocket_erp/apps/api/serializers/accounts.py
dimmy2000/rocket-erp
3accc0f1a1fa4faafd9165064c8d20abbb745324
[ "MIT" ]
null
null
null
rocket_erp/apps/api/serializers/accounts.py
dimmy2000/rocket-erp
3accc0f1a1fa4faafd9165064c8d20abbb745324
[ "MIT" ]
2
2021-06-15T14:37:36.000Z
2021-06-15T14:39:24.000Z
from rest_framework.serializers import ModelSerializer from rocket_erp.apps.accounts.models import Account class AccountSerializer(ModelSerializer): """Serializer for account app, with all fields."""
22.916667
54
0.734545
from rest_framework.serializers import ModelSerializer from rocket_erp.apps.accounts.models import Account class AccountSerializer(ModelSerializer): """Serializer for account app, with all fields.""" class Meta: model = Account fields = "__all__"
0
41
27
4c6963d54922e9ad237b55a1a506357629e1b468
5,866
py
Python
tests/fit_param.py
harmslab/likelihood
3b6864631548c6fe989d3729fc150c76eac8928e
[ "MIT" ]
3
2020-04-30T21:55:49.000Z
2020-04-30T22:14:42.000Z
tests/fit_param.py
harmslab/likelihood
3b6864631548c6fe989d3729fc150c76eac8928e
[ "MIT" ]
null
null
null
tests/fit_param.py
harmslab/likelihood
3b6864631548c6fe989d3729fc150c76eac8928e
[ "MIT" ]
1
2020-04-30T21:55:08.000Z
2020-04-30T21:55:08.000Z
__description__ = \ """ Main class for holding fit parameters, including guesses, values, ranges, etc. """ __date__ = "2016-09-02" __author__ = "Michael J. Harms" import copy import numpy as np class FitParameter: """ Class for storing and manipulating generic fit parameters. """ def __init__(self,na...
24.647059
105
0.468121
__description__ = \ """ Main class for holding fit parameters, including guesses, values, ranges, etc. """ __date__ = "2016-09-02" __author__ = "Michael J. Harms" import copy import numpy as np class FitParameter: """ Class for storing and manipulating generic fit parameters. """ def __init__(self,na...
31
0
27
bde9bf927b8b96816899007c7fd3f79cd619b67c
12,907
py
Python
gridworld/agents/buildings/five_zone_rom_env.py
NREL/PowerGridworld
2f72ac5bb663092ca806c6fff9c7cf70f94fd775
[ "BSD-3-Clause" ]
24
2021-11-12T03:42:38.000Z
2022-02-27T17:22:30.000Z
gridworld/agents/buildings/five_zone_rom_env.py
NREL/PowerGridworld
2f72ac5bb663092ca806c6fff9c7cf70f94fd775
[ "BSD-3-Clause" ]
4
2021-11-11T03:27:58.000Z
2021-11-15T23:12:05.000Z
gridworld/agents/buildings/five_zone_rom_env.py
NREL/PowerGridworld
2f72ac5bb663092ca806c6fff9c7cf70f94fd775
[ "BSD-3-Clause" ]
2
2022-02-09T09:15:41.000Z
2022-02-24T14:56:40.000Z
from abc import abstractmethod from collections import OrderedDict import os import pickle import re from typing import Tuple, Union import pandas as pd import numpy as np import gym from gridworld.log import logger from gridworld import ComponentEnv from gridworld.utils import to_scaled, to_raw, maybe_rescale_box_s...
37.520349
108
0.643837
from abc import abstractmethod from collections import OrderedDict import os import pickle import re from typing import Tuple, Union import pandas as pd import numpy as np import gym from gridworld.log import logger from gridworld import ComponentEnv from gridworld.utils import to_scaled, to_raw, maybe_rescale_box_s...
2,732
7,031
23
eb7c87060f871a6453a9831294ee566533778c5a
1,512
py
Python
external_apps/timezones/tests.py
davemerwin/blue-channel
67a1a7fcc512574e6522aa57633f9d69c25c8906
[ "BSD-3-Clause" ]
4
2016-05-08T06:07:50.000Z
2021-11-21T19:41:40.000Z
apps/external_apps/timezones/tests.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
null
null
null
apps/external_apps/timezones/tests.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
3
2017-07-09T02:14:54.000Z
2021-07-13T19:16:59.000Z
__test__ = {"API_TESTS": r""" >>> from django.conf import settings >>> ORIGINAL_TIME_ZONE = settings.TIME_ZONE >>> settings.TIME_ZONE = "UTC" >>> from timezones import forms # the default case where no timezone is given explicitly. # uses settings.TIME_ZONE. >>> f = forms.LocalizedDateTimeField() >>> f.clean("2008-0...
32.869565
99
0.681217
__test__ = {"API_TESTS": r""" >>> from django.conf import settings >>> ORIGINAL_TIME_ZONE = settings.TIME_ZONE >>> settings.TIME_ZONE = "UTC" >>> from timezones import forms # the default case where no timezone is given explicitly. # uses settings.TIME_ZONE. >>> f = forms.LocalizedDateTimeField() >>> f.clean("2008-0...
0
0
0
7daec3f052dbf49bcff51f38ad65316565f865b2
2,773
py
Python
app.py
ghanmi-hamza/Crunshbase_Scraper
6255693690d33d7dabce3695affa8ff4668eeef2
[ "Apache-2.0" ]
null
null
null
app.py
ghanmi-hamza/Crunshbase_Scraper
6255693690d33d7dabce3695affa8ff4668eeef2
[ "Apache-2.0" ]
null
null
null
app.py
ghanmi-hamza/Crunshbase_Scraper
6255693690d33d7dabce3695affa8ff4668eeef2
[ "Apache-2.0" ]
null
null
null
from functions import Profile from mongodb import MongoDb from flask import Flask, render_template, request, redirect app= Flask(__name__) @app.route('/') @app.route('/',methods=['POST']) if __name__=='__main__': app.run(debug=True)
31.511364
91
0.569419
from functions import Profile from mongodb import MongoDb from flask import Flask, render_template, request, redirect app= Flask(__name__) @app.route('/') def start(): return(render_template('view.html')) @app.route('/',methods=['POST']) def index(): if request.method == 'POST': startup_list = r...
2,485
0
44
b5f856a2986cde9d382ce5d575f5d958c091b8ab
948
py
Python
src/gui/main_app.py
AndruePeters/fire_stream
8e1a89d4fe02500fbe202d6a0212ac7eaab32e00
[ "Apache-2.0" ]
null
null
null
src/gui/main_app.py
AndruePeters/fire_stream
8e1a89d4fe02500fbe202d6a0212ac7eaab32e00
[ "Apache-2.0" ]
null
null
null
src/gui/main_app.py
AndruePeters/fire_stream
8e1a89d4fe02500fbe202d6a0212ac7eaab32e00
[ "Apache-2.0" ]
null
null
null
from tkinter import ttk import tkinter as tk import tkinter.messagebox from gui.menu_bar import MenuBar from gui.stream_frame import StreamFrame from config_file.fire_stream import ConfigFile ### Represents the main application, which is the combination of multiple frames
39.5
99
0.732068
from tkinter import ttk import tkinter as tk import tkinter.messagebox from gui.menu_bar import MenuBar from gui.stream_frame import StreamFrame from config_file.fire_stream import ConfigFile ### Represents the main application, which is the combination of multiple frames class MainApplication(ttk.Frame): def __...
613
12
48
e5257525dd50663af6d42d8fcc65da7cae7adc9b
9,064
py
Python
clu/compilation/compiledb.py
fish2000/CLU
80bc2df5f001b5639d79ba979e19ec77a9931425
[ "BSD-3-Clause" ]
1
2019-07-02T08:17:59.000Z
2019-07-02T08:17:59.000Z
clu/compilation/compiledb.py
fish2000/CLU
80bc2df5f001b5639d79ba979e19ec77a9931425
[ "BSD-3-Clause" ]
13
2019-12-17T02:28:30.000Z
2021-11-17T03:46:10.000Z
clu/compilation/compiledb.py
fish2000/CLU
80bc2df5f001b5639d79ba979e19ec77a9931425
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function import abc # import clu.abstract import collections.abc import contextlib import json import sys, os abstract = abc.abstractmethod from clu.constants import consts from clu.constants.exceptions import CDBError from clu.fs.abc import BaseFSName from clu.fs...
29.718033
83
0.553288
# -*- coding: utf-8 -*- from __future__ import print_function import abc # import clu.abstract import collections.abc import contextlib import json import sys, os abstract = abc.abstractmethod from clu.constants import consts from clu.constants.exceptions import CDBError from clu.fs.abc import BaseFSName from clu.fs...
4,198
4,055
89
a32c7f51dddaf8600bf3abf4629e346738287384
5,067
py
Python
c-kernel/test/test_cleaners.py
Song655/arlo
cee1613d4a2b2e1263da9d5b4b9930eef569509c
[ "Apache-2.0" ]
1
2019-10-18T13:11:01.000Z
2019-10-18T13:11:01.000Z
c-kernel/test/test_cleaners.py
Song655/arlo
cee1613d4a2b2e1263da9d5b4b9930eef569509c
[ "Apache-2.0" ]
1
2019-01-28T23:07:32.000Z
2019-01-28T23:07:32.000Z
c-kernel/test/test_cleaners.py
Song655/arlo
cee1613d4a2b2e1263da9d5b4b9930eef569509c
[ "Apache-2.0" ]
5
2018-03-27T03:30:34.000Z
2019-10-18T13:05:37.000Z
import os import sys sys.path.append('../../arl-python') import numpy as np import time import argparse from arl.image.cleaners import * from utils import * if __name__ == '__main__': np.random.seed(0) parser = argparse.ArgumentParser() parser.add_argument('--data_dir', type=str, default='./data') ...
36.453237
110
0.678705
import os import sys sys.path.append('../../arl-python') import numpy as np import time import argparse from arl.image.cleaners import * from utils import * def msmfsclean_simplify(dirty, psf, window, gain, thresh, niter, scales, fracthresh, findpeak='CASA'): assert 0.0 < gain < 2.0 assert niter > 0 as...
4,053
0
46
cd3da064f9bd501772402261c8f184e8c014f863
143
py
Python
02_sequences/0206_augmented_assignment/020601_list/__main__.py
forseti/py-workout-01
9ebb36748ec7d4751b2c81086134df320c0f58ed
[ "Apache-2.0" ]
null
null
null
02_sequences/0206_augmented_assignment/020601_list/__main__.py
forseti/py-workout-01
9ebb36748ec7d4751b2c81086134df320c0f58ed
[ "Apache-2.0" ]
null
null
null
02_sequences/0206_augmented_assignment/020601_list/__main__.py
forseti/py-workout-01
9ebb36748ec7d4751b2c81086134df320c0f58ed
[ "Apache-2.0" ]
null
null
null
l = [1, 2, 3] id1 = id(l) print(f"id1: {id1}") l *= 2 id2 = id(l) print(f"id2: {id2}") assert id1 == id2 print(f"id1 == id2: {id1 == id2}")
11.916667
34
0.503497
l = [1, 2, 3] id1 = id(l) print(f"id1: {id1}") l *= 2 id2 = id(l) print(f"id2: {id2}") assert id1 == id2 print(f"id1 == id2: {id1 == id2}")
0
0
0
81ab10c9e68eaa61ece5a776c79bd7fc8186ea7b
4,691
py
Python
tests/word_distance.py
nv-d/open-tamil
0fcb1cece5ffd6263210db987bede09566353e80
[ "MIT" ]
2
2021-07-17T02:52:38.000Z
2021-07-17T02:52:52.000Z
tests/word_distance.py
nv-d/open-tamil
0fcb1cece5ffd6263210db987bede09566353e80
[ "MIT" ]
null
null
null
tests/word_distance.py
nv-d/open-tamil
0fcb1cece5ffd6263210db987bede09566353e80
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # (C) 2015 Muthiah Annamalai # # This file is part of 'open-tamil' package tests # # setup the paths from __future__ import print_function from opentamiltests import * if __name__ == "__main__": unittest.main()
30.070513
88
0.484971
# -*- coding: utf-8 -*- # (C) 2015 Muthiah Annamalai # # This file is part of 'open-tamil' package tests # # setup the paths from __future__ import print_function from opentamiltests import * class WordsSimilarityLevenshtein(unittest.TestCase): def test_Levenshtein_distance(self): values = [ ...
4,576
115
358
4e012ce81d73ddb0a61c59fd864ed7590f969a8d
99
py
Python
blog/publications/admin.py
Thierryvil/blog-rest-django3
1c7a224d531cea86812142d4d488d99431aa05e9
[ "MIT" ]
null
null
null
blog/publications/admin.py
Thierryvil/blog-rest-django3
1c7a224d531cea86812142d4d488d99431aa05e9
[ "MIT" ]
null
null
null
blog/publications/admin.py
Thierryvil/blog-rest-django3
1c7a224d531cea86812142d4d488d99431aa05e9
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Publication admin.site.register(Publication)
19.8
32
0.838384
from django.contrib import admin from .models import Publication admin.site.register(Publication)
0
0
0
9647183d77c8685b21250b167a7a0bb8f6a2de37
265
py
Python
mopidy_async_client/__init__.py
SvineruS/mopidy-json-client
b1fe6eea02f9dbf9fe0c9d1d087421184fd2e0c9
[ "Apache-2.0" ]
null
null
null
mopidy_async_client/__init__.py
SvineruS/mopidy-json-client
b1fe6eea02f9dbf9fe0c9d1d087421184fd2e0c9
[ "Apache-2.0" ]
null
null
null
mopidy_async_client/__init__.py
SvineruS/mopidy-json-client
b1fe6eea02f9dbf9fe0c9d1d087421184fd2e0c9
[ "Apache-2.0" ]
null
null
null
"""Async Mopidy Client via JSON/RPC Websocket interface""" # Fork of https://github.com/ismailof/mopidy-json-client by ismailof __author__ = 'svinerus (svinerus@gmail.com)' __version__ = '0.6.4' from .client import MopidyClient __all__ = [ 'MopidyClient', ]
22.083333
68
0.732075
"""Async Mopidy Client via JSON/RPC Websocket interface""" # Fork of https://github.com/ismailof/mopidy-json-client by ismailof __author__ = 'svinerus (svinerus@gmail.com)' __version__ = '0.6.4' from .client import MopidyClient __all__ = [ 'MopidyClient', ]
0
0
0
b72b981336dd182efb7950a9f68fb5c4b03bbd61
1,161
py
Python
pretix_billetaarhusgdpr/forms.py
aakb/pretix-billet-aarhus-gdpr
fcdc7b0e36facd4726ae4d641b91d9711bc206b9
[ "Apache-2.0" ]
null
null
null
pretix_billetaarhusgdpr/forms.py
aakb/pretix-billet-aarhus-gdpr
fcdc7b0e36facd4726ae4d641b91d9711bc206b9
[ "Apache-2.0" ]
null
null
null
pretix_billetaarhusgdpr/forms.py
aakb/pretix-billet-aarhus-gdpr
fcdc7b0e36facd4726ae4d641b91d9711bc206b9
[ "Apache-2.0" ]
null
null
null
from django.utils.translation import ugettext_lazy as _ from i18nfield.forms import I18nFormField, I18nTextarea from pretix.base.forms import SettingsForm
43
119
0.705426
from django.utils.translation import ugettext_lazy as _ from i18nfield.forms import I18nFormField, I18nTextarea from pretix.base.forms import SettingsForm class GDPRSettingsForm(SettingsForm): billetaarhusgdpr_message = I18nFormField( label=_("GDPR message"), help_text=_("The GDPR message will be ...
442
540
23
4fa0c6f8f2e70c57688b182c75fe8f7d7e0e1e4e
149
py
Python
dhost/dapps/utils.py
dhost-project/dhost
ca6a4a76a737174b24165e20edeb1d1019a9424b
[ "MIT" ]
null
null
null
dhost/dapps/utils.py
dhost-project/dhost
ca6a4a76a737174b24165e20edeb1d1019a9424b
[ "MIT" ]
67
2021-07-06T11:50:25.000Z
2021-10-14T13:45:51.000Z
dhost/dapps/utils.py
dhost-project/dhost
ca6a4a76a737174b24165e20edeb1d1019a9424b
[ "MIT" ]
null
null
null
def get_dapp_type(dapp): """Return the available dapp implementation.""" if hasattr(dapp, "ipfsdapp"): return "ipfs" return None
24.833333
51
0.651007
def get_dapp_type(dapp): """Return the available dapp implementation.""" if hasattr(dapp, "ipfsdapp"): return "ipfs" return None
0
0
0
7074a2be32b9d2c703f8ca0dfd6cef5ce9b6dabc
15,067
py
Python
kraken_report.py
mpieva/nuclear_sediment_pipeline
3570ad8c217d8f54f8b1c888d1f4ce5d29388742
[ "MIT" ]
1
2021-04-16T17:18:14.000Z
2021-04-16T17:18:14.000Z
kraken_report.py
mpieva/nuclear_sediment_pipeline
3570ad8c217d8f54f8b1c888d1f4ce5d29388742
[ "MIT" ]
null
null
null
kraken_report.py
mpieva/nuclear_sediment_pipeline
3570ad8c217d8f54f8b1c888d1f4ce5d29388742
[ "MIT" ]
null
null
null
"""Parse a kraken output file and generate a report and possibly extract reads for selected clades. (Adapted from original kraken-report.pl) """ import sys import gzip from csv import reader from Bio import SeqIO from pysam import AlignmentFile from collections import defaultdict import argparse from pathlib import Pa...
44.842262
172
0.629521
"""Parse a kraken output file and generate a report and possibly extract reads for selected clades. (Adapted from original kraken-report.pl) """ import sys import gzip from csv import reader from Bio import SeqIO from pysam import AlignmentFile from collections import defaultdict import argparse from pathlib import Pa...
9,428
0
163
337618b4d7d2e40d90ad9aa116afb1da1ebe6553
1,808
py
Python
pythonforandroid/recipes/lxml/__init__.py
gruns/python-for-android
1bee8a821d57c39492cf633112673bf6ce0be8db
[ "MIT" ]
1
2022-01-26T18:42:36.000Z
2022-01-26T18:42:36.000Z
pythonforandroid/recipes/lxml/__init__.py
gruns/python-for-android
1bee8a821d57c39492cf633112673bf6ce0be8db
[ "MIT" ]
null
null
null
pythonforandroid/recipes/lxml/__init__.py
gruns/python-for-android
1bee8a821d57c39492cf633112673bf6ce0be8db
[ "MIT" ]
1
2020-05-24T16:28:13.000Z
2020-05-24T16:28:13.000Z
from pythonforandroid.toolchain import Recipe, shprint, shutil, current_directory from pythonforandroid.toolchain import CompiledComponentsPythonRecipe from pythonforandroid.util import current_directory, ensure_dir from pythonforandroid.logger import debug, shprint, info from os.path import exists, join, dirname impor...
48.864865
162
0.714049
from pythonforandroid.toolchain import Recipe, shprint, shutil, current_directory from pythonforandroid.toolchain import CompiledComponentsPythonRecipe from pythonforandroid.util import current_directory, ensure_dir from pythonforandroid.logger import debug, shprint, info from os.path import exists, join, dirname impor...
1,081
344
23
6718bf877b76b460a1a15a78d00cdea02e635882
12,871
py
Python
gerrit-report2.py
rfrandse/test
e2e5cb46fecff1be16b3089dd22a8cb6e99f3ac9
[ "Unlicense" ]
null
null
null
gerrit-report2.py
rfrandse/test
e2e5cb46fecff1be16b3089dd22a8cb6e99f3ac9
[ "Unlicense" ]
null
null
null
gerrit-report2.py
rfrandse/test
e2e5cb46fecff1be16b3089dd22a8cb6e99f3ac9
[ "Unlicense" ]
null
null
null
#!/usr/bin/python import argparse import subprocess import json import re import config import collections from datetime import datetime, timedelta import time from pprint import pprint from slacker import Slacker slack = Slacker(config.token) option_age = "" option_owner = None option_protocol = 'slack' option_ss...
31.316302
99
0.569963
#!/usr/bin/python import argparse import subprocess import json import re import config import collections from datetime import datetime, timedelta import time from pprint import pprint from slacker import Slacker slack = Slacker(config.token) option_age = "" option_owner = None option_protocol = 'slack' option_ss...
8,870
0
207
969e299e36bacb90a9c16e54707bc80e4d9f750d
1,773
py
Python
rlscore/test/test_measure/test_cindex.py
vishalbelsare/RLScore
713f0a402f7a09e41a609f2ddcaf849b2021a0a7
[ "MIT" ]
61
2015-03-06T08:48:01.000Z
2021-04-26T16:13:07.000Z
rlscore/test/test_measure/test_cindex.py
andrecamara/RLScore
713f0a402f7a09e41a609f2ddcaf849b2021a0a7
[ "MIT" ]
5
2016-09-08T15:47:00.000Z
2019-02-25T17:44:55.000Z
rlscore/test/test_measure/test_cindex.py
vishalbelsare/RLScore
713f0a402f7a09e41a609f2ddcaf849b2021a0a7
[ "MIT" ]
31
2015-01-28T15:05:33.000Z
2021-04-16T19:39:48.000Z
import numpy as np import unittest from rlscore.measure.cindex_measure import cindex from rlscore.measure.measure_utilities import UndefinedPerformance
30.568966
66
0.56176
import numpy as np import unittest from rlscore.measure.cindex_measure import cindex from rlscore.measure.measure_utilities import UndefinedPerformance def slow_cindex(Y, P): correct = Y predictions = P assert len(correct) == len(predictions) disagreement = 0. decisions = 0. for i in range(len...
1,531
9
73
c1a33fc9fe9a26dbd52187a7e35bad49770d75e5
9,457
py
Python
pycat/base/event/window_event_manager.py
cmorace/pycat
7abc53f90a03b4961c10003eaca2c01efec9e4d2
[ "MIT" ]
null
null
null
pycat/base/event/window_event_manager.py
cmorace/pycat
7abc53f90a03b4961c10003eaca2c01efec9e4d2
[ "MIT" ]
null
null
null
pycat/base/event/window_event_manager.py
cmorace/pycat
7abc53f90a03b4961c10003eaca2c01efec9e4d2
[ "MIT" ]
null
null
null
"""The window_event_manager module implements the WindowEventManager class.""" from typing import Callable, Dict, List, Set, Union from pyglet.window import Window as PygletWindow from pycat.base.event.key_event import KeyEvent from pycat.base.event.mouse_event import MouseEvent from pycat.geometry.point import Poin...
40.072034
78
0.639103
"""The window_event_manager module implements the WindowEventManager class.""" from typing import Callable, Dict, List, Set, Union from pyglet.window import Window as PygletWindow from pycat.base.event.key_event import KeyEvent from pycat.base.event.mouse_event import MouseEvent from pycat.geometry.point import Poin...
4,804
0
375
40bf95dfded92821b08f049465563ccb6b9628be
949
py
Python
itrack/urls.py
AmlHanfy/iTrack-Project
6afe64ff3bd78c6c9dc93d68c0ed52708a8dcb1a
[ "Apache-2.0" ]
null
null
null
itrack/urls.py
AmlHanfy/iTrack-Project
6afe64ff3bd78c6c9dc93d68c0ed52708a8dcb1a
[ "Apache-2.0" ]
null
null
null
itrack/urls.py
AmlHanfy/iTrack-Project
6afe64ff3bd78c6c9dc93d68c0ed52708a8dcb1a
[ "Apache-2.0" ]
3
2018-01-23T19:08:22.000Z
2018-09-25T06:47:24.000Z
''' this module contains all the urls for the whole project ''' from django.contrib import admin from django.urls import path,include from article import views as articleViews from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings from django.conf.urls.static impo...
36.5
77
0.72392
''' this module contains all the urls for the whole project ''' from django.contrib import admin from django.urls import path,include from article import views as articleViews from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings from django.conf.urls.static impo...
0
0
0
962ccfa4e838d3a0b196a2a719fdce3234b0b6c1
764
py
Python
stringsetup.py
TeamDragons/Dragons-Userbot
e40584f4dc898b785523adea4519ffb412dc92c4
[ "MIT" ]
3
2021-08-11T08:33:39.000Z
2022-01-17T00:09:11.000Z
stringsetup.py
sophiashirashaki/Dragons-Userbot
2255c18428e488a267eaec1ec8c081fabcde167a
[ "MIT" ]
null
null
null
stringsetup.py
sophiashirashaki/Dragons-Userbot
2255c18428e488a267eaec1ec8c081fabcde167a
[ "MIT" ]
6
2021-08-14T08:20:41.000Z
2022-03-20T02:31:45.000Z
#!/usr/bin/env python3 # (c) https://t.me/TelethonChat/37677 # This Source Code Form is subject to the terms of the GNU # MIT TeamDragons If a copy of the developer was not distributed with this # file, You can obtain one at https://www.gnu.org/licenses/MIT/TeamDragons from telethon.sessions import StringSession from ...
34.727273
74
0.755236
#!/usr/bin/env python3 # (c) https://t.me/TelethonChat/37677 # This Source Code Form is subject to the terms of the GNU # MIT TeamDragons If a copy of the developer was not distributed with this # file, You can obtain one at https://www.gnu.org/licenses/MIT/TeamDragons from telethon.sessions import StringSession from ...
0
0
0
8c0aba7c3f75f22e54bc31dcc941aa754266bf3a
1,650
py
Python
permutation.py
pranaylobo/Team-Kalm-CP
daa967d84ccd162efc0b7f19448daa01f745e7e2
[ "Apache-2.0" ]
null
null
null
permutation.py
pranaylobo/Team-Kalm-CP
daa967d84ccd162efc0b7f19448daa01f745e7e2
[ "Apache-2.0" ]
1
2021-02-15T16:02:47.000Z
2021-02-15T16:02:47.000Z
permutation.py
pranaylobo/Team-Kalm-CP
daa967d84ccd162efc0b7f19448daa01f745e7e2
[ "Apache-2.0" ]
1
2021-02-16T04:53:47.000Z
2021-02-16T04:53:47.000Z
node=[1,2,3] key=0 current_level={} node_store=[] main(node,key,current_level,node_store)
21.710526
118
0.565455
def branches(node,current_level,key,node_store): temp_current_level = current_level.copy() # print(node_store) for index,num in enumerate(node): current_root = temp_current_level[num].copy() current_leafnode = current_root[0].get(num).copy() # print(current_leaf...
1,501
0
46
943f941b685bb98bbee64264564ff9847ddca2c1
8,005
py
Python
scripts/alvar_marker_to_baxter_picking_pose.py
birlrobotics/birl_kitting_experiment
75cf42b6fd187b12e99b0e916c73058f429a556c
[ "BSD-3-Clause" ]
2
2019-06-03T03:33:50.000Z
2019-12-30T05:43:34.000Z
scripts/alvar_marker_to_baxter_picking_pose.py
birlrobotics/birl_kitting_experiment
75cf42b6fd187b12e99b0e916c73058f429a556c
[ "BSD-3-Clause" ]
null
null
null
scripts/alvar_marker_to_baxter_picking_pose.py
birlrobotics/birl_kitting_experiment
75cf42b6fd187b12e99b0e916c73058f429a556c
[ "BSD-3-Clause" ]
1
2019-12-30T05:43:35.000Z
2019-12-30T05:43:35.000Z
#!/usr/bin/env python import rospy from ar_track_alvar_msgs.msg import AlvarMarkers import tf from tf.transformations import ( translation_matrix, quaternion_matrix, translation_from_matrix, quaternion_from_matrix, ) import threading import copy import numpy import ipdb comfortable_pick_frame = numpy.m...
35.577778
283
0.566396
#!/usr/bin/env python import rospy from ar_track_alvar_msgs.msg import AlvarMarkers import tf from tf.transformations import ( translation_matrix, quaternion_matrix, translation_from_matrix, quaternion_from_matrix, ) import threading import copy import numpy import ipdb comfortable_pick_frame = numpy.m...
967
0
69
38f856dac8ab642dc811a76eee8077f057643a7b
1,600
py
Python
nova/api/openstack/compute/schemas/hypervisors.py
teresa-ho/stx-nova
1f82323439da2449edbbaed2fe1c8414a550c86f
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/schemas/hypervisors.py
teresa-ho/stx-nova
1f82323439da2449edbbaed2fe1c8414a550c86f
[ "Apache-2.0" ]
2
2015-02-03T06:25:24.000Z
2015-02-04T10:10:36.000Z
nova/api/openstack/compute/schemas/hypervisors.py
teresa-ho/stx-nova
1f82323439da2449edbbaed2fe1c8414a550c86f
[ "Apache-2.0" ]
7
2015-01-20T10:30:08.000Z
2020-02-05T10:29:05.000Z
# Copyright 2017 Huawei Technologies Co.,LTD. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
36.363636
78
0.70625
# Copyright 2017 Huawei Technologies Co.,LTD. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
0
0
0
2501f6a15fea174f7089a921e75d9e41e9a71af7
6,098
py
Python
tests/graphs/synthetic/scenarios.py
pedrofreitascampospro/locintel
eb9c56cdc308660c31d90abe9fe62bd3634ba273
[ "MIT" ]
null
null
null
tests/graphs/synthetic/scenarios.py
pedrofreitascampospro/locintel
eb9c56cdc308660c31d90abe9fe62bd3634ba273
[ "MIT" ]
null
null
null
tests/graphs/synthetic/scenarios.py
pedrofreitascampospro/locintel
eb9c56cdc308660c31d90abe9fe62bd3634ba273
[ "MIT" ]
null
null
null
""" Scenarios for ODD generation/restriction of a base graph. Steps to create scenarios: 1. Define your reference graph: Add/choose graph fixture -> This is your base/reference graph, analogous to our OSM base map 2. Define your final odd graph (expected output) Restrict base graph using/adding `restricti...
34.258427
117
0.63529
""" Scenarios for ODD generation/restriction of a base graph. Steps to create scenarios: 1. Define your reference graph: Add/choose graph fixture -> This is your base/reference graph, analogous to our OSM base map 2. Define your final odd graph (expected output) Restrict base graph using/adding `restricti...
2,135
589
181
121b3fe06c1efda9c51df286b247a6fc0e9256d0
2,632
py
Python
sprd/vowifi/tmtc_ut/sdkut.py
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
null
null
null
sprd/vowifi/tmtc_ut/sdkut.py
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
null
null
null
sprd/vowifi/tmtc_ut/sdkut.py
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
3
2016-10-08T15:01:49.000Z
2018-05-24T03:14:24.000Z
#-*- coding=utf-8 -*- #author: zhihua.ye@spreadtrum.com import os from tmtc_ut import * from time import gmtime, strftime from lib.report import * from lib.htmlgenerator import * from lib.jinjagenerator import * if __name__ == '__main__': sdk = Sdkut(casedir="./cases", bindir='./bin') sdk.run() ...
37.6
124
0.545593
#-*- coding=utf-8 -*- #author: zhihua.ye@spreadtrum.com import os from tmtc_ut import * from time import gmtime, strftime from lib.report import * from lib.htmlgenerator import * from lib.jinjagenerator import * class Sdkut(object): def __init__(self, casedir='', bindir=''): self.casedir = case...
2,186
-1
110
e6f542beb92d58a239b6422082d785c7575ae86a
1,136
py
Python
TrEEProfiler/rrg.py
maxdy/BioTools
0240ed203ef64e2cfd637a0fd508096151df7482
[ "MIT" ]
null
null
null
TrEEProfiler/rrg.py
maxdy/BioTools
0240ed203ef64e2cfd637a0fd508096151df7482
[ "MIT" ]
null
null
null
TrEEProfiler/rrg.py
maxdy/BioTools
0240ed203ef64e2cfd637a0fd508096151df7482
[ "MIT" ]
null
null
null
import csv import os lnr_genomes_aa = [] # aa = assembly_accession with open("bacteria_as_comref_genomes_wo_ecoli",'r') as f: next(f) # skip headings reader=csv.reader(f,delimiter='\t') tmp_size = None tmp_aa = None tmp_s_id = None for line in reader: filepath = line[20].replace("/cygdrive/h/","H:/") print...
25.818182
59
0.698063
import csv import os lnr_genomes_aa = [] # aa = assembly_accession with open("bacteria_as_comref_genomes_wo_ecoli",'r') as f: next(f) # skip headings reader=csv.reader(f,delimiter='\t') tmp_size = None tmp_aa = None tmp_s_id = None for line in reader: filepath = line[20].replace("/cygdrive/h/","H:/") print...
0
0
0
2857cbb68ef20cf62c1c0b75128c6e3e01a4ca7b
286
py
Python
Python/decorators/cache.py
Suraj-Rajesh/code
3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9
[ "MIT" ]
null
null
null
Python/decorators/cache.py
Suraj-Rajesh/code
3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9
[ "MIT" ]
null
null
null
Python/decorators/cache.py
Suraj-Rajesh/code
3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9
[ "MIT" ]
null
null
null
from functools import wraps @cache fn(1) fn(1) fn(3)
13.619048
34
0.524476
from functools import wraps def cache(func): memo = {} @wraps(func) def wrapper(x): print 'memo: ' + str(memo) if x not in memo: memo[x] = func(x) return memo[x] return wrapper @cache def fn(x): return x + 1 fn(1) fn(1) fn(3)
185
0
45
839058cc75182dfc3372449c4c1ed12c0cb41c43
2,805
py
Python
crazyflie-lib-python/sys_test/swarm_test_rig/test_logging.py
manikamakam/swarm
3d3f4692f1969e0973fa8929660a8d0da53cafa7
[ "MIT" ]
null
null
null
crazyflie-lib-python/sys_test/swarm_test_rig/test_logging.py
manikamakam/swarm
3d3f4692f1969e0973fa8929660a8d0da53cafa7
[ "MIT" ]
null
null
null
crazyflie-lib-python/sys_test/swarm_test_rig/test_logging.py
manikamakam/swarm
3d3f4692f1969e0973fa8929660a8d0da53cafa7
[ "MIT" ]
1
2019-12-02T01:00:18.000Z
2019-12-02T01:00:18.000Z
# -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2019 Bitcraze AB # # Th...
37.905405
79
0.688057
# -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2019 Bitcraze AB # # Th...
1,255
16
130
3b39c3840d44cbefc3a21780e9618b88653a856d
458
py
Python
frontend_progress_bar/new_uploads/upload.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
frontend_progress_bar/new_uploads/upload.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
frontend_progress_bar/new_uploads/upload.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request app = Flask(__name__) @app.route('/upload', methods=['GET', 'POST']) @app.route('/upload/progress') @app.route('/progress') if __name__ == '__main__': app.run(debug=True)
20.818182
62
0.639738
from flask import Flask, render_template, request app = Flask(__name__) @app.route('/upload', methods=['GET', 'POST']) def upload(): if request.method == 'POST' and 'media' in request.files: return 100 return render_template('upload.html') @app.route('/upload/progress') def progress(): ...
146
0
69
fe9e6db54705ed4e0c750286b5324cb8fe1fc623
4,167
py
Python
GMOS_visualization.py
abostroem/gemini_pipeline
8ac0c6359f643b9dbc18dcbba34ba73d1750434f
[ "BSD-3-Clause" ]
null
null
null
GMOS_visualization.py
abostroem/gemini_pipeline
8ac0c6359f643b9dbc18dcbba34ba73d1750434f
[ "BSD-3-Clause" ]
null
null
null
GMOS_visualization.py
abostroem/gemini_pipeline
8ac0c6359f643b9dbc18dcbba34ba73d1750434f
[ "BSD-3-Clause" ]
null
null
null
''' Visualize steps of the calibration process to ensure everything went according to plan ''' from matplotlib import pyplot as plt from astropy.io import fits from visualization import zscale #https://github.com/abostroem/utilities overscan_size = 32 #pixels unusable_bottom = 48//2 #pixels
32.811024
90
0.596592
''' Visualize steps of the calibration process to ensure everything went according to plan ''' from matplotlib import pyplot as plt from astropy.io import fits from visualization import zscale #https://github.com/abostroem/utilities overscan_size = 32 #pixels unusable_bottom = 48//2 #pixels def visualize_bias(biasfi...
3,764
0
92
00ff4781240fd1c0a1d0349983f250d455bb5a45
1,181
py
Python
mnist/log.py
syitong/randfourier
e8aa9a7e0eed13d94a68b06a294060af40fa5557
[ "MIT" ]
4
2018-11-29T19:15:32.000Z
2020-01-04T07:45:49.000Z
mnist/log.py
syitong/randfourier
e8aa9a7e0eed13d94a68b06a294060af40fa5557
[ "MIT" ]
1
2019-04-26T17:33:03.000Z
2019-04-27T15:24:57.000Z
mnist/log.py
syitong/randfourier
e8aa9a7e0eed13d94a68b06a294060af40fa5557
[ "MIT" ]
null
null
null
import time class log: """ This module is used to track the progress of events and write it into a log file. """
35.787879
81
0.521592
import time class log: """ This module is used to track the progress of events and write it into a log file. """ def __init__(self,filepath,init_message): self.message = '' self.filepath = filepath self.progress = {'task':[init_message],'time':[time.process_time()]} ...
944
0
107
3edf5e6a9773f933621f46766289036db8eba0ff
246
gyp
Python
binding.gyp
SSTIA/fun-judge
010a5413642e1f28cf31ae35f2a605c0a836e859
[ "MIT" ]
null
null
null
binding.gyp
SSTIA/fun-judge
010a5413642e1f28cf31ae35f2a605c0a836e859
[ "MIT" ]
null
null
null
binding.gyp
SSTIA/fun-judge
010a5413642e1f28cf31ae35f2a605c0a836e859
[ "MIT" ]
1
2018-12-06T06:59:56.000Z
2018-12-06T06:59:56.000Z
{ "targets": [ { "target_name": "forbidden-point-finder", "sources": [ "src/binding/finder.cpp", "forbidden-point-finder/ForbiddenPointFinder.cpp" ] } ] }
22.363636
65
0.434959
{ "targets": [ { "target_name": "forbidden-point-finder", "sources": [ "src/binding/finder.cpp", "forbidden-point-finder/ForbiddenPointFinder.cpp" ] } ] }
0
0
0
32726b1cb6b6247e15672ca2217538000b322b57
8,117
py
Python
model/sda.py
urielcaire/mult
45c0cba69153442be2cee6309d46d55086445e5c
[ "Apache-2.0" ]
12
2020-10-13T01:27:35.000Z
2021-11-22T13:42:26.000Z
model/sda.py
urielcaire/mult
45c0cba69153442be2cee6309d46d55086445e5c
[ "Apache-2.0" ]
null
null
null
model/sda.py
urielcaire/mult
45c0cba69153442be2cee6309d46d55086445e5c
[ "Apache-2.0" ]
2
2020-10-12T13:40:41.000Z
2022-03-29T05:28:59.000Z
# Copyright 2020 The MuLT Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
35.757709
117
0.541456
# Copyright 2020 The MuLT Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
7,179
20
185
1a1c18495688a5d56eefb780a5845b6038590c52
1,757
py
Python
maps/maps-csv.py
vanthaiunghoa/ourBlock
c106ddc030707c91af1e4ceff6b3a6086f727d8d
[ "MIT" ]
null
null
null
maps/maps-csv.py
vanthaiunghoa/ourBlock
c106ddc030707c91af1e4ceff6b3a6086f727d8d
[ "MIT" ]
null
null
null
maps/maps-csv.py
vanthaiunghoa/ourBlock
c106ddc030707c91af1e4ceff6b3a6086f727d8d
[ "MIT" ]
1
2019-12-26T18:05:37.000Z
2019-12-26T18:05:37.000Z
from datetime import datetime import json from collections import OrderedDict import os.path from math import log from math import e from sklearn.preprocessing import minmax_scale from sklearn.preprocessing import MinMaxScaler import numpy as np from math import sqrt import pandas as pd data = OrderedDict() weights = ...
20.916667
70
0.648264
from datetime import datetime import json from collections import OrderedDict import os.path from math import log from math import e from sklearn.preprocessing import minmax_scale from sklearn.preprocessing import MinMaxScaler import numpy as np from math import sqrt import pandas as pd data = OrderedDict() weights = ...
0
0
0
06dcb38567cb606e5cd8337189d802aa2e73c189
21,003
py
Python
interpreter/code/byterun/pyvm2.py
yunkai123/my-500lines-notes
60fd3b18919b5bcb90ddece9e088c1c152438972
[ "MIT" ]
null
null
null
interpreter/code/byterun/pyvm2.py
yunkai123/my-500lines-notes
60fd3b18919b5bcb90ddece9e088c1c152438972
[ "MIT" ]
null
null
null
interpreter/code/byterun/pyvm2.py
yunkai123/my-500lines-notes
60fd3b18919b5bcb90ddece9e088c1c152438972
[ "MIT" ]
null
null
null
"""一个纯 Python 实现的 Python 字节码解释器""" # 改编自 # 1. pyvm2 作者:Paul Swartz,来自 http://www.twistedmatrix.com/users/z3p/ # 2. byterun 作者:Ned Batchelder,github.com/nedbat/byterun import dis, operator, sys, collections, inspect, types Block = collections.namedtuple("Block", "type, handler, stack_height") class Function(object): ...
29.918803
117
0.565491
"""一个纯 Python 实现的 Python 字节码解释器""" # 改编自 # 1. pyvm2 作者:Paul Swartz,来自 http://www.twistedmatrix.com/users/z3p/ # 2. byterun 作者:Ned Batchelder,github.com/nedbat/byterun import dis, operator, sys, collections, inspect, types class Frame(object): def __init__(self, code_obj, global_names, local_names, prev_frame): ...
11,969
8,096
92
a825d0701ed6a068133819b7f8a0e257d16df555
31,029
py
Python
src/spdc_inv/utils/utils.py
EyalRozenberg1/SPDCinv
036910a94d850ade312d593b1c18c3896093b049
[ "Apache-2.0" ]
4
2021-12-11T21:05:35.000Z
2022-01-05T02:52:15.000Z
src/spdc_inv/utils/utils.py
EyalRozenberg1/SPDCinv
036910a94d850ade312d593b1c18c3896093b049
[ "Apache-2.0" ]
null
null
null
src/spdc_inv/utils/utils.py
EyalRozenberg1/SPDCinv
036910a94d850ade312d593b1c18c3896093b049
[ "Apache-2.0" ]
1
2022-01-10T17:09:53.000Z
2022-01-10T17:09:53.000Z
from abc import ABC from jax.ops import index_update, index_add, index from typing import List, Union, Any from spdc_inv.utils.defaults import QUBIT import scipy.special as sp import jax.numpy as np import math # Constants: pi = np.pi c = 2.99792458e8 # speed of light [meter/sec] eps0 = 8.854187817e-1...
34.476667
118
0.530053
from abc import ABC from jax.ops import index_update, index_add, index from typing import List, Union, Any from spdc_inv.utils.defaults import QUBIT import scipy.special as sp import jax.numpy as np import math # Constants: pi = np.pi c = 2.99792458e8 # speed of light [meter/sec] eps0 = 8.854187817e-1...
17,909
10
368
bd07df6570fc0aa352615daf76a0ee8b62298953
1,484
py
Python
test_scripts/test_LSST_sim.py
jakevdp/spheredb
e5e5ff8b8902459b3f38a1a413a712ac1695accc
[ "BSD-3-Clause" ]
1
2021-08-29T06:01:28.000Z
2021-08-29T06:01:28.000Z
test_scripts/test_LSST_sim.py
jakevdp/spheredb
e5e5ff8b8902459b3f38a1a413a712ac1695accc
[ "BSD-3-Clause" ]
null
null
null
test_scripts/test_LSST_sim.py
jakevdp/spheredb
e5e5ff8b8902459b3f38a1a413a712ac1695accc
[ "BSD-3-Clause" ]
2
2018-08-03T20:27:35.000Z
2021-08-29T06:01:30.000Z
""" Testing WCS projections on LSST simulation files """ import os, sys sys.path.append(os.path.abspath('..')) import numpy as np import matplotlib.pyplot as plt from spheredb.get_data import\ get_stripe82_file, all_lsst_exposures, get_LSST_file from spheredb.conversions import FITS_to_HPX, HPX_grid_step from sp...
24.733333
76
0.657682
""" Testing WCS projections on LSST simulation files """ import os, sys sys.path.append(os.path.abspath('..')) import numpy as np import matplotlib.pyplot as plt from spheredb.get_data import\ get_stripe82_file, all_lsst_exposures, get_LSST_file from spheredb.conversions import FITS_to_HPX, HPX_grid_step from sp...
0
0
0
dc6f460bce02b737f3c3be063882b7ec784ca799
2,982
py
Python
tests/pytests/functional/conftest.py
GLaN1K/salt
ec1a907465c2d6dff126b747a52035e19b9a105b
[ "Apache-2.0" ]
null
null
null
tests/pytests/functional/conftest.py
GLaN1K/salt
ec1a907465c2d6dff126b747a52035e19b9a105b
[ "Apache-2.0" ]
4
2021-02-06T14:30:48.000Z
2021-12-13T20:50:10.000Z
tests/pytests/functional/conftest.py
GLaN1K/salt
ec1a907465c2d6dff126b747a52035e19b9a105b
[ "Apache-2.0" ]
1
2021-05-10T13:59:33.000Z
2021-05-10T13:59:33.000Z
import logging import shutil import pytest import salt.features import salt.loader import salt.pillar log = logging.getLogger(__name__) @pytest.fixture(scope="package") @pytest.fixture(scope="module") @pytest.fixture(scope="module") @pytest.fixture(scope="module") @pytest.fixture(scope="module") @pytest....
26.157895
84
0.639504
import logging import shutil import pytest import salt.features import salt.loader import salt.pillar log = logging.getLogger(__name__) class Loaders: def __init__(self, opts): self.opts = opts self.context = {} self._reset_state_funcs = [self.context.clear] self._grains = self._...
2,248
237
155
2a064a6e84bc4fb785bd64064f8eb65382a5cafd
2,931
py
Python
using_sklearn.py
mzmmoazam/Titanic-Dataset
58704877afc3c23b88b29a575c04af09afc94af2
[ "MIT" ]
null
null
null
using_sklearn.py
mzmmoazam/Titanic-Dataset
58704877afc3c23b88b29a575c04af09afc94af2
[ "MIT" ]
null
null
null
using_sklearn.py
mzmmoazam/Titanic-Dataset
58704877afc3c23b88b29a575c04af09afc94af2
[ "MIT" ]
null
null
null
import csv import numpy as np ### I had only used numpy , as this is when I had just dived in ### this universe ### So , for beginners go search for pandas you will reduce the lines of code and it ### is awesome !! ### read data with open('../Data/train.csv') as f: reader = csv.reader(f, delimiter=',') data...
27.914286
85
0.657455
import csv import numpy as np ### I had only used numpy , as this is when I had just dived in ### this universe ### So , for beginners go search for pandas you will reduce the lines of code and it ### is awesome !! ### read data with open('../Data/train.csv') as f: reader = csv.reader(f, delimiter=',') data...
0
0
0
8453c193927c760ea206d0589cb5c1335098bc78
244
py
Python
ltime/util.py
fanjindong/ltime
c17025ceb4ed0e423162e3c302fc777fcdada7df
[ "MIT" ]
null
null
null
ltime/util.py
fanjindong/ltime
c17025ceb4ed0e423162e3c302fc777fcdada7df
[ "MIT" ]
null
null
null
ltime/util.py
fanjindong/ltime
c17025ceb4ed0e423162e3c302fc777fcdada7df
[ "MIT" ]
null
null
null
from __future__ import absolute_import
15.25
38
0.614754
from __future__ import absolute_import def is_timestamp(value): if type(value) == bool: return False try: float(value) return True except: return False def isstr(s): return isinstance(s, str)
157
0
46
b127bdb8be952e1a6b5245cf98323de492eec89b
1,653
py
Python
nanotune/model/node.py
jenshnielsen/nanotune
0f2a252d1986f9a5ff155fad626658f85aec3f3e
[ "MIT" ]
5
2021-02-24T14:32:37.000Z
2022-01-05T16:37:26.000Z
nanotune/model/node.py
jenshnielsen/nanotune
0f2a252d1986f9a5ff155fad626658f85aec3f3e
[ "MIT" ]
149
2021-03-23T14:44:39.000Z
2022-03-31T06:09:07.000Z
nanotune/model/node.py
jenshnielsen/nanotune
0f2a252d1986f9a5ff155fad626658f85aec3f3e
[ "MIT" ]
10
2021-03-29T13:36:38.000Z
2022-02-16T23:06:35.000Z
import logging from typing import Optional import qcodes as qc from qcodes import Instrument, InstrumentChannel, Parameter from qcodes import validators as vals from qcodes.instrument.base import InstrumentBase from qcodes.utils.validators import Validator import nanotune as nt logger = logging.getLogger(__name__)
23.956522
59
0.553539
import logging from typing import Optional import qcodes as qc from qcodes import Instrument, InstrumentChannel, Parameter from qcodes import validators as vals from qcodes.instrument.base import InstrumentBase from qcodes.utils.validators import Validator import nanotune as nt logger = logging.getLogger(__name__) ...
1,167
9
157
fc6aba255f9187115a00a25541285fac525573c7
8,015
py
Python
notebooks/md/data/md_equil/6KZD/md_equil.py
openkinome/study-ntrk-resistance
3c4ba64538ec55c774d34c9d7cd0a5e4665dc9d5
[ "MIT" ]
null
null
null
notebooks/md/data/md_equil/6KZD/md_equil.py
openkinome/study-ntrk-resistance
3c4ba64538ec55c774d34c9d7cd0a5e4665dc9d5
[ "MIT" ]
1
2021-07-30T15:01:53.000Z
2021-08-02T09:48:08.000Z
notebooks/md/data/md_equil/6KZD/md_equil.py
openkinome/study-ntrk-resistance
3c4ba64538ec55c774d34c9d7cd0a5e4665dc9d5
[ "MIT" ]
null
null
null
import argparse import os import sys from sys import stdout import mdtraj as md import numpy as np import parmed import simtk.openmm as mm import simtk.openmm.app as app import simtk.unit as unit from openforcefield.topology import Molecule, Topology from openmmforcefields.generators import SystemGenerator from perses...
33.676471
92
0.76282
import argparse import os import sys from sys import stdout import mdtraj as md import numpy as np import parmed import simtk.openmm as mm import simtk.openmm.app as app import simtk.unit as unit from openforcefield.topology import Molecule, Topology from openmmforcefields.generators import SystemGenerator from perses...
0
0
0
e215f99357e8f5180f8fadd116c52486463e20bc
910
py
Python
app/models/answerselect.py
garybake/quizmaster
f5f03b9a70823cbcd0299fc1e21f52347292d136
[ "MIT" ]
null
null
null
app/models/answerselect.py
garybake/quizmaster
f5f03b9a70823cbcd0299fc1e21f52347292d136
[ "MIT" ]
1
2021-03-23T19:18:36.000Z
2021-03-23T19:18:36.000Z
app/models/answerselect.py
garybake/quizmaster
f5f03b9a70823cbcd0299fc1e21f52347292d136
[ "MIT" ]
null
null
null
"""Holds AnswerSelect model.""" import datetime from .. import db class AnswerSelect(db.Model): """Model to hold a users selected answers.""" __tablename__ = "answerselects" id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey("users.id")) quiz_id = db.Col...
32.5
75
0.672527
"""Holds AnswerSelect model.""" import datetime from .. import db class AnswerSelect(db.Model): """Model to hold a users selected answers.""" __tablename__ = "answerselects" id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey("users.id")) quiz_id = db.Col...
0
0
0
556f8642ca306c2f5a199d9fbb2db0764833a1bb
490
py
Python
src/osparc_function_services/cli.py
pcrespov/osparc-function-services
68be5bf2cad181f703488c2f358efa668f3ac3c5
[ "MIT" ]
null
null
null
src/osparc_function_services/cli.py
pcrespov/osparc-function-services
68be5bf2cad181f703488c2f358efa668f3ac3c5
[ "MIT" ]
null
null
null
src/osparc_function_services/cli.py
pcrespov/osparc-function-services
68be5bf2cad181f703488c2f358efa668f3ac3c5
[ "MIT" ]
null
null
null
import typer from .app import run_as_service from .sensitivity_ua_services import ( sensitivity_ua_linear_regression, sensitivity_ua_test_func, ) from .demo_services import demo_func main = typer.Typer() @main.command() @main.command() @main.command() if __name__ == "__main__": main()
16.333333
52
0.763265
import typer from .app import run_as_service from .sensitivity_ua_services import ( sensitivity_ua_linear_regression, sensitivity_ua_test_func, ) from .demo_services import demo_func main = typer.Typer() @main.command() def test_func(): run_as_service(sensitivity_ua_test_func) @main.command() def line...
116
0
66
04870301bfda3a6c2bb0147c54606c0bf498888d
158
py
Python
src/ros_vision_interaction/src/vision-interaction/vision_project_tools/engine_statedb.py
HaaaO/vision-project
72256af07834195cfe52ac344aee5effcd0da978
[ "MIT" ]
null
null
null
src/ros_vision_interaction/src/vision-interaction/vision_project_tools/engine_statedb.py
HaaaO/vision-project
72256af07834195cfe52ac344aee5effcd0da978
[ "MIT" ]
21
2020-09-09T18:55:58.000Z
2021-07-26T19:42:46.000Z
src/ros_vision_interaction/src/vision-interaction/vision_project_tools/engine_statedb.py
HaaaO/vision-project
72256af07834195cfe52ac344aee5effcd0da978
[ "MIT" ]
6
2020-12-20T17:19:29.000Z
2021-08-09T22:33:04.000Z
from mongodb_statedb import StateDb
19.75
61
0.721519
from mongodb_statedb import StateDb class EngineStateDb(StateDb): def is_set(self, key): return self.exists(key) and self.get(key) is not None
63
8
50
a02a7d46d66be767da8b325d1fb24538b4225035
631
py
Python
engine/__init__.py
ZenithClown/DQNProjects
3a9f022166022509fce0f4306ed5612854d5539f
[ "Apache-2.0" ]
null
null
null
engine/__init__.py
ZenithClown/DQNProjects
3a9f022166022509fce0f4306ed5612854d5539f
[ "Apache-2.0" ]
null
null
null
engine/__init__.py
ZenithClown/DQNProjects
3a9f022166022509fce0f4306ed5612854d5539f
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- """ DeepQ Learning is a Reinforcement Learning Platform where AI Learns to Play Games In this project, I'm trying to develop some 'Q-Learning Algorithms' where the neural network will learn to play various games. The `engine` is specifically designed to build games that can be used to train ...
31.55
81
0.759113
# -*- encoding: utf-8 -*- """ DeepQ Learning is a Reinforcement Learning Platform where AI Learns to Play Games In this project, I'm trying to develop some 'Q-Learning Algorithms' where the neural network will learn to play various games. The `engine` is specifically designed to build games that can be used to train ...
0
0
0
ef1655c61f13f3ef2c6142375d3cac6ee69db26b
623
py
Python
ocrd_utils/ocrd_utils/constants.py
wrznr/pyocrd
25c4dd8c60285b7877803e2b627d72c8c0a4ab1e
[ "Apache-2.0" ]
null
null
null
ocrd_utils/ocrd_utils/constants.py
wrznr/pyocrd
25c4dd8c60285b7877803e2b627d72c8c0a4ab1e
[ "Apache-2.0" ]
null
null
null
ocrd_utils/ocrd_utils/constants.py
wrznr/pyocrd
25c4dd8c60285b7877803e2b627d72c8c0a4ab1e
[ "Apache-2.0" ]
null
null
null
""" Constants for ocrd_utils. """ from pkg_resources import get_distribution __all__ = [ 'VERSION', 'MIMETYPE_PAGE', 'EXT_TO_MIME', 'MIME_TO_EXT' ] VERSION = get_distribution('ocrd_utils').version MIMETYPE_PAGE = 'application/vnd.prima.page+xml' EXT_TO_MIME = { '.tif': 'image/tiff', '.tiff':...
18.323529
48
0.592295
""" Constants for ocrd_utils. """ from pkg_resources import get_distribution __all__ = [ 'VERSION', 'MIMETYPE_PAGE', 'EXT_TO_MIME', 'MIME_TO_EXT' ] VERSION = get_distribution('ocrd_utils').version MIMETYPE_PAGE = 'application/vnd.prima.page+xml' EXT_TO_MIME = { '.tif': 'image/tiff', '.tiff':...
0
0
0
043080aacfee1d363e6e1340bafc54ef3bea32a5
3,267
py
Python
VectorUtils/vector3.py
Monkvy/VectorUtils
880149aa8b67dd6b0a527eafd58a5ef05f97e911
[ "MIT" ]
null
null
null
VectorUtils/vector3.py
Monkvy/VectorUtils
880149aa8b67dd6b0a527eafd58a5ef05f97e911
[ "MIT" ]
null
null
null
VectorUtils/vector3.py
Monkvy/VectorUtils
880149aa8b67dd6b0a527eafd58a5ef05f97e911
[ "MIT" ]
null
null
null
from logging import exception from math import sqrt from random import uniform
30.820755
80
0.543618
from logging import exception from math import sqrt from random import uniform class Vector3: def __init__(self, x: int | float, y: int | float, z: int | float): self.x = x self.y = y self.z = z @staticmethod def random(min: float=-1, max: float=1): ''' Create an V...
1,733
1,432
23
5ec13ba80a976c7b8c28df2901d282722275851c
3,661
py
Python
zygrader/ui/templates.py
natecraddock/zygrader
3a1d5c1dbe76c8f76c2a99f271a26b2ec873006a
[ "MIT" ]
5
2019-11-15T17:42:42.000Z
2021-04-20T19:35:25.000Z
zygrader/ui/templates.py
natecraddock/zygrader
3a1d5c1dbe76c8f76c2a99f271a26b2ec873006a
[ "MIT" ]
76
2020-02-22T01:42:16.000Z
2021-04-28T18:47:20.000Z
zygrader/ui/templates.py
cs142ta/zygrader
8ae500ced4cb6f9bcc8a2fd637d8f8dc7a8a9607
[ "MIT" ]
2
2020-02-21T04:39:38.000Z
2021-04-20T19:35:20.000Z
"""UI Templates: For reusable ui pieces built from components.""" from zygrader import ui from zygrader.zybooks import Zybooks def filename_input(purpose, text=""): """Get a valid filename from the user""" window = ui.get_window() path_input = ui.layers.PathInputLayer("Filepath Entry") path_input.s...
38.135417
85
0.565966
"""UI Templates: For reusable ui pieces built from components.""" from zygrader import ui from zygrader.zybooks import Zybooks class ZybookSectionSelector: def __init__(self, allow_optional_and_hidden=False): self.window = ui.get_window() self.zy_api = Zybooks() self.allow_optional_and_hi...
2,865
224
23
f21eccfc340c873b740e8a9c2712d3502fd1e059
926
py
Python
algorithms/sorting/selection_sort.py
EthanVieira/CLRS-solutions
c20bb7e4b9f26eef62bbd32caae27637e94a4a19
[ "MIT" ]
null
null
null
algorithms/sorting/selection_sort.py
EthanVieira/CLRS-solutions
c20bb7e4b9f26eef62bbd32caae27637e94a4a19
[ "MIT" ]
null
null
null
algorithms/sorting/selection_sort.py
EthanVieira/CLRS-solutions
c20bb7e4b9f26eef62bbd32caae27637e94a4a19
[ "MIT" ]
null
null
null
if __name__ == "__main__": print(selection_sort([])) print(selection_sort([1])) print(selection_sort([0, 100000000, 20000])) print(selection_sort([1, 0])) print(selection_sort([1.5, -2.6, 2, 1.1])) print(selection_sort([3, 6, 8, 1, 2, 5, 3, 9, 3, 5, 9, 2])) print(selection_sort([3, 6, -45,...
37.04
73
0.536717
def selection_sort(items: list, comparison=lambda a, b: a < b): for i in range(len(items[:-1])): index = i candidate = items[i] for j, item2 in enumerate(items[i:]): if comparison(item2, candidate): candidate = item2 index = j + i items[i]...
355
0
22
f3f7bd514a45063730bb6565c9ca529d17a83da6
1,261
py
Python
src/uvm/dap/uvm_dap.py
rodrigomelo9/uvm-python
e3127eba2cc1519a61dc6f736d862a8dcd6fce20
[ "Apache-2.0" ]
140
2020-01-18T00:14:17.000Z
2022-03-29T10:57:24.000Z
src/uvm/dap/uvm_dap.py
Mohsannaeem/uvm-python
1b8768a1358d133465ede9cadddae651664b1d53
[ "Apache-2.0" ]
24
2020-01-18T18:40:58.000Z
2021-03-25T17:39:07.000Z
src/uvm/dap/uvm_dap.py
Mohsannaeem/uvm-python
1b8768a1358d133465ede9cadddae651664b1d53
[ "Apache-2.0" ]
34
2020-01-18T12:22:59.000Z
2022-02-11T07:03:11.000Z
#// #//------------------------------------------------------------------------------ #// Copyright 2007-2011 Mentor Graphics Corporation #// Copyright 2007-2011 Cadence Design Systems, Inc. #// Copyright 2010-2011 Synopsys, Inc. #// Copyright 2013 NVIDIA Corporation #// All Rights Reserved Worldwide #/...
36.028571
81
0.613799
#// #//------------------------------------------------------------------------------ #// Copyright 2007-2011 Mentor Graphics Corporation #// Copyright 2007-2011 Cadence Design Systems, Inc. #// Copyright 2010-2011 Synopsys, Inc. #// Copyright 2013 NVIDIA Corporation #// All Rights Reserved Worldwide #/...
0
0
0
4f960221db6ab2cc64d1f2d013d6065459c08ab2
2,845
py
Python
service/houston.py
sola1993/inmoov
34e7bb6e214bd9bf3eee808c19f0ab09ec79345f
[ "Apache-2.0" ]
1
2021-02-24T17:05:52.000Z
2021-02-24T17:05:52.000Z
src/resource/Python/examples/houston.py
DarkRebel/myrobotlab
b8cf60776bdb4aef2d7dd763dfcdcf8ef99bc955
[ "Apache-2.0" ]
null
null
null
src/resource/Python/examples/houston.py
DarkRebel/myrobotlab
b8cf60776bdb4aef2d7dd763dfcdcf8ef99bc955
[ "Apache-2.0" ]
1
2020-06-03T20:48:47.000Z
2020-06-03T20:48:47.000Z
# Houston # Connects a serial device on Windows this would COMx # Sets the board type # Then starts polling analog pin 17 which is Analog pin 3 # You will need MRLComm.ino loaded on the Arduino # If all goes well - you should have 2 traces running # in the arduino->oscope tab - you can at this point connect # input - ...
33.081395
89
0.777153
# Houston # Connects a serial device on Windows this would COMx # Sets the board type # Then starts polling analog pin 17 which is Analog pin 3 # You will need MRLComm.ino loaded on the Arduino # If all goes well - you should have 2 traces running # in the arduino->oscope tab - you can at this point connect # input - ...
0
0
0
b56f79e1e64d0c4ea986e14f2491e8152330eff1
4,797
py
Python
server/run.py
S-Kantor/CS446
7453f0be2c0380a0af0d429d66690d06b659000e
[ "Apache-2.0" ]
2
2019-06-19T17:24:51.000Z
2020-01-28T02:38:06.000Z
server/run.py
S-Kantor/CS446
7453f0be2c0380a0af0d429d66690d06b659000e
[ "Apache-2.0" ]
4
2019-06-19T12:41:30.000Z
2019-07-13T03:19:56.000Z
server/run.py
S-Kantor/CS446
7453f0be2c0380a0af0d429d66690d06b659000e
[ "Apache-2.0" ]
1
2019-07-28T07:01:11.000Z
2019-07-28T07:01:11.000Z
from datetime import datetime from typing import Dict from flask import Flask, request, send_file from music import BeatTimestamp, FileOffsetRecording from room import Room app = Flask(__name__) rooms: Dict[str, Room] = {} # Accepts datetime in milliseconds and converts to microseconds @app.route("/") # -----...
33.78169
94
0.633729
from datetime import datetime from typing import Dict from flask import Flask, request, send_file from music import BeatTimestamp, FileOffsetRecording from room import Room app = Flask(__name__) rooms: Dict[str, Room] = {} # Accepts datetime in milliseconds and converts to microseconds def parse_time(time_as_stri...
1,840
0
242
d343e0f5bb0c664e34d052bfc81a5955774763f5
295
py
Python
src/scs_dfe/interface/__init__.py
south-coast-science/scs_dfe_eng
05708b27ba65438d11fad0d947bcff3df37dc87d
[ "MIT" ]
null
null
null
src/scs_dfe/interface/__init__.py
south-coast-science/scs_dfe_eng
05708b27ba65438d11fad0d947bcff3df37dc87d
[ "MIT" ]
null
null
null
src/scs_dfe/interface/__init__.py
south-coast-science/scs_dfe_eng
05708b27ba65438d11fad0d947bcff3df37dc87d
[ "MIT" ]
2
2017-12-05T12:41:48.000Z
2019-09-29T14:41:30.000Z
""" Created on 16 Apr 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ from scs_dfe.interface.component.pca8574 import PCA8574State # -------------------------------------------------------------------------------------------------------------------- PCA8574State.init()
22.692308
118
0.461017
""" Created on 16 Apr 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ from scs_dfe.interface.component.pca8574 import PCA8574State # -------------------------------------------------------------------------------------------------------------------- PCA8574State.init()
0
0
0
750985c33cdae87f7c5dfdfc9bedf623dce189ed
28,548
py
Python
basin_setup/delineate.py
USDA-ARS-NWRC/basin_setup
8a9f661ab7897d63dda6c470cfd24f498e6e6183
[ "CC0-1.0" ]
1
2020-10-15T00:53:46.000Z
2020-10-15T00:53:46.000Z
basin_setup/delineate.py
USDA-ARS-NWRC/basin_setup
8a9f661ab7897d63dda6c470cfd24f498e6e6183
[ "CC0-1.0" ]
58
2017-12-13T23:37:12.000Z
2021-07-26T19:58:05.000Z
basin_setup/delineate.py
USDA-ARS-NWRC/basin_setup
8a9f661ab7897d63dda6c470cfd24f498e6e6183
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 import argparse import datetime import os import shutil import sys import time from subprocess import check_output import geopandas as gpd import numpy as np from colorama import Fore, Style, init from basin_setup import __version__ # Initialize colors init() DEBUG = False out = Messages(...
34.271309
88
0.585855
#!/usr/bin/env python3 import argparse import datetime import os import shutil import sys import time from subprocess import check_output import geopandas as gpd import numpy as np from colorama import Fore, Style, init from basin_setup import __version__ # Initialize colors init() DEBUG = False class Messages()...
3,669
1,542
46
8907c9f34efb220b34e310d040d510f1d54753e0
1,565
py
Python
mlxtk/tools/entropy.py
f-koehler/mlxtk
373aed06ab23ab9b70cd99e160228c50b87e939a
[ "MIT" ]
2
2018-12-21T19:41:10.000Z
2019-11-25T15:26:27.000Z
mlxtk/tools/entropy.py
f-koehler/mlxtk
373aed06ab23ab9b70cd99e160228c50b87e939a
[ "MIT" ]
73
2017-12-22T13:30:16.000Z
2022-02-22T04:21:14.000Z
mlxtk/tools/entropy.py
f-koehler/mlxtk
373aed06ab23ab9b70cd99e160228c50b87e939a
[ "MIT" ]
null
null
null
"""Compute entropy """ from typing import Union import numpy from mlxtk.log import get_logger def compute_entropy( natpop: numpy.ndarray, normalize: bool = False ) -> Union[numpy.ndarray, numpy.float64]: """Compute the Boltzmann entropy from natural populations. The entropy is computed using the formul...
26.525424
75
0.547604
"""Compute entropy """ from typing import Union import numpy from mlxtk.log import get_logger def compute_entropy( natpop: numpy.ndarray, normalize: bool = False ) -> Union[numpy.ndarray, numpy.float64]: """Compute the Boltzmann entropy from natural populations. The entropy is computed using the formul...
0
0
0
96be032b76e4f0245c5919da7cc7fc9aa378da31
2,678
py
Python
lsassy/impacketfile.py
pretech86/lsassy
8935fb6f0829055820e1c3d79016f522d04e3b6e
[ "MIT" ]
null
null
null
lsassy/impacketfile.py
pretech86/lsassy
8935fb6f0829055820e1c3d79016f522d04e3b6e
[ "MIT" ]
null
null
null
lsassy/impacketfile.py
pretech86/lsassy
8935fb6f0829055820e1c3d79016f522d04e3b6e
[ "MIT" ]
1
2020-05-14T23:20:30.000Z
2020-05-14T23:20:30.000Z
# Author: # Romain Bentz (pixis - @hackanddo) # Website: # https://beta.hackndo.com
34.333333
155
0.584765
# Author: # Romain Bentz (pixis - @hackanddo) # Website: # https://beta.hackndo.com class ImpacketFile: def __init__(self): self._conn = None self._fpath = None self._currentOffset = 0 self._total_read = 0 self._tid = None self._fid = None self._b...
2,382
-2
211
5a9c2e159124fd70adde5ed274b2d6ed828a3ae4
116
py
Python
freiner/errors.py
djmattyg007/freiner
4acff72c55c37495862ea642a70b443da1278894
[ "MIT" ]
null
null
null
freiner/errors.py
djmattyg007/freiner
4acff72c55c37495862ea642a70b443da1278894
[ "MIT" ]
null
null
null
freiner/errors.py
djmattyg007/freiner
4acff72c55c37495862ea642a70b443da1278894
[ "MIT" ]
null
null
null
class FreinerConfigurationError(Exception): """ Raised when a configuration problem is encountered. """
23.2
55
0.715517
class FreinerConfigurationError(Exception): """ Raised when a configuration problem is encountered. """
0
0
0
0587740f1953f3e18ed695131ebf5a181e2171cc
3,684
py
Python
validation_tests/reports/validations_produce_results.py
samcom12/anuga_core
f4378114dbf02d666fe6423de45798add5c42806
[ "Python-2.0", "OLDAP-2.7" ]
136
2015-05-07T05:47:43.000Z
2022-02-16T03:07:40.000Z
validation_tests/reports/validations_produce_results.py
samcom12/anuga_core
f4378114dbf02d666fe6423de45798add5c42806
[ "Python-2.0", "OLDAP-2.7" ]
184
2015-05-03T09:27:54.000Z
2021-12-20T04:22:48.000Z
validation_tests/reports/validations_produce_results.py
samcom12/anuga_core
f4378114dbf02d666fe6423de45798add5c42806
[ "Python-2.0", "OLDAP-2.7" ]
70
2015-03-18T07:35:22.000Z
2021-11-01T07:07:29.000Z
""" Script to run all the produce_results scripts in the validation_tests/xxx/xxx/ directories """ import os import time import anuga from anuga import indent #from anuga.validation_utilities.parameters import alg #from anuga.validation_utilities.parameters import cfl args = anuga.get_args() alg = args.alg np = arg...
23.316456
94
0.58089
""" Script to run all the produce_results scripts in the validation_tests/xxx/xxx/ directories """ import os import time import anuga from anuga import indent #from anuga.validation_utilities.parameters import alg #from anuga.validation_utilities.parameters import cfl args = anuga.get_args() alg = args.alg np = arg...
0
0
0
87f73a334314740813918568d6ad3d1326a6215b
103
py
Python
playserver/__init__.py
ollien/playserver
9043c4ae92e382a4c5f83cfd77db21b0dff39404
[ "MIT" ]
null
null
null
playserver/__init__.py
ollien/playserver
9043c4ae92e382a4c5f83cfd77db21b0dff39404
[ "MIT" ]
null
null
null
playserver/__init__.py
ollien/playserver
9043c4ae92e382a4c5f83cfd77db21b0dff39404
[ "MIT" ]
null
null
null
from . import track from . import webserver from . import tracksocketserver from . import globalconfig
20.6
31
0.805825
from . import track from . import webserver from . import tracksocketserver from . import globalconfig
0
0
0
aee842451f6eade6db5c2978ec2bdca97f54e1b7
341
py
Python
Courses/Codeval/Easy/Python/48-MultiplyList.py
leparrav/Playground
dcb90a2dd2bc1867511cfe621eb21248a60e357f
[ "Unlicense" ]
1
2019-02-13T12:02:26.000Z
2019-02-13T12:02:26.000Z
Courses/Codeval/Easy/Python/48-MultiplyList.py
leparrav/Playground
dcb90a2dd2bc1867511cfe621eb21248a60e357f
[ "Unlicense" ]
1
2018-08-13T15:58:33.000Z
2018-08-13T15:58:33.000Z
Courses/Codeval/Easy/Python/48-MultiplyList.py
leparrav/Playground
dcb90a2dd2bc1867511cfe621eb21248a60e357f
[ "Unlicense" ]
2
2017-08-10T20:01:29.000Z
2021-07-01T08:39:13.000Z
''' https://www.codeeval.com/open_challenges/113/ ''' import sys if __name__ == '__main__': main()
20.058824
61
0.604106
''' https://www.codeeval.com/open_challenges/113/ ''' import sys def main(): with open(sys.argv[1],'r') as word_file: for line in word_file.readlines(): line = line.strip().split("|") v1 = line[0].split() v2 = line[1].split() print " ".join([str(int(a)*int(b)) for a,b in zip(v1,v2)]) if __name__ == '...
213
0
23
2dcd7277bafb8be6b517570230e90076a4f3dbdc
3,014
py
Python
src/vm.py
obs145628/py-calculatrice
d833307b79c01b046e82204f65334be28b1af2a0
[ "MIT" ]
null
null
null
src/vm.py
obs145628/py-calculatrice
d833307b79c01b046e82204f65334be28b1af2a0
[ "MIT" ]
null
null
null
src/vm.py
obs145628/py-calculatrice
d833307b79c01b046e82204f65334be28b1af2a0
[ "MIT" ]
null
null
null
_ntypes = 0 TYPE_VOID = add_type() TYPE_INT = add_type() TYPE_FLOAT = add_type() TYPE_STRING = add_type() TYPE_LVALUE = add_type() TYPE_FUNCTION = add_type() _funs = dict()
21.683453
85
0.618447
_ntypes = 0 def add_type(): global _ntypes res = _ntypes _ntypes += 1 return res TYPE_VOID = add_type() TYPE_INT = add_type() TYPE_FLOAT = add_type() TYPE_STRING = add_type() TYPE_LVALUE = add_type() TYPE_FUNCTION = add_type() class Value: def __init__(self, type): self.type = type cla...
2,186
-13
653
2d27dc35e61ff2ac02f3bb9cdf6c137579530aea
91
py
Python
backend/battling/apps.py
eduardavercosa/theDudaProject
af8332211378e449447538c0a6d610eaec6e1e1a
[ "MIT" ]
null
null
null
backend/battling/apps.py
eduardavercosa/theDudaProject
af8332211378e449447538c0a6d610eaec6e1e1a
[ "MIT" ]
13
2021-03-31T15:19:02.000Z
2021-07-30T20:24:40.000Z
backend/battling/apps.py
eduardavercosa/theDudaProject
af8332211378e449447538c0a6d610eaec6e1e1a
[ "MIT" ]
2
2021-03-25T20:13:58.000Z
2021-03-25T20:25:15.000Z
from django.apps import AppConfig
15.166667
33
0.758242
from django.apps import AppConfig class BattlingConfig(AppConfig): name = "battling"
0
33
23
14df3965a52ef794a701a973e8584d6f6bac4cc0
2,774
py
Python
Examples/ExampleScripts/PrevNextGlyph.py
andyclymer/ControlBoard
e9b56341c38b982fe22db4e40a86c6b219c85d7e
[ "MIT" ]
21
2015-03-06T12:02:18.000Z
2021-03-28T16:44:11.000Z
Examples/ExampleScripts/PrevNextGlyph.py
andyclymer/ControlBoard
e9b56341c38b982fe22db4e40a86c6b219c85d7e
[ "MIT" ]
1
2015-03-07T00:14:24.000Z
2015-03-07T00:14:24.000Z
Examples/ExampleScripts/PrevNextGlyph.py
andyclymer/ControlBoard
e9b56341c38b982fe22db4e40a86c6b219c85d7e
[ "MIT" ]
3
2015-03-06T11:36:09.000Z
2015-06-30T04:46:41.000Z
from mojo.UI import CurrentGlyphWindow from mojo.events import addObserver, removeObserver import vanilla class PrevNextGlyph: """ ControlBoard "PrevNextGlyph" demo Use a Rotary Encoder component to swtich the Current Glyph Window to the previous or next glyphs. After rem...
40.202899
117
0.570656
from mojo.UI import CurrentGlyphWindow from mojo.events import addObserver, removeObserver import vanilla class PrevNextGlyph: """ ControlBoard "PrevNextGlyph" demo Use a Rotary Encoder component to swtich the Current Glyph Window to the previous or next glyphs. After rem...
2,166
0
113
2e4f43eef799a5742b5c04f6a152c2bae78060a5
1,871
py
Python
tests/test_simsrv.py
erikvanmulligen/etransafe-use-scenarios
6ec26120315abd66efdbfee6f5acba71e698a2b4
[ "MIT" ]
null
null
null
tests/test_simsrv.py
erikvanmulligen/etransafe-use-scenarios
6ec26120315abd66efdbfee6f5acba71e698a2b4
[ "MIT" ]
1
2021-02-11T14:59:37.000Z
2021-02-11T14:59:37.000Z
tests/test_simsrv.py
erikvanmulligen/etransafe-use-scenarios
6ec26120315abd66efdbfee6f5acba71e698a2b4
[ "MIT" ]
null
null
null
import pprint import argparse from src.knowledgehub.api import KnowledgeHubAPI if __name__ == "__main__": main()
41.577778
103
0.603421
import pprint import argparse from src.knowledgehub.api import KnowledgeHubAPI def main(): #api = KnowledgeHubAPI(server='TEST', client_secret='39c644b3-1f23-4d94-a71f-e0fb43ebd760') api = KnowledgeHubAPI(server='DEV', client_secret='3db5a6d7-4694-48a4-8a2e-e9c30d78f9ab') #api.set_service('DEV') prin...
1,727
0
23
c62df33d10fca822c2f9f72c3c0f16c300609e0c
107
py
Python
day2/day2-05 lab1-1 multiple if.py
hajin-kim/2020-HighSchool-Python-Tutoring
352025a954bff37d21cc3d59e7d5e0f0269a1f17
[ "MIT" ]
null
null
null
day2/day2-05 lab1-1 multiple if.py
hajin-kim/2020-HighSchool-Python-Tutoring
352025a954bff37d21cc3d59e7d5e0f0269a1f17
[ "MIT" ]
null
null
null
day2/day2-05 lab1-1 multiple if.py
hajin-kim/2020-HighSchool-Python-Tutoring
352025a954bff37d21cc3d59e7d5e0f0269a1f17
[ "MIT" ]
null
null
null
num1 = int( input() ) num2 = int( input() ) if num1 > 0: if num2 > 0: print(num1, num2)
15.285714
26
0.476636
num1 = int( input() ) num2 = int( input() ) if num1 > 0: if num2 > 0: print(num1, num2)
0
0
0
f30af8b892bb64dbc6995802842d8a62372c28be
227
py
Python
PyQt5/DateTime/xmas.py
zhaokai0402/PyQt5-Study
e6280fdc615e47c947c0902836350db49441e6de
[ "MIT" ]
null
null
null
PyQt5/DateTime/xmas.py
zhaokai0402/PyQt5-Study
e6280fdc615e47c947c0902836350db49441e6de
[ "MIT" ]
null
null
null
PyQt5/DateTime/xmas.py
zhaokai0402/PyQt5-Study
e6280fdc615e47c947c0902836350db49441e6de
[ "MIT" ]
null
null
null
from PyQt5.QtCore import QDate, Qt p1 = QDate(1996, 4, 2) p2 = QDate(1994, 6, 13) dayspassed = p1.daysTo(p2) print("{0} days have passed since {1} to {2}".format(dayspassed, p1.toString(Qt.ISODate), p2.toString(Qt.ISODate)))
28.375
115
0.696035
from PyQt5.QtCore import QDate, Qt p1 = QDate(1996, 4, 2) p2 = QDate(1994, 6, 13) dayspassed = p1.daysTo(p2) print("{0} days have passed since {1} to {2}".format(dayspassed, p1.toString(Qt.ISODate), p2.toString(Qt.ISODate)))
0
0
0
8a6c28798ac5f2eea948fe552d7ed58ea3366867
12,696
py
Python
qtorch/quant/quant_function.py
drcut/QPyTorch
63c293178e8ce9e6e5b218dee96536e9c4ad1e5c
[ "MIT" ]
null
null
null
qtorch/quant/quant_function.py
drcut/QPyTorch
63c293178e8ce9e6e5b218dee96536e9c4ad1e5c
[ "MIT" ]
null
null
null
qtorch/quant/quant_function.py
drcut/QPyTorch
63c293178e8ce9e6e5b218dee96536e9c4ad1e5c
[ "MIT" ]
null
null
null
import torch from qtorch import Number, FixedPoint, BlockFloatingPoint, FloatingPoint import torch.nn as nn import torch.nn.functional as F import numpy as np from torch.utils.cpp_extension import load import os current_path = os.path.dirname(os.path.realpath(__file__)) quant_cpu = load( name='quant_cpu', ...
52.032787
172
0.632246
import torch from qtorch import Number, FixedPoint, BlockFloatingPoint, FloatingPoint import torch.nn as nn import torch.nn.functional as F import numpy as np from torch.utils.cpp_extension import load import os current_path = os.path.dirname(os.path.realpath(__file__)) quant_cpu = load( name='quant_cpu', ...
1,851
280
106
37098085de756a93d7f4495599b694d1f17420e3
797
py
Python
pylmod/tests/common.py
mitodl/PyLmod
c028ceca631c5e1032b23a4d1a8cde17450df252
[ "BSD-2-Clause" ]
4
2015-09-08T18:58:10.000Z
2018-03-06T01:14:46.000Z
pylmod/tests/common.py
mitodl/PyLmod
c028ceca631c5e1032b23a4d1a8cde17450df252
[ "BSD-2-Clause" ]
73
2015-02-12T14:44:50.000Z
2022-01-19T00:05:44.000Z
pylmod/tests/common.py
mitodl/PyLmod
c028ceca631c5e1032b23a4d1a8cde17450df252
[ "BSD-2-Clause" ]
2
2015-04-30T01:19:23.000Z
2015-08-07T07:30:08.000Z
""" Base class and common constants needed for pylmod tests """ import os from unittest import TestCase class BaseTest(TestCase): """ Base class with convenient constants and URL endpoints for pylmod testing. """ # This should be removed if we end up with common methods, but for # now they are jus...
28.464286
78
0.690088
""" Base class and common constants needed for pylmod tests """ import os from unittest import TestCase class BaseTest(TestCase): """ Base class with convenient constants and URL endpoints for pylmod testing. """ # This should be removed if we end up with common methods, but for # now they are jus...
0
0
0
f3d331fbd5da98d5b101c7b988080ae9e54c7c8e
464
py
Python
tests/proc_006.py
meisterluk/taptaptap3
6a377ae3f6ffd92a983a7f809132c9de20ed0d76
[ "BSD-3-Clause" ]
null
null
null
tests/proc_006.py
meisterluk/taptaptap3
6a377ae3f6ffd92a983a7f809132c9de20ed0d76
[ "BSD-3-Clause" ]
2
2019-09-26T13:48:11.000Z
2019-09-30T21:30:12.000Z
tests/proc_006.py
meisterluk/taptaptap3
6a377ae3f6ffd92a983a7f809132c9de20ed0d76
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 from taptaptap3.proc import plan, ok, out plan(tests=10) ok("Starting the program") ok("Starting the engine") ok("Find the object") ok("Transport object to target") ok("Check for existing fire") ok("Place it beneath the desk") ok("Search for fire extinguisher") ok("Extinguish fire") ok("Put fir...
19.333333
41
0.685345
#!/usr/bin/env python3 from taptaptap3.proc import plan, ok, out plan(tests=10) ok("Starting the program") ok("Starting the engine") ok("Find the object") ok("Transport object to target") ok("Check for existing fire") ok("Place it beneath the desk") ok("Search for fire extinguisher") ok("Extinguish fire") ok("Put fir...
0
0
0
8dad65aff74ff1e8d6b5e537733be0341ed93db9
784
py
Python
tests/test_nag_max_min.py
daviddoret/pyxag
6884c7e100d28c3ce6273248caa40eaeab920bc5
[ "MIT" ]
1
2019-10-27T15:56:27.000Z
2019-10-27T15:56:27.000Z
tests/test_nag_max_min.py
daviddoret/pynag
6884c7e100d28c3ce6273248caa40eaeab920bc5
[ "MIT" ]
11
2019-11-04T18:21:16.000Z
2019-11-07T03:22:41.000Z
tests/test_nag_max_min.py
daviddoret/pynag
6884c7e100d28c3ce6273248caa40eaeab920bc5
[ "MIT" ]
null
null
null
import unittest from classes.nag import Nag if __name__ == '__main__': unittest.main()
35.636364
73
0.628827
import unittest from classes.nag import Nag class TestNagMaxMin(unittest.TestCase): def test_more_complex_1(self): nag = Nag('Test') nag.set_nand('i1', 'i1', 'n1') nag.set_nand('i1', 'i1', 'n2') nag.set_nand('n1', 'n2', 'n3') nag.set_nand('i1', 'n3', 'n4') nag.set_n...
625
18
50
e06289fab530f54b3cac133e2744cd2572babf70
6,475
py
Python
tests/test_extract_features.py
stjordanis/vissl
8800989f9bf073693b777c14ea01b585d4b306d6
[ "MIT" ]
1
2021-05-03T18:52:32.000Z
2021-05-03T18:52:32.000Z
tests/test_extract_features.py
pzharrington/vissl
b647c256447af7ea66655811849be1f642377db8
[ "MIT" ]
null
null
null
tests/test_extract_features.py
pzharrington/vissl
b647c256447af7ea66655811849be1f642377db8
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import unittest import torch from hydra.experimental import compose, initialize_config_module from vissl.utils.hydra_config import ...
49.05303
88
0.592432
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import unittest import torch from hydra.experimental import compose, initialize_config_module from vissl.utils.hydra_config import ...
5,786
174
23
1789f865fff7494de4353119c0d168a977ab7de7
2,178
py
Python
lab4/src/lab4_main.py
DemerzelSun12/HIT-2020-Fall-Machine-Learning-Labs
294331af274e30caab7e8c5b8f910a1654b0f54f
[ "MIT" ]
null
null
null
lab4/src/lab4_main.py
DemerzelSun12/HIT-2020-Fall-Machine-Learning-Labs
294331af274e30caab7e8c5b8f910a1654b0f54f
[ "MIT" ]
null
null
null
lab4/src/lab4_main.py
DemerzelSun12/HIT-2020-Fall-Machine-Learning-Labs
294331af274e30caab7e8c5b8f910a1654b0f54f
[ "MIT" ]
null
null
null
from src.PCA import * from src.generate_data import * from src.generate_picture import * from src.dimensionality_reduction_image import * if __name__ == '__main__': main()
29.432432
80
0.667126
from src.PCA import * from src.generate_data import * from src.generate_picture import * from src.dimensionality_reduction_image import * def test_pca(data): generate_3_dimension_picture(data) central_data, eig_vector, data_mean = PCA(data, 2).pca() pca_data = np.dot(central_data, eig_vector) generate...
1,904
0
92
9eeabc98a8cf3c977f1c9739fce826a98ead06a5
10,652
py
Python
src/scripts/collect_pose_data_pene_no_wall_big.py
yifan-you-37/omnihang
c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2
[ "MIT" ]
1
2022-01-16T20:24:09.000Z
2022-01-16T20:24:09.000Z
src/scripts/collect_pose_data_pene_no_wall_big.py
yifan-you-37/omnihang
c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2
[ "MIT" ]
null
null
null
src/scripts/collect_pose_data_pene_no_wall_big.py
yifan-you-37/omnihang
c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2
[ "MIT" ]
1
2022-03-16T03:14:37.000Z
2022-03-16T03:14:37.000Z
import pybullet import time import numpy as np import random # np.random.seed(5) # random.seed(5) import sys import os import argparse import csv from scipy.spatial.transform import Rotation from collect_pose_data import PoseDataCollector sys.path.insert(1, '../utils/') from coord_helper import * from data_helper im...
39.306273
187
0.747747
import pybullet import time import numpy as np import random # np.random.seed(5) # random.seed(5) import sys import os import argparse import csv from scipy.spatial.transform import Rotation from collect_pose_data import PoseDataCollector sys.path.insert(1, '../utils/') from coord_helper import * from data_helper im...
4,329
22
140
0e90de83b6b7ad18057ba7b1ccbf25ae095b9530
5,018
py
Python
src/rosdistro/release_cache.py
andre-rosa/rosdistro-1
62b79df2adc466ec0ea239e9210dcb26cac558ab
[ "BSD-3-Clause" ]
742
2017-07-05T02:49:36.000Z
2022-03-30T12:55:43.000Z
src/rosdistro/release_cache.py
andre-rosa/rosdistro-1
62b79df2adc466ec0ea239e9210dcb26cac558ab
[ "BSD-3-Clause" ]
94
2015-01-09T19:45:10.000Z
2022-03-22T18:44:49.000Z
src/rosdistro/release_cache.py
andre-rosa/rosdistro-1
62b79df2adc466ec0ea239e9210dcb26cac558ab
[ "BSD-3-Clause" ]
425
2017-07-04T22:03:29.000Z
2022-03-29T06:59:06.000Z
# Software License Agreement (BSD License) # # Copyright (c) 2013, Open Source Robotics Foundation, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code mus...
47.339623
248
0.702272
# Software License Agreement (BSD License) # # Copyright (c) 2013, Open Source Robotics Foundation, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code mus...
3,044
227
23
b7c91d97580e3065a00b75229cb7cc420751a1e5
756
py
Python
testing/noauth/test_ticker.py
North14/avanza
bc2b0054ba9e8f93ebeaad14acd19452e60f8713
[ "MIT" ]
11
2020-03-17T08:17:12.000Z
2021-11-27T12:18:14.000Z
testing/noauth/test_ticker.py
North14/avanza
bc2b0054ba9e8f93ebeaad14acd19452e60f8713
[ "MIT" ]
19
2020-03-12T09:44:33.000Z
2021-04-29T21:15:50.000Z
testing/noauth/test_ticker.py
North14/avanza
bc2b0054ba9e8f93ebeaad14acd19452e60f8713
[ "MIT" ]
null
null
null
import avanza
34.363636
51
0.740741
import avanza def test_ticker(): msft = avanza.Ticker(3873) assert isinstance(msft.info, dict) assert isinstance(msft.buy_price, float) assert isinstance(msft.sell_price, float) assert isinstance(msft.last_price, float) assert isinstance(msft.symbol, str) assert isinstance(msft.currency, s...
718
0
23
c51857464ccdc837ef6d5ed77c494587bc7bc5b0
612
py
Python
tests/metadata_test.py
jeafreezy/rsgis
a0e4b1a2ac87a6d66a323bb86fc81722dcc948df
[ "Apache-2.0" ]
4
2020-07-23T10:22:56.000Z
2021-04-08T20:55:52.000Z
tests/metadata_test.py
marx-keyz/rsgis
a0e4b1a2ac87a6d66a323bb86fc81722dcc948df
[ "Apache-2.0" ]
1
2020-07-23T19:19:26.000Z
2020-07-23T23:03:44.000Z
tests/metadata_test.py
marx-keyz/rsgis
a0e4b1a2ac87a6d66a323bb86fc81722dcc948df
[ "Apache-2.0" ]
2
2020-07-23T16:08:41.000Z
2020-07-24T08:24:21.000Z
import unittest from rsgis import Metadata import os if __name__ == '__main__': unittest.main()
17
70
0.49183
import unittest from rsgis import Metadata import os class MetadataTest(unittest.TestCase): def test_file(self): dir=os.getcwd() + '\data' for _ in os.listdir(dir): path = dir + '\\' + _ if _.endswith('txt') and _.split('.')[0].endswith('_MTL'): try: ...
438
17
50
5c4333ba36422bc2f175bfb930c540fae03012e8
162
py
Python
backend/schemas/schemas.py
vasconcel0s/todo
062a85c4de835e209ff8d1ed7023b1c485fd9c7c
[ "MIT" ]
null
null
null
backend/schemas/schemas.py
vasconcel0s/todo
062a85c4de835e209ff8d1ed7023b1c485fd9c7c
[ "MIT" ]
null
null
null
backend/schemas/schemas.py
vasconcel0s/todo
062a85c4de835e209ff8d1ed7023b1c485fd9c7c
[ "MIT" ]
null
null
null
from ma import ma from models.entities import Todo
18
42
0.703704
from ma import ma from models.entities import Todo class TodoSchema(ma.SQLAlchemyAutoSchema): class Meta: model = Todo load_instance = True
0
87
23
2f45665c787c089aa3b99a2dafcb5fde0d81a10b
133
py
Python
main.py
xaviermarquez-alba/ulauncher-virtualbox
caddcce5a0c401278bf726c03b3446c33b594f30
[ "MIT" ]
7
2019-09-25T23:51:24.000Z
2021-12-19T00:21:51.000Z
main.py
xaviermarquez-alba/ulauncher-virtualbox
caddcce5a0c401278bf726c03b3446c33b594f30
[ "MIT" ]
3
2019-09-22T01:57:20.000Z
2020-12-25T10:47:11.000Z
main.py
xaviermarquez-alba/ulauncher-virtualbox
caddcce5a0c401278bf726c03b3446c33b594f30
[ "MIT" ]
1
2020-09-22T08:38:10.000Z
2020-09-22T08:38:10.000Z
from ulauncher_virtualbox.VirtualboxExtension import VirtualboxExtension if __name__ == '__main__': VirtualboxExtension().run()
26.6
72
0.81203
from ulauncher_virtualbox.VirtualboxExtension import VirtualboxExtension if __name__ == '__main__': VirtualboxExtension().run()
0
0
0
2b48b084df38c996ed224cdc728cc277df5cc0f8
1,710
py
Python
test.py
lhuang001/temperature_simulation
ad2bb9e20b09c8997d6bcddb9fbc73f17b2186e6
[ "MIT" ]
null
null
null
test.py
lhuang001/temperature_simulation
ad2bb9e20b09c8997d6bcddb9fbc73f17b2186e6
[ "MIT" ]
null
null
null
test.py
lhuang001/temperature_simulation
ad2bb9e20b09c8997d6bcddb9fbc73f17b2186e6
[ "MIT" ]
null
null
null
#! -*- coding:utf8 -*- # This file used to calculate avg temperature of everyday import sys import numpy as np import pandas as pd from filter import check_threshold, check_data_integrity, check_column_name def calculate_average(data, column_names): """计算温度相关列的平均值 :param data: :param column_names: ...
28.032787
114
0.690643
#! -*- coding:utf8 -*- # This file used to calculate avg temperature of everyday import sys import numpy as np import pandas as pd from filter import check_threshold, check_data_integrity, check_column_name def read(input_file): origin_data = pd.read_csv(input_file, header=[0], sep=",") """ get some colum...
404
0
23
1f31928f96ab774fcfe1bc6af6461ddc6ef49f76
6,231
py
Python
prepare_data.py
griff4692/question_generation
f5c0fc56b6520bced02c376a8da275bf84311feb
[ "MIT" ]
null
null
null
prepare_data.py
griff4692/question_generation
f5c0fc56b6520bced02c376a8da275bf84311feb
[ "MIT" ]
null
null
null
prepare_data.py
griff4692/question_generation
f5c0fc56b6520bced02c376a8da275bf84311feb
[ "MIT" ]
null
null
null
import os import logging from dataclasses import dataclass, field from typing import Optional import pandas as pd import torch from tqdm import tqdm from transformers import T5Tokenizer, BartTokenizer, HfArgumentParser logger = logging.getLogger(__name__) @dataclass class DataTrainingArguments: """ Argume...
34.425414
120
0.644359
import os import logging from dataclasses import dataclass, field from typing import Optional import pandas as pd import torch from tqdm import tqdm from transformers import T5Tokenizer, BartTokenizer, HfArgumentParser logger = logging.getLogger(__name__) class QGDataset(torch.utils.data.Dataset): def __init__...
4,230
173
46
f8dcda45e677e991e26e58001fe409a8ed01f4a3
822
py
Python
app/__init__.py
lpe234/bms
20a2242c9c5e52b099c436eac7addfede57c3a6e
[ "MIT" ]
1
2019-05-01T08:11:59.000Z
2019-05-01T08:11:59.000Z
app/__init__.py
lpe234/bms
20a2242c9c5e52b099c436eac7addfede57c3a6e
[ "MIT" ]
null
null
null
app/__init__.py
lpe234/bms
20a2242c9c5e52b099c436eac7addfede57c3a6e
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- import os from flask import Flask, redirect, url_for from app.config import DevelopmentConfig, ProductionConfig __author__ = 'lpe234' # create application bms_app = Flask(__name__) if os.environ.get('BMS_ENV') == 'PRODUCTION': bms_app.config.from_object(ProductionConfig) else: bm...
18.266667
58
0.750608
# -*- coding: UTF-8 -*- import os from flask import Flask, redirect, url_for from app.config import DevelopmentConfig, ProductionConfig __author__ = 'lpe234' # create application bms_app = Flask(__name__) if os.environ.get('BMS_ENV') == 'PRODUCTION': bms_app.config.from_object(ProductionConfig) else: bm...
34
0
22
e8b6f68f583fbe914e7e2b21c7582a39be6f4efa
11,287
py
Python
ypp.py
tssga-arch/myotc
4fd166f4b59b856f68d531f9ef6c5cb9419a43fa
[ "BSD-2-Clause" ]
null
null
null
ypp.py
tssga-arch/myotc
4fd166f4b59b856f68d531f9ef6c5cb9419a43fa
[ "BSD-2-Clause" ]
null
null
null
ypp.py
tssga-arch/myotc
4fd166f4b59b856f68d531f9ef6c5cb9419a43fa
[ "BSD-2-Clause" ]
1
2021-12-01T12:44:27.000Z
2021-12-01T12:44:27.000Z
#!/usr/bin/env python3 import base64 import yaml import sys import re import os import random import string import subprocess import json from d3des import encrypt as d3des try: from passlib.hash import md5_crypt, sha256_crypt, sha512_crypt from cryptography.hazmat.primitives import serialization as crypto_serializ...
28.793367
100
0.576504
#!/usr/bin/env python3 import base64 import yaml import sys import re import os import random import string import subprocess import json from d3des import encrypt as d3des try: from passlib.hash import md5_crypt, sha256_crypt, sha512_crypt from cryptography.hazmat.primitives import serialization as crypto_serializ...
8,787
0
275
a2b1f3047d1f4d6e1a0c89cc693c623246a2513c
1,195
py
Python
migrations/versions/1b5bbc75de44_.py
deniskorobicyn/kozmic-ci
0af754b81891722824c6bea85154590f15931030
[ "BSD-3-Clause" ]
1
2021-06-05T18:36:13.000Z
2021-06-05T18:36:13.000Z
migrations/versions/1b5bbc75de44_.py
deniskorobicyn/kozmic-ci
0af754b81891722824c6bea85154590f15931030
[ "BSD-3-Clause" ]
null
null
null
migrations/versions/1b5bbc75de44_.py
deniskorobicyn/kozmic-ci
0af754b81891722824c6bea85154590f15931030
[ "BSD-3-Clause" ]
null
null
null
"""empty message Revision ID: 1b5bbc75de44 Revises: 1531599e3534 Create Date: 2014-01-02 20:52:28.389571 """ # revision identifiers, used by Alembic. revision = '1b5bbc75de44' down_revision = '1531599e3534' from alembic import op import sqlalchemy as sa from kozmic.models import db
30.641026
102
0.714644
"""empty message Revision ID: 1b5bbc75de44 Revises: 1531599e3534 Create Date: 2014-01-02 20:52:28.389571 """ # revision identifiers, used by Alembic. revision = '1b5bbc75de44' down_revision = '1531599e3534' from alembic import op import sqlalchemy as sa from kozmic.models import db def upgrade(): op.create_i...
859
0
46
af2fab2d84d178703e2b2b640f8375eb056735fe
6,856
py
Python
iexec-apps/0.to-update/randomGenerator/signer/signer.py
soumyapal96/decentralized-computing
2776a1adb135df1f5714bd68d81ec05a8c469b75
[ "MIT" ]
null
null
null
iexec-apps/0.to-update/randomGenerator/signer/signer.py
soumyapal96/decentralized-computing
2776a1adb135df1f5714bd68d81ec05a8c469b75
[ "MIT" ]
null
null
null
iexec-apps/0.to-update/randomGenerator/signer/signer.py
soumyapal96/decentralized-computing
2776a1adb135df1f5714bd68d81ec05a8c469b75
[ "MIT" ]
null
null
null
import os import sys import attrdict import ssl import json import zipfile import random import traceback import gnupg import base64 from Crypto.Cipher import AES, PKCS1_OAEP from Crypto.PublicKey import RSA from web3.auto import w3 from eth_account.messages import defunct_hash_message from shutil import copyfile kec...
30.882883
110
0.610706
import os import sys import attrdict import ssl import json import zipfile import random import traceback import gnupg import base64 from Crypto.Cipher import AES, PKCS1_OAEP from Crypto.PublicKey import RSA from web3.auto import w3 from eth_account.messages import defunct_hash_message from shutil import copyfile kec...
5,894
-2
306
8d8e9deb6cb7fce5b91c4b151495df2684bdaa88
321
py
Python
lightning_baselines3/off_policy_models/__init__.py
HenryJia/lightning-baselines3
10d1a0eed6136978204323250e37d49915a12e14
[ "MIT" ]
3
2021-01-18T23:27:38.000Z
2021-10-04T12:07:16.000Z
lightning_baselines3/off_policy_models/__init__.py
HenryJia/lightning-baselines3
10d1a0eed6136978204323250e37d49915a12e14
[ "MIT" ]
8
2021-01-21T03:29:29.000Z
2021-07-25T18:45:39.000Z
lightning_baselines3/off_policy_models/__init__.py
HenryJia/lightning-baselines3
10d1a0eed6136978204323250e37d49915a12e14
[ "MIT" ]
null
null
null
from lightning_baselines3.off_policy_models.off_policy_model import OffPolicyModel from lightning_baselines3.off_policy_models.dqn import DQN from lightning_baselines3.off_policy_models.td3 import TD3 from lightning_baselines3.off_policy_models.ddpg import DDPG from lightning_baselines3.off_policy_models.sac import SAC...
53.5
82
0.906542
from lightning_baselines3.off_policy_models.off_policy_model import OffPolicyModel from lightning_baselines3.off_policy_models.dqn import DQN from lightning_baselines3.off_policy_models.td3 import TD3 from lightning_baselines3.off_policy_models.ddpg import DDPG from lightning_baselines3.off_policy_models.sac import SAC...
0
0
0
fc60fe43d9b2b2ca486b989461b322f0d49ed11c
1,302
py
Python
utils/preprocess.py
SijRa/mri-analysis
a35411bda6e39eff57f715a695b7fb6a30997706
[ "MIT" ]
2
2020-02-28T09:53:55.000Z
2020-11-25T23:09:19.000Z
utils/preprocess.py
SijRa/Brain-Image-Analysis-using-Deep-Learning
a35411bda6e39eff57f715a695b7fb6a30997706
[ "MIT" ]
null
null
null
utils/preprocess.py
SijRa/Brain-Image-Analysis-using-Deep-Learning
a35411bda6e39eff57f715a695b7fb6a30997706
[ "MIT" ]
1
2020-07-05T09:30:11.000Z
2020-07-05T09:30:11.000Z
from sklearn.model_selection import StratifiedKFold from sklearn.model_selection import train_test_split from tensorflow.keras.utils import to_categorical default_folds = 5 default_test_size = 0.2
59.181818
168
0.820276
from sklearn.model_selection import StratifiedKFold from sklearn.model_selection import train_test_split from tensorflow.keras.utils import to_categorical default_folds = 5 default_test_size = 0.2 def Stratified_KFolds_Generator(folds=default_folds): return StratifiedKFold(n_splits=folds, shuffle=True) def Train_T...
1,013
0
92
78ee0374e197b2f774615713d41f166b315d5555
266
py
Python
airmap/__init__.py
vasantharajr/AirMapSDK-Embedded
a1cc41bad46d9dfba98d7d01e04cb54a38987bf8
[ "Apache-2.0" ]
7
2016-10-20T17:50:40.000Z
2021-11-28T00:44:39.000Z
airmap/__init__.py
vasantharajr/AirMapSDK-Embedded
a1cc41bad46d9dfba98d7d01e04cb54a38987bf8
[ "Apache-2.0" ]
1
2017-01-31T19:40:35.000Z
2017-01-31T19:40:35.000Z
airmap/__init__.py
isabella232/AirMapSDK-Embedded
a1cc41bad46d9dfba98d7d01e04cb54a38987bf8
[ "Apache-2.0" ]
3
2016-12-03T00:17:59.000Z
2021-03-26T12:17:58.000Z
""" Airmap package init code AirMapSDK Created by AirMap Team on 6/28/16. Copyright (c) 2016 AirMap, Inc. All rights reserved. """ import airdefs import connect import statusAPI import flightAPI import drone import log import telemetryAPI import alertsAPI
15.647059
54
0.770677
""" Airmap package init code AirMapSDK Created by AirMap Team on 6/28/16. Copyright (c) 2016 AirMap, Inc. All rights reserved. """ import airdefs import connect import statusAPI import flightAPI import drone import log import telemetryAPI import alertsAPI
0
0
0
fb79aa7e7cfa2c2a9d3842b423d77f5b9f93021d
737
py
Python
archie_cli/ping.py
omeraloni/archie-cli
33a16ed5eb6c101b51d4fcc658c9bd2e4e0039b6
[ "MIT" ]
null
null
null
archie_cli/ping.py
omeraloni/archie-cli
33a16ed5eb6c101b51d4fcc658c9bd2e4e0039b6
[ "MIT" ]
null
null
null
archie_cli/ping.py
omeraloni/archie-cli
33a16ed5eb6c101b51d4fcc658c9bd2e4e0039b6
[ "MIT" ]
null
null
null
import subprocess from re import search from .methods import config_read
29.48
108
0.648575
import subprocess from re import search from .methods import config_read def ping(interface, hostname='google.com', retries=1): ping_cmd = config_read()["ping_cmd"] command = [f"{ping_cmd}", f"-I {interface}" if interface is not None else "", f"-c {retries}", hostname] output, err = subprocess.Popen(co...
638
0
23
04018adaf9a69dc5b5a6b134fc21bdd0483c08bb
836
py
Python
ABC/abc051-abc100/abc077/c.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
ABC/abc051-abc100/abc077/c.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
ABC/abc051-abc100/abc077/c.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
'''input 3 1 1 1 2 2 2 3 3 3 27 6 3 14 159 2 6 53 58 9 79 323 84 6 2643 383 2 79 50 288 87 2 1 5 2 4 3 6 3 ''' # -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem C if __name__ == '__main__': n = int(input()) a = sorted(list(map(int, input().split()))) b = list(ma...
17.787234
66
0.577751
'''input 3 1 1 1 2 2 2 3 3 3 27 6 3 14 159 2 6 53 58 9 79 323 84 6 2643 383 2 79 50 288 87 2 1 5 2 4 3 6 3 ''' # -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem C if __name__ == '__main__': n = int(input()) a = sorted(list(map(int, input().split()))) b = list(ma...
0
0
0
a665a8536144bfc59fc5c559c4669cd381303b02
779
py
Python
Python3/93_Restore_IP_Addresses.py
yangjiahao106/LeetCode
c30ba0ef06f444951f7ab8eee495ac43613d7f4f
[ "RSA-MD" ]
1
2018-04-28T09:07:11.000Z
2018-04-28T09:07:11.000Z
Python3/93_Restore_IP_Addresses.py
yangjiahao106/LeetCode
c30ba0ef06f444951f7ab8eee495ac43613d7f4f
[ "RSA-MD" ]
1
2018-02-24T16:26:30.000Z
2018-02-24T16:26:44.000Z
Python3/93_Restore_IP_Addresses.py
yangjiahao106/LeetCode
c30ba0ef06f444951f7ab8eee495ac43613d7f4f
[ "RSA-MD" ]
null
null
null
#! python3 # __author__ = "YangJiaHao" # date: 2018/3/13 if __name__ == '__main__': so = Solution() res = so.restoreIpAddresses('010010') print(res)
24.34375
76
0.462131
#! python3 # __author__ = "YangJiaHao" # date: 2018/3/13 class Solution: def restoreIpAddresses(self, s): """ :type s: str :rtype: List[str] """ result = [] self.dfs('', 0, s, result) return result def dfs(self, one, count, rest, result): if count...
416
206
22
760a1204242fcbe8695d9c35138a68c8b5f54a3e
2,735
py
Python
relatives/tests/migrations/0003_auto_20210927_1618.py
treyhunner/django-relatives
a578ab135f865df2835957cedfd00476c4b65e18
[ "MIT" ]
10
2015-08-14T00:22:52.000Z
2021-09-16T08:15:14.000Z
relatives/tests/migrations/0003_auto_20210927_1618.py
treyhunner/django-relatives
a578ab135f865df2835957cedfd00476c4b65e18
[ "MIT" ]
12
2015-03-09T20:17:16.000Z
2021-09-30T18:46:11.000Z
relatives/tests/migrations/0003_auto_20210927_1618.py
treyhunner/django-relatives
a578ab135f865df2835957cedfd00476c4b65e18
[ "MIT" ]
3
2016-01-05T15:20:10.000Z
2018-08-03T10:51:23.000Z
# Generated by Django 3.2.7 on 2021-09-27 16:18 from django.db import migrations, models
36.959459
111
0.593419
# Generated by Django 3.2.7 on 2021-09-27 16:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tests', '0002_shape'), ] operations = [ migrations.AlterField( model_name='actor', name='id', field=mode...
0
2,621
23
854f35d055cfcfb5230df76afe5477aabcc5bb87
167
py
Python
web-scraping/crawl.py
stivenramireza/nutibara-web-scraping
48be40b735f011ac93901a2ca97fcacc6d2d5ca6
[ "MIT" ]
1
2019-10-02T14:29:48.000Z
2019-10-02T14:29:48.000Z
web-scraping/crawl.py
stivenramireza/nutibara-web-scraping
48be40b735f011ac93901a2ca97fcacc6d2d5ca6
[ "MIT" ]
1
2019-10-02T14:42:31.000Z
2019-10-02T14:42:31.000Z
web-scraping/crawl.py
stivenramireza/anutibara-web-scraping
48be40b735f011ac93901a2ca97fcacc6d2d5ca6
[ "MIT" ]
null
null
null
import requests from bs4 import BeautifulSoup
23.857143
53
0.736527
import requests from bs4 import BeautifulSoup def scrape_html(url): page = requests.get(url) soup = BeautifulSoup(page.content, 'html.parser') return soup
99
0
23
1b801a12009dece66d045f5a3ba8d8132bf9ef27
809
py
Python
adminmgr/media/code/python/red3/red3.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
9
2019-11-08T02:05:27.000Z
2021-12-13T12:06:35.000Z
adminmgr/media/code/python/red3/red3.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
6
2019-11-27T03:23:16.000Z
2021-06-10T19:15:13.000Z
adminmgr/media/code/python/red1/red3.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
4
2019-11-26T17:04:27.000Z
2021-12-13T11:57:03.000Z
#!/usr/bin/python3 import sys diction={} for line in sys.stdin: line=line.strip() line_val=line.split(',') bowl,bat,runs,balls=line_val runs=int(runs) print(runs) balls=int(balls) key=(bowl,bat) if key in diction: diction[key][0].append(runs) diction[key][1].append(balls) else: diction[key]...
18.813953
67
0.625464
#!/usr/bin/python3 import sys diction={} def func1(x): return diction[x][0] def func2(x): return diction[x][1] def func3(x): return x[0] for line in sys.stdin: line=line.strip() line_val=line.split(',') bowl,bat,runs,balls=line_val runs=int(runs) print(runs) balls=int(balls) key=(bow...
36
0
75
a237da63c14ff5f89757dcbb30f63d405f1fbf03
22,521
py
Python
meiduo_mall/meiduo_mall/apps/users/views.py
dongwenxi/meiduo
144d6bd7a33e479e02e38071a666b0d652f3f24c
[ "MIT" ]
3
2019-06-20T11:34:52.000Z
2019-08-20T06:25:51.000Z
meiduo_mall/meiduo_mall/apps/users/views.py
dongwenxi/meiduo
144d6bd7a33e479e02e38071a666b0d652f3f24c
[ "MIT" ]
null
null
null
meiduo_mall/meiduo_mall/apps/users/views.py
dongwenxi/meiduo
144d6bd7a33e479e02e38071a666b0d652f3f24c
[ "MIT" ]
1
2019-12-26T08:45:05.000Z
2019-12-26T08:45:05.000Z
from django.shortcuts import render, redirect, reverse from django.template import RequestContext from django.views import View from django import http from django.contrib.auth import login, logout, mixins from django.db import DatabaseError from django_redis import get_redis_connection from django.contrib.auth import ...
32.218884
123
0.592158
from django.shortcuts import render, redirect, reverse from django.template import RequestContext from django.views import View from django import http from django.contrib.auth import login, logout, mixins from django.db import DatabaseError from django_redis import get_redis_connection from django.contrib.auth import ...
15,067
2,467
578
0eff8762648ff5eb81e2b701d45e3c0febac192a
1,654
py
Python
src/archive/clay_bricks/PatternBrickLibrary/patternGenv0.py
JonasWard/ClayAdventures
a716445ac690e4792e70658319aa1d5299f9c9e9
[ "MIT" ]
1
2020-03-25T10:55:10.000Z
2020-03-25T10:55:10.000Z
src/archive/clay_bricks/PatternBrickLibrary/patternGenv0.py
JonasWard/ClayAdventures
a716445ac690e4792e70658319aa1d5299f9c9e9
[ "MIT" ]
null
null
null
src/archive/clay_bricks/PatternBrickLibrary/patternGenv0.py
JonasWard/ClayAdventures
a716445ac690e4792e70658319aa1d5299f9c9e9
[ "MIT" ]
null
null
null
import Rhino.Geometry as rg import math # grasshoppper variables # geometric variables base_points normals layer_count layer_height # pattern variables min_max_val period phase_shift base_layer_set = [] for i, pt in enumerate(base_points): local_pt = rg.Point3d(pt.X, pt.Y, 0.0) base_layer_set.append(Poin...
20.675
87
0.643894
import Rhino.Geometry as rg import math # grasshoppper variables # geometric variables base_points normals layer_count layer_height # pattern variables min_max_val period phase_shift class PointWithNormal(object): def __init__(self, pt, normal): self.o = pt self.n = normal def new_pt(self...
1,065
13
181
f13473ccc5629f22523e6eb0bf6ea63fe8b6ee02
2,153
py
Python
python/oneflow/test/graph/test_graph_debug.py
zzk0/oneflow
ab15f5986ee0081da5493ee63d3f2acf063ae229
[ "Apache-2.0" ]
null
null
null
python/oneflow/test/graph/test_graph_debug.py
zzk0/oneflow
ab15f5986ee0081da5493ee63d3f2acf063ae229
[ "Apache-2.0" ]
null
null
null
python/oneflow/test/graph/test_graph_debug.py
zzk0/oneflow
ab15f5986ee0081da5493ee63d3f2acf063ae229
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
27.602564
75
0.699025
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
1,062
27
179