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
ba7a7f5e07b2f50227a9c41fe73ef0dfe7c67fc3
2,206
py
Python
Trials_Practice/Upload_csv.py
ikhedr/flask_api
7c9260761fc8e6faf1c06393c2b353046759a504
[ "MIT" ]
null
null
null
Trials_Practice/Upload_csv.py
ikhedr/flask_api
7c9260761fc8e6faf1c06393c2b353046759a504
[ "MIT" ]
null
null
null
Trials_Practice/Upload_csv.py
ikhedr/flask_api
7c9260761fc8e6faf1c06393c2b353046759a504
[ "MIT" ]
null
null
null
from flask import Flask, make_response, request, render_template, jsonify import io import csv from flask_pymongo import PyMongo import pandas as pd import json from bson import ObjectId app = Flask(__name__,template_folder='templates') #Database name app.config['MONGO_DBNAME'] = 'tickets' # use mla...
27.234568
97
0.614234
from flask import Flask, make_response, request, render_template, jsonify import io import csv from flask_pymongo import PyMongo import pandas as pd import json from bson import ObjectId class JSONEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, ObjectId): return s...
1,344
15
145
6bdfdf4be7e83844f47e16b120d585a3a134532e
1,408
py
Python
tests/test_cron_parsing.py
koaning/skedulord
dcd505b3f1ce554bb380464a95f2a2e3ced915ba
[ "MIT" ]
26
2019-10-18T11:44:58.000Z
2021-07-18T19:14:50.000Z
tests/test_cron_parsing.py
koaning/skedulord
dcd505b3f1ce554bb380464a95f2a2e3ced915ba
[ "MIT" ]
31
2019-10-18T10:17:03.000Z
2021-07-20T18:40:31.000Z
tests/test_cron_parsing.py
koaning/skedulord
dcd505b3f1ce554bb380464a95f2a2e3ced915ba
[ "MIT" ]
3
2019-10-24T17:39:11.000Z
2021-07-19T22:58:14.000Z
import pytest from skedulord.cron import parse_job_from_settings, Cron checks = [ { "name": "foo", "command": "python foobar.py", "arguments": {"hello": "world"}, "expected": "python foobar.py --hello world", }, { "name": "foo", "command": "python foobar.py",...
31.288889
69
0.589489
import pytest from skedulord.cron import parse_job_from_settings, Cron checks = [ { "name": "foo", "command": "python foobar.py", "arguments": {"hello": "world"}, "expected": "python foobar.py --hello world", }, { "name": "foo", "command": "python foobar.py",...
0
0
0
f4a5bfd3e7304c0be1b2b645ff0a8eae130a1af0
1,354
py
Python
src/example_lambda_switch_GYQ.py
ShuhuaGao/bcn_ss
7f0a46e1ed94e6c4d9df114e8d241b61dc551d85
[ "MIT" ]
null
null
null
src/example_lambda_switch_GYQ.py
ShuhuaGao/bcn_ss
7f0a46e1ed94e6c4d9df114e8d241b61dc551d85
[ "MIT" ]
null
null
null
src/example_lambda_switch_GYQ.py
ShuhuaGao/bcn_ss
7f0a46e1ed94e6c4d9df114e8d241b61dc551d85
[ "MIT" ]
null
null
null
""" The BCN example for the $\lambda$ switch genetic network. Solved using the algebraic method developed by Yuqian Guo etc. Guo, Yuqian, Pan Wang, Weihua Gui, and Chunhua Yang. "Set stability and set stabilization of Boolean control networks based on invariant subsets." Automatica 61 (2015): 106-112. Please refer to...
45.133333
130
0.733383
""" The BCN example for the $\lambda$ switch genetic network. Solved using the algebraic method developed by Yuqian Guo etc. Guo, Yuqian, Pan Wang, Weihua Gui, and Chunhua Yang. "Set stability and set stabilization of Boolean control networks based on invariant subsets." Automatica 61 (2015): 106-112. Please refer to...
0
0
0
8a7b49d233c311a1f29d4384c84df96155c78959
1,594
py
Python
compiler/drc/drc_lut.py
bsg-external/OpenRAM
3c5e13f95c925a204cabf052525c3de07638168f
[ "BSD-3-Clause" ]
2
2019-12-30T11:41:21.000Z
2020-02-15T00:15:32.000Z
compiler/drc/drc_lut.py
bsg-external/OpenRAM
3c5e13f95c925a204cabf052525c3de07638168f
[ "BSD-3-Clause" ]
null
null
null
compiler/drc/drc_lut.py
bsg-external/OpenRAM
3c5e13f95c925a204cabf052525c3de07638168f
[ "BSD-3-Clause" ]
null
null
null
# See LICENSE for licensing information. # # Copyright (c) 2016-2019 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # import debug class drc_lut(): """ Impl...
31.254902
81
0.611669
# See LICENSE for licensing information. # # Copyright (c) 2016-2019 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # import debug class drc_lut(): """ Impl...
32
0
26
887641a2bebb998c21c8e920bef147a42f4da788
3,779
py
Python
traits_futures/testing/test_assistant.py
enthought/traits-futures
4b20376d95e83a76d77ce10e024ec4527c27d5d0
[ "BSD-3-Clause" ]
10
2019-02-08T15:52:18.000Z
2021-12-14T03:13:41.000Z
traits_futures/testing/test_assistant.py
enthought/traits-futures
4b20376d95e83a76d77ce10e024ec4527c27d5d0
[ "BSD-3-Clause" ]
244
2019-02-05T17:18:15.000Z
2022-03-12T10:55:20.000Z
traits_futures/testing/test_assistant.py
enthought/traits-futures
4b20376d95e83a76d77ce10e024ec4527c27d5d0
[ "BSD-3-Clause" ]
1
2021-07-06T07:18:21.000Z
2021-07-06T07:18:21.000Z
# (C) Copyright 2018-2021 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
35.317757
78
0.686954
# (C) Copyright 2018-2021 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
252
0
54
e81a600a39c87d345b0ba2782aa9a4cb4211ccf5
132
py
Python
research/utils.py
nazariinyzhnyk/2048RL
ef9e02329daab31e187a0c6757a6c4c5ace6848e
[ "MIT" ]
null
null
null
research/utils.py
nazariinyzhnyk/2048RL
ef9e02329daab31e187a0c6757a6c4c5ace6848e
[ "MIT" ]
null
null
null
research/utils.py
nazariinyzhnyk/2048RL
ef9e02329daab31e187a0c6757a6c4c5ace6848e
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt
16.5
40
0.689394
import matplotlib.pyplot as plt def plot_scores(scores, title='scores'): plt.plot(scores) plt.title(title) plt.show()
76
0
23
7c0f286a698be8772e172df54c301fbd5008684f
53,604
py
Python
src/dsloader/graphrnn_data.py
willshiao/brgan
99d1627176a59811bf9032ef1f99d6e7261095fb
[ "MIT" ]
1
2021-10-03T15:58:48.000Z
2021-10-03T15:58:48.000Z
src/dsloader/graphrnn_data.py
willshiao/brgan
99d1627176a59811bf9032ef1f99d6e7261095fb
[ "MIT" ]
null
null
null
src/dsloader/graphrnn_data.py
willshiao/brgan
99d1627176a59811bf9032ef1f99d6e7261095fb
[ "MIT" ]
null
null
null
# From https://github.com/snap-stanford/GraphRNN/blob/1ef475d957414d7c0bf8c778a1d44cb52dd7829b/data.py import torch import torchvision as tv import torch.nn as nn from torch.autograd import Variable import matplotlib.pyplot as plt from random import shuffle import networkx as nx import pickle as pkl import scipy.spar...
38.956395
148
0.611876
# From https://github.com/snap-stanford/GraphRNN/blob/1ef475d957414d7c0bf8c778a1d44cb52dd7829b/data.py import torch import torchvision as tv import torch.nn as nn from torch.autograd import Variable import matplotlib.pyplot as plt from random import shuffle import networkx as nx import pickle as pkl import scipy.spar...
38,981
264
1,235
ec4fbfea814638e5d2902ef844b6584d645ad00b
2,615
py
Python
argo_workflow_tools/dsl/condition.py
DiagnosticRobotics/argo-workflow-tools
8e14948bd9087bfad970cb90da08bdb8726fbe1b
[ "Apache-2.0" ]
15
2021-12-08T20:57:52.000Z
2022-03-23T19:41:29.000Z
argo_workflow_tools/dsl/condition.py
DiagnosticRobotics/argo-workflow-tools
8e14948bd9087bfad970cb90da08bdb8726fbe1b
[ "Apache-2.0" ]
18
2021-12-07T07:49:17.000Z
2022-03-02T10:27:49.000Z
argo_workflow_tools/dsl/condition.py
DiagnosticRobotics/argo-workflow-tools
8e14948bd9087bfad970cb90da08bdb8726fbe1b
[ "Apache-2.0" ]
3
2022-01-09T08:19:11.000Z
2022-02-09T15:20:08.000Z
import contextlib import json from dataclasses import dataclass from argo_workflow_tools.dsl import building_mode_context as context from argo_workflow_tools.dsl.input_definition import InputDefinition from argo_workflow_tools.dsl.workflow_template_collector import ( push_condition, pop_condition, ) @datacla...
24.439252
80
0.603442
import contextlib import json from dataclasses import dataclass from argo_workflow_tools.dsl import building_mode_context as context from argo_workflow_tools.dsl.input_definition import InputDefinition from argo_workflow_tools.dsl.workflow_template_collector import ( push_condition, pop_condition, ) def extra...
1,646
542
90
aaaaed43af8bc3be6a42b68a13f8d1b6417e9d1b
7,581
py
Python
bob/db/iris/example/backprop.py
bioidiap/bob.db.iris
beadb65ec2d978ea1c7fd300ff107646f3137c4e
[ "BSD-3-Clause" ]
null
null
null
bob/db/iris/example/backprop.py
bioidiap/bob.db.iris
beadb65ec2d978ea1c7fd300ff107646f3137c4e
[ "BSD-3-Clause" ]
1
2016-07-29T13:33:22.000Z
2016-07-29T14:53:35.000Z
bob/db/iris/example/backprop.py
bioidiap/bob.db.iris
beadb65ec2d978ea1c7fd300ff107646f3137c4e
[ "BSD-3-Clause" ]
2
2016-03-08T11:17:50.000Z
2018-05-17T14:46:39.000Z
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Andre Anjos <andre.anjos@idiap.ch> # Tue Jul 19 11:50:08 2011 +0200 # # Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland """This example shows how to use the Iris Flower (Fisher's) Dataset to create 3-class classifier based on Neural Networ...
31.197531
106
0.673262
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Andre Anjos <andre.anjos@idiap.ch> # Tue Jul 19 11:50:08 2011 +0200 # # Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland """This example shows how to use the Iris Flower (Fisher's) Dataset to create 3-class classifier based on Neural Networ...
980
0
23
7d30be9bcf9233d87b2105366e0d928691d092d6
2,831
py
Python
dron_services/servicio_videos.py
ppsirg/arqbot
ee0a5f0517fc3676d8073c1b1d88268aac88cc94
[ "MIT" ]
null
null
null
dron_services/servicio_videos.py
ppsirg/arqbot
ee0a5f0517fc3676d8073c1b1d88268aac88cc94
[ "MIT" ]
4
2021-03-10T13:15:34.000Z
2022-02-27T02:22:05.000Z
dron_services/servicio_videos.py
ppsirg/arqbot
ee0a5f0517fc3676d8073c1b1d88268aac88cc94
[ "MIT" ]
1
2020-04-02T16:24:34.000Z
2020-04-02T16:24:34.000Z
""" Servicio videos. """ from tornado.web import RequestHandler from tornado.gen import sleep from tornado.ioloop import IOLoop from tornado.httpclient import AsyncHTTPClient, HTTPRequest from time import time import os from subprocess import call rootFolder = os.path.dirname(os.path.abspath(os.path.dirname(__file__)...
33.702381
89
0.614977
""" Servicio videos. """ from tornado.web import RequestHandler from tornado.gen import sleep from tornado.ioloop import IOLoop from tornado.httpclient import AsyncHTTPClient, HTTPRequest from time import time import os from subprocess import call rootFolder = os.path.dirname(os.path.abspath(os.path.dirname(__file__)...
217
0
27
c43ee33f35fefa6284437e2cea1456c51977314a
5,543
py
Python
scripts/tebreak/tebreak_post.py
TalRichter/mcclintock
93369eff1c192132d8b27830310d149e53a2b608
[ "Unlicense" ]
62
2015-01-18T15:30:48.000Z
2022-03-06T08:23:40.000Z
scripts/tebreak/tebreak_post.py
TalRichter/mcclintock
93369eff1c192132d8b27830310d149e53a2b608
[ "Unlicense" ]
49
2015-01-20T12:57:45.000Z
2022-03-22T15:05:46.000Z
scripts/tebreak/tebreak_post.py
TalRichter/mcclintock
93369eff1c192132d8b27830310d149e53a2b608
[ "Unlicense" ]
28
2015-01-21T21:14:46.000Z
2022-02-20T21:43:31.000Z
import os import sys import subprocess import importlib.util as il spec = il.spec_from_file_location("config", snakemake.params.config) config = il.module_from_spec(spec) sys.modules[spec.name] = config spec.loader.exec_module(config) sys.path.append(snakemake.config['args']['mcc_path']) import scripts.mccutils as mccu...
54.343137
125
0.655962
import os import sys import subprocess import importlib.util as il spec = il.spec_from_file_location("config", snakemake.params.config) config = il.module_from_spec(spec) sys.modules[spec.name] = config spec.loader.exec_module(config) sys.path.append(snakemake.config['args']['mcc_path']) import scripts.mccutils as mccu...
5,083
0
46
53b59309701b2e3c3cf1f30105681dee5303295e
35
py
Python
homeassistant/components/clicksend_tts/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/clicksend_tts/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/clicksend_tts/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""The clicksend_tts component."""
17.5
34
0.714286
"""The clicksend_tts component."""
0
0
0
3c97dfea60504a48b67c6df474b86cb87dcbf717
5,175
py
Python
registry/views.py
gutma-org/droneregistry
4be915d8cd3b8217564e9b3bf18c4a24c2d42208
[ "Apache-2.0" ]
4
2018-09-30T06:46:25.000Z
2019-10-17T03:17:32.000Z
registry/views.py
gutma-org/droneregistry
4be915d8cd3b8217564e9b3bf18c4a24c2d42208
[ "Apache-2.0" ]
4
2019-04-29T14:25:40.000Z
2020-01-31T08:52:52.000Z
registry/views.py
gutma-org/droneregistry
4be915d8cd3b8217564e9b3bf18c4a24c2d42208
[ "Apache-2.0" ]
2
2019-07-08T12:39:47.000Z
2020-12-13T10:13:05.000Z
import datetime import json from datetime import datetime from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render from django.template import loader from django.utils import translation from django.views.generic import Templat...
27.673797
107
0.724444
import datetime import json from datetime import datetime from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render from django.template import loader from django.utils import translation from django.views.generic import Templat...
1,064
308
357
daad79d386573062cf106741bc31d87803aa2aa7
1,269
py
Python
extras/migrations/0001_initial.py
ayushganguli1769/DevelopmentRobotix
1692c104a6f220aa1238840b791aa857a6cc7765
[ "Apache-2.0" ]
null
null
null
extras/migrations/0001_initial.py
ayushganguli1769/DevelopmentRobotix
1692c104a6f220aa1238840b791aa857a6cc7765
[ "Apache-2.0" ]
7
2020-02-12T02:54:35.000Z
2022-03-12T00:06:26.000Z
extras/migrations/0001_initial.py
ayushganguli1769/DevelopmentRobotix
1692c104a6f220aa1238840b791aa857a6cc7765
[ "Apache-2.0" ]
6
2020-02-10T16:37:38.000Z
2021-01-28T13:39:46.000Z
# Generated by Django 2.1.7 on 2019-11-23 10:11 from django.db import migrations, models
34.297297
114
0.541371
# Generated by Django 2.1.7 on 2019-11-23 10:11 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='DIY', fields=[ ('id', models.AutoField(auto...
0
1,155
23
42f49270e5c8c76ba8f0b3d3bec8fee6c4419a61
4,707
py
Python
csv_to_html_with_template.py
ma0c/csv_to_html
7685a384b35b7d12d80ca99e2c118fd7172a03a3
[ "MIT" ]
null
null
null
csv_to_html_with_template.py
ma0c/csv_to_html
7685a384b35b7d12d80ca99e2c118fd7172a03a3
[ "MIT" ]
null
null
null
csv_to_html_with_template.py
ma0c/csv_to_html
7685a384b35b7d12d80ca99e2c118fd7172a03a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python import argparse import csv import itertools import logging import os import tkinter as tk from tkinter import filedialog from tkinter import messagebox LOGGER = logging.getLogger(__name__) LOGGER.addHandler(logging.StreamHandler()) if __name__ == '__main__': parser = argparse.ArgumentP...
35.931298
125
0.650096
#!/usr/bin/env python import argparse import csv import itertools import logging import os import tkinter as tk from tkinter import filedialog from tkinter import messagebox LOGGER = logging.getLogger(__name__) LOGGER.addHandler(logging.StreamHandler()) def generate_html(input_file_path, template_file_path, output...
3,307
162
69
c0633a02cf59be1d64dde1cbe349bd83ad3c872f
514
py
Python
HackerEarth/Hashing/N_Coordinates_Pair.py
GSri30/Competetive_programming
0dc1681500a80b6f0979d0dc9f749357ee07bcb8
[ "MIT" ]
22
2020-01-03T17:32:00.000Z
2021-11-07T09:31:44.000Z
HackerEarth/Hashing/N_Coordinates_Pair.py
GSri30/Competetive_programming
0dc1681500a80b6f0979d0dc9f749357ee07bcb8
[ "MIT" ]
10
2020-09-30T09:41:18.000Z
2020-10-11T11:25:09.000Z
HackerEarth/Hashing/N_Coordinates_Pair.py
GSri30/Competetive_programming
0dc1681500a80b6f0979d0dc9f749357ee07bcb8
[ "MIT" ]
25
2019-10-14T19:25:01.000Z
2021-05-26T08:12:20.000Z
# Write your code here import math import numpy as np import itertools if __name__ == "__main__": n = int(input()) l = [] while n > 0 : x,y = map(int,input().split()) l.append((x,y)) n -= 1 dict = {} for i in l : if i in dict : dict[i] += 1 else...
19.037037
39
0.449416
# Write your code here import math import numpy as np import itertools if __name__ == "__main__": n = int(input()) l = [] while n > 0 : x,y = map(int,input().split()) l.append((x,y)) n -= 1 dict = {} for i in l : if i in dict : dict[i] += 1 else...
0
0
0
3b1ea9bc06a958721fe96a8b69eddcb82bf30765
1,157
py
Python
scripts/eeutils/verilog_to_latex.py
shulinye/dotfiles
a342512c33ca102d03921cc653ee4605d0cf9617
[ "MIT" ]
2
2015-01-16T22:07:10.000Z
2015-11-09T06:45:44.000Z
scripts/eeutils/verilog_to_latex.py
shulinye/dotfiles
a342512c33ca102d03921cc653ee4605d0cf9617
[ "MIT" ]
4
2015-07-08T19:13:47.000Z
2015-08-31T16:04:36.000Z
scripts/eeutils/verilog_to_latex.py
shulinye/dotfiles
a342512c33ca102d03921cc653ee4605d0cf9617
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from os import path sys.path.append(path.dirname(path.dirname(path.realpath(__file__)))) from pythonutils import gen_diffs if __name__ == '__main__': import argparse
28.219512
68
0.550562
#!/usr/bin/env python3 import sys from os import path sys.path.append(path.dirname(path.dirname(path.realpath(__file__)))) from pythonutils import gen_diffs def verilog_to_latex_timetable(filename, scale=None): mapping = {'x':'U','1':'H','0':'L'} lines = open(filename).readlines() f = list(zip(*[i.strip...
903
0
46
59c444b0b651be09f3bcc3ed39fcb210bedd8138
1,576
py
Python
native/jni/external/selinux/python/sepolicy/sepolicy/booleans.py
Joyoe/Magisk-nosbin_magisk-nohide
449441921740bf85926c14f41b3532822ca0eb65
[ "MIT" ]
2
2022-01-16T00:59:54.000Z
2022-02-09T12:00:48.000Z
native/jni/external/selinux/python/sepolicy/sepolicy/booleans.py
Joyoe/Magisk-nosbin_magisk-nohide
449441921740bf85926c14f41b3532822ca0eb65
[ "MIT" ]
null
null
null
native/jni/external/selinux/python/sepolicy/sepolicy/booleans.py
Joyoe/Magisk-nosbin_magisk-nohide
449441921740bf85926c14f41b3532822ca0eb65
[ "MIT" ]
2
2022-02-09T12:00:39.000Z
2022-02-21T18:34:46.000Z
# Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information # # setrans is a tool for analyzing process transitions in SELinux policy # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free...
38.439024
116
0.689721
# Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information # # setrans is a tool for analyzing process transitions in SELinux policy # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free...
576
0
46
b9141e751450f23c9cef1e13fa6a61eea3ac54cd
787
py
Python
data/build_dict.py
valentindey/parallel-nmt
7f4ea8cc343bc287a41c7137234c5b8c50e8cc29
[ "MIT" ]
1
2017-05-03T22:41:00.000Z
2017-05-03T22:41:00.000Z
data/build_dict.py
valentindey/parallel-nmt
7f4ea8cc343bc287a41c7137234c5b8c50e8cc29
[ "MIT" ]
null
null
null
data/build_dict.py
valentindey/parallel-nmt
7f4ea8cc343bc287a41c7137234c5b8c50e8cc29
[ "MIT" ]
null
null
null
#! /usr/bin/env python # generates a dictionary in json format, with the import json from collections import Counter import click @click.command() @click.argument("input-file", type=click.Path(exists=True, dir_okay=False)) @click.argument("output-file", type=click.Path(exists=False, dir_okay=False)) @click.option(...
24.59375
77
0.673443
#! /usr/bin/env python # generates a dictionary in json format, with the import json from collections import Counter import click @click.command() @click.argument("input-file", type=click.Path(exists=True, dir_okay=False)) @click.argument("output-file", type=click.Path(exists=False, dir_okay=False)) @click.option(...
356
0
22
a207f491314f5358ca796d65f48b7de02bd8ef96
5,211
py
Python
vm_network_migration/handlers/backend_service_migration/global_backend_service_migration.py
googleinterns/vm-network-migration
1132e44d696ab9da4d1079ebc3d32ed4382cdc28
[ "Apache-2.0" ]
1
2020-05-27T00:30:47.000Z
2020-05-27T00:30:47.000Z
vm_network_migration/handlers/backend_service_migration/global_backend_service_migration.py
yueMaHello/vm-network-migration
4a6bdbb2952fb8ee8022b5c0452159329a79e953
[ "Apache-2.0" ]
1
2020-06-03T15:51:20.000Z
2020-06-03T15:51:20.000Z
vm_network_migration/handlers/backend_service_migration/global_backend_service_migration.py
yueMaHello/vm-network-migration
4a6bdbb2952fb8ee8022b5c0452159329a79e953
[ "Apache-2.0" ]
3
2020-06-03T15:17:00.000Z
2020-06-20T08:39:50.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
44.161017
106
0.631741
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
4,108
23
bb55e369cdbe339f05b27a95ade41b35b65ca73c
4,186
py
Python
dev0s/classes/requests/__init__.py
vandenberghinc/dev0s
1c9629e2a81ad111fd3e74929aaeb05c97be0276
[ "MIT" ]
1
2021-03-09T20:14:29.000Z
2021-03-09T20:14:29.000Z
dev0s/classes/requests/__init__.py
vandenberghinc/dev0s
1c9629e2a81ad111fd3e74929aaeb05c97be0276
[ "MIT" ]
null
null
null
dev0s/classes/requests/__init__.py
vandenberghinc/dev0s
1c9629e2a81ad111fd3e74929aaeb05c97be0276
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # imports. from dev0s.classes.response import * from dev0s.classes.defaults import objects from dev0s.classes.response import response as _response_ # pip imports. from bs4 import BeautifulSoup as bs4 import urllib import requests as __requests__ # the requests class. ...
27.721854
172
0.671763
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # imports. from dev0s.classes.response import * from dev0s.classes.defaults import objects from dev0s.classes.response import response as _response_ # pip imports. from bs4 import BeautifulSoup as bs4 import urllib import requests as __requests__ # the requests class. c...
3,473
323
22
676efc672a854428d7b8e4db3710def76c588c68
3,739
py
Python
accelerators/extract_transform_load/test/save_events.py
antara678/aws-iot-greengrass-accelerators
f3a747fa15013a488313bfc2fc463e9fa75c7b07
[ "MIT-0" ]
47
2019-09-13T09:22:44.000Z
2022-03-04T12:19:03.000Z
accelerators/extract_transform_load/test/save_events.py
antara678/aws-iot-greengrass-accelerators
f3a747fa15013a488313bfc2fc463e9fa75c7b07
[ "MIT-0" ]
5
2020-04-13T02:43:47.000Z
2021-11-16T19:44:22.000Z
accelerators/extract_transform_load/test/save_events.py
antara678/aws-iot-greengrass-accelerators
f3a747fa15013a488313bfc2fc463e9fa75c7b07
[ "MIT-0" ]
27
2019-09-13T18:19:42.000Z
2022-02-21T21:13:32.000Z
#!/usr/bin/env python """Extracts messages from CAN Bus interface and save to file""" import os import time import threading import queue import zipfile import can from can import Message # List of OBD-II parameter Ids to query PIDS = { "vehicle_speed": Message( arbitration_id=0x7DF, extended_id=...
28.761538
96
0.635197
#!/usr/bin/env python """Extracts messages from CAN Bus interface and save to file""" import os import time import threading import queue import zipfile import can from can import Message # List of OBD-II parameter Ids to query PIDS = { "vehicle_speed": Message( arbitration_id=0x7DF, extended_id=...
0
0
0
5d89f77812ea91179a7117b011b27c5dde6bd79d
248
py
Python
site-packages/psycopg2cffi/_impl/libpq.py
cdepman/falcon_api
42d2ec646a8af5c4bd62460af5a227c805d0a825
[ "MIT" ]
null
null
null
site-packages/psycopg2cffi/_impl/libpq.py
cdepman/falcon_api
42d2ec646a8af5c4bd62460af5a227c805d0a825
[ "MIT" ]
null
null
null
site-packages/psycopg2cffi/_impl/libpq.py
cdepman/falcon_api
42d2ec646a8af5c4bd62460af5a227c805d0a825
[ "MIT" ]
null
null
null
try: from psycopg2cffi._impl._libpq import ffi, lib as libpq except ImportError: from psycopg2cffi._impl._build_libpq import ffi, C_SOURCE, C_SOURCE_KWARGS libpq = ffi.verify(C_SOURCE, **C_SOURCE_KWARGS) PG_VERSION = libpq._PG_VERSION
31
78
0.782258
try: from psycopg2cffi._impl._libpq import ffi, lib as libpq except ImportError: from psycopg2cffi._impl._build_libpq import ffi, C_SOURCE, C_SOURCE_KWARGS libpq = ffi.verify(C_SOURCE, **C_SOURCE_KWARGS) PG_VERSION = libpq._PG_VERSION
0
0
0
e013b2c21bd1fa2c8cd24a2ef53e15d8e7fb3cb8
4,420
py
Python
yuuhpizzakebab/pizza/models.py
lex/yuuh-pizza-kebab
532d931e89e67b94ce77a62e862fa3aca796401e
[ "BSD-2-Clause" ]
null
null
null
yuuhpizzakebab/pizza/models.py
lex/yuuh-pizza-kebab
532d931e89e67b94ce77a62e862fa3aca796401e
[ "BSD-2-Clause" ]
1
2016-09-26T13:50:26.000Z
2016-10-01T22:20:27.000Z
yuuhpizzakebab/pizza/models.py
lex/yuuh-pizza-kebab
532d931e89e67b94ce77a62e862fa3aca796401e
[ "BSD-2-Clause" ]
null
null
null
import re from sqlalchemy import text from yuuhpizzakebab import db from yuuhpizzakebab.topping.models import Topping class Pizza(): """The pizza class. variables: id - id of the pizza name - name of the pizza price - price of the pizza in USD image_url - image of the pizza topp...
24.971751
111
0.578959
import re from sqlalchemy import text from yuuhpizzakebab import db from yuuhpizzakebab.topping.models import Topping def get_pizzas(): result = db.engine.execute('select * from Pizza') pizzas = [] for r in result: pizza_id = int(r[0]) toppings = get_toppings_for_pizza(pizza_id) ...
3,510
0
478
453b6183a8fbcb8770aff91114a3446fef2f84ea
1,061
py
Python
bottery/patterns.py
rennerocha/bottery
a082cfa1c21f9aa32ea1526ea3004b581f9e0cd4
[ "MIT" ]
null
null
null
bottery/patterns.py
rennerocha/bottery
a082cfa1c21f9aa32ea1526ea3004b581f9e0cd4
[ "MIT" ]
null
null
null
bottery/patterns.py
rennerocha/bottery
a082cfa1c21f9aa32ea1526ea3004b581f9e0cd4
[ "MIT" ]
null
null
null
from .handlers import (DefaultHandler, MessageHandler, RegexHandler, StartswithHandler)
27.205128
75
0.622055
from .handlers import (DefaultHandler, MessageHandler, RegexHandler, StartswithHandler) class Patterns: def __init__(self): self.registered = [] def register(self, handler, view, pattern=None, *args, **kwargs): self.registered.append((handler(pattern, *args, **kwargs), ...
771
-6
184
dc4670578de7ec629c7aeff2917612d2a77e5d4a
23,694
py
Python
usaspending_api/bulk_download/tests/test_download.py
bminahankcfrb/usaspending-api
1fb5c4c261edf91ab2930aea7928ca24dfa49123
[ "CC0-1.0" ]
null
null
null
usaspending_api/bulk_download/tests/test_download.py
bminahankcfrb/usaspending-api
1fb5c4c261edf91ab2930aea7928ca24dfa49123
[ "CC0-1.0" ]
null
null
null
usaspending_api/bulk_download/tests/test_download.py
bminahankcfrb/usaspending-api
1fb5c4c261edf91ab2930aea7928ca24dfa49123
[ "CC0-1.0" ]
null
null
null
import json import pytest from model_mommy import mommy from rest_framework import status from unittest.mock import Mock from usaspending_api.awards.models import ( TransactionNormalized, TransactionFABS, TransactionFPDS, Subaward, BrokerSubaward, ) from usaspending_api.awards.v2.lookups.lookups i...
33.046025
120
0.644805
import json import pytest from model_mommy import mommy from rest_framework import status from unittest.mock import Mock from usaspending_api.awards.models import ( TransactionNormalized, TransactionFABS, TransactionFPDS, Subaward, BrokerSubaward, ) from usaspending_api.awards.v2.lookups.lookups i...
20,208
0
183
de039b35d092eaddc2b6f0193a2d900be0fc584b
7,645
py
Python
art_generation/model.py
IDmy/deep-learning-models
ab8777258aa2023f203b9292355949ba8965c198
[ "MIT" ]
1
2018-05-06T18:50:09.000Z
2018-05-06T18:50:09.000Z
art_generation/model.py
IDmy/deep-learning-models
ab8777258aa2023f203b9292355949ba8965c198
[ "MIT" ]
null
null
null
art_generation/model.py
IDmy/deep-learning-models
ab8777258aa2023f203b9292355949ba8965c198
[ "MIT" ]
null
null
null
import os import sys import scipy.io import scipy.misc import matplotlib.pyplot as plt from matplotlib.pyplot import imshow from PIL import Image from utils import * import numpy as np import tensorflow as tf def content_cost(a_C, a_G): """ Computes the content cost Arguments: a_C -- tensor of di...
31.204082
124
0.678613
import os import sys import scipy.io import scipy.misc import matplotlib.pyplot as plt from matplotlib.pyplot import imshow from PIL import Image from utils import * import numpy as np import tensorflow as tf def content_cost(a_C, a_G): """ Computes the content cost Arguments: a_C -- tensor of di...
1,197
0
23
69fb7e42e2d590adba3677bed7a63c7c09bcbca3
2,032
py
Python
mentorbot/MenteeRequests/migrations/0002_auto_20180721_1600.py
MentorBot/Webhook
696ce15f41d1c15a6cae336c41f3e56e4a3e5056
[ "Unlicense" ]
2
2018-06-04T10:46:09.000Z
2020-06-02T14:48:44.000Z
mentorbot/MenteeRequests/migrations/0002_auto_20180721_1600.py
MentorBot/Webhook
696ce15f41d1c15a6cae336c41f3e56e4a3e5056
[ "Unlicense" ]
4
2018-07-18T13:16:50.000Z
2021-09-07T23:41:25.000Z
mentorbot/MenteeRequests/migrations/0002_auto_20180721_1600.py
MentorBot/Webhook
696ce15f41d1c15a6cae336c41f3e56e4a3e5056
[ "Unlicense" ]
null
null
null
# Generated by Django 2.0.2 on 2018-07-21 16:00 from django.db import migrations, models import django.db.models.deletion
36.285714
151
0.59498
# Generated by Django 2.0.2 on 2018-07-21 16:00 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('MentorDetails', '0003_auto_20180721_1600'), ('MenteeRequests', '0001_initial'), ] operations = [ mi...
0
1,885
23
82dac7b29f41675e49947a6befb26517c5d70064
1,352
py
Python
Python/logest_vowel_chain.py
shloch/CODING_PRACTICE
c79ed3c2b576d133fd7a446b0fd954362cf54b22
[ "MIT" ]
null
null
null
Python/logest_vowel_chain.py
shloch/CODING_PRACTICE
c79ed3c2b576d133fd7a446b0fd954362cf54b22
[ "MIT" ]
null
null
null
Python/logest_vowel_chain.py
shloch/CODING_PRACTICE
c79ed3c2b576d133fd7a446b0fd954362cf54b22
[ "MIT" ]
1
2022-03-12T06:43:31.000Z
2022-03-12T06:43:31.000Z
# The vowel substrings in the word codewarriors are o,e,a,io. # The longest of these has a length of 2. Given a lowercase string that has # alphabetic characters only (both vowels and consonants) and no spaces, # return the length of the longest vowel substring. Vowels are any of aeiou. # Good luck! # If you lik...
32.190476
82
0.657544
# The vowel substrings in the word codewarriors are o,e,a,io. # The longest of these has a length of 2. Given a lowercase string that has # alphabetic characters only (both vowels and consonants) and no spaces, # return the length of the longest vowel substring. Vowels are any of aeiou. # Good luck! # If you lik...
472
0
23
b9311dc9b6d2c8e5ef3d1eeaad37476bb0b3a3a9
18,356
py
Python
numpy/linalg/_umath_linalg.py
Squarecap/numpy
1172b039950db72ae8452e9f65b5fd7cac977a23
[ "BSD-3-Clause" ]
195
2016-01-14T16:03:02.000Z
2021-12-29T09:15:02.000Z
numpy/linalg/_umath_linalg.py
Squarecap/numpy
1172b039950db72ae8452e9f65b5fd7cac977a23
[ "BSD-3-Clause" ]
75
2016-01-14T16:03:02.000Z
2020-04-29T22:51:53.000Z
numpy/linalg/_umath_linalg.py
Squarecap/numpy
1172b039950db72ae8452e9f65b5fd7cac977a23
[ "BSD-3-Clause" ]
11
2016-01-15T17:30:16.000Z
2020-07-30T03:58:42.000Z
# calls the functions from linalg/umath_linalg.c.src via cffi rather than cpyext # As opposed to the numpy version, this version leaves broadcasting to the responsibility # of the pypy extended frompyfunc, so the _umath_linag_capi functions are always called # with the final arguments, no broadcasting needed. import os...
44.338164
99
0.492537
# calls the functions from linalg/umath_linalg.c.src via cffi rather than cpyext # As opposed to the numpy version, this version leaves broadcasting to the responsibility # of the pypy extended frompyfunc, so the _umath_linag_capi functions are always called # with the final arguments, no broadcasting needed. import os...
4,298
8
274
2f15d94bb5952d1b83877da4038f29d1e7be7afa
593
py
Python
abc/abc058/c/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
2
2022-01-22T07:56:58.000Z
2022-01-24T00:29:37.000Z
abc/abc058/c/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
abc/abc058/c/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
import sys import math from collections import defaultdict, deque sys.setrecursionlimit(10 ** 6) stdin = sys.stdin INF = float('inf') ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() N = ni() S = [ns() for _ in range(N)] dd = [] for i in range(N): ...
16.472222
53
0.56661
import sys import math from collections import defaultdict, deque sys.setrecursionlimit(10 ** 6) stdin = sys.stdin INF = float('inf') ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() N = ni() S = [ns() for _ in range(N)] dd = [] for i in range(N): ...
0
0
0
ab697d8f0b6ccf9123ec9e737805074a4777f282
126
py
Python
mmskeleton/ops/st_gcn/__init__.py
niujunyu/mmskeleton
0936b610f0c44e87f6886d34a9f43eda872ed6d8
[ "Apache-2.0" ]
null
null
null
mmskeleton/ops/st_gcn/__init__.py
niujunyu/mmskeleton
0936b610f0c44e87f6886d34a9f43eda872ed6d8
[ "Apache-2.0" ]
null
null
null
mmskeleton/ops/st_gcn/__init__.py
niujunyu/mmskeleton
0936b610f0c44e87f6886d34a9f43eda872ed6d8
[ "Apache-2.0" ]
null
null
null
from .gconv_origin import ConvTemporalGraphical,ConvTemporalGraphicalBatchA,ConvTemporalGraphicalTwoA from .graph import Graph
63
101
0.912698
from .gconv_origin import ConvTemporalGraphical,ConvTemporalGraphicalBatchA,ConvTemporalGraphicalTwoA from .graph import Graph
0
0
0
69a4e9305db3f2a172ab65772db16db9a9c33a41
258
py
Python
albumentations/augmentations/utils.py
code-kage/albumentations
f2462be3a4d01c872474d0e7fc0f32f387b06340
[ "MIT" ]
6,316
2019-11-18T14:19:17.000Z
2022-03-31T22:25:23.000Z
albumentations/augmentations/utils.py
code-kage/albumentations
f2462be3a4d01c872474d0e7fc0f32f387b06340
[ "MIT" ]
558
2019-11-19T00:36:01.000Z
2022-03-30T22:04:15.000Z
albumentations/augmentations/utils.py
code-kage/albumentations
f2462be3a4d01c872474d0e7fc0f32f387b06340
[ "MIT" ]
889
2019-11-18T16:49:44.000Z
2022-03-28T11:00:14.000Z
import cv2 __all__ = ["read_bgr_image", "read_rgb_image"]
19.846154
49
0.74031
import cv2 __all__ = ["read_bgr_image", "read_rgb_image"] def read_bgr_image(path): return cv2.imread(path, cv2.IMREAD_COLOR) def read_rgb_image(path): image = cv2.imread(path, cv2.IMREAD_COLOR) return cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
151
0
46
8f5a8a3f7052b73c3cb7df220d26698296bb1278
6,932
py
Python
tests/test_extractor_api_lmpd.py
isabella232/comport
117123862415261095a917ed7f2037c1f986b474
[ "BSD-3-Clause" ]
35
2015-11-14T18:32:45.000Z
2022-01-23T15:15:05.000Z
tests/test_extractor_api_lmpd.py
codeforamerica/comport
117123862415261095a917ed7f2037c1f986b474
[ "BSD-3-Clause" ]
119
2015-11-20T22:45:34.000Z
2022-02-10T23:02:36.000Z
tests/test_extractor_api_lmpd.py
isabella232/comport
117123862415261095a917ed7f2037c1f986b474
[ "BSD-3-Clause" ]
19
2015-11-20T20:41:52.000Z
2022-01-26T04:12:34.000Z
# -*- coding: utf-8 -*- import pytest from comport.department.models import Department, Extractor from comport.data.models import IncidentsUpdated, UseOfForceIncidentLMPD from testclient.JSON_test_client import JSONTestClient @pytest.mark.usefixtures('db')
46.837838
109
0.680323
# -*- coding: utf-8 -*- import pytest from comport.department.models import Department, Extractor from comport.data.models import IncidentsUpdated, UseOfForceIncidentLMPD from testclient.JSON_test_client import JSONTestClient @pytest.mark.usefixtures('db') class TestExtractorLMPD: def test_post_uof_data(self, tes...
0
6,652
22
de9d8f2f327853de202704385252c5a5a91032c0
1,378
py
Python
via_cms/view/private/user/dashboard_user.py
jeanjacquesp/via-cms
12b212f8005e3d667c23ffc4da831e4d3e653999
[ "MIT" ]
null
null
null
via_cms/view/private/user/dashboard_user.py
jeanjacquesp/via-cms
12b212f8005e3d667c23ffc4da831e4d3e653999
[ "MIT" ]
null
null
null
via_cms/view/private/user/dashboard_user.py
jeanjacquesp/via-cms
12b212f8005e3d667c23ffc4da831e4d3e653999
[ "MIT" ]
null
null
null
"""Public section, including homepage and signup.""" # Copyright 2020 Pax Syriana Foundation. Licensed under the Apache License, Version 2.0 # # from flask import Blueprint from flask_login import login_required from via_common.multiprocess.logger_manager import LoggerManager from via_cms.util.helper import get_loc...
29.319149
104
0.687954
"""Public section, including homepage and signup.""" # Copyright 2020 Pax Syriana Foundation. Licensed under the Apache License, Version 2.0 # # from flask import Blueprint from flask_login import login_required from via_common.multiprocess.logger_manager import LoggerManager from via_cms.util.helper import get_loc...
0
0
0
2bc2126000e66ea84f8f088f8b42bff3b3f055d0
375
py
Python
lessons/or_statement.py
thepros847/python_programiing
d177f79d0d1f21df434bf3f8663ae6469fcf8357
[ "MIT" ]
null
null
null
lessons/or_statement.py
thepros847/python_programiing
d177f79d0d1f21df434bf3f8663ae6469fcf8357
[ "MIT" ]
null
null
null
lessons/or_statement.py
thepros847/python_programiing
d177f79d0d1f21df434bf3f8663ae6469fcf8357
[ "MIT" ]
null
null
null
won_bet = True big_win = True if won_bet or big_win: print("You can now stop betting!") won_bet = False big_win = True if won_bet or big_win: print("You can now stop betting!") won_bet = True big_win = False if won_bet or big_win: print("You can now stop betting!") won_bet = False big_win = False if ...
16.304348
35
0.704
won_bet = True big_win = True if won_bet or big_win: print("You can now stop betting!") won_bet = False big_win = True if won_bet or big_win: print("You can now stop betting!") won_bet = True big_win = False if won_bet or big_win: print("You can now stop betting!") won_bet = False big_win = False if ...
0
0
0
57b693e3915dac479d4cc3a37cc08f506c6b13c3
1,313
py
Python
img_classification/models.py
frgfm/torch-hawk
05338c9939323c466a2f965ee703a74292347ea6
[ "MIT" ]
1
2019-08-15T15:22:24.000Z
2019-08-15T15:22:24.000Z
img_classification/models.py
frgfm/TorchHawk
05338c9939323c466a2f965ee703a74292347ea6
[ "MIT" ]
null
null
null
img_classification/models.py
frgfm/TorchHawk
05338c9939323c466a2f965ee703a74292347ea6
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' PyTorch implementation of LeNet5 ''' import torch.nn as nn
32.825
100
0.44326
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' PyTorch implementation of LeNet5 ''' import torch.nn as nn class LeNet5(nn.Module): def __init__(self, in_channels, activation=None, pooling=None, drop_rate=0): super(LeNet5, self).__init__() if activation is None: activation = nn.R...
1,121
3
77
fbe0f72b5f6256a250f297ec4812e3182a30e59f
6,280
py
Python
pychassisctl/chassis_control.py
ouyangxx10/my-skeleton
e32e33784a1883ee4528b17617df14f3114b0f5e
[ "Apache-2.0" ]
14
2021-11-04T07:47:37.000Z
2022-03-21T10:10:30.000Z
pychassisctl/chassis_control.py
SayCV/skeleton
1146f8c6e5f955fb10f5e846de31052be942a7f2
[ "Apache-2.0" ]
79
2015-10-27T13:27:24.000Z
2020-05-21T16:10:34.000Z
pychassisctl/chassis_control.py
SayCV/skeleton
1146f8c6e5f955fb10f5e846de31052be942a7f2
[ "Apache-2.0" ]
78
2015-08-31T16:22:42.000Z
2020-07-27T15:18:53.000Z
#!/usr/bin/env python # TODO: openbmc/openbmc#2994 remove python 2 support try: # python 2 import gobject except ImportError: # python 3 from gi.repository import GObject as gobject import dbus import dbus.service import dbus.mainloop.glib from obmc.dbuslib.bindings import get_dbus, DbusProperties, DbusObjec...
33.763441
79
0.578822
#!/usr/bin/env python # TODO: openbmc/openbmc#2994 remove python 2 support try: # python 2 import gobject except ImportError: # python 3 from gi.repository import GObject as gobject import dbus import dbus.service import dbus.mainloop.glib from obmc.dbuslib.bindings import get_dbus, DbusProperties, DbusObjec...
4,235
1,114
23
236686b32ff4985770047b48b55d2526ce909c80
499
py
Python
CeV - Gustavo Guanabara/exerc017.py
us19861229c/Meu-aprendizado-Python
575c0714ac5377ff3122f4cb57952969e07ba89b
[ "Unlicense" ]
1
2021-12-11T19:53:41.000Z
2021-12-11T19:53:41.000Z
CeV - Gustavo Guanabara/exerc017.py
us19861229c/Meu-aprendizado-Python
575c0714ac5377ff3122f4cb57952969e07ba89b
[ "Unlicense" ]
null
null
null
CeV - Gustavo Guanabara/exerc017.py
us19861229c/Meu-aprendizado-Python
575c0714ac5377ff3122f4cb57952969e07ba89b
[ "Unlicense" ]
null
null
null
#Programa que leia o cateto oposto e o adjacente de um triangulo retangulo #e mostre o comprimento da hipotenusa cat_o = float(input("comprimento do cateto oposto: ")) cat_a = float(input("comprimento do cateto adjacente: ")) c_hip = (cat_o ** 2 + cat_a ** 2) ** (1/2) print(f" A hipotenusa mede {c_hip:.2f}") import...
29.352941
74
0.707415
#Programa que leia o cateto oposto e o adjacente de um triangulo retangulo #e mostre o comprimento da hipotenusa cat_o = float(input("comprimento do cateto oposto: ")) cat_a = float(input("comprimento do cateto adjacente: ")) c_hip = (cat_o ** 2 + cat_a ** 2) ** (1/2) print(f" A hipotenusa mede {c_hip:.2f}") import...
0
0
0
b85408e261ebdae7d5cae42388deed31f5a58c85
6,497
py
Python
tests/conftest.py
mitsosf/invenio-vocabularies
5247062cdd1a8e368b357648d53ee65ff37fc1c5
[ "MIT" ]
null
null
null
tests/conftest.py
mitsosf/invenio-vocabularies
5247062cdd1a8e368b357648d53ee65ff37fc1c5
[ "MIT" ]
null
null
null
tests/conftest.py
mitsosf/invenio-vocabularies
5247062cdd1a8e368b357648d53ee65ff37fc1c5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # Copyright (C) 2021 TU Wien. # # Invenio-Vocabularies is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """Pytest configuration. See https://pytest-invenio.readthedocs.io/ for docu...
28.00431
79
0.682777
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # Copyright (C) 2021 TU Wien. # # Invenio-Vocabularies is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """Pytest configuration. See https://pytest-invenio.readthedocs.io/ for docu...
0
0
0
dbbca9cf19db385008eaaa0a7aa1c520e992234e
438
py
Python
casper/cp/int/spexpr/explicit.cpp.py
marcovc/casper
752ad1c9ecb9408b0a3719a2c8727b87e2d158cf
[ "Apache-2.0" ]
1
2019-06-20T17:04:06.000Z
2019-06-20T17:04:06.000Z
casper/cp/int/spexpr/explicit.cpp.py
marcovc/casper
752ad1c9ecb9408b0a3719a2c8727b87e2d158cf
[ "Apache-2.0" ]
null
null
null
casper/cp/int/spexpr/explicit.cpp.py
marcovc/casper
752ad1c9ecb9408b0a3719a2c8727b87e2d158cf
[ "Apache-2.0" ]
null
null
null
import os import sys libPath = os.path.abspath('casper/cp/spexpr') sys.path.append(libPath) import cputil import util print "/* THIS FILE WAS AUTOGENERATED FROM explicit.cpp.py */" print "#include <casper/cp/spexpr/expr.h>" print "namespace Casper {" print "namespace Detail {" util.printViews(False) util.printPos...
17.52
62
0.753425
import os import sys libPath = os.path.abspath('casper/cp/spexpr') sys.path.append(libPath) import cputil import util print "/* THIS FILE WAS AUTOGENERATED FROM explicit.cpp.py */" print "#include <casper/cp/spexpr/expr.h>" print "namespace Casper {" print "namespace Detail {" util.printViews(False) util.printPos...
0
0
0
40a3d23468636877cc485ac9e064ee3527a3dcb2
2,032
py
Python
youtube_dl/extractor/lecture2go.py
builder07/ytdl
2c0a5d50af7ecc7302c813d649ee72dcd457a50a
[ "Unlicense" ]
5
2016-04-25T16:26:07.000Z
2021-04-28T16:10:29.000Z
youtube_dl/extractor/lecture2go.py
builder07/ytdl
2c0a5d50af7ecc7302c813d649ee72dcd457a50a
[ "Unlicense" ]
5
2016-04-22T01:33:31.000Z
2016-08-04T15:33:19.000Z
youtube_dl/extractor/lecture2go.py
builder07/ytdl
2c0a5d50af7ecc7302c813d649ee72dcd457a50a
[ "Unlicense" ]
4
2016-04-26T15:27:38.000Z
2018-11-12T21:04:54.000Z
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, parse_duration, int_or_none, )
32.253968
93
0.543307
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, parse_duration, int_or_none, ) class Lecture2GoIE(InfoExtractor): _VALID_URL = r'https?://lecture2go\.uni-hamburg\.de/veranstaltungen/-/v/(?P<id>\d+)' _TEST = ...
1,322
505
23
c0398cfe3d8daf23599fadd62330be430a66f740
2,075
py
Python
build/images/assembly/check_size_hermetic_inputs.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
5
2022-01-10T20:22:17.000Z
2022-01-21T20:14:17.000Z
build/images/assembly/check_size_hermetic_inputs.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
null
null
null
build/images/assembly/check_size_hermetic_inputs.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3.8 # Copyright 2022 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import json import os import sys from typing import List from assembly import FileEntry, FilePath, ImageAssemblyConf...
33.467742
80
0.687711
#!/usr/bin/env python3.8 # Copyright 2022 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import json import os import sys from typing import List from assembly import FileEntry, FilePath, ImageAssemblyConf...
1,577
0
69
c502a31a32ab3982c2dc34e9c1322c506014163e
2,322
py
Python
app.py
zharmedia386/covid19-flask
560b359b57cfa621577037e7177b1862b9fa1dc5
[ "MIT" ]
1
2021-10-06T01:36:30.000Z
2021-10-06T01:36:30.000Z
app.py
zharmedia386/covid19-flask
560b359b57cfa621577037e7177b1862b9fa1dc5
[ "MIT" ]
null
null
null
app.py
zharmedia386/covid19-flask
560b359b57cfa621577037e7177b1862b9fa1dc5
[ "MIT" ]
null
null
null
from flask import Flask from flask.templating import render_template from models import provinsi,ambilTanggal,dunia,indonesia,harian_indo,india,india_global,turki,turki_global,us,us_global application = Flask(__name__) # Route untuk halaman utama @application.route('/') # Route untuk halaman awal @application.route(...
30.552632
119
0.726529
from flask import Flask from flask.templating import render_template from models import provinsi,ambilTanggal,dunia,indonesia,harian_indo,india,india_global,turki,turki_global,us,us_global application = Flask(__name__) # Route untuk halaman utama @application.route('/') def index() : return render_template('index.h...
1,386
0
176
1f0997b6db7b17b706d8d0329b2047d635b89e7f
985
py
Python
api/src/service/login/LoginService.py
SamuelJansen/idealizar-whats-app-manager-api
a23114d5b841b3b3e45c0309b19c68df2fe1373e
[ "MIT" ]
null
null
null
api/src/service/login/LoginService.py
SamuelJansen/idealizar-whats-app-manager-api
a23114d5b841b3b3e45c0309b19c68df2fe1373e
[ "MIT" ]
null
null
null
api/src/service/login/LoginService.py
SamuelJansen/idealizar-whats-app-manager-api
a23114d5b841b3b3e45c0309b19c68df2fe1373e
[ "MIT" ]
null
null
null
from python_framework import Service, ServiceMethod from domain import LoginConstants from enumeration.AuthenticationStatus import AuthenticationStatus from dto import QRCodeDto @Service()
31.774194
82
0.739086
from python_framework import Service, ServiceMethod from domain import LoginConstants from enumeration.AuthenticationStatus import AuthenticationStatus from dto import QRCodeDto @Service() class LoginService: @ServiceMethod() def isAuthenticated(self) : authenticationResponse = self.client.whatsAppWe...
541
231
22
8eeb3f38a2c878c85669d3cfd90b524764846032
2,823
py
Python
LeetCode-All-Solution/Python3/LC-0118-Pascals-Triangle.py
YuweiYin/Algorithm_YuweiYin
28648fac59c5a4e3c907978cbd1b3e662ba18fd5
[ "MIT" ]
null
null
null
LeetCode-All-Solution/Python3/LC-0118-Pascals-Triangle.py
YuweiYin/Algorithm_YuweiYin
28648fac59c5a4e3c907978cbd1b3e662ba18fd5
[ "MIT" ]
null
null
null
LeetCode-All-Solution/Python3/LC-0118-Pascals-Triangle.py
YuweiYin/Algorithm_YuweiYin
28648fac59c5a4e3c907978cbd1b3e662ba18fd5
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- """================================================================= @Project : Algorithm_YuweiYin/LeetCode-All-Solution/Python3 @File : LC-0118-Pascals-Triangle.py @Author : [YuweiYin](https://github.com/YuweiYin) @Date : 2022-02-15 ==================================...
29.40625
117
0.568898
#!/usr/bin/env python # -*- coding:utf-8 -*- """================================================================= @Project : Algorithm_YuweiYin/LeetCode-All-Solution/Python3 @File : LC-0118-Pascals-Triangle.py @Author : [YuweiYin](https://github.com/YuweiYin) @Date : 2022-02-15 ==================================...
817
1,010
46
fa4280a0122aba2877b04c33eb2995d2f7fec771
1,997
py
Python
python/test/unit/caty/jsontools/path/JsonPathLexer.py
hidaruma/caty
f71d2ab0a001ea4f7a96a6e02211187ebbf54773
[ "MIT" ]
null
null
null
python/test/unit/caty/jsontools/path/JsonPathLexer.py
hidaruma/caty
f71d2ab0a001ea4f7a96a6e02211187ebbf54773
[ "MIT" ]
null
null
null
python/test/unit/caty/jsontools/path/JsonPathLexer.py
hidaruma/caty
f71d2ab0a001ea4f7a96a6e02211187ebbf54773
[ "MIT" ]
null
null
null
# coding: utf-8 from caty.testutil import * from caty.jsontools.path.JsonPathLexer import * from StringIO import StringIO
38.403846
95
0.597897
# coding: utf-8 from caty.testutil import * from caty.jsontools.path.JsonPathLexer import * from StringIO import StringIO def mk_lexer(s): io = StringIO() io.write(s) io.seek(0) return Lexer(io) class LexerTest(TestCase): def test_lex(self): lexer = mk_lexer('$;') self.assertEquals...
1,796
5
72
7397612fd89d36df1f67d4f884bda55b30e7606d
580
py
Python
authome/migrations/0009_auto_20210224_1206.py
rockychen-dpaw/authome
caea623ea7f5d16dc0554fcc7cc78c8063788fb8
[ "Apache-2.0" ]
2
2019-07-02T06:23:54.000Z
2021-12-14T04:02:40.000Z
authome/migrations/0009_auto_20210224_1206.py
rockychen-dpaw/authome
caea623ea7f5d16dc0554fcc7cc78c8063788fb8
[ "Apache-2.0" ]
9
2019-02-18T03:19:54.000Z
2022-03-31T06:10:36.000Z
authome/migrations/0009_auto_20210224_1206.py
rockychen-dpaw/authome
caea623ea7f5d16dc0554fcc7cc78c8063788fb8
[ "Apache-2.0" ]
6
2019-01-22T08:10:16.000Z
2022-02-15T02:42:03.000Z
# Generated by Django 3.1.6 on 2021-02-24 04:06 from django.db import migrations, models
25.217391
108
0.610345
# Generated by Django 3.1.6 on 2021-02-24 04:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('authome', '0008_auto_20210222_0905'), ] operations = [ migrations.RemoveField( model_name='customizableuserflow', na...
0
466
23
14f481891662f322b791ad0d090dfeb00e9ca36b
1,134
py
Python
setup.py
cdusold/DriveLink
b48ff68f7913e33fc17a07e91ad185b1222fdeb8
[ "MIT" ]
null
null
null
setup.py
cdusold/DriveLink
b48ff68f7913e33fc17a07e91ad185b1222fdeb8
[ "MIT" ]
7
2017-09-05T01:07:48.000Z
2020-10-12T16:40:12.000Z
setup.py
cdusold/DriveLink
b48ff68f7913e33fc17a07e91ad185b1222fdeb8
[ "MIT" ]
null
null
null
import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... setup( name="DriveLink", version=read("VERSIO...
31.5
79
0.650794
import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open(os.path.join(os.path....
66
0
23
24d8c56bcaf9a4486fd4d84534293fc0807c725f
1,006
py
Python
others/differentiation_integration/adaptive_diff.py
bt3gl/Resources-Numerical_Methods_for_Physics
8668215f107230fafd9bdeb0061d353328cf03e8
[ "Apache-2.0" ]
17
2019-10-28T03:13:07.000Z
2020-11-21T17:38:06.000Z
others/differentiation_integration/adaptive_diff.py
bt3gl/Resources-Numerical_Methods_for_Physics
8668215f107230fafd9bdeb0061d353328cf03e8
[ "Apache-2.0" ]
null
null
null
others/differentiation_integration/adaptive_diff.py
bt3gl/Resources-Numerical_Methods_for_Physics
8668215f107230fafd9bdeb0061d353328cf03e8
[ "Apache-2.0" ]
5
2020-05-09T07:55:32.000Z
2020-12-12T11:05:42.000Z
# example of error estimation with numerical derivatives and using # Richardson extrapolation to reduce the leading order error. import math # function we are differentiating # analytic derivative (for comparison) # difference equation # desired tolerance -- be careful not to go too close to machine # epsilon,...
17.344828
67
0.653082
# example of error estimation with numerical derivatives and using # Richardson extrapolation to reduce the leading order error. import math # function we are differentiating def fun(x): return math.sin(x) # analytic derivative (for comparison) def fprime(x): return math.cos(x) # difference equation def ...
67
0
66
607de21a293deb30eaae6c2ead95e72724663ad8
3,429
py
Python
architect/commands/__init__.py
dimagi/architect
b87475a2eaf63916ad12666c998c062b675bde1d
[ "Apache-2.0" ]
352
2015-01-16T10:22:25.000Z
2022-02-25T04:19:13.000Z
architect/commands/__init__.py
dimagi/architect
b87475a2eaf63916ad12666c998c062b675bde1d
[ "Apache-2.0" ]
76
2015-01-19T11:15:32.000Z
2021-12-09T15:35:47.000Z
architect/commands/__init__.py
dimagi/architect
b87475a2eaf63916ad12666c998c062b675bde1d
[ "Apache-2.0" ]
72
2015-01-19T11:53:40.000Z
2022-03-14T16:09:00.000Z
""" Provides unified interface for all Architect commands. Each command should live in a separate module and define an "arguments" variable which should contain the command's arguments and a "run" function which implements the command's behaviour. """ import os import sys import pkgutil import argparse from .. import...
35.71875
117
0.654418
""" Provides unified interface for all Architect commands. Each command should live in a separate module and define an "arguments" variable which should contain the command's arguments and a "run" function which implements the command's behaviour. """ import os import sys import pkgutil import argparse from .. import...
0
1,392
23
4eed8743f1f3a83647a49f1c486e1ac5fae66a0a
6,315
py
Python
cnn.py
LinXueyuanStdio/Histopathologic-Cancer-Detection
ef37674283e7e3a4ac0999192b3b297cd55c1429
[ "Apache-2.0" ]
null
null
null
cnn.py
LinXueyuanStdio/Histopathologic-Cancer-Detection
ef37674283e7e3a4ac0999192b3b297cd55c1429
[ "Apache-2.0" ]
null
null
null
cnn.py
LinXueyuanStdio/Histopathologic-Cancer-Detection
ef37674283e7e3a4ac0999192b3b297cd55c1429
[ "Apache-2.0" ]
null
null
null
# Libraries import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import TensorDataset, DataLoader, Dataset import torchvision import torchvision.transforms as transforms from sklearn.model_selection import train_test_split import os import numpy as np import pandas as pd i...
35.677966
105
0.628187
# Libraries import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import TensorDataset, DataLoader, Dataset import torchvision import torchvision.transforms as transforms from sklearn.model_selection import train_test_split import os import numpy as np import pandas as pd i...
1,946
10
190
f727ee1e7b53a6244678c9e08fe4eea5eec42c76
509
py
Python
src/waldur_ansible/playbook_jobs/extension.py
opennode/waldur-ansible
c81c5f0491be02fa9a55a6d5bf9d845750fd1ba9
[ "MIT" ]
1
2017-09-05T08:09:47.000Z
2017-09-05T08:09:47.000Z
src/waldur_ansible/playbook_jobs/extension.py
opennode/waldur-ansible
c81c5f0491be02fa9a55a6d5bf9d845750fd1ba9
[ "MIT" ]
null
null
null
src/waldur_ansible/playbook_jobs/extension.py
opennode/waldur-ansible
c81c5f0491be02fa9a55a6d5bf9d845750fd1ba9
[ "MIT" ]
3
2017-09-24T03:13:19.000Z
2018-08-12T07:44:38.000Z
from waldur_core.core import WaldurExtension
22.130435
54
0.650295
from waldur_core.core import WaldurExtension class PlaybookJobsExtension(WaldurExtension): class Settings: WALDUR_PLAYBOOK_JOBS = { 'PLAYBOOKS_DIR_NAME': 'ansible_playbooks', 'PLAYBOOK_ICON_SIZE': (64, 64), } @staticmethod def django_app(): return 'waldur_a...
119
321
23
9ec5cb7906b3b40445257c6247715ae52fd14c2f
16,038
py
Python
src/operation/exec_test.py
tobytoyin/TesterFactory
150a2625f8fb4eb50d600611d990a8bb8fed96a4
[ "MIT" ]
null
null
null
src/operation/exec_test.py
tobytoyin/TesterFactory
150a2625f8fb4eb50d600611d990a8bb8fed96a4
[ "MIT" ]
null
null
null
src/operation/exec_test.py
tobytoyin/TesterFactory
150a2625f8fb4eb50d600611d990a8bb8fed96a4
[ "MIT" ]
null
null
null
from src.operation.execution import Execution from selenium.common.exceptions import ( ElementClickInterceptedException, ElementNotInteractableException, NoSuchElementException, ) from selenium.webdriver.support import expected_conditions as EC from time import sleep from bs4 import BeautifulSoup from selen...
35.017467
114
0.563162
from src.operation.execution import Execution from selenium.common.exceptions import ( ElementClickInterceptedException, ElementNotInteractableException, NoSuchElementException, ) from selenium.webdriver.support import expected_conditions as EC from time import sleep from bs4 import BeautifulSoup from selen...
53
0
27
e02a88e39ea629d0ed4ce7c27861d2df6d258d88
2,034
py
Python
utils.py
RajputJay41/Tweets-Analysis
b07c07e035cac495e329cd1a32b51871777a1089
[ "MIT" ]
4
2020-09-29T09:10:35.000Z
2020-10-19T08:57:59.000Z
utils.py
RajputJay41/Tweets-Analysis
b07c07e035cac495e329cd1a32b51871777a1089
[ "MIT" ]
null
null
null
utils.py
RajputJay41/Tweets-Analysis
b07c07e035cac495e329cd1a32b51871777a1089
[ "MIT" ]
null
null
null
import numpy as np import torch class AverageMeter: """ Computes and stores the average and current value """
29.057143
109
0.566372
import numpy as np import torch class AverageMeter: """ Computes and stores the average and current value """ def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 def update(self, val, n=1): se...
1,703
-1
206
0ef9739c8bde36c4d0cea8d757c777e458199d47
2,897
py
Python
homeassistant/components/mobile_app/push_notification.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/mobile_app/push_notification.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/mobile_app/push_notification.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Push notification handling.""" from __future__ import annotations import asyncio from collections.abc import Callable from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.event import async_call_later from homeassistant.util.uuid import random_uuid_hex PUSH_CONFIRM_TIMEOUT = 10 # sec...
31.150538
87
0.637556
"""Push notification handling.""" from __future__ import annotations import asyncio from collections.abc import Callable from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.event import async_call_later from homeassistant.util.uuid import random_uuid_hex PUSH_CONFIRM_TIMEOUT = 10 # sec...
0
0
0
3c9056dfb6354e5daafd7bffd768de97d7f13f54
11,790
py
Python
src/fidesops/service/connectors/query_config.py
nathanawmk/fidesops
1ab840206a78e60673aebd5838ba567095512a58
[ "Apache-2.0" ]
null
null
null
src/fidesops/service/connectors/query_config.py
nathanawmk/fidesops
1ab840206a78e60673aebd5838ba567095512a58
[ "Apache-2.0" ]
null
null
null
src/fidesops/service/connectors/query_config.py
nathanawmk/fidesops
1ab840206a78e60673aebd5838ba567095512a58
[ "Apache-2.0" ]
null
null
null
import logging import re from abc import ABC, abstractmethod from typing import Dict, Any, List, Set, Optional, Generic, TypeVar, Tuple from sqlalchemy import text from sqlalchemy.sql.elements import TextClause from fidesops.graph.config import ROOT_COLLECTION_ADDRESS, CollectionAddress from fidesops.graph.traversal ...
38.655738
128
0.598473
import logging import re from abc import ABC, abstractmethod from typing import Dict, Any, List, Set, Optional, Generic, TypeVar, Tuple from sqlalchemy import text from sqlalchemy.sql.elements import TextClause from fidesops.graph.config import ROOT_COLLECTION_ADDRESS, CollectionAddress from fidesops.graph.traversal ...
2,190
0
201
2d5262b7779affc730600aceb16db34bead5231a
1,212
py
Python
CH05_Perceptron/Perceptron.py
abulimity/Learn-Machine-Learning
24455a473fdfa439e2a2871d21ffa66245557d69
[ "MIT" ]
null
null
null
CH05_Perceptron/Perceptron.py
abulimity/Learn-Machine-Learning
24455a473fdfa439e2a2871d21ffa66245557d69
[ "MIT" ]
null
null
null
CH05_Perceptron/Perceptron.py
abulimity/Learn-Machine-Learning
24455a473fdfa439e2a2871d21ffa66245557d69
[ "MIT" ]
null
null
null
import numpy as np import random import logging import pandas as pd if __name__ == '__main__': logging.getLogger().setLevel(logging.INFO) logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) # logging.info('ddddd')...
28.857143
106
0.542079
import numpy as np import random import logging import pandas as pd class Perceptron(object): def __init__(self, eta=0.00001, max_iter=5000): self.eta = eta self.max_iter = max_iter self.w = 0 def fit(self, X, y): X = np.array(pd.DataFrame(X).to_numpy()) y = np.array(...
783
4
104
59f09f87cfad17d486b07c1f5977d73876417aef
292
py
Python
Mock-exams/01-Mock-exam/expensesTracker/expensesTracker/app/forms.py
M0673N/Python-Web-Basics
cecc27f7a12f990756edcc8885290eb3b2e487b7
[ "MIT" ]
null
null
null
Mock-exams/01-Mock-exam/expensesTracker/expensesTracker/app/forms.py
M0673N/Python-Web-Basics
cecc27f7a12f990756edcc8885290eb3b2e487b7
[ "MIT" ]
null
null
null
Mock-exams/01-Mock-exam/expensesTracker/expensesTracker/app/forms.py
M0673N/Python-Web-Basics
cecc27f7a12f990756edcc8885290eb3b2e487b7
[ "MIT" ]
null
null
null
from django import forms from expensesTracker.app.models import Profile, Expense
18.25
55
0.674658
from django import forms from expensesTracker.app.models import Profile, Expense class ProfileForm(forms.ModelForm): class Meta: model = Profile fields = '__all__' class ExpenseForm(forms.ModelForm): class Meta: model = Expense fields = '__all__'
0
162
46
8cef407cc7eb1b7e6aa4149bfbe1385b5213c943
8,272
py
Python
nicrabgrp/radio.py
tenoto/nicrabgrp
e81954526d2db9c9b73fde47df27ae9855f52bcb
[ "MIT" ]
null
null
null
nicrabgrp/radio.py
tenoto/nicrabgrp
e81954526d2db9c9b73fde47df27ae9855f52bcb
[ "MIT" ]
null
null
null
nicrabgrp/radio.py
tenoto/nicrabgrp
e81954526d2db9c9b73fde47df27ae9855f52bcb
[ "MIT" ]
null
null
null
__author__ = 'Teruaki Enoto' __version__ = '0.02' __date__ = '2018 November 26' """ HISTORY 2018-11-26 transfered from giantradiopulse library 2018-10-09 modified by T.Enoto 2018-10-01 created by T.Enoto """ import os import pandas as pd import astropy.io.fits as fits class GootTimeIntervalTextFile(GootTimeIn...
46.734463
112
0.707084
__author__ = 'Teruaki Enoto' __version__ = '0.02' __date__ = '2018 November 26' """ HISTORY 2018-11-26 transfered from giantradiopulse library 2018-10-09 modified by T.Enoto 2018-10-01 created by T.Enoto """ import os import pandas as pd import astropy.io.fits as fits class GootTimeInterval(object): def __in...
7,388
19
236
c389126a8ae454dd027464ab4275b6e60b857dde
458
py
Python
sage/factor_ec.py
attacker0211/ectp
752e8d2bf70a88df0dfbe05e37312d959090ab64
[ "MIT" ]
1
2021-04-24T17:34:43.000Z
2021-04-24T17:34:43.000Z
sage/factor_ec.py
attacker0211/ectp
752e8d2bf70a88df0dfbe05e37312d959090ab64
[ "MIT" ]
null
null
null
sage/factor_ec.py
attacker0211/ectp
752e8d2bf70a88df0dfbe05e37312d959090ab64
[ "MIT" ]
null
null
null
#!/usr/local/bin/sage -python from sage.all import * n = 199843247 done = 0 for b in range(1, int(sqrt(199843247) + 1)): E = EllipticCurve(Integers(n),[0,0,0,b,-b]) P = E(1,1) for d in range(2, 21): # try: Q = d*P print(d,"!P &= (",Q[0],"," ,Q[1],")\\\\") P = Q # ...
20.818182
52
0.401747
#!/usr/local/bin/sage -python from sage.all import * n = 199843247 done = 0 for b in range(1, int(sqrt(199843247) + 1)): E = EllipticCurve(Integers(n),[0,0,0,b,-b]) P = E(1,1) for d in range(2, 21): # try: Q = d*P print(d,"!P &= (",Q[0],"," ,Q[1],")\\\\") P = Q # ...
0
0
0
3263adca4a1202605a047838d18408c8652af18f
1,990
py
Python
hw1scripts/Introduction.py
vedatk67/ADM-HW1
21da1ba0c4f08a8d3fb14d40a65476b39761b4f9
[ "MIT" ]
null
null
null
hw1scripts/Introduction.py
vedatk67/ADM-HW1
21da1ba0c4f08a8d3fb14d40a65476b39761b4f9
[ "MIT" ]
null
null
null
hw1scripts/Introduction.py
vedatk67/ADM-HW1
21da1ba0c4f08a8d3fb14d40a65476b39761b4f9
[ "MIT" ]
null
null
null
#1 -)SAY "HELLO, WORLD!" WITH PYTHON a = "Hello, World!" print(a) #2 -)PYTHON IF - ELSE # !/bin/python3 import math import os import random import re import sys # For all condition writing if or elif if __name__ == '__main__': n = int(input().strip()) if n % 2 == 1: print("Weird") elif n % 2 ...
21.170213
98
0.582915
#1 -)SAY "HELLO, WORLD!" WITH PYTHON a = "Hello, World!" print(a) #2 -)PYTHON IF - ELSE # !/bin/python3 import math import os import random import re import sys # For all condition writing if or elif if __name__ == '__main__': n = int(input().strip()) if n % 2 == 1: print("Weird") elif n % 2 ...
225
0
23
8a89f180e5173599b237a1625b6352afd5edd205
4,613
py
Python
spectree/response.py
loonateam/spectree
71b2d34993e01b36a8de18c2a3d6856d0c9e45c3
[ "Apache-2.0" ]
null
null
null
spectree/response.py
loonateam/spectree
71b2d34993e01b36a8de18c2a3d6856d0c9e45c3
[ "Apache-2.0" ]
1
2021-12-16T00:22:43.000Z
2021-12-16T00:22:43.000Z
spectree/response.py
loonateam/spectree
71b2d34993e01b36a8de18c2a3d6856d0c9e45c3
[ "Apache-2.0" ]
null
null
null
from pydantic import BaseModel from .models import UnprocessableEntity from .utils import get_model_key, parse_code class Response: """ response object :param codes: list of HTTP status code, format('HTTP_[0-9]{3}'), 'HTTP200' :param code_models: dict of <HTTP status code>: <`pydantic.BaseModel`> or...
31.813793
83
0.598309
from pydantic import BaseModel from .models import UnprocessableEntity from .utils import get_model_key, parse_code class Response: """ response object :param codes: list of HTTP status code, format('HTTP_[0-9]{3}'), 'HTTP200' :param code_models: dict of <HTTP status code>: <`pydantic.BaseModel`> or...
662
0
27
0c5df2c6515eaf7e4f5d6d6648879dffa4fd63a1
185
py
Python
factorial.py
vidyadeepa/the-coding-interview
90171b77b6884176a6c28bdccb5d45bd6929b489
[ "MIT" ]
null
null
null
factorial.py
vidyadeepa/the-coding-interview
90171b77b6884176a6c28bdccb5d45bd6929b489
[ "MIT" ]
null
null
null
factorial.py
vidyadeepa/the-coding-interview
90171b77b6884176a6c28bdccb5d45bd6929b489
[ "MIT" ]
null
null
null
n=int(input("number: ")) if n==1: print n if n<0: print("sorry..factorial does not exist") elif n==0: print ("the factorial of 0 is 1") else: for i in range(1,n): n=n*i print n
15.416667
41
0.621622
n=int(input("number: ")) if n==1: print n if n<0: print("sorry..factorial does not exist") elif n==0: print ("the factorial of 0 is 1") else: for i in range(1,n): n=n*i print n
0
0
0
aed13c5d1a9ef823395ac59d770e8823c72485c5
229
py
Python
myimports/boo/__init__.py
noirqs/PyImports
1f356ace2035d82a6e15f78b12fdd30520d4e3f7
[ "BSD-2-Clause" ]
118
2015-02-20T13:59:09.000Z
2022-01-28T18:43:52.000Z
myimports/boo/__init__.py
noirqs/PyImports
1f356ace2035d82a6e15f78b12fdd30520d4e3f7
[ "BSD-2-Clause" ]
2
2017-09-19T03:55:14.000Z
2018-05-03T10:37:17.000Z
myimports/boo/__init__.py
noirqs/PyImports
1f356ace2035d82a6e15f78b12fdd30520d4e3f7
[ "BSD-2-Clause" ]
16
2016-04-07T14:51:19.000Z
2022-03-25T05:59:05.000Z
#!/usr/bin/env python # if the __init__.py is imported directly, import the # folowing classes from .ger import Booger from .geyman import Boogeyman, OogieBoogie # purposely do not define Bookbag here #from .kbag import Bookbag
25.444444
53
0.781659
#!/usr/bin/env python # if the __init__.py is imported directly, import the # folowing classes from .ger import Booger from .geyman import Boogeyman, OogieBoogie # purposely do not define Bookbag here #from .kbag import Bookbag
0
0
0
341bcbdc53ab71aff215899d95f6e8ce45f87424
3,094
py
Python
tronx/database/postgres/pmpermit_sql.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
4
2022-03-07T07:27:04.000Z
2022-03-29T05:59:57.000Z
tronx/database/postgres/pmpermit_sql.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
null
null
null
tronx/database/postgres/pmpermit_sql.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
3
2022-03-05T15:24:51.000Z
2022-03-14T08:48:05.000Z
import threading from sqlalchemy import ( Column, String, Integer ) from . import SESSION, BASE # save user ids in whitelists # save warn msg ids # save warn counts PMTABLE.__table__.create(checkfirst=True) MSGID.__table__.create(checkfirst=True) DISAPPROVE.__table__.create(checkfirst=True) INSE...
18.526946
49
0.690045
import threading from sqlalchemy import ( Column, String, Integer ) from . import SESSION, BASE # save user ids in whitelists class PMTABLE(BASE): __tablename__ = "approve" user_id = Column(Integer, primary_key=True) boolvalue = Column(String) def __init__(self, user_id, boolvalue): self.user_id = us...
1,877
383
273
bc0f61b09a1fc2c25361193422c5d174d70204ce
1,987
py
Python
calcul.py
kkh1205/python-practice
893a748db94fde57d935f6235cea3cb4cfb2c579
[ "MIT" ]
null
null
null
calcul.py
kkh1205/python-practice
893a748db94fde57d935f6235cea3cb4cfb2c579
[ "MIT" ]
null
null
null
calcul.py
kkh1205/python-practice
893a748db94fde57d935f6235cea3cb4cfb2c579
[ "MIT" ]
null
null
null
############ 계산기 만들기 연습 ########### calcul()
20.915789
93
0.532964
############ 계산기 만들기 연습 ########### def calcul(): print('\nyou can insert two number and cal. \n inputable cal : +, -, *, /, //, %\n') a = input('please input num : ') cal = str(input('please input cal : ')) b = input('please input num : ') # validation check cal if(cal != '+' and cal != '-' and cal != '*...
1,919
0
23
afae55c45c1dcaccefdbf903dd752696e8b7ddc3
243
py
Python
work_one/work_UDP_server.py
YuHongJun/python-training
6ffafe6c781f29315cf1bb08ea3cec6020f078cd
[ "MIT" ]
12
2017-10-01T00:20:37.000Z
2017-10-02T10:42:18.000Z
work_one/work_UDP_server.py
YuHongJun/python-training
6ffafe6c781f29315cf1bb08ea3cec6020f078cd
[ "MIT" ]
null
null
null
work_one/work_UDP_server.py
YuHongJun/python-training
6ffafe6c781f29315cf1bb08ea3cec6020f078cd
[ "MIT" ]
null
null
null
import socket s= socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.bind(('127.0.0.1',9999)) print('Bind UDP on 9999') while True: data,addr=s.recvfrom(1024) print('Received from %s:%s' %addr) s.sendto(b'Hello, %s!' % data, addr)
22.090909
50
0.666667
import socket s= socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.bind(('127.0.0.1',9999)) print('Bind UDP on 9999') while True: data,addr=s.recvfrom(1024) print('Received from %s:%s' %addr) s.sendto(b'Hello, %s!' % data, addr)
0
0
0
475fa48b4644120f61099979852d996a6a64a790
3,528
py
Python
chemprop/train/create_fingerprints.py
PNNL-CompBio/chemprop-IR
c2e6e585eac4464a1e61ce3674b856a5ced4f18a
[ "MIT" ]
null
null
null
chemprop/train/create_fingerprints.py
PNNL-CompBio/chemprop-IR
c2e6e585eac4464a1e61ce3674b856a5ced4f18a
[ "MIT" ]
null
null
null
chemprop/train/create_fingerprints.py
PNNL-CompBio/chemprop-IR
c2e6e585eac4464a1e61ce3674b856a5ced4f18a
[ "MIT" ]
null
null
null
from argparse import Namespace import csv from typing import List, Optional import numpy as np import torch from tqdm import tqdm from .predict import predict from chemprop.data import MoleculeDataset from chemprop.data.utils import get_data, get_data_from_smiles from chemprop.utils import load_args, load_checkpoint,...
31.783784
158
0.674603
from argparse import Namespace import csv from typing import List, Optional import numpy as np import torch from tqdm import tqdm from .predict import predict from chemprop.data import MoleculeDataset from chemprop.data.utils import get_data, get_data_from_smiles from chemprop.utils import load_args, load_checkpoint,...
0
0
0
0e4b41cc61a152490885cb7f0acef4e1afb82e4d
14,215
py
Python
Ch-7/PPO.py
prakHr/temp
688d71b7deba5f1fcb56fb335922823b8b4dac38
[ "MIT" ]
1
2020-07-17T05:29:55.000Z
2020-07-17T05:29:55.000Z
Ch-7/PPO.py
prakHr/temp
688d71b7deba5f1fcb56fb335922823b8b4dac38
[ "MIT" ]
null
null
null
Ch-7/PPO.py
prakHr/temp
688d71b7deba5f1fcb56fb335922823b8b4dac38
[ "MIT" ]
3
2020-12-12T14:29:09.000Z
2021-10-11T00:10:40.000Z
import numpy as np import tensorflow as tf import gym from datetime import datetime import time import roboschool def mlp(x, hidden_layers, output_layer, activation=tf.tanh, last_activation=None): ''' Multi-layer perceptron ''' for l in hidden_layers: x = tf.layers.dense(x, units=l, activation...
40.155367
163
0.636581
import numpy as np import tensorflow as tf import gym from datetime import datetime import time import roboschool def mlp(x, hidden_layers, output_layer, activation=tf.tanh, last_activation=None): ''' Multi-layer perceptron ''' for l in hidden_layers: x = tf.layers.dense(x, units=l, activation...
994
0
222
b9c6e205abecdeaf8a3c5a94c7509cbccb932228
17,207
py
Python
idgo_admin/models/layer.py
neogeo-technologies/idgo
23e028b0d7fb2daf54d7e2954e0cc4d7b9be4210
[ "Apache-2.0" ]
null
null
null
idgo_admin/models/layer.py
neogeo-technologies/idgo
23e028b0d7fb2daf54d7e2954e0cc4d7b9be4210
[ "Apache-2.0" ]
2
2018-09-14T07:12:00.000Z
2019-11-13T09:32:24.000Z
idgo_admin/models/layer.py
neogeo-technologies/idgo
23e028b0d7fb2daf54d7e2954e0cc4d7b9be4210
[ "Apache-2.0" ]
2
2019-03-25T08:27:43.000Z
2019-10-07T15:25:30.000Z
# Copyright (c) 2017-2021 Neogeo-Technologies. # 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...
34.761616
105
0.56878
# Copyright (c) 2017-2021 Neogeo-Technologies. # 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...
7,454
8,183
90
d8442700e3683edee60319cb622436d9de214343
235
py
Python
ai/tensorflow/demos/tf_demo2.py
bigfoolliu/liu_aistuff
aa661d37c05c257ee293285dd0868fb7e8227628
[ "MIT" ]
1
2019-11-25T07:23:42.000Z
2019-11-25T07:23:42.000Z
ai/tensorflow/demos/tf_demo2.py
bigfoolliu/liu_aistuff
aa661d37c05c257ee293285dd0868fb7e8227628
[ "MIT" ]
13
2020-01-07T16:09:47.000Z
2022-03-02T12:51:44.000Z
ai/tensorflow/demos/tf_demo2.py
bigfoolliu/liu_aistuff
aa661d37c05c257ee293285dd0868fb7e8227628
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author: bigfoolliu import tensorflow as tf a = tf.constant(10) b = tf.constant(20) # 使用with可以自动关闭Session() with tf.Session() as sess: ret = sess.run(a + b) print("ret:", ret)
15.666667
26
0.634043
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author: bigfoolliu import tensorflow as tf a = tf.constant(10) b = tf.constant(20) # 使用with可以自动关闭Session() with tf.Session() as sess: ret = sess.run(a + b) print("ret:", ret)
0
0
0
e8c69db1da6171e5161324cb1d06d17d81294b07
166
py
Python
selection/truncated/__init__.py
Xiaoying-Tian/selective-inference
a20c5ad3f527beb709d5b8d7301016640738b092
[ "BSD-3-Clause" ]
null
null
null
selection/truncated/__init__.py
Xiaoying-Tian/selective-inference
a20c5ad3f527beb709d5b8d7301016640738b092
[ "BSD-3-Clause" ]
null
null
null
selection/truncated/__init__.py
Xiaoying-Tian/selective-inference
a20c5ad3f527beb709d5b8d7301016640738b092
[ "BSD-3-Clause" ]
1
2019-07-13T04:14:12.000Z
2019-07-13T04:14:12.000Z
from base import find_root from gaussian import truncated_gaussian from chi import truncated_chi, truncated_chi2 from T import truncated_T from F import truncated_F
23.714286
45
0.861446
from base import find_root from gaussian import truncated_gaussian from chi import truncated_chi, truncated_chi2 from T import truncated_T from F import truncated_F
0
0
0
71c86ea69c3fcb582af69f1eb2c89bc15f83af14
302
py
Python
mjengo/run.py
bilha-analytics/school
d3491eb3f88386dcef35abe13ff8d494790a607d
[ "MIT" ]
null
null
null
mjengo/run.py
bilha-analytics/school
d3491eb3f88386dcef35abe13ff8d494790a607d
[ "MIT" ]
null
null
null
mjengo/run.py
bilha-analytics/school
d3491eb3f88386dcef35abe13ff8d494790a607d
[ "MIT" ]
1
2021-04-08T07:12:48.000Z
2021-04-08T07:12:48.000Z
import <app_pkg_name> from <app_pkg_name>.bin import zlogger app = <app_pkg_name>.init_app() zlogger.startLogger("<app_pkg_name>") if __name__ == "__main__": ''' TODO: populate dummy data, setup zlogger ''' zlogger.log( "run.py" f"starting {__name__}" ) app.run(debug=True)
21.571429
51
0.665563
import <app_pkg_name> from <app_pkg_name>.bin import zlogger app = <app_pkg_name>.init_app() zlogger.startLogger("<app_pkg_name>") if __name__ == "__main__": ''' TODO: populate dummy data, setup zlogger ''' zlogger.log( "run.py" f"starting {__name__}" ) app.run(debug=True)
0
0
0
4d2af55567acfb91af602f30775f7a2929893f2d
2,684
py
Python
Filtering_Server/FFT/fft.py
FullPint/Frequency-Filter-Server
60ed3f17f8873ff92b6f52e7dd861c9d99dea40c
[ "MIT" ]
null
null
null
Filtering_Server/FFT/fft.py
FullPint/Frequency-Filter-Server
60ed3f17f8873ff92b6f52e7dd861c9d99dea40c
[ "MIT" ]
null
null
null
Filtering_Server/FFT/fft.py
FullPint/Frequency-Filter-Server
60ed3f17f8873ff92b6f52e7dd861c9d99dea40c
[ "MIT" ]
null
null
null
import numpy as np class FFT_DIP: """ need to complete the implementation having issues with how to keep size, in order to avoid zero padding def bluestein(self, vector, inverse=False): transformed_vector = np.covolve() return vector """
34.410256
109
0.595753
import numpy as np class FFT_DIP: def fft(self, vector): vector = np.array(vector, dtype=complex) n = vector.shape[0] if(self._power_of_two(n)): vector = self.cooleytukey(vector) else: vector = np.fft.fft(vector) # vector = self.bluestein(vector) ...
2,165
0
242
7c46924325ac62ac5f7485f322519108d5b8fda9
1,150
py
Python
setup.py
anielsen001/pycwt
0136e5c43519e6973f43f288f76541e34a7ddfe8
[ "BSD-3-Clause" ]
185
2015-01-04T09:20:37.000Z
2022-02-28T16:40:07.000Z
setup.py
anielsen001/pycwt
0136e5c43519e6973f43f288f76541e34a7ddfe8
[ "BSD-3-Clause" ]
33
2015-08-07T08:02:43.000Z
2022-01-25T09:12:22.000Z
setup.py
anielsen001/pycwt
0136e5c43519e6973f43f288f76541e34a7ddfe8
[ "BSD-3-Clause" ]
81
2015-06-19T15:26:00.000Z
2022-03-04T09:40:10.000Z
import os from setuptools import setup AUTHORS = ('Sebastian Krieger, Nabil Freij, Alexey Brazhe, ' 'Christopher Torrence, Gilbert P. Compo and contributors') setup( name='pycwt', version='0.3.0a22', author=AUTHORS, author_email='sebastian@nublia.com', description=('Continuous wavelet...
31.944444
71
0.634783
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() AUTHORS = ('Sebastian Krieger, Nabil Freij, Alexey Brazhe, ' 'Christopher Torrence, Gilbert P. Compo and contributors') setup( name='pycwt', version='0.3.0a22', auth...
66
0
23
5da4ce214702b4055cf349b708dfa82e2ed0abca
678
py
Python
train.py
DOROTHEA0/ConvNeXt
e5f4b4fae5ab36d7e62b6fbfe0cb221b6039d1b1
[ "MIT" ]
null
null
null
train.py
DOROTHEA0/ConvNeXt
e5f4b4fae5ab36d7e62b6fbfe0cb221b6039d1b1
[ "MIT" ]
null
null
null
train.py
DOROTHEA0/ConvNeXt
e5f4b4fae5ab36d7e62b6fbfe0cb221b6039d1b1
[ "MIT" ]
null
null
null
import torch from models.convnext import * from utils import get_params_groups, create_lr_scheduler import argparse if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("--epochs", type=int, default=100, help="number of epochs of training") parser.add_argument("--batch_siz...
27.12
99
0.715339
import torch from models.convnext import * from utils import get_params_groups, create_lr_scheduler import argparse def train(opt): model = convnext_tiny(num_classes=2) p = get_params_groups(model) optimizer = torch.optim.AdamW(p, lr=opt.lr) # lr_scheduler = if __name__ == '__main__': parser...
138
0
23
189b013efcd77df638af98d1d0af87b2d565f03e
880
py
Python
Curso-em-video/Aula_104.py
JhonAI13/Curso_python
27dedb0effa2c26140f46392e993b8e7a27d6eb3
[ "MIT" ]
null
null
null
Curso-em-video/Aula_104.py
JhonAI13/Curso_python
27dedb0effa2c26140f46392e993b8e7a27d6eb3
[ "MIT" ]
null
null
null
Curso-em-video/Aula_104.py
JhonAI13/Curso_python
27dedb0effa2c26140f46392e993b8e7a27d6eb3
[ "MIT" ]
null
null
null
# """ 104: Crie um programa que tenha a função leiaInt(), que vai funcionar de forma # semelhante 'a função input() do Python, só que fazendo a validação para aceitar apenas um valor numérico. # Ex: n = leiaInt('Digite um n: ')""" # # # def leia_int(num): # n = str(input(num)) # while True: # if not n.i...
26.666667
107
0.576136
# """ 104: Crie um programa que tenha a função leiaInt(), que vai funcionar de forma # semelhante 'a função input() do Python, só que fazendo a validação para aceitar apenas um valor numérico. # Ex: n = leiaInt('Digite um n: ')""" # # # def leia_int(num): # n = str(input(num)) # while True: # if not n.i...
219
0
23
a4f2eb67e8e54325f2a702921007de9ede24afc9
7,195
py
Python
servicecatalog_puppet/constants_unit_test.py
awslabs/aws-service-catalog-puppet
f8cbf078ad8b31bf191e32ee4f6038c25b721286
[ "Apache-2.0" ]
66
2019-04-23T12:10:27.000Z
2022-03-31T19:47:09.000Z
servicecatalog_puppet/constants_unit_test.py
awslabs/aws-service-catalog-puppet
f8cbf078ad8b31bf191e32ee4f6038c25b721286
[ "Apache-2.0" ]
283
2019-04-18T22:21:20.000Z
2022-03-31T10:04:42.000Z
servicecatalog_puppet/constants_unit_test.py
awslabs/aws-service-catalog-puppet
f8cbf078ad8b31bf191e32ee4f6038c25b721286
[ "Apache-2.0" ]
47
2019-05-14T12:45:57.000Z
2022-03-25T17:54:22.000Z
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0
45.251572
101
0.74524
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 def test_constants_values(): # setup from servicecatalog_puppet import constants # exercise # verify assert constants.PREFIX == "SC-P--" assert constants.BOOTSTRAP_STACK_NAME == "...
7,057
0
23
bee68e3df294d406e351d2aff08551938b188b68
21,635
py
Python
src/vardb/deposit/deposit_analysis.py
Dabble-of-DevOps-Bio/ella
e38631d302611a143c9baaa684bcbd014d9734e4
[ "MIT" ]
null
null
null
src/vardb/deposit/deposit_analysis.py
Dabble-of-DevOps-Bio/ella
e38631d302611a143c9baaa684bcbd014d9734e4
[ "MIT" ]
null
null
null
src/vardb/deposit/deposit_analysis.py
Dabble-of-DevOps-Bio/ella
e38631d302611a143c9baaa684bcbd014d9734e4
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Code for loading the contents of VCF files into the vardb database. Use one transaction for whole file, and prompts user before committing. Adds annotation if supplied annotation is different than what is already in db. Can use specific annotation parsers to split e.g. allele specific annotat...
39.264973
120
0.557985
#!/usr/bin/env python """ Code for loading the contents of VCF files into the vardb database. Use one transaction for whole file, and prompts user before committing. Adds annotation if supplied annotation is different than what is already in db. Can use specific annotation parsers to split e.g. allele specific annotat...
5,543
14,229
127
21a0fb13c441aab710ff43e476dfe91fdd0dbf35
2,736
py
Python
gui/feature_tool_delete.py
mdvandamme/PoussePousseEditData
1864cd7ddad7002c050c2296b2d90ea817e12f57
[ "MIT" ]
null
null
null
gui/feature_tool_delete.py
mdvandamme/PoussePousseEditData
1864cd7ddad7002c050c2296b2d90ea817e12f57
[ "MIT" ]
null
null
null
gui/feature_tool_delete.py
mdvandamme/PoussePousseEditData
1864cd7ddad7002c050c2296b2d90ea817e12f57
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ /*************************************************************************** Delete point. Synchonize with layer and file ------------------- begin : 2018-07-11 git sha : $Format:%H$ author : M...
29.73913
78
0.467471
# -*- coding: utf-8 -*- """ /*************************************************************************** Delete point. Synchonize with layer and file ------------------- begin : 2018-07-11 git sha : $Format:%H$ author : M...
259
1,832
23
2f216323cd83ace785f153d8023969597da0dfc9
17
py
Python
website/list/__init__.py
webcpp/pyexample
c56d307520899501f7e94261b54d2707a5a6e25d
[ "MIT" ]
377
2017-06-13T23:46:08.000Z
2022-03-25T01:03:39.000Z
website/list/__init__.py
webcpp/pyexample
c56d307520899501f7e94261b54d2707a5a6e25d
[ "MIT" ]
16
2017-06-18T11:11:56.000Z
2021-01-06T02:06:12.000Z
website/list/__init__.py
webcpp/pyexample
c56d307520899501f7e94261b54d2707a5a6e25d
[ "MIT" ]
75
2017-06-14T01:07:00.000Z
2021-12-31T05:27:46.000Z
__all__=['index']
17
17
0.705882
__all__=['index']
0
0
0
3b482ba5096f0353db794fc31067b786f093a3f2
2,007
py
Python
tests/conftest.py
skywing/sample-python-sqlalchemy
61513336936dc69030af01409fd746913185ec68
[ "MIT" ]
null
null
null
tests/conftest.py
skywing/sample-python-sqlalchemy
61513336936dc69030af01409fd746913185ec68
[ "MIT" ]
null
null
null
tests/conftest.py
skywing/sample-python-sqlalchemy
61513336936dc69030af01409fd746913185ec68
[ "MIT" ]
null
null
null
from uuid import uuid4 import time import docker import pytest @pytest.fixture(scope='session') def root_directory(request): """Return the project root directory so the docker API can locate the Dockerfile""" return str(request.config.rootdir) @pytest.fixture(scope='session') def session_uuid() -> str: ...
31.857143
105
0.669656
from uuid import uuid4 import time import docker import pytest @pytest.fixture(scope='session') def root_directory(request): """Return the project root directory so the docker API can locate the Dockerfile""" return str(request.config.rootdir) @pytest.fixture(scope='session') def session_uuid() -> str: ...
1,497
0
22
08ae64ebaa1e29c0cdbcf44d39700a32bf2d5aa9
13,428
py
Python
biserici_inlemnite/biserici/migrations/0002_auto_20210729_1649.py
ck-tm/biserici-inlemnite
c9d12127b92f25d3ab2fcc7b4c386419fe308a4e
[ "MIT" ]
null
null
null
biserici_inlemnite/biserici/migrations/0002_auto_20210729_1649.py
ck-tm/biserici-inlemnite
c9d12127b92f25d3ab2fcc7b4c386419fe308a4e
[ "MIT" ]
null
null
null
biserici_inlemnite/biserici/migrations/0002_auto_20210729_1649.py
ck-tm/biserici-inlemnite
c9d12127b92f25d3ab2fcc7b4c386419fe308a4e
[ "MIT" ]
null
null
null
# Generated by Django 3.1.13 on 2021-07-29 13:49 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
51.646154
188
0.651996
# Generated by Django 3.1.13 on 2021-07-29 13:49 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('bis...
0
13,247
23
165c0a2714c4d1044b6a5ff9ba17edf6cc5fe708
433
py
Python
test/programytest/storage/entities/test_braintree.py
cdoebler1/AIML2
ee692ec5ea3794cd1bc4cc8ec2a6b5e5c20a0d6a
[ "MIT" ]
345
2016-11-23T22:37:04.000Z
2022-03-30T20:44:44.000Z
test/programytest/storage/entities/test_braintree.py
MikeyBeez/program-y
00d7a0c7d50062f18f0ab6f4a041068e119ef7f0
[ "MIT" ]
275
2016-12-07T10:30:28.000Z
2022-02-08T21:28:33.000Z
test/programytest/storage/entities/test_braintree.py
VProgramMist/modified-program-y
f32efcafafd773683b3fe30054d5485fe9002b7d
[ "MIT" ]
159
2016-11-28T18:59:30.000Z
2022-03-20T18:02:44.000Z
import unittest import unittest.mock from programy.storage.entities.braintree import BraintreeStore
30.928571
63
0.732102
import unittest import unittest.mock from programy.storage.entities.braintree import BraintreeStore class BraintreeStoreTests(unittest.TestCase): def test_save_braintree(self): store = BraintreeStore() with self.assertRaises(NotImplementedError): client_context = unittest.mock.Mock()...
258
24
50
6653615b19835c8b23801549af20302977e61fa4
7,750
py
Python
project/lit_gat.py
amorehead/Equivariant-GNNs
4e81136242a4c8905b0e5fc39be5f704a42cc5e1
[ "Apache-2.0" ]
2
2021-10-07T12:53:51.000Z
2022-01-04T19:26:08.000Z
project/lit_gat.py
amorehead/Equivariant-GNNs
4e81136242a4c8905b0e5fc39be5f704a42cc5e1
[ "Apache-2.0" ]
null
null
null
project/lit_gat.py
amorehead/Equivariant-GNNs
4e81136242a4c8905b0e5fc39be5f704a42cc5e1
[ "Apache-2.0" ]
null
null
null
import os import pytorch_lightning as pl from dgl.nn.pytorch import GATConv from pytorch_lightning.callbacks import ModelCheckpoint, EarlyStopping, LearningRateMonitor from torch.nn import BCEWithLogitsLoss, ModuleList from torch.nn.functional import elu from torch.optim import Adam from torchmetrics import F1 from p...
34.753363
118
0.638452
import os import pytorch_lightning as pl from dgl.nn.pytorch import GATConv from pytorch_lightning.callbacks import ModelCheckpoint, EarlyStopping, LearningRateMonitor from torch.nn import BCEWithLogitsLoss, ModuleList from torch.nn.functional import elu from torch.optim import Adam from torchmetrics import F1 from p...
2,511
0
104
66272a0a136759af8b432234302a33adf2071b04
2,776
py
Python
lib/request.py
jtowers/dxmate
ffaedb295996c1b4ac8fab4c707944a9c42afd04
[ "MIT" ]
1
2017-08-30T18:11:45.000Z
2017-08-30T18:11:45.000Z
lib/request.py
jtowers/dxmate
ffaedb295996c1b4ac8fab4c707944a9c42afd04
[ "MIT" ]
null
null
null
lib/request.py
jtowers/dxmate
ffaedb295996c1b4ac8fab4c707944a9c42afd04
[ "MIT" ]
null
null
null
#MIT License # #Copyright (c) 2017 Tom van Ommeren # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, pu...
32.658824
79
0.701369
#MIT License # #Copyright (c) 2017 Tom van Ommeren # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, pu...
1,049
558
22
1cc74c0b296a410aa72393543d7d7a0a6d5c05d3
2,677
py
Python
celery_queue/tests/permits_data_generator.py
olmax99/pyathenastack
de2a646bf99be9d5c45bf771f73a6f0ef81c6227
[ "Unlicense" ]
2
2019-10-17T14:48:50.000Z
2019-10-20T12:24:41.000Z
celery_queue/tests/permits_data_generator.py
olmax99/dockerflaskapi
de2a646bf99be9d5c45bf771f73a6f0ef81c6227
[ "Unlicense" ]
1
2021-06-02T00:20:51.000Z
2021-06-02T00:20:51.000Z
celery_queue/tests/permits_data_generator.py
olmax99/pyathenastack
de2a646bf99be9d5c45bf771f73a6f0ef81c6227
[ "Unlicense" ]
null
null
null
import json import string import time import pandas as pd from datetime import timedelta, datetime from random import randint, uniform, choice, randrange, choices def random_time_range(start, end, file_format, prop): """Get a time at a proportion of a range of two formatted times. start and end should be st...
36.671233
149
0.632798
import json import string import time import pandas as pd from datetime import timedelta, datetime from random import randint, uniform, choice, randrange, choices def random_time_range(start, end, file_format, prop): """Get a time at a proportion of a range of two formatted times. start and end should be st...
1,388
0
46
54cbc9bb73024d3df7a8e1085379001ed6e056c2
19,756
py
Python
optimus/engines/pandas/ml/models.py
niallscc/Optimus
35218401556e5acc4beb2859084128ebcd1ab4e5
[ "Apache-2.0" ]
null
null
null
optimus/engines/pandas/ml/models.py
niallscc/Optimus
35218401556e5acc4beb2859084128ebcd1ab4e5
[ "Apache-2.0" ]
null
null
null
optimus/engines/pandas/ml/models.py
niallscc/Optimus
35218401556e5acc4beb2859084128ebcd1ab4e5
[ "Apache-2.0" ]
null
null
null
from time import time import joblib import matplotlib.pyplot as plt import numpy as np from sklearn import decomposition from sklearn import metrics from sklearn.cluster import KMeans from sklearn.decomposition import PCA from sklearn.ensemble import RandomForestRegressor from sklearn.linear_model import LinearRegressi...
38.286822
131
0.588328
from time import time import joblib import matplotlib.pyplot as plt import numpy as np from sklearn import decomposition from sklearn import metrics from sklearn.cluster import KMeans from sklearn.decomposition import PCA from sklearn.ensemble import RandomForestRegressor from sklearn.linear_model import LinearRegressi...
8,220
10,555
46
f2c7ced1309974aa41278df072ebf59305bb8d14
1,238
py
Python
investmentGame/User.py
tobiaskamphuis/Investment-game
7042f0527ea5e046f6ffbe73097996e94c8bb559
[ "MIT" ]
null
null
null
investmentGame/User.py
tobiaskamphuis/Investment-game
7042f0527ea5e046f6ffbe73097996e94c8bb559
[ "MIT" ]
1
2021-06-02T00:46:12.000Z
2021-06-02T00:46:12.000Z
investmentGame/User.py
tobiaskamphuis/Investment-game
7042f0527ea5e046f6ffbe73097996e94c8bb559
[ "MIT" ]
null
null
null
from investmentGame.Order import Order #from investmentGame.Portfolio import Portfolio from sqlalchemy import Column, Integer, String, Boolean from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declarative_base from investmentGame.db import Base #User(name='Jeroen', age=26, balance=20)#, p...
36.411765
104
0.727787
from investmentGame.Order import Order #from investmentGame.Portfolio import Portfolio from sqlalchemy import Column, Integer, String, Boolean from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declarative_base from investmentGame.db import Base class User(Base): __tablename__ = "users"...
113
718
23
5e9710be8a6532e1f5e1f35a5c81a287842bb736
949
py
Python
.hooks/jira_id/jira_id_check.py
mikbhub/pre-commit-pipeline
cf80bcfdc3cdd378a7473fac45890b38a88bbaa0
[ "Apache-2.0" ]
null
null
null
.hooks/jira_id/jira_id_check.py
mikbhub/pre-commit-pipeline
cf80bcfdc3cdd378a7473fac45890b38a88bbaa0
[ "Apache-2.0" ]
null
null
null
.hooks/jira_id/jira_id_check.py
mikbhub/pre-commit-pipeline
cf80bcfdc3cdd378a7473fac45890b38a88bbaa0
[ "Apache-2.0" ]
null
null
null
import re import sys JIRA_ID_REGEX = re.compile(r"[A-Z]+-\d+") MISSING_JIRA_ID_MSG = """ Commit message is missing [JIRA task id]. Include [JIRA task id] in commit message, like so: ################################# ABC-123 this is my commit message ################################# where ABC-123 is a sample [JIRA t...
26.361111
97
0.679663
import re import sys JIRA_ID_REGEX = re.compile(r"[A-Z]+-\d+") MISSING_JIRA_ID_MSG = """ Commit message is missing [JIRA task id]. Include [JIRA task id] in commit message, like so: ################################# ABC-123 this is my commit message ################################# where ABC-123 is a sample [JIRA t...
83
0
23
1750cfbf173ab7f2a53b410c1505978c8aa64cbf
809
py
Python
invenio_records_lom/services/permissions.py
tu-graz-library/invenio-records-lom
c811506e51a1ed15d11cf10d6e6ef83a4ecc202b
[ "MIT" ]
null
null
null
invenio_records_lom/services/permissions.py
tu-graz-library/invenio-records-lom
c811506e51a1ed15d11cf10d6e6ef83a4ecc202b
[ "MIT" ]
18
2020-10-21T07:58:14.000Z
2022-03-29T12:10:25.000Z
invenio_records_lom/services/permissions.py
tu-graz-library/invenio-records-lom
c811506e51a1ed15d11cf10d6e6ef83a4ecc202b
[ "MIT" ]
7
2020-10-06T08:46:40.000Z
2021-07-06T13:21:29.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2021 Graz University of Technology. # # invenio-records-lom is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Permission-config classes for LOMRecordService-objects.""" from invenio_records_p...
33.708333
83
0.763906
# -*- coding: utf-8 -*- # # Copyright (C) 2021 Graz University of Technology. # # invenio-records-lom is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Permission-config classes for LOMRecordService-objects.""" from invenio_records_p...
0
0
0
90a28856cd405554c342c82c85972e08614b06b1
235
py
Python
exercicios_basico/ex031.py
montalvas/python
483c2097f6f91bfae127dafcb63e3006eeecad1d
[ "MIT" ]
null
null
null
exercicios_basico/ex031.py
montalvas/python
483c2097f6f91bfae127dafcb63e3006eeecad1d
[ "MIT" ]
null
null
null
exercicios_basico/ex031.py
montalvas/python
483c2097f6f91bfae127dafcb63e3006eeecad1d
[ "MIT" ]
null
null
null
# Leia a distancia da viagem e calcule o valor da passagem d = float(input('Informe a distância da sua viagem: ')) if d <= 200: p = d * 0.5 else: p = d * 0.45 print('Para uma viagem de {}, você pagará R$ {:.2f}'.format(d, p))
26.111111
66
0.617021
# Leia a distancia da viagem e calcule o valor da passagem d = float(input('Informe a distância da sua viagem: ')) if d <= 200: p = d * 0.5 else: p = d * 0.45 print('Para uma viagem de {}, você pagará R$ {:.2f}'.format(d, p))
0
0
0
c2597afd0a5d07d6c5b7345ac096cc31a1c1a631
1,322
py
Python
tests/tests_unit/test_evaluator.py
vegarsti/toydb
4d94afd010aa53e1ba859ff74309e8aa5b091dc6
[ "Apache-2.0" ]
1
2020-05-27T17:11:58.000Z
2020-05-27T17:11:58.000Z
tests/tests_unit/test_evaluator.py
vegarsti/toydb
4d94afd010aa53e1ba859ff74309e8aa5b091dc6
[ "Apache-2.0" ]
11
2020-05-25T12:58:47.000Z
2020-06-27T20:02:08.000Z
tests/tests_unit/test_evaluator.py
vegarsti/toydb
4d94afd010aa53e1ba859ff74309e8aa5b091dc6
[ "Apache-2.0" ]
null
null
null
from typing import List, Optional, Union from vgdb.evaluator import Evaluator from vgdb.lexer import Lexer from vgdb.parser import Parser from vgdb.statement import CreateTable, Insert, Select from vgdb.table import Table
36.722222
73
0.653555
from typing import List, Optional, Union from vgdb.evaluator import Evaluator from vgdb.lexer import Lexer from vgdb.parser import Parser from vgdb.statement import CreateTable, Insert, Select from vgdb.table import Table class TestEvaluator: def test_eval_persistent(self): user_input = "select * from fa...
1,023
-1
76
40c65e5f8ced90a996ab54a4df74d1774a76b8a6
3,455
py
Python
tests/ut/python/train/summary/test_summary_abnormal_input.py
doc22940/mindspore
21bcdcd8adb97b9171b2822a7ed2c4c138c99607
[ "Apache-2.0" ]
1
2020-05-13T11:31:21.000Z
2020-05-13T11:31:21.000Z
tests/ut/python/train/summary/test_summary_abnormal_input.py
doc22940/mindspore
21bcdcd8adb97b9171b2822a7ed2c4c138c99607
[ "Apache-2.0" ]
null
null
null
tests/ut/python/train/summary/test_summary_abnormal_input.py
doc22940/mindspore
21bcdcd8adb97b9171b2822a7ed2c4c138c99607
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
26.782946
78
0.690304
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
1,715
0
137
59ffaa9c898e6572833a239893975e0326d5b07f
2,752
py
Python
tccli/main.py
tencentcloudapi-test/tencentcloud-cli
da9733765df2b405b83b7acff48256f31e053ab1
[ "Apache-2.0" ]
null
null
null
tccli/main.py
tencentcloudapi-test/tencentcloud-cli
da9733765df2b405b83b7acff48256f31e053ab1
[ "Apache-2.0" ]
null
null
null
tccli/main.py
tencentcloudapi-test/tencentcloud-cli
da9733765df2b405b83b7acff48256f31e053ab1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import _locale _locale._getdefaultlocale = (lambda *args: ['zh_CN', 'utf8']) import io import os import sys import six import signal from tccli.log import init from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException try: reload(sys) # Python 2.7 ...
29.276596
119
0.623183
# -*- coding: utf-8 -*- import _locale _locale._getdefaultlocale = (lambda *args: ['zh_CN', 'utf8']) import io import os import sys import six import signal from tccli.log import init from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException try: reload(sys) # Python 2.7 ...
1,770
0
23
119bd88f6a2a23262c07711b0a989a2a0fbd150a
621
py
Python
thebookgarden/thebookgarden/utils.py
ArsalanJamali/TheBookGarden
153bfa229cd897b19b9e0827acc06dbe63558174
[ "MIT" ]
null
null
null
thebookgarden/thebookgarden/utils.py
ArsalanJamali/TheBookGarden
153bfa229cd897b19b9e0827acc06dbe63558174
[ "MIT" ]
null
null
null
thebookgarden/thebookgarden/utils.py
ArsalanJamali/TheBookGarden
153bfa229cd897b19b9e0827acc06dbe63558174
[ "MIT" ]
null
null
null
from product_app.models import Book
31.05
71
0.647343
from product_app.models import Book def get_new_cart_items_subtotal(cart): purchased_book_list=[] quantity_of_book=[] subtotal=0 for item_pk,item_quantity in cart.items(): item_pk=int(item_pk) item_quantity=int(item_quantity) obj=None try: obj=Book.objects.get...
555
0
30
15d5e919f0c7c7fe28b3306ba1b0783fb33d3e10
69
py
Python
pinterest/users/models/__init__.py
platzi-pinterest/backend
6a6cb4f8cbc4c8ad01e184264486ae466f403059
[ "MIT" ]
null
null
null
pinterest/users/models/__init__.py
platzi-pinterest/backend
6a6cb4f8cbc4c8ad01e184264486ae466f403059
[ "MIT" ]
null
null
null
pinterest/users/models/__init__.py
platzi-pinterest/backend
6a6cb4f8cbc4c8ad01e184264486ae466f403059
[ "MIT" ]
null
null
null
from .user import User # noqa from .profiles import Profile # noqa
23
37
0.73913
from .user import User # noqa from .profiles import Profile # noqa
0
0
0
692835eb29be0beda0d5ed2785598cce849598f5
185
py
Python
tmp/ve_asus-rt-n14uhp-mrtg/bin/django-admin.py
jasonwee/asus-rt-n14uhp-mrtg
4fa96c3406e32ea6631ce447db6d19d70b2cd061
[ "Apache-2.0" ]
3
2018-08-14T09:33:52.000Z
2022-03-21T12:31:58.000Z
tmp/ve_asus-rt-n14uhp-mrtg/bin/django-admin.py
jasonwee/asus-rt-n14uhp-mrtg
4fa96c3406e32ea6631ce447db6d19d70b2cd061
[ "Apache-2.0" ]
null
null
null
tmp/ve_asus-rt-n14uhp-mrtg/bin/django-admin.py
jasonwee/asus-rt-n14uhp-mrtg
4fa96c3406e32ea6631ce447db6d19d70b2cd061
[ "Apache-2.0" ]
null
null
null
#!/home/jason/oss/asus-rt-n14uhp-mrtg/tmp/ve_asus-rt-n14uhp-mrtg/bin/python3.4 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
30.833333
78
0.778378
#!/home/jason/oss/asus-rt-n14uhp-mrtg/tmp/ve_asus-rt-n14uhp-mrtg/bin/python3.4 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
0
0
0
736a2afe3408ac6e2f3ed6cdcb49049f80c12c0c
3,817
py
Python
cheesecake/logger.py
griggheo/cheesecake
2b7aa5c980e8becb163cbcb801b202b17f715054
[ "CNRI-Python-GPL-Compatible" ]
12
2015-01-15T01:13:42.000Z
2022-03-04T21:14:27.000Z
cheesecake/logger.py
griggheo/cheesecake
2b7aa5c980e8becb163cbcb801b202b17f715054
[ "CNRI-Python-GPL-Compatible" ]
6
2015-01-19T19:46:51.000Z
2019-02-05T20:20:26.000Z
cheesecake/logger.py
griggheo/cheesecake
2b7aa5c980e8becb163cbcb801b202b17f715054
[ "CNRI-Python-GPL-Compatible" ]
3
2015-10-24T20:08:09.000Z
2019-02-04T20:53:21.000Z
from __future__ import print_function import sys import re ######################################################## ############### PRODUCERS ############################## ######################################################## class Producer(object): """ Log producer API which sends messages to be logged ...
29.361538
75
0.566675
from __future__ import print_function import sys import re ######################################################## ############### PRODUCERS ############################## ######################################################## class Message(object): def __init__(self, keywords, args): self.keywords = ...
2,482
7
559