blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8e275a619c464b317a42b90d999c9d7215646f38 | a3bef99a8ceb6b5fc0089c2a2546cb8b335167e2 | /ngs2EAF.py | 385ea76667e20921aa7c5439280e4177b0b4a2ed | [] | no_license | iarriagada/ngs2AutoFocus | 6e72ab4db71f15ecc6bb1d19fde9b350e423ce0a | 792bb33c44d9cfc5243d9fc3490afef8e2152930 | refs/heads/master | 2020-07-28T10:40:43.687195 | 2019-09-24T23:00:42 | 2019-09-24T23:00:42 | 209,396,124 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,755 | py | ngs2EAF.py | #!/usr/bin/env python3.5
import h5py
import os
import time
import epics
import argparse
import pickle
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
ngs2ip = '172.17.65.31'
ngs2user = 'aouser'
ngs2pass = 'ngs2@CerroP'
host = '"tcp://localhost:45000"'
utlP... |
81ffc9677ad81f6b55d5b23b38de8707a7d34dd0 | ba76e92735b27e0f1a28e88a082e3e6f59dfeafc | /frogger534/acm.py | da5299b464cf2f59f4a4f236442bd0c7fc89a144 | [] | no_license | sestys/alg_puzzles | 56543491a699eeea249d99b7b295e827056f1fb8 | 143eaf8bfc26e04005736a0057590b749208d6fb | refs/heads/main | 2023-02-17T19:18:11.026057 | 2021-01-16T20:24:23 | 2021-01-16T20:24:23 | 300,564,880 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,442 | py | acm.py | import sys, math
def printMatrix(matrix):
for line in matrix:
print(line)
print()
class Edge():
def __init__(self, v1, v2, w):
self.v1 = v1
self.v2 = v2
self.w = w
def __str__(self):
return str(self.v1) + "-" + str(self.v2) + " == " + str(self.w)
def euclid... |
135b254b0472a68459033c597941929147424710 | 04ca0a6ecf4a9c57454e4eaa2224a6204a356f78 | /python/codewars/unique_in_order.py | 95b839706ae214f864d3d6df9945a457008001c5 | [] | no_license | mkt-Do/codewars | 29cc74546dee24bdb5c97a0986fec6b69ce12774 | e145227187191aa70391b2ce58d21a744a781f26 | refs/heads/master | 2021-12-12T21:37:38.351140 | 2021-12-01T00:33:31 | 2021-12-01T00:33:31 | 169,721,979 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 245 | py | unique_in_order.py | def unique_in_order(iterable):
res = []
for i in iterable:
if res:
last = res.pop()
if i == last:
res.append(last)
else:
res.append(last)
res.append(i)
else:
res.append(i)
return res
|
53fd2f81bb6ec41b8e5acfbf35e206f6b5743232 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02627/s962121502.py | 217079e186f18f312a29857690351cc6f93b0a65 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 66 | py | s962121502.py | a = input()
print('a' if ord('a') <= ord(a) <= ord('z') else 'A')
|
ae0101f31a395d6c017bdc0837bb7fbe00d6f726 | 1bf4c41f796fe6c1645782b80764e907908f9e72 | /8.1.10/MpiPlotPhasePlane.py | 59506cf87139f0e8c4805569b9d328ac9f57f56f | [] | no_license | mamueller/Strogatz | 8a77dcf8bf05207e21ba4044d6d33bbb06b38e74 | 2e551539e9403366bb37dca904390eb80e5618d4 | refs/heads/master | 2020-05-17T10:37:02.202434 | 2015-08-03T18:12:34 | 2015-08-03T18:12:34 | 183,661,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,904 | py | MpiPlotPhasePlane.py | #!/usr/bin/python
# vim: set expandtab ts=4
from mpi4py import MPI
import numpy as np
import sympy as sp
from scipy.integrate import odeint
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
from evalOnGrid import evalOnGrid
comm = MPI.COMM_WORLD
size = comm.Get_size()
def myrange(myr... |
6846d1aa4c10a343ce0a7be0d1a702da92f1809d | bd030995a49f26cbfa9eeb58f41ded5e5209b9da | /server/userinfo.py | ebad1702d6b387a31bfb1d9409849070436a8052 | [] | no_license | ljh8993/user_order_api | 9a606feb56af7a1afed1ef364986dddd4019692a | 3adf4707f6e40df46ec9746deb682c33360801f2 | refs/heads/master | 2022-09-04T15:48:43.531323 | 2020-05-26T14:15:56 | 2020-05-26T14:15:56 | 266,760,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,154 | py | userinfo.py | from apprun import dbController, request, jsonify
# 단일 회원 상세 정보 조회 API
@app.route("/userInfo", methods=["POST"])
def userInfo():
user = request.json
res, msg, data = service_userInfo(user)
return jsonify(result=res, msg=msg, data=data)
# 단일 회원 상세 정보 조회 함수
def service_userInfo(user):
id = user.get("id... |
c55155f51290aa701cac09fa14fb6f00102c4e32 | 0d4da448a06d0417b6c83ea19b42d8c1545c99f8 | /nbarequests.py | b2ab59f7500b35a813cc037d49d0f99159c48935 | [] | no_license | johnphoward/Game-Log-Stats | 89a42f99e5e1058921f536e9c6c35d379f274b3a | 4559afa57dc6d59248d22a4bbde5a572c1901854 | refs/heads/master | 2021-01-10T09:56:54.856321 | 2016-04-01T04:01:03 | 2016-04-01T04:01:03 | 53,815,796 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,332 | py | nbarequests.py | # nbarequests.py
import requests
import json
import os
##### Globals #####
season = '2014-15'
season_type = 'Regular Season'
league_id = '00'
request_headers = {'User-Agent': 'Chrome/48.0.2564.103', 'Connection': 'keep-alive'}
data_dir = 'data'
play_log_dir = 'play_logs'
extension = '.json'
##### Universal methods... |
62b42d851019c9d0423ea2dae155b0694a42714f | 6cffc18e7c2614393ced3b0056668eb3e5f2de6d | /discoDroid/checker.py | 12b19c4ca569b5d077a35c4d65e53f50e2e16cf0 | [] | no_license | fred-olsson/discoDroid | 83b6fed882c47dabff9b0cbd3e7e558aa0c19321 | afcc93a2df089fff886f9c4239e6d68c6fdc48a5 | refs/heads/master | 2020-06-30T05:48:03.786126 | 2019-08-09T17:00:41 | 2019-08-09T17:00:41 | 200,748,075 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,205 | py | checker.py | #!/usr/bin/env python3
import logging
import json
# Permission checks.
def is_dev(ctx):
log = logging.getLogger(__name__)
with open('users.json', 'r') as f:
users = json.load(f)
for user in users['devs']:
if ctx.author.id == user:
log.info(f'{ctx.author} verified as Dev... |
9ed1c13acb9075044340d50bb29fbaf880d043ff | ff2b982adecc3000a2acfdacc86b534a5dfee9cd | /neural_style_transfer/utils.py | b857563ea4b5cb26aeff79fe39010ab64e171f9a | [] | no_license | romaintha/neural_style_transfer | 275d88dcf32e89b58c6c66485d4a0196c29387cc | 515f092b472a6e68b82061e5b65bb2655802df85 | refs/heads/master | 2020-03-19T07:53:31.001627 | 2018-06-06T08:36:55 | 2018-06-06T08:36:55 | 136,157,558 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | utils.py | def get_last_used_conv_layer(layer_names):
layers = []
for name in layer_names:
a, b = name.split('_')[1:]
layers.append((int(a), int(b)))
return 'conv_%s_%s' % sorted(layers)[-1] |
2b9a400f6566ba963135acd570ac0d8d9ce6c4e2 | f3897bbf525cb86e79d536e10aaf9d56ea32823f | /Chess-ELO-Mongo-Pipelines/models/move_analysis.py | 57572bd550953abf229bffb5e1ac245cb404d3aa | [] | no_license | amanagarwal03/Chess-ELO-Predictor | e3f3e87f2b0475e80e7a377c2249c9f26270cab7 | 562ca14a7a0170b0edbf8767bd2ec6f5d550bd94 | refs/heads/master | 2022-12-08T12:08:18.157465 | 2020-03-04T00:20:12 | 2020-03-04T00:20:12 | 244,763,716 | 0 | 0 | null | 2022-12-08T07:31:30 | 2020-03-03T23:30:42 | Jupyter Notebook | UTF-8 | Python | false | false | 4,002 | py | move_analysis.py | __author__ = 'Mayank Tiwari'
import datetime
from mongoengine import *
class PGNMetadata(EmbeddedDocument):
sequenceNumber = IntField()
sourceFileName = StringField(required=True)
CreateDate = DateTimeField(default=datetime.datetime.now)
LastUpdateDate = DateTimeField(default=datetime.datetime.now)
... |
46cdbddd90a90e81a21ea6d6fafef73f2492fb7a | c57c01978347af316bffa6b842d9d4976fa9a385 | /test_logpoly_vs_gmm.py | 2282bacbc934e6b01a7aeb7e6ddd7099580fb6e9 | [] | no_license | ahmadkhajehnejad/logpoly_naiveBayes | 4b1da951d383bfa8e72c0c9fd8f69f75fe21544e | b172b81c54f9079ce1d53fd31b8149a982ed74e3 | refs/heads/master | 2021-04-03T06:52:16.258284 | 2020-04-25T23:21:17 | 2020-04-25T23:21:17 | 124,655,901 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,778 | py | test_logpoly_vs_gmm.py | import numpy as np
import matplotlib.pyplot as plt
from logpoly.model import Logpoly, _compute_log_likelihood, LogpolyModelSelector
from logpoly.tools import mp_compute_SS, scale_data
import config.logpoly
from Gaussian_mixture_model.model import GaussianMixtureModel
import sys
import pandas as pd
import scipy.stats
... |
acd85b6b7d07bc90771e475a08778de98e2e411c | 94a7affd0fe3ad5bc64359ccc2e3eb53caa3d156 | /main.py | c9b43d31c38e141581a9ba130a3a806c1ee9d5dc | [] | no_license | mircearoata/retinanetCsvHelper | 965b75cbb794aa4ebf39053b4e4198daf8d175fd | e2b2d35397815cf84a47948ad2323d281e7dc197 | refs/heads/master | 2020-04-14T05:47:49.516057 | 2018-12-31T13:14:18 | 2018-12-31T13:14:18 | 163,669,143 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,587 | py | main.py | import tkinter as tk
from ImageLabeler import ImageLabeler
from tkinter import filedialog
from os import listdir
from os.path import isfile, join
from os import curdir
SINGLE = 0
FOLDER = 1
files = []
currentFile = 0
mode = SINGLE
def load_image():
global mode, currentFile
filename = filedialog.askopenfilen... |
a266a12b8ab2b697f7a4bb35424801eed405a2fb | 2d41bfc955a7ea796121bf73283b4e425c010c95 | /exercises/variables-printing.py | 92997239658dc7077a6e45f27ca7f9b21819255c | [] | no_license | michodgs25/python-exercises | 6ea66397ffc519ef29f6884bd0a4f751354d982f | 51dc20badd135375570a101b2140bd228c06d30f | refs/heads/master | 2023-07-08T00:20:03.951823 | 2021-08-10T16:36:09 | 2021-08-10T16:36:09 | 383,553,834 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,190 | py | variables-printing.py | # variable: types of people with a value of 10
types_of_people = 10
# Attach formatted string to x variable
x = f"There are {types_of_people} types of people."
# Create binary and do not variables
# Add string values to each variable
binary = "binary"
do_not = "don't"
# Conjure y variable, attach string value
y = f"T... |
2c18c585301e97e69e4d0a527bb7e009f82e284a | ac5c4572d4f5de4252c3813aa6333e33ae987f70 | /SVR Python.py | d13c15f03c7d37fd91afe1f7e68fa36a2383aa3b | [] | no_license | hoanglecong96/Machine-Learning-using-Python-and-R | 8680f3c0df1b5a035c78600c306674c74ccd372a | c640c4bd0765993bde605fac9d0e6474d8d25308 | refs/heads/master | 2020-03-19T09:11:46.399751 | 2018-06-21T17:38:33 | 2018-06-21T17:38:33 | 136,267,567 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,517 | py | SVR Python.py | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 7 20:24:08 2018
@author: Lee TyT
"""
#SVR
#Regression Template
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
#Importing the dataset
dataset = pd.read_csv('Position_Salaries.csv')
X = dataset.iloc[:, 1:2].values
#Make sure X is a m... |
fad0e39186ee40cb474c49e163f39e1577e749de | 2a5031605caa610f1e6153160863a25be6c49c2e | /day05/exercise01.py | 2f7c962bb1547f35948b076c970036fd16484f38 | [] | no_license | yegeli/month2 | bc235f8fb9852247425f7dfda8a1041a35bb8b2c | 2baad12a2b4692481ab70318c17d224cf3a2c665 | refs/heads/master | 2021-04-20T17:35:29.942058 | 2020-04-14T11:59:24 | 2020-04-14T11:59:24 | 249,706,118 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 230 | py | exercise01.py | """
"""
import re
s = """
Wo ai ni
我爱你
"""
print(re.findall(r"\w+", s,flags= re.A))
print(re.findall(r".+", s,flags=re.S))
print(re.findall(r"[a-z]+", s,flags=re.I))
print(re.findall(r"^我爱你", s,flags= re.M))
|
92ee4295d9e7fad13e564d9576472a3c4565a5c3 | c54d4f26a924ef8d300529981a78d96a993376ee | /Practica01/PuntoEntrenamiento.py | b347dc70c0e1952464228fdd69ffd0c26da6e817 | [] | no_license | astudisho/IAII | d6a43ff30b823a51956666b37ba1a1cefd14f907 | 4ac9aff0cf6bf6ae8d478c2546783a4fba5bc81c | refs/heads/master | 2021-08-28T00:03:55.691554 | 2017-05-18T06:46:51 | 2017-05-18T06:46:51 | 80,409,415 | 0 | 0 | null | 2017-05-17T11:14:43 | 2017-01-30T09:51:04 | Python | UTF-8 | Python | false | false | 684 | py | PuntoEntrenamiento.py | import random as rnd
class PuntoEntrenamiento(object):
"""docstring for PuntoWntrenamiento"""
def __init__(self, coordenadas, clase):
self.__coordenadas = coordenadas
self.__clase = clase
print(coordenadas)
#self.__peso = peso
def getCoordenadas(self): return self.__coordenadas
def getClase(self): return ... |
f1781d804dfbb6271bbde20c76cbe72b713a9097 | b3fc5c0f85d013c802d34df04ba58817dd32492c | /Examples/BasicUsage/ImageViewer/ImageViewerAdjustImageSize.py | a873abf7ab90381b4ee8a78139e5c4391b1f3473 | [
"MIT"
] | permissive | groupdocs-viewer-cloud/groupdocs-viewer-cloud-python-samples | 4324fbdd031b986d1d4b9204c9fd6f9c57d26342 | b2919b12a34b23b7535f9201750f111eaea1603a | refs/heads/master | 2023-04-10T01:56:31.013227 | 2023-03-20T06:06:00 | 2023-03-20T06:06:00 | 182,731,162 | 0 | 0 | null | 2019-06-09T19:01:11 | 2019-04-22T09:38:02 | Python | UTF-8 | Python | false | false | 906 | py | ImageViewerAdjustImageSize.py | # Import modules
import groupdocs_viewer_cloud
from Common import Common
# This example demonstrates how to set output image size
class ImageViewerAdjustImageSize:
@classmethod
def Run(cls):
apiInstance = groupdocs_viewer_cloud.ViewApi.from_config(Common.GetConfig())
view_options = groupdocs_... |
4e5dd557497a68876a33da2757c47f730558e1c3 | 69ac2db29e1953d34d1965b9b09cbb6b2e44622a | /ase/test/al.py | 3857490f60d6375bd0a9a42cc8fe4bf618940fce | [] | no_license | ArianFluido/Project-2-PHYS-A0140 | 01e13dbf30ce55f46f8060ffe23bc9f29bcb87fe | 6d7ec3b1a09d83f330434df1ce91e6c52491cd22 | refs/heads/master | 2022-08-02T14:36:34.647227 | 2020-05-26T10:42:56 | 2020-05-26T10:42:56 | 264,162,598 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,194 | py | al.py | from ase.test import NotAvailable
from ase.lattice import bulk
from ase.calculators.calculator import get_calculator
required = {'abinit': dict(ecut=200, toldfe=0.0001, chksymbreak=0),
'aims': dict(sc_accuracy_eev=5.e-3),
'elk': dict(tasks=0, rgkmax=5.0),
'gpaw': dict(mode='pw')}
... |
217e63f72b925bbbe0f8ecbaa7555e613a827f53 | 7a16fdf85560bb3e7c621248ecfbd4b3ff50e79f | /information/firstSemester/11/qpsk.py | b255aaedeb72c67452987ce60293861351833e6f | [] | no_license | potyama/j5-lesson | af92b6cfb0dd7fd0a3283a2c565605820828b076 | f15c70a043a7e5d8ddb60d92c4e8e7a69344ec29 | refs/heads/master | 2023-02-03T07:13:00.406441 | 2020-12-10T02:00:41 | 2020-12-10T02:00:41 | 266,951,813 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 854 | py | qpsk.py | import numpy as np
import matplotlib.pyplot as plt
def qpsk(signal):
qpsk_signal_1 = []
qpsk_signal_2 = []
N = 128
t = np.arange(0, N, 1)
fc = 2
qpsk_0 = np.cos(2 * np.pi * t * fc)
qpsk_1 = np.sin(2 * np.pi * t * fc)
qpsk_2 = -np.cos(2 * np.pi * t * fc)
qpsk_3 = -np.sin(2 * np.pi ... |
606ec43b04e1296ebf61361b18302a52c6114bf9 | f70fad1064d0e9f7e1f172d13ab24a88caf38d4c | /core/exceptions.py | a42e9a78ef99797a8256a89dac05089f8c42e8f7 | [] | no_license | owelray/example_code | ce291b2397bdab9afbd1df4dd283eb1027d0eff8 | d25c0ea43de902e5126730ea6183146ac2f553b8 | refs/heads/master | 2023-02-24T04:09:12.461518 | 2021-01-22T07:34:34 | 2021-01-22T07:34:34 | 331,870,872 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | exceptions.py | from django.utils.translation import gettext_lazy as _
from rest_framework import exceptions, status
from rest_framework_simplejwt.exceptions import TokenError, AuthenticationFailed
class TokenError(Exception):
pass
class InvalidToken(AuthenticationFailed):
status_code = status.HTTP_401_UNAUTHORIZED
def... |
ae7f3c3bd80fb9b902094a40abe8372b75f5cbe8 | 2aace9bb170363e181eb7520e93def25f38dbe5c | /build/idea-sandbox/system/python_stubs/-57053121/PyQt5/QtCore/QItemSelection.py | b682b0f6b81a2e31559dbb28249a7e4f3741d257 | [] | no_license | qkpqkp/PlagCheck | 13cb66fd2b2caa2451690bb72a2634bdaa07f1e6 | d229904674a5a6e46738179c7494488ca930045e | refs/heads/master | 2023-05-28T15:06:08.723143 | 2021-06-09T05:36:34 | 2021-06-09T05:36:34 | 375,235,940 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,946 | py | QItemSelection.py | # encoding: utf-8
# module PyQt5.QtCore
# from C:\Users\Doly\Anaconda3\lib\site-packages\PyQt5\QtCore.pyd
# by generator 1.147
# no doc
# imports
import enum as __enum
import sip as __sip
class QItemSelection(__sip.simplewrapper):
"""
QItemSelection()
QItemSelection(QModelIndex, QModelIndex)
QItemSel... |
7a26f2baa35269a5d5ca9ed4f6893d5cd2304b03 | b2f0546ce48c6d1db236fae4d51c56704a8ed59b | /Python/Itertools/Iterables_and_Iterators.py | cf4deec58c085360e685ee9e531b97b14a6ceaf6 | [] | no_license | Rajatku301999mar/HackerrankCoding_Rajatkumar30 | c336dfc0558c6adaac1f957a3043cab8a56672eb | a8bf1ce0c60efb373bdee5204b49ab32fd415ecf | refs/heads/master | 2023-02-25T00:02:37.928126 | 2021-01-29T05:55:24 | 2021-01-29T05:55:24 | 298,877,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 231 | py | Iterables_and_Iterators.py | # Enter your code here. Read input from STDIN. Print output to STDOUT
from itertools import combinations
_,s,n = input(),input().split(),int(input())
t = list(combinations(s,n))
f = [i for i in t if 'a' in i]
print(len(f)/len(t))
|
3e141d68d7a46a0b9d9209739fbea841ba70ffbd | 8f6aa9ac9c8c2e409875bbf36fbc49b3eb37d88b | /enthought/mayavi/modules/orientation_axes.py | 4e81df65951aaa4f645fc0d725c5b3cbf70dcdc6 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | enthought/etsproxy | 5660cf562c810db2ceb6b592b6c12274bce96d73 | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | refs/heads/master | 2023-03-27T04:51:29.297305 | 2020-12-02T09:05:18 | 2020-12-02T09:05:18 | 1,632,969 | 3 | 1 | NOASSERTION | 2020-12-02T09:05:20 | 2011-04-18T22:29:56 | Python | UTF-8 | Python | false | false | 100 | py | orientation_axes.py | # proxy module
from __future__ import absolute_import
from mayavi.modules.orientation_axes import *
|
975fd49c913a84a91bc7c691331908e2ab681125 | c40334bc307a0fff5823fd5f5ab9c6a6ad8f4a31 | /src/qepppy/tools/pdos_char.py | cf4210aedfd622bf17908e34cef155fd0547d3aa | [] | no_license | Crivella/QEPPpy | 43ff81d7b56be32e62b021df02edaa320e512db5 | f1c2033ef36a685a715162c9b08a6b56393d2270 | refs/heads/master | 2023-07-19T10:18:55.505332 | 2020-02-26T14:20:22 | 2020-02-26T14:20:22 | 139,601,178 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,275 | py | pdos_char.py | #! python
import os
import re
def pdos_char(fname="", kpt_list=[], bnd_list=[], thr=0):
if not os.path.isfile(fname):
raise FileNotFoundError("File fname:'{}' does not exist.".format(fname))
if isinstance(kpt_list, str):
kl = list(map(int, kpt_list.split(",")))
elif isinstance(kpt_list, list):
kl = kpt_lis... |
1817623661d6fd53d5dfd4a53955a6a829484211 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_116/1438.py | fbd49044c70be4722a133d37341fffc78ea8ec18 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,698 | py | 1438.py | import sys
def strip_lines( lines ):
result = []
for line in lines:
result.append( line.strip() )
return result
def get_cases( lines ):
cases = []
case = []
for line in lines:
if line == "":
cases.append( case )
case = []
else:
case.a... |
a8b9c436104084b04f63088a6bca350f6f9d186d | c4627834b098a8312908c8b9cc4cf124cc708421 | /ListOnlyDirs.py | 8bc79f08b3f19c73d0905f3201719669a9278918 | [] | no_license | PramodT12/PythonTest | 21eed0446143f7af2683988a602f270191b6e4d4 | e202ec737e1f7c14437c644e7bc8b260e1a1ca50 | refs/heads/master | 2020-04-19T08:58:20.233562 | 2019-02-02T01:35:44 | 2019-02-02T01:35:44 | 168,095,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 206 | py | ListOnlyDirs.py | #List only Directories
import os
Dir="C:\\"
DirL=[]
FDList=os.listdir(Dir)
print(FDList)
for i in FDList:
if os.path.isdir(os.path.join(Dir,i)):
DirL.append(i)
print("DIrectories List :",DirL)
|
9708db13b13aa9c217359ef6c72c794d4e2f5f1d | 39568e19301a7a112398be542154950af25591de | /util/get-toolchain.py | 18297c2804e8112dce159090a35c2ddaa1533f7e | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | lowRISC/opentitan | 493995bc7cf7cb3aee486a5203af3fd62bba3bfc | 51f6017b8425b14d5a4aa9abace8fe5a25ef08c8 | refs/heads/master | 2023-08-31T22:05:09.425796 | 2023-08-14T14:52:15 | 2023-08-31T20:31:13 | 204,516,692 | 2,077 | 634 | Apache-2.0 | 2023-09-14T21:16:21 | 2019-08-26T16:30:16 | SystemVerilog | UTF-8 | Python | false | false | 9,304 | py | get-toolchain.py | #!/usr/bin/env python3
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import argparse
import json
import logging as log
import re
import shutil
import subprocess
import sys
import tempfile
from pathlib import Path
from ... |
5302f5e1224201068b2dbef98f887baaba8947ee | c3d0a0b6336a3ff73724fe1615eb1809dbdaaed8 | /Durga OOPs/Garbage_Collection_OOPs.py | 1a3665f2b2a8e2f255994703d8d9eb1555689e4d | [] | no_license | Silentsoul04/FTSP_2020 | db0dae6cd9c371f3daa9219f86520dfa66348236 | 7e603af918da2bcfe4949a4cf5a33107c837894f | refs/heads/master | 2022-12-21T20:44:32.031640 | 2020-09-20T12:29:58 | 2020-09-20T12:29:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,211 | py | Garbage_Collection_OOPs.py | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 14 19:37:35 2020
@author: Rajesh
"""
Garbage Collection :-
-------------------
Based on our requirement we can enable and disable GC.
NOTE :- To destroyed the useless objects python has provide the Assistent is
called Garbage Collector.
NOTE :- Garbage Collector will... |
35460cfcc9a12d0616b6683af5eca5b13e677e0e | da9b3c662f3e88679e1b4e9e52067a55ba51a57f | /source/location/migrations/0001_initial.py | 4e6866520484e7ebf757b4e1ded97414d899c8be | [] | permissive | chandhanu/globetrot | c1c1ea752ad911100d3c453198fbe2dc557dcfcb | 8828e794067c34cf83c3ccdef49e94518062c62b | refs/heads/master | 2023-06-24T06:22:51.196448 | 2023-06-09T17:51:31 | 2023-06-09T17:51:31 | 189,084,408 | 0 | 0 | BSD-3-Clause | 2021-06-10T21:31:40 | 2019-05-28T18:44:59 | HTML | UTF-8 | Python | false | false | 7,639 | py | 0001_initial.py | # Generated by Django 2.1.5 on 2019-04-28 12:54
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... |
30dce12e7d1cfb3ce6bbaf39fd48f22042d54168 | 181b04d8792cd85eb1813abf31ea98013543f4cd | /ctci/2_linked_lists/8_loop_detection.py | 375bafbef49b8a341da63a7c62c534e44b7bd183 | [] | no_license | jmcs811/interview_prep | 4dbd43012b88a930bfe81ef37f4533ec9ee74e4f | 70b5d615d79b851bec7939cbae15e480a1c11d9a | refs/heads/master | 2021-08-06T22:18:45.396172 | 2021-02-23T15:42:36 | 2021-02-23T15:42:36 | 244,055,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | 8_loop_detection.py | class Solution:
'''
TIME: O(n)
SPACE: O(n)
'''
def hasCycle(self, head: ListNode) -> bool:
hs = set()
on = head
while on != None:
if on in hs:
return True
hs.add(on)
on = on.next
return False
def hasCycleConstan... |
f11b3c833eeffd60c266ae6ec0cc5ce71b0607d2 | 63a8471e63eade058ca89720072f4b8a95bd5e20 | /CIFARS/mycifar10.py | 3d812d708b525ae5bddec5cc4d1212b1c007d764 | [] | no_license | ludwikbukowski/mysupernet | 3a0dc202bdea999555c7444947862852555c5592 | 371fc778915f6c6aa0613812006f8e86856d8b40 | refs/heads/master | 2020-06-26T16:32:51.974172 | 2019-08-24T22:39:54 | 2019-08-24T22:39:54 | 199,686,492 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,148 | py | mycifar10.py | """CIFAR10 small images classification dataset.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
from six.moves import cPickle
from keras.utils.data_utils import get_file
from keras import backend as K
import numpy as np
import os
def my_load... |
5be8ffabe930d8ef9e589a92d71d158716349550 | 4fee5f847b42ba2dd1e8e2fabcd844029789d1dc | /routes.py | 2b3bd420182260484d41b9fbc58c82250f7de86e | [] | no_license | CoolMcRad/TietokantaSovellus | 348558193baa11c4c2e52e6079114a864cc26d02 | 7d0a787c706cf52566bb667d3677d4b415fa63af | refs/heads/master | 2023-03-24T01:10:28.733934 | 2020-08-30T19:48:17 | 2020-08-30T19:48:17 | 282,718,909 | 0 | 0 | null | 2021-03-20T04:52:32 | 2020-07-26T19:28:33 | Python | UTF-8 | Python | false | false | 4,898 | py | routes.py | from app import app
from utils import pages, add, user
import os
from flask import render_template, request, redirect, session, send_from_directory
app.add_url_rule('/favicon.ico','/favicon.ico')
@app.route('/favicon.ico')
def favicon():
return send_from_directory(os.path.join(app.root_path, 'static'),'favicon.ico... |
ec41925be3788314a34079728c1dd8a7f3b0dcb0 | 91c8db35e9cb905e1cf0ff0dc8b4fc1970c1db0e | /drawSquare.py | 528ceffe4acbdd82caa974d9514dde8b62518e00 | [] | no_license | kakhavai/pixelPrinting | fe9dcdbaef66adc5f4f5af52a041710d76d822a6 | af5513cb2d5755c5a760ad17ebc4849920b87818 | refs/heads/master | 2020-03-23T13:53:17.645066 | 2018-12-03T05:47:20 | 2018-12-03T05:47:20 | 141,643,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 322 | py | drawSquare.py | import numpy as np
import cv2
projectionResolution = [1080, 1920]
pixelGrid = np.zeros(projectionResolution, dtype=int)
cp = [int(x / 2) for x in projectionResolution]
for y in range(cp[0] - 75, cp[0] + 75):
for x in range(cp[1] - 75, cp[1] + 75):
pixelGrid[y][x] = 255
cv2.imwrite('bigWhiteBox.png', pixelGrid... |
5c75e441ffc6b4f7019fa15c93fb0cd83204f572 | 20a4162b366afdf41eea8072273483c39e99ad5c | /assigner/zmqjsonrpc_test.py | 49bf9693196c2cb7cc09e8fe3196ace257ed3038 | [] | no_license | dyim42/pyzmq-demos | 47cd93a047026fc3fc98d81bb5e7834a4fe9b01e | daa69137dcdd9734b6a123c4c82f1fd097bf3c0e | refs/heads/master | 2020-12-29T03:06:36.248268 | 2012-02-23T23:27:33 | 2012-02-23T23:27:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,792 | py | zmqjsonrpc_test.py | import zmq
import zmqjsonrpc
import zhelpers
import json
import threading
import time
import traceback
port = 11223
class Boo( object ):
def first( self, *args ):
return "%s: %s" % (
threading.current_thread().name, ", ".join( str( a ) for a in args ))
secon... |
df8f977c96b8027589aa6f5749dd142934c7b08a | 0790ab1aab29e6c5c17bfa485415b0aba60cdb00 | /app.py | ee34509ca0ea53bef11961e52f6c39f0bcad0d3c | [] | no_license | SusanneLun/MyFirstPython | f6c5aa6c4d6f28b1eb3b76d055d0d6c7e672b639 | 0c9d960d6352de18702c5904f85db1865e7e6916 | refs/heads/master | 2020-08-01T19:30:03.604705 | 2019-10-02T10:12:08 | 2019-10-02T10:12:08 | 211,092,701 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 521 | py | app.py | import math
# uppder case letters indicates constant (remember)
PI = 3.14
# rounding the number
print(round(PI))
# abs stands for absolute number, so if negative, a positive number is the output
print(abs(PI))
# for all built-in functions in python, search the web for 'python 3 built-in functions"
# once you have imp... |
3d8374ef042c68971497cabe00f63501304637ee | 8a105b0a4086ad9506b2bfc1130e8554ddb078c0 | /ABC_stat_select/summary_stats.py | d6077c3cd14aa48a3f06a4276351e8107ec5c9f7 | [
"LicenseRef-scancode-warranty-disclaimer",
"ISC"
] | permissive | yasc/statistic_selection_for_abc | 677836742ab852856ef23be52281b76c1f4a2b9d | ad7de8ed655510c60190b99104d3a4bd339268ca | refs/heads/master | 2023-03-10T11:18:06.739793 | 2021-02-28T21:04:16 | 2021-02-28T21:04:16 | 343,211,136 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,860 | py | summary_stats.py | #!/usr/bin/env python
"""Calculate summary statistics from data"""
import numpy as np
import simulate_data as sim
from scipy import stats
from sklearn import linear_model
#from matplotlib import pyplot as plt
__author__ = "yasc"
__date_created__ = "07 July 2016"
def sv_stats(delta, y):
"""Calculate statistics f... |
83319ac39d646eba6cf4723fee229fb87a44de8a | 023c91c61df77bcee4ab7fa0adf5697f62b68458 | /Q3/genFile.py | 76e65c005ac8c30bcc69ad66dcc7a8393c20c3d4 | [] | no_license | rehassachdeva/OS-Threading-Assignments | 575d61aa18b5bf02f1dd5c396a5dc958360733ad | f70296444a6748afd5619b455ec239d6d6c91cfd | refs/heads/master | 2021-05-04T04:58:37.697987 | 2016-10-14T14:19:59 | 2016-10-14T14:19:59 | 70,917,121 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 88 | py | genFile.py | import random, sys
print sys.argv[1]
for i in range(int(sys.argv[1]),0,-1):
print i
|
b0ee507cdcfabc9c90d6def76085b95a181edb3e | 97811820959c60adbbb7be7294b4e8c1293165dc | /DataPreprocessing/Scaling/Binarizer.py | 28010a26a64775f93a94071ef9e8ccdb63315e94 | [] | no_license | stomaras/Machine-Learning | a28311c13fa0cd64f08416957d527cd8975f5247 | e62a674cff46b64b1eb0e19617fbf651ee50920c | refs/heads/master | 2022-10-08T17:58:34.680890 | 2022-09-20T07:11:54 | 2022-09-20T07:11:54 | 214,214,326 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | Binarizer.py | # -*- coding: utf-8 -*-
"""
Created on Fri Jan 24 16:46:46 2020
@author: sptom
"""
from sklearn import preprocessing
import numpy as np
x = np.array([[1,2],
[2,5],
[3,6],
[4,9],
[5,8]])
binarizer = preprocessing.Binarizer(4)
binarizer_scaled = binarizer.fit... |
c152a0e338ee6beb447c2b2c6de7f3ca10c98c2e | 563d5bdcdb0f3b40893d0ada11bf68e7338c283c | /datastructures/linkedlist/python/doubly-linked-list.py | 17c069a614dba6bf5a673cdbbec9c357bfc1c8a7 | [] | no_license | llenroc/interviews-1 | 8a1342102f2deede2a569d63eb8fbbf9055fcd26 | e5f55e48c2b9a4b06a81693b57d3cec65c2d91e9 | refs/heads/master | 2023-09-06T10:18:40.490289 | 2021-11-22T18:19:58 | 2021-11-22T18:19:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,467 | py | doubly-linked-list.py | class Node:
def __init__(self, value):
self.value = value
self.previous = None
self.next = None
class DoublyLinkedList:
def __init__(self):
self.head = None
self.size = 0
def get(self, index):
if not self.head:
return -1
current = self.... |
768b9faf2110e1ecd76472549319f9e40be2a0b3 | dd7e9cf212c8548b529f6ef2e3a06ba639f93cee | /apps/emailmodule/views.py | 41709c160d91422601351175a3c638e8715f8edb | [] | no_license | Daiech/Actarium | bea2c592b8d18bc7a301b5ff910007e3b3a7d6e9 | a54371307a80100d6b3c956a1e3890fec8ad4bae | refs/heads/master | 2022-12-14T10:47:34.267357 | 2019-05-04T17:12:20 | 2019-05-04T17:12:20 | 202,606,759 | 0 | 0 | null | 2022-12-08T05:20:51 | 2019-08-15T20:25:39 | Python | UTF-8 | Python | false | false | 14,900 | py | views.py | #encoding:utf-8
from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from django.template import Context, RequestContext
from apps.actions_log.views import saveErrorLog
from django.contrib.auth.models import User
from django.shortcuts import render, render_to_response
fro... |
3f8d5aad6fbb69f2e55932f13c102f7ea00b82e5 | 0e07376a530389605c88dad8ed03a361637a5f54 | /bootstrap sampling/alcoholconsumption.py | 66cf59b4d981ed2ac4bca5abf2ff440ce32a4eb8 | [
"MIT"
] | permissive | victoraccete/data_science_projects | 606fc232f2264d1448fd70e6c9983081dccacd5e | 42b7e8758d7e4fa04d4675d73eb041274a030662 | refs/heads/master | 2020-04-08T21:45:06.147330 | 2019-04-04T03:21:59 | 2019-04-04T03:21:59 | 159,757,048 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 764 | py | alcoholconsumption.py | # -*- coding: utf-8 -*-
import pandas as pd
mat = pd.read_csv('data_science_projects/bootstrap sampling/student-mat.csv')
#por = pd.read_csv('data_science_projects/bootstrap sampling/student-por.csv')
mat = mat.drop(columns=['school', 'address', 'reason', 'nursery', 'famsize',
'Pstatus', 'Mjob... |
c9fd22569e5152d40745816e83660ddec323c110 | 25a99c86560863210b70a80ce70102de4853e96e | /assign_1/assign_15.py | 6804eecad39601b3cfe9cbe4cfc7209860e4c526 | [] | no_license | jazyrcp/Python | dd8d3e878df9e1b3d8c9cba7d014ab5dc771d8c4 | 529768fcbb2d65da7bea6a35bc31bc05fae203a4 | refs/heads/master | 2020-03-19T04:12:12.930584 | 2018-06-02T09:30:56 | 2018-06-02T09:30:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 246 | py | assign_15.py | num1= int(input("Enter the number: "))
print(num1)
c=num1
li=[]
total=0
re=0
while c!=0:
re = c%10
li.append(re)
c=c//10
print(li)
for i in li:
total += i**3
if total==num1:
print("Armstrong Number")
else:
print('Not an Armstrong Number') |
4de5c530c3d3a7180c561b2fecb98af12f0a2752 | 187664efb5603faf8491d5e796f6118598aa5013 | /yandex.py | 5fa34fdf05bb53922c86a7948f8c13b28d150c4d | [] | no_license | singulared/aiohttp-example | a974a86df9f0276ee93e960555394d106222d437 | 952c215118508598d3956f74128b2f870ab1221d | refs/heads/master | 2021-01-10T03:51:36.579249 | 2015-09-23T20:34:51 | 2015-09-23T20:34:51 | 43,024,976 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,084 | py | yandex.py | import asyncio
from aioauth_client import YandexClient
import settings
from datetime import datetime
import ujson
yandex = YandexClient(
client_id=settings.client_id,
client_secret=settings.client_secret,
access_token=settings.access_token
)
@asyncio.coroutine
def get_counters():
current_date = date... |
783fa333eec36146abd92157a940fe39a9ea4c54 | 9fe1ce3713914afa8ff7f3552021a7dbe4a6562d | /examples/example_use_trained_gan.py | 2f3b92bdd44875476acd448e52f3c955a5aa284c | [] | no_license | jleinonen/masc3dgan | c8eae9959635f3b102606e7f3be3f3f932939c53 | e489922535e5b719b11176fcb7775e2375b55d3d | refs/heads/master | 2023-05-08T14:49:01.687561 | 2021-05-25T11:29:33 | 2021-05-25T11:29:33 | 369,176,444 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,832 | py | example_use_trained_gan.py | """
This brief scripts illustrates how to use 3D-GAN.
A small reference dataset is stored in the data/
folder of the progjet. This corresponds to the
measurements of 3D-printed snowflakes as in the
manuscript
Mass and geometry reconstruction of snowfall particles from multi angle snowflake camera (MASC) images
Th... |
244cca2008f0453ee1def344ee8f441816400cf5 | 2c9073260cf36758e316926dc2590e404e1a7878 | /quora/core/views.py | 36e6e7b1827654e6d19ac071ff0988f4d1bf7444 | [] | no_license | roz007/Quora | cafcc8eae43683bed79ad6b23de6b5a57e061967 | 2e2008832dead3e4aae5fca2eb7bdbe0efae3739 | refs/heads/master | 2022-11-05T12:56:07.923792 | 2018-09-02T01:29:55 | 2018-09-02T01:29:55 | 147,045,124 | 0 | 2 | null | 2022-10-20T12:21:47 | 2018-09-02T01:29:26 | Python | UTF-8 | Python | false | false | 4,457 | py | views.py | from django.shortcuts import render, render_to_response
from django.shortcuts import HttpResponseRedirect, redirect
from django.urls import reverse
from django.views.generic.edit import FormView
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.contrib... |
5765dec1bc7b7aaa7932c8d6cf240004754f9dcc | 0c2cbb9cbc8a14f4ce96276b1e120d21ece85d81 | /build/lib/connectivityworkflow/connectivity_workflow.py | ab62ef79a25672f09aa526bcdbefaea1af05c884 | [] | no_license | GReguig/connectivityworkflow | 9f7cfc27796a7d13926e83fe4d4db3187e5f2365 | 10a742836caca3e5249af9499621e5531f32b42d | refs/heads/master | 2020-03-17T21:00:26.660458 | 2018-07-13T06:50:09 | 2018-07-13T06:50:09 | 133,938,736 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,837 | py | connectivity_workflow.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon May 7 15:56:02 2018
@author: ghiles.reguig
"""
import argparse
from nipype import config
from os.path import join as opj
import json
from connectivityworkflow.workflow_builder import BuildConnectivityWorkflow, BuildConnectivityWorkflowSurface
def RunC... |
21c3f97890a443a541b43bdd9ab199a19b324b60 | d2cce6ddeb7a431e220386b531b74f88c9add05c | /Leetcode-Blind-75/LongestPalindromicSubstring.py | fdf570220db35d77292decfdb765344ccc3711e7 | [] | no_license | djanshuman/Coding | 1d931c8d063f2aed4827d8419d96d64ed142a4fd | 6862f1bfa91b938747db4f5ef0de8626328d79d0 | refs/heads/main | 2023-09-01T06:02:03.606456 | 2023-08-29T02:55:11 | 2023-08-29T02:55:11 | 322,949,231 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,341 | py | LongestPalindromicSubstring.py | class Solution:
def longestPalindrome(self,s:str) -> str:
res=""
resLen=0
for i in range(len(s)):
# odd length
l,r=i,i
while l >= 0 and r < len(s) and s[l] == s[r]:
if (r -l +1) > resLen:
res=s[l:r+1]
... |
50d80915d153fc7892f3554a95b517abf70c5a2e | c6b883b12368f27a2c446457413ff5560fe4849a | /Assignment2/Python_Scripts/spline_vs_lagrange.py | 4897911b717c7b61c5bb65d17e879bb3ae10fc98 | [] | no_license | Alm99-collab/Numerical-Methods | 0e009d6db458095f21751bafb5df145d2043c03d | 5ef1a5d72c68b3661b86ccb0a028c0f8fc108f3f | refs/heads/master | 2023-07-11T19:15:54.279323 | 2021-08-08T17:20:34 | 2021-08-08T17:20:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,599 | py | spline_vs_lagrange.py | from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import sys
import sympy as sp
x = sp.Symbol('x')
points = []
n = 11
k = np.zeros([n,1])
k[0] = 10/(26)**2
k[n-1] = -10/(26)**2
coeff = np.zeros([n-1,4])
max_y = []
def main():
color = ['g','r','r','c','b']
f = 1/(1+x**2)
print f
p... |
5401aba39ca14b4e1384b1f28cfecf103882afea | e2860eb874db045fb8d0279566a935af907e5bdf | /ml/ml31_1_smote.py | 18092980c0b58c542f9f3b2a28ee7a5d01e7d0a4 | [] | no_license | MinseokCHAE/Bitcamp2_new | dda7990907cb136c2e709a345eec634dfdb6ac02 | 849adb5a330b621f1c681f0b5e92005d1281a44d | refs/heads/main | 2023-08-31T03:28:18.068561 | 2021-10-05T00:48:52 | 2021-10-05T00:48:52 | 390,228,262 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,011 | py | ml31_1_smote.py | from imblearn.over_sampling import SMOTE
from xgboost import XGBClassifier
from sklearn.datasets import load_wine
from sklearn.model_selection import train_test_split
import pandas as pd
import numpy as np
import time
import warnings
warnings.filterwarnings('ignore')
datasets = load_wine()
x = datasets.data
y = datas... |
7048bdbeae69e809bcc106e122ba32eb8c5b798c | e6690120ea01806fc1384235d6161d416e180bf3 | /patch_checker.py | f792bd04d2e240fc370da5d80ebf523ee77f3291 | [
"WTFPL"
] | permissive | verybigbadboy/citrix_xenserver_patcher | 26bbcd743192aba4aed76e7ce30c094987f253e0 | 4b58577797357682a852f2cb0b9723dc7a017947 | refs/heads/master | 2021-10-20T08:10:11.602314 | 2019-02-26T21:44:51 | 2019-02-26T21:44:51 | 120,346,034 | 0 | 0 | null | 2018-02-05T18:43:20 | 2018-02-05T18:43:19 | null | UTF-8 | Python | false | false | 24,425 | py | patch_checker.py | #!/usr/bin/python
#
# Citrix XenServer Patcher
version = "1.5.2"
# -- Designed to automatically review available patches from Citrix's XML API,
# compare with already installed patches, and apply as necessary- prompting the user
# to reboot/restart the XE ToolStack if necessary.
#
# Written by: Darren Gibbard
# U... |
1197bf2fb163ec96538e32754a9e7e4ffc379d9a | e26bcfd3cae69715300c0f1454ec0ff7c153796f | /que3.py | bbbd779b7ca9c78f8c3a32623d2eefd6e1459e6d | [] | no_license | Prerna2001/ProjectEuler | e2bcf54171ac3299c41be79e50d479b0d86773ff | 2d04259a8cf0c31d9cadd04264e365c037834eee | refs/heads/master | 2022-09-29T13:28:26.644839 | 2020-06-07T09:13:38 | 2020-06-07T09:13:38 | 268,479,124 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 339 | py | que3.py | #What is the largest prime factor of the number 600851475143 ?
from math import sqrt
def primef():
arr,c=[],0
n=600851475143
t=int(sqrt(n))
for i in range(2,t):
if(n%i==0):
n/=i
arr.insert(c,i)
c+=1
return arr[len(arr)-1]
print(primef())
... |
f4c67669ebc8237a507127842a4da59c1f5c53e9 | e2b2e1bf904efa86341701204617cdac6b3d3678 | /apps/kawasaki/admin.py | 9ed450521c0c369692a20ab0a4a4e01eb6f51d24 | [] | no_license | skitta/medata | 036001a5615f0c2505de6a6f2706a2cd68db7bcf | c3cac7b7dd9a3775f6ef5d9b4214a8bf2ecd4c84 | refs/heads/master | 2022-07-20T20:36:55.791171 | 2022-07-19T07:30:59 | 2022-07-19T07:30:59 | 158,243,987 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,710 | py | admin.py | from django.contrib import admin
from .models import Patient, BloodTest, LiverFunction, Echocardiography, OtherTest, EnrollGroup, Samples
admin.site.site_title = 'Medata'
admin.site.site_header = 'Patients Medical Data System'
class BloodTestInline(admin.TabularInline):
model = BloodTest
extra = 1
class ... |
896372a4baead3025090f343241432026ccdf4c3 | dfbee5c3c63b33c903efdec3f42bbd513501fed8 | /spectralLES/demo/ales244_static_test.py | 809091958365e43e550ec72868c430de5ce2656a | [] | no_license | hijiker/teslapy | 1fb5fe7b6d8de1f3dc479f4c04cce7ae740c58b8 | 1a17ad0551b6592cefb09f6f7e6a12b69a77fd8e | refs/heads/master | 2020-03-23T03:31:49.586286 | 2018-07-12T22:56:10 | 2018-07-12T22:56:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,118 | py | ales244_static_test.py | """
Description:
------------
244-coefficient truncated Volterra series ALES model static test program
Notes:
------
run `mpiexec -n 1 python ales244_static_test.py -h` for help
Authors:
--------
Colin Towery, colin.towery@colorado.edu
Turbulence and Energy Systems Laboratory
Department of Mechanical Engineering
Uni... |
925b4c63d764a44d041bd85150abcb9effb34387 | ee34b35c969c101c7d35de58edab767530baf631 | /config.py | c3c8a9f1022140eccdd1b7deea2a0655e768e8c1 | [
"MIT"
] | permissive | bazingarj/elasticsearch-backup-and-restore-from-aws-s3 | 1c67f2e460eeeae598e7c34697d38d792c104831 | c422383fd1d08079428cd016d3d2c1ca7abd779a | refs/heads/master | 2023-01-29T12:02:05.373320 | 2020-12-01T16:42:56 | 2020-12-01T16:42:56 | 295,737,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 163 | py | config.py | ES_HOST = ['127.0.0.1:9200']
S3_BUCKET_NAME = 'backup'
S3_BUCKET_REGION = 'ap-south-1'
DEF_BASE_PATH = 'elasticsearch/staging'
DELETE_REPO_AFTER_SNAPSHOT = False
|
eecb7b4a1fc2b35271c6acce87af7c5bf1eee53e | a6e2847cbd0a87049be173cac67e7452510a3dba | /node/Pythons/sqlite3/_loader_bl.py | a672457cb59d37b6c3d80d44d6150910161ba39a | [] | no_license | luntan365/Source_Insight | ffb043b63e59c842212a0a3431f35cd494016997 | e4cbe102d0719587097c716fbad8d682b8974699 | refs/heads/master | 2022-04-19T02:18:47.837810 | 2020-04-11T12:42:29 | 2020-04-11T12:42:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,898 | py | _loader_bl.py |
import os
import re
import math
import chardet
import datetime
from tqdm import tqdm
from tensorflow.python import keras
from tensorflow.python.keras import backend as K
import pandas as pd
import tensorflow as tf
import numpy as np
import copy
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorfl... |
0a728c4b2aa82b4c2dd0a9aee9202ed597051170 | 36b1b179289224245e15deca5bb01109b9d1d1f9 | /manager.py | 7dedd93254002986da29097705743c366e51a464 | [] | no_license | Galiold/Hospital-Management | 6ceffb281f597927bf360c5e47a6ce877f0bbf15 | 5f528e8de336ab5a22b0d9a6b3b2db5aa1368baa | refs/heads/master | 2020-04-10T23:32:26.532096 | 2019-06-12T12:23:57 | 2019-06-12T12:23:57 | 161,357,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,362 | py | manager.py | import smtplib
from PyQt5.QtWidgets import QTableWidgetItem
# from PyQt5.uic.properties import QtGui
import user_management
admin_db = user_management.database_admin()
admin_cursor = admin_db.cursor()
def fill_table(table, list):
# table.clear()
admin_db.commit()
table.setRowCount(0)
if len(list) >... |
32a8da2ac958cead60715b204c2755c973df529f | 3611de495fa64e386296edaba3394ee4fbfca53e | /sorting_algorithms/selection_sort.py | 7b9de1555953663e87f5d9b932905967580c852e | [] | no_license | chsclarke/Python-Algorithms-and-Data-Structures | c84e8b4e02c30ddb873d8a826c1562bc8b8d0095 | 1d5f4c6cb03d003b1dafce57a03354ecb1c4bf22 | refs/heads/master | 2020-03-27T21:08:12.917121 | 2019-07-17T13:34:41 | 2019-07-17T13:34:41 | 147,117,603 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | selection_sort.py | # -*- coding: utf-8 -*-
"""
This is an example of selection sort in python 3.
wost case runtime O(n^2)
Copyright 2018 Chase Clarke cfclarke@bu.edu
"""
import struct
def SelectionSort(input):
unsorted = input
input_size = len(input)
sorted = []
#input size iterations
for i in range(0,input_size... |
61fda8c3e0689e57fc508978c21803561fcd2139 | c9500ad778b8521aaa85cb7fe3239989efaa4799 | /plugins/recorded_future/komand_recorded_future/actions/__init__.py | 1f1f1709f9e06901bff5a23fbcbb6f992f2ac59a | [
"MIT"
] | permissive | rapid7/insightconnect-plugins | 5a6465e720f114d71b1a82fe14e42e94db104a0b | 718d15ca36c57231bb89df0aebc53d0210db400c | refs/heads/master | 2023-09-01T09:21:27.143980 | 2023-08-31T10:25:36 | 2023-08-31T10:25:36 | 190,435,635 | 61 | 60 | MIT | 2023-09-14T08:47:37 | 2019-06-05T17:05:12 | Python | UTF-8 | Python | false | false | 1,495 | py | __init__.py | # GENERATED BY KOMAND SDK - DO NOT EDIT
from .download_IP_addresses_risk_list.action import DownloadIPAddressesRiskList
from .download_domain_risk_list.action import DownloadDomainRiskList
from .download_hash_risk_list.action import DownloadHashRiskList
from .download_url_risk_list.action import DownloadUrlRiskList
fro... |
6e1b32ed16f6f5e6fc1d5e03a04af57283648765 | 01f7684a9f455c693d20fefde5157923828a0d6d | /CollDem/lang.py | 0574e64624006c8b282c9b6c6482ad038276644f | [] | no_license | strimpa/PyCollDem | a7abc3c1d43fd17ab163a376dbd3fcfed38c366f | bb9b795502e616907da031fb1c91f1d52a0bda82 | refs/heads/master | 2021-01-02T08:47:20.893123 | 2019-06-05T11:57:24 | 2019-06-05T11:57:24 | 24,571,266 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 998 | py | lang.py | import re
values = {
'REG_CONFIRMATION': 'Please check your mail and confirm your membership.',
'REG_CONFIRMATION_SUBMITTED': 'Hey, hi %0! <br />You\'re now activated and you can log-in above.',
'REG_CONFIRMATION_MAIL': 'Hi %0 Please confirm your membership by clicking on this link: http://www.pitchf.org/register/c... |
ba95660a500e91f5e9e860827b6d691cd041a29a | 197b74a6eef348c67540d134608d72c763543c62 | /config.py | eeed60a9bcba7795a0078009a6eb3724c160d10e | [] | no_license | yannistannier/Arcface-pytorch_similarity | 517eea3c322fda0f6707250d652629c5b168413d | 0b8b6224d2e5d07099735c8d0d6c7a0dd411f67f | refs/heads/master | 2023-08-31T13:55:26.766509 | 2021-10-19T11:59:01 | 2021-10-19T11:59:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 990 | py | config.py | class BaseConfig(): # GPU 1
name = ''
backbone = 'resnet50'
classify = 'softmax'
num_classes = 900
metric = 'arc_margin'
easy_margin = False
loss = 'focal_loss'
num_feature = 512
pooling = None
margin = 0.5
display = True
train_root = ''
train_list = ''
val... |
b6b825f7c89701c09e438672afd315515df3e44b | ead21294a1e096a9a2b02f4f5eea789142dcac8a | /test/test_platypus.py | 36d7759e4a8dc94b66686b6b45ef64b81385a130 | [] | no_license | platypus-ldp/platypus | c3a9b5ef1a407e4b7f4143eceef704ef60f55121 | aa4610eb120ce99cdcebd213506599de64132149 | refs/heads/master | 2021-01-10T06:21:32.445270 | 2016-04-17T00:29:36 | 2016-04-17T00:29:36 | 55,861,466 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 3,061 | py | test_platypus.py | import pytest
import rdflib
from platypus.platypus import LdpResource, NonRdfResource
# TODO: figure out better naming/org for submodules
# vagrant fedora instance
ldp_server_uri = 'http://127.0.0.1:8080/fcrepo/rest/'
# derby-ldp
# ldp_server_uri = 'http://localhost:4567/'
# @pytest.fixture(scope="module")
# def ldp... |
42fc7c24ef004b96eec05fd4b34d520aee9bee5d | 38b5f3ad3ff93342c817b74e7b315f06dd077119 | /exec35.py | 65204eca375e05ad0f6bf2997921c4e357225aa8 | [] | no_license | xXxDevBR/Python-Exercicios | abff6e2fcc48b27db11d68ba375916413ca90edc | aaa2c1608f258023adb1d56370a9d8c596ef458e | refs/heads/master | 2020-04-16T10:50:38.294074 | 2019-01-13T15:17:28 | 2019-01-13T15:17:28 | 165,518,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 678 | py | exec35.py | print("""
[+]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[+]
| ANALISADOR DE TRIANGULOS 3.0 |
[+]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[+]
""")
a = int(input("Digite o comprimento da primeira reta: "))
b = int(input("Digite o comprimento da segunda reta: "))
c = int(input("Digite o comprimento da terceira reta: "))
if a + b > c:
... |
ffd72aa8c4d36b9efbafa0e7ec6cad072780aea5 | 8205ec026afdc464d444f6d2711074786592c00e | /loihi_tools/loihi_monitor.py | 0e2aba2767b478e7748d26fa6c2a37e3a95e5daa | [] | no_license | AI-pha/dvs_tracker_brian2 | 0c0d3e590008da49ce2ba838ef714c1024c07958 | f682a0bea9380ab488caaf862753e63a98833215 | refs/heads/main | 2023-06-25T07:34:03.004520 | 2021-07-27T11:17:03 | 2021-07-27T11:17:03 | 389,771,737 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,050 | py | loihi_monitor.py | import numpy as np
class LoihiMonitor:
def __init__(self, spike_probe, dt, t=None, i=None, pol=None, brian2_monitor=None):
if t is None:
try:
probedata = spike_probe.data
except AttributeError:
probedata = spike_probe
indices_and_time =... |
d1fb81e7c78b1baabd89a510fc0eb1cfd46ceb97 | bb77a939d49a1d6e789d655aa30dfc5a4bf4f50f | /week-2/word-search-ii.py | f918bd9cada0d92cdc8118d347c072c9516d0579 | [] | no_license | johnsanc/wb-cohort3 | 0778eacb908a79c9aca124c7800c5370649b2457 | 8faeb2c3416b19c4e1950abfb11a2c3a5651babf | refs/heads/master | 2020-06-10T04:14:56.489619 | 2019-08-19T05:56:58 | 2019-08-19T05:56:58 | 193,579,235 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,883 | py | word-search-ii.py | class Solution:
def findWords(self, board: List[List[str]], words: List[str]) -> List[str]:
words_in_board = []
trie = self.Trie()
node_pointer = trie.root
for word in words:
trie.insert(word)
for r in range(len(board)):
for c in ... |
d3ee5af4269a1671cc96df19f28281435aea2d15 | d0744257792d07b0dafddeb3313aac866a8677b5 | /testsuite/tests/properties/domain_derived/test.py | 25f8546e63bb2426fe62f5ce5a40ecf7b3abc344 | [
"NCSA",
"LLVM-exception",
"Apache-2.0"
] | permissive | AdaCore/langkit | 6446295df2a2254ebc232916e0aa481362240ea3 | 0af72a7611d7b74ed52b43782a4d564e49a80499 | refs/heads/master | 2023-09-03T08:39:19.276915 | 2023-09-01T09:18:24 | 2023-09-01T09:18:24 | 47,627,135 | 81 | 44 | NOASSERTION | 2023-07-20T13:03:09 | 2015-12-08T14:27:51 | Python | UTF-8 | Python | false | false | 1,006 | py | test.py | """
Check that creating domains with arrays of non-root entity types generates
valid and correctly running code.
"""
from langkit.dsl import ASTNode, Field, T, UserField
from langkit.envs import EnvSpec, add_to_env_kv
from langkit.expressions import Self, Var, langkit_property
from utils import build_and_run
class ... |
143cba025e648c3045d0f3a38bf5da5d1ebcf210 | aafeaee9a342f3199446e7c84aa5eca78ecf0530 | /madlib4.py | b1e81c6b8160d531e4161ae5339f729307b428e9 | [
"MIT"
] | permissive | Leorodr501/Mad-Libs | 6f29fbd28fda9486616937518c579166d948b578 | 0d619908ad4b1f73365e86345dd4023f9aa7f72d | refs/heads/master | 2020-04-04T20:02:42.255335 | 2018-11-06T00:03:41 | 2018-11-06T00:03:41 | 156,231,665 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,891 | py | madlib4.py | adjective = input("Enter an adjective: ")
adjective = input("Enter another adjective: ")
noun = input("Enter a noun: ")
noun = input("Enter another noun: ")
plural_noun = input("Enter a plural noun: ")
game = input("Enter a game: ")
plural_noun = input("Enter another plural noun: ")
verb = input("Enter a verb ending in... |
0c9ca08bdd2bb308c806c7a6abb9f16b784818c2 | f9a0f704277df1442e4db139fb8272349a3a8e3b | /env2048/env2048.py | 0218448fc4c1501c6ec1aa70b28ef5a3e18d03bb | [] | no_license | PolinaKoval/2048A3C | 06b487e43f2ca692917a4f9d94a2344287faca30 | 186b8c6b26a2e2d9848919e283a67cdb7790ab82 | refs/heads/master | 2020-12-30T15:55:11.089615 | 2017-06-14T06:50:16 | 2017-06-14T06:50:16 | 91,188,059 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,540 | py | env2048.py | import random
import numpy as np
from grid import Grid
class Vector(object):
def __init__(self, x, y):
self.x = x
self.y = y
class Traversals(object):
def __init__(self, x, y):
self.x = x
self.y = y
# env types:
# 0 - normal
# 1 - reward in [-1, 0, 1]
# 2 - finish g... |
5d7c516b06583c9d5ea68fb981ceb8e37fe7e542 | 89f726879bce7dca82c3e67841962b99f1fb9f7a | /meta_ultra/database/experiment.py | 25e12a8bc49d1009b8496249e596738cb3b2172f | [
"MIT"
] | permissive | dcdanko/MetaUltra | 2a0319ec400ce0071fe5d744bf6ce06068e11768 | 600df03dd4aaf95268bf0062de2ad3d9ac480842 | refs/heads/develop | 2021-09-26T21:11:55.048507 | 2017-09-07T02:43:41 | 2017-09-07T02:43:41 | 95,789,050 | 0 | 2 | MIT | 2018-11-02T15:04:18 | 2017-06-29T14:58:54 | Python | UTF-8 | Python | false | false | 1,893 | py | experiment.py |
from .database import *
experimentTbl = config.db_experiment_table
class Experiment(Record):
def __init__(self, name, dataType):
super(Experiment, self).__init__(name)
self.dataType = DataType.asDataType(dataType)
def to_dict(self):
out = {
'name': self.name,
... |
8fd0990306b8005f3c7249efc4fd01e6d8b92565 | 644f99bafb05a8cd3b0cee6c49098f990e7daecc | /facerecog.py | a8386c2f0c3c5bd1dc630c16738770dd8790d64a | [] | no_license | HarvianKhusnan/Face-Recognition-project | fdcbd92f2fc80e35355a5d24b5162f8bd19c9701 | 8447252554a34e8f3123fff85ced43a124595a7f | refs/heads/master | 2023-07-28T05:26:31.817609 | 2021-09-13T02:48:53 | 2021-09-13T02:48:53 | 405,806,515 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,401 | py | facerecog.py | import cv2, os
wajahDir = 'datawajah'
cam = cv2.VideoCapture(0)
cam.set(3, 640) #ubah lebar cam
cam.set(4, 480) #ubah tinggi cam
faceDetector = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
eyeDetector = cv2.CascadeClassifier("haarcascade_eye.xml")
faceID = input ("Masukkan Face ID yang akan Direkam Data... |
fc2e6c3322f9bb69252bd46662910a4b85f63fd8 | f77f5ccce1df869a7625471c9be53d039bb93373 | /clock.py | ae0b1820d4f06890fa8109835621430c3726ed77 | [] | no_license | nvblueboy/RaspberryPiClock | cb07e0fefc34dd2e0b9122902f84fff4b5acfed7 | ec6a94f0f208e16f8bb3f800f128d44b1680ec5b | refs/heads/master | 2020-05-30T07:17:11.813787 | 2016-12-15T03:57:19 | 2016-12-15T03:57:19 | 65,774,357 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,185 | py | clock.py | ## Handle the clock itself.
import time
from window import *
import weather
import calendarLib
import configuration
import news
import logger
import emailLib
class Clock():
##Possible features: clock, forecast, calendar, news, countup
##Clock should ALWAYS be enabled.
modes = ["clock","forecast","calen... |
87e2ab4975166534d88bacda1c29fe42f4736d40 | fae4bae6bfeabe4a7ca8e7d44c9e2494d2e60011 | /ffooty/migrations/0016_auto_20150810_2048.py | 990a2e0e0728af86f0f0035ece89e8a436d9ff91 | [] | no_license | danj1974/ffooty | 8cc8ffa323071d27a093946b1db97d4c9433b881 | d6c53b4da98657eec275bb4d15e000c42e44d36c | refs/heads/master | 2023-02-23T13:44:58.916985 | 2022-07-24T23:23:15 | 2022-07-24T23:23:15 | 39,729,068 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 576 | py | 0016_auto_20150810_2048.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('ffooty', '0015_auto_20150805_2154'),
]
operations = [
migrations.AddField(
model_name='player',
name... |
23f5066389d98c6734ba1daedd9c38e61dd18342 | 2b8d0aa625cb0bf838bef9ea59be3ca48c6af666 | /maternity_extended/delivery_serializers.py | 30ca0d34d5bbe80a27a6e304f5bfa1f390cf8f14 | [] | no_license | nayneshrathod/project | 7a80d54475307d217080a6540b4f750f7d975378 | cadb503fbcb393c6c6f621886a762c11e9671622 | refs/heads/master | 2022-11-09T15:13:13.322030 | 2020-05-09T18:13:58 | 2020-05-09T18:13:58 | 261,644,418 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,462 | py | delivery_serializers.py | from rest_framework import serializers
class DeliveryRecordReadSerializer(serializers.Serializer):
id = serializers.CharField()
heart_rate_1_0 = serializers.SerializerMethodField()
heart_rate_1_1 = serializers.SerializerMethodField()
heart_rate_1_2 = serializers.SerializerMethodField()
heart_rate_... |
eb520ce35fc4936778ff591d8107234b551f08e1 | 4bb231422e43201314a7ad03211e5366deefeab3 | /8_Functions/function_exercise.py | 090a2ca203f4b8b758b1614aa16498d50fda0051 | [] | no_license | cayomesquita/ciccc_102_python_algoritms | df99254c7334f8d6a02a44d790fe566d29127f3b | 03dc6fdea2c5e2c282af4be74de3e4d5f5484df6 | refs/heads/master | 2020-12-29T08:44:05.465881 | 2020-02-06T17:50:18 | 2020-02-06T17:50:18 | 238,540,929 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 636 | py | function_exercise.py | def mrange(start, end=10, steps=1):
"""
:param start:
:param end:
:param steps:
:return:
"""
num = start
list = []
while num < end:
list += [num]
num += steps;
return list
print(mrange(1, 10))
print(mrange(1, 10, 2))
# n: args
def xrange(*args):
if len(ar... |
8462ba872d560e3af45d1f9b0f609e0a62af7057 | de68ad51904a945f24f41b1d5efb270430efb25f | /tools/try_to_number.py | 3650c0d3b2d10164873db91c1cb501e9bc461a9b | [] | no_license | seangrogan/seans_python_toolbox | 43f1e0429ccb80249f04948cb7794509f311bcda | 670cee03ba654dabb89cf982d524f5db4299c287 | refs/heads/master | 2020-06-23T17:25:40.999186 | 2019-08-21T20:37:49 | 2019-08-21T20:37:49 | 198,696,813 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 495 | py | try_to_number.py | def try_to_number(value: str):
""" Takes value string and tries to convert it into
:param value: str that is a line or element of a file
:return: either the value as a string, int, or float. Whatever best fits.
"""
if isinstance(value, str):
try:
return int(value)
except... |
b3dafed4399acded2bdf60b472196532a659e267 | 9804df6110e4927932e75c09963408704c43ca3d | /douban_scrapy_fenbushi/douban_scrapy_fenbushi/spiders/douban_yinshi.py | 02cf1bc994c3242ebf59b979f109e7d7ec4ebc5e | [] | no_license | pinkfloyddd/python_spider | 1d616eff60a918a540f60ad9e53815dce8b457fd | 6becd57c19949ffed4d8bfad2075341f3d289bfc | refs/heads/master | 2020-03-11T03:12:54.400991 | 2018-04-20T04:19:42 | 2018-04-20T04:19:42 | 129,670,401 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,488 | py | douban_yinshi.py | # -*- coding: utf-8 -*-
import scrapy
from douban_scrapy_fenbushi.items import DoubanScrapyFenbushiItem
import json
import requests
from PIL import Image
from scrapy.http import FormRequest
import fake_useragent
class DoubanYinshiSpider(scrapy.Spider):
name = 'douban_yinshi'
allowed_domains = ['douban.com']
... |
537ae94cbf3103d3778df628aa2cf81ae03535ee | c16a8a348b31713ad89154507457860f6e67dcf8 | /osrs_leaderboard/leaderboard_stats/models.py | 19175b78aecfeba25dfac71e36dc6d97d4adc5ec | [] | no_license | TDEN93/OSRS_League_HS | 35abffaa226a5112f91e35af3d1449a961ba590b | f2b1f0e76114c22f0316e15ffb1c8fead759194e | refs/heads/master | 2022-12-17T10:44:50.708812 | 2020-03-29T00:29:42 | 2020-03-29T00:29:42 | 250,659,864 | 1 | 0 | null | 2022-12-08T03:55:04 | 2020-03-27T22:13:37 | Python | UTF-8 | Python | false | false | 209 | py | models.py | from django.db import models
class league_hiscores(models.Model):
rank = models.IntegerField()
name = models.CharField(max_length=100)
level = models.IntegerField()
exp = models.IntegerField() |
6f2d580e0c86b84d48d74a2d8ab2085201997ec5 | 793e810f0ed772a90152e896654ed74efe648f7c | /server/gs/gs.py | 2080185d521036a8b19b72ea2f5175953fa491e3 | [] | no_license | GavinHL/minigame | e9279ad8f5fd438fba15b4bd57ad67ce0099f995 | a1e79886575d368d1ebbc37c2db9d02e55edd0ed | refs/heads/master | 2020-12-24T18:42:26.154484 | 2016-04-18T02:21:04 | 2016-04-18T02:21:04 | 56,425,701 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 215 | py | gs.py | # -*- coding: utf-8 -*-
"""
@author : Gavin / hln3875
@create time: 2016/4/11 21:45
"""
import framework.app as app
class GameServer(app.App):
def __init__(self):
super(GameServer, self).__init__()
|
19f62c0e022b1359a2e9d8d8547cb4ddb6f6fde0 | e22adc706de69674e4c959b87acce4ba44ae2449 | /1.12.4.py | 7f2ee025f5a4bc0d1138f23045e4df6583b69097 | [] | no_license | iAnafem/Python_programming | 1d56852cd108aab1938c5f5c7b3f18cbfacaea04 | c5627fd58e0ef777e0f4ecdcc841fe78e6e15ba4 | refs/heads/master | 2020-04-23T02:02:57.666294 | 2019-02-15T08:52:15 | 2019-02-15T08:52:15 | 170,832,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | 1.12.4.py | item = input()
if item == "треугольник":
a, b, c = (int(input()) for i in range(3))
print((((a + b + c) / 2) * (((a + b + c) / 2) - a) * (((a + b + c) / 2) - b) *
(((a + b + c) / 2) - c)) ** 0.5)
elif item == "прямоугольник":
a, b = tuple(int(input()) for i in range(2))
print(a * b)
elif item... |
b63aa65a77cc9e3e3541565686525a7b04bb6bba | cdc542c2ce0ff784f4593968c98e9f213757a4fa | /base/migrations/0003_alter_todo_end_date.py | a5fd72e795a514fb5fecce7fb8c659ed45cf62c1 | [] | no_license | vaibhav0077/To-Do-ListApp-django | 95e89d366627727232316a6828179ef53b737f93 | 690d2dc47cd857dc4145cd8d56a42471fb33d5bc | refs/heads/master | 2023-08-31T12:41:52.408689 | 2021-10-29T03:20:48 | 2021-10-29T03:20:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | 0003_alter_todo_end_date.py | # Generated by Django 3.2.7 on 2021-09-13 11:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0002_alter_todo_date'),
]
operations = [
migrations.AlterField(
model_name='todo',
name='end_date',
... |
851d6d6deb2a5d394ac5acb9b26200be88809491 | 4a70b8224a9bab83a6572490bc714aa529462bb5 | /Tensorflow/Tutorials/RNN_number_sequence_tutorial.py | f4d8dc80e980e0c1de710b0e179e9cc3394dbdb6 | [] | no_license | gjsaave/Learning-Projects | 514008a4b1c8bbe1318db02f6a31de0d2d15a4c4 | 81be53a6ea9f925f091562cd1cdd7657cbd4cefc | refs/heads/master | 2020-12-28T20:30:51.815369 | 2016-10-20T02:01:58 | 2016-10-20T02:01:58 | 47,599,140 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,468 | py | RNN_number_sequence_tutorial.py | import numpy as np
from random import shuffle
import tensorflow as tf
train_input = ['{0:020b}'.format(i) for i in range(10000)]
# print train_input
shuffle(train_input)
train_input = [map(int, i) for i in train_input]
ti = []
for i in train_input:
temp_list = []
for j in i:
temp_list.append([j])
t... |
cffb0bd88b88e110939a56493a37148e2b4cfce1 | 91df952d4cbf0cc2a12119db7611074004ec4c8a | /reddit_bot/old_bots/reddit_reply_bot.py | 3dcb65da8f85f1068213e076dfba43c7d3686c31 | [] | no_license | csbull55/reddit_bot | 2fd6bcfee687dd5acef596f659aa6ce5d8c64e9e | 594c1e6ec5f4ed4680c940ad42be22d30eb70fa2 | refs/heads/master | 2020-05-31T12:46:35.589239 | 2019-07-05T17:03:04 | 2019-07-05T17:03:04 | 190,288,539 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 760 | py | reddit_reply_bot.py | """
this bot crawls every comment in a subreddit and replies
this is a framework that allows for a dynamic word and reply
"""
import praw
import emoji
from subs_crawl import subs_to_crawl
# creates instance off credentials in praw file
reddit = praw.Reddit('bot1',
user_agent='bot1 user agent',
... |
4359bf951a90daf22751a634d81e910de31ca04c | 76d546fbcfbfc5cb3c1204ef2824831638ab9e0c | /algorithmic/visitor.py | be53cfb938d9b77e5213686a9e5f13128596d487 | [] | no_license | Mortal/algorithmicpy | cfbef3447570e81cde5466168949528c43324503 | 34a92d19014a59337c069544cb038b00f0fd6798 | refs/heads/master | 2021-01-21T04:36:49.615901 | 2020-07-10T08:58:22 | 2020-07-10T09:03:29 | 31,171,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,295 | py | visitor.py | import re
import ast
import sys
from .pattern import Pattern
GLOBALS = "len min max float print set range".split()
VARS = {"sigma": r"\sigma ", "Sigma": r"\Sigma ", "delta": r"\delta ", "pi": r"\pi "}
PATTERNS = [
("float('inf')", r"\infty"),
("None", r"\textsc{nil}"),
("a // b", r"\lfloor #a / #b \rflo... |
b77ef33786e556b8ccd09f595c5f250315756a92 | 2a7ef4512245d3939f28490b0eb2f41f3b1fee39 | /src/augury/settings.py | 4942b6c8679cc140e8709f499d54a9bfdd33e35d | [
"MIT"
] | permissive | tipresias/augury | 8cbd125f41da958d35d059c53539ab6efb9fe9c7 | 7458479121c94db8e019fc8992213cc049701d9b | refs/heads/main | 2022-10-25T20:44:30.178150 | 2022-10-15T02:48:13 | 2022-10-15T02:48:13 | 196,666,777 | 5 | 3 | MIT | 2022-10-15T02:49:18 | 2019-07-13T01:57:01 | Jupyter Notebook | UTF-8 | Python | false | false | 13,401 | py | settings.py | """App-wide constants for app and data configuration."""
from typing import Dict, Union, List, Optional
import os
from datetime import date
from pathlib import Path
import pytz
import yaml
from kedro.framework.context import KedroContext
from augury.types import MLModelDict
from augury.hooks import ProjectHooks # p... |
1895f57328448be95624d3787897934c1658f6b4 | 73c01a3f052f8ef63890ec3c2e28403ad41e9a71 | /main/admin.py | 427b11bc08e4242404438689a232ee33b4d32809 | [] | no_license | Jokey90/aho | 4c007c65c819efb726a732a8f36067c5a0226100 | 8bcd41e9ef7d40f07499429f385d4fec590636f6 | refs/heads/master | 2020-03-21T22:28:36.395996 | 2018-06-29T09:25:05 | 2018-06-29T09:25:05 | 139,128,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,367 | py | admin.py | from django.contrib import admin
from main.models import *
from td.models import *
from mobile.models import *
from service.models import *
# main app -----------------------------------------------
@admin.register(Employee)
class EmployeeAdmin(admin.ModelAdmin):
list_display = ('last_name', 'first_name', ... |
6b6cf1c9d6e0c27214e5c64236eb7cf72854dd57 | 77e303d8353170f4181ab9ff66ac77cb57d46caf | /src/382A.py | dd7209c328f3206ae95e83dff9b7a01c0c747fd5 | [
"MIT"
] | permissive | viing937/codeforces | 14f689f2e3360939912e927fb830c69f7116b35c | 5bd8c2bec0e48cb2b4830c26849ea7fda447267c | refs/heads/master | 2022-09-25T19:51:03.891702 | 2022-08-15T15:32:54 | 2022-08-15T15:32:54 | 32,905,529 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | 382A.py | # coding: utf-8
left, right = [list(i) for i in input().split('|')]
for i in input():
if len(left)>len(right):
right.append(i)
else:
left.append(i)
if len(left) == len(right):
print(''.join(left)+'|'+''.join(right))
else:
print('Impossible')
|
cca0989164a83a7c08edcec6932e51a4354e4535 | df12a8d395cd650f74b79bf5df3c70fcdca60672 | /analysis/dip/models.py | 2b4b04ac45f2c2bd2ffe222cbebf814548868f3b | [] | no_license | yangwenjing/www | 65991e29cfc1de7de9c6851f4e158fa079c18407 | a1fb04c60dec20e6efbc134e1ceb7db08bc6b4ea | refs/heads/master | 2021-01-19T05:57:42.915185 | 2014-11-07T11:08:02 | 2014-11-07T11:08:02 | 26,315,680 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,010 | py | models.py | # coding: utf8
from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.db import models
from django.utils import timezone
from analysis.core.models import Database
class JobStatus:
WAITING = 1
RUNNING = 2
JOB_STATUS_CHOICES = (
(JobStatus.WAITING, '等待下次导入'),
... |
be9a8c683ec8894f5792f61d0b6be803c165ff77 | 739bfe635fb1634eee1ec94b5b5b031065696f2e | /day5/5.1.py | 6de5b61e1be77e12f94e3b6334628ecc088132b8 | [] | no_license | KashaVarya/Advent-Of-Code-2018 | a8d72190eefa925d30522cf43d60002636a1040e | 5554bf48c6952206f343ddd8a59b1d8f7e844cfb | refs/heads/master | 2021-10-08T18:58:24.544774 | 2018-12-16T13:15:27 | 2018-12-16T13:15:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | 5.1.py | s = open('input.txt').readline().strip()
i = 0
while True:
c1 = c1 = s[i].lower()
c2 = c1.upper()
sn = s.replace(c1 + c2, '')
sn = sn.replace(c2 + c1, '')
i = 0 if s != sn else i + 1
s = sn
if i == len(s):
break
print(len(s))
|
a56abe72bd97ebbcea5f0268e368149a6ebfa3fe | 610efe5c0353a45feb1082ea6a5879903993be58 | /671-second-minimum-node-in-a-binary-tree.py | e5aaf7eabdc2208e530e4e8fb6d8e61435ba2f60 | [] | no_license | ShumbaBrown/Coding-Challenges | c95f5b6195714913c3891f4961072be31fa08467 | 036930d5e4353da89c4f376db093f627cc6f9752 | refs/heads/master | 2020-08-08T09:33:59.602600 | 2019-10-23T19:55:24 | 2019-10-23T19:55:24 | 213,805,724 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,364 | py | 671-second-minimum-node-in-a-binary-tree.py | # Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. If the node has two sub-nodes, then this node's value is the smaller value among its two sub-nodes. More formally, the property root.val = min(root.left.val, root.right... |
c0a659f2e139a2ae95d608dd1d14025c99a7ae4b | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/148/usersdata/268/94109/submittedfiles/testes.py | a849aac46dbb517cd5b0397689d1910b6e24977d | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 710 | py | testes.py | # -*- coding: utf-8 -*-
#Calculadora de Combinações
n=int(input('Digite o valor superior da combinação : '))
m=int(input('Digite o valor inferior da combinação : '))
a=int(input('Digite o valor superior da combinação : '))
b=int(input('Digite o valor inferior da combinação : '))
p=int(input('Digite o valor superior ... |
ec5b5a95fd32b1a55c794c65b871e804e09ec285 | 73a0f661f1423d63e86489d4b2673f0103698aab | /python/oneflow/test/tensor/test_bfloat16_activation.py | 642994e020d0d9678e3f4856816f221821073029 | [
"Apache-2.0"
] | permissive | Oneflow-Inc/oneflow | 4fc3e081e45db0242a465c4330d8bcc8b21ee924 | 0aab78ea24d4b1c784c30c57d33ec69fe5605e4a | refs/heads/master | 2023-08-25T16:58:30.576596 | 2023-08-22T14:15:46 | 2023-08-22T14:15:46 | 81,634,683 | 5,495 | 786 | Apache-2.0 | 2023-09-14T09:44:31 | 2017-02-11T06:09:53 | C++ | UTF-8 | Python | false | false | 22,125 | py | test_bfloat16_activation.py | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... |
18127413c124aaac8712ec196d3c80db3fb38bd6 | 0129b016055daa1aaa1e9e0911f271fa7b38e27e | /programacao_estruturada/20192_186/Bimestral1_186_20192/atividade bimestral [Aline e José Oliveira]/questao_7.py | cc0e956c25774ac5baddde70606fedb6ba3b7345 | [] | no_license | rogeriosilva-ifpi/teaching-tds-course | 7c43ff17d6677aef7b42071929b3de8361748870 | 771ccdc4dc932d0ef5ce6ba61a02b5ee11920d4c | refs/heads/master | 2022-04-04T01:08:45.157185 | 2020-01-30T19:36:57 | 2020-01-30T19:36:57 | 206,439,119 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 557 | py | questao_7.py | def programa():
quantidade = int(input('Quantos números você quer digitar? '))
contador_numeros = 0
contador_pares = 0
contador_impares = 0
while contador_numeros < quantidade:
contador_numeros += 1
numero = int(input('Digite um número: '))
if (numero % 2) == 0:
... |
18e5befc03c7a10700ec18e633aa677b7e948329 | 042e74f3bc1e601fb57de1fc8d8f5bf9b7385b2b | /myproject/myscript.py | d7584907f2de96bbebe13a69e90de46b81aa3026 | [] | no_license | ZithaChitra/click_tutorial | 67d0a763bb8977a3931772c52270f2028b965089 | abbdc3e2b94a5ab9c94a8615422cfc4d17f2c5c3 | refs/heads/master | 2023-03-21T21:07:17.847371 | 2021-03-21T19:33:37 | 2021-03-21T19:33:37 | 350,099,498 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 178 | py | myscript.py | import click
@click.command()
@click.option("--name", default="no_name", help="caller name")
def hello(name):
click.echo(f"Hello {name}")
if __name__ == "__main__":
hello() |
d3115ba5b4a909bfda8c847b9581df9274719351 | b6f4709b43246b1d513419bf41d2f420b8dce367 | /src/saarti/saarti/scripts/test_polyfit_curvature.py | 72527895f2a0c170c1911eee999eebee0f20a121 | [
"MIT"
] | permissive | Forrest-Z/TAMP21 | 40ff8e2d373ea8bf44b119f12be86a0906765b72 | 7fd9d660bce9cf0ba45725533af97ea032d4b5b6 | refs/heads/main | 2023-07-10T21:20:15.565454 | 2021-04-14T07:59:11 | 2021-04-14T07:59:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,194 | py | test_polyfit_curvature.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 20 17:51:36 2020
@author: larsvens
"""
import numpy as np
import matplotlib.pyplot as plt
# state
X = -11.930850
Y = 15.874927
psi = 0.426402
# trajstar
Xtrajstar = np.array([-12.746880, -11.713000, -10.679102, -9.712725, -8.808464, -7.942084, ... |
d1bedcf478faf4cd64010d33c4afc5359e3917db | 261a151f73b2792e45ee83afaa0fc4af422a7bdf | /Lottery Probabilities.py | 64ed000186620442b2ae919d8da7dbf23165b99a | [] | no_license | mjs139/PythonPractice | 50f3f200465eff77caa5b4e8b9a0db62c3504605 | afa07fb0fe181b47dd8e5ebd85843e50ba7915f6 | refs/heads/master | 2023-04-20T10:13:19.216823 | 2021-05-14T05:00:31 | 2021-05-14T05:00:31 | 271,134,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,573 | py | Lottery Probabilities.py | #!/usr/bin/env python
# coding: utf-8
# # Logic For Mobile App For Lottery Addiction
#
# I wish to create the underlying logic for an app that helps treat those addicted to played the lottery by showing them the odds. For this version of the app, I will focus on the [6/49 lottery](https://en.wikipedia.org/wiki/Lotto_... |
3913b6358b7613ec9cb0f61c96fc1ece1afbf006 | c42599a09b882b2fd5f4a3107eb158b0244f2f8b | /game_envisage.py | 2d9685454905032dc0ae4684693471a7719f594d | [] | no_license | Ashutoshpatil99/fictional-winner | 3b7bc576cd182faca1fc2d71187581e24bdc1b59 | 7abd7f677b57bca646e407ef4c95860672079325 | refs/heads/master | 2020-03-18T10:24:23.287513 | 2018-05-23T18:25:28 | 2018-05-23T18:25:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,785 | py | game_envisage.py | a=input("hello what is your name")
print("hello",a)
print("The game is about selecting two marvel characters and two are alloted by default to fight against thanos")
print("select any marvel character from the list given:")
print('doctor strange, scarlet witch, hulk, nebula, gamora, drax, thor, black panther, spi... |
f32a514d2ee0ca525245dd687aa6cd63c8751a62 | 8121ec9eb0378192ce4f8848ab1ee32190cc955f | /my_file.py | 07e08e5ca78fb8d4f2f7a55228bc25f80583c207 | [] | no_license | DanGoss4394/my_git_project | 49e7b3a059ab2b1d15aa8f85f4131cee79fb9be4 | e0c8be80d791913d4719e69fe4cf1eb4c9d1f9cd | refs/heads/main | 2023-03-01T02:31:05.076658 | 2021-02-04T20:16:02 | 2021-02-04T20:16:02 | 335,769,011 | 0 | 0 | null | 2021-02-04T16:52:26 | 2021-02-03T22:11:27 | Python | UTF-8 | Python | false | false | 122 | py | my_file.py | print('Hi Git')
print('Hi from another dev')
def hi_there():
pass
def hi_there():
return "my change on github"
|
3477de95e6dc47fc6fdca4e9fd3c628d70722224 | 465a9ecec3c7b8cdcf464c8624a9f07231b13f84 | /src/georgedrexler/grant/interfaces.py | dbb63e2ba8e1a802b5d3ce261410ea013cfa4dba | [] | no_license | webbyfox/GeorgeDrexler.grant | 39b5c7ff21a8c3154804544d9e0cb17a1c8d77a1 | fa7dcce6f6439bec1b7d7e0c196cd9a9e6375039 | refs/heads/master | 2021-01-10T20:58:15.189789 | 2014-04-10T14:46:17 | 2014-04-10T14:46:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | interfaces.py | from plone.app.content.interfaces import INameFromTitle
class ITitleForApplication(INameFromTitle):
def title():
"""Return a custom title""" |
bbdae60e56ad044c851645d08174c6501328075b | e729beb8f2582a2b32341e9b56a03ebf9c939432 | /examples/dashboard/dashboard.py | 433803bfea8a10a5747da0aedb04aa781bb15510 | [] | no_license | sinhrks/datashader | dde35f46c6ce6da2d1bdba5287365e215495c639 | cc38e3c878242a837d2c25e027da97cd3b5c2b6f | refs/heads/master | 2021-01-15T20:19:10.473170 | 2016-02-26T06:43:22 | 2016-02-26T06:43:22 | 52,710,311 | 1 | 0 | null | 2016-02-28T07:36:39 | 2016-02-28T07:36:38 | null | UTF-8 | Python | false | false | 11,635 | py | dashboard.py | from __future__ import absolute_import, print_function, division
import argparse
from os import path
import yaml
import webbrowser
import uuid
from collections import OrderedDict
import datashader as ds
import datashader.transfer_functions as tf
import pandas as pd
from bokeh.server.server import Server
from bokeh.... |
1d05496dcfc7f86d8851fd4a5dddd4484fa7c47b | 7776849b8e4a03e8b14c056d04d1a0d62145da74 | /src/odontologia/odontologia_api/apps.py | 383b7aca78cc905e4ffe6b17364cf2843649c126 | [] | no_license | joscurt/interfazdevoz | a5b333819e341a2006c18736d7b798711c9d0d33 | 13262575d68d2445550aceee1d9c7480cb67dc97 | refs/heads/master | 2021-07-10T00:03:53.958453 | 2019-03-25T05:50:29 | 2019-03-25T05:50:29 | 153,569,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 104 | py | apps.py | from django.apps import AppConfig
class OdontologiaApiConfig(AppConfig):
name = 'odontologia_api'
|
5a0da99c080e25ffec41260b5974ddabf78d76c7 | c619ae563a83d4ae6e24030ac7c3c2c717e05577 | /naive_bayes_email_classifier.py | b0acfacaf709d1e4d6cd178531b0cfc43a2c0ede | [] | no_license | dkuldeep11/naive-bayes | 696eb10c59cd34ada6ab67356efc9bd0d9f46e3e | ff8c3d66dc3526905d55ade0ba216c5d970ecf53 | refs/heads/master | 2016-09-06T03:49:01.317795 | 2014-12-08T19:08:05 | 2014-12-08T19:08:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,860 | py | naive_bayes_email_classifier.py | class Tuple:
'''This is tuple class, whic holds the data in the format of
doc_id,feature1,feature2,....,class
'''
cnt = 1
def __init__(self):
self.id = Tuple.cnt
Tuple.cnt += 1
self.features = []
self.cls = ''
def setId(self, id):
self.id = id
def getId(self):
return self.id
def setFeatures(sel... |