hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
7904fd2e64a726da8dffb8b826b5534ad68a94f5
10,351
py
Python
crf-seq/sets/sets/4/seq_detect_1p.py
roma-patel/lstm-crf
25012b1218b60090f467fe5ed5a15d7a28b3134c
[ "Apache-2.0" ]
1
2020-02-24T06:25:17.000Z
2020-02-24T06:25:17.000Z
crf-seq/sets/sets/4/seq_detect_1p.py
roma-patel/lstm-crf
25012b1218b60090f467fe5ed5a15d7a28b3134c
[ "Apache-2.0" ]
null
null
null
crf-seq/sets/sets/4/seq_detect_1p.py
roma-patel/lstm-crf
25012b1218b60090f467fe5ed5a15d7a28b3134c
[ "Apache-2.0" ]
null
null
null
import pycrfsuite import sklearn from itertools import chain from sklearn.metrics import classification_report, confusion_matrix from sklearn.preprocessing import LabelBinarizer import re import json annotypes = ['Participants', 'Intervention', 'Outcome'] annotype = annotypes[0] path = '/nlp/data/romap/crf/' #path = '...
38.195572
130
0.575983
import pycrfsuite import sklearn from itertools import chain from sklearn.metrics import classification_report, confusion_matrix from sklearn.preprocessing import LabelBinarizer import re import json annotypes = ['Participants', 'Intervention', 'Outcome'] annotype = annotypes[0] path = '/nlp/data/romap/crf/' def run...
false
true
7904fd41e8a90447ad7f352d2062faa044f1b8b9
266,956
py
Python
run_slurm.py
wang3702/barlowtwins
6d1dc9d31f8f3c87fa4148b7dada0fe9e34805d1
[ "MIT" ]
null
null
null
run_slurm.py
wang3702/barlowtwins
6d1dc9d31f8f3c87fa4148b7dada0fe9e34805d1
[ "MIT" ]
null
null
null
run_slurm.py
wang3702/barlowtwins
6d1dc9d31f8f3c87fa4148b7dada0fe9e34805d1
[ "MIT" ]
null
null
null
import os import argparse from ops.os_operation import mkdir import time def write_slurm_sh_multi_H2(id,command_line, queue_name="learnfair",nodes=1, gpu_per_node=8,wall_time=3*24*60,username="wang3702",CPU_PER_GPU=8): import time import datetime today = datetime.date.today() formatt...
72.542391
156
0.428224
import os import argparse from ops.os_operation import mkdir import time def write_slurm_sh_multi_H2(id,command_line, queue_name="learnfair",nodes=1, gpu_per_node=8,wall_time=3*24*60,username="wang3702",CPU_PER_GPU=8): import time import datetime today = datetime.date.today() formatt...
true
true
7904fecb154ee2a0af2ff7337197693527639f0d
1,698
py
Python
simone/settings/dev.py
ross/simone
cfee8eaa04a7ddd235f735fa6c07adac28b4c6a4
[ "MIT" ]
null
null
null
simone/settings/dev.py
ross/simone
cfee8eaa04a7ddd235f735fa6c07adac28b4c6a4
[ "MIT" ]
1
2021-11-04T13:47:28.000Z
2021-11-04T13:47:28.000Z
simone/settings/dev.py
ross/simone
cfee8eaa04a7ddd235f735fa6c07adac28b4c6a4
[ "MIT" ]
1
2021-10-20T14:44:19.000Z
2021-10-20T14:44:19.000Z
from os import environ from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent.parent DEBUG = True CRON_ENABLED = False if 'SIMONE_DB_NAME' in environ: DATABASES = { 'default': { 'ENGINE': 'mysql.connector.d...
25.727273
73
0.490577
from os import environ from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent.parent DEBUG = True CRON_ENABLED = False if 'SIMONE_DB_NAME' in environ: DATABASES = { 'default': { 'ENGINE': 'mysql.connector.django', 'NAME': environ['SIMONE_DB_NAME'], ...
true
true
7904ff9df1b6a7e4e34577ff9020c0fdc24279c7
884
py
Python
starter_code/migrations/versions/eb02de174736_.py
nkatwesigye/project_furry
df6e2cb2e71cec44f1d8dc31f3955055f2be511c
[ "Apache-2.0" ]
null
null
null
starter_code/migrations/versions/eb02de174736_.py
nkatwesigye/project_furry
df6e2cb2e71cec44f1d8dc31f3955055f2be511c
[ "Apache-2.0" ]
null
null
null
starter_code/migrations/versions/eb02de174736_.py
nkatwesigye/project_furry
df6e2cb2e71cec44f1d8dc31f3955055f2be511c
[ "Apache-2.0" ]
null
null
null
"""empty message Revision ID: eb02de174736 Revises: c0de0819f9f0 Create Date: 2020-02-04 18:29:57.302993 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'eb02de174736' down_revision = 'c0de0819f9f0' branch_labels = None depends_on = None def upgrade(): # ...
25.257143
69
0.644796
from alembic import op import sqlalchemy as sa revision = 'eb02de174736' down_revision = 'c0de0819f9f0' branch_labels = None depends_on = None def upgrade(): )
true
true
790500ca58f7532d0cdf20ac5ee364b9dd209ad0
970
py
Python
whoami.py
lmanul/awty
10b1844a0eaf12dd47d4a84eca32a0c7d947f538
[ "Apache-2.0" ]
null
null
null
whoami.py
lmanul/awty
10b1844a0eaf12dd47d4a84eca32a0c7d947f538
[ "Apache-2.0" ]
null
null
null
whoami.py
lmanul/awty
10b1844a0eaf12dd47d4a84eca32a0c7d947f538
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2011 Google Inc. # # 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 o...
27.714286
88
0.736082
mport users from google.appengine.ext import webapp from util import * import webapp2 class WhoAmIHandler(webapp2.RequestHandler): def get(self): self.response.out.write(Util.getUsernameFromEmail(users.get_current_user().email())) app = webapp2.WSGIApplication( [ ('/whoami', WhoAmIHandl...
true
true
7905021a4511341a4731d142f2c60743cf730a1f
640
py
Python
blog/admin.py
jinjf553/mysite
e6c936ba6cd3e89d13434ff3f42a858e96231cae
[ "MIT" ]
1
2020-01-20T14:49:44.000Z
2020-01-20T14:49:44.000Z
blog/admin.py
jinjf553/mysite
e6c936ba6cd3e89d13434ff3f42a858e96231cae
[ "MIT" ]
null
null
null
blog/admin.py
jinjf553/mysite
e6c936ba6cd3e89d13434ff3f42a858e96231cae
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from account.models import UserProfile from blog.models import BlogArticles class BlogArticlesAdmin(admin.ModelAdmin): list_display = ("title", "author", "publish") list_filter = ("publish", "author") search_fields = ("title", "body") raw_...
24.615385
52
0.715625
from django.contrib import admin from account.models import UserProfile from blog.models import BlogArticles class BlogArticlesAdmin(admin.ModelAdmin): list_display = ("title", "author", "publish") list_filter = ("publish", "author") search_fields = ("title", "body") raw_id_fields = ("author",) ...
true
true
790502f1b0341d383af2e685a4180c3273801f40
506
py
Python
2020/day09.py
iKevinY/advent
d160fb711a0a4d671f53cbd61088117e7ff0276a
[ "MIT" ]
11
2019-12-03T06:32:37.000Z
2021-12-24T12:23:57.000Z
2020/day09.py
iKevinY/advent
d160fb711a0a4d671f53cbd61088117e7ff0276a
[ "MIT" ]
null
null
null
2020/day09.py
iKevinY/advent
d160fb711a0a4d671f53cbd61088117e7ff0276a
[ "MIT" ]
1
2019-12-07T06:21:31.000Z
2019-12-07T06:21:31.000Z
import fileinput from itertools import permutations SEQ = [int(x) for x in fileinput.input()] LEN = 25 for i in range(LEN, len(SEQ)): for x, y in permutations(SEQ[i-LEN:i], 2): if x + y == SEQ[i]: break else: INVALID = SEQ[i] print "Part 1:", INVALID break for n in...
22
62
0.529644
import fileinput from itertools import permutations SEQ = [int(x) for x in fileinput.input()] LEN = 25 for i in range(LEN, len(SEQ)): for x, y in permutations(SEQ[i-LEN:i], 2): if x + y == SEQ[i]: break else: INVALID = SEQ[i] print "Part 1:", INVALID break for n in...
false
true
790504406794d9ba01c6c6442dd9b3b489661732
3,495
py
Python
minette/tagger/mecabservice.py
uezo/minette-python
dd8cd7d244b6e6e4133c8e73d637ded8a8c6846f
[ "Apache-2.0" ]
31
2017-12-18T15:35:42.000Z
2021-12-16T07:27:33.000Z
minette/tagger/mecabservice.py
uezo/minette-python
dd8cd7d244b6e6e4133c8e73d637ded8a8c6846f
[ "Apache-2.0" ]
17
2017-07-13T22:25:08.000Z
2020-11-02T14:19:32.000Z
minette/tagger/mecabservice.py
uezo/minette-python
dd8cd7d244b6e6e4133c8e73d637ded8a8c6846f
[ "Apache-2.0" ]
2
2017-09-14T09:28:35.000Z
2021-01-17T12:31:54.000Z
""" Tagger using mecab-service """ import traceback import requests from ..models import WordNode from .base import Tagger class MeCabServiceNode(WordNode): """ Parsed word node by MeCabServiceTagger Attributes ---------- surface : str Surface of word part : str Part of the w...
26.477273
77
0.5402
import traceback import requests from ..models import WordNode from .base import Tagger class MeCabServiceNode(WordNode): @classmethod def create(cls, surface, features): return cls( surface=surface, part=features["part"], part_detail1=features["part_detail1"], ...
true
true
7905045aeaa6fbc76470b2a1bfaeeae461aaf147
545
py
Python
snaps/views.py
thuitafaith/My-gallery
7a752e4bfe6180d052336da364d0658306eefefe
[ "MIT" ]
null
null
null
snaps/views.py
thuitafaith/My-gallery
7a752e4bfe6180d052336da364d0658306eefefe
[ "MIT" ]
null
null
null
snaps/views.py
thuitafaith/My-gallery
7a752e4bfe6180d052336da364d0658306eefefe
[ "MIT" ]
null
null
null
from django.shortcuts import render,redirect from .models import Image,Location,Category # Create your views here. def intro(request): images = Image.objects.all() return render(request, 'intro.html',{'images':images}) def search_results(request): if 'image' in request.GET and request.GET["image"]: ...
38.928571
89
0.713761
from django.shortcuts import render,redirect from .models import Image,Location,Category def intro(request): images = Image.objects.all() return render(request, 'intro.html',{'images':images}) def search_results(request): if 'image' in request.GET and request.GET["image"]: search_term = request.GE...
true
true
790504a29ba2e1d53b75d3f3ec6fffc60661f7ed
2,373
py
Python
conf.py
Hiestaa/miniboard-factorio-manager
9ff5f1f063f17c0eaa47f43ac05bce0e74d90d45
[ "MIT" ]
null
null
null
conf.py
Hiestaa/miniboard-factorio-manager
9ff5f1f063f17c0eaa47f43ac05bce0e74d90d45
[ "MIT" ]
null
null
null
conf.py
Hiestaa/miniboard-factorio-manager
9ff5f1f063f17c0eaa47f43ac05bce0e74d90d45
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*- from __future__ import unicode_literals import logging import netifaces def getIpWindows(adapteridx): try: import wmi except: logging.error("You must need Win32com (win32 extensions for python)") raise adapters = wmi.WMI().Win32_NetworkAdapt...
29.6625
78
0.552465
from __future__ import unicode_literals import logging import netifaces def getIpWindows(adapteridx): try: import wmi except: logging.error("You must need Win32com (win32 extensions for python)") raise adapters = wmi.WMI().Win32_NetworkAdapter() wlan_int_id =...
true
true
790504e0eb2a1a60919a0445659c40001593891e
577
py
Python
FoodStore/migrations/0003_auto_20191229_0057.py
CPU-sangoma/PlentyPot
27e326f61e57746f5ca6701358d86c01b4a9ee31
[ "MIT" ]
null
null
null
FoodStore/migrations/0003_auto_20191229_0057.py
CPU-sangoma/PlentyPot
27e326f61e57746f5ca6701358d86c01b4a9ee31
[ "MIT" ]
null
null
null
FoodStore/migrations/0003_auto_20191229_0057.py
CPU-sangoma/PlentyPot
27e326f61e57746f5ca6701358d86c01b4a9ee31
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2019-12-28 22:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('FoodStore', '0002_auto_20191209_0246'), ] operations = [ migrations.AddField( model_name='foodhomepagemodel', name='...
24.041667
53
0.601386
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('FoodStore', '0002_auto_20191209_0246'), ] operations = [ migrations.AddField( model_name='foodhomepagemodel', name='PageComplete', field=models.Boolean...
true
true
79050526f511afc82be832ed9640b0142da8eece
219
py
Python
_from_pydot/dev/request_test.py
owasp-sbot/pbx-gs-python-utils
f448aa36c4448fc04d30c3a5b25640ea4d44a267
[ "Apache-2.0" ]
3
2018-12-14T15:43:46.000Z
2019-04-25T07:44:58.000Z
_from_pydot/dev/request_test.py
owasp-sbot/pbx-gs-python-utils
f448aa36c4448fc04d30c3a5b25640ea4d44a267
[ "Apache-2.0" ]
1
2019-05-11T14:19:37.000Z
2019-05-11T14:51:04.000Z
_from_pydot/dev/request_test.py
owasp-sbot/pbx-gs-python-utils
f448aa36c4448fc04d30c3a5b25640ea4d44a267
[ "Apache-2.0" ]
4
2018-12-27T04:54:14.000Z
2019-05-11T14:07:47.000Z
import requests def run(event, context): #return event.get('url') + 'aaa' r = requests.get(event.get('url')) return r.text #return '...**^^.This is a request test for url: {0}'.format(event.get('url'))
27.375
82
0.611872
import requests def run(event, context): r = requests.get(event.get('url')) return r.text
true
true
7905070232812013d675709620df247bfe9e5851
739
py
Python
tests/web/test_jsonrpc.py
spaceone/circuits
ed6d5464f1f83034109ed3d23d126c715450cfd2
[ "MIT" ]
null
null
null
tests/web/test_jsonrpc.py
spaceone/circuits
ed6d5464f1f83034109ed3d23d126c715450cfd2
[ "MIT" ]
null
null
null
tests/web/test_jsonrpc.py
spaceone/circuits
ed6d5464f1f83034109ed3d23d126c715450cfd2
[ "MIT" ]
null
null
null
#!/usr/bin/env python from circuits import Component from circuits.web import JSONRPC, Controller from .helpers import urlopen from .jsonrpclib import ServerProxy class App(Component): def eval(self, s): return eval(s) class Root(Controller): def index(self): return "Hello World!" def t...
18.948718
65
0.645467
from circuits import Component from circuits.web import JSONRPC, Controller from .helpers import urlopen from .jsonrpclib import ServerProxy class App(Component): def eval(self, s): return eval(s) class Root(Controller): def index(self): return "Hello World!" def test(webapp): rpc ...
true
true
790508e269ec2b7f761313c61358469d9f0a0d09
774
py
Python
mopidy_funkwhale/backend.py
gjabell/mopidy-funkwhale
a6ee6435514b2c14eaf3129afaba628e6bad7cb3
[ "Apache-2.0" ]
null
null
null
mopidy_funkwhale/backend.py
gjabell/mopidy-funkwhale
a6ee6435514b2c14eaf3129afaba628e6bad7cb3
[ "Apache-2.0" ]
null
null
null
mopidy_funkwhale/backend.py
gjabell/mopidy-funkwhale
a6ee6435514b2c14eaf3129afaba628e6bad7cb3
[ "Apache-2.0" ]
null
null
null
from mopidy import backend import pykka from mopidy_funkwhale import api, client, library, playback, playlists class FunkwhaleBackend(pykka.ThreadingActor, backend.Backend): def __init__(self, config, audio): super(FunkwhaleBackend, self).__init__() self.api = api.FunkwhaleApi(config) se...
35.181818
75
0.665375
from mopidy import backend import pykka from mopidy_funkwhale import api, client, library, playback, playlists class FunkwhaleBackend(pykka.ThreadingActor, backend.Backend): def __init__(self, config, audio): super(FunkwhaleBackend, self).__init__() self.api = api.FunkwhaleApi(config) se...
true
true
79050926b22e092b980b1342a243c8c9ae322ed0
1,470
py
Python
gpuexperiments/deviceinfo.py
hughperkins/gpu-experiments
3e5064e45682494be97190558807672b602f1c76
[ "BSD-2-Clause" ]
2
2016-07-05T05:52:18.000Z
2018-04-14T07:35:36.000Z
gpuexperiments/deviceinfo.py
hughperkins/gpu-experiments
3e5064e45682494be97190558807672b602f1c76
[ "BSD-2-Clause" ]
null
null
null
gpuexperiments/deviceinfo.py
hughperkins/gpu-experiments
3e5064e45682494be97190558807672b602f1c76
[ "BSD-2-Clause" ]
null
null
null
import pyopencl as cl class DeviceInfo(object): def __init__(self, device): self.compute_units = device.get_info(cl.device_info.MAX_COMPUTE_UNITS) self.maxShared = device.get_info(cl.device_info.LOCAL_MEM_SIZE) // 1024 self.compute_capability = ( device.get_info(cl.device_info....
45.9375
105
0.666667
import pyopencl as cl class DeviceInfo(object): def __init__(self, device): self.compute_units = device.get_info(cl.device_info.MAX_COMPUTE_UNITS) self.maxShared = device.get_info(cl.device_info.LOCAL_MEM_SIZE) // 1024 self.compute_capability = ( device.get_info(cl.device_info....
true
true
790509f88467c24b4bf309f5dc013897bd2f3184
3,602
py
Python
PyMailMainWindow.py
LolsonX/PyMail
85f091dde1e6555f68f090f7b3d49cfde13cc691
[ "MIT" ]
null
null
null
PyMailMainWindow.py
LolsonX/PyMail
85f091dde1e6555f68f090f7b3d49cfde13cc691
[ "MIT" ]
null
null
null
PyMailMainWindow.py
LolsonX/PyMail
85f091dde1e6555f68f090f7b3d49cfde13cc691
[ "MIT" ]
null
null
null
import sys from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QMainWindow, QAction, QMessageBox, QStatusBar from PyMailConfigWindow import ConfigWindow from PyMailReceiverModel import ReceiverModel from PyMailReceiverView import ReceiverView from PyMailSenderModel import SenderModel from PyMailSenderWindow impo...
33.663551
85
0.68573
import sys from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QMainWindow, QAction, QMessageBox, QStatusBar from PyMailConfigWindow import ConfigWindow from PyMailReceiverModel import ReceiverModel from PyMailReceiverView import ReceiverView from PyMailSenderModel import SenderModel from PyMailSenderWindow impo...
true
true
79050ba2ec191ab6f491fb441749fd2e15937ac7
1,122
py
Python
assets/tools/blockfacts.py
Clotonervo/TestCoin
16a97b165fba7a0d85d640e534060c60e7623bc2
[ "MIT" ]
null
null
null
assets/tools/blockfacts.py
Clotonervo/TestCoin
16a97b165fba7a0d85d640e534060c60e7623bc2
[ "MIT" ]
null
null
null
assets/tools/blockfacts.py
Clotonervo/TestCoin
16a97b165fba7a0d85d640e534060c60e7623bc2
[ "MIT" ]
null
null
null
#Shows data from the first 1000 blocks import random import os import subprocess import json #Set this to your raven-cli program cli = "raven-cli" #mode = "-testnet" mode = "" rpc_port = 8746 #Set this information in your raven.conf file (in datadir, not testnet3) rpc_user = 'rpcuser' rpc_pass = 'rpcpass555' def ...
24.391304
75
0.703209
import random import os import subprocess import json cli = "raven-cli" mode = "" rpc_port = 8746 rpc_user = 'rpcuser' rpc_pass = 'rpcpass555' def rpc_call(params): process = subprocess.Popen([cli, mode, params], stdout=subprocess.PIPE) out, err = process.communicate() return(out) def get_blockin...
true
true
79050ba489425a569eff2053b423e362fc9742b5
1,730
py
Python
setup.py
chadrik/doc484
597b421a398f5afcc5feb7abae376820fcc25876
[ "MIT" ]
22
2017-07-24T22:12:01.000Z
2021-10-17T15:52:48.000Z
setup.py
chadrik/doc484
597b421a398f5afcc5feb7abae376820fcc25876
[ "MIT" ]
1
2019-11-07T03:55:34.000Z
2019-11-07T04:08:09.000Z
setup.py
chadrik/doc484
597b421a398f5afcc5feb7abae376820fcc25876
[ "MIT" ]
2
2018-09-25T22:48:16.000Z
2020-04-17T11:41:57.000Z
from setuptools import setup, find_packages import os.path HERE = os.path.abspath(os.path.dirname(__file__)) def read(*parts): with open(os.path.join(HERE, *parts)) as f: return f.read() setup( name="doc484", version="0.3.4", author="Chad Dombrova", description="Generate PEP 484 type co...
29.827586
77
0.590173
from setuptools import setup, find_packages import os.path HERE = os.path.abspath(os.path.dirname(__file__)) def read(*parts): with open(os.path.join(HERE, *parts)) as f: return f.read() setup( name="doc484", version="0.3.4", author="Chad Dombrova", description="Generate PEP 484 type co...
true
true
79050c49a5a2f19a4b9d7a52d76dbcd8f259dc46
191
py
Python
Exercicios/ex002.py
Dobravoski/Exercicios-Python
e7169e1ee6954a7bc9216063845611107a13759f
[ "MIT" ]
null
null
null
Exercicios/ex002.py
Dobravoski/Exercicios-Python
e7169e1ee6954a7bc9216063845611107a13759f
[ "MIT" ]
null
null
null
Exercicios/ex002.py
Dobravoski/Exercicios-Python
e7169e1ee6954a7bc9216063845611107a13759f
[ "MIT" ]
null
null
null
print('\033[1;33m--' * 10) print('\033[1;32m EXERCÍCIO 002') print('\033[1;33m--\033[m' * 10) nome = input('\033[1;34mDigite seu nome: ') print(f'É um prazer te conhecer, \033[1;33m{nome}!')
31.833333
52
0.633508
print('\033[1;33m--' * 10) print('\033[1;32m EXERCÍCIO 002') print('\033[1;33m--\033[m' * 10) nome = input('\033[1;34mDigite seu nome: ') print(f'É um prazer te conhecer, \033[1;33m{nome}!')
true
true
79050d6025b572c53d1183cca6cc50af7bca76a7
967
py
Python
cgi-bin/upload/compress.py
wsampaio/multi_agenda_py
72c9cf4d8b26827a9eba6de3119e63464d312aea
[ "CC-BY-4.0" ]
null
null
null
cgi-bin/upload/compress.py
wsampaio/multi_agenda_py
72c9cf4d8b26827a9eba6de3119e63464d312aea
[ "CC-BY-4.0" ]
null
null
null
cgi-bin/upload/compress.py
wsampaio/multi_agenda_py
72c9cf4d8b26827a9eba6de3119e63464d312aea
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python3 # # Este arquivo é parte do programa multi_agenda # # Esta obra está licenciada com uma # Licença Creative Commons Atribuição 4.0 Internacional. # (CC BY 4.0 Internacional) # # Para ver uma cópia da licença, visite # https://creativecommons.org/licenses/by/4.0/legalcode # # WELLINGTON SAMPAI...
20.574468
61
0.731127
import sys import cgi from os.path import dirname, realpath, sep, pardir sys.path.append((dirname(realpath(__file__)) + sep + pardir)) import cgitb cgitb.enable() import objetos.dbConn.BackupMonitor as bkMonitor form = cgi.FieldStorage() print("Content-type:text/text\r\n\r\n") if "com" in str(fo...
true
true
790510b25ea956c7fe3b519d94fcb59a9d94553f
709
py
Python
main.py
angli66/Image-Captioning
e6f06f3eaa0b4fbb960f5e5fea3f242ebe952c19
[ "MIT" ]
null
null
null
main.py
angli66/Image-Captioning
e6f06f3eaa0b4fbb960f5e5fea3f242ebe952c19
[ "MIT" ]
null
null
null
main.py
angli66/Image-Captioning
e6f06f3eaa0b4fbb960f5e5fea3f242ebe952c19
[ "MIT" ]
null
null
null
################################################################################ # CSE 151B: Programming Assignment 4 # Code snippet by Ajit Kumar, Savyasachi # Updated by Rohin # Winter 2022 ################################################################################ from experiment import Experiment import sys ...
30.826087
106
0.545839
true
true
790510db3d3f8ec9b7320bb3ab6214b87ae4dbe3
10,991
py
Python
homeassistant/components/xiaomi_aqara.py
zanerv/home-assistant
aabc4d0bf488ba6d3035383fd22f891118b3e61b
[ "Apache-2.0" ]
null
null
null
homeassistant/components/xiaomi_aqara.py
zanerv/home-assistant
aabc4d0bf488ba6d3035383fd22f891118b3e61b
[ "Apache-2.0" ]
null
null
null
homeassistant/components/xiaomi_aqara.py
zanerv/home-assistant
aabc4d0bf488ba6d3035383fd22f891118b3e61b
[ "Apache-2.0" ]
null
null
null
""" Support for Xiaomi Gateways. For more details about this component, please refer to the documentation at https://home-assistant.io/components/xiaomi_aqara/ """ import logging from datetime import timedelta import voluptuous as vol from homeassistant.components.discovery import SERVICE_XIAOMI_GW from homeassista...
33.006006
77
0.672186
import logging from datetime import timedelta import voluptuous as vol from homeassistant.components.discovery import SERVICE_XIAOMI_GW from homeassistant.const import ( ATTR_BATTERY_LEVEL, CONF_HOST, CONF_MAC, CONF_PORT, EVENT_HOMEASSISTANT_STOP) from homeassistant.core import callback from homeassistant.he...
true
true
790510ff384984529640b134febeb8ef025d5866
2,689
py
Python
insomniac/__init__.py
felipe4334/Insomniac
8e405ee65c995f90650dfeac682d4ae3cf730b23
[ "MIT" ]
null
null
null
insomniac/__init__.py
felipe4334/Insomniac
8e405ee65c995f90650dfeac682d4ae3cf730b23
[ "MIT" ]
null
null
null
insomniac/__init__.py
felipe4334/Insomniac
8e405ee65c995f90650dfeac682d4ae3cf730b23
[ "MIT" ]
null
null
null
import argparse import json import insomniac.__version__ as __version__ from insomniac import network from insomniac.activation import activation_controller from insomniac.network import HTTP_OK from insomniac.params import parse_arguments from insomniac.utils import * def run(activation_code="", starter_conf_file_p...
34.922078
113
0.755299
import argparse import json import insomniac.__version__ as __version__ from insomniac import network from insomniac.activation import activation_controller from insomniac.network import HTTP_OK from insomniac.params import parse_arguments from insomniac.utils import * def run(activation_code="", starter_conf_file_p...
true
true
790512962a88642aac0fd289c5d4f2976e7fe28a
2,091
py
Python
PredictPrice.py
AlirezaMojtabavi/Predict-Price-of-an-Apartment-in-Tehran
1b9a7ede8369f31954ba274ef9cb9a4d5ab1762a
[ "MIT" ]
null
null
null
PredictPrice.py
AlirezaMojtabavi/Predict-Price-of-an-Apartment-in-Tehran
1b9a7ede8369f31954ba274ef9cb9a4d5ab1762a
[ "MIT" ]
null
null
null
PredictPrice.py
AlirezaMojtabavi/Predict-Price-of-an-Apartment-in-Tehran
1b9a7ede8369f31954ba274ef9cb9a4d5ab1762a
[ "MIT" ]
null
null
null
import numpy import mysql.connector from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import OneHotEncoder from sklearn import tree ##--------------------------Catch Data from data base-------------------------------- cnx = mysql.connector.connect(user = [type your user] , password = ...
29.450704
148
0.66045
import numpy import mysql.connector from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import OneHotEncoder from sklearn import tree word] , host = [type your host] , database = [type your database name] ) cur = cnx.cursor() cur.execute("SELECT Ne...
false
true
7905143833768dd4a20fbcee397f1603b72fdf21
1,101
py
Python
src/app/fs.py
sgavka/multi_public_poll_bot
b20dd2b205312370ac10c176a547cf2d104519c7
[ "MIT" ]
19
2018-08-07T13:25:03.000Z
2021-02-13T14:40:18.000Z
src/app/fs.py
sgavka/multi_public_poll_bot
b20dd2b205312370ac10c176a547cf2d104519c7
[ "MIT" ]
1
2019-06-13T22:21:19.000Z
2019-12-17T16:41:00.000Z
src/app/fs.py
sgavka/multi_public_poll_bot
b20dd2b205312370ac10c176a547cf2d104519c7
[ "MIT" ]
7
2018-04-24T17:08:15.000Z
2021-11-12T11:37:44.000Z
""" file system and database initialization. tables: - polls: - id PRIMARY KEY - owner_id => users.id - topic - users: - id PRIMARY KEY - first_name - last_name - username - answers: - id PRIMARY KEY - poll_id => polls.id - text - votes: - user_id => users.id - poll_id => polls.id - answer...
19.315789
62
0.679382
import os from os.path import expanduser, join from yoyo import get_backend, read_migrations from . import log logger = log.getLogger('app.fs') DATA_DIR: str = expanduser("~/.local/share/multi_vote_bot") if not os.path.exists(DATA_DIR): logger.info("Creating data dir at path %s", DATA_DIR) os.makedirs(DATA...
true
true
7905150224459f866e184f0f054cc29291b92d46
84
py
Python
baloo/core/indexes/__init__.py
cda-group/baloo
0d442117c2a919b177e0a96024cbdc82762cb646
[ "BSD-3-Clause" ]
11
2018-12-16T00:19:39.000Z
2021-01-06T04:56:02.000Z
baloo/core/indexes/__init__.py
monner/baloo
f6e05e35b73a75e8a300754c6bdc575e5f2d53b9
[ "BSD-3-Clause" ]
6
2019-02-21T23:22:14.000Z
2021-06-01T22:39:32.000Z
baloo/core/indexes/__init__.py
monner/baloo
f6e05e35b73a75e8a300754c6bdc575e5f2d53b9
[ "BSD-3-Clause" ]
6
2019-02-12T14:30:43.000Z
2020-03-15T17:17:56.000Z
from .base import Index from .multi import MultiIndex from .range import RangeIndex
21
29
0.821429
from .base import Index from .multi import MultiIndex from .range import RangeIndex
true
true
790515c8cf3166a993914ebc971c2ce9dcc36d51
4,565
py
Python
horovod/spark/keras/tensorflow.py
zmldndx/horovod
89175b7381e44f5eb3023d7bc22ba768b31fee53
[ "Apache-2.0" ]
4
2019-05-07T06:56:17.000Z
2020-06-02T21:07:50.000Z
horovod/spark/keras/tensorflow.py
kyocen/horovod
e9b1e228ff92eb7f65d9aea2d36f23b327df28bd
[ "Apache-2.0" ]
1
2020-08-14T16:55:36.000Z
2020-09-03T18:32:24.000Z
horovod/spark/keras/tensorflow.py
kyocen/horovod
e9b1e228ff92eb7f65d9aea2d36f23b327df28bd
[ "Apache-2.0" ]
3
2019-09-17T06:09:09.000Z
2022-03-09T03:21:42.000Z
# Copyright 2019 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.686441
87
0.62782
from __future__ import absolute_import import json from six.moves import zip from tensorflow.python.keras import backend as K from tensorflow.python.keras import optimizers from tensorflow.python.platform import tf_logging as logging from tensorflow.python.util import serialization def save_tf_keras_...
true
true
7905160bb3648d032a60702559d06964217e6bdb
66,711
py
Python
ocsmesh/mesh/mesh.py
noaa-ocs-modeling/OCSMesh
d7f97196a0174f3818bfa036a18088acbeff4c78
[ "CC0-1.0" ]
null
null
null
ocsmesh/mesh/mesh.py
noaa-ocs-modeling/OCSMesh
d7f97196a0174f3818bfa036a18088acbeff4c78
[ "CC0-1.0" ]
1
2021-11-19T01:10:10.000Z
2021-11-19T15:39:56.000Z
ocsmesh/mesh/mesh.py
noaa-ocs-modeling/OCSMesh
d7f97196a0174f3818bfa036a18088acbeff4c78
[ "CC0-1.0" ]
1
2021-11-19T00:49:41.000Z
2021-11-19T00:49:41.000Z
"""This module defines classes that handle mesh and mesh operations. This module defines a factory class for mesh, similar to geometry and size function factory class. It also defines concrete mesh types. Currently two concrete mesh types are defined for generic Eucledian mesh and specific 2D Eucledian mesh. """ from ...
31.437795
95
0.548111
from functools import lru_cache import logging from multiprocessing import Pool, cpu_count import os import pathlib from collections import defaultdict import warnings from typing import Union, List, Tuple, Dict, Any, Optional try: from typing import Literal except ImportError: from typing_extensions import Lit...
true
true
7905163a068e8bfb14f01c5b7b0743e77515b108
2,221
py
Python
envs/babyai/oracle/landmark_correction.py
AliengirlLiv/babyai
51421ee11538bf110c5b2d0c84a15f783d854e7d
[ "MIT" ]
2
2022-02-24T08:47:48.000Z
2022-03-23T09:44:22.000Z
envs/babyai/oracle/landmark_correction.py
AliengirlLiv/babyai
51421ee11538bf110c5b2d0c84a15f783d854e7d
[ "MIT" ]
null
null
null
envs/babyai/oracle/landmark_correction.py
AliengirlLiv/babyai
51421ee11538bf110c5b2d0c84a15f783d854e7d
[ "MIT" ]
1
2021-12-27T19:03:38.000Z
2021-12-27T19:03:38.000Z
import numpy as np from envs.babyai.oracle.teacher import Teacher class LandmarkCorrection(Teacher): def empty_feedback(self): """ Return a tensor corresponding to no feedback. """ return np.array([-1, -1]) def random_feedback(self): """ Return a tensor corresp...
39.660714
120
0.638001
import numpy as np from envs.babyai.oracle.teacher import Teacher class LandmarkCorrection(Teacher): def empty_feedback(self): return np.array([-1, -1]) def random_feedback(self): raise NotImplementedError('random feedback not implemented') def compute_feedback(self): ...
true
true
7905175cb5313f14dba18b2ab642aa17679b28db
4,260
py
Python
install/app_store/tk-framework-adminui/v0.1.6/python/setup_project/project_delegate.py
JoanAzpeitia/lp_sg
e0ee79555e419dd2ae3a5f31e5515b3f40b22a62
[ "MIT" ]
null
null
null
install/app_store/tk-framework-adminui/v0.1.6/python/setup_project/project_delegate.py
JoanAzpeitia/lp_sg
e0ee79555e419dd2ae3a5f31e5515b3f40b22a62
[ "MIT" ]
null
null
null
install/app_store/tk-framework-adminui/v0.1.6/python/setup_project/project_delegate.py
JoanAzpeitia/lp_sg
e0ee79555e419dd2ae3a5f31e5515b3f40b22a62
[ "MIT" ]
1
2020-02-15T10:42:56.000Z
2020-02-15T10:42:56.000Z
# Copyright (c) 2013 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to the S...
36.724138
91
0.64507
import sgtk from tank.platform.qt import QtGui from tank.platform.qt import QtCore from . import project_model views = sgtk.platform.import_framework("tk-framework-qtwidgets", "views") class ProjectWidget(QtGui.QFrame): MARGIN = 5 ICON_SIZE = QtCore.QSize(32, 32) def __init__(self, parent=No...
true
true
790517c0469db48faa9be4fb0d00dca9f2d6b7cc
1,262
py
Python
tests/refresh_token/test_mutations.py
bndr/django-graphql-jwt
0b9d7e07ce6d9e7835b1047d54690fd434a2649b
[ "MIT" ]
1
2019-06-19T12:05:08.000Z
2019-06-19T12:05:08.000Z
tests/refresh_token/test_mutations.py
CZZLEGEND/django-graphql-jwt
6e816445b72e7582d0595fda9e7e5d0486026045
[ "MIT" ]
null
null
null
tests/refresh_token/test_mutations.py
CZZLEGEND/django-graphql-jwt
6e816445b72e7582d0595fda9e7e5d0486026045
[ "MIT" ]
null
null
null
import graphene import graphql_jwt from graphql_jwt.refresh_token.mixins import RefreshTokenMixin from ..testcases import SchemaTestCase from . import mixins class TokenAuthTests(mixins.TokenAuthMixin, SchemaTestCase): query = ''' mutation TokenAuth($username: String!, $password: String!) { tokenAuth(...
22.945455
64
0.674326
import graphene import graphql_jwt from graphql_jwt.refresh_token.mixins import RefreshTokenMixin from ..testcases import SchemaTestCase from . import mixins class TokenAuthTests(mixins.TokenAuthMixin, SchemaTestCase): query = ''' mutation TokenAuth($username: String!, $password: String!) { tokenAuth(...
true
true
790517e926b78651705bea9ca3366024ff06fabe
1,415
py
Python
libs/program_options/test/program_options_size_test.py
mike-code/boost_1_38_0
7ff8b2069344ea6b0b757aa1f0778dfb8526df3c
[ "BSL-1.0" ]
4
2021-07-31T13:56:01.000Z
2021-11-13T02:55:10.000Z
libs/program_options/test/program_options_size_test.py
boost-cmake/vintage
dcfb7da3177134eddaee6789d6f582259cb0d6ee
[ "BSL-1.0" ]
1
2018-01-17T10:11:43.000Z
2018-01-17T10:11:43.000Z
libs/program_options/test/program_options_size_test.py
boost-cmake/vintage
dcfb7da3177134eddaee6789d6f582259cb0d6ee
[ "BSL-1.0" ]
7
2021-08-31T14:34:23.000Z
2022-01-19T08:25:58.000Z
#!/usr/bin/python import os import string call = " hook(10);\n"; call = " hook(10); hook2(10);hook3(0);hook4(0);\n"; def run_test(num_calls, compiler_command): f = open("program_options_test.cpp", "w") f.write("""#include <boost/program_options.hpp> using namespace boost::program_options; void do_it()...
26.203704
104
0.601413
import os import string call = " hook(10);\n"; call = " hook(10); hook2(10);hook3(0);hook4(0);\n"; def run_test(num_calls, compiler_command): f = open("program_options_test.cpp", "w") f.write("""#include <boost/program_options.hpp> using namespace boost::program_options; void do_it() { boost::prog...
false
true
7905186c64c946965ba1e31fd8e313ed7c6f8dba
11,407
py
Python
primitives/image_classification/utils/imagenet.py
Yonder-OSS/D3M-Primitives
b5f2c14d2afdadc6e97316aae5dd33fe4b874b09
[ "MIT" ]
null
null
null
primitives/image_classification/utils/imagenet.py
Yonder-OSS/D3M-Primitives
b5f2c14d2afdadc6e97316aae5dd33fe4b874b09
[ "MIT" ]
2
2020-03-25T15:36:39.000Z
2020-03-25T16:32:26.000Z
primitives/image_classification/utils/imagenet.py
Yonder-OSS/D3M-Primitives
b5f2c14d2afdadc6e97316aae5dd33fe4b874b09
[ "MIT" ]
null
null
null
''' Bootstrapped from https://github.com/NewKnowledge/imagenet and refined for D3M purposes Original implementation from Craig Corcoran ''' import os import math import numpy as np import tensorflow as tf from tensorflow.keras.applications import inception_v3, mobilenet_v2, xception from tensorflow.keras.mode...
43.208333
132
0.62111
import os import math import numpy as np import tensorflow as tf from tensorflow.keras.applications import inception_v3, mobilenet_v2, xception from tensorflow.keras.models import Model from tensorflow.keras.layers import Dense, GlobalAveragePooling2D, GlobalMaxPooling2D from tensorflow.keras.utils import to_categoric...
true
true
79051875326eec5af6b3da7e8f20a14dc6f5417e
49,430
py
Python
src/kbnet.py
alexklwong/calibrated-backprojection-network
57dbec03c6da94ee0cd020b6de5f02e7e8ee726e
[ "Intel" ]
38
2021-08-28T06:01:25.000Z
2022-03-03T03:23:23.000Z
src/kbnet.py
alexklwong/calibrated-backprojection-network
57dbec03c6da94ee0cd020b6de5f02e7e8ee726e
[ "Intel" ]
14
2021-11-15T12:30:34.000Z
2022-03-30T14:03:16.000Z
src/kbnet.py
alexklwong/calibrated-backprojection-network
57dbec03c6da94ee0cd020b6de5f02e7e8ee726e
[ "Intel" ]
9
2021-10-19T23:45:07.000Z
2021-12-20T07:45:37.000Z
''' Author: Alex Wong <alexw@cs.ucla.edu> If you use this code, please cite the following paper: A. Wong, and S. Soatto. Unsupervised Depth Completion with Calibrated Backprojection Layers. https://arxiv.org/pdf/2108.10531.pdf @inproceedings{wong2021unsupervised, title={Unsupervised Depth Completion with Calibrate...
38.111025
119
0.654056
import os, time import numpy as np import torch from PIL import Image from torch.utils.tensorboard import SummaryWriter import datasets, data_utils, eval_utils from log_utils import log from kbnet_model import KBNetModel from posenet_model import PoseNetModel import global_constants as settings from transforms import T...
true
true
790518e519f89f3285053fb66cb9445cc0fce99a
508
py
Python
nltk/classify/svm.py
tyomitch/nltk
943b7bb3181118710ea4f22e0b63ce25adfffa08
[ "Apache-2.0" ]
4
2016-05-05T05:39:45.000Z
2019-08-14T01:39:00.000Z
nltk/classify/svm.py
tyomitch/nltk
943b7bb3181118710ea4f22e0b63ce25adfffa08
[ "Apache-2.0" ]
1
2015-10-07T20:45:50.000Z
2015-10-07T22:26:07.000Z
nltk/classify/svm.py
tyomitch/nltk
943b7bb3181118710ea4f22e0b63ce25adfffa08
[ "Apache-2.0" ]
2
2019-02-20T22:37:18.000Z
2020-09-02T20:14:51.000Z
# Natural Language Toolkit: SVM-based classifier # # Copyright (C) 2001-2022 NLTK Project # Author: Leon Derczynski <leon@dcs.shef.ac.uk> # # URL: <https://www.nltk.org/> # For license information, see LICENSE.TXT """ nltk.classify.svm was deprecated. For classification based on support vector machines SVMs use nltk.cl...
28.222222
61
0.73622
class SvmClassifier: def __init__(self, *args, **kwargs): raise NotImplementedError(__doc__)
true
true
7905190283df02131d78042daf455229da69c968
611
py
Python
ops/nms.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
43
2021-06-03T09:07:08.000Z
2022-03-31T15:21:48.000Z
ops/nms.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
64
2021-05-31T10:34:06.000Z
2022-01-17T03:44:58.000Z
ops/nms.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
37
2021-07-04T03:13:18.000Z
2022-03-25T07:30:47.000Z
import oneflow as flow import oneflow as flow_exp from oneflow import Tensor def nms(boxes: Tensor, scores: Tensor, iou_threshold: float) -> Tensor: scores_inds = flow_exp.argsort(scores, dim=0, descending=True) boxes = flow._C.gather(boxes, scores_inds, axis=0) _nms_op = ( flow_exp.builtin_op("nm...
30.55
71
0.648118
import oneflow as flow import oneflow as flow_exp from oneflow import Tensor def nms(boxes: Tensor, scores: Tensor, iou_threshold: float) -> Tensor: scores_inds = flow_exp.argsort(scores, dim=0, descending=True) boxes = flow._C.gather(boxes, scores_inds, axis=0) _nms_op = ( flow_exp.builtin_op("nm...
true
true
790519040488b2751b8ca57d8241ea867d38f82f
6,597
py
Python
modules/youtube_music.py
mavroudo/jarvis-discord
918540a67d7ac48584e8efd6a06385ec5228f4d5
[ "MIT" ]
null
null
null
modules/youtube_music.py
mavroudo/jarvis-discord
918540a67d7ac48584e8efd6a06385ec5228f4d5
[ "MIT" ]
null
null
null
modules/youtube_music.py
mavroudo/jarvis-discord
918540a67d7ac48584e8efd6a06385ec5228f4d5
[ "MIT" ]
null
null
null
import os import discord import youtube_dl as ytdl class MusicPlayer: ''' This module is responsible for connecting and disconnecting the bot from a voice channel, downloading songs from youtube and add them in the queue . Basic music functions like pause, resume, stop and play, in order to give ...
43.117647
120
0.621949
import os import discord import youtube_dl as ytdl class MusicPlayer: def __init__(self): self.queue = [] self.voiceChannel = None self.ydl_opts = { 'format': 'bestaudio/best', 'outtmpl': 'songs/%(title)s-%(id)s.%(ext)s', 'postprocessors':...
true
true
7905193c012a60323d039f462f94f5022d2f795a
1,699
py
Python
app/core/migrations/0001_initial.py
ing-ivan-31/recipe-app
3006f93b7ace6cc6d092af1c18275d9b9e9d9853
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
ing-ivan-31/recipe-app
3006f93b7ace6cc6d092af1c18275d9b9e9d9853
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
ing-ivan-31/recipe-app
3006f93b7ace6cc6d092af1c18275d9b9e9d9853
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2019-05-08 20:45 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='User', fie...
49.970588
266
0.637434
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.AutoField...
true
true
790519b7959d0e8179d7bf9c0c1de569a69fc55a
262
py
Python
HW2/majority_baseline_classifier.py
dompuiu/PROEA-821-005-Spring-2018
cde4a09a3a60b37a332895a524a7a3f63343e601
[ "MIT" ]
null
null
null
HW2/majority_baseline_classifier.py
dompuiu/PROEA-821-005-Spring-2018
cde4a09a3a60b37a332895a524a7a3f63343e601
[ "MIT" ]
null
null
null
HW2/majority_baseline_classifier.py
dompuiu/PROEA-821-005-Spring-2018
cde4a09a3a60b37a332895a524a7a3f63343e601
[ "MIT" ]
null
null
null
from collections import Counter class MajorityBaselineClassifier: @staticmethod def train(_, labels): c = Counter(labels) return c.most_common()[0][0] @staticmethod def predict(_, majority_label): return majority_label
20.153846
36
0.675573
from collections import Counter class MajorityBaselineClassifier: @staticmethod def train(_, labels): c = Counter(labels) return c.most_common()[0][0] @staticmethod def predict(_, majority_label): return majority_label
true
true
790519e8f11a75329366a127f8c433f87f48c4a2
3,891
py
Python
tests/tasks/tasks/instr/test_apply_mag_field_task.py
jerjohste/exopy_hqc_legacy
c746beea6b175697ae3bfdab94309dc872d3d908
[ "BSD-3-Clause" ]
null
null
null
tests/tasks/tasks/instr/test_apply_mag_field_task.py
jerjohste/exopy_hqc_legacy
c746beea6b175697ae3bfdab94309dc872d3d908
[ "BSD-3-Clause" ]
1
2020-03-23T07:53:05.000Z
2020-03-23T07:53:05.000Z
tests/tasks/tasks/instr/test_apply_mag_field_task.py
jerjohste/exopy_hqc_legacy
c746beea6b175697ae3bfdab94309dc872d3d908
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by ExopyHqcLegacy Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ------...
34.131579
84
0.58751
from multiprocessing import Event import pytest import enaml from exopy.tasks.api import RootTask from exopy.tasks.tasks.logic.loop_task import LoopTask from exopy.testing.util import show_and_close_widget from exopy_hqc_legacy.tasks.tasks.instr.apply_mag_field_task\ import ApplyMagFieldTask with enaml.i...
true
true
790519f2c4351574c9ff895f5f1bf4735b184586
10,882
py
Python
monitor2mail.py
bkittler/monitor2mail
e07474f81f954ac7ef8d47b3f4a8185ea9191318
[ "MIT" ]
null
null
null
monitor2mail.py
bkittler/monitor2mail
e07474f81f954ac7ef8d47b3f4a8185ea9191318
[ "MIT" ]
null
null
null
monitor2mail.py
bkittler/monitor2mail
e07474f81f954ac7ef8d47b3f4a8185ea9191318
[ "MIT" ]
null
null
null
#! /usr/bin/env python # coding utf-8 import sys from sys import exit import os import socket import requests import smtplib import ssl import dns.resolver """ Python script to monitor list of url (https/http/ns/mx) and send mail if down""" __author__ = "Benjamin Kittler" __copyright__ = "Copyright 2021, KITTLER" ...
29.096257
96
0.541996
import sys from sys import exit import os import socket import requests import smtplib import ssl import dns.resolver __author__ = "Benjamin Kittler" __copyright__ = "Copyright 2021, KITTLER" __credits__ = ["Benjamin Kittler"] __license__ = "MIT" __version__ = "0.1" __maintainer__ = "Benjamin Kittler" __email__ ...
true
true
790519f577da64a77527e1f709fe47db6b6725cf
14,819
py
Python
mkt/reviewers/models.py
ngokevin/zamboni
a33dcd489175d8e7ba1c02ee4dabb6cfdc405e69
[ "BSD-3-Clause" ]
null
null
null
mkt/reviewers/models.py
ngokevin/zamboni
a33dcd489175d8e7ba1c02ee4dabb6cfdc405e69
[ "BSD-3-Clause" ]
null
null
null
mkt/reviewers/models.py
ngokevin/zamboni
a33dcd489175d8e7ba1c02ee4dabb6cfdc405e69
[ "BSD-3-Clause" ]
null
null
null
import datetime from django.conf import settings from django.core.cache import cache from django.db import models from django.db.models import Sum import commonware.log import waffle import amo import mkt.constants.comm as comm from amo.utils import cache_ns_key from mkt.comm.utils import create_comm_note from mkt.s...
32.569231
81
0.590526
import datetime from django.conf import settings from django.core.cache import cache from django.db import models from django.db.models import Sum import commonware.log import waffle import amo import mkt.constants.comm as comm from amo.utils import cache_ns_key from mkt.comm.utils import create_comm_note from mkt.s...
true
true
79051a49194f4008ee31ecce59aa9ed0c04e3f09
5,667
py
Python
my_configs/new/mmdet/core/evaluation/class_names.py
UESTC-Liuxin/TianChi
d9f50236c2edea56f9520a6887098b469dbb0126
[ "Apache-2.0" ]
null
null
null
my_configs/new/mmdet/core/evaluation/class_names.py
UESTC-Liuxin/TianChi
d9f50236c2edea56f9520a6887098b469dbb0126
[ "Apache-2.0" ]
null
null
null
my_configs/new/mmdet/core/evaluation/class_names.py
UESTC-Liuxin/TianChi
d9f50236c2edea56f9520a6887098b469dbb0126
[ "Apache-2.0" ]
1
2020-06-18T10:05:41.000Z
2020-06-18T10:05:41.000Z
import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor' ] ...
46.834711
84
0.575437
import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor' ] ...
true
true
79051a8255ffcf0096e3e128363c49d05aadf88e
1,641
py
Python
client_mining_p/miner.py
lambda-projects-lafriedel/Blockchain
507d5da1ee2ab86d25e056fec1fcddf024f5b607
[ "MIT" ]
null
null
null
client_mining_p/miner.py
lambda-projects-lafriedel/Blockchain
507d5da1ee2ab86d25e056fec1fcddf024f5b607
[ "MIT" ]
null
null
null
client_mining_p/miner.py
lambda-projects-lafriedel/Blockchain
507d5da1ee2ab86d25e056fec1fcddf024f5b607
[ "MIT" ]
null
null
null
import hashlib import requests import sys def valid_proof(last_proof, proof): guess = f'{last_proof}{proof}'.encode() guess_hash = hashlib.sha256(guess).hexdigest() return guess_hash[:6] == "000000" def proof_of_work(last_proof): """ Simple Proof of Work Algorithm - Find a number p' suc...
29.303571
67
0.61365
import hashlib import requests import sys def valid_proof(last_proof, proof): guess = f'{last_proof}{proof}'.encode() guess_hash = hashlib.sha256(guess).hexdigest() return guess_hash[:6] == "000000" def proof_of_work(last_proof): print(f'\nSearch for proof initialized.\n') proof = 0 wh...
true
true
79051b16cfff283628eada367d42ed2614b0854c
4,322
py
Python
botCmd.py
Bankde/Hack-me-bot
bb5cbc34eb1581a4b17388ac4b824d9a71e52c19
[ "Apache-2.0" ]
7
2018-12-03T02:49:08.000Z
2022-01-30T20:56:43.000Z
botCmd.py
pich4ya/Hack-me-bot
9804bd51337669ed9127c35a2231227338b513c8
[ "Apache-2.0" ]
null
null
null
botCmd.py
pich4ya/Hack-me-bot
9804bd51337669ed9127c35a2231227338b513c8
[ "Apache-2.0" ]
3
2018-12-04T11:10:04.000Z
2018-12-26T03:39:53.000Z
import sqlite3 import os MSG_HELP = """List of commands: !help List commands !listAll List all animals !show <animal> Give description !getFlag Give flag (Admin only) !serverInfo Give server info (Dragonite only) !addAdmin <id> Make user an admin (Dragonite only) !hint Give you a hint. Sou...
29.401361
86
0.621472
import sqlite3 import os MSG_HELP = """List of commands: !help List commands !listAll List all animals !show <animal> Give description !getFlag Give flag (Admin only) !serverInfo Give server info (Dragonite only) !addAdmin <id> Make user an admin (Dragonite only) !hint Give you a hint. Sou...
true
true
79051b448171478abd0070862a6e9dcb4048523f
2,226
py
Python
python-lib/example-consumer.py
playasystems/hacks
5fa39f6525706e502674c5aac422f80c66343416
[ "MIT" ]
null
null
null
python-lib/example-consumer.py
playasystems/hacks
5fa39f6525706e502674c5aac422f80c66343416
[ "MIT" ]
null
null
null
python-lib/example-consumer.py
playasystems/hacks
5fa39f6525706e502674c5aac422f80c66343416
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf8 -*- # Virtual dancers that consumes real GigglePixel packets # # To use, start this up and then bring up a server broadcasting GigglePixel. # When this receives a palette packet, the dancing pair (whose humble wearables # are only capable of displaying one color at a time api...
24.195652
86
0.649146
PORT = 7016 import socket import sys from time import time from x256 import x256 from udp import * WHITE = '\033[0m' RGB1 = None RGB2 = None banner = "Yay" note = u'♪' face = u'(・o・)' def p(s): sys.stdout.write(s) arm_phase = False def arms(): global arm_phase arm_phase = not arm_phase if arm_...
true
true
79051cdd681d6dd17b5faec1bbc03d2c7f12fa19
7,368
py
Python
examples/dump_pcapng_info_pretty.py
dieter-exc/python-pcapng
59ff754d424c0542bc6d7b87e2b0adb721a7b73a
[ "Apache-2.0" ]
82
2015-02-18T01:45:48.000Z
2022-01-25T03:37:11.000Z
examples/dump_pcapng_info_pretty.py
dieter-exc/python-pcapng
59ff754d424c0542bc6d7b87e2b0adb721a7b73a
[ "Apache-2.0" ]
31
2015-02-09T09:01:42.000Z
2022-03-31T08:09:58.000Z
examples/dump_pcapng_info_pretty.py
dieter-exc/python-pcapng
59ff754d424c0542bc6d7b87e2b0adb721a7b73a
[ "Apache-2.0" ]
35
2015-02-04T21:34:16.000Z
2022-03-23T00:41:44.000Z
#!/usr/bin/env python import io import sys from datetime import datetime # To make sure all packet types are available import scapy.all # noqa import scapy.packet from scapy.layers.l2 import Ether import pcapng from pcapng.blocks import EnhancedPacket, InterfaceDescription, SectionHeader def col256(text, fg=None,...
28.015209
88
0.549946
import io import sys from datetime import datetime import scapy.all import scapy.packet from scapy.layers.l2 import Ether import pcapng from pcapng.blocks import EnhancedPacket, InterfaceDescription, SectionHeader def col256(text, fg=None, bg=None, bold=False): def _get_color(col): return "8;5;{0:d...
true
true
79051e41b6e05f3a229188ef0440c645ab8f212f
2,284
py
Python
alembic/env.py
webhacking/finance
f6063af2b0cc949a3faaf081587a5504b0783a8c
[ "BSD-4-Clause" ]
null
null
null
alembic/env.py
webhacking/finance
f6063af2b0cc949a3faaf081587a5504b0783a8c
[ "BSD-4-Clause" ]
null
null
null
alembic/env.py
webhacking/finance
f6063af2b0cc949a3faaf081587a5504b0783a8c
[ "BSD-4-Clause" ]
null
null
null
from __future__ import with_statement import os from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig from finance.models import db # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.con...
28.55
83
0.736427
from __future__ import with_statement import os from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig from finance.models import db config = context.config fileConfig(config.config_file_name) # for 'autogenerate' support # from myapp import mymodel ...
true
true
79051e6ef50a3db863bcf233cbabfd4e6a7b0c61
10,901
py
Python
sdk/python/pulumi_azure_native/machinelearningservices/v20210101/machine_learning_compute.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/machinelearningservices/v20210101/machine_learning_compute.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/machinelearningservices/v20210101/machine_learning_compute.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
59.895604
3,183
0.710669
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['MachineLearningCompute'] class MachineLearningCompute(pulumi.CustomResource): def _...
true
true
79051e7fed81fcd045eb75c2d0b4b3d3845092ea
3,222
py
Python
webapp2/settings.py
ndavilo/webapp2
65fad8328675dd7fa0210ec0fc85fd291887afb5
[ "MIT" ]
null
null
null
webapp2/settings.py
ndavilo/webapp2
65fad8328675dd7fa0210ec0fc85fd291887afb5
[ "MIT" ]
null
null
null
webapp2/settings.py
ndavilo/webapp2
65fad8328675dd7fa0210ec0fc85fd291887afb5
[ "MIT" ]
null
null
null
""" Django settings for webapp2 project. Generated by 'django-admin startproject' using Django 4.0. For more information on this file, see https://docs.djangoproject.com/en/4.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/4.0/ref/settings/ """ from pathlib i...
25.983871
91
0.701117
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-jtp=j6oy)@&t#9l$zv#1iavkq#l-#9f$*z97d@623=nzeo@pgm' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contr...
true
true
79051fae535efc193413e9130d22dc69d49c89c6
947
py
Python
php4dvd/conftest.py
sargm/selenium-py-traning-barancev
a4b2d75c2b15d64b80759ea48867b79a03482328
[ "Apache-2.0" ]
null
null
null
php4dvd/conftest.py
sargm/selenium-py-traning-barancev
a4b2d75c2b15d64b80759ea48867b79a03482328
[ "Apache-2.0" ]
null
null
null
php4dvd/conftest.py
sargm/selenium-py-traning-barancev
a4b2d75c2b15d64b80759ea48867b79a03482328
[ "Apache-2.0" ]
null
null
null
import pytest from selenium import webdriver from model.application import Application def pytest_addoption(parser): parser.addoption("--browser", action="store", default="firefox", help="browser type") parser.addoption("--base_url", action="store", default="http://localhost:9080/php4dvd/", help="base URL") ...
30.548387
109
0.711721
import pytest from selenium import webdriver from model.application import Application def pytest_addoption(parser): parser.addoption("--browser", action="store", default="firefox", help="browser type") parser.addoption("--base_url", action="store", default="http://localhost:9080/php4dvd/", help="base URL") ...
true
true
79051ff8ad662d97e3318a7b6db079fc55e553ed
459
py
Python
Admins/migrations/0037_auto_20210310_0337.py
sd2001/Test-X
8f793420644c860f51c718716d7ad2a96f1b72c0
[ "MIT" ]
1
2021-03-29T17:54:51.000Z
2021-03-29T17:54:51.000Z
Admins/migrations/0037_auto_20210310_0337.py
sd2001/Test-X
8f793420644c860f51c718716d7ad2a96f1b72c0
[ "MIT" ]
null
null
null
Admins/migrations/0037_auto_20210310_0337.py
sd2001/Test-X
8f793420644c860f51c718716d7ad2a96f1b72c0
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-10 03:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Admins', '0036_auto_20210310_0337'), ] operations = [ migrations.AlterField( model_name='createpractioner', name='id...
24.157895
118
0.631808
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Admins', '0036_auto_20210310_0337'), ] operations = [ migrations.AlterField( model_name='createpractioner', name='id', field=models.CharField(default='...
true
true
790520f670865a773ddf30b5cdb83f7669b1e83d
45
py
Python
cardboard/cards/__init__.py
Julian/cardboard
6ab676d04b38bf9b0d0c4a849364159947b8ea7f
[ "MIT" ]
5
2015-03-23T10:25:40.000Z
2021-05-29T06:00:40.000Z
cardboard/cards/__init__.py
Julian/cardboard
6ab676d04b38bf9b0d0c4a849364159947b8ea7f
[ "MIT" ]
null
null
null
cardboard/cards/__init__.py
Julian/cardboard
6ab676d04b38bf9b0d0c4a849364159947b8ea7f
[ "MIT" ]
1
2019-02-17T14:45:29.000Z
2019-02-17T14:45:29.000Z
from cardboard.cards.core import cards, card
22.5
44
0.822222
from cardboard.cards.core import cards, card
true
true
7905224699fbac6a4259ad9069a3b14b15d7ad2c
3,350
py
Python
cen/regularizers/entropy.py
crodriguez1a/cen
f03397a0bf4ac24162e270907d623f8658179e88
[ "Apache-2.0" ]
6
2020-02-23T04:53:08.000Z
2022-01-10T18:13:37.000Z
cen/regularizers/entropy.py
crodriguez1a/cen
f03397a0bf4ac24162e270907d623f8658179e88
[ "Apache-2.0" ]
null
null
null
cen/regularizers/entropy.py
crodriguez1a/cen
f03397a0bf4ac24162e270907d623f8658179e88
[ "Apache-2.0" ]
5
2020-09-27T23:46:33.000Z
2021-10-14T07:42:54.000Z
# Copyright 2020 Maruan Al-Shedivat. 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 appli...
38.068182
80
0.643881
import tensorflow as tf from tensorflow.python.keras.regularizers import Regularizer class ContextConditionalNegativeEntropy(Regularizer): def __init__(self, coeff=0., num_samples=256, stddev=2e-1, epsilon=1e-6): self.coeff = coeff self.stddev = stddev self.epsilon = epsil...
true
true
79052318c9dc00983ebd4e280a4e9d7bbbf905d6
1,258
py
Python
EstCondicional.py
royturpo123/EXAMEN-01
7ba07defb0913ef38fadfdb691271929f92d2086
[ "Apache-2.0" ]
null
null
null
EstCondicional.py
royturpo123/EXAMEN-01
7ba07defb0913ef38fadfdb691271929f92d2086
[ "Apache-2.0" ]
null
null
null
EstCondicional.py
royturpo123/EXAMEN-01
7ba07defb0913ef38fadfdb691271929f92d2086
[ "Apache-2.0" ]
null
null
null
def calculalaNotafinalRGHT1(): #defenir variables calculalanotaFinalRGHT=20 #datos de entrada notaFinalRGHT=float(input("Ingrese la nota final")) calculalaNotafinalRGHT=float(input("ingrese")) #Proceso if primeraUnidad<=20% and notaObotenida>=14: primeranota=notaFinalRGHT elif segundaUnidad<=15% an...
29.255814
79
0.771065
def calculalaNotafinalRGHT1(): calculalanotaFinalRGHT=20 notaFinalRGHT=float(input("Ingrese la nota final")) calculalaNotafinalRGHT=float(input("ingrese")) if primeraUnidad<=20% and notaObotenida>=14: primeranota=notaFinalRGHT elif segundaUnidad<=15% and notaObotenida>=17: segundanota=notaFin...
false
true
790523a20a66d0671469195f542a98b737e40593
12,529
py
Python
cryptoapis/model/coins_forwarding_success_data.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
5
2021-05-17T04:45:03.000Z
2022-03-23T12:51:46.000Z
cryptoapis/model/coins_forwarding_success_data.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
null
null
null
cryptoapis/model/coins_forwarding_success_data.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
2
2021-06-02T07:32:26.000Z
2022-02-12T02:36:23.000Z
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
44.587189
484
0.58624
import re import sys from cryptoapis.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, OpenA...
true
true
7905246e286c3af6d32aefa7b31f4428b7fd2590
18,385
py
Python
tests/python/test_queues.py
ProvoK/trio-asyncio
8098e93a63eedf7188545cbda45e54c0bcdd85fc
[ "Apache-2.0", "MIT" ]
null
null
null
tests/python/test_queues.py
ProvoK/trio-asyncio
8098e93a63eedf7188545cbda45e54c0bcdd85fc
[ "Apache-2.0", "MIT" ]
null
null
null
tests/python/test_queues.py
ProvoK/trio-asyncio
8098e93a63eedf7188545cbda45e54c0bcdd85fc
[ "Apache-2.0", "MIT" ]
null
null
null
"""Tests for queues.py""" import sys import unittest from unittest import mock import asyncio from .. import utils as test_utils class _QueueTestBase(test_utils.TestCase): def setUp(self): super().setUp() self.loop = self.new_test_loop() class QueueBasicTests(_QueueTestBase): def _test_rep...
28.861852
96
0.585967
import sys import unittest from unittest import mock import asyncio from .. import utils as test_utils class _QueueTestBase(test_utils.TestCase): def setUp(self): super().setUp() self.loop = self.new_test_loop() class QueueBasicTests(_QueueTestBase): def _test_repr_or_str(self, fn, expect_...
true
true
790524ada039137048fdeb2261c531db582c8242
16,233
py
Python
training/loss.py
duskvirkus/stylegan2-ada-tpu
2a33dcd6a3cea67006515ad7e41d80e6800d9285
[ "BSD-Source-Code" ]
1
2021-06-20T18:07:41.000Z
2021-06-20T18:07:41.000Z
training/loss.py
duskvirkus/stylegan2-ada-tpu
2a33dcd6a3cea67006515ad7e41d80e6800d9285
[ "BSD-Source-Code" ]
null
null
null
training/loss.py
duskvirkus/stylegan2-ada-tpu
2a33dcd6a3cea67006515ad7e41d80e6800d9285
[ "BSD-Source-Code" ]
null
null
null
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and re...
49.794479
120
0.669377
 """Loss functions.""" import numpy as np import tensorflow as tf import dnnlib import dnnlib.tflib as tflib from dnnlib.tflib.autosummary import autosummary def report_stat(aug, name, value): if aug is not None: value = aug.report_stat(name, value) value = autosummary(name, value) return value ...
false
true
790526c0cdff8c1a50772aae846df2d48fd3d95d
371
py
Python
backend/api/migrations/0004_auto_20180528_2342.py
rkcf/dailio
39ef7573c005e753918b0b15d82eb4d00b7732db
[ "MIT" ]
4
2018-04-19T15:07:43.000Z
2018-05-29T02:51:35.000Z
backend/api/migrations/0004_auto_20180528_2342.py
rkcf/dailio
39ef7573c005e753918b0b15d82eb4d00b7732db
[ "MIT" ]
null
null
null
backend/api/migrations/0004_auto_20180528_2342.py
rkcf/dailio
39ef7573c005e753918b0b15d82eb4d00b7732db
[ "MIT" ]
null
null
null
# Generated by Django 2.0.3 on 2018-05-28 23:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0003_task_order'), ] operations = [ migrations.AlterField( model_name='task', name='order', field...
19.526316
50
0.58221
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0003_task_order'), ] operations = [ migrations.AlterField( model_name='task', name='order', field=models.IntegerField(blank=True), ), ...
true
true
79052816aec8b76957540d72b3609cbf4bb76b0c
1,528
py
Python
src/commercetools/platform/client/matching_cart/by_project_key_shipping_methods_matching_cart_request_builder.py
lime-green/commercetools-python-sdk
63b77f6e5abe43e2b3ebbf3cdbbe00c7cf80dca6
[ "MIT" ]
1
2021-04-07T20:01:30.000Z
2021-04-07T20:01:30.000Z
src/commercetools/platform/client/matching_cart/by_project_key_shipping_methods_matching_cart_request_builder.py
lime-green/commercetools-python-sdk
63b77f6e5abe43e2b3ebbf3cdbbe00c7cf80dca6
[ "MIT" ]
null
null
null
src/commercetools/platform/client/matching_cart/by_project_key_shipping_methods_matching_cart_request_builder.py
lime-green/commercetools-python-sdk
63b77f6e5abe43e2b3ebbf3cdbbe00c7cf80dca6
[ "MIT" ]
null
null
null
# Generated file, please do not change!!! import typing from ...models.error import ErrorResponse from ...models.shipping_method import ShippingMethodPagedQueryResponse if typing.TYPE_CHECKING: from ...base_client import BaseClient class ByProjectKeyShippingMethodsMatchingCartRequestBuilder: _client: "Base...
32.510638
80
0.643979
import typing from ...models.error import ErrorResponse from ...models.shipping_method import ShippingMethodPagedQueryResponse if typing.TYPE_CHECKING: from ...base_client import BaseClient class ByProjectKeyShippingMethodsMatchingCartRequestBuilder: _client: "BaseClient" _project_key: str def __...
true
true
790528f084d28e12574cc8d2141823b9ee3dcd46
461
py
Python
14_Tran_An_Thien/ManagementStudents/ManagementStudents/customsettings.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
null
null
null
14_Tran_An_Thien/ManagementStudents/ManagementStudents/customsettings.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
null
null
null
14_Tran_An_Thien/ManagementStudents/ManagementStudents/customsettings.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
8
2020-07-10T14:13:54.000Z
2020-08-03T08:17:50.000Z
from django.contrib.staticfiles.storage import staticfiles_storage from django.urls import reverse from ManagementStudents.jinja2 import Environment # This enables us to use Django template tags like {% url ‘index’ %} or {% static ‘path/to/static/file.js’ %} in our Jinja2 templates. def environment(**options): en...
32.928571
134
0.718004
from django.contrib.staticfiles.storage import staticfiles_storage from django.urls import reverse from ManagementStudents.jinja2 import Environment def environment(**options): env = Environment(**options) env.globals.update({ 'static': staticfiles_storage.url, 'url': reverse, }) retu...
true
true
790529ec258abe4aee691763242fc2d4e54dbd47
6,297
py
Python
tests/test_board_responses.py
BiffoBear/CircuitPython-AS3935
0ea9fef373fa9cad3a2ecb6c96b0951c5d95383b
[ "MIT", "MIT-0", "Unlicense" ]
2
2021-06-27T14:45:58.000Z
2022-01-20T19:37:30.000Z
tests/test_board_responses.py
BiffoBear/CircuitPython-AS3935
0ea9fef373fa9cad3a2ecb6c96b0951c5d95383b
[ "MIT", "MIT-0", "Unlicense" ]
2
2021-02-21T13:01:45.000Z
2022-02-15T16:34:41.000Z
tests/test_board_responses.py
BiffoBear/CircuitPython-AS3935
0ea9fef373fa9cad3a2ecb6c96b0951c5d95383b
[ "MIT", "MIT-0", "Unlicense" ]
3
2021-04-18T05:28:29.000Z
2022-02-15T04:01:51.000Z
# SPDX-FileCopyrightText: Copyright (c) 2021 Martin Stephens # # SPDX-License-Identifier: MIT """These tests are run with a sensor connected to confirm that the correct responses are received from the sensor. The try - except clauses and an if __name__ == "__main__" allow the code to be run with pytest on a Raspberry ...
28.237668
92
0.697157
# Therefore skip this file. # pylint: skip-file import time try: import pytest # If this works, we're on a Raspberry Pi import os from CircuitPython_AS3935 import biffobear_as3935 as as3935 pytestmark = pytest.mark.skip(reason="No as3935 board connected.") print("hello world...
true
true
79052c7ad860cdfd2852803fc5791b381650f89c
457
py
Python
source/_sample/ptt/users-search.py
showa-yojyo/notebook
82c15074c24d64a1dfcb70a526bc1deb2ecffe68
[ "MIT" ]
14
2016-04-13T08:10:02.000Z
2021-04-19T09:42:51.000Z
source/_sample/ptt/users-search.py
showa-yojyo/note
5f262ecda3df132cb66206c465d16e174061d6b9
[ "MIT" ]
88
2017-09-27T15:07:05.000Z
2019-10-02T04:05:03.000Z
source/_sample/ptt/users-search.py
showa-yojyo/note
5f262ecda3df132cb66206c465d16e174061d6b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Demonstration GET users/search # See https://dev.twitter.com/rest/reference/get/users/search from secret import twitter_instance tw = twitter_instance() response = tw.users.search( q='bot', page=0, count=20, include_entities=False) for i in response: print(''' {screen_na...
16.321429
61
0.706783
from secret import twitter_instance tw = twitter_instance() response = tw.users.search( q='bot', page=0, count=20, include_entities=False) for i in response: print(''' {screen_name} | {name} {location} {url} {description} ツイート数 {statuses_count} フォロー {friends_count} 人 フォロワー {followers_count}...
true
true
79052ccaa03aa9230489301aed1b84e00c7a12ea
9,537
py
Python
facebook_business/adobjects/vehicleoffer.py
GDGSNF/facebook-python-business-sdk
95e64a10d987d7a53963d17036b6730d07f84ab5
[ "CNRI-Python" ]
576
2018-05-01T19:09:32.000Z
2022-03-31T11:45:11.000Z
facebook_business/adobjects/vehicleoffer.py
GDGSNF/facebook-python-business-sdk
95e64a10d987d7a53963d17036b6730d07f84ab5
[ "CNRI-Python" ]
217
2018-05-03T07:31:59.000Z
2022-03-29T14:19:52.000Z
facebook_business/adobjects/vehicleoffer.py
GDGSNF/facebook-python-business-sdk
95e64a10d987d7a53963d17036b6730d07f84ab5
[ "CNRI-Python" ]
323
2018-05-01T20:32:26.000Z
2022-03-29T07:05:12.000Z
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
37.4
128
0.637936
from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject from facebook_business.adobjects.objectparser import ObjectParser from facebook_business.api import FacebookRequest from facebook_business.typechecker i...
true
true
79052d2fe5882f5571d528bdb9d490248fe0dc67
91,819
py
Python
prenlp/data/normalizer.py
awesome-archive/prenlp
e65acc8464b391d72d0ee086368b153c81ea19de
[ "Apache-2.0" ]
null
null
null
prenlp/data/normalizer.py
awesome-archive/prenlp
e65acc8464b391d72d0ee086368b153c81ea19de
[ "Apache-2.0" ]
null
null
null
prenlp/data/normalizer.py
awesome-archive/prenlp
e65acc8464b391d72d0ee086368b153c81ea19de
[ "Apache-2.0" ]
null
null
null
import re class Normalizer: """Normalizer return the text replaced with 'repl'. If 'repl' is None, normalization is not applied to the pattern corresponding to 'repl'. Args: url_repl (str): replace all urls in text with this tag_repl (str): replace all tags in text with this emoji_...
946.587629
87,778
0.831418
import re class Normalizer: def __init__(self, url_repl='[URL]', tag_repl='[TAG]', emoji_repl='[EMOJI]', email_repl='[EMAIL]', tel_repl='[TEL]'): self.url_repl = url_repl self.tag_repl = tag_repl self.emoji_repl = emoji_repl self.email_repl = email_repl self.tel_rep...
true
true
79052d490ace46e8da12949e6ca85539f01cf6c9
20,582
py
Python
scenic/projects/baselines/bert/trainer.py
keshavd/scenic
2f819916c316e7de73cd539c3a9a83c683ddb0ac
[ "Apache-2.0" ]
688
2021-07-26T21:45:18.000Z
2022-03-31T11:53:34.000Z
scenic/projects/baselines/bert/trainer.py
keshavd/scenic
2f819916c316e7de73cd539c3a9a83c683ddb0ac
[ "Apache-2.0" ]
35
2021-08-03T11:31:10.000Z
2022-03-31T21:58:58.000Z
scenic/projects/baselines/bert/trainer.py
keshavd/scenic
2f819916c316e7de73cd539c3a9a83c683ddb0ac
[ "Apache-2.0" ]
88
2021-08-03T13:19:50.000Z
2022-03-31T08:35:22.000Z
"""BERT Training Script.""" import functools from typing import Any, Callable, Dict, Tuple, Optional, Type from absl import logging from clu import metric_writers from clu import periodic_actions from flax import jax_utils import flax.linen as nn import jax from jax.experimental import optimizers as jax_optimizers im...
41.412475
81
0.694782
import functools from typing import Any, Callable, Dict, Tuple, Optional, Type from absl import logging from clu import metric_writers from clu import periodic_actions from flax import jax_utils import flax.linen as nn import jax from jax.experimental import optimizers as jax_optimizers import jax.numpy as jnp import...
true
true
79052e85084d93d29a6482dacc17390c9ff20a10
220
py
Python
stock_notifier/stock_config/stock_config.py
saswatraj/stock_notifier
f0b05acf77acd6605b4d022e64ddd747d9a5540f
[ "MIT" ]
null
null
null
stock_notifier/stock_config/stock_config.py
saswatraj/stock_notifier
f0b05acf77acd6605b4d022e64ddd747d9a5540f
[ "MIT" ]
null
null
null
stock_notifier/stock_config/stock_config.py
saswatraj/stock_notifier
f0b05acf77acd6605b4d022e64ddd747d9a5540f
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Base class for a stock configuration. @author: rajsaswa """ class StockConfig: def __init__(self): pass def get_stock_url(self): pass
14.666667
37
0.590909
class StockConfig: def __init__(self): pass def get_stock_url(self): pass
true
true
79052ef7ce4a002a27701ac148f1ec3ae92603c5
2,524
py
Python
proximal/examples/test_conv.py
kyleaj/ProxImaL
2986b1ed40b58057822922522145bfbbdd2cf9de
[ "MIT" ]
101
2016-07-24T00:33:12.000Z
2022-03-23T23:51:58.000Z
proximal/examples/test_conv.py
kyleaj/ProxImaL
2986b1ed40b58057822922522145bfbbdd2cf9de
[ "MIT" ]
57
2016-07-26T18:12:37.000Z
2022-02-14T04:19:26.000Z
proximal/examples/test_conv.py
kyleaj/ProxImaL
2986b1ed40b58057822922522145bfbbdd2cf9de
[ "MIT" ]
30
2016-07-26T22:51:59.000Z
2021-01-15T14:45:42.000Z
# Proximal import sys sys.path.append('../../') from proximal.utils.utils import * from proximal.halide.halide import * from proximal.lin_ops import * import numpy as np from scipy import signal from scipy import ndimage import matplotlib.pyplot as plt ############################################################ #...
29.348837
99
0.647781
import sys sys.path.append('../../') from proximal.utils.utils import * from proximal.halide.halide import * from proximal.lin_ops import * import numpy as np from scipy import signal from scipy import ndimage import matplotlib.pyplot as plt
true
true
79052f08df6a4ffd138a2a2c2dbbf28a768aab17
2,643
py
Python
project/knowledge_graph_embedding/project_distmult_rotate_transe/service.py
jh-lau/solid_ai_waddle
b966f2c6e8b6b48c62064d58461692231aa2116b
[ "MIT" ]
null
null
null
project/knowledge_graph_embedding/project_distmult_rotate_transe/service.py
jh-lau/solid_ai_waddle
b966f2c6e8b6b48c62064d58461692231aa2116b
[ "MIT" ]
null
null
null
project/knowledge_graph_embedding/project_distmult_rotate_transe/service.py
jh-lau/solid_ai_waddle
b966f2c6e8b6b48c62064d58461692231aa2116b
[ "MIT" ]
null
null
null
""" @Author : liujianhan @Date : 2018/5/15 上午10:48 @Project : KGE @FileName : service.py @Description : 服务接口模块 """ import codecs import json import os import time from typing import Dict import torch from dotmap import DotMap from .core.predict import get_entity_relation_with_id from...
30.732558
114
0.678396
import codecs import json import os import time from typing import Dict import torch from dotmap import DotMap from .core.predict import get_entity_relation_with_id from .layer.model import KGEModel kge_model, entity2id, id2entity, relation2id, all_true_triples, args = None, None, None, None, None, None def load_m...
true
true
790530615bdc29511838b1fd6f0a1563f718c38f
401
py
Python
code/platforms/mac/user.py
palexjo/pokey_talon
b143314850271e185968b12f6e224df1cbb4611c
[ "MIT" ]
null
null
null
code/platforms/mac/user.py
palexjo/pokey_talon
b143314850271e185968b12f6e224df1cbb4611c
[ "MIT" ]
null
null
null
code/platforms/mac/user.py
palexjo/pokey_talon
b143314850271e185968b12f6e224df1cbb4611c
[ "MIT" ]
null
null
null
from talon import Module, Context import appscript mod = Module() ctx = Context() ctx.matches = r""" os: mac """ @mod.action_class class Actions: def run_shortcut(name: str): """Runs a shortcut on macOS""" pass @ctx.action_class("user") class UserActions: def run_shortcut(name: str...
17.434783
77
0.653367
from talon import Module, Context import appscript mod = Module() ctx = Context() ctx.matches = r""" os: mac """ @mod.action_class class Actions: def run_shortcut(name: str): pass @ctx.action_class("user") class UserActions: def run_shortcut(name: str): appscript.app(id='com.apple.shortcut...
true
true
790531271f6a58b28a98db5f3bcee970e2a08af6
2,221
py
Python
cs15211/DeleteNodrinaLinkedList.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2021-07-05T01:53:30.000Z
2021-07-05T01:53:30.000Z
cs15211/DeleteNodrinaLinkedList.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
null
null
null
cs15211/DeleteNodrinaLinkedList.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2018-01-08T07:14:08.000Z
2018-01-08T07:14:08.000Z
__source__ = 'https://leetcode.com/problems/delete-node-in-a-linked-list/description/' # https://github.com/kamyu104/LeetCode/blob/master/Python/delete-node-in-a-linked-list.py # Time: O(1) # Space: O(1) # # Description: Leetcode # 237. Delete Node in a Linked List # # Write a function to delete a node (except the tai...
27.085366
100
0.642954
__source__ = 'https://leetcode.com/problems/delete-node-in-a-linked-list/description/' def __init__(self, x): self.val = x self.next = None import unittest class Solution: def deleteNode(self, node): if node and node.next: node_to_delete = node.next no...
true
true
790531c6e3177f6ce7d911c9af400d2d8d75273b
3,442
py
Python
src/portable_python/external/_inspect.py
codrsquad/portable-python
4ec94dc1ded85c367c6912f96c408b03d2d68a9c
[ "MIT" ]
3
2022-01-04T13:58:53.000Z
2022-01-28T11:11:50.000Z
src/portable_python/external/_inspect.py
codrsquad/portable-python
4ec94dc1ded85c367c6912f96c408b03d2d68a9c
[ "MIT" ]
3
2021-09-18T09:43:18.000Z
2022-01-04T12:58:05.000Z
src/portable_python/external/_inspect.py
codrsquad/portable-python
4ec94dc1ded85c367c6912f96c408b03d2d68a9c
[ "MIT" ]
4
2021-09-03T06:55:31.000Z
2022-01-26T14:24:07.000Z
import json import os import re import sys import sysconfig RX_VERSION = re.compile(r"\d\.\d") INSIGHTS = { "_gdbm": "_GDBM_VERSION", "_tkinter": "TCL_VERSION TK_VERSION", "_sqlite3": "sqlite_version version", "_ssl": "OPENSSL_VERSION", "dbm.gnu": "_GDBM_VERSION", "ensurepip": "_PIP_VERSION", ...
27.536
102
0.613597
import json import os import re import sys import sysconfig RX_VERSION = re.compile(r"\d\.\d") INSIGHTS = { "_gdbm": "_GDBM_VERSION", "_tkinter": "TCL_VERSION TK_VERSION", "_sqlite3": "sqlite_version version", "_ssl": "OPENSSL_VERSION", "dbm.gnu": "_GDBM_VERSION", "ensurepip": "_PIP_VERSION", ...
true
true
79053220cb7fa9c72a5b0d1cce68d7322874cdb2
4,653
py
Python
paypalrestsdkold/openid_connect.py
fdhoff/PayPal-Python-SDK
a46c87ac99680795c89590b7342d234633244156
[ "BSD-Source-Code" ]
null
null
null
paypalrestsdkold/openid_connect.py
fdhoff/PayPal-Python-SDK
a46c87ac99680795c89590b7342d234633244156
[ "BSD-Source-Code" ]
null
null
null
paypalrestsdkold/openid_connect.py
fdhoff/PayPal-Python-SDK
a46c87ac99680795c89590b7342d234633244156
[ "BSD-Source-Code" ]
null
null
null
import paypalrestsdkold.util as util from paypalrestsdkold.resource import Resource from paypalrestsdkold.api import default as default_api from paypalrestsdkold.api import Api from paypalrestsdkold.config import __version__ from six import string_types class Base(Resource): user_agent = "PayPalSDK/openid-connect...
32.538462
105
0.656995
import paypalrestsdkold.util as util from paypalrestsdkold.resource import Resource from paypalrestsdkold.api import default as default_api from paypalrestsdkold.api import Api from paypalrestsdkold.config import __version__ from six import string_types class Base(Resource): user_agent = "PayPalSDK/openid-connect...
true
true
79053237373e9febfbe186d41fe2f3cf64ee488f
4,610
py
Python
sigmapiweb/apps/PubSite/views.py
Jacobvs/sigmapi-web
ca8d5a5294385fe5f4634c483a1278df904e2f85
[ "MIT" ]
8
2018-01-19T15:27:24.000Z
2022-02-04T05:57:01.000Z
sigmapiweb/apps/PubSite/views.py
Jacobvs/sigmapi-web
ca8d5a5294385fe5f4634c483a1278df904e2f85
[ "MIT" ]
71
2017-07-17T04:44:35.000Z
2022-02-19T19:33:24.000Z
sigmapiweb/apps/PubSite/views.py
Jacobvs/sigmapi-web
ca8d5a5294385fe5f4634c483a1278df904e2f85
[ "MIT" ]
6
2019-04-12T03:18:12.000Z
2021-09-28T23:33:12.000Z
""" Views for PubSite app. """ from django.conf import settings from django.contrib.auth.views import ( PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, PasswordResetCompleteView, ) from django.shortcuts import render import requests import logging logger = logging.getLogger(__name__...
27.440476
86
0.652061
from django.conf import settings from django.contrib.auth.views import ( PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, PasswordResetCompleteView, ) from django.shortcuts import render import requests import logging logger = logging.getLogger(__name__) def _get_context(page_name)...
true
true
79053243276532245599bd5bb291b2fa2c8e81f6
7,583
py
Python
darling_ansible/python_venv/lib/python3.7/site-packages/oci/waas/models/update_http_redirect_details.py
revnav/sandbox
f9c8422233d093b76821686b6c249417502cf61d
[ "Apache-2.0" ]
null
null
null
darling_ansible/python_venv/lib/python3.7/site-packages/oci/waas/models/update_http_redirect_details.py
revnav/sandbox
f9c8422233d093b76821686b6c249417502cf61d
[ "Apache-2.0" ]
null
null
null
darling_ansible/python_venv/lib/python3.7/site-packages/oci/waas/models/update_http_redirect_details.py
revnav/sandbox
f9c8422233d093b76821686b6c249417502cf61d
[ "Apache-2.0" ]
1
2020-06-25T03:12:58.000Z
2020-06-25T03:12:58.000Z
# coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
34.312217
245
0.66148
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class UpdateHttpRedirectDetails(object): def __init__(self, **kwargs): self.swagger_types = { 'display_name...
true
true
7905338c7a945fdaa339c63d1255e3cd348a7d62
2,002
py
Python
Project/algorithm.old.py
aksh4y/Papers
f7d89c22cafdb952d57467ab9254c17e8f5d2d4b
[ "MIT" ]
5
2017-10-06T07:06:53.000Z
2021-03-08T09:12:33.000Z
Project/algorithm.old.py
aksh4y/Papers
f7d89c22cafdb952d57467ab9254c17e8f5d2d4b
[ "MIT" ]
1
2017-07-07T18:46:15.000Z
2017-07-08T07:19:09.000Z
Project/algorithm.old.py
aksh4y/Papers
f7d89c22cafdb952d57467ab9254c17e8f5d2d4b
[ "MIT" ]
2
2017-11-08T07:54:14.000Z
2017-11-13T05:17:37.000Z
#Import Library import warnings import numpy as np import datetime from extract_data import * from word_encoder import * from sklearn import svm from sklearn.ensemble import RandomForestClassifier from sklearn.naive_bayes import GaussianNB from sklearn import tree # send the extracted data availble from extract_data t...
30.8
171
0.732767
import warnings import numpy as np import datetime from extract_data import * from word_encoder import * from sklearn import svm from sklearn.ensemble import RandomForestClassifier from sklearn.naive_bayes import GaussianNB from sklearn import tree encoded_data = encode(data) scores = [] i = 0 while i < len(la...
true
true
790533b50a0ea078a1a3c933f7e6fd772a34b2c3
295
py
Python
manager.py
xj951103/baseProject
60da4337881aa1f629e2aa0781371ef9ae5e30d4
[ "MIT" ]
null
null
null
manager.py
xj951103/baseProject
60da4337881aa1f629e2aa0781371ef9ae5e30d4
[ "MIT" ]
null
null
null
manager.py
xj951103/baseProject
60da4337881aa1f629e2aa0781371ef9ae5e30d4
[ "MIT" ]
null
null
null
import os from flask_script import Manager from flask_migrate import MigrateCommand from App import create_app env = os.environ.get("flask_env", "develop") app = create_app(env) manager = Manager(app) manager.add_command("db", MigrateCommand) if __name__ == '__main__': manager.run()
16.388889
44
0.755932
import os from flask_script import Manager from flask_migrate import MigrateCommand from App import create_app env = os.environ.get("flask_env", "develop") app = create_app(env) manager = Manager(app) manager.add_command("db", MigrateCommand) if __name__ == '__main__': manager.run()
true
true
790533ce262cb8dd7ac469fc4653ac036c9c2b85
996
py
Python
components/notifier/src/models/notification.py
m-zakeri/quality-time
531931f0d8d4f5d262ea98445868158e41d268da
[ "Apache-2.0" ]
null
null
null
components/notifier/src/models/notification.py
m-zakeri/quality-time
531931f0d8d4f5d262ea98445868158e41d268da
[ "Apache-2.0" ]
null
null
null
components/notifier/src/models/notification.py
m-zakeri/quality-time
531931f0d8d4f5d262ea98445868158e41d268da
[ "Apache-2.0" ]
null
null
null
"""Notification.""" from models.metric_notification_data import MetricNotificationData class Notification: """Handle notification contents and status.""" def __init__(self, report, metrics, destination_uuid, destination): """Initialise the Notification with the required info.""" self.report_...
35.571429
93
0.678715
from models.metric_notification_data import MetricNotificationData class Notification: def __init__(self, report, metrics, destination_uuid, destination): self.report_title = report["title"] self.url = report.get("url") self.metrics: list[MetricNotificationData] = metrics self.de...
true
true
7905352946a0c5b16b0b9b35510899a4d53b223c
83,904
py
Python
sdk/storage/azure-storage-blob/tests/test_common_blob_async.py
hytao/azure-sdk-for-python
382994348b289d4cb90dc74e2ddc9fadc7c5824d
[ "MIT" ]
null
null
null
sdk/storage/azure-storage-blob/tests/test_common_blob_async.py
hytao/azure-sdk-for-python
382994348b289d4cb90dc74e2ddc9fadc7c5824d
[ "MIT" ]
null
null
null
sdk/storage/azure-storage-blob/tests/test_common_blob_async.py
hytao/azure-sdk-for-python
382994348b289d4cb90dc74e2ddc9fadc7c5824d
[ "MIT" ]
null
null
null
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
40.261036
149
0.685593
from enum import Enum import pytest import aiohttp import asyncio import requests import time import unittest import os from datetime import datetime, timedelta from azure.core.exceptions import ( HttpResponseError, ResourceNotFoundError, ResourceExistsError, ClientAuthenticationError) from azur...
true
true
7905360af6477616d3533bddce9622fc67b53657
924
py
Python
fastapi_builder/helpers.py
fmw666/fastapi-cli
6a1b1827f2abd9490f4eeed8b4594634f0a08fd2
[ "MIT" ]
1
2022-02-16T12:27:53.000Z
2022-02-16T12:27:53.000Z
fastapi_builder/helpers.py
fmw666/fastapi-cli
6a1b1827f2abd9490f4eeed8b4594634f0a08fd2
[ "MIT" ]
null
null
null
fastapi_builder/helpers.py
fmw666/fastapi-cli
6a1b1827f2abd9490f4eeed8b4594634f0a08fd2
[ "MIT" ]
null
null
null
import re from typing import TypeVar import questionary EnumType = TypeVar("EnumType") # 驼峰命名转蛇形命名 def camel_to_snake(text: str) -> str: return re.sub(r"(?<!^)(?=[A-Z])", "_", text).lower() # 蛇形命名转驼峰命名 def snake_to_camel(text: str) -> str: return text.split('_')[0] + "".join(x.title() for x in text.split('...
28
94
0.691558
import re from typing import TypeVar import questionary EnumType = TypeVar("EnumType") def camel_to_snake(text: str) -> str: return re.sub(r"(?<!^)(?=[A-Z])", "_", text).lower() def snake_to_camel(text: str) -> str: return text.split('_')[0] + "".join(x.title() for x in text.split('_')[1:]) def camel_t...
true
true
790537d8d261f30dd5d3294b70a4a5c50ccee06f
8,339
py
Python
test/functional/proxy_test.py
mdfkbtc/PRiVCY
e07b058eef2d9e0a74ffd1fe474ed27788355923
[ "MIT" ]
5
2021-05-05T02:54:32.000Z
2021-11-21T13:04:14.000Z
test/functional/proxy_test.py
mdfkbtc/PRiVCY
e07b058eef2d9e0a74ffd1fe474ed27788355923
[ "MIT" ]
1
2022-01-15T17:24:14.000Z
2022-01-15T17:24:14.000Z
test/functional/proxy_test.py
mdfkbtc/PRiVCY
e07b058eef2d9e0a74ffd1fe474ed27788355923
[ "MIT" ]
2
2021-06-05T10:01:35.000Z
2021-12-10T00:09:33.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test privcyd with different proxy configuration. Test plan: - Start privcyd's with different proxy con...
41.282178
120
0.624535
import socket import os from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( PORT_MIN, PORT_RANGE, assert_equal, ) from test_framework.netutil import test_ipv6_lo...
true
true
790538f9a39d41e11ea933615abccde020b70db5
4,173
py
Python
Precompilar/relativo.py
EzioFenix/Compilador-M68HC11
6f0688bfe72b13f28412cb3f424b459e39ba51b6
[ "MIT" ]
null
null
null
Precompilar/relativo.py
EzioFenix/Compilador-M68HC11
6f0688bfe72b13f28412cb3f424b459e39ba51b6
[ "MIT" ]
null
null
null
Precompilar/relativo.py
EzioFenix/Compilador-M68HC11
6f0688bfe72b13f28412cb3f424b459e39ba51b6
[ "MIT" ]
null
null
null
import re from Error import Error4,Error6,Error9 from DataBase import BaseDatos,BdRow from .precompilada import precompilada from typing import Pattern def getEtiqueta(linea:str)->str: """Obtiene el nombre de la captura Args: linea (str): Linea donde se va a buscar la etiqueta Returns: st...
29.595745
201
0.656602
import re from Error import Error4,Error6,Error9 from DataBase import BaseDatos,BdRow from .precompilada import precompilada from typing import Pattern def getEtiqueta(linea:str)->str: pattern='\s+([a-z]{1,5})\s+([a-z]{1,24})' busqueda=re.search(pattern,linea,re.IGNORECASE) etiqueta =busqu...
true
true
79053aea48e5eef7977740c6e769e2a55ed65589
1,121
py
Python
src/gamesbyexample/rainbow2.py
skinzor/PythonStdioGames
75f27af19d7f1d555b0fd85fbcf215f07660b93f
[ "MIT" ]
1
2019-11-30T17:04:09.000Z
2019-11-30T17:04:09.000Z
src/gamesbyexample/rainbow2.py
skinzor/PythonStdioGames
75f27af19d7f1d555b0fd85fbcf215f07660b93f
[ "MIT" ]
null
null
null
src/gamesbyexample/rainbow2.py
skinzor/PythonStdioGames
75f27af19d7f1d555b0fd85fbcf215f07660b93f
[ "MIT" ]
null
null
null
# Rainbow 2, by Al Sweigart al@inventwithpython.com # Shows a simple squiggle rainbow animation. import time, random, sys try: import bext except ImportError: print("""This program requires the bext module, which you can install by opening a Terminal window (on macOS & Linux) and running: python3 -m pip ...
22.877551
76
0.576271
import time, random, sys try: import bext except ImportError: print("""This program requires the bext module, which you can install by opening a Terminal window (on macOS & Linux) and running: python3 -m pip install --user bext or a Command Prompt window (on Windows) and running: python -m pip in...
true
true
79053b7736fa9fced53aabb1dc14c491955511d1
6,382
py
Python
struct2tensor/expression_impl/reroot.py
jay90099/struct2tensor
47d651757efa27586bf75f991b2174d8173a750b
[ "Apache-2.0" ]
30
2019-10-07T21:31:44.000Z
2022-03-30T17:11:44.000Z
struct2tensor/expression_impl/reroot.py
jay90099/struct2tensor
47d651757efa27586bf75f991b2174d8173a750b
[ "Apache-2.0" ]
2
2020-03-23T20:48:14.000Z
2021-04-16T15:05:33.000Z
struct2tensor/expression_impl/reroot.py
jay90099/struct2tensor
47d651757efa27586bf75f991b2174d8173a750b
[ "Apache-2.0" ]
30
2019-07-16T13:01:53.000Z
2022-03-01T22:04:36.000Z
# Copyright 2019 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.056497
80
0.733469
from typing import FrozenSet, Optional, Sequence from struct2tensor import calculate_options from struct2tensor import expression from struct2tensor import expression_add from struct2tensor import path from struct2tensor import prensor import tensorflow as tf def reroot(root: expression.Expression, ...
true
true
79053bc19046bc5c09c273b68271b530847adeaa
1,800
py
Python
src/app.py
mtik00/wkhtmltopdf-service
742787d43d5a6b9b3d69c6471d60101ae8fde350
[ "MIT" ]
null
null
null
src/app.py
mtik00/wkhtmltopdf-service
742787d43d5a6b9b3d69c6471d60101ae8fde350
[ "MIT" ]
null
null
null
src/app.py
mtik00/wkhtmltopdf-service
742787d43d5a6b9b3d69c6471d60101ae8fde350
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This file contains code to serve a web application to convert HTML to PDF. This application uses a local install of the `wkhtmltopdf` binary for the conversion. """ import os from subprocess import check_output from tempfile import TemporaryDirectory from starlette.a...
25.714286
85
0.669444
import os from subprocess import check_output from tempfile import TemporaryDirectory from starlette.applications import Starlette from starlette.requests import Request from starlette.responses import Response from starlette.routing import Route async def execute_wkhtmltopdf(uri: str) -> bytes: cmd = [ ...
true
true
79053c712fcad4880d69f2f62072734d673dd75f
6,913
py
Python
homeassistant/components/netgear/config_flow.py
eyager1/core
c0ae31d86c841107930cf471fd60d65b5c163f16
[ "Apache-2.0" ]
1
2022-02-19T14:13:50.000Z
2022-02-19T14:13:50.000Z
homeassistant/components/netgear/config_flow.py
eyager1/core
c0ae31d86c841107930cf471fd60d65b5c163f16
[ "Apache-2.0" ]
17
2021-11-24T06:24:25.000Z
2022-03-31T06:23:29.000Z
homeassistant/components/netgear/config_flow.py
eyager1/core
c0ae31d86c841107930cf471fd60d65b5c163f16
[ "Apache-2.0" ]
null
null
null
"""Config flow to configure the Netgear integration.""" from __future__ import annotations import logging from typing import cast from urllib.parse import urlparse from pynetgear import DEFAULT_HOST, DEFAULT_PORT, DEFAULT_USER import voluptuous as vol from homeassistant import config_entries from homeassistant.compo...
32.00463
88
0.645885
from __future__ import annotations import logging from typing import cast from urllib.parse import urlparse from pynetgear import DEFAULT_HOST, DEFAULT_PORT, DEFAULT_USER import voluptuous as vol from homeassistant import config_entries from homeassistant.components import ssdp from homeassistant.const import ( ...
true
true
79053e05c8a875a25eec2528239836dc98fe8a9e
616
py
Python
TPS_dice_roller_bot/core/parse.py
PumaConcolor/TPS-dice-roller-bot
4ffb2498cdb3411d4d1b2a33eda828d174e997cb
[ "MIT" ]
4
2020-10-06T14:47:17.000Z
2022-02-24T17:24:26.000Z
TPS_dice_roller_bot/core/parse.py
PumaConcolor/TPS-dice-roller-bot
4ffb2498cdb3411d4d1b2a33eda828d174e997cb
[ "MIT" ]
null
null
null
TPS_dice_roller_bot/core/parse.py
PumaConcolor/TPS-dice-roller-bot
4ffb2498cdb3411d4d1b2a33eda828d174e997cb
[ "MIT" ]
1
2020-10-06T14:47:18.000Z
2020-10-06T14:47:18.000Z
import re ### parse_text(text) # takes a string, return a list of strings with the matching groups def parse_text_regex(text, regex): try: compiled_regex = re.compile(regex) if compiled_regex is None: raise Exception(f"String {text} doesn't match {regex}") except TypeError as te: ...
24.64
67
0.676948
import re try: compiled_regex = re.compile(regex) if compiled_regex is None: raise Exception(f"String {text} doesn't match {regex}") except TypeError as te: raise Exception(te) except Exception as e: raise e match = compiled_regex.match(text) return mat...
true
true
79053f51d42e7f64ff65013039b18d3f557b30c8
1,676
py
Python
aulas/05-06/variaveis_aleatorias.py
thiago9864/introducao_modelagem
7ec90d266e1bbae7f942f2c600c4ea1d88d17614
[ "MIT" ]
1
2019-05-09T15:42:43.000Z
2019-05-09T15:42:43.000Z
aulas/05-06/variaveis_aleatorias.py
thiago9864/introducao_modelagem
7ec90d266e1bbae7f942f2c600c4ea1d88d17614
[ "MIT" ]
null
null
null
aulas/05-06/variaveis_aleatorias.py
thiago9864/introducao_modelagem
7ec90d266e1bbae7f942f2c600c4ea1d88d17614
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Jun 5 08:32:13 2019 @author: Thiago """ import numpy as np import pylab as pl #%% #Simulação de uma va def va_estoque(): p=np.array([0.1, 0.2, 0.6, 0.1]) x=np.random.rand() if 0 < x <= p[0]: return 1 elif p[0] < x <= p[0]+p[1]: return 2 ...
15.099099
42
0.50716
import numpy as np import pylab as pl def va_estoque(): p=np.array([0.1, 0.2, 0.6, 0.1]) x=np.random.rand() if 0 < x <= p[0]: return 1 elif p[0] < x <= p[0]+p[1]: return 2 elif p[0]+p[1] < x <= p[0]+p[1]+p[2]: return 3 elif p[0]+p[1]+p[2] < x <= 1.0: return...
true
true
79053f9ebf194c6de312509e2a055a7bbcf84e4f
2,993
py
Python
setup.py
stephanecollot/popmon
332ac3f79df1dd1c39b764c6d967e20f28ac124c
[ "MIT" ]
null
null
null
setup.py
stephanecollot/popmon
332ac3f79df1dd1c39b764c6d967e20f28ac124c
[ "MIT" ]
null
null
null
setup.py
stephanecollot/popmon
332ac3f79df1dd1c39b764c6d967e20f28ac124c
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup NAME = "popmon" MAJOR = 0 REVISION = 3 PATCH = 8 DEV = False # NOTE: also update version at: README.rst with open("requirements.txt") as f: REQUIREMENTS = f.read().splitlines() # read the contents of abstract file with open("README.rst", encoding="utf-8") as f: lo...
29.633663
104
0.610758
from setuptools import find_packages, setup NAME = "popmon" MAJOR = 0 REVISION = 3 PATCH = 8 DEV = False with open("requirements.txt") as f: REQUIREMENTS = f.read().splitlines() with open("README.rst", encoding="utf-8") as f: long_description = f.read() VERSION = "{major}.{revision}.{patch}".format( ...
true
true
790540aa671555a0ad89ba5876743c20e9324324
7,849
py
Python
hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py
vzyrianov/hpvm-autograd
521cc3b684531548aea75f9fe3cc673aaa4a2e90
[ "Apache-2.0" ]
null
null
null
hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py
vzyrianov/hpvm-autograd
521cc3b684531548aea75f9fe3cc673aaa4a2e90
[ "Apache-2.0" ]
null
null
null
hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py
vzyrianov/hpvm-autograd
521cc3b684531548aea75f9fe3cc673aaa4a2e90
[ "Apache-2.0" ]
null
null
null
from pathlib import Path from subprocess import PIPE, CalledProcessError from typing import Iterable, List, Tuple, Union import matplotlib.pyplot as plt PathLike = Union[Path, str] conf_opening, conf_closing = "+++++", "-----" def profile_config_file( binary_path: PathLike, config_path: PathLike, output...
36.170507
98
0.673844
from pathlib import Path from subprocess import PIPE, CalledProcessError from typing import Iterable, List, Tuple, Union import matplotlib.pyplot as plt PathLike = Union[Path, str] conf_opening, conf_closing = "+++++", "-----" def profile_config_file( binary_path: PathLike, config_path: PathLike, output...
true
true
790540ed21f59c903af9ace6954238fa467d6ce8
4,275
py
Python
src/lib/detectors/ctdet.py
Wastoon/XinTong_CenterNet
e4436d61b01a74fbc54bd33c4948ec932940661a
[ "MIT" ]
null
null
null
src/lib/detectors/ctdet.py
Wastoon/XinTong_CenterNet
e4436d61b01a74fbc54bd33c4948ec932940661a
[ "MIT" ]
null
null
null
src/lib/detectors/ctdet.py
Wastoon/XinTong_CenterNet
e4436d61b01a74fbc54bd33c4948ec932940661a
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import cv2 import numpy as np from progress.bar import Bar import time import torch import os try: from external.nms import soft_nms except: print('NMS not imported! If you need it,' ' do \n cd $Ce...
38.513514
90
0.638363
from __future__ import absolute_import from __future__ import division from __future__ import print_function import cv2 import numpy as np from progress.bar import Bar import time import torch import os try: from external.nms import soft_nms except: print('NMS not imported! If you need it,' ' do \n cd $Ce...
true
true
7905417162a2b2cbb3342bd2ad072af2d82cbc6c
2,975
py
Python
scripts/pyqtgraph-develop/pyqtgraph/widgets/GradientWidget.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
scripts/pyqtgraph-develop/pyqtgraph/widgets/GradientWidget.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
scripts/pyqtgraph-develop/pyqtgraph/widgets/GradientWidget.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from ..Qt import QtGui, QtCore from .GraphicsView import GraphicsView from ..graphicsItems.GradientEditorItem import GradientEditorItem import weakref import numpy as np __all__ = ['GradientWidget'] class GradientWidget(GraphicsView): """ Widget displaying an editable colo...
39.666667
91
0.647059
from ..Qt import QtGui, QtCore from .GraphicsView import GraphicsView from ..graphicsItems.GradientEditorItem import GradientEditorItem import weakref import numpy as np __all__ = ['GradientWidget'] class GradientWidget(GraphicsView): sigGradientChanged = QtCore.Signal(object) sigGradientChangeFi...
true
true
790542462fd8d3a7f1cc790da9a7f959c3a24912
21,034
py
Python
hdbscan/prediction.py
johnfischbeck/hdbscan
7499b53f9edca09c6a674a93e3d32bbbaf655b5a
[ "BSD-3-Clause" ]
null
null
null
hdbscan/prediction.py
johnfischbeck/hdbscan
7499b53f9edca09c6a674a93e3d32bbbaf655b5a
[ "BSD-3-Clause" ]
null
null
null
hdbscan/prediction.py
johnfischbeck/hdbscan
7499b53f9edca09c6a674a93e3d32bbbaf655b5a
[ "BSD-3-Clause" ]
null
null
null
# Support various prediction methods for predicting cluster membership # of new or unseen points. There are several ways to interpret how # to do this correctly, so we provide several methods for # the different use cases that may arise. import numpy as np from sklearn.neighbors import KDTree, BallTree from .dist_met...
37.967509
99
0.636256
import numpy as np from sklearn.neighbors import KDTree, BallTree from .dist_metrics import DistanceMetric from ._hdbscan_tree import compute_stability, labelling_at_cut, recurse_leaf_dfs from ._prediction_utils import (get_tree_row_with_child, dist_membership_vector, ...
true
true
790543d4a494b513f69af154e5eff999ab5252b1
1,659
py
Python
imagersite/imager_images/models.py
Loaye/django-imager-group
a4bdd285b8063d2553f59f2a78aaef0fcfd0c95d
[ "MIT" ]
null
null
null
imagersite/imager_images/models.py
Loaye/django-imager-group
a4bdd285b8063d2553f59f2a78aaef0fcfd0c95d
[ "MIT" ]
null
null
null
imagersite/imager_images/models.py
Loaye/django-imager-group
a4bdd285b8063d2553f59f2a78aaef0fcfd0c95d
[ "MIT" ]
2
2017-11-29T23:33:53.000Z
2017-12-05T22:36:09.000Z
"""Model module for images.""" from django.db import models from django.contrib.auth.models import User from imager_profile.models import ImagerProfile # Create your models here. class ImageBaseClass(models.Model): """Base class for Photo and Album classes.""" PRIVATE = 'PRVT' SHARED = 'SHRD' PUBLIC ...
29.625
77
0.65642
from django.db import models from django.contrib.auth.models import User from imager_profile.models import ImagerProfile class ImageBaseClass(models.Model): PRIVATE = 'PRVT' SHARED = 'SHRD' PUBLIC = 'PBLC' PUBLISHED = ((PRIVATE, 'private'), (SHARED, 'shared'), (PUB...
true
true
79054540a63ad226d77b45a013285b272dde3277
3,996
py
Python
Model/lookalike-model/lookalike_model/trainer/lookalike_trainer_tfrecords.py
rangaswamymr/incubator-bluemarlin
6cb60b2a41edc6509377f9eacb7660d199a9485b
[ "Apache-2.0" ]
21
2019-10-08T16:23:44.000Z
2020-04-08T23:14:36.000Z
Model/lookalike-model/lookalike_model/trainer/lookalike_trainer_tfrecords.py
rangaswamymr/incubator-bluemarlin
6cb60b2a41edc6509377f9eacb7660d199a9485b
[ "Apache-2.0" ]
162
2019-10-26T05:30:04.000Z
2022-03-30T12:44:41.000Z
Model/lookalike-model/lookalike_model/trainer/lookalike_trainer_tfrecords.py
rangaswamymr/incubator-bluemarlin
6cb60b2a41edc6509377f9eacb7660d199a9485b
[ "Apache-2.0" ]
33
2019-10-09T01:31:12.000Z
2022-03-29T08:00:36.000Z
import numpy as np import os, time import random import tensorflow as tf from lookalike_model.trainer.model_new import Model import argparse random.seed(1234) # adding arguments for tfrecord directory and the checkpoint directory parser = argparse.ArgumentParser() parser.add_argument("--data_dir", type=str, help="inp...
42.510638
152
0.654905
import numpy as np import os, time import random import tensorflow as tf from lookalike_model.trainer.model_new import Model import argparse random.seed(1234) parser = argparse.ArgumentParser() parser.add_argument("--data_dir", type=str, help="input data tfrecords dir location") parser.add_argument("--check_point_di...
true
true
790546acdd4c4c652c4d84bc19aef2e2d1738c9a
3,439
py
Python
openslides_backend/action/actions/organization/initial_import.py
MJJojo97/openslides-backend
af0d1edb0070e352d46f285a1ba0bbe3702d49ae
[ "MIT" ]
null
null
null
openslides_backend/action/actions/organization/initial_import.py
MJJojo97/openslides-backend
af0d1edb0070e352d46f285a1ba0bbe3702d49ae
[ "MIT" ]
null
null
null
openslides_backend/action/actions/organization/initial_import.py
MJJojo97/openslides-backend
af0d1edb0070e352d46f285a1ba0bbe3702d49ae
[ "MIT" ]
null
null
null
from typing import Any, Dict, Iterable, Optional, Tuple from datastore.shared.util import DeletedModelsBehaviour from ....models.checker import Checker, CheckException from ....models.models import Organization from ....shared.exceptions import ActionException from ....shared.filters import FilterOperator from ....sh...
36.978495
88
0.655714
from typing import Any, Dict, Iterable, Optional, Tuple from datastore.shared.util import DeletedModelsBehaviour from ....models.checker import Checker, CheckException from ....models.models import Organization from ....shared.exceptions import ActionException from ....shared.filters import FilterOperator from ....sh...
true
true
79054726c0312f6763070ed44dc85c4d890ac147
6,480
py
Python
tests/helpers/test_service.py
don66/home-assistant
a277470363c0758bb305410aad49c257ff8bac40
[ "Apache-2.0" ]
37
2018-05-22T07:17:26.000Z
2022-03-03T13:14:46.000Z
tests/helpers/test_service.py
sara0871/https-wakatime.com-android-studio
5a15b2c036b332c17d5f6a06664378e9273d684f
[ "Apache-2.0" ]
34
2018-05-22T07:19:40.000Z
2022-03-11T23:21:03.000Z
tests/helpers/test_service.py
sara0871/https-wakatime.com-android-studio
5a15b2c036b332c17d5f6a06664378e9273d684f
[ "Apache-2.0" ]
8
2018-05-30T20:05:26.000Z
2021-02-19T14:17:05.000Z
"""Test service helpers.""" import asyncio from copy import deepcopy import unittest from unittest.mock import patch # To prevent circular import when running just this file import homeassistant.components # noqa from homeassistant import core as ha, loader from homeassistant.const import STATE_ON, STATE_OFF, ATTR_EN...
35.604396
75
0.603395
import asyncio from copy import deepcopy import unittest from unittest.mock import patch import homeassistant.components from homeassistant import core as ha, loader from homeassistant.const import STATE_ON, STATE_OFF, ATTR_ENTITY_ID from homeassistant.helpers import service, template from homeassistant.setup impor...
true
true
7905476d1185959676b2530810eb2ba349ef8e5d
1,946
py
Python
docs/conf.py
saltstack/rend
cfbe365aff9f2177873eac8a38a3b650f704d363
[ "Apache-2.0" ]
2
2019-09-05T15:14:37.000Z
2020-04-13T07:40:08.000Z
docs/conf.py
saltstack/rend
cfbe365aff9f2177873eac8a38a3b650f704d363
[ "Apache-2.0" ]
1
2019-10-11T21:06:01.000Z
2019-10-11T21:06:01.000Z
docs/conf.py
saltstack/rend
cfbe365aff9f2177873eac8a38a3b650f704d363
[ "Apache-2.0" ]
1
2019-10-01T19:08:17.000Z
2019-10-01T19:08:17.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
33.551724
79
0.661871
project = 'rend' copyright = '2020, Thomas S Hatch' author = 'Thomas S Hatch' release = '4.1' master_doc = 'index' extensions = [ ] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] html_theme = 'alabaster' html_static_path = ['_static'...
true
true
790549de632a3856f9a97e8555d1b3c969fa7280
4,345
py
Python
redash/__init__.py
bmaeser/redash
cf5c2c5ba2359fce0b331dc242f63c917464ed55
[ "BSD-2-Clause" ]
1
2019-03-24T03:38:32.000Z
2019-03-24T03:38:32.000Z
redash/__init__.py
bmaeser/redash
cf5c2c5ba2359fce0b331dc242f63c917464ed55
[ "BSD-2-Clause" ]
null
null
null
redash/__init__.py
bmaeser/redash
cf5c2c5ba2359fce0b331dc242f63c917464ed55
[ "BSD-2-Clause" ]
1
2019-03-20T09:22:43.000Z
2019-03-20T09:22:43.000Z
import sys import logging import urlparse import urllib import redis from flask import Flask, current_app from flask_sslify import SSLify from werkzeug.contrib.fixers import ProxyFix from werkzeug.routing import BaseConverter from statsd import StatsClient from flask_mail import Mail from flask_limiter import Limiter ...
31.258993
118
0.729574
import sys import logging import urlparse import urllib import redis from flask import Flask, current_app from flask_sslify import SSLify from werkzeug.contrib.fixers import ProxyFix from werkzeug.routing import BaseConverter from statsd import StatsClient from flask_mail import Mail from flask_limiter import Limiter ...
true
true
79054a9f5cf29c63018ceead1b2180a90661739d
1,402
py
Python
nemo/package_info.py
btarjan/NeMo
6a2bb4d19524b0bff198b3d9bbd116f82486a36e
[ "Apache-2.0" ]
null
null
null
nemo/package_info.py
btarjan/NeMo
6a2bb4d19524b0bff198b3d9bbd116f82486a36e
[ "Apache-2.0" ]
null
null
null
nemo/package_info.py
btarjan/NeMo
6a2bb4d19524b0bff198b3d9bbd116f82486a36e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020, NVIDIA CORPORATION. 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 appli...
38.944444
111
0.74679
MAJOR = 1 MINOR = 7 PATCH = 0 PRE_RELEASE = 'rc' VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE) __shortversion__ = '.'.join(map(str, VERSION[:3])) __version__ = '.'.join(map(str, VERSION[:3])) + ''.join(VERSION[3:]) __package_name__ = 'nemo_toolkit' __contact_names__ = 'NVIDIA' __contact_emails__ = 'ne...
true
true