hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
5a62b4499b91266f84bd091acba19926c0bc1689
13,950
py
Python
src/models/tsm.py
tomstark99/epic-kitchens-100-fyrp
cbc9e59569fb6110b900a51def1947b8a3c93699
[ "Apache-2.0" ]
2
2021-08-31T10:02:56.000Z
2021-11-24T12:44:19.000Z
src/models/tsm.py
tomstark99/epic-kitchens-100-fyrp
cbc9e59569fb6110b900a51def1947b8a3c93699
[ "Apache-2.0" ]
null
null
null
src/models/tsm.py
tomstark99/epic-kitchens-100-fyrp
cbc9e59569fb6110b900a51def1947b8a3c93699
[ "Apache-2.0" ]
null
null
null
# Code for "TSM: Temporal Shift Module for Efficient Video Understanding" # arXiv:1811.08383 # Ji Lin*, Chuang Gan, Song Han # {jilin, songhan}@mit.edu, ganchuang@csail.mit.edu import logging LOG = logging.getLogger(__name__)
36.046512
95
0.533835
# Code for "TSM: Temporal Shift Module for Efficient Video Understanding" # arXiv:1811.08383 # Ji Lin*, Chuang Gan, Song Han # {jilin, songhan}@mit.edu, ganchuang@csail.mit.edu import logging import re import numpy as np import torch import torchvision from ops.basic_ops import ConsensusModule from ops.temporal_shift ...
0
0
0
13,307
0
88
0
59
267
1d227eef4404b949b7380668aaf4ed4adc360363
1,962
py
Python
ricknmorty.py
netanelkoli/ricknmorty
4cab0c356e46a3c62655e4a9326cd5b7f705ed9c
[ "MIT" ]
1
2020-11-06T11:54:00.000Z
2020-11-06T11:54:00.000Z
ricknmorty.py
netanelkoli/ricknmorty
4cab0c356e46a3c62655e4a9326cd5b7f705ed9c
[ "MIT" ]
null
null
null
ricknmorty.py
netanelkoli/ricknmorty
4cab0c356e46a3c62655e4a9326cd5b7f705ed9c
[ "MIT" ]
1
2021-09-01T09:16:11.000Z
2021-09-01T09:16:11.000Z
from flask import Flask # Global Variables url = "https://rickandmortyapi.com/api/character/?Species=Human&status=alive&origin=earth" csv_file = "ricknmorty.csv" app = Flask(__name__) # Check if a json is valid or not # Main loop function if __name__ == "__main__": print("Staring to parse endpoint's response to ...
26.16
90
0.637105
import pandas as pd import os, sys, glob, time import requests, json import csv from flask import Flask # Global Variables url = "https://rickandmortyapi.com/api/character/?Species=Human&status=alive&origin=earth" csv_file = "ricknmorty.csv" app = Flask(__name__) def download_json(url): try: response = re...
0
113
0
0
0
1,215
0
-8
248
e924055fe7931f7a9bce1421ba53742edaa03d95
986
py
Python
OpenAttack2/attack_assist/substitute/word/__init__.py
NingNing-C/OpenAttack
b49c7907c791d1a95acb222560b03884833b2745
[ "MIT" ]
null
null
null
OpenAttack2/attack_assist/substitute/word/__init__.py
NingNing-C/OpenAttack
b49c7907c791d1a95acb222560b03884833b2745
[ "MIT" ]
null
null
null
OpenAttack2/attack_assist/substitute/word/__init__.py
NingNing-C/OpenAttack
b49c7907c791d1a95acb222560b03884833b2745
[ "MIT" ]
null
null
null
#from OpenAttack.OpenAttack2.tags.tags import TAG_Protein
39.44
61
0.830629
#from OpenAttack.OpenAttack2.tags.tags import TAG_Protein from .base import WordSubstitute from .chinese_cilin import ChineseCiLinSubstitute from .chinese_hownet import ChineseHowNetSubstitute from .chinese_wordnet import ChineseWordNetSubstitute from .chinese_word2vec import ChineseWord2VecSubstitute from .protein_blo...
0
0
0
0
0
317
0
323
288
51badcdb9f58cbf62aef92ea1f56238ff48d38c8
430
py
Python
AdventOfCode 2020/old/aoc3.py
BhasherBEL/ProgrammingChallenges
e697c7f7e3d8177b9ee615918f3c78b645b927d0
[ "MIT" ]
null
null
null
AdventOfCode 2020/old/aoc3.py
BhasherBEL/ProgrammingChallenges
e697c7f7e3d8177b9ee615918f3c78b645b927d0
[ "MIT" ]
1
2020-12-09T12:00:56.000Z
2020-12-09T12:00:56.000Z
AdventOfCode 2020/old/aoc3.py
BhasherBEL/ProgrammingChallenges
e697c7f7e3d8177b9ee615918f3c78b645b927d0
[ "MIT" ]
1
2020-12-09T11:38:49.000Z
2020-12-09T11:38:49.000Z
with open('input3.txt', 'r') as file: data = [list(el) for el in file.read().split('\n')] print(check(3, 1) * check(1, 1) * check(5, 1) * check(7, 1) * check(1, 2))
22.631579
74
0.430233
with open('input3.txt', 'r') as file: data = [list(el) for el in file.read().split('\n')] def check(dx, dy): x = 0 y = 0 tree = 0 ntree = 0 while y < len(data)-dy: y += dy x = (x + dx) % len(data[y]) if data[y][x] == '#': tree += 1 else: n...
0
0
0
0
0
229
0
0
23
d4a6ded9b70e7ff1db27b73d34d318f3cb0ea829
145
py
Python
gazouilli/writers/__init__.py
rafikdraoui/gazouilli
c300035ec7df6500a2af5c431b20f506d95a86fa
[ "MIT" ]
3
2016-06-02T10:07:30.000Z
2016-06-02T10:54:23.000Z
gazouilli/writers/__init__.py
rafikdraoui/gazouilli
c300035ec7df6500a2af5c431b20f506d95a86fa
[ "MIT" ]
1
2016-06-03T12:55:48.000Z
2016-07-03T17:02:54.000Z
gazouilli/writers/__init__.py
rafikdraoui/gazouilli
c300035ec7df6500a2af5c431b20f506d95a86fa
[ "MIT" ]
null
null
null
from .debug import Debug from .floppy import Floppy from .json import Json from .midi import Midi __all__ = ['Debug', 'Floppy', 'Json', 'Midi']
20.714286
45
0.717241
from .debug import Debug from .floppy import Floppy from .json import Json from .midi import Midi __all__ = ['Debug', 'Floppy', 'Json', 'Midi']
0
0
0
0
0
0
0
0
0
67d88443e490bbeb91aa7eb97cb293e4492ef5de
230
py
Python
Code/permutation.py
ThomasLee94/cs1.3-core-data-algo
049673db68ec5f9e077cd1bcfdc5251b729edf10
[ "MIT" ]
null
null
null
Code/permutation.py
ThomasLee94/cs1.3-core-data-algo
049673db68ec5f9e077cd1bcfdc5251b729edf10
[ "MIT" ]
null
null
null
Code/permutation.py
ThomasLee94/cs1.3-core-data-algo
049673db68ec5f9e077cd1bcfdc5251b729edf10
[ "MIT" ]
null
null
null
# A permutation is the act of rearranging the members of a set into a sequence. # Example: set_a = {1,2,3} -> (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1) # Loop throug set # rearrange set
28.75
82
0.595652
# A permutation is the act of rearranging the members of a set into a sequence. # Example: set_a = {1,2,3} -> (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1) def permutation(set): # Loop throug set # rearrange set
0
0
0
0
0
0
0
0
23
647a8de0db31e251e90f71b15a2f36b761751a8a
679
py
Python
2/zad3/zad3.py
dbrcina/OOUP-FER-2019-20
c441af9db6bfbffaf9d0ba578a9f3d42076aad1b
[ "MIT" ]
1
2021-02-22T21:16:48.000Z
2021-02-22T21:16:48.000Z
2/zad3/zad3.py
dbrcina/OOUP-Labos-FER-2019-20
c441af9db6bfbffaf9d0ba578a9f3d42076aad1b
[ "MIT" ]
null
null
null
2/zad3/zad3.py
dbrcina/OOUP-Labos-FER-2019-20
c441af9db6bfbffaf9d0ba578a9f3d42076aad1b
[ "MIT" ]
1
2021-05-25T17:37:00.000Z
2021-05-25T17:37:00.000Z
maxint = mymax([1, 3, 5, 7, 4, 6, 9, 2, 0]) maxchar = mymax("Suncana strana ulice") maxstring = mymax([ "Gle", "malu", "vocku", "poslije", "kise", "Puna", "je", "kapi", "pa", "ih", "njise"]) D = {'burek':8, 'buhtla':5} maxfood = mymax(D, lambda x: D[x]) persons = [("Luka", "Giljanovi"), ("Mislav", "Has"), ("Darijo...
29.521739
94
0.581738
def mymax(iterable, key = lambda x: x): max_el = max_key = None for el in iterable: if (max_key == None or key(el) > max_key): max_el = el max_key = key(el) return max_el maxint = mymax([1, 3, 5, 7, 4, 6, 9, 2, 0]) maxchar = mymax("Suncana strana ulice") maxstring = mym...
4
0
0
0
0
198
0
0
22
c2c3268cf37962649cc8bb649a062d544ea54e6e
6,430
py
Python
main.py
hackhumantrafficking/incident-gateway
2db90db784d68ee730326ae21abe5c8c48a796ec
[ "Apache-2.0" ]
null
null
null
main.py
hackhumantrafficking/incident-gateway
2db90db784d68ee730326ae21abe5c8c48a796ec
[ "Apache-2.0" ]
null
null
null
main.py
hackhumantrafficking/incident-gateway
2db90db784d68ee730326ae21abe5c8c48a796ec
[ "Apache-2.0" ]
null
null
null
import google.appengine.api.urlfetch as urlfetch from flask import Flask try: # Apparently not all implementations have SystemRandom defined, so I expect # this import to fail, if that's the case. from random import SystemRandom randomizer = SystemRandom() except: import random as randomizer SAFE...
29.906977
167
0.69549
import logging import json import base64 import urllib import google.appengine.api.urlfetch as urlfetch from flask import Flask, Response, request from firebase.wrapper import Firebase try: # Apparently not all implementations have SystemRandom defined, so I expect # this import to fail, if that's the case. ...
0
1,665
0
0
0
3,287
0
2
447
e0c55859fbc0b02b4fe0ab73651df4a5d1e42d82
825
py
Python
xfel/libtbx_refresh.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
155
2016-11-23T12:52:16.000Z
2022-03-31T15:35:44.000Z
xfel/libtbx_refresh.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
590
2016-12-10T11:31:18.000Z
2022-03-30T23:10:09.000Z
xfel/libtbx_refresh.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
115
2016-11-15T08:17:28.000Z
2022-02-09T15:30:14.000Z
from __future__ import absolute_import, division, print_function import libtbx.load_env, os cxi_user = libtbx.env.find_in_repositories( relative_path="cxi_user", test=os.path.isdir) if cxi_user is None or not os.path.exists(cxi_user): print(" Creating cxi_user directory") sources_root =...
35.869565
87
0.710303
from __future__ import absolute_import, division, print_function import libtbx.load_env, os cxi_user = libtbx.env.find_in_repositories( relative_path="cxi_user", test=os.path.isdir) if cxi_user is None or not os.path.exists(cxi_user): print(" Creating cxi_user directory") sources_root =...
0
0
0
0
0
0
0
0
0
a0db5a24b1e11f2c6ee64a91df6784690b84aba6
96
py
Python
dreamboxapi/__init__.py
mtdcr/python-dreamboxapi
9eaf96ba2c97412f13f622720d67f99650e09173
[ "MIT" ]
null
null
null
dreamboxapi/__init__.py
mtdcr/python-dreamboxapi
9eaf96ba2c97412f13f622720d67f99650e09173
[ "MIT" ]
null
null
null
dreamboxapi/__init__.py
mtdcr/python-dreamboxapi
9eaf96ba2c97412f13f622720d67f99650e09173
[ "MIT" ]
null
null
null
__author__ = """Stephan REichholf""" __email__ = 'reichi@opendreambox.org' __version__ = '1.0.2'
32
37
0.729167
__author__ = """Stephan REichholf""" __email__ = 'reichi@opendreambox.org' __version__ = '1.0.2'
0
0
0
0
0
0
0
0
0
6a63b3b6a387389832fbfbfd26cd4586f9ef8e38
15,239
py
Python
tests/gamestonk_terminal/stocks/behavioural_analysis/test_ba_controller.py
GarnixJu2015/GamestonkTerminal
ec400e46ddce4ac934af836b863528f14a13d865
[ "MIT" ]
null
null
null
tests/gamestonk_terminal/stocks/behavioural_analysis/test_ba_controller.py
GarnixJu2015/GamestonkTerminal
ec400e46ddce4ac934af836b863528f14a13d865
[ "MIT" ]
1
2022-01-15T01:24:24.000Z
2022-01-15T01:24:24.000Z
tests/gamestonk_terminal/stocks/behavioural_analysis/test_ba_controller.py
GarnixJu2015/GamestonkTerminal
ec400e46ddce4ac934af836b863528f14a13d865
[ "MIT" ]
1
2021-11-07T20:59:25.000Z
2021-11-07T20:59:25.000Z
# IMPORTATION STANDARD # IMPORTATION THIRDPARTY import pandas as pd # IMPORTATION INTERNAL # pylint: disable=E1101 # pylint: disable=W0603 # pylint: disable=E1111 EMPTY_DF = pd.DataFrame()
26.502609
97
0.513288
# IMPORTATION STANDARD import os from datetime import datetime # IMPORTATION THIRDPARTY import pandas as pd import pytest # IMPORTATION INTERNAL from gamestonk_terminal.stocks.behavioural_analysis import ba_controller # pylint: disable=E1101 # pylint: disable=W0603 # pylint: disable=E1111 EMPTY_DF = pd.DataFrame() ...
0
14,631
0
0
0
0
0
39
364
17bf804b5fb9a0ab07bd470958d4c841ecd957e2
1,435
py
Python
Modulo_5/proyecto/presentacion/form_ubicacion/formAUbicacion.py
AutodidactaMx/cocid_python
11628f465ff362807a692c79ede26bf30dd8e26a
[ "MIT" ]
null
null
null
Modulo_5/proyecto/presentacion/form_ubicacion/formAUbicacion.py
AutodidactaMx/cocid_python
11628f465ff362807a692c79ede26bf30dd8e26a
[ "MIT" ]
null
null
null
Modulo_5/proyecto/presentacion/form_ubicacion/formAUbicacion.py
AutodidactaMx/cocid_python
11628f465ff362807a692c79ede26bf30dd8e26a
[ "MIT" ]
1
2022-03-04T00:57:18.000Z
2022-03-04T00:57:18.000Z
import seaborn as sns sns.set()
42.205882
217
0.667596
import seaborn as sns import matplotlib.pyplot as plt from presentacion.form_ubicacion.formAUbicacion_designer import FormUbicacionDesigner sns.set() class FormUbicacion(FormUbicacionDesigner): df = None def __init__(self,df): super().__init__() self.df = df self.initialize_compone...
2
0
0
1,257
0
0
0
74
67
623b298ef66aea67378f5c541fd1f7748d85f4ab
754
py
Python
ossdbtoolsservice/query/contracts/result_set_summary.py
DaeunYim/pgtoolsservice
b7e548718d797883027b2caee2d4722810b33c0f
[ "MIT" ]
33
2019-05-27T13:04:35.000Z
2022-03-17T13:33:05.000Z
ossdbtoolsservice/query/contracts/result_set_summary.py
DaeunYim/pgtoolsservice
b7e548718d797883027b2caee2d4722810b33c0f
[ "MIT" ]
31
2019-06-10T01:55:47.000Z
2022-03-09T07:27:49.000Z
ossdbtoolsservice/query/contracts/result_set_summary.py
DaeunYim/pgtoolsservice
b7e548718d797883027b2caee2d4722810b33c0f
[ "MIT" ]
25
2019-05-13T18:39:24.000Z
2021-11-16T03:07:33.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------...
37.7
119
0.547745
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------...
0
0
0
295
0
0
0
35
77
556f9bb3bae93649113079fa393138bab0852d73
921
py
Python
exercises/zh/test_general.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/zh/test_general.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/zh/test_general.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
# This test file only runs internally when you test the course with pytest. # It can be used to ensure that results the course depend on are accurate, e.g. # when updating to a new version of spaCy. This especially includes predictions # that some examples assume or depend on.
29.709677
79
0.677524
# This test file only runs internally when you test the course with pytest. # It can be used to ensure that results the course depend on are accurate, e.g. # when updating to a new version of spaCy. This especially includes predictions # that some examples assume or depend on. import spacy import pytest @pytest.fixtu...
186
45
0
0
0
437
0
-17
113
a013ed5353627e5080ae5cc20babf27c78b30276
511
py
Python
lcm.py
prerna250/python-algorithms
ba538770863b6fbcad867e808a17be77a7a75908
[ "MIT" ]
5
2020-08-20T17:06:50.000Z
2020-11-07T09:11:30.000Z
lcm.py
freelancing-solutions/python-algorithms
34bea3245497f3e0586d6dfb43438b6498d7a245
[ "MIT" ]
14
2020-10-16T16:31:33.000Z
2020-11-10T01:54:27.000Z
lcm.py
freelancing-solutions/python-algorithms
34bea3245497f3e0586d6dfb43438b6498d7a245
[ "MIT" ]
17
2020-10-16T17:49:23.000Z
2020-11-03T09:58:27.000Z
#Calculates Lowest Common Multiple in1 = int(input("Insert 1st number: ")) in2 = int(input("Insert 2nd number: ")) print("LCM of %d and %d is"%(in1, in2), compute_lcm(in1, in2))
23.227273
76
0.661448
from math import * #Calculates Lowest Common Multiple def compute_lcm(x, y): # Select larger number if x > y: larger = x else: larger = y # Checks if the larger value is divisible by both numbers while((larger % x != 0) or (larger % y != 0)): # If not divisible by either number, the larger value is inc...
0
0
0
0
0
290
0
-3
44
280e48fc08599e54a55c407335bcd3d8ac4d8ed9
476
py
Python
main_employee_project/employee_register/urls.py
PadminiRai/django-
83d4fa1fcdbbaf33afd0b7890e650c175caf64be
[ "MIT" ]
null
null
null
main_employee_project/employee_register/urls.py
PadminiRai/django-
83d4fa1fcdbbaf33afd0b7890e650c175caf64be
[ "MIT" ]
null
null
null
main_employee_project/employee_register/urls.py
PadminiRai/django-
83d4fa1fcdbbaf33afd0b7890e650c175caf64be
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('',views.employee_form ), path('list/',views.employee_list ), path('safety_ohs_a9/',safety_ohs_a9,name='safety_ohs_a9'), path('homepagef/',homepagef,name='homepagef'), path('charityregisterf/',charityregisterf,name='charity...
34
72
0.689076
from django.urls import path,include from . import views from .views import * urlpatterns = [ path('',views.employee_form ), path('list/',views.employee_list ), path('safety_ohs_a9/',safety_ohs_a9,name='safety_ohs_a9'), path('homepagef/',homepagef,name='homepagef'), path('charityregisterf/',...
0
0
0
0
0
0
0
7
23
1ba6efb281049b0536f2c58f5e08caa9e8b18f3f
2,986
py
Python
utils/generate_problem_list.py
geekhall/algorithms
7dfab1e952e4b1b3ae63ec1393fd481b8bf4af86
[ "MIT" ]
null
null
null
utils/generate_problem_list.py
geekhall/algorithms
7dfab1e952e4b1b3ae63ec1393fd481b8bf4af86
[ "MIT" ]
null
null
null
utils/generate_problem_list.py
geekhall/algorithms
7dfab1e952e4b1b3ae63ec1393fd481b8bf4af86
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:UTF-8 -*- ######################################################### # filename : generateReadme.py # author : geekhall # version : v1.0.0 # function : Gererate root README.md file. ######################################################### # Constant ROOT_DIR = './' # link address...
33.931818
143
0.609846
#!/usr/bin/env python3 # -*- coding:UTF-8 -*- ######################################################### # filename : generateReadme.py # author : geekhall # version : v1.0.0 # function : Gererate root README.md file. ######################################################### import os # Constant ROOT_DIR = './' # li...
0
0
0
278
0
472
0
-12
67
0d63996d21699c08714defcbf78dc0f402855d08
1,143
py
Python
src/main.py
SoftandPure/porkchop
79adc2940c929b3b053513c5ad6bee641c8f9af7
[ "MIT" ]
1
2022-01-06T15:08:28.000Z
2022-01-06T15:08:28.000Z
src/main.py
GiorgiaGottifredi/porkchop-discord-bot
79adc2940c929b3b053513c5ad6bee641c8f9af7
[ "MIT" ]
1
2020-10-22T13:30:59.000Z
2020-10-22T13:30:59.000Z
src/main.py
SoftandPure/porkchop
79adc2940c929b3b053513c5ad6bee641c8f9af7
[ "MIT" ]
null
null
null
if __name__ == '__main__': bot = PorkchopBot()
23.8125
72
0.673666
import discord, asyncio, json class PorkchopBot(discord.Client): def __init__(self): super().__init__() with open('config.json', 'r') as file: self.settings = json.load(file) print(self.settings) self.run(self.settings['Discord']['token']) print("Bot started...") async def on_ready(self): print("B...
0
0
738
302
0
0
0
8
45
db5e7699f72a057a1bca6b7acd1b13647da09900
31,993
py
Python
BOTA.py
twaddlac/bota_docker
c6a33779cfe34240ee2879f30d43e8c6ab08c9e9
[ "BSD-3-Clause" ]
null
null
null
BOTA.py
twaddlac/bota_docker
c6a33779cfe34240ee2879f30d43e8c6ab08c9e9
[ "BSD-3-Clause" ]
null
null
null
BOTA.py
twaddlac/bota_docker
c6a33779cfe34240ee2879f30d43e8c6ab08c9e9
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Chengwei Luo (cluo@broadinstitute.org)' __version__ = '0.1.0' __date__ = 'Oct 2015' """ BOTA: Bacteria-Origin T-cell Antigen predictor Copyright(c) 2015 Chengwei Luo (luo.chengwei@gatech.edu) This program is free software: you can redistribute it and/or ...
33.395616
125
0.659144
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Chengwei Luo (cluo@broadinstitute.org)' __version__ = '0.1.0' __date__ = 'Oct 2015' """ BOTA: Bacteria-Origin T-cell Antigen predictor Copyright(c) 2015 Chengwei Luo (luo.chengwei@gatech.edu) This program is free software: you can redistribute it and/or ...
0
0
0
9,244
0
18,098
0
140
758
4ede57db6a9812303a1762674bc712b392106936
930
py
Python
classgrade/gradapp/migrations/0011_auto_20160926_2149.py
classgrade/classgrade
144dcfc9579e6858ff4aa79835c76b9611ed73b2
[ "MIT" ]
5
2016-11-15T17:46:27.000Z
2022-01-10T08:06:17.000Z
classgrade/gradapp/migrations/0011_auto_20160926_2149.py
classgrade/classgrade
144dcfc9579e6858ff4aa79835c76b9611ed73b2
[ "MIT" ]
21
2016-11-07T14:58:22.000Z
2021-02-02T21:41:12.000Z
classgrade/gradapp/migrations/0011_auto_20160926_2149.py
classgrade/classgrade
144dcfc9579e6858ff4aa79835c76b9611ed73b2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-26 21:49 from __future__ import unicode_literals
34.444444
180
0.673118
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-26 21:49 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gradapp', '0010_auto_20160926_2144'), ] operations = ...
0
0
0
721
0
0
0
27
68
1cadab520d5fff6aa4e05e0c385d7c0ce43e3b89
8,603
py
Python
my_cv/kaggle_contest/DogBreedIdentification/01.py
strawsyz/straw
db313c78c2e3c0355cd10c70ac25a15bb5632d41
[ "MIT" ]
2
2020-04-06T09:09:19.000Z
2020-07-24T03:59:55.000Z
my_cv/kaggle_contest/DogBreedIdentification/01.py
strawsyz/straw
db313c78c2e3c0355cd10c70ac25a15bb5632d41
[ "MIT" ]
null
null
null
my_cv/kaggle_contest/DogBreedIdentification/01.py
strawsyz/straw
db313c78c2e3c0355cd10c70ac25a15bb5632d41
[ "MIT" ]
null
null
null
import os import shutil import time import zipfile import d2lzh as d2l from mxnet import autograd, gluon, nd from mxnet.gluon import data as gdata, loss as gloss # KaggledemoFalse demo = True data_dir = '../data/kaggle_dog' if demo: zipfiles = ['train_valid_test_tiny.zip'] else: zipfiles = ['train.zip', 'test...
38.927602
78
0.646751
import collections import math import os import shutil import time import zipfile import d2lzh as d2l from mxnet import autograd, gluon, init, nd from mxnet.gluon import data as gdata, loss as gloss, model_zoo, nn # 如果使用下载的Kaggle比赛的完整数据集,把demo变量改为False demo = True data_dir = '../data/kaggle_dog' if demo: zipfiles...
1,179
0
0
0
0
2,333
0
8
136
a90944c261cdec590ae60c28c24fe921295e0d3b
8,522
py
Python
Analysis/DarkDeleter.py
habi/GlobalDiagnostiX
5171ccee3c8a8ccc7f0b82d52d7fdac327e8d7c7
[ "Unlicense" ]
11
2018-10-20T07:29:37.000Z
2022-03-18T07:10:47.000Z
Analysis/DarkDeleter.py
guizi327832749/GlobalDiagnostiX
5171ccee3c8a8ccc7f0b82d52d7fdac327e8d7c7
[ "Unlicense" ]
null
null
null
Analysis/DarkDeleter.py
guizi327832749/GlobalDiagnostiX
5171ccee3c8a8ccc7f0b82d52d7fdac327e8d7c7
[ "Unlicense" ]
11
2018-10-27T05:16:26.000Z
2022-03-29T14:48:48.000Z
# -*- coding: utf8 -*- """ Script to delete unused darks of each image. For each experiment we acquire something like 30 images, from which only about 3 to 4 contain data, the rest of the images are darks. We don't have to keep all the darks; this script deletes all but one at the beginning and the two darks adjacent ...
45.089947
101
0.620042
# -*- coding: utf8 -*- """ Script to delete unused darks of each image. For each experiment we acquire something like 30 images, from which only about 3 to 4 contain data, the rest of the images are darks. We don't have to keep all the darks; this script deletes all but one at the beginning and the two darks adjacent ...
0
0
0
0
0
0
0
0
0
4678ac3535cea8db8e64ee9ff1301417dbb4f81c
19,250
py
Python
betaGo.py
bslqy/Pacman-Capture-the-flag
a5623fc1257a0a11fe8cfd20a35e71f3762dd863
[ "Apache-2.0" ]
7
2018-09-24T06:55:04.000Z
2020-11-30T13:37:33.000Z
betaGo.py
bslqy/Pacman-Capture-the-flag
a5623fc1257a0a11fe8cfd20a35e71f3762dd863
[ "Apache-2.0" ]
null
null
null
betaGo.py
bslqy/Pacman-Capture-the-flag
a5623fc1257a0a11fe8cfd20a35e71f3762dd863
[ "Apache-2.0" ]
14
2018-10-11T23:55:21.000Z
2021-12-25T06:48:57.000Z
# myTeam.py # --------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # # At...
39.690722
120
0.690234
# myTeam.py # --------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # # At...
0
0
0
17,254
0
0
0
52
226
404265759e90129b48225883110b78c71ff3bf0a
2,128
py
Python
MergeGraphmls.py
OSADP/Traffic-Congestion-State-Predictor-Tool
fbbf7fe9f912ebf6276f0d1173464c99c56fdbc5
[ "Apache-2.0" ]
2
2020-04-15T21:22:58.000Z
2021-03-15T19:27:42.000Z
MergeGraphmls.py
OSADP/Traffic-Congestion-State-Predictor-Tool
fbbf7fe9f912ebf6276f0d1173464c99c56fdbc5
[ "Apache-2.0" ]
null
null
null
MergeGraphmls.py
OSADP/Traffic-Congestion-State-Predictor-Tool
fbbf7fe9f912ebf6276f0d1173464c99c56fdbc5
[ "Apache-2.0" ]
1
2021-03-12T03:30:28.000Z
2021-03-12T03:30:28.000Z
import networkx as nx import datetime import time from datetime import datetime, timedelta import sys # October days = ['1','2','3','4','5','6','7','8','9','10','11', '12','13','14','15','16','17', '18','19','20','21','22','23','24','25','26','27','28','29','30','31'] startTime = '09:00' endTime = '23:59' timeSlices...
36.689655
156
0.630639
import networkx as nx import datetime import time from datetime import datetime, timedelta import sys # October days = ['1','2','3','4','5','6','7','8','9','10','11', '12','13','14','15','16','17', '18','19','20','21','22','23','24','25','26','27','28','29','30','31'] startTime = '09:00' endTime = '23:59' def generat...
0
0
0
0
0
559
0
0
22
4875bd8927340da52bd26aed809015c95c8594a5
1,076
py
Python
volunteer/migrations/0006_auto_20200402_1524.py
horizonltd/corona
fd7302aae313e0767a73ffd772553cefad71acaf
[ "MIT" ]
null
null
null
volunteer/migrations/0006_auto_20200402_1524.py
horizonltd/corona
fd7302aae313e0767a73ffd772553cefad71acaf
[ "MIT" ]
10
2020-03-31T01:56:33.000Z
2022-02-10T11:23:42.000Z
website/migrations/0006_auto_20200402_1524.py
horizonltd/corona
fd7302aae313e0767a73ffd772553cefad71acaf
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-04-02 09:24
27.589744
70
0.556691
# Generated by Django 2.2 on 2020-04-02 09:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('volunteer', '0005_auto_20200402_1503'), ] operations = [ migrations.AlterField( model_name='reportcase', name='lga', ...
0
0
0
964
0
0
0
19
46
89268a558feacd9128c7824b413fb4cdbc56bc5a
320
py
Python
1973.py
gabzin/uri
177bdf3f87bacfd924bd031a973b8db877379fe5
[ "MIT" ]
3
2021-09-21T18:50:20.000Z
2021-12-14T13:07:31.000Z
1973.py
gabzin/uri
177bdf3f87bacfd924bd031a973b8db877379fe5
[ "MIT" ]
null
null
null
1973.py
gabzin/uri
177bdf3f87bacfd924bd031a973b8db877379fe5
[ "MIT" ]
null
null
null
n=int(input()) x=list(map(int,input().split())) pos=soma=tot=0 aux=True for i,num in enumerate(x): tot+=num if num%2==0 and aux: att = i+1 soma+=((i*2)+1)-pos aux=False if num-1==0 and aux:pos=i+1 else: if(soma>0):tot-=soma else: att=n tot-=att print(att,tot)
17.777778
32
0.53125
n=int(input()) x=list(map(int,input().split())) pos=soma=tot=0 aux=True for i,num in enumerate(x): tot+=num if num%2==0 and aux: att = i+1 soma+=((i*2)+1)-pos aux=False if num-1==0 and aux:pos=i+1 else: if(soma>0):tot-=soma else: att=n tot-=att print(att,tot)
0
0
0
0
0
0
0
0
0
edee8184ab6115e705e80cde8ef4b15fe9117b22
4,393
py
Python
python/wtte/data_generators.py
sandeepnair2812/Weibull-Time-To-Event-Recurrent-Neural-Network
162f5c17f21db79a316d563b60835d178142fd69
[ "MIT" ]
727
2017-01-29T16:47:38.000Z
2022-03-31T23:21:45.000Z
python/wtte/data_generators.py
kgulpinar/wtte-rnn
162f5c17f21db79a316d563b60835d178142fd69
[ "MIT" ]
68
2017-02-01T16:32:23.000Z
2022-01-24T11:24:36.000Z
python/wtte/data_generators.py
kgulpinar/wtte-rnn
162f5c17f21db79a316d563b60835d178142fd69
[ "MIT" ]
199
2017-01-30T10:25:04.000Z
2022-03-30T09:41:59.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import pandas as pd from six.moves import xrange def generate_random_df(n_seqs=5, max_seq_length=10, unique_times=True, ...
31.156028
100
0.620533
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import pandas as pd from six.moves import xrange def generate_random_df(n_seqs=5, max_seq_length=10, unique_times=True, ...
0
0
0
0
0
0
0
0
0
2768d948d708343912bed2ba3b8721c38f612f07
990
py
Python
stupid_rotation/rotate.py
aarondettmann/modnar-ylgnizama
cb2302d62f67551b4b6a571379e37ddee51e504a
[ "Apache-2.0" ]
1
2020-04-23T19:19:56.000Z
2020-04-23T19:19:56.000Z
stupid_rotation/rotate.py
aarondettmann/modnar-ylgnizama
cb2302d62f67551b4b6a571379e37ddee51e504a
[ "Apache-2.0" ]
null
null
null
stupid_rotation/rotate.py
aarondettmann/modnar-ylgnizama
cb2302d62f67551b4b6a571379e37ddee51e504a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import math as m import matplotlib.pyplot as plt def rotate_points_2D(points, angle): """Rotate points using complex numbers""" # Encode the rotation operation z = complex(m.cos(angle), m.sin(angle)) points_rot = [] for point in points: p_...
19.038462
61
0.545455
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import math as m import matplotlib.pyplot as plt def rotate_points_2D(points, angle): """Rotate points using complex numbers""" # Encode the rotation operation z = complex(m.cos(angle), m.sin(angle)) points_rot = [] for point in points: p_...
0
0
0
0
0
0
0
0
0
55b720ece729b46d8f5e8ec241932f1bd463ce17
80
py
Python
mips_revisit/google_bert/estimator.py
vlad17/mips_revisit
0777b37d9727d785487379e5b1f6dcd146d8b17c
[ "Apache-2.0" ]
null
null
null
mips_revisit/google_bert/estimator.py
vlad17/mips_revisit
0777b37d9727d785487379e5b1f6dcd146d8b17c
[ "Apache-2.0" ]
null
null
null
mips_revisit/google_bert/estimator.py
vlad17/mips_revisit
0777b37d9727d785487379e5b1f6dcd146d8b17c
[ "Apache-2.0" ]
null
null
null
""" Wrapper around existing BERT code to create a classification estimator. """
16
60
0.7625
""" Wrapper around existing BERT code to create a classification estimator. """
0
0
0
0
0
0
0
0
0
434c4ef20995383ecc3f16a0c02ef8da45e32384
2,635
py
Python
Tests/test_Ontology_OboIO.py
szymczakpau/biopython
6f997cd1ea7daf89f0b70854401da4cde35d6a00
[ "PostgreSQL" ]
null
null
null
Tests/test_Ontology_OboIO.py
szymczakpau/biopython
6f997cd1ea7daf89f0b70854401da4cde35d6a00
[ "PostgreSQL" ]
null
null
null
Tests/test_Ontology_OboIO.py
szymczakpau/biopython
6f997cd1ea7daf89f0b70854401da4cde35d6a00
[ "PostgreSQL" ]
6
2016-10-24T11:27:13.000Z
2020-02-26T16:35:01.000Z
# Copyright 2013 by Kamil Koziara. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. import unittest if __name__ == "__main__": runner = unittest.TextTestRunner(verbosity = ...
25.833333
89
0.591651
# Copyright 2013 by Kamil Koziara. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. from Bio._py3k import StringIO import unittest from Bio.Ontology.IO.OboIO import OboIterato...
0
0
0
2,091
0
0
0
65
119
d4d3cc76d293699f4e5f1425718d8478485dc1e4
48
py
Python
opendatatools/wscn/__init__.py
solider245/OpenData
031aa29b7b6b26a903f378e3da10520fd3a1b7ab
[ "Apache-2.0" ]
1,179
2018-05-28T07:14:41.000Z
2022-03-27T16:03:51.000Z
opendatatools/wscn/__init__.py
taoyeah/OpenData
031aa29b7b6b26a903f378e3da10520fd3a1b7ab
[ "Apache-2.0" ]
42
2018-07-05T02:44:56.000Z
2022-03-29T12:12:30.000Z
opendatatools/wscn/__init__.py
taoyeah/OpenData
031aa29b7b6b26a903f378e3da10520fd3a1b7ab
[ "Apache-2.0" ]
297
2018-05-28T07:39:38.000Z
2022-03-28T02:35:59.000Z
# encoding: utf-8
16
29
0.75
# encoding: utf-8 from .wscn_interface import *
0
0
0
0
0
0
0
8
23
14fe5eeeae8ffcffcdfac52b1473f57223ae7d20
17
py
Python
tests/testproject1/sub_init.py
zooba/pymsbuild
7bd00271186857050760968c6b95e3c7430fe33e
[ "MIT" ]
7
2019-01-11T08:13:01.000Z
2021-07-05T22:55:39.000Z
tests/testproject1/sub_init.py
zooba/pymsbuild
7bd00271186857050760968c6b95e3c7430fe33e
[ "MIT" ]
11
2020-05-16T16:05:29.000Z
2021-11-25T23:44:56.000Z
tests/testproject1/sub_init.py
zooba/pymsbuild
7bd00271186857050760968c6b95e3c7430fe33e
[ "MIT" ]
null
null
null
"""Sub module"""
8.5
16
0.529412
"""Sub module"""
0
0
0
0
0
0
0
0
0
9de7be8640187984d91a78783657d6aae0ae5b61
3,987
py
Python
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/fts/fts_transitions/test_fts_transitions_03.py
lintzc/GPDB
b48c8b97da18f495c10065d0853db87960aebae2
[ "PostgreSQL", "Apache-2.0" ]
1
2017-09-15T06:09:56.000Z
2017-09-15T06:09:56.000Z
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/fts/fts_transitions/test_fts_transitions_03.py
guofengrichard/gpdb
29bdd6ef38d8d9b9cb04ca31d44e279eb9f640d3
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/fts/fts_transitions/test_fts_transitions_03.py
guofengrichard/gpdb
29bdd6ef38d8d9b9cb04ca31d44e279eb9f640d3
[ "PostgreSQL", "Apache-2.0" ]
1
2018-12-04T09:13:57.000Z
2018-12-04T09:13:57.000Z
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
56.15493
128
0.672937
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
0
1,867
0
1,290
0
0
0
43
113
235c55045e820304c65af4d4d11023ed4af13b04
4,245
py
Python
cifar10-classification/utils/makeLabel.py
elgong/semi-supervised-DL-using-pseduo-label
2259c6ef93939f247f71a9d7f6766224120f2548
[ "MIT" ]
1
2019-11-26T12:40:05.000Z
2019-11-26T12:40:05.000Z
cifar10-classification/utils/makeLabel.py
elgong/semi-supervised-DL-using-pseduo-label
2259c6ef93939f247f71a9d7f6766224120f2548
[ "MIT" ]
null
null
null
cifar10-classification/utils/makeLabel.py
elgong/semi-supervised-DL-using-pseduo-label
2259c6ef93939f247f71a9d7f6766224120f2548
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- #@Time : 19-5-24 2:29 #@Author: elgong_hdu #@File : makeLabel.py Class = ("apple", "orange", "bed", "bottle", "bus", "clock", "elephant", "keyboard", "motorcycle", "mushroom", "rocket", "rose", "tank", "television", "tiger", "train", "turtle", "tree", "w...
27.387097
174
0.525324
#!/usr/bin/env python # -*- coding:utf-8 -*- #@Time : 19-5-24 下午2:29 #@Author: elgong_hdu #@File : makeLabel.py import os Class = ("apple", "orange", "bed", "bottle", "bus", "clock", "elephant", "keyboard", "motorcycle", "mushroom", "rocket", "rose", "tank", "television", "tiger", "train", "turtle", ...
597
0
0
0
0
410
0
-12
46
5d9cfc0e766dd8d6b469a0667d2498e1d9cf49cc
2,623
py
Python
losses/NT_Xent.py
xyupeng/ContrastiveCrop
305ff6d06f7e81a5a9f7f80480d81adc11436f9b
[ "MIT" ]
148
2022-02-07T18:11:26.000Z
2022-03-31T09:04:32.000Z
losses/NT_Xent.py
xyupeng/ContrastiveCrop
305ff6d06f7e81a5a9f7f80480d81adc11436f9b
[ "MIT" ]
5
2022-03-09T11:53:55.000Z
2022-03-31T12:33:08.000Z
losses/NT_Xent.py
xyupeng/ContrastiveCrop
305ff6d06f7e81a5a9f7f80480d81adc11436f9b
[ "MIT" ]
11
2022-02-12T00:10:04.000Z
2022-03-30T11:34:59.000Z
# Adapted from https://github.com/HobbitLong/SupContrast/blob/master/losses.py import torch.nn as nn
34.973333
95
0.53069
# Adapted from https://github.com/HobbitLong/SupContrast/blob/master/losses.py import torch import torch.nn as nn import torch.nn.functional as F class NT_Xent(nn.Module): def __init__(self, temperature=0.07, base_temperature=0.07): super(NT_Xent, self).__init__() self.temperature = temperature ...
0
0
0
2,452
0
0
0
1
68
d3d3c3b434d977f2f2ef91ee0237e7a382bda73c
16,562
py
Python
Functions/OwnLib.py
ShihaoWang/Contact-Transition-Tree
cf53aaea8a3a61d3eb92b96a6ca16a3b0c791afc
[ "MIT" ]
2
2019-02-19T19:05:15.000Z
2019-05-05T20:07:16.000Z
Functions/OwnLib.py
ShihaoWang/Contact-Transition-Tree
cf53aaea8a3a61d3eb92b96a6ca16a3b0c791afc
[ "MIT" ]
null
null
null
Functions/OwnLib.py
ShihaoWang/Contact-Transition-Tree
cf53aaea8a3a61d3eb92b96a6ca16a3b0c791afc
[ "MIT" ]
null
null
null
#!/usr/bin/python # This is used to serve as a library such that some functions do not need to be rewritten over and ove again # This part is for the operation on list # This part of functions is used for file operation: read, write # Some dynamics functions # Related to the operation of the robot contact link
42.795866
216
0.697561
#!/usr/bin/python # This is used to serve as a library such that some functions do not need to be rewritten over and ove again import sys, os from random import randint import numpy as np import math from klampt.math import so3,vectorops # This part is for the operation on list def Cross_Product(a, b): # Only de...
0
0
0
0
0
15,446
0
1
798
a7cde14fd6d9f8722af5c878f261e7e9f32533d2
4,768
py
Python
reserway/f_search/views.py
shobhit907/reserway
fac3a4c4bde59dd5d9ca6817d0a0203fc1dc321f
[ "MIT" ]
null
null
null
reserway/f_search/views.py
shobhit907/reserway
fac3a4c4bde59dd5d9ca6817d0a0203fc1dc321f
[ "MIT" ]
null
null
null
reserway/f_search/views.py
shobhit907/reserway
fac3a4c4bde59dd5d9ca6817d0a0203fc1dc321f
[ "MIT" ]
null
null
null
# Create your views here.
38.144
155
0.520973
from django.shortcuts import render from .models import * from .forms import * import datetime # Create your views here. def search_direct(s,d,flag,min_time=datetime.datetime(1,1,1)): s2=Routes.objects.raw('SELECT * from f_search_routes') d2=Routes.objects.raw('SELECT * from f_search_routes') s3=[] for...
0
0
0
0
0
4,602
0
7
134
9db4e3a713e42b6507f1451409808b7616efff24
2,069
py
Python
spec_folder.py
jiegev5/pytorch-CycleGAN-for-audio
af0e2f3b19019da2ac7e701ec56f349f3aa3826a
[ "BSD-3-Clause" ]
null
null
null
spec_folder.py
jiegev5/pytorch-CycleGAN-for-audio
af0e2f3b19019da2ac7e701ec56f349f3aa3826a
[ "BSD-3-Clause" ]
null
null
null
spec_folder.py
jiegev5/pytorch-CycleGAN-for-audio
af0e2f3b19019da2ac7e701ec56f349f3aa3826a
[ "BSD-3-Clause" ]
null
null
null
############################################################################### # Code from # https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py # Modified the original code so that it also loads images from the current # directory as well as the subdirectories ################################...
27.959459
80
0.555824
############################################################################### # Code from # https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py # Modified the original code so that it also loads images from the current # directory as well as the subdirectories ################################...
0
0
0
874
0
495
0
-10
160
9d4c4dde3899153c4d8a33bccb46675f4f126ff1
599
py
Python
juliany_pizza/authentication/migrations/0005_alter_customuser_email.py
kzborisov/Juliany-Pizza
4ebc0b21e314b244048df79e4858f30447b43f8b
[ "MIT" ]
null
null
null
juliany_pizza/authentication/migrations/0005_alter_customuser_email.py
kzborisov/Juliany-Pizza
4ebc0b21e314b244048df79e4858f30447b43f8b
[ "MIT" ]
9
2022-03-23T13:13:23.000Z
2022-03-28T13:40:20.000Z
juliany_pizza/authentication/migrations/0005_alter_customuser_email.py
kzborisov/Juliany-Pizza
4ebc0b21e314b244048df79e4858f30447b43f8b
[ "MIT" ]
null
null
null
# Generated by Django 3.2.12 on 2022-03-10 13:08
29.95
222
0.672788
# Generated by Django 3.2.12 on 2022-03-10 13:08 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('authentication', '0004_alter_profile_user'), ] operations = [ migrations.AlterField( model_name='...
0
0
0
454
0
0
0
27
68
e2f5761611f15b9e857235ee0341f1e72b758e3e
3,366
py
Python
self_supervised_3d_tasks/data_util/ukb_convert_brain_mri_to_npy.py
ramchandracheke/self-supervised-3d-tasks
dc184d5d29012fafb887402c5bc2ce74e4b0acdf
[ "Apache-2.0" ]
134
2020-06-09T06:24:34.000Z
2022-03-29T16:04:28.000Z
self_supervised_3d_tasks/data_util/ukb_convert_brain_mri_to_npy.py
ramchandracheke/self-supervised-3d-tasks
dc184d5d29012fafb887402c5bc2ce74e4b0acdf
[ "Apache-2.0" ]
24
2020-07-15T15:58:29.000Z
2022-03-11T07:12:34.000Z
self_supervised_3d_tasks/data_util/ukb_convert_brain_mri_to_npy.py
ramchandracheke/self-supervised-3d-tasks
dc184d5d29012fafb887402c5bc2ce74e4b0acdf
[ "Apache-2.0" ]
29
2020-06-09T10:02:39.000Z
2022-03-31T18:16:23.000Z
import glob import os import nibabel as nib import numpy as np def convert_mri_masks(type='fast'): """ :param type: can be "fast" or "first" """ source_path = "/mnt/projects/ukbiobank/original/imaging/brain_mri/T1_structural_brain_mri/unzipped/" destination_path = "/mnt/projects/ukbiobank/deriv...
41.555556
115
0.6224
import glob import os import zipfile import nibabel as nib import numpy as np import traceback def convert_mri_unlabeled(): source_path = "/mnt/projects/ukbiobank/original/imaging/brain_mri/" destination_path = "/mnt/projects/ukbiobank/derived/imaging/brain_mri/" t1_zip_files = sorted(glob.glob(source_pa...
0
0
0
0
0
2,104
0
-12
67
e6ae978c27ed393c52a452c6b7f507ae4d1189b2
1,912
py
Python
tests/test_base.py
lucfra/RFHO
e08a36fcc342a46648c5e9d7f64a69cb3d3c6c79
[ "MIT" ]
53
2017-04-23T10:24:14.000Z
2021-12-21T09:49:12.000Z
tests/test_base.py
lucfra/RFHO
e08a36fcc342a46648c5e9d7f64a69cb3d3c6c79
[ "MIT" ]
2
2018-06-04T21:59:09.000Z
2019-01-04T07:37:35.000Z
tests/test_base.py
lucfra/RFHO
e08a36fcc342a46648c5e9d7f64a69cb3d3c6c79
[ "MIT" ]
10
2017-05-02T12:57:27.000Z
2021-02-26T01:44:17.000Z
import tensorflow as tf from rfho.datasets import load_iris import rfho as rf TRACK = 'TRACK' def iris_logistic_regression(augment=0): """ Simple model for testing purposes :param augment: :return: """ iris = load_iris(partitions_proportions=(.3,.3)) x = tf.placeholder(tf.float32, ...
30.83871
106
0.605126
import tensorflow as tf from rfho.datasets import load_iris import numpy as np import rfho as rf TRACK = 'TRACK' def iris_logistic_regression(augment=0): """ Simple model for testing purposes :param augment: :return: """ iris = load_iris(partitions_proportions=(.3,.3)) x = tf.place...
0
0
0
0
0
1,036
0
-3
91
a22415747eb48fae78c827f83f3bd3d7121f9a94
481
py
Python
coding_interviews/elements_of_programming_interview/buy_and_sell_stock_once.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
205
2018-12-01T17:49:49.000Z
2021-12-22T07:02:27.000Z
coding_interviews/elements_of_programming_interview/buy_and_sell_stock_once.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
2
2020-01-01T16:34:29.000Z
2020-04-26T19:11:13.000Z
coding_interviews/elements_of_programming_interview/buy_and_sell_stock_once.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
50
2018-11-28T20:51:36.000Z
2021-11-29T04:08:25.000Z
# Buy and Sell stoks once prices = [310, 315, 275, 295, 260, 270, 290, 230, 255, 250] print(buy_and_sell_stock_once(prices)) print(buy_and_sell_stock_once([]))
25.315789
59
0.68815
# Buy and Sell stoks once def buy_and_sell_stock_once(prices): if not prices: return 0 min_price, max_profit = float('inf'), 0.0 for price in prices: profit_if_sell_today = price - min_price max_profit = max(max_profit, profit_if_sell_today) min_price = min(min_price, pric...
0
0
0
0
0
297
0
0
23
6981e819f96460d5607cd191441bc03e129456e9
1,166
py
Python
shrt/urls.py
geoffjay/shrt
1d9093fdedf136bddfb822d5e989c71bbf7b4a64
[ "MIT" ]
null
null
null
shrt/urls.py
geoffjay/shrt
1d9093fdedf136bddfb822d5e989c71bbf7b4a64
[ "MIT" ]
4
2021-03-19T01:39:18.000Z
2022-02-10T10:48:52.000Z
shrt/urls.py
geoffjay/shrt
1d9093fdedf136bddfb822d5e989c71bbf7b4a64
[ "MIT" ]
null
null
null
"""shrt URL Configuration '/admin' for the built-in django admin interface '/graphql' displays the graphiql interface provided by graphene '/<str:tag>' redirects to the URL that matches the shorted tag """ from django.contrib import admin from django.urls import path from graphene_django.views import GraphQLView fro...
32.388889
80
0.73928
"""shrt URL Configuration '/admin' for the built-in django admin interface '/graphql' displays the graphiql interface provided by graphene '/<str:tag>' redirects to the URL that matches the shorted tag """ from django.contrib import admin from django.urls import path from graphene_django.views import GraphQLView fro...
0
0
0
0
0
0
0
0
0
875966463799cbef95d97d4b8b1ab01362567e7f
2,478
py
Python
spot_motion_monitor/views/plot_configuration_dialog.py
lsst-sitcom/spot_motion_monitor
3d0242276198126240667ba13e95b7bdf901d053
[ "BSD-3-Clause" ]
null
null
null
spot_motion_monitor/views/plot_configuration_dialog.py
lsst-sitcom/spot_motion_monitor
3d0242276198126240667ba13e95b7bdf901d053
[ "BSD-3-Clause" ]
5
2020-01-08T23:50:22.000Z
2020-02-14T18:15:20.000Z
spot_motion_monitor/views/plot_configuration_dialog.py
lsst-com/spot_motion_monitor
3d0242276198126240667ba13e95b7bdf901d053
[ "MIT" ]
null
null
null
# This file is part of spot_motion_monitor. # # Developed for LSST System Integration, Test and Commissioning. # # See the LICENSE file at the top-level directory of this distribution # for details of code ownership. # # Use of this source code is governed by a 3-clause BSD-style # license that can be found in the LICE...
36.441176
102
0.705811
# This file is part of spot_motion_monitor. # # Developed for LSST System Integration, Test and Commissioning. # # See the LICENSE file at the top-level directory of this distribution # for details of code ownership. # # Use of this source code is governed by a 3-clause BSD-style # license that can be found in the LICE...
0
0
0
1,982
0
0
0
81
46
850a820c7e066645528fcb9c663e0fac4d69513b
2,003
py
Python
cifar.py
KeremTurgutlu/senet.pytorch
b485756a521363f49a2bdaf7d70fd08595b40d96
[ "MIT" ]
1
2021-12-11T06:22:23.000Z
2021-12-11T06:22:23.000Z
cifar.py
KeremTurgutlu/senet.pytorch
b485756a521363f49a2bdaf7d70fd08595b40d96
[ "MIT" ]
null
null
null
cifar.py
KeremTurgutlu/senet.pytorch
b485756a521363f49a2bdaf7d70fd08595b40d96
[ "MIT" ]
1
2020-07-13T02:36:43.000Z
2020-07-13T02:36:43.000Z
import torch.optim as optim if __name__ == '__main__': import argparse p = argparse.ArgumentParser() p.add_argument("--batchsize", type=int, default=64) p.add_argument("--reduction", type=int, default=16) p.add_argument("--baseline", action="store_true") args = p.parse_args() main(args....
35.767857
101
0.689965
from pathlib import Path import torch.nn.functional as F import torch.optim as optim from torch.utils.data import DataLoader from torchvision import datasets, transforms from se_resnet import se_resnet20 from baseline import resnet20 from utils import Trainer def get_dataloader(batch_size, root="~/.torch/data/cifar1...
0
0
0
0
0
1,362
0
78
201
ac175eb937edd8d280d1c318c9ccc9896254d653
4,945
py
Python
lib/nlp/ExecMultinominalModelNaiveBayes.py
ProjectSalieri/SalieriRailsApp
e33cab4a975ce34977a6c557874738a6c570698c
[ "CC0-1.0" ]
null
null
null
lib/nlp/ExecMultinominalModelNaiveBayes.py
ProjectSalieri/SalieriRailsApp
e33cab4a975ce34977a6c557874738a6c570698c
[ "CC0-1.0" ]
null
null
null
lib/nlp/ExecMultinominalModelNaiveBayes.py
ProjectSalieri/SalieriRailsApp
e33cab4a975ce34977a6c557874738a6c570698c
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- import sys import os import numpy as np # idDocCategoryType # main if __name__ == '__main__': argvs = sys.argv cmd = None category_type = "Genre" input_data = np.array([]) is_exist_opt = False for i in range(len(argvs)): if i == 0: continue ...
33.412162
139
0.690394
# -*- coding: utf-8 -*- import sys import os import pickle import numpy as np from MySQLWrapper import MySQLWrapper from MultinominalModelNaiveBayes import MultinominalModelNaiveBayes from DocCategoryDBUtil import * class CategoryData: def __init__(self): self.word_num = 0 self.document_num = 0...
315
0
0
240
0
3,109
0
64
207
7444df6fa5bf378893c60c8fffba54c6799aa8ea
2,705
py
Python
Vol3A/UnixShell2/solutions.py
joshualy/numerical_computing
9f474e36fe85ae663bd20e2f2d06265d1f095173
[ "CC-BY-3.0" ]
null
null
null
Vol3A/UnixShell2/solutions.py
joshualy/numerical_computing
9f474e36fe85ae663bd20e2f2d06265d1f095173
[ "CC-BY-3.0" ]
null
null
null
Vol3A/UnixShell2/solutions.py
joshualy/numerical_computing
9f474e36fe85ae663bd20e2f2d06265d1f095173
[ "CC-BY-3.0" ]
1
2019-11-05T14:45:03.000Z
2019-11-05T14:45:03.000Z
# solutions_UnixShell2.py ''' Solutions for Volume 3, Lab 2: More on Unix Shell Written Summer 2015 ''' # PROBLEM 1: Make count_files.py an executable script ''' SHELL COMMANDS: (Executed in the Shell-Lab/Python directory) $ which python On the author's system, this was: /home/tanner/anaconda/bin/python Open count_fi...
28.177083
116
0.606285
# solutions_UnixShell2.py ''' Solutions for Volume 3, Lab 2: More on Unix Shell Written Summer 2015 ''' # PROBLEM 1: Make count_files.py an executable script ''' SHELL COMMANDS: (Executed in the Shell-Lab/Python directory) $ which python On the author's system, this was: /home/tanner/anaconda/bin/python Open count_fi...
0
0
0
1,608
0
0
0
-10
90
5f2731360c259abab07cee3c9042ce6adc5ff52c
1,767
py
Python
library/SensorTests/testdump.py
kausalyamahadevan/knitout-frontend-py
1a0414a88db698383dda7e9b45ec1293948b369b
[ "MIT" ]
null
null
null
library/SensorTests/testdump.py
kausalyamahadevan/knitout-frontend-py
1a0414a88db698383dda7e9b45ec1293948b369b
[ "MIT" ]
null
null
null
library/SensorTests/testdump.py
kausalyamahadevan/knitout-frontend-py
1a0414a88db698383dda7e9b45ec1293948b369b
[ "MIT" ]
null
null
null
#creates just a miss section of knit (no tube) import sys sys.path.append('../knitout-frontend-py') from library import knitout from library import castonbindoff # from crossover_full import * # from library.crossover_half import * # from library.crossover_full import * # from seedKnit import* # from library.fairIsle...
19
67
0.685342
#creates just a miss section of knit (no tube) import sys sys.path.append('../knitout-frontend-py') from library import knitout from library import castonbindoff # from crossover_full import * # from library.crossover_half import * # from library.crossover_full import * # from seedKnit import* from library.jersey imp...
0
0
0
0
0
0
0
9
110
e17e6ade0ce4d409fc109d0ddebd49d3b2cc118e
3,813
py
Python
enaml/widgets/bounded_date.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
1,080
2015-01-04T14:29:34.000Z
2022-03-29T05:44:51.000Z
enaml/widgets/bounded_date.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
308
2015-01-05T22:44:13.000Z
2022-03-30T21:19:18.000Z
enaml/widgets/bounded_date.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
123
2015-01-25T16:33:48.000Z
2022-02-25T19:57:10.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #-----------------------------------------------------...
34.981651
79
0.556779
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #-----------------------------------------------------...
0
248
0
3,001
0
0
0
79
137
27a1d9270ac6510e7623804bf24403f7d23b13b0
7,426
py
Python
v2/csil/instructions.py
iahuang/scratch-gcc
bc4989f3dc54f0cdc3098f66078d17750c111bec
[ "MIT" ]
null
null
null
v2/csil/instructions.py
iahuang/scratch-gcc
bc4989f3dc54f0cdc3098f66078d17750c111bec
[ "MIT" ]
null
null
null
v2/csil/instructions.py
iahuang/scratch-gcc
bc4989f3dc54f0cdc3098f66078d17750c111bec
[ "MIT" ]
null
null
null
""" Definition and Scratch implementations for CSIL's instruction set """ """ Base Classes """ """ Basic """ """ Memory Manipulation """ """ Arithmetic """ """ Boolean """ registry = InstructionRegistry([ Set, Copy, Load, Store, Add, Sub, Mul, Div, Gt, Lt, Eq ])
32.570175
150
0.636682
""" Definition and Scratch implementations for CSIL's instruction set """ from . import scratch from .block_builder import makeBlockInput, makeBroadcastInput, makeListField, makeReporterInput, makeValueInput, makeVariableField, makeVariableInput """ Base Classes """ class Instruction: def __init__(self, name, a...
0
0
0
6,589
0
0
0
128
391
8eeb8243e3afe2cd29c5bac160ad3732a3c519d6
266
py
Python
PRAUTS/I.py
Myusuft/Alpro-part5
24ba5c25feb7ee381acdfcfe62a0982ae8ed259c
[ "MIT" ]
null
null
null
PRAUTS/I.py
Myusuft/Alpro-part5
24ba5c25feb7ee381acdfcfe62a0982ae8ed259c
[ "MIT" ]
null
null
null
PRAUTS/I.py
Myusuft/Alpro-part5
24ba5c25feb7ee381acdfcfe62a0982ae8ed259c
[ "MIT" ]
null
null
null
n = int(input()) masukan = list(map(int, input().split())) angka = 0 n = int(input()) print() for k in range (2,n+1) : cek=True for i in range(2,k) : if k%i==0: cek=False break if cek==True: print(k)
19
42
0.462406
n = int(input()) masukan = list(map(int, input().split())) angka = 0 n = int(input()) print() for k in range (2,n+1) : cek=True for i in range(2,k) : if k%i==0: cek=False break if cek==True: print(k)
0
0
0
0
0
0
0
0
0
53dd2085eb992721e947f3d828f8478ce339402e
20,099
py
Python
google/appengine/tools/endpointscfg.py
brianrodri/google_appengine
ec4e7cdfa1afd99de23b0a32eb94563fe5e6ef43
[ "Apache-2.0" ]
1
2017-12-07T18:47:45.000Z
2017-12-07T18:47:45.000Z
google/appengine/tools/endpointscfg.py
brianrodri/google_appengine
ec4e7cdfa1afd99de23b0a32eb94563fe5e6ef43
[ "Apache-2.0" ]
1
2020-04-14T07:06:58.000Z
2020-04-14T07:06:58.000Z
google/appengine/tools/endpointscfg.py
brianrodri/google_appengine
ec4e7cdfa1afd99de23b0a32eb94563fe5e6ef43
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2007 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...
35.699822
80
0.705259
#!/usr/bin/env python # # Copyright 2007 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...
0
0
0
2,350
0
279
0
31
115
08c3f11d20e240ca171e1f9d0aa698cc9fa065be
225
py
Python
ml-api-public/api/app.py
ser0090/deployment-pm
41d3174e0516d519aad5a248028f7c12fc84f27e
[ "MIT" ]
null
null
null
ml-api-public/api/app.py
ser0090/deployment-pm
41d3174e0516d519aad5a248028f7c12fc84f27e
[ "MIT" ]
null
null
null
ml-api-public/api/app.py
ser0090/deployment-pm
41d3174e0516d519aad5a248028f7c12fc84f27e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import settings from flask import Flask from views import router app = Flask(__name__) app.register_blueprint(router) if __name__ == '__main__': app.run(host='0.0.0.0', debug=settings.API_DEBUG)
20.454545
53
0.72
# -*- coding: utf-8 -*- import settings from flask import Flask from views import router app = Flask(__name__) app.register_blueprint(router) if __name__ == '__main__': app.run(host='0.0.0.0', debug=settings.API_DEBUG)
0
0
0
0
0
0
0
0
0
ecb5f9eb8589c1d36a1c427e8ebf2c76adffb2cd
1,699
py
Python
dev/era5_visualisation.py
meryamcherqaouifassi/2021_Bachelor_Thesis
6c1e5b2e4e20352c9b21bb31a7600d15b1667d5d
[ "MIT" ]
1
2021-12-01T15:38:41.000Z
2021-12-01T15:38:41.000Z
dev/era5_visualisation.py
meryamcherqaouifassi/2021_Bachelor_Thesis
6c1e5b2e4e20352c9b21bb31a7600d15b1667d5d
[ "MIT" ]
null
null
null
dev/era5_visualisation.py
meryamcherqaouifassi/2021_Bachelor_Thesis
6c1e5b2e4e20352c9b21bb31a7600d15b1667d5d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Spyder Editor This script is made to visualise data from era5 with cartopy """ # Imports import cartopy.crs as ccrs import matplotlib.pyplot as plt import xarray as xr import numpy as np import matplotlib as mpl # Load data path_era5 = '/work/FAC/FGSE/IDYST/tbeucler/default/meryam/data/...
23.597222
119
0.696881
# -*- coding: utf-8 -*- """ Spyder Editor This script is made to visualise data from era5 with cartopy """ # Imports import cartopy.crs as ccrs import matplotlib.pyplot as plt import xarray as xr import numpy as np import matplotlib as mpl # Load data path_era5 = '/work/FAC/FGSE/IDYST/tbeucler/default/meryam/data/...
0
0
0
0
0
0
0
0
0
fad922d95c687a7843c26111c34385a1bdef0b27
7,258
py
Python
plumcot_prodigy/select_characters.py
julietteBergoend/plumcot-prodigy
aaac14df24309e5b2064b213031d288d284a6747
[ "MIT" ]
1
2021-06-22T12:43:42.000Z
2021-06-22T12:43:42.000Z
plumcot_prodigy/select_characters.py
julietteBergoend/plumcot-prodigy
aaac14df24309e5b2064b213031d288d284a6747
[ "MIT" ]
null
null
null
plumcot_prodigy/select_characters.py
julietteBergoend/plumcot-prodigy
aaac14df24309e5b2064b213031d288d284a6747
[ "MIT" ]
null
null
null
from typing import Dict, List def remove_video_before_db(examples: List[Dict]) -> List[Dict]: """Remove (heavy) "video" and "pictures" key from examples before saving to Prodigy database Parameters ---------- examples : list of dict Examples. Returns ------- examples : list of dict...
39.445652
354
0.526178
import prodigy from prodigy.components.loaders import Audio, Video, JSONL, ImageServer from plumcot_prodigy.forced_alignment import ForcedAlignment from plumcot_prodigy.video import mkv_to_base64 from plumcot_prodigy.custom_loaders import * from prodigy.components.preprocess import add_tokens, fetch_media from prodigy....
0
1,562
0
0
4,667
0
0
149
339
b815445819a0b379bdc639f992fc482d2fc7f6c3
6,270
py
Python
trajopt/spacetime/states.py
uwgraphics/trajectoryoptimizer-public
51a5f7c183184c033f2f12964e7dd935532331ff
[ "BSD-2-Clause" ]
null
null
null
trajopt/spacetime/states.py
uwgraphics/trajectoryoptimizer-public
51a5f7c183184c033f2f12964e7dd935532331ff
[ "BSD-2-Clause" ]
null
null
null
trajopt/spacetime/states.py
uwgraphics/trajectoryoptimizer-public
51a5f7c183184c033f2f12964e7dd935532331ff
[ "BSD-2-Clause" ]
null
null
null
__author__ = 'gleicher' """ infrastructure for spacetime problems at each time, there needs to be a STATE for the robot these states are created by interpolating the KEYS a state sequence is something that provides a state vector (for a robot) at every frame in the movement. it might be stored as a keyvector (or com...
35.423729
87
0.61547
__author__ = 'gleicher' """ infrastructure for spacetime problems at each time, there needs to be a STATE for the robot these states are created by interpolating the KEYS a state sequence is something that provides a state vector (for a robot) at every frame in the movement. it might be stored as a keyvector (or com...
0
0
0
4,383
0
0
0
-4
91
07164cbc9385365a508eae7245be942faa933a79
4,815
py
Python
COMPUTE_IJ_SPM.py
Prajwal-Prathiksh/Panel_Methods
387275a2791f616e5cd53e1713c409acc47f8f0a
[ "MIT" ]
41
2019-10-13T02:20:01.000Z
2022-03-16T10:43:46.000Z
COMPUTE_IJ_SPM.py
wissenschaftler48/Panel_Methods
a7d05d865e90bff36af06451b911bd4fa50df049
[ "MIT" ]
null
null
null
COMPUTE_IJ_SPM.py
wissenschaftler48/Panel_Methods
a7d05d865e90bff36af06451b911bd4fa50df049
[ "MIT" ]
22
2019-10-23T12:54:19.000Z
2022-03-03T06:08:33.000Z
# FUNCTION - COMPUTE I AND J GEOMETRIC INTEGRALS FOR SOURCE PANEL METHOD # Written by: JoshTheEngineer # YouTube : www.youtube.com/joshtheengineer # Website : www.joshtheengineer.com # Started : 02/03/19 - Transferred from MATLAB to Python # - Works as expected # : 04/28/20 - ...
60.1875
131
0.445898
# FUNCTION - COMPUTE I AND J GEOMETRIC INTEGRALS FOR SOURCE PANEL METHOD # Written by: JoshTheEngineer # YouTube : www.youtube.com/joshtheengineer # Website : www.joshtheengineer.com # Started : 02/03/19 - Transferred from MATLAB to Python # - Works as expected # : 04/28/20 - ...
0
0
0
0
0
3,421
0
0
24
b187f9725a527310fa5348ff2306b750b499c469
3,802
py
Python
production/pygsl-0.9.5/tests/multiminimize_test.py
juhnowski/FishingRod
457e7afb5cab424296dff95e1acf10ebf70d32a9
[ "MIT" ]
null
null
null
production/pygsl-0.9.5/tests/multiminimize_test.py
juhnowski/FishingRod
457e7afb5cab424296dff95e1acf10ebf70d32a9
[ "MIT" ]
null
null
null
production/pygsl-0.9.5/tests/multiminimize_test.py
juhnowski/FishingRod
457e7afb5cab424296dff95e1acf10ebf70d32a9
[ "MIT" ]
1
2018-10-02T06:18:07.000Z
2018-10-02T06:18:07.000Z
import sys import unittest sys.stdout = sys.stderr if __name__ == '__main__': unittest.main()
30.416
104
0.545765
import copy import sys import unittest import pygsl._numobj as Numeric from pygsl import Float import pygsl from pygsl import multiminimize sys.stdout = sys.stderr def my_f(v, params): x = v[0] y = v[1] dp = params t1 = (x - dp[0]) t2 = (y - dp[1]) f = 10.0 * t1 * t1 + 20.0 * t2 * t2 +...
0
0
0
2,977
0
496
0
3
226
132c0f4be6c24aace082740ac0a2172e985a4b08
739
py
Python
tests/test_infrastructure/factories.py
thread/django-devdata
da8933c861d82c1e4a2d887b61141e7b204367ce
[ "MIT" ]
7
2021-05-12T09:22:14.000Z
2022-01-17T15:22:26.000Z
tests/test_infrastructure/factories.py
thread/django-devdata
da8933c861d82c1e4a2d887b61141e7b204367ce
[ "MIT" ]
4
2021-06-10T11:12:24.000Z
2021-09-08T18:22:24.000Z
tests/test_infrastructure/factories.py
thread/django-devdata
da8933c861d82c1e4a2d887b61141e7b204367ce
[ "MIT" ]
2
2021-06-21T17:35:21.000Z
2022-03-09T15:44:21.000Z
import faker fake = faker.Factory.create()
21.114286
59
0.493911
from typing import Any, Dict, Optional import faker fake = faker.Factory.create() def make_photo_data( pk: int, strategy: Optional[str], **fields ) -> Dict[str, Any]: return { "model": "photofeed.Photo", "strategy": strategy, "pk": pk, "fields": { "lat": 1, ...
0
0
0
0
0
607
0
17
68
6297f326a0bb92b7ea38d33b46f5792ba2473d47
499
py
Python
accepted/Find_All_Numbers_Disappeared_in_Array.py
sheagk/leetcode_solutions
7571bd13f4274f6b4b622b43a414d56fc26d3be0
[ "MIT" ]
null
null
null
accepted/Find_All_Numbers_Disappeared_in_Array.py
sheagk/leetcode_solutions
7571bd13f4274f6b4b622b43a414d56fc26d3be0
[ "MIT" ]
null
null
null
accepted/Find_All_Numbers_Disappeared_in_Array.py
sheagk/leetcode_solutions
7571bd13f4274f6b4b622b43a414d56fc26d3be0
[ "MIT" ]
1
2020-09-03T14:26:00.000Z
2020-09-03T14:26:00.000Z
## https://leetcode.com/submissions/detail/230651834/ ## problem is to find the numbers between 1 and length of the ## array that aren't in the array. simple way to do that is to ## do the set difference between range(1, len(ar)+1) and the ## input numbers ## hits 98th percentile in terms of runtime, though only ...
38.384615
67
0.709419
## https://leetcode.com/submissions/detail/230651834/ ## problem is to find the numbers between 1 and length of the ## array that aren't in the array. simple way to do that is to ## do the set difference between range(1, len(ar)+1) and the ## input numbers ## hits 98th percentile in terms of runtime, though only ...
0
0
0
122
0
0
0
0
23
76d1aff2d4093ae21670ae3dca687f3dd27531f9
2,840
py
Python
sodoku.py
pranavprakash20/Python
5f2a9d3bde0ec4ab8fec5015a84efba4b061c844
[ "MIT" ]
null
null
null
sodoku.py
pranavprakash20/Python
5f2a9d3bde0ec4ab8fec5015a84efba4b061c844
[ "MIT" ]
null
null
null
sodoku.py
pranavprakash20/Python
5f2a9d3bde0ec4ab8fec5015a84efba4b061c844
[ "MIT" ]
null
null
null
sudoku = SudokuSolver("Path to your sudoku problem here")
29.894737
77
0.520775
class SudokuSolver: """ Solves sudoko puzzle. Save the puzzle in a file (space separated) and pass the file name as parameter. The missing digits has to be marked `0` Sample input : (txt file containig sudoku) 3 0 6 5 0 8 4 0 0 5 2 0 0 0 0 0 0 0 0 8 7 0 0 0 0 3 1 0 0 3 0 1 0 0 8 0 ...
0
0
0
2,759
0
0
0
0
22
0a18c36ea363c5c364bc182c648337ca60e6bbba
125
py
Python
src/batch/CassandraHealthcheck.py
johannchopin/htw-m1-softwarearchitecture
85256c5643b0b8b3016f007ca56ade37e048c683
[ "Apache-2.0" ]
null
null
null
src/batch/CassandraHealthcheck.py
johannchopin/htw-m1-softwarearchitecture
85256c5643b0b8b3016f007ca56ade37e048c683
[ "Apache-2.0" ]
1
2021-01-20T21:48:22.000Z
2021-01-20T21:50:42.000Z
src/batch/CassandraHealthcheck.py
johannchopin/htw-m1-softwarearchitecture
85256c5643b0b8b3016f007ca56ade37e048c683
[ "Apache-2.0" ]
null
null
null
from sys import exit from CassandraWrapper import CassandraWrapper try: CassandraWrapper() except: exit(1) exit(0)
12.5
45
0.752
from sys import exit from CassandraWrapper import CassandraWrapper try: CassandraWrapper() except: exit(1) exit(0)
0
0
0
0
0
0
0
0
0
997e7470f0566a32d12321a1af06c7da1d5acee3
164
py
Python
src/168A.py
viing937/codeforces
d694eb6967cd56af02963c3a662066048cb78d07
[ "MIT" ]
2
2016-08-19T09:47:03.000Z
2016-10-01T10:15:03.000Z
src/168A.py
viing937/codeforces
d694eb6967cd56af02963c3a662066048cb78d07
[ "MIT" ]
null
null
null
src/168A.py
viing937/codeforces
d694eb6967cd56af02963c3a662066048cb78d07
[ "MIT" ]
1
2015-07-01T23:57:32.000Z
2015-07-01T23:57:32.000Z
# coding: utf-8 n, x, y = [int(i) for i in input().split()] ans = int((y/100*n)-x) if (ans+x)/n < y/100: ans += 1 if ans > 0: print(ans) else: print(0)
16.4
43
0.512195
# coding: utf-8 n, x, y = [int(i) for i in input().split()] ans = int((y/100*n)-x) if (ans+x)/n < y/100: ans += 1 if ans > 0: print(ans) else: print(0)
0
0
0
0
0
0
0
0
0
e859ad455ba7c4ea0728ef31b9621d70f036dddb
4,355
py
Python
solutions/01-first-program/zodiac.py
nhuntwalker/python-thirty-minutes
067669f5d2da681d46bedf1c15ab9f26322a9d5f
[ "MIT" ]
1
2018-07-26T20:21:23.000Z
2018-07-26T20:21:23.000Z
solutions/01-first-program/zodiac.py
nhuntwalker/python-thirty-minutes
067669f5d2da681d46bedf1c15ab9f26322a9d5f
[ "MIT" ]
null
null
null
solutions/01-first-program/zodiac.py
nhuntwalker/python-thirty-minutes
067669f5d2da681d46bedf1c15ab9f26322a9d5f
[ "MIT" ]
1
2018-06-28T17:33:52.000Z
2018-06-28T17:33:52.000Z
"""Generates a random date and uses that date to print information about the corresponding Zodiac sign. Zodiac date ranges come from here: - http://astrostyle.com/zodiac-sign-dates/ Zodiac sign characterstics come from here: - http://nuclear.ucdavis.edu/~rpicha/personal/astrology/ Astrology is absolute BS and is no...
25.769231
73
0.698967
"""Generates a random date and uses that date to print information about the corresponding Zodiac sign. Zodiac date ranges come from here: - http://astrostyle.com/zodiac-sign-dates/ Zodiac sign characterstics come from here: - http://nuclear.ucdavis.edu/~rpicha/personal/astrology/ Astrology is absolute BS and is no...
0
0
0
0
0
0
0
0
0
b3fad814d31adc06b283f3eb303a4f43de8eb174
248
py
Python
Codewars/6kyu/split-strings/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
7
2017-09-20T16:40:39.000Z
2021-08-31T18:15:08.000Z
Codewars/6kyu/split-strings/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
null
null
null
Codewars/6kyu/split-strings/Python/test.py
RevansChen/online-judge
ad1b07fee7bd3c49418becccda904e17505f3018
[ "MIT" ]
null
null
null
# Python - 3.6.0 test.describe('Example Tests') tests = [ ('asdfadsf', ['as', 'df', 'ad', 'sf']), ('asdfads', ['as', 'df', 'ad', 's_']), ('', []), ('x', ['x_']) ] for inp, exp in tests: test.assert_equals(solution(inp), exp)
17.714286
43
0.479839
# Python - 3.6.0 test.describe('Example Tests') tests = [ ('asdfadsf', ['as', 'df', 'ad', 'sf']), ('asdfads', ['as', 'df', 'ad', 's_']), ('', []), ('x', ['x_']) ] for inp, exp in tests: test.assert_equals(solution(inp), exp)
0
0
0
0
0
0
0
0
0
afe05b5262dcfe9a8f81299b45f884f8a8bd0926
108
py
Python
protector/__init__.py
IsaevNik/django-protector
5ea0eea5797e88b436007a585716efcafbb8d805
[ "MIT" ]
null
null
null
protector/__init__.py
IsaevNik/django-protector
5ea0eea5797e88b436007a585716efcafbb8d805
[ "MIT" ]
null
null
null
protector/__init__.py
IsaevNik/django-protector
5ea0eea5797e88b436007a585716efcafbb8d805
[ "MIT" ]
null
null
null
__author__ = 'Sergey Lihobabin' __version__ = '0.5.8' default_app_config = 'protector.apps.ProtectorConfig'
27
53
0.787037
__author__ = 'Sergey Lihobabin' __version__ = '0.5.8' default_app_config = 'protector.apps.ProtectorConfig'
0
0
0
0
0
0
0
0
0
8889933cacd7bc4a9f1fc0f768aa8eb195df40dd
153
py
Python
doubanmovie/items.py
luojunhui/doubanmovie
364a60c605b5d96fddbdbcaf4e72900847a5a103
[ "MIT" ]
null
null
null
doubanmovie/items.py
luojunhui/doubanmovie
364a60c605b5d96fddbdbcaf4e72900847a5a103
[ "MIT" ]
4
2021-03-31T19:06:30.000Z
2022-03-02T14:58:29.000Z
doubanmovie/items.py
luojunhui/doubanmovie
364a60c605b5d96fddbdbcaf4e72900847a5a103
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
17
35
0.627451
# -*- coding: utf-8 -*- import scrapy class DoubanmovieItem(scrapy.Item): name = scrapy.Field() rate = scrapy.Field() tag = scrapy.Field()
0
0
0
91
0
0
0
-8
45
31f85d5c4713b8d7bd2fc8a178758f9cff7ffa64
3,810
py
Python
recipes/views.py
JakubKoralewski/django-recipes
3794c6a96fb0765e2e3cebfc3968dae88e4f084c
[ "MIT" ]
null
null
null
recipes/views.py
JakubKoralewski/django-recipes
3794c6a96fb0765e2e3cebfc3968dae88e4f084c
[ "MIT" ]
5
2021-03-19T03:49:52.000Z
2021-06-10T19:16:05.000Z
recipes/views.py
JakubKoralewski/django-recipes
3794c6a96fb0765e2e3cebfc3968dae88e4f084c
[ "MIT" ]
null
null
null
# https://docs.djangoproject.com/en/3.0/intro/tutorial03/ # def index(request): # latest_recipes = Recipe.objects.order_by('-pub_date')[:5] # context = { # 'latest_recipes': latest_recipes # } # https://docs.djangoproject.com/en/3.0/ref/request-response/
33.130435
115
0.724147
from typing import Dict from django.http import HttpResponseRedirect from django.views import generic from django.shortcuts import render, get_object_or_404 from ipware import get_client_ip from pprint import pprint from .forms import RecipeForm from .models import Recipe, StepsOfRecipe, IngredientsOfStep, Ingredient...
0
0
0
276
0
2,801
0
198
270
481ee74868c0a853a521662370b4d51fcf1516b2
1,790
py
Python
setup.py
deets/deets-fpv-laptimer
be4688e9bf1fa17cd80ee1ebee6c5dfc4631623c
[ "MIT" ]
null
null
null
setup.py
deets/deets-fpv-laptimer
be4688e9bf1fa17cd80ee1ebee6c5dfc4631623c
[ "MIT" ]
2
2021-03-21T16:53:22.000Z
2022-01-13T02:07:54.000Z
setup.py
deets/deets-fpv-laptimer
be4688e9bf1fa17cd80ee1ebee6c5dfc4631623c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright: 2020, Diez B. Roggisch, Berlin . All rights reserved. import os from setuptools import setup, find_packages # Meta information version = open("VERSION").read().strip() dirname = os.path.dirname(__file__) author = open("AUTHOR").read().strip() # Save version and author to __meta_...
24.189189
66
0.58324
# -*- coding: utf-8 -*- # Copyright: 2020, Diez B. Roggisch, Berlin . All rights reserved. import os from setuptools import setup, find_packages # Meta information version = open("VERSION").read().strip() dirname = os.path.dirname(__file__) author = open("AUTHOR").read().strip() # Save version and author to __meta_...
0
0
0
0
0
0
0
0
0
dfb4aedff99063b3d4fdd6c6cc519ca5875cbfc2
2,482
py
Python
vendor/packages/coverage/setup.py
jgmize/kitsune
8f23727a9c7fcdd05afc86886f0134fb08d9a2f0
[ "BSD-3-Clause" ]
2
2019-08-19T17:08:47.000Z
2019-10-05T11:37:02.000Z
vendor/packages/coverage/setup.py
jgmize/kitsune
8f23727a9c7fcdd05afc86886f0134fb08d9a2f0
[ "BSD-3-Clause" ]
null
null
null
vendor/packages/coverage/setup.py
jgmize/kitsune
8f23727a9c7fcdd05afc86886f0134fb08d9a2f0
[ "BSD-3-Clause" ]
null
null
null
# setup.py for coverage. """Code coverage measurement for Python Coverage.py measures code coverage, typically during test execution. It uses the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed. Coverage.py runs on Py...
25.070707
79
0.676471
# setup.py for coverage. """Code coverage measurement for Python Coverage.py measures code coverage, typically during test execution. It uses the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed. Coverage.py runs on Py...
0
0
0
0
0
0
0
0
0
3c93e6f45ea5ba8d4e1588726b25150d2799b7a2
1,402
py
Python
python/ct/crypto/signing/signer_ecdsa_test.py
kucske/certificate-transparency
fb5b4503f7e3ddf6721fed60cc8b019303742cd0
[ "Apache-2.0" ]
807
2015-01-03T09:12:09.000Z
2022-03-31T14:59:13.000Z
python/ct/crypto/signing/signer_ecdsa_test.py
kucske/certificate-transparency
fb5b4503f7e3ddf6721fed60cc8b019303742cd0
[ "Apache-2.0" ]
845
2015-01-02T02:03:18.000Z
2022-03-16T09:12:55.000Z
python/ct/crypto/signing/signer_ecdsa_test.py
kucske/certificate-transparency
fb5b4503f7e3ddf6721fed60cc8b019303742cd0
[ "Apache-2.0" ]
313
2015-01-08T07:50:30.000Z
2022-03-03T14:25:46.000Z
#!/usr/bin/env python """Tests for signer_ecdsa.""" import unittest PRIVATE_KEY_PEM = ("-----BEGIN EC PRIVATE KEY-----\n" "MHcCAQEEIFLw4uhuCruGKjrS9MoNeXFbypqZe+Sgh+EL1gnRn1d4oAoGCCqGSM49\n" "AwEHoUQDQgAEmXg8sUUzwBYaWrRb+V0IopzQ6o3UyEJ04r5ZrRXGdpYM8K+hB0pX\n" "rGRLI0eeWz+3skXrS0IO83AhA3GpRL6s6w==\n" ...
35.948718
82
0.74679
#!/usr/bin/env python """Tests for signer_ecdsa.""" import unittest from ct.proto import client_pb2 from ct.crypto.signing import signer_ecdsa PRIVATE_KEY_PEM = ("-----BEGIN EC PRIVATE KEY-----\n" "MHcCAQEEIFLw4uhuCruGKjrS9MoNeXFbypqZe+Sgh+EL1gnRn1d4oAoGCCqGSM49\n" "AwEHoUQDQgAEmXg8sUUzwBYaWrRb+V0IopzQ6o3UyEJ04r5Z...
0
0
0
896
0
0
0
31
69
42914ef4e6196ceddd1d4e4570bc2824ec718caf
4,284
py
Python
minecraft_mod_manager/gateways/api/modrinth_api_test.py
lospejos/minecraft-mod-manager
49ec3f6e22dd07a6389d8704bf97c4068be79660
[ "MIT" ]
56
2021-02-13T20:28:35.000Z
2022-03-27T17:29:54.000Z
minecraft_mod_manager/gateways/api/modrinth_api_test.py
lospejos/minecraft-mod-manager
49ec3f6e22dd07a6389d8704bf97c4068be79660
[ "MIT" ]
102
2020-11-11T13:19:38.000Z
2022-03-31T18:27:06.000Z
minecraft_mod_manager/gateways/api/modrinth_api_test.py
lospejos/minecraft-mod-manager
49ec3f6e22dd07a6389d8704bf97c4068be79660
[ "MIT" ]
8
2021-02-17T20:27:32.000Z
2022-03-21T20:06:30.000Z
from pathlib import Path testdata_dir = Path(__file__).parent.joinpath("testdata").joinpath("modrinth_api") search_result_file = testdata_dir.joinpath("search_fabric-api.json") versions_result_file = testdata_dir.joinpath("versions_fabric-api.json") site_id = "P7dR8mSH"
30.820144
116
0.627218
import json from pathlib import Path from typing import Union import pytest from mockito import mock, unstub, verifyStubbedInvocationsAreUsed, when from ...core.entities.mod import Mod from ...core.entities.mod_loaders import ModLoaders from ...core.entities.sites import Site, Sites from ...core.entities.version_info...
0
1,211
0
0
0
2,219
0
190
383
15e3c5d5c85f0534e9e2651f1d1d0f7563aff17e
2,725
py
Python
algorithms/code/leetcode/lc273_integer_to_english_words/lc273_integer_to_english_words.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
null
null
null
algorithms/code/leetcode/lc273_integer_to_english_words/lc273_integer_to_english_words.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
1
2022-02-16T11:28:56.000Z
2022-02-16T11:28:56.000Z
algorithms/code/leetcode/lc273_integer_to_english_words/lc273_integer_to_english_words.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # https://leetcode.com/problems/integer-to-english-words/
30.965909
92
0.535046
#!/usr/bin/env python3 # https://leetcode.com/problems/integer-to-english-words/ import unittest class Solution: __MAGNITUDE = [ '', ' Thousand', ' Million', ' Billion', ' Trillion', ' Quadrillion', ' Quintillion', ' Sextillion', ' Septillion', ' Octillion', ' Nonillion'] __TENS = [ ...
0
0
0
2,579
0
0
0
-6
69
fc3a1d644a244cd25cc5d65876a0a3cfb6e8bbd7
4,688
py
Python
modelci/hub/utils.py
univerone/ML-Model-CI
f77635e469477b640a5c2d9b7ad3fe13374ce59e
[ "Apache-2.0" ]
170
2020-06-08T18:30:52.000Z
2022-03-28T12:08:11.000Z
modelci/hub/utils.py
crazyCoderLi/ML-Model-CI
f77635e469477b640a5c2d9b7ad3fe13374ce59e
[ "Apache-2.0" ]
146
2020-06-14T18:56:27.000Z
2022-02-27T21:15:59.000Z
modelci/hub/utils.py
univerone/ML-Model-CI
f77635e469477b640a5c2d9b7ad3fe13374ce59e
[ "Apache-2.0" ]
36
2020-06-08T18:30:56.000Z
2022-03-07T18:10:19.000Z
import re from pathlib import Path from typing import Union from modelci.types.models.common import Task, Framework, Engine from modelci.types.trtis_objects import ModelInputFormat def parse_path(path: Path): """Obtain filename, task, framework and engine from saved path. """ if re.match(r'^.*?[!/]*/[A-...
33.248227
98
0.604735
import re from collections import defaultdict from enum import unique, Enum from pathlib import Path from typing import Union from modelci.types.models.common import Task, Framework, Engine from modelci.types.trtis_objects import DataType, ModelInputFormat def parse_path(path: Path): """Obtain filename, task, fr...
0
245
0
0
0
1,605
0
32
136
5329506ddd1f69026c9c699197121682c02c1616
6,732
py
Python
crm/core/migrations/0003_auto__add_job__add_field_people_job2.py
klebercode/navasil
b6eec748659e7ba6bf3610a81a766f0efa9b6577
[ "MIT" ]
null
null
null
crm/core/migrations/0003_auto__add_job__add_field_people_job2.py
klebercode/navasil
b6eec748659e7ba6bf3610a81a766f0efa9b6577
[ "MIT" ]
null
null
null
crm/core/migrations/0003_auto__add_job__add_field_people_job2.py
klebercode/navasil
b6eec748659e7ba6bf3610a81a766f0efa9b6577
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
70.125
141
0.542632
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Job' db.create_table(u'core_job', ( (u'id', s...
0
0
0
6,544
0
0
0
53
111
4e7373de8c9795960f26735978f3922e8da480b1
633
py
Python
bin/check_if_virtual_environment.py
RobertRosca/PyFstat
1c9568bb3dc87c3d33aeb41b3f572e9990665372
[ "MIT" ]
16
2020-01-28T08:40:02.000Z
2022-03-02T05:26:50.000Z
bin/check_if_virtual_environment.py
RobertRosca/PyFstat
1c9568bb3dc87c3d33aeb41b3f572e9990665372
[ "MIT" ]
294
2020-02-04T17:15:26.000Z
2022-03-30T13:53:48.000Z
bin/check_if_virtual_environment.py
RobertRosca/PyFstat
1c9568bb3dc87c3d33aeb41b3f572e9990665372
[ "MIT" ]
10
2020-02-04T16:57:55.000Z
2022-02-03T00:12:25.000Z
#!/usr/bin/env python3 import os import sys is_virtual_environment = sys.prefix != sys.base_prefix is_conda_environment = os.path.exists(os.path.join(sys.prefix, "conda-meta", "history")) if not (is_virtual_environment or is_conda_environment): sys.exit( "Sorry, you are not using neither a virtual environ...
31.65
88
0.71564
#!/usr/bin/env python3 import os import sys is_virtual_environment = sys.prefix != sys.base_prefix is_conda_environment = os.path.exists(os.path.join(sys.prefix, "conda-meta", "history")) if not (is_virtual_environment or is_conda_environment): sys.exit( "Sorry, you are not using neither a virtual environ...
0
0
0
0
0
0
0
0
0
43afc46de3a2e1058f81067764b0058dcb21bf6d
325
py
Python
apps/superheroes/apis/v2/__init__.py
ericmittelhammer/newrelic-microservices-sandbox
81d13af1f0c448672814a14535eb547d742e3583
[ "Apache-2.0" ]
null
null
null
apps/superheroes/apis/v2/__init__.py
ericmittelhammer/newrelic-microservices-sandbox
81d13af1f0c448672814a14535eb547d742e3583
[ "Apache-2.0" ]
null
null
null
apps/superheroes/apis/v2/__init__.py
ericmittelhammer/newrelic-microservices-sandbox
81d13af1f0c448672814a14535eb547d742e3583
[ "Apache-2.0" ]
null
null
null
from flask import Blueprint from flask_restx import Api from .superheroes import api as superheroes_api blueprint = Blueprint("apiV2", __name__) api = Api( blueprint, title="Superhero Api", version="2.0", description="v2 of the Superhero Api", # All API metadatas ) api.add_namespace(superheroes_...
19.117647
47
0.729231
from flask import Blueprint from flask_restx import Api from .superheroes import api as superheroes_api blueprint = Blueprint("apiV2", __name__) api = Api( blueprint, title="Superhero Api", version="2.0", description="v2 of the Superhero Api", # All API metadatas ) api.add_namespace(superheroes_...
0
0
0
0
0
0
0
0
0
70181b1ee5ff049ec7d1c79bddb1cf8003477288
1,202
py
Python
tests/test_nfw.py
DifferentiableUniverseInitiative/DHOD
ad36dbf22b3aab1b4d0b7327f90c29639239b145
[ "MIT" ]
6
2020-03-26T17:16:22.000Z
2021-08-19T21:39:16.000Z
tests/test_nfw.py
DifferentiableUniverseInitiative/DHOD
ad36dbf22b3aab1b4d0b7327f90c29639239b145
[ "MIT" ]
23
2019-11-12T23:49:31.000Z
2021-08-06T16:53:35.000Z
tests/test_nfw.py
DifferentiableUniverseInitiative/DHOD
ad36dbf22b3aab1b4d0b7327f90c29639239b145
[ "MIT" ]
1
2019-12-02T00:52:37.000Z
2019-12-02T00:52:37.000Z
import numpy as np from numpy.testing import assert_allclose from diffhod.distributions import NFW from halotools.empirical_models import NFWProfile def test_nfw_mass_cdf(): """ Compares CDF values to halotools """ model = NFWProfile() scaled_radius = np.logspace(-2, 0, 100) for c in [5, 10, 20]: di...
26.130435
70
0.671381
import numpy as np from numpy.testing import assert_allclose from diffhod.distributions import NFW from halotools.empirical_models import NFWProfile def test_nfw_mass_cdf(): """ Compares CDF values to halotools """ model = NFWProfile() scaled_radius = np.logspace(-2, 0, 100) for c in [5, 10, 20]: di...
0
0
0
0
0
0
0
0
0
4d01a5cf7757ca1551a84d43f3c762060e796838
434
py
Python
des058.py
LeonardoPereirajr/Curso_em_video_Python
9d8a97ba3389c8e86b37dfd089fab5d04adc146d
[ "MIT" ]
null
null
null
des058.py
LeonardoPereirajr/Curso_em_video_Python
9d8a97ba3389c8e86b37dfd089fab5d04adc146d
[ "MIT" ]
null
null
null
des058.py
LeonardoPereirajr/Curso_em_video_Python
9d8a97ba3389c8e86b37dfd089fab5d04adc146d
[ "MIT" ]
null
null
null
import random from time import sleep lista = [0,1,2,3,4,5] aleatorio = random.choice(lista) print(20*'=') print(" JOGO DA ADIVINHAO") print(20*'=') escolha = int(input("Digite um numero de 0 a 5: ")) print('PROCESSANDO...') sleep(2) while escolha != aleatorio: escolha = int(input("Voce errou. Tente novam...
31
77
0.665899
import random from time import sleep lista = [0,1,2,3,4,5] aleatorio = random.choice(lista) print(20*'=') print(" JOGO DA ADIVINHAÇÃO") print(20*'=') escolha = int(input("Digite um numero de 0 a 5: ")) print('PROCESSANDO...') sleep(2) while escolha != aleatorio: escolha = int(input("Voce errou. Tente nov...
6
0
0
0
0
0
0
0
0
668d01a02f6c0e3ce1f935c7e693d4f708b6660d
23,176
py
Python
tests/test_html.py
uk-gov-mirror/alphagov.digitalmarketplace-content-loader
a05fa7faa272da0dfdbbcd2fd467bcce545a8896
[ "MIT" ]
1
2016-09-27T20:26:09.000Z
2016-09-27T20:26:09.000Z
tests/test_html.py
alphagov/digitalmarketplace-content-loader
2c96a219a91be1ed1e338ef66e3bb6a6c145e424
[ "MIT" ]
67
2016-05-06T09:06:45.000Z
2021-07-22T15:25:18.000Z
tests/test_html.py
uk-gov-mirror/alphagov.digitalmarketplace-content-loader
a05fa7faa272da0dfdbbcd2fd467bcce545a8896
[ "MIT" ]
8
2016-06-28T05:27:14.000Z
2021-04-10T18:03:45.000Z
link_attributes = 'class="govuk-link" rel="external noreferrer noopener" target="_blank"'
37.993443
118
0.555618
from textwrap import dedent import jinja2 import pytest from jinja2 import Markup from dmcontent.content_loader import ContentManifest from dmcontent.html import text_to_html, to_html, to_summary_list_rows, to_summary_list_row @pytest.fixture def content_summary(): content = ContentManifest( [ ...
4
12,525
0
0
0
9,512
0
95
916
e290a14b8b88f7fc8c1952718b5b1b4ae22f35bc
3,971
py
Python
server/models/point.py
infusion-code/meArmPi
1dd269f6323aaaf53ffded04ef700f44fe05f3b0
[ "MIT" ]
3
2018-09-20T19:42:35.000Z
2020-05-28T16:31:27.000Z
server/models/point.py
infusion-code/meArmPi
1dd269f6323aaaf53ffded04ef700f44fe05f3b0
[ "MIT" ]
2
2020-08-14T03:15:36.000Z
2022-01-25T22:48:38.000Z
server/models/point.py
Avanade/meArmPi
1dd269f6323aaaf53ffded04ef700f44fe05f3b0
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import
20.364103
131
0.491312
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from server.models.base_model_ import Model from server import util class Point(Model): """NOTE: This class is auto generated by the swagger code generator progra...
0
2,094
0
1,633
0
0
0
46
141
98acdbbb6844a072e17d9e580e9584f203927afe
1,143
py
Python
snap_scripts/epscor_sc/tabular_test/run_all_tabular_outputs_slurm_epscor_se.py
ua-snap/downscale
3fe8ea1774cf82149d19561ce5f19b25e6cba6fb
[ "MIT" ]
5
2020-06-24T21:55:12.000Z
2022-03-23T16:32:54.000Z
snap_scripts/epscor_sc/tabular_test/run_all_tabular_outputs_slurm_epscor_se.py
ua-snap/downscale
3fe8ea1774cf82149d19561ce5f19b25e6cba6fb
[ "MIT" ]
17
2016-01-04T23:37:47.000Z
2017-04-17T20:57:02.000Z
snap_scripts/epscor_sc/tabular_test/run_all_tabular_outputs_slurm_epscor_se.py
ua-snap/downscale
3fe8ea1774cf82149d19561ce5f19b25e6cba6fb
[ "MIT" ]
3
2020-09-16T04:48:57.000Z
2021-05-25T03:46:00.000Z
# run all of them in one go with slurm # # # EXAMPLE RUN SINGLE MODEL if __name__ == '__main__': import os script_names = [ 'model_diffs_metrics_epscor_se.py',\ 'model_variability_metrics_epscor_se_DECADAL_multidomain.py', \ 'model_variability_metrics_epscor_se_DECADAL_multidomain_cru.py' ] slurm_pat...
33.617647
98
0.672791
# run all of them in one go with slurm # # # EXAMPLE RUN SINGLE MODEL def run_model( fn, command ): import os, subprocess head = '#!/bin/sh\n' + \ '#SBATCH --ntasks=32\n' + \ '#SBATCH --nodes=1\n' + \ '#SBATCH --ntasks-per-node=32\n' + \ '#SBATCH --account=snap\n' + \ '#SBATCH --mail-type=FAIL\n' + \ ...
0
0
0
0
0
425
0
12
22
0da4c05e941dc75b45b55cfc7e06664aa7787e9d
586
py
Python
qlib/contrib/online/__init__.py
quantww/qlib
fe155703b0bc1192e7f9afed98af225e3a91da33
[ "MIT" ]
1
2021-12-14T13:48:38.000Z
2021-12-14T13:48:38.000Z
qlib/contrib/online/__init__.py
quantww/qlib
fe155703b0bc1192e7f9afed98af225e3a91da33
[ "MIT" ]
null
null
null
qlib/contrib/online/__init__.py
quantww/qlib
fe155703b0bc1192e7f9afed98af225e3a91da33
[ "MIT" ]
null
null
null
# pylint: skip-file # flake8: noqa ''' TODO: - Online needs that the model have such method def get_data_with_date(self, date, **kwargs): """ Will be called in online module need to return the data that used to predict the label (score) of stocks at date. :param date: ...
26.636364
98
0.619454
# pylint: skip-file # flake8: noqa ''' TODO: - Online needs that the model have such method def get_data_with_date(self, date, **kwargs): """ Will be called in online module need to return the data that used to predict the label (score) of stocks at date. :param date: ...
0
0
0
0
0
0
0
0
0
85dacffd6f83c7e47af17c6bd6b1de405cb7847c
1,581
py
Python
extractor.py
Manoj-kumar-Nallamala/Automatic-question-generation-for-cognitive-bot-evaluation
0c924c793d53690c24ad7d71b17d39279f53efa1
[ "MIT" ]
null
null
null
extractor.py
Manoj-kumar-Nallamala/Automatic-question-generation-for-cognitive-bot-evaluation
0c924c793d53690c24ad7d71b17d39279f53efa1
[ "MIT" ]
null
null
null
extractor.py
Manoj-kumar-Nallamala/Automatic-question-generation-for-cognitive-bot-evaluation
0c924c793d53690c24ad7d71b17d39279f53efa1
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
32.265306
114
0.691967
import nltk from nltk import word_tokenize,pos_tag,sent_tokenize def remove_appos(tokens_tag,text):#function to remove appositive(',') and elminating the relative pronouns index_of_appos=None for i in range(0,len(tokens_tag)-1): if tokens_tag[i][1]=='NNP' and tokens_tag[i+1][0]==',':#finding if appositive (...
0
0
0
0
0
1,400
0
21
115
96225d03f08bd3a4b800189fafc50413ad2df299
4,998
py
Python
etc/pi_garage_alert_config.py
SebasRaveg/SensorPuerta
0d6aec2731bc6a5d4a9727cb5cf04336b950ed75
[ "MIT" ]
null
null
null
etc/pi_garage_alert_config.py
SebasRaveg/SensorPuerta
0d6aec2731bc6a5d4a9727cb5cf04336b950ed75
[ "MIT" ]
null
null
null
etc/pi_garage_alert_config.py
SebasRaveg/SensorPuerta
0d6aec2731bc6a5d4a9727cb5cf04336b950ed75
[ "MIT" ]
null
null
null
#!/usr/bin/python2.7 ############################################################################## # Global settings ############################################################################## # Describes all the garage doors being monitored GARAGE_DOORS = [ # { # 'pin': 16, # 'name': "Garage Doo...
34
173
0.454182
#!/usr/bin/python2.7 ############################################################################## # Global settings ############################################################################## # Describes all the garage doors being monitored GARAGE_DOORS = [ # { # 'pin': 16, # 'name': "Garage Doo...
0
0
0
0
0
0
0
0
0
4872a60edf0eaad6dfff24e457a38ff3b99aef20
2,835
py
Python
tests/test_packaging.py
armaandhull/great_expectations
257d0a06cdae09a6b20aa1f6554649de10409fa7
[ "Apache-2.0" ]
null
null
null
tests/test_packaging.py
armaandhull/great_expectations
257d0a06cdae09a6b20aa1f6554649de10409fa7
[ "Apache-2.0" ]
null
null
null
tests/test_packaging.py
armaandhull/great_expectations
257d0a06cdae09a6b20aa1f6554649de10409fa7
[ "Apache-2.0" ]
null
null
null
import requirements as rp from great_expectations.data_context.util import file_relative_path def test_requirements_files(): """requirements.txt should be a subset of requirements-dev.txt""" with open(file_relative_path(__file__, "../requirements.txt")) as req: requirements = set( [f'{li...
38.310811
84
0.665256
import requirements as rp from great_expectations.data_context.util import file_relative_path def test_requirements_files(): """requirements.txt should be a subset of requirements-dev.txt""" with open(file_relative_path(__file__, "../requirements.txt")) as req: requirements = set( [f'{li...
0
0
0
0
0
0
0
0
0
ce6384144e065062c3437499adb14e89f34e2b16
184
py
Python
gp/GPsimtest_basic.py
ericlee0803/surrogate-GCP
0d04355bf17dc330b383353b51a62a28276de063
[ "BSD-3-Clause" ]
null
null
null
gp/GPsimtest_basic.py
ericlee0803/surrogate-GCP
0d04355bf17dc330b383353b51a62a28276de063
[ "BSD-3-Clause" ]
null
null
null
gp/GPsimtest_basic.py
ericlee0803/surrogate-GCP
0d04355bf17dc330b383353b51a62a28276de063
[ "BSD-3-Clause" ]
null
null
null
if __name__ == '__main__': main()
14.153846
34
0.652174
import GPsim import numpy as np def f(x): return np.sin(x) def main(): bounds = [-3., 3] test = GPsim.GPsim(batchsize=100) test.run(f, bounds) if __name__ == '__main__': main()
0
0
0
0
0
71
0
-12
90
841cab8adc96dd1ce4b6ae0fa23e6619c24baa38
1,763
py
Python
setup.py
Descanonge/filefinder
bb5bdeb49e871188edf26b53b081579c506320d9
[ "MIT" ]
null
null
null
setup.py
Descanonge/filefinder
bb5bdeb49e871188edf26b53b081579c506320d9
[ "MIT" ]
null
null
null
setup.py
Descanonge/filefinder
bb5bdeb49e871188edf26b53b081579c506320d9
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from os import path here = path.abspath(path.dirname(__file__)) CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 3 :: Only', 'Programming...
27.546875
69
0.646058
from setuptools import setup, find_packages from os import path here = path.abspath(path.dirname(__file__)) def get_long_description(rel_path): with open(path.join(here, rel_path)) as file: return file.read() def get_version(rel_path): with open(path.join(here, rel_path)) as file: lines = ...
4
0
0
0
0
411
0
0
46
1511e1fb3f5ea5f80634449e323236c86bc8b256
364
py
Python
test program in python 121.py
swarajRaut01/Python
28c4a6d70c14244b65c9bd2c264b7488a82a75a5
[ "MIT" ]
null
null
null
test program in python 121.py
swarajRaut01/Python
28c4a6d70c14244b65c9bd2c264b7488a82a75a5
[ "MIT" ]
null
null
null
test program in python 121.py
swarajRaut01/Python
28c4a6d70c14244b65c9bd2c264b7488a82a75a5
[ "MIT" ]
null
null
null
#addition a 2 number with a command line program import sys n=len(sys.argv) print("total arguments passed:",n) print("\nName of python script:",sys.argv[0]) print("\nArguments passed:" , end= "") for i in range(1,n): print(sys.argv[i], end = " ") sum=0 for i in range(1,n): sum+= int(sys.argv...
17.333333
49
0.596154
#addition a 2 number with a command line program import sys n=len(sys.argv) print("total arguments passed:",n) print("\nName of python script:",sys.argv[0]) print("\nArguments passed:" , end= "") for i in range(1,n): print(sys.argv[i], end = " ") sum=0 for i in range(1,n): sum+= int(sys.argv...
0
0
0
0
0
0
0
0
0
acea4403a7b962643a9d05ccea6fbd5fa5eb052f
2,486
py
Python
program/qiskit-backends/hello_quantum.py
ctuning/qiskit
33126f7c2e00331303727b712717ded6c7420e18
[ "BSD-3-Clause" ]
7
2018-05-05T09:47:54.000Z
2019-04-04T10:00:38.000Z
program/qiskit-backends/hello_quantum.py
ctuning/qiskit
33126f7c2e00331303727b712717ded6c7420e18
[ "BSD-3-Clause" ]
7
2018-03-13T15:38:12.000Z
2018-12-21T15:15:20.000Z
program/qiskit-backends/hello_quantum.py
ctuning/qiskit
33126f7c2e00331303727b712717ded6c7420e18
[ "BSD-3-Clause" ]
2
2018-10-05T11:58:06.000Z
2020-01-19T21:10:17.000Z
""" Example used in the readme. In this example a Bell state is made """ import sys import os from pprint import pprint # so we need a relative position from this file path. # TODO: Relative imports for intra-package imports are highly discouraged. # http://stackoverflow.com/a/7506006 sys.path.append(os.path.join(os.pa...
36.558824
92
0.687852
""" Example used in the readme. In this example a Bell state is made """ import sys import os from pprint import pprint # so we need a relative position from this file path. # TODO: Relative imports for intra-package imports are highly discouraged. # http://stackoverflow.com/a/7506006 sys.path.append(os.path.join(os.pa...
0
0
0
0
0
0
0
0
0
ff2a0bb7cf6152e476e531b93e75db8ab603b869
7,460
py
Python
docs/conf.py
rizwandel/finetuner
7fef9df6b5101d19a4fd710084d54b5be45dc5d5
[ "Apache-2.0" ]
null
null
null
docs/conf.py
rizwandel/finetuner
7fef9df6b5101d19a4fd710084d54b5be45dc5d5
[ "Apache-2.0" ]
1
2022-02-09T23:48:24.000Z
2022-02-09T23:48:24.000Z
docs/conf.py
rizwandel/finetuner
7fef9df6b5101d19a4fd710084d54b5be45dc5d5
[ "Apache-2.0" ]
null
null
null
import os import re import sys from os import path sys.path.insert(0, path.abspath('..')) project = 'Finetuner' slug = re.sub(r'\W+', '-', project.lower()) author = 'Jina AI' copyright = 'Jina AI Limited. All rights reserved.' source_suffix = ['.rst', '.md'] master_doc = 'index' language = 'en' repo_dir = '../' try:...
29.721116
168
0.65067
import os import re import sys from os import path sys.path.insert(0, path.abspath('..')) project = 'Finetuner' slug = re.sub(r'\W+', '-', project.lower()) author = 'Jina AI' copyright = 'Jina AI Limited. All rights reserved.' source_suffix = ['.rst', '.md'] master_doc = 'index' language = 'en' repo_dir = '../' try:...
0
0
0
0
0
1,346
0
0
69
14f86088720e6a5c263f1ab17dd6456e1ade36a8
141
py
Python
python101/packeges-example/module2.py
moonslider/jenkins-test
c5a6b72339a108b7331a730bd60d45c38c786c07
[ "MIT" ]
null
null
null
python101/packeges-example/module2.py
moonslider/jenkins-test
c5a6b72339a108b7331a730bd60d45c38c786c07
[ "MIT" ]
null
null
null
python101/packeges-example/module2.py
moonslider/jenkins-test
c5a6b72339a108b7331a730bd60d45c38c786c07
[ "MIT" ]
null
null
null
# module2.py
17.625
37
0.617021
# module2.py class class2: def __init__(self): self.description = 'class #2' def show(self): print self.description
0
0
0
105
0
0
0
0
23
2509c74436031da25b54613b744a1f14e1eaec88
938
py
Python
src/spartan/utils/orthoDB.py
xguse/spartan
cb0cc345aaf66602752f57e48e93bb92d69e7dc5
[ "MIT" ]
1
2017-08-01T21:28:13.000Z
2017-08-01T21:28:13.000Z
src/spartan/utils/orthoDB.py
xguse/spartan
cb0cc345aaf66602752f57e48e93bb92d69e7dc5
[ "MIT" ]
null
null
null
src/spartan/utils/orthoDB.py
xguse/spartan
cb0cc345aaf66602752f57e48e93bb92d69e7dc5
[ "MIT" ]
null
null
null
from collections import defaultdict def get_uniprot2gene_map(dataframe): """ assumes: dataframe = dataframe.fillna('empty') """ my_columns = dataframe[['Gene','UniProt']] u2g_map = defaultdict(set) for row in my_columns.itertuples(): idx,gene,uniprot = row u...
21.318182
50
0.590618
from collections import defaultdict import pandas as pd import networkx as nx def get_uniprot2gene_map(dataframe): """ assumes: dataframe = dataframe.fillna('empty') """ my_columns = dataframe[['Gene','UniProt']] u2g_map = defaultdict(set) for row in my_columns.itertuples(): ...
0
0
0
0
0
0
0
-2
46
f0932d7c70d68fcad0879e97559e619a2993f2ee
6,692
py
Python
lino/history/luc201212.py
khchine5/lino
64f7ca9c9b83459b5b9f26174e5e3c26a137459d
[ "BSD-2-Clause" ]
1
2018-01-12T14:10:11.000Z
2018-01-12T14:10:11.000Z
lino/history/luc201212.py
khchine5/lino
64f7ca9c9b83459b5b9f26174e5e3c26a137459d
[ "BSD-2-Clause" ]
null
null
null
lino/history/luc201212.py
khchine5/lino
64f7ca9c9b83459b5b9f26174e5e3c26a137459d
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- # Copyright 2012 Luc Saffre # License: BSD (see file COPYING for details) """ No longer used. """ from __future__ import unicode_literals if False: from lino.history import blogger # DEMOS = blogger.ticket("lino.pr", "Demo Sites", """ """) CMS = blogger.ticket("cms", "Li...
33.628141
102
0.710849
# -*- coding: UTF-8 -*- # Copyright 2012 Luc Saffre # License: BSD (see file COPYING for details) """ No longer used. """ from __future__ import unicode_literals if False: from lino.history import blogger # DEMOS = blogger.ticket("lino.pr", "Demo Sites", """ """) CMS = blogger.ticket("cms", "Li...
0
0
0
0
0
0
0
0
0
08884d50e0aaf0f58f9f757139772788b97ecf3c
593
py
Python
neural-network.py
remirobert/MNIST-machine-learning
0bcd3e9d6e0da0da0cb2a96aa2d794f24f356762
[ "MIT" ]
7
2017-06-02T12:46:19.000Z
2017-11-11T04:26:55.000Z
neural-network.py
remirobert/MNIST-machine-learning
0bcd3e9d6e0da0da0cb2a96aa2d794f24f356762
[ "MIT" ]
null
null
null
neural-network.py
remirobert/MNIST-machine-learning
0bcd3e9d6e0da0da0cb2a96aa2d794f24f356762
[ "MIT" ]
null
null
null
train_evaluate_model()
29.65
92
0.709949
import pandas as pd import numpy as np from nolearn.dbn import DBN import timeit def train_data(): train = pd.read_csv("train.csv") features = train.columns[1:] X = train[features] y = train['label'] return model_selection.train_test_split(X / 255., y, test_size=0.25, random_state=0) def train_eva...
0
0
0
0
0
443
0
-7
134
f78d0da391d3602de39fa1a634bda412c85bf97d
757
py
Python
test/remove_stopwords_test.py
ritlinguine/linguine-python
5dee96dea64523d673ae1efc88d50e9309f4dd5e
[ "MIT" ]
1
2018-11-26T18:01:32.000Z
2018-11-26T18:01:32.000Z
test/remove_stopwords_test.py
ritlinguine/linguine-python
5dee96dea64523d673ae1efc88d50e9309f4dd5e
[ "MIT" ]
null
null
null
test/remove_stopwords_test.py
ritlinguine/linguine-python
5dee96dea64523d673ae1efc88d50e9309f4dd5e
[ "MIT" ]
1
2018-11-26T18:01:33.000Z
2018-11-26T18:01:33.000Z
import unittest if __name__ == '__main__': unittest.main()
30.28
84
0.708058
import unittest from linguine.corpus import Corpus from linguine.ops.remove_stopwords import RemoveStopwords from linguine.ops.word_tokenize import WordTokenizeWhitespacePunct class RemoveStopwordsTest(unittest.TestCase): def setUp(self): self.op = RemoveStopwords() def test_run(self): test...
0
0
0
507
0
0
0
94
90
069c80c0775fc216354afa7d694a9da45a72a0e2
4,151
py
Python
serialization/student_pb2.py
ashishb/benchmarking
91903e9f144961b0e829039abc3bb4a17d93b249
[ "Apache-2.0" ]
1
2021-01-03T04:45:01.000Z
2021-01-03T04:45:01.000Z
serialization/student_pb2.py
ashishb/benchmarking
91903e9f144961b0e829039abc3bb4a17d93b249
[ "Apache-2.0" ]
null
null
null
serialization/student_pb2.py
ashishb/benchmarking
91903e9f144961b0e829039abc3bb4a17d93b249
[ "Apache-2.0" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='student.proto', package='', serialized_pb='\n\rstudent.proto\"h\n\x07Student\x12\n\n\x02id\x18\x01 \x02(\x05\x12\x12\n\nfirst_name...
32.944444
344
0.718622
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='student.proto', ...
0
0
0
287
0
0
0
52
112
2d7d5810906f4a035e10ea49397eb1d94a57ff27
322
py
Python
nzbhydra/datestuff.py
Sparklingx/nzbhydra
e2433e1155255ba37341cc79750b104e7dd8889a
[ "Apache-2.0" ]
674
2015-11-06T04:22:47.000Z
2022-02-26T17:31:43.000Z
nzbhydra/datestuff.py
Sparklingx/nzbhydra
e2433e1155255ba37341cc79750b104e7dd8889a
[ "Apache-2.0" ]
713
2015-11-06T10:48:58.000Z
2018-11-27T16:32:18.000Z
nzbhydra/datestuff.py
Sparklingx/nzbhydra
e2433e1155255ba37341cc79750b104e7dd8889a
[ "Apache-2.0" ]
106
2015-12-07T11:21:06.000Z
2022-03-11T10:58:41.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import #standard_library.install_aliases() #can be mocked
24.769231
39
0.838509
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library #standard_library.install_aliases() from builtins import * #can be mocked import datetime def now(): return datetime.datetime.now...
0
0
0
0
0
24
0
9
89
23fd9a0c30fcb1a61d9713013406935a7db39fe1
8,237
py
Python
src/google/appengine/api/app_identity/app_identity_stub_base.py
asriniva/appengine-python-standard
8a5abedfe99b27a4dcb31fd47d3ba7b62fd0e47c
[ "Apache-2.0" ]
28
2021-01-06T19:55:21.000Z
2022-03-28T09:41:08.000Z
src/google/appengine/api/app_identity/app_identity_stub_base.py
asriniva/appengine-python-standard
8a5abedfe99b27a4dcb31fd47d3ba7b62fd0e47c
[ "Apache-2.0" ]
13
2021-06-17T09:38:17.000Z
2022-03-11T01:12:33.000Z
src/google/appengine/api/app_identity/app_identity_stub_base.py
asriniva/appengine-python-standard
8a5abedfe99b27a4dcb31fd47d3ba7b62fd0e47c
[ "Apache-2.0" ]
28
2021-03-09T19:27:37.000Z
2022-01-21T21:18:52.000Z
#!/usr/bin/env python # # Copyright 2007 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...
41.39196
621
0.816195
#!/usr/bin/env python # # Copyright 2007 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...
0
221
0
4,003
0
0
0
-6
114
bef4d39a7ed0f163b0f73b97cc8940c6bd1ceff9
9,077
py
Python
windows/juggler/pyhook/hookit.py
same-moon/smutils
4277ab1d118e89503a0253f8c7e3fa2858033286
[ "MIT" ]
null
null
null
windows/juggler/pyhook/hookit.py
same-moon/smutils
4277ab1d118e89503a0253f8c7e3fa2858033286
[ "MIT" ]
null
null
null
windows/juggler/pyhook/hookit.py
same-moon/smutils
4277ab1d118e89503a0253f8c7e3fa2858033286
[ "MIT" ]
null
null
null
import os, collections, Queue import win32com.client """ MessageName: key down Message: 256 Time: 112416317 Window: 197094 WindowName: Emacs/Python <ruttbe@LAGER> hookit.py Ascii: 120 x Key: X KeyID: 88 ScanCode: 45 Extended: 0 Injected: 0 Alt 0 Transition 0 """ # Globals last_window = None bufs = { 'Emacs': { 'acti...
31.085616
123
0.548419
import os, collections, threading, Queue, time import win32api import win32com.client import pythoncom, pyHook """ MessageName: key down Message: 256 Time: 112416317 Window: 197094 WindowName: Emacs/Python <ruttbe@LAGER> hookit.py Ascii: 120 x Key: X KeyID: 88 ScanCode: 45 Extended: 0 Injected: 0 Alt 0 Transition 0 "...
0
0
0
654
0
6,592
0
14
342