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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
af4792a1fde723d262369b3d2418d7d62659b46a | a5e44a00c705ba131e40555a4e5ca0bfe45f6c52 | /computerapp/serializers.py | 9559413a7f58d47632b46edee479a6d069aba767 | [] | no_license | yb17821/eshop | 9c441eacb36e64843b830d7ed0604bd763830cef | d9d1802c991d2d93b603816d451bd5ef181bb1b0 | refs/heads/master | 2021-04-12T10:29:05.886837 | 2018-03-21T07:55:29 | 2018-03-21T07:55:29 | 126,142,860 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,269 | py | serializers.py | from rest_framework import serializers
from .models import Product, Category, Manufacturer, UserProfile, DeliveryAddress, Order
from django.contrib.auth.models import User
class ProductListSerializer(serializers.ModelSerializer):
class Meta:
model = Product
fields = ("id", "model", "description", ... |
82f7075bf9acc8c30fcae8fdc5df344db64c449f | 05cd8cd28483d3c5e0a09e357c786ef5032355a4 | /unused/z3optimize.py | a09bcaa533beb19bcafc4afc06160d89b263d67e | [
"MIT"
] | permissive | soarlab/FPTaylor | 4c4db37ca3875b904dd93344443a74108cea5f26 | efbbc83970fe3c9f4cb33fafbbe1050dd18749cd | refs/heads/develop | 2021-06-16T02:46:02.650237 | 2021-04-01T06:43:18 | 2021-04-01T06:43:18 | 19,587,954 | 26 | 9 | MIT | 2020-12-08T08:00:07 | 2014-05-08T20:34:06 | OCaml | UTF-8 | Python | false | false | 344 | py | z3optimize.py | from z3 import *
[var_x0, var_x1] = Reals('var_x0, var_x1')
var_constraints = [var_x0 >= Q(-5,1), var_x0 <= Q(5,1), var_x1 >= Q(-5,1), var_x1 <= Q(5,1)]
constraints = []
f = (Q(1, 1) - (var_x0 * var_x1))
opt = Optimize()
opt.add(var_constraints + constraints)
result = opt.maximize(f)
opt.check()
print('max = {0}'.... |
778c3d793a26611513fbfbb796f3c8f2789625fe | 621a40fa363dc0c32c96a4c8fdfe9142877e2ff1 | /ietf/secr/meetings/urls.py | 0b5993b2da2d957481eecfccf878f3aa9f32b9d3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | omunroe-com/ietfdb2 | d9c40bebe4b25059f810c70dd1370cca30cb3c36 | aeaae292fbd55aca1b6043227ec105e67d73367f | refs/heads/master | 2020-04-04T21:05:56.067430 | 2018-11-05T09:08:27 | 2018-11-05T09:08:27 | 156,273,382 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,292 | py | urls.py |
from ietf.secr.meetings import views
from ietf.utils.urls import url
urlpatterns = [
url(r'^$', views.main),
url(r'^add/$', views.add),
# url(r'^ajax/get-times/(?P<meeting_id>\d{1,6})/(?P<day>\d)/$', views.ajax_get_times), # Not in use
url(r'^blue_sheet/$', views.blue_sheet_redirect),
url(r'^(?P<m... |
8e8193bbed3fcd03cc1360f8a18ec02c8984f040 | b1571f4ee376d789b8094777fd81c4fb47a89cf1 | /AtCoder/練習/ABC/ABC150/C.py | 95dc618a574d876d6ac524d1692da38c6f2344ae | [] | no_license | hiroyaonoe/Competitive-programming | e49e43f8853602ba73e658cab423bd91ebbe9286 | 2949e10eec3a38498bedb57ea41a2491916bab1c | refs/heads/master | 2021-06-23T21:56:33.232931 | 2021-05-30T15:27:31 | 2021-05-30T15:27:31 | 225,863,783 | 2 | 0 | null | 2020-06-14T17:54:28 | 2019-12-04T12:37:24 | Python | UTF-8 | Python | false | false | 200 | py | C.py | n=int(input())
p=input()
q=input()
from itertools import permutations as per
i=0
for nn in per(map(str,range(1,n+1))):
i+=1
st=' '.join(nn)
if p==st:a=i
if q==st:b=i
print(abs(b-a)) |
0933c4c63b7f55a17a11d2871090d9ce91cd72e3 | 31ff699a97d273510785940af326a26e6480312f | /score_distribution.py | adbfabffe16ebbbb059c02755850ffe8c57c0772 | [] | no_license | alexander-mol/AdvancedSoccerEloModel | 828485d62d841058f45d4e02b9ac28c1a444c7e5 | f72e13ee3fc5edd9842e1921caed0059a1860f20 | refs/heads/master | 2020-03-21T09:22:03.387985 | 2018-06-25T02:27:53 | 2018-06-25T02:27:53 | 138,395,979 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 627 | py | score_distribution.py | import pandas as pd
import numpy as np
import pickle
from scipy.stats import poisson
from matplotlib import pyplot as plt
import utils
with open('2010-2018_patched_df.p', 'rb') as f:
df = pickle.load(f)
low = 1550
high = 1600
mask = (df.Elo_Score_Before_1 > low) & (df.Elo_Score_Before_1 < high) & (df.Elo_Score_... |
2e0797336ab14f2cbf447be8870bab7e6eafac8a | c8c415b11b162cab42cd326a7205b59b8e1acded | /src/frontend/bbs/models.py | e617bb75dd349294ceed81a927e5fb83c1bcc30c | [] | no_license | vaseline555/Blockchain-based-Electronic-Lab-Notebook | 079256740a522061071f127ad947f05f31515440 | d7e896e2b0e3d85df7df98b9a656ce2ea39496b3 | refs/heads/master | 2022-07-19T10:41:48.413832 | 2020-05-09T06:46:33 | 2020-05-09T06:46:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,748 | py | models.py | import json
from bbs import db, lm
class User(db.Model):
id = db.Column(db.Integer, primary_key = True)
nickname = db.Column(db.String(64), index = True, unique = True)
email = db.Column(db.String(120), index = True, unique = True)
password = db.Column(db.String(120))
timestamp = db.Column(db.Int... |
c4828f56af612af8a735fb766a16234353b0b50d | df794a039d03b12024cd10cf46ed20299c39b9be | /05Function/main.py | 1a049ce0109d6e16cde934ec8140f49630397a42 | [] | no_license | jonasmzsouza/python-nano-course | 99aa369b9360c649c58a1eed71ed09fd688397d6 | 4dd644b5520ea1c55de61086baa5dea30e6cdef4 | refs/heads/master | 2022-04-20T01:21:53.625987 | 2020-04-12T04:15:02 | 2020-04-12T04:15:02 | 248,893,649 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 407 | py | main.py | from function import *
myList=[]
print("Filling in...")
fillInventory(myList)
print("\nDisplaying in...")
diplayInventory(myList)
print("\nSearching...")
searchElement(myList)
print("\nChanging...")
p = int(input("Enter a number for the percentage: "))
changeElement(myList, p)
print("\nDeleting...")
print(deleteE... |
47d88ed8f1f24e5a67cffd472dde181e69111873 | 876701829c6f7685c02e8ef9e1a7bb7317e7d356 | /util_mzh/pickle_oulu.py | 9b65506c3bb9ebe9251f83ad88d2a38aa8cab6f0 | [] | no_license | AlbertoCasasOrtiz/ExpressionGAN | bb5ff3828362ff5fa327e12826d64b8ac644190d | b12bbc7a7ad48d031cfb07b68f9c51b6ea405272 | refs/heads/master | 2023-03-19T05:14:39.733384 | 2019-11-22T10:29:04 | 2019-11-22T10:29:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,569 | py | pickle_oulu.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import shutil
### OULU-CASIA ###
EXPRSSIONS_TYPE = ['0=Neutral', '1=Anger', '2=Disgust', '3=Fear', '4=Happiness', '5=Sadness', '6=Surprise' ]
# def main():
# tmpfiles = []
# keyframes = 3... |
a877f453ef16f60f652669fc765afa8b118926ab | 8691fb5d4404fc13f9f16afeaae800b75458dd1e | /ish.py | 59afadcecd44918597c388d744d91517ce15a4c6 | [
"Unlicense"
] | permissive | priya-gitTest/ish | 5422cf5134d60e88bf0edfa0f8f490b14733170e | ab441b7a8b7e9d74a4bf1cdb9bd785babecdbb9d | refs/heads/master | 2023-07-22T16:44:08.171398 | 2020-12-04T11:25:17 | 2020-12-04T11:25:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,130 | py | ish.py | from __future__ import print_function
import sys
import string
import numbers
import functools
import unicodedata
STRIP_CHARS = string.whitespace + string.punctuation
BOOL_STRINGS = {}
BOOL_STRINGS.update(
(s, True)
for s in (
"true",
"yes",
"on",
"yeah",
"yup",
... |
645c80dd964fa3148e67bd1cde88821611938a1b | 9cb50b3e6721d0af65b7e95076ff68dcab92ffa0 | /models/sift.py | 438f80e2d99e9ed3cee951f9e62fe9a9217257c1 | [] | no_license | LAOS-Y/pipeline | 3d06a188b666d5b7d44afed8406c220d05aa27d1 | 202a7cdc5704289e962dfb110347b59255ce81f4 | refs/heads/master | 2020-03-17T17:26:04.939635 | 2018-05-22T10:47:18 | 2018-05-22T10:47:18 | 133,788,157 | 0 | 0 | null | 2018-05-17T09:09:01 | 2018-05-17T09:09:00 | null | UTF-8 | Python | false | false | 340 | py | sift.py | import cv2
def toGray(color_img):
gray_img = cv2.cvtColor(color_img, cv2.COLOR_BGR2GRAY)
return gray_img
def genSiftFeatures(X):
features = []
sift = cv2.xfeatures2d.SIFT_create()
for i in range(X.shape[0]):
x = toGray(X[i])
kp, desc = sift.detectAndCompute(x, None)
features.append(desc.tolist(... |
b646eb8c449872b1feb4f942d275f02375f8a8cf | 443ed9cbf63c5d50ca3c1f294621e95744f8fdcf | /data/script.py | 7e8dd55b81d44d7b2be0a5a986beaf9d9750efc8 | [] | no_license | Ras-al-Ghul/Association_Rules_Extractor | 6b20dfb7b989f38ea54d62540fb27b8160cfe7f2 | 24fbc2e0ab1f016e76891bc7de7eb252672806b5 | refs/heads/main | 2023-04-06T10:22:45.894065 | 2021-04-14T20:57:57 | 2021-04-14T20:57:57 | 357,806,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,634 | py | script.py | import csv
def getTime(row):
#print(row[1].split(':'))
hour = int(row[1].split(':')[0])
if hour >= 4 and hour <= 6:
return "early_morning"
if hour >= 7 and hour <= 11:
return "morning"
if hour >= 12 and hour <= 15:
return "afternoon"
if hour >= 16 and hour <= 19:
... |
f3bf2a10bc2fb4eeb13da81f03fab1b004e915f0 | 288dc5bae00181c95c5bf952343314f3a216fd9a | /PythonCrashCourse/my_car.py | ca96483747be35ac959f4d8db82a4bcb47912233 | [] | no_license | joyc/python-book-test | 93cd32fcf9bf12260b1a91893971c38499347120 | 968913d7b8b3baba2b755d9edcdacef850ab4b61 | refs/heads/master | 2022-12-11T14:38:04.661344 | 2019-03-11T15:27:20 | 2019-03-11T15:27:20 | 96,122,367 | 0 | 1 | null | 2022-12-08T02:09:53 | 2017-07-03T14:57:26 | Python | UTF-8 | Python | false | false | 294 | py | my_car.py | #! python3
# -*- coding:utf-8 -*-
# @Time : 2017/06/04 13:59
# @Author : Hython.com
# @File : my_car.py
# @IDE : PyCharm
from car import Car
my_new_car = Car('Audi', 'A4', 2016)
print(my_new_car.get_descriptive_name())
my_new_car.odometer_reading = 23
my_new_car.read_odometer()
|
5333681ebe3d094326c33199efc514f47648667b | 28880071e385b568a6d23e3de23d886f796661dd | /models/queries.py | d04bc706089f324d177ea11d5bca5d41456f7d32 | [] | no_license | KulikovaLidia/analysis_server | 7944a106028f5ab8d1385831b98b005a6c81962c | 0baf6810ff5d75003e63a3f3f9b5604dbb933866 | refs/heads/master | 2022-02-16T22:51:01.585376 | 2019-08-26T20:33:01 | 2019-08-26T20:33:01 | 204,520,732 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | queries.py | from models.citizen_data import Citizen
from models.db import session
def get_one_citizen_by_unique_pair(import_id, citizen_id):
return (session.query(Citizen).filter(Citizen.import_id == import_id).filter(
Citizen.citizen_id == citizen_id)).one()
def get_all_citizens_in_import(import_id):
return se... |
ac9aafa586669233e21a3c51dabfe632ff29240f | 7889f7f0532db6a7f81e6f8630e399c90438b2b9 | /_downloads/54ca03eea0e0b5917a6d92ba870be134/double_pendulum_sgskip.py | 04c58a495b5641e842e3fd406049d6d2a81232e0 | [] | no_license | matplotlib/matplotlib.github.com | ef5d23a5bf77cb5af675f1a8273d641e410b2560 | 2a60d39490941a524e5385670d488c86083a032c | refs/heads/main | 2023-08-16T18:46:58.934777 | 2023-08-10T05:07:57 | 2023-08-10T05:08:30 | 1,385,150 | 25 | 59 | null | 2023-08-30T15:59:50 | 2011-02-19T03:27:35 | null | UTF-8 | Python | false | false | 81 | py | double_pendulum_sgskip.py | ../../3.1.1/_downloads/54ca03eea0e0b5917a6d92ba870be134/double_pendulum_sgskip.py |
e91caf99b79e5037d7ae5310b8290fc282dcefd5 | 1645386b35a734c2b5f5f53f713fc4b5a8e28d52 | /single qubit pyquil.py | 116e72e2f29154db9d2c2c5645445e56654c4365 | [] | no_license | BiCinur/Single-Qubit-gates | 7c075250bc1b22b2936584c99af2bd45ed62b3fa | 979c91fc9a533ddda0865cb32fb3d7e8b20aa775 | refs/heads/main | 2023-08-02T04:13:47.417447 | 2021-09-07T13:12:28 | 2021-09-07T13:12:28 | 403,983,483 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,598 | py | single qubit pyquil.py | import numpy as np
from pyquil import Program, get_qc
from pyquil.api import WavefunctionSimulator
from pyquil.gates import*
wavefunction_simulator = WavefunctionSimulator()
qc = get_qc('9q-generic-qvm')
p = Program(X(0))
wavefunction = wavefunction_simulator.wavefunction(p)
print("X|0> = ", wavefunction)
... |
48688372b4b28598caebf72e73ff0c5305b96746 | 2beb4fcae12cc02ca16eae0d851b626a8eebf31f | /keer_object_detection_lib/test_xby_for_od.py | fe0a02d01536d632096c49a71a9bbf10a276921c | [] | no_license | LawrenceXia2008/ICTMCGCounterfeitDetection | f06a7ddbb21ba31b4ad2c936981732be69f690c9 | b8f2e055d92c26f9c35962c85e7c1075c9635a9f | refs/heads/master | 2022-08-18T20:22:27.007482 | 2020-05-21T02:07:35 | 2020-05-21T02:07:35 | 262,740,135 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,411 | py | test_xby_for_od.py | import argparse
import os.path as osp
import shutil
import tempfile
import mmcv
import torch
import torch.distributed as dist
from mmcv.runner import load_checkpoint, get_dist_info
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmdet.apis import init_dist
from mmdet.core import results2json,... |
5d3f2b353d48f16c9d003402622bb9fd5094ff19 | 72c4cea551df0bee51c5740926b2fdb1feaf3470 | /tools/extjs_cc/js_cc.py | 9fe68dcfee8032e311f62d13ecf9d85bf6c8427b | [
"MIT"
] | permissive | joeedh/fairmotion | 2955fda64b36a634c42c3382b20f18dae189d13f | fc0bca395057cd3e78f91bcb1796b6c5eda73d2b | refs/heads/master | 2023-05-26T20:03:51.583970 | 2023-05-14T16:07:53 | 2023-05-14T16:07:53 | 34,099,859 | 1 | 0 | MIT | 2023-03-05T21:45:57 | 2015-04-17T06:13:09 | JavaScript | UTF-8 | Python | false | false | 38,276 | py | js_cc.py | #!/usr/bin/env python3
import sys, os.path, os, time, stat, struct, ctypes, io, subprocess, math, random, difflib
import ply, re, traceback
import argparse, base64, json
from js_lex import plexer
from js_global import glob, Glob, termColor
from js_ast import *
from js_parse import parser, print_err
from js_... |
a5844b0c75ec457922a48474a8967cb6d036d9f2 | 9bdd739bf282df5b10c754467272cd56e016ab72 | /HW/HW3/homework3.py | 17fd9dfce1f0ba660c3a88c96e356e70c44c1a7f | [] | no_license | isdavis/WUSTL | b637986a5b1c2407e890b42067bbb92f76e64c5a | fde73761fb9a1b9e297f8a25992f9d7b39ff8e2b | refs/heads/master | 2021-04-28T04:17:39.345243 | 2017-08-27T23:25:14 | 2017-08-27T23:25:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,299 | py | homework3.py | ##########################
# Homework 3
# Minhee Seo
##########################
import os
import re
import nltk
import urllib2
import csv
import json
from nltk.stem.porter import *
# problem 1
# a, b
os.chdir("/Users/minheeseo/Dropbox/2017_Classes/Text-Analysis/WUSTL/")
with open('nyt_ac.json') as json_data:
dat... |
ee298593445e65c7cecad25ec6de091a2ada7469 | cb32fef957aa2600dc74d9924c3c1b1c2f4424aa | /turtle_experiments/src/agent_pg_ella_turtlebot.py | 2806f7cc72d7b4f9362c0c101812b4001557b9a8 | [] | no_license | IRLL/Vertical_ARDrone | 13f7c12c28be782985e7db32c8d08b51b308e677 | 375547bca6d0e6d4f5d3a687b5c0fa0820854f6b | refs/heads/master | 2018-10-29T00:33:51.817441 | 2016-02-07T00:14:53 | 2016-02-07T00:14:53 | 35,590,265 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,266 | py | agent_pg_ella_turtlebot.py | #!/usr/bin/env python
import rospy
import time
import sys
from datetime import datetime
from geometry_msgs.msg import Twist
from std_msgs.msg import Float32MultiArray
from std_msgs.msg import Empty
from std_msgs.msg import Bool
from gazebo_msgs.srv import SetModelState
from gazebo_msgs.srv import SetModelStateRequest
f... |
32dce6af61668b8aea76c1bcf36745f45753f5fe | b18ad1b1a02621fc58515cf0102ff4c344e67c03 | /week_4/tsp/solver.py | cce428f2afc634d9b74eacb58a5e81f4bfeb1e77 | [] | no_license | CRS-Solutions/discrete-optimization-1 | 748cdf19bf819d93a097b42d62da3ccb0049cfe4 | 5a16d8a198f4afba2d5740e31d038f83a316ca16 | refs/heads/master | 2020-11-27T03:35:36.314231 | 2018-12-28T18:55:32 | 2018-12-28T18:55:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,987 | py | solver.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import math
from collections import namedtuple
from random import shuffle
from random import random
from pyscipopt import Model, quicksum, multidict
import time
import networkx
import ast
Point = namedtuple("Point", ['x', 'y'])
def length(point1, point2):
return math.sqr... |
c1adcb47281fb674dfda1fca4f50b32001349c48 | 532eab9ad95e0289de8a73b73b8235a6bfe2e2de | /misc/run_all_catchments.py | 6d088d29d0bae62ef369702a763ba860c9a8c475 | [
"MIT"
] | permissive | LukeEcomod/SpaFHy_v1 | fcd3825f242ed52d5e11dee8772e7eba0d0eeba5 | e39a8fd48ece2c6acae860e74b2cb07c2aaedad4 | refs/heads/master | 2022-01-27T14:12:01.740965 | 2022-01-14T22:06:43 | 2022-01-14T22:06:43 | 161,308,270 | 10 | 8 | null | null | null | null | UTF-8 | Python | false | false | 8,222 | py | run_all_catchments.py | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 21 12:37:40 2018
@author: slauniai
"""
import sys
sys.path.append(r'\repositories\SpaFHy')
import os
import pickle
import numpy as np
from scipy import stats
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import spafhy
from spafhy_parameters_d... |
621846c5fea3e06805b4413eb156b68032b76dab | 40c572625fd39fc91b3837c9f532bbe76a8bc937 | /Reversi/module/BlackWriteChess.py | 44db47410dd8ceaca89d94651e0f684a01749436 | [] | no_license | Xmax1231/NKUST-AI-Code | ce54dfe54c449724f47e5373b048f7e72ed588ca | 77041f96092fea90ac10e3554ec72250f98867e3 | refs/heads/master | 2022-01-29T01:34:56.374203 | 2019-06-18T06:02:21 | 2019-06-18T06:02:21 | 186,537,024 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,921 | py | BlackWriteChess.py | # -*- coding:utf-8 -*-
import os
import random
from copy import deepcopy
class BWC:
'''
黑白棋棋盤物件
'''
def __init__(self, human_color=1, checkerboard=[[None]*8 for i in range(8)], turn=1):
'''
初始化物件
human_color - 玩家顏色設定,目前還不確定如何實做得好,好像也用不到 (?)
checkerboard - 得以繼承父棋盤的棋盤狀態,... |
5f2b170aca99e4497bc62137c71aae668f468e68 | 46e4850f5de5766c93d2bd4af727e8e499acb8e0 | /optimizers/adadelta_optimizer.py | f07c6fe56cc367ac58883cfe84150f5d7867aab1 | [] | no_license | eipc16/OCR_NeuralNetwork | 32e02c6d1b96502982e4e0c58be59afa40b3b3b0 | f4c412cd70a1b516989fe5254755c810ca4e33a5 | refs/heads/master | 2022-12-14T19:53:43.852957 | 2019-12-10T19:58:03 | 2019-12-10T19:58:03 | 129,393,262 | 0 | 0 | null | 2022-12-08T06:55:04 | 2018-04-13T11:31:37 | Python | UTF-8 | Python | false | false | 1,034 | py | adadelta_optimizer.py | from collections import defaultdict
import numpy as np
from optimizers.optimizer import Optimizer
class AdaDeltaOptimizer(Optimizer):
def __init__(self, rho=0.95, epsilon=1e-8):
self._rho = rho
self._epsilon = epsilon
self._error, self._error_delta = self._init_parameters()
def calc... |
f9628f9a0f7c5eeb61a546a7c69fd843cda567b0 | 08e4f46f231ed3fcd5b3c718ded831600a037e4c | /Jirina/dc_tunnel_inversion/Tunnel_SurveyTools.py | f9118da9b8c1f9f431c1cd502f3c0c09a195563b | [] | no_license | GeoMop/geostab | d26e4d44066a56986ff68d17cb136d477e217764 | 22bc1a0cad78369ac3d4bf12252b89fe95a22d21 | refs/heads/master | 2021-07-17T14:05:46.580390 | 2020-04-28T14:25:03 | 2020-04-28T14:25:03 | 141,708,692 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,157 | py | Tunnel_SurveyTools.py |
import numpy
from SimPEG.EM.Static.DC import RxDC
from SimPEG.EM.Static.DC import SrcDC
from SimPEG.EM.Static.DC import SurveyDC
from SimPEG.EM.Static import DC, Utils as DCUtils
def lengthXY (x1, y1, x2, y2):
dx, dy = x2 - x1, y2 - y1
r = numpy.sqrt(dx**2 + dy**2)
return r
def lengthXYZ (x1, y1, z1, x2,... |
e3ffcde9cb0b210678993ffadae3fca4ec0cdb0f | 1b59d3bcc76401d86a0ea0d0e9cb60ccf9f6de5b | /tools/py/pipeline/other_actions.py | ece9f06bc986704b68ca2f311ebe7dbe56a32c4c | [
"Apache-2.0"
] | permissive | uogbuji/versa | baebe45018abed103eafdc1246d121cf7ae1907e | 9fd34102d6c04eba8890c5bba1bcbfccecda097c | refs/heads/master | 2022-05-09T11:16:51.960946 | 2022-04-19T15:37:41 | 2022-04-19T15:37:41 | 17,493,493 | 8 | 2 | Apache-2.0 | 2022-04-12T16:02:19 | 2014-03-06T21:36:26 | Python | UTF-8 | Python | false | false | 19,408 | py | other_actions.py | #versa.pipeline.other_actions
import itertools
from amara3 import iri
from versa import I, VERSA_BASEIRI, ORIGIN, RELATIONSHIP, TARGET, ATTRIBUTES, VTYPE_REL
#from versa.terms import VFPRINT_REL
#from versa import util
#from versa.util import simple_lookup
from . import context, materialize_entity, create_resource,... |
fc99c7513a47132dcab7f21dc2e5d70747cdc225 | 4f56065c06792e65ef6c4a3f07ae31d97d588175 | /Neural_Network.py | c2eae135b63a5e0989ddf83c46094b892d1d30cc | [] | no_license | zhangwanyu2020/Simple_Neural_Network | 0e9fc4e03b2135e8601b4061e68a3fc6c324d097 | bf9c20641da5903e9bd842ecff0ed1de6f7c666f | refs/heads/master | 2023-02-21T21:28:45.419434 | 2021-01-27T02:20:42 | 2021-01-27T02:20:42 | 333,277,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,451 | py | Neural_Network.py | from functools import reduce
import random
def topologic(graph):
sorted_node = []
while graph:
all_nodes_have_inputs = reduce(lambda a, b: a + b, list(graph.values()))
all_nodes_have_outputs = list(graph.keys())
all_node_only_have_outputs_no_inputs = list(set(all_nodes_have_outputs) ... |
20edae6819b6ed5043087fdbf1ec8af72c980d37 | 2c26a993ee359257d5edab3c30d7a3b58bb615a8 | /number_guess.py | d95b7e54f447ef063335dc47e58c0ed76ab3c671 | [] | no_license | benfield97/freecodecamp-projects | a3ec7add59516c7f4478da15fc65fe63bc3c3564 | 9207664771d1dbbfa71033594727bb3aaecf8bbe | refs/heads/main | 2023-03-07T05:17:26.556846 | 2021-02-21T04:21:50 | 2021-02-21T04:21:50 | 339,364,518 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 576 | py | number_guess.py | import pyinputplus as pyip
import random
number = 5 # andom.randint(1, 50)
attempts = 0
while True:
guess = pyip.inputNum(prompt="Guess a number between 1 and 50 ", min=1, max=50)
attempts += 1
if number != guess:
print('Wrong!')
choice = None
while choice != "N":
... |
c2dc249e7029270b1de504ddd7ae24e5b3feb0b0 | 0ee2afbf154dba8473d199e8252a8c659802d075 | /class_vis_new.py | 436516c399bbcc8d9bf22e86ef408ffcdce648b4 | [
"MIT"
] | permissive | MaxKircher/ssd.pytorch | cb365d0c021102e2edf3c970e62919101fe1a8ed | bf0f7d8dc205d39b2e5911ad972b83bfefbd06de | refs/heads/master | 2021-01-01T17:54:41.323427 | 2017-09-07T14:57:57 | 2017-09-07T14:57:57 | 98,196,400 | 0 | 0 | null | 2017-07-24T13:54:27 | 2017-07-24T13:54:27 | null | UTF-8 | Python | false | false | 5,175 | py | class_vis_new.py | import torch
import torch.optim as optim
from torch.autograd import Variable
import torch.utils.data as data
from layers.modules import MultiBoxLoss
from ssd import build_ssd
from torchvision import transforms
import os
import argparse
import numpy as np
import cv2
import matplotlib.pyplot as plt
# From data/VOC071... |
4f7e230ba2e006e1f4f63d356f7d4fd3fad55c06 | 11590541661d485b11896b70740bd5c24538f089 | /admin/admin.py | de65454a9453e2243e28fff0eeddd4b8d6157383 | [] | no_license | y226xie/Airline_Arrival_Data_Analyzer | 36bf304349a3e50c29f460349723d865517d3230 | 78e991653737906e6fc5cf5959c950b002846fa2 | refs/heads/main | 2023-05-05T23:00:48.365698 | 2021-05-15T07:40:29 | 2021-05-15T07:40:29 | 367,558,444 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,878 | py | admin.py | from db_operation import db_execute
from .insert import *
from .update import get_flight_update_query, get_airport_update_query, get_delay_update_query, get_cancellation_update_query
from .helper import display_column, get_command, get_table
from .delete import get_flight_delete_query, get_airport_delete_query, get_del... |
a9cbf0826636aec1062dd008b73ab385f22a30bc | d9da71b6ae64055f25e1117d227e23ee6c986ab5 | /drfunapp/drfundata/admin.py | 0ef439d583085337d17073c3b8b49d688d4bc650 | [] | no_license | Justin-W/drfunland | fd3cbcb3a8b6c3eb98759281c2f57df5b8fe2b87 | 318753100960fea57dbb63e45978ea9643580c74 | refs/heads/master | 2021-01-10T15:56:15.326828 | 2016-02-23T20:10:41 | 2017-02-21T19:27:02 | 49,288,341 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,516 | py | admin.py | from django.contrib import admin
from django.core import urlresolvers
from .models import WebResource, WebResourceType
# Register your models here.
class CommonEntityFieldsModelAdmin(admin.ModelAdmin):
list_display = ('name', 'description')
change_list_template = 'smuggler/change_list.html' # enable smuggle... |
cd89d8fc42e565fced7d38f2b7370b24509dcdb5 | f065f4bea6302378a42bdac9c2f7610b0fe62e4b | /tello/socket_test/Tello_remote_test.py | 50fe744559a67875418c9a3d2a9670540bf01afa | [] | no_license | kei1107/tello_tools | 1a97ae4b8d0ab13555ad2a99cf7ac454d75bbbfd | 4d69923f30acdbf92d1a315bb145d9dfe545081f | refs/heads/master | 2022-11-13T11:13:28.527844 | 2020-07-10T07:03:25 | 2020-07-10T07:03:25 | 215,487,467 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,969 | py | Tello_remote_test.py | #
# Tello Python3 Control Demo
#
# http://www.ryzerobotics.com/
#
# 1/1/2018
import threading
import socket
import sys
import time
tello_ip = '192.168.90.175'
tello_port = 12001
host = ''
port = 13001
locaddr = (host, port)
vid_port = 14001
vid_locaddr = (host, vid_port)
# Create a UDP socket... |
c4ec2db0b81e51580145fe588e8804a22e1ee0e4 | ad13583673551857615498b9605d9dcab63bb2c3 | /output/models/nist_data/list_pkg/g_day/schema_instance/nistschema_sv_iv_list_g_day_pattern_1_xsd/__init__.py | dbd2e1c1310bbea5accabbb72f1c2f0931eb48ea | [
"MIT"
] | permissive | tefra/xsdata-w3c-tests | 397180205a735b06170aa188f1f39451d2089815 | 081d0908382a0e0b29c8ee9caca6f1c0e36dd6db | refs/heads/main | 2023-08-03T04:25:37.841917 | 2023-07-29T17:10:13 | 2023-07-30T12:11:13 | 239,622,251 | 2 | 0 | MIT | 2023-07-25T14:19:04 | 2020-02-10T21:59:47 | Python | UTF-8 | Python | false | false | 231 | py | __init__.py | from output.models.nist_data.list_pkg.g_day.schema_instance.nistschema_sv_iv_list_g_day_pattern_1_xsd.nistschema_sv_iv_list_g_day_pattern_1 import NistschemaSvIvListGDayPattern1
__all__ = [
"NistschemaSvIvListGDayPattern1",
]
|
9af7b5309dd14eece75f7199efbd89b5b1057a72 | 2beea788417f05a2f8afcd35837209708f5aa3b3 | /src/markov_chain/spacy_text.py | 9f8de95ba591ed91d1e9da141401aeb2dcab837f | [] | no_license | lhbelfanti/twitter-news | 980474d4fa7ab8bf6b476cb796b4980f93fcc312 | d313f974ae4ffd16ee203a83bcfc9c3b5bd39ec6 | refs/heads/master | 2023-06-22T22:09:29.271673 | 2018-11-23T02:31:17 | 2018-11-23T02:31:17 | 348,140,103 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 774 | py | spacy_text.py | import markovify
import spacy
from logger import Logger
class SpacyText(markovify.Text):
dict_loaded = False
nlp = None
@staticmethod
def load_dict():
if not SpacyText.dict_loaded:
Logger.info("----------------------------------------")
Logger.info("Loading NLP module... |
9b2e2add3655d7c456db8362c02805027358d0f4 | 0ba7328b6a7989bdcd42dffb5a5eefdbccfdf1e7 | /01_uvod/kutija.py | 076e76cdb3d02ea66ea5e76fe6cf5512fd017b71 | [] | no_license | Petlja/StemSimulacijeGim-files | 1fa3978c9e514c2891b8407bb988993a1fa4653f | 17697ea08ec7ce4276e4839cc3b5de348fd423cd | refs/heads/main | 2023-05-04T17:34:02.370510 | 2021-05-26T08:55:56 | 2021-05-26T08:55:56 | 370,075,636 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 241 | py | kutija.py | from simanim import *
def setup(m):
m.x = 0
m.y = 0
m.v = 10
def update(m):
m.x += m.v * m.dt
def draw(m):
kutija = Box((m.x,m.y), 20, 10)
kutija.fill_color = '#ff8800'
Draw(kutija)
Run(setup, update, draw) |
ee686316e33ba24c88baf6de4b10f72ad436cdce | 64832dd1e64cfc6de83c5abf099461eda50f648c | /server/urls.py | 0f50514207975afcc98ff8747bf7ee356382d0e1 | [] | no_license | showzvan/mysite | d7e79e16eb8c2d3598d00d1a96fa0b1940765913 | 32826c83915a2f95440c04ed20a7800d2c343ac1 | refs/heads/master | 2020-04-27T17:05:19.143296 | 2019-03-08T09:09:45 | 2019-03-08T09:09:45 | 174,504,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,534 | py | urls.py | #-*-coding:utf-8-*-
from django.urls import path
from . import views
app_name = 'server'
urlpatterns = [
path('server_posts/',views.server_posts,name='server_posts'),
path('add_server_post/',views.AddServerPost.as_view(),name='add_server_post'),
path('edit_server_post/',views.EditServerPost.as_view(),name... |
935892f79bed75621958d9827f246f48393d12e5 | 76bea164678bf7e9aa1de5d657c27d1190df0e0f | /Forked_Solutions/love_letter_mystery.py | 4f7d0dcefa3d822a0b06a03d6822b213db2c77c0 | [] | no_license | nukarajusundeep/myhackerrank | d739799102ad9139e87b69c41a5295110264e27d | dff6086c39c8d826251b5510bbb093621bf6ac76 | refs/heads/master | 2020-03-23T17:45:09.941280 | 2020-01-28T08:35:53 | 2020-01-28T08:35:53 | 141,873,395 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,010 | py | love_letter_mystery.py | """
James found a love letter his friend Harry has written for his girlfriend.
James is a prankster, so he decides to meddle with the letter.
He changes all the words in the letter into palindromes.
To do this, he follows two rules:
He can reduce the value of a letter, e.g. he can change d to c, but he cannot chang... |
5b1c19d865cba3143e35f04707be65af5d2fa2f6 | 0ee42b307fc252acabc1acba23300b8b51184ecb | /CreateAltTimeSeries.py | 57a620b0667919d46ab120dd2aa50b55d3268a17 | [] | no_license | KimDube/Masters-O3-Aerosol-Temp | 5689a1b9fad1d5a12672e7e31ce44e630065d106 | 38e16adea952ffdd1ba504e36cf557471e944fbe | refs/heads/master | 2020-03-20T15:08:57.122807 | 2018-08-21T20:38:49 | 2018-08-21T20:38:49 | 137,504,613 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,461 | py | CreateAltTimeSeries.py |
"""
New improved (way faster) version of anomalyTimeSeries_V3.
Contains functions for loading OSIRIS data that has been downloaded from sql
database, and for getting daily anomalies.
Author: Kimberlee Dube
July 6, 2017
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
im... |
6cd57f5433b59b611b83d089b7bc67967ae22947 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /BDcaZaqCuBCczeKZL_2.py | a8025e3056a0989bfeaa1bd7282ad71370276d95 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 99 | py | BDcaZaqCuBCczeKZL_2.py |
def arrow(n):
return ['>' * i for i in range(1, n+1)] + ['>' * i for i in range(n-n%2, 0, -1)]
|
60884c2b00e7cef154c5348439a2cc5e40011520 | f9b9608fb289af11e484f433f58effc32d864584 | /flask/preprocessing.py | 8773eba90c1596e4f9df5e2f13cf111cd8d05630 | [] | no_license | hcpmiyuki/hukuzakuna_keisan | 885ca0be5d45b4dc7f31b4bf9a3176941d80d25e | e8b41ee28bfa1b05f1d28d4b12f9ae0cbf39ddd9 | refs/heads/master | 2021-06-16T02:30:14.976247 | 2021-05-25T12:24:09 | 2021-05-25T12:24:09 | 203,134,289 | 1 | 0 | null | 2021-03-20T01:27:58 | 2019-08-19T08:48:19 | Python | UTF-8 | Python | false | false | 2,001 | py | preprocessing.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import mojimoji
import re
def preprocessing(line):
line = mojimoji.zen_to_han(line)
line = line.replace(" ", "")
return line
def validator(line):
listed_line = list(line)
num_pattern = ["0" ,"1", "2", "3", "4", "5", "6", "7", "8", "9"]
symbol_patt... |
f078fa91f0b0563d092908da9607edb6759123a3 | 63774aa3c5a543344f1b7e511ae66df769bbaff1 | /quiz/migrations/0001_initial.py | 4cb2fdb338afa0ab22a86e51623e448601350f41 | [] | no_license | saranya1306/my-quiz | 5357362d5cd1cc49b7e9784031b28715b36eb16f | 0fde9a6dfdb2a3a64f22e2586ac6cff3fbc9f243 | refs/heads/master | 2021-09-28T05:00:08.855707 | 2020-10-06T11:37:55 | 2020-10-06T11:37:55 | 242,341,877 | 0 | 0 | null | 2021-09-22T19:37:00 | 2020-02-22T12:57:54 | Python | UTF-8 | Python | false | false | 1,816 | py | 0001_initial.py | # Generated by Django 2.2.3 on 2020-02-22 14:32
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Answers',
fields=[
... |
cac14d07d6ff64c6f5a7c2b58774cb50b9b3e1ec | 599490ccdc447f6ff6261d80cf4135b985e85d00 | /env/Projectile_Plot.py | 76121b5a6164cd94fdc8598d265739bd0fbe37fb | [] | no_license | nboehringer/Projectile_Motion | 9c47b58e2b5017f9bd79562185582bf30a778d1c | 435d15ff3bc8bbb7cdd6d13c9878df07cc8fae50 | refs/heads/master | 2022-11-11T08:04:31.261897 | 2016-12-07T23:19:37 | 2016-12-07T23:19:37 | 75,773,775 | 0 | 0 | null | 2022-10-17T14:21:02 | 2016-12-06T21:37:35 | null | UTF-8 | Python | false | false | 5,116 | py | Projectile_Plot.py | from tkinter import *
from tkinter.ttk import *
from tkinter import messagebox
from math import *
import matplotlib
import matplotlib.pyplot as plt
matplotlib.use("TkAgg")
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
from matplotlib.figure import Figure
def makeform(root, f... |
cf75666157915fa1bfe0b84744cb9f59009c17c5 | fd04bbec4a7fe406ddcb8bd9e080389a2b3a5518 | /src/TruePeopleSearch/transforms/full_search.py | e305eafc724c4c069c4791be751244ed1c134152 | [] | no_license | mdheller/TruePeopleSearch | 63f420ae2de11269cf74af0cb2668d54d4042a03 | e154de03aff93a57fe73e570a8a78daf4dcebe4f | refs/heads/master | 2021-10-01T14:52:19.953913 | 2018-11-27T02:52:48 | 2018-11-27T02:52:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,472 | py | full_search.py | from canari.framework import EnableDebugWindow
from canari.maltego.entities import EmailAddress, Location, PhoneNumber
from canari.maltego.transform import Transform
from .common.entities import TruePerson
from .common.scrapper import scrape
__author__ = 'thehappydinoa'
__copyright__ = 'Copyright 2018, TruePeopleSear... |
076329ef68d21337bac27adaa32e2908da759176 | b254024479a72bd8d330622e5bb32e2e7b400a1e | /test.py | d07ed3d08f2a985eff322b98275d153b0762cef1 | [] | no_license | Ratul-code/Cporgramming-pyproblem | 4b7d4aee609ddeb1b32d2cd246889d8072020ee0 | f4e3e151d58745881c2dadede0c91cb1876ab49a | refs/heads/main | 2023-02-07T04:46:55.620033 | 2020-12-29T21:27:24 | 2020-12-29T21:27:24 | 325,390,240 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,244 | py | test.py | from functools import reduce
import math
# num="52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91"
# num=num.split("\n")
# num=[list(map(int,x.strip().split(" ")))for x in num]
# # print(num)
# k=[]
# for i in range(17):
# sub=num[0][i:i+4]
# multiply=reduce(lambda a,b: a*b,sub)
# k.append(multipl... |
5feb4db39d30315ca0d9bc44711704146c8f7032 | 6a050902ef7e26906dc5d7de4c2b0c363b7ba5f4 | /WebEmpresarial/contact/views.py | cfcb5432abfbce7771f6c107a34e246a19d015f1 | [] | no_license | WebplaygroundPython/web-empresa-cursodjango | e5668ac2db4d99676daf55123a3c16870c54b79d | 430a4b8669b973010dbb0373735a71f96721dc29 | refs/heads/main | 2022-12-29T01:45:30.152131 | 2020-10-15T23:31:40 | 2020-10-15T23:31:40 | 304,412,455 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,309 | py | views.py | from django.shortcuts import render, redirect
from .forms import ContactForm
from django.urls import reverse
from django.core.mail import EmailMessage
def contact(request):
#print("tipo de petición: {}", request.method)
#en el primero realizamos la instancia para que se cree el formulario
contactform = Con... |
425dbe925e5c808ac79aed9673e412e21749f114 | 26b59b905039e3d3e8609a444862616c8b493f40 | /maki/utils/__init__.py | b903a2d90e006893acb9a22adeee3355519e889b | [] | no_license | cyraxjoe/maki | 1971df2bfbed3af979ab220df39c8b60b9ee9470 | 48dfc55ccfb875346a9c9bb2ddcffbb37c7294a4 | refs/heads/master | 2023-08-17T17:59:45.323034 | 2022-07-12T07:40:45 | 2022-07-12T07:40:45 | 4,443,803 | 1 | 0 | null | 2022-09-16T18:03:11 | 2012-05-25T09:55:30 | Python | UTF-8 | Python | false | false | 1,429 | py | __init__.py | import re
import pprint
import cherrypy as cp
import unidecode
def log(message, cntx="DEBUG", tb=False):
if isinstance(message, str):
cp.log.error(message, context=cntx, traceback=tb)
else:
cp.log.error(pprint.pformat(message), context=cntx, traceback=tb)
def in_development():
return cp... |
1e5f318e23ae83594402f337bc8dbe2a4faf5e07 | 1d140e0ee574eea4a1c521ac9017e32ea889c438 | /graphics/cast/geo.py | 3a609d19dc3ed53b8c41b4f3d3618c98086b0a04 | [] | no_license | code4tots/github | d2a6535c1fdc5d1e92e2c9ce26814ac22fcbcb50 | 6a2de04a859113a2b1a7d7039d16f1e641d3f239 | refs/heads/master | 2020-05-21T12:08:51.242984 | 2012-04-10T23:02:41 | 2012-04-10T23:02:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,084 | py | geo.py | #!/usr/bin/python
# 3.29.2012
# Ray casting model.
class Sphere:
def __init__(self, centerVector, radius):
self.c = centerVector
self.r = radius
class Vector:
def __init__(self, coordinates):
self.c = tuple(coordinates)
def __sub__(self, other):
return Vector(tuple([ x ... |
6d16222bcdfc214e00216459b13d1120c859f49c | 0a4e87a97f56cfce46132f400197268f0bb64796 | /tests/test_onlinestudy.py | 219495916533de261c964a6aff370c034edb3e38 | [
"MIT"
] | permissive | christophmark/bayesloop | be5bef05a398b4f27e01710f84d46e23ef3a1f2e | 6ea3b88c2eee330858b14566aa170402e2ca7f0a | refs/heads/master | 2022-12-21T20:04:02.159545 | 2022-12-20T17:09:32 | 2022-12-20T17:09:32 | 41,474,112 | 134 | 28 | MIT | 2022-08-24T08:40:52 | 2015-08-27T08:11:41 | Python | UTF-8 | Python | false | false | 4,081 | py | test_onlinestudy.py | #!/usr/bin/env python
from __future__ import print_function, division
import bayesloop as bl
import numpy as np
import sympy.stats as stats
class TestTwoParameterModel:
def test_step_set1TM_0hp(self):
# carry out fit
S = bl.OnlineStudy(storeHistory=True)
S.setOM(bl.om.Gaussian('mean', bl.... |
400e448de23bcc87640b688a5c745dfa334da72c | c145c32f5dd1ecef017b9ee164dbe51c1d220a67 | /src/models/users/user.py | 89b357f9da264e448c7200418615abc2a1964579 | [] | no_license | heftybr0k3r/price-alert-service | 398eb8cb124ded77ac5c0a6493fb92375c64e3d2 | 38c9d8eec0a06aeefc35d607073b56a951c2f40d | refs/heads/master | 2020-04-01T04:42:25.293245 | 2018-11-05T16:01:53 | 2018-11-05T16:01:53 | 152,874,272 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,550 | py | user.py | import uuid
from src.common.database import Database
from src.common.utils import Utils
import src.models.users.errors as UserErrors
from src.models.alerts.alert import Alert
import src.models.users.constants as UserConstants
class User(object):
def __init__(self, email, password, _id=None):
self.email =... |
637cb8ab521d9ec671e9ee64d93dd2fac5303bad | e8c61bd283d196895aa7581c16c4c9a823920c96 | /install/robot_gazebo/share/robot_gazebo/launch/robot.launch.py | b0eeedc38587f86056e7dd3668e5287d5ea6c4a4 | [] | no_license | brenda1602/robot_init | 59de93d1aca1cfb9b7fd41cc01c5206d41a5b36a | 90d1d3ec1117f9b44fba77d2f21ff46a623264cc | refs/heads/master | 2022-12-23T16:08:04.063275 | 2020-09-24T14:45:49 | 2020-09-24T14:45:49 | 296,606,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,685 | py | robot.launch.py | import os
import sys
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import DeclareLaunchArgument, ExecuteProcess, IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDesc... |
953ccc875003038a561e4ff2e43d96102c0ce6e8 | 394300978b40692d1983dc2f0d497e6eff1ac29e | /images/models.py | 54f18544dec20242970731dd926b4034e66769bc | [] | no_license | shantanu-tomar/picup | 9118aa93488087bd24374c16aadb4d208eaecd6f | 1f1dfd792f4e7b69a8f4472963c818ccc0baddc3 | refs/heads/main | 2023-02-09T05:48:00.956725 | 2021-01-02T08:26:34 | 2021-01-02T08:26:34 | 325,438,837 | 0 | 0 | null | 2021-01-02T08:26:35 | 2020-12-30T02:52:21 | Python | UTF-8 | Python | false | false | 294 | py | models.py | from django.db import models
UPLOAD_FOLDER = 'uploads'
class Image(models.Model):
image = models.ImageField(upload_to=UPLOAD_FOLDER)
uploaded_on = models.DateTimeField(auto_now_add=True)
def get_image_name(self):
return self.image.name.replace(f"{UPLOAD_FOLDER}/", '')
|
e4fdcbc1074c6d1caf7a5f40032db20f7f529f73 | 3993718ac24969dcaca91c1a3cbdd593fc576aa8 | /misc/plot_1d.py | 73236ea78be7e6e65b1a8a53c94d72fe73746e49 | [] | no_license | GaryQ-physics/magnetosphere | de7e36fcf446d95b7490b63ef222a5f87e3ac857 | 95b64bfaeff2b1ac1db12e4bfad585622c2a7c23 | refs/heads/master | 2021-08-19T20:34:00.998083 | 2021-07-02T19:18:00 | 2021-07-02T19:18:00 | 238,003,736 | 0 | 1 | null | 2021-01-07T04:16:45 | 2020-02-03T15:58:26 | Python | UTF-8 | Python | false | false | 1,533 | py | plot_1d.py | """
Creates a plot of a kameleon variable along a line trough the origing
on the x-axis is (signed) distance from the origin of a point along the line
on the y axis is the kameleon variable at that point
"""
import sys
import os
import numpy as np
import matplotlib.pyplot as plt
sys.path.append(os.path.dirnam... |
7e98c9edf5f3f3ec00c892a66bbfaca173dbddf7 | 336697b71cf04248d903913bd1d8606424c36f8b | /app.py | 4c9198697c1a077efadca18962fa917e1d0461a9 | [] | no_license | russhp/Mars_Scraper | 4ff2fa7f9dacc7354eb5cecd7d24b9f4f3787ec5 | d9e80699af12032b1839b3f3133f74ad1f95e6a1 | refs/heads/master | 2020-05-15T08:21:13.570136 | 2019-04-18T21:18:39 | 2019-04-18T21:18:39 | 182,158,528 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,382 | py | app.py | from flask import Flask, render_template, redirect
from flask_pymongo import PyMongo
import scrape_mars
app = Flask(__name__)
# make client
mongo = PyMongo(app, uri="mongodb://localhost:27017/mars_app")
@app.route('/')
def index():
# run query on mongo database containing scraped results
query = mongo.db.ma... |
218ec407cc25baa5bd22d75d66fba8997f0bae0c | a5d9ed85dbe2031c064a038effe80cb3687d19b1 | /watcher.py | 7dbf9cc8f94e9a0c52674a4eada3de5d23288b70 | [] | no_license | snmaynard/TVWatcher | a8d6b6817f711e54d57b51c63e52c7eab0e38324 | a9092e26290a22fb24f71b6ab26b4f407f18139b | refs/heads/master | 2021-01-25T05:22:06.272616 | 2013-08-31T20:00:00 | 2013-08-31T20:00:00 | 2,817,273 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,566 | py | watcher.py | import sys
import ConfigParser
import os
import re
import shutil
import errno
# Configuration read
config = ConfigParser.RawConfigParser()
config.read('/share/HDA_DATA/CastgetStuff/watcher/watcher.cfg')
# Globals definition
filename = None
individualMode = False
testMode = False
deleteMode = False
des... |
364c7781f74a3b130982b7d7eb39166966399e6c | 96a1cb20fc1530386955a4e6be8219278625b7a0 | /products/migrations/0003_auto_20201006_1322.py | c27d85423ab70004be0bd9ab65ee76a57cf271e0 | [] | no_license | marciodegan/dj-manager | b01e7781d2c744a51abcadd0c515ca409c75afbc | 7389d7fd44e6ede4d12ffa2e2c2f5858fd3fb9a5 | refs/heads/master | 2023-03-29T09:52:44.069141 | 2021-04-01T15:09:44 | 2021-04-01T15:09:44 | 302,731,861 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 700 | py | 0003_auto_20201006_1322.py | # Generated by Django 3.1 on 2020-10-06 16:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0002_auto_20200930_1906'),
]
operations = [
migrations.AddField(
model_name='product',
name='ref',
... |
bb42df55bb6791e70b2c84bf674db0f262ea5984 | d13f0bbf1ff212012f33e2217af07c301d51ad0c | /web_pagedetails/views.py | 6bdf7358ac820458d3dc440885f90f4f4c2388df | [] | no_license | ShawnTaylor1969/iko_website_22 | bccef12709b343523c3b55c315edad36ea877d3e | 1e9a887a66af4f7d0a807daef7cae250e57251e0 | refs/heads/master | 2022-12-11T01:39:33.273691 | 2020-09-04T03:48:12 | 2020-09-04T03:48:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,010 | py | views.py | from django.shortcuts import render, redirect, get_object_or_404
from django.urls import reverse
from api_pagedetails.models import PageDetail
from api_spaces.models import Space
from .tables import PageDetailTable
from .forms import PageDetail_CreateForm, PageDetail_EditForm, PageDetail_ReadForm
from django.http impor... |
6ad6984bdc9b8a0e52af09dba686ee8e7a6cc897 | 2689ad3b990058fe26eaa376c3d45d666b3d23f5 | /A11/chart_nflx.py | 57ae8fe371a98e3b273f6dff033b85c93995f801 | [] | no_license | gangagtm/ciss441 | 70f29cf5c48dea1a7bf2e9b63e8eb24cceb1f5de | c3cc5f9f4265cd1c7b010362e05fae7a8d572b9c | refs/heads/master | 2020-12-12T12:36:50.938694 | 2020-04-20T02:33:30 | 2020-04-20T02:33:30 | 234,128,015 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 417 | py | chart_nflx.py | import datetime as dt
import matplotlib.pyplot as plt
from matplotlib import style
import pandas as pd
import pandas_datareader.data as web
style.use('ggplot') #set a plot style
start = dt.datetime(2000,1,1)
end= dt.datetime(2016,12, 31)
df= web.DataReader("NFLX", "yahoo", start, end) #create a pandas dataframe
pri... |
e35dccf97cd9b0b97c241b00912a93a58407d42d | 993febd4c18508a1cb0476e7b60611a3a7efb1f2 | /M6HW1_RandomNumberFileWriter_Syed.py.py | 88124040026887b3fae7738b124f63987d0da955 | [] | no_license | rozinasyed/cti-110.. | c91301578a8b3e1cc1f27f3162cce1b0c67420d3 | 3b5b0a0f47e1d04274a887a64b1342884f05fcb1 | refs/heads/master | 2020-04-05T13:39:10.813626 | 2017-07-20T00:29:50 | 2017-07-20T00:29:50 | 94,940,788 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 709 | py | M6HW1_RandomNumberFileWriter_Syed.py.py |
# Random Number File Writer
# 7/12/17
# CTI-110 M6HW1 - Random Number File Writer
# Syed
#
import random
random_numbers = open('numbers.txt', 'w')
def main():
writeFunction(getRandom())
def getRandom():
qty_numbers = int(input('How many random numbers should be writer to the file... |
5d89448e9fd21bdb167d6d91e78f361b53387660 | 61f471bee2a668e20a0adb7438c3704a43cc6145 | /demo.py | d944169f25311a20b49262b9491c598152273aff | [] | no_license | sai-shi/Sentiment-Analysis-of-restaurant-reviews | 253144f6a49417d051f182273a9b1310d8df5553 | c345ddb9dbc5b94c5592de3c88d0e33e365ba705 | refs/heads/master | 2022-07-19T14:24:05.148270 | 2020-05-15T16:18:59 | 2020-05-15T16:18:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,236 | py | demo.py | import tensorflow as tf
import numpy as np
import pandas as pd
import utils
import random
import sys
import argparse
from nltk import word_tokenize
import config as cf
import preprocess as pp
# hyperparameters
batch_iterations = 11000
batch_size = 32
full_iterations = 100
learning_rate = 0.01
reg_eta = 0.001
# dimens... |
5ac6ac28fa40ae5bd7ec127380c2d31cfadb619a | 06c37116778b43d146838dcd89090d7946b18d99 | /symfem/version.py | 3f3a31511b8ed929064c7468e54fcc1277733180 | [
"MIT"
] | permissive | sigvaldm/symfem | cf27ba3f82c91d4c5e8aeaa620b1235d3e8f57c4 | 5b51748a49015bb37839d1ca39bb26348b33936a | refs/heads/main | 2023-07-08T14:00:27.118054 | 2021-08-10T11:36:52 | 2021-08-10T11:36:52 | 394,629,332 | 0 | 0 | MIT | 2021-08-10T11:36:04 | 2021-08-10T11:36:04 | null | UTF-8 | Python | false | false | 44 | py | version.py | """Version number."""
version = "2021.7.6"
|
0381c700fdb55efecce14577c3e1cc2e240fe636 | 842b9321dc788314eac30b0f37ab4b5d05265196 | /main.py | 368cc981b8527855d019aa1c81274b5a4954d5a1 | [] | no_license | Aryan-Naveen/AFRL_dataFusion | 65f49898a788c302b37e3d8d125479ddbc5b290c | eab02cf2551e2c9ce1bdb6fcd8e8849ff3f4f3cf | refs/heads/master | 2021-04-24T00:54:10.059041 | 2020-08-31T18:35:53 | 2020-08-31T18:35:53 | 250,047,662 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,954 | py | main.py | from tools.generateGraphHypercube import generateGraphHypercube
from tools.gaussianDistribution import sampleMeasuredSensorFromTrue
from fusionAlgorithms.centralizedFusion import centralizedAlgorithm
from fusionAlgorithms.covarianceIntersection import covarianceIntersection
from fusionAlgorithms.ellipsoidalIntersection... |
b3d89d84cb628334337fd862268f1d64d5074544 | 314cf05e7acdfb2b83bf4a56de4ee65310bd28f2 | /hstest/outcomes/outcome.py | c67591c68d7bc625d39076402f73f62e24da1961 | [] | no_license | hyperskill/hs-test-python | 9f0201904cb68f3eb35275bb0c3b9bb70164a1e7 | 260313395d0534d148738e031753eb8f60de2e13 | refs/heads/master | 2023-05-10T17:49:26.400853 | 2023-04-26T11:49:52 | 2023-04-26T11:49:52 | 214,279,373 | 20 | 7 | null | 2023-04-26T11:49:53 | 2019-10-10T20:28:03 | Python | UTF-8 | Python | false | false | 4,996 | py | outcome.py | from hstest.common.reflection_utils import str_to_stacktrace
from hstest.common.utils import clean_text
from hstest.dynamic.output.output_handler import OutputHandler
from hstest.exception.outcomes import (
CompilationError, ErrorWithFeedback, ExceptionWithFeedback, WrongAnswer
)
from hstest.exception.testing impor... |
0bc20dadcf91e775105ccfda0e787a7fb63ec2e2 | 3a45a146e21a1b0d03cbafd25dddf1d6e5f7e932 | /camera/docs/metadata_helpers_test.py | 4264c6e99a3bc9208116cdb5d01b1fcc5918e2f1 | [
"Apache-2.0"
] | permissive | AospExtended/platform_system_media | 1270d2fa6a12d9e6517f5da6077103ca9f95cb0a | 679ee16dff10f90b04db944d7c94514b5d932d88 | refs/heads/8.1.x | 2021-07-09T16:19:38.393169 | 2018-09-05T21:06:05 | 2018-09-05T21:06:05 | 78,527,852 | 0 | 13 | NOASSERTION | 2019-05-30T12:59:33 | 2017-01-10T11:36:04 | HTML | UTF-8 | Python | false | false | 7,852 | py | metadata_helpers_test.py | import unittest
import itertools
from unittest import TestCase
from metadata_model import *
from metadata_helpers import *
from metadata_parser_xml import *
# Simple test metadata block used by the tests below
test_metadata_xml = \
'''
<?xml version="1.0" encoding="utf-8"?>
<metadata xmlns="http://schemas.android.com/... |
0c5605f586ff89ca6a06e71e2df776a5b5668d0c | 2da507921e5a9ec3161a68525c1d136b25516f00 | /Find Right Interval.py | 211f395fcdcd2b9e7f6838df18a107fec09177e0 | [] | no_license | lfdyf20/Leetcode | 0de5c0c3f83acd99ba2d32a46f66a60cecae238c | 11c8fc663888b48b5417256aab1bf872190267ba | refs/heads/master | 2021-08-15T03:08:18.825773 | 2021-07-28T02:49:43 | 2021-07-28T02:49:43 | 71,601,758 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 691 | py | Find Right Interval.py | from collections import defaultdict
class Interval(object):
def __init__(self, s=0, e=0):
self.start = s
self.end = e
from bisect import bisect
class Solution(object):
def findRightInterval(self, intervals):
"""
:type intervals: List[Interval]
:rtype: List[int]
"... |
e2ca6fbbef320c38c25846bbac79b2f6c7d08e0d | ef89f68b446cf673f6ad13b20243099f46a1f7bd | /lib/process.py | 1c56f993b9c0bc4469d7e0f891c220e17f3030b8 | [] | no_license | cblh/forioe-py | 03d9b9d1f78dc333e8fbbddaadb89f2fe4cdd930 | c5ab00d44644413b33ecbdda93867b179ba740bd | refs/heads/master | 2021-01-19T08:49:19.417869 | 2015-04-22T03:34:25 | 2015-04-22T03:34:25 | 34,366,619 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,747 | py | process.py | # -*- coding:utf-8 -*-
import models.db
import datetime
import lib.pxfilter as pxfilter
import time
import smtplib
class Process(object):
# def __init__(self):
# self.M = models.db.base()
# self.M.db_name = 'process'
# self.stuid = studentid
def process(self, start_time, end_time):
... |
80ef5d31999d8cd677c606a883284cdf299f0a68 | 638e02285ae60287bf32f562480756ae14836727 | /pytracer/volume/volume.py | 2a13f79e25c94f08e8912f36449ac89849c125a5 | [
"MIT"
] | permissive | zjiayao/pyTracer | c85c90d9320c910ccb1ca590df61555260f10d5d | c2b4ef299ecbdca1c519059488f7cd2438943ee4 | refs/heads/stable | 2023-07-27T09:13:45.455266 | 2020-05-04T05:44:29 | 2020-05-04T05:44:29 | 98,175,937 | 11 | 3 | MIT | 2023-07-06T21:15:54 | 2017-07-24T09:54:12 | Python | UTF-8 | Python | false | false | 10,929 | py | volume.py | """
volume.py
Model volume scatterings.
Created by Jiayao on Aug 7, 2017
"""
from __future__ import absolute_import
from abc import (ABCMeta, abstractmethod)
from pytracer import *
import pytracer.geometry as geo
import pytracer.transform as trans
__all__ = ['VolumeRegion', 'DensityRegion', 'HomogeneousVolumeDensity... |
2268f67768d398091d1712e5b5f4c25454e7b10b | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/show_cts.py | 4eabad51223dbdd502a3689e1a47ae08fbb34c0f | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 167,441 | py | show_cts.py | import re
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import Optional, Any
from genie.parsergen import oper_fill_tabular
# ===================================
# Schema for:
# * 'show cts sxp connections brief'
# ===================================
class ShowCtsSxpConnectionsBriefS... |
d5a5a37a3c3b4998836f5a50e90b0af46070174e | 3074e1a44f4de0f4a7ee1537d05fb594035f816e | /resnet_predict_plt.py | 12f85b1073f6f5da3815c8ef34f83cf6260814d8 | [] | no_license | YIIIIIACH/RESNET_TRY | b00fc160d75da388d890bc81db7f7a9358698887 | dea87433ca7eb291bda488cbbd25f970423b6fde | refs/heads/master | 2020-07-29T18:51:45.877532 | 2019-09-22T05:47:34 | 2019-09-22T05:47:34 | 209,922,229 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,346 | py | resnet_predict_plt.py | import tensorflow as tf
tf.enable_eager_execution()
AUTOTUNE = tf.data.experimental.AUTOTUNE
import pathlib
import os
import random
import json
from os import listdir
from os.path import isfile, join
from tensorflow import keras
from resnet import small_resnet
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # block the war... |
0bd19cf64f947cdaf3e879cc38bc4a9e611e24d7 | f89ec93f7d37b6d46dfbc45ed4e786a667b76ac1 | /Software/lora.py | 5a47d6933a24af7ed7901cc1a346b3dd92259f8d | [
"MIT"
] | permissive | Firas-al/Applied-IoT-1DT305 | 99f912f1bda23ffdf19db8a53ac800a03ea64f39 | 891f0f8c059692489a6179df21c65fe6714811de | refs/heads/master | 2022-11-16T21:02:18.338203 | 2020-07-02T15:17:00 | 2020-07-02T15:17:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,352 | py | lora.py | from network import LoRa
import socket
import time
import ubinascii
import pycom
import json
pycom.heartbeat(False)
with open('config.json') as f:
config = json.load(f)
# Initialise LoRa in LORAWAN mode.
# Please pick the region that matches where you are using the device:
# Asia = LoRa.AS923
# Australia = LoRa.A... |
40b083c10b4d9b02feeccad39df08d29cdadf880 | a79327e03c937f8d59b7c22f805cc44a048e9a4c | /Evento/models.py | ea40897ce5a29588ae2adb881eeae114896adb8e | [
"Apache-2.0"
] | permissive | higornobrega/Calendario_Feriado | 33dd849b8a7a6cf710fe57f0f58c977c5acfb3f4 | bc6811f3159e0a88239a88f356b20bfa4bd6d4f8 | refs/heads/main | 2023-05-31T01:59:14.747676 | 2021-06-15T12:54:28 | 2021-06-15T12:54:28 | 376,949,325 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 367 | py | models.py | from django.db import models
# Create your models here.
class Evento(models.Model):
tipo = models.CharField(max_length=250)
data_inicio = models.DateField()
data_fim = models.DateField(blank=True, null=True)
descricao = models.CharField(max_length=250)
importante = models.BooleanField()
... |
a9eb0d95bb5e57a122b61de84f26dec0155e48f6 | 2181b9b8f5c349535de8f5472314e23e7adc3b6b | /plugin.py | c279575a0d668401578c8bf4e1e9318483b887d0 | [] | no_license | realraum/r3bot-mqtt | 4c5c00ecdb82e0635f0975c8dfe3d8bf93af0e6a | de8b87c61ff7d63e492b422d94ccf0dd4217e2c5 | refs/heads/master | 2021-01-12T19:25:19.175035 | 2016-03-22T23:03:17 | 2016-03-22T23:03:17 | 45,366,162 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,572 | py | plugin.py | #
# Copyright (c) 2010, quantumlemur
# Copyright (c) 2012, Valentin Lorentz
# Copyright (c) 2015, verr/realraum.at
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source... |
f8dd964dd051f3b69908593a481caaa0dad8abd9 | 1603db040a3370150033103e2363b9a67f779a28 | /ml_project/src/configs/train_pipeline_config.py | aa0e917cc71857cba9b968921ba0b851a57e4ed6 | [] | no_license | made-ml-in-prod-2021/imdxd | f8829dad8af2147d23724d2fc2551fa620621f22 | c1da1438522938935051a2cb733ccd12adf42dc6 | refs/heads/main | 2023-06-03T07:24:23.560347 | 2021-06-26T07:28:23 | 2021-06-26T07:28:23 | 353,678,781 | 0 | 0 | null | 2021-06-26T07:28:24 | 2021-04-01T11:36:04 | Jupyter Notebook | UTF-8 | Python | false | false | 685 | py | train_pipeline_config.py | from dataclasses import dataclass, field
from marshmallow_dataclass import class_schema
from .feature_config import FeatureParams
from .split_config import SplittingParams
from .train_config import TrainingParams
@dataclass()
class TrainingPipelineParams:
"""
Class with full training pipeline config (splitti... |
154d2067ec3ef09ebefb41f07956cf16938d3a75 | f072d130d7f61f47a39d81836105784f873e18ef | /atarieyes/streaming.py | ee51f7b5f27517d779708ab9f7fb3c1bf65154f5 | [] | no_license | cipollone/atarieyes | ad116a28908309cff8979b6d55e6125ebcdc64c3 | 8634499b615fa6f51943d744c404d156acf92ac8 | refs/heads/master | 2022-10-23T02:20:53.591682 | 2020-06-15T14:20:00 | 2020-06-15T14:20:00 | 246,847,509 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,484 | py | streaming.py | """Transmit frames to another instance of this program.
The purpose of this module is to share frames collected during training
with another instance of this program. For example, we could send the
frames collected while training the agent and reuse them to train the
feature extractor. In fact, these two nets will usu... |
2a0bcff32be22e27093fe197f5ca6a16ac011519 | d684599aaa78d0def2e09ddb049cd00066ed4123 | /compute_similarity.py | ededb6ebca60fa6c48c706391a006bc07a90bd79 | [] | no_license | staturecrane/user-similarity | 2fe48e2ada90a1883ee37dafd6dc9159fc092165 | db947bfb49b065f308171712c73600ddbde9b42c | refs/heads/master | 2020-03-26T19:04:46.915216 | 2018-08-20T18:38:39 | 2018-08-20T18:38:39 | 145,247,846 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,646 | py | compute_similarity.py | import math
import operator
import pickle
from tqdm import tqdm
import similarity_api.utils as utils
with open('svd_views.pickle', 'rb') as view_file:
svd_views = pickle.load(view_file)
with open('svd_interests.pickle', 'rb') as interests_file:
svd_interests = pickle.load(interests_file)
with open('svd_ass... |
30f98ff226edba73aa85dadb7f04dcfbb6b9c31c | 3cf220428c6887385c34d04f1ac151f331807b62 | /papers_please.py | 3cab2e260c82e34c4e8ba8373c57befcbf1c63be | [] | no_license | zen1300/CodeWars | ee33bfcfeda52c3e857727c4ea0c987505b13168 | 0d5704b2e0e20d89e3a5905c0c542703ab0a6efa | refs/heads/master | 2023-06-22T22:05:09.759397 | 2021-07-24T22:38:56 | 2021-07-24T22:38:56 | 389,214,557 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,777 | py | papers_please.py | from datetime import timedelta, datetime
import string
COUNTRIES = ['Arstotzka', 'Antegria', 'Impor', 'Kolechia', 'Obristan', 'Republia', 'United Federation']
TODAY = datetime.strptime('November 22, 1982', '%B %d, %Y')
VACCINES = []
class Inspector:
def __init__(self):
self.allowed_countries = []
... |
f257216239a8a45cf8b0f83f363f090b9585dee3 | 8e626f2b30826af00c9ed2d87cbd075e8b9a76b0 | /keeper/manageCheckMK.py | 0a808d152c0f32bd96fa5df2def8dd56ef7ccd9c | [] | no_license | RREYESAL/RPC_HVScan | 0ce7345fe8a9ff8aaa55e4537f131db40274c803 | b6a99f2e2c4e50fb508a9a50969629353bb97a9d | refs/heads/master | 2021-01-21T15:53:09.740113 | 2014-01-23T14:45:02 | 2014-01-23T14:45:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,546 | py | manageCheckMK.py | #!/usr/bin/env python2.6
'''Check_MK (OMD) manage/deploy/backup/restore script.
As per [1] and the other message in the thread, there is no simple way
to restore/backup a full OMD/Check_MK installation. There are several aspects
of backing up/restoring:
1. Check_MK configuration (i.e. local Nagios one): check_mk --... |
d12494d5413c6396bd465ad266be0fb94f28f9f6 | 43731b4c88346447867ce5037a68ae868617832f | /Server/tests/unitTest.py | ea69d3786df30c1d2e9f68e504df8c45195b1fce | [] | no_license | JohnAODowd/monopoly | 90fd5bb84de0d13572f0db9750183c865ccc3266 | 2606205c35b6283e002512eac42d1cd1b0eb8dbd | refs/heads/master | 2022-02-23T00:44:37.970250 | 2019-10-15T12:09:51 | 2019-10-15T12:09:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,013 | py | unitTest.py | import json
import requests
from monopoly.emojiToken import generateEmoji
def post(d):
js = d
payload = json.dumps(js)
headers = {'Content-Type' : 'application/json'}
r = requests.post("http://localhost:8080/game", data=payload, headers=headers)
return r.text
class user:
_gID = None
_uID =... |
bff63a51a92406fc98df5343b90e3e3f1f8a912e | afc3754c00036303023037c863379604218873c0 | /72.py | b8d784ea8e6aa6042c8de3ab97723bb34a7ad814 | [
"MIT"
] | permissive | tarunbodapati/sum.c | 96f55109f6605997ab7210e593e767762b888d8e | c343d6ac530b7f433093138ac52474df4c9c4441 | refs/heads/master | 2020-05-09T12:59:05.671662 | 2019-07-17T09:12:45 | 2019-07-17T09:12:45 | 181,132,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | 72.py | x=list(input())
count=0
for k in x:
if((k=='a')or(k=='e')or(k=='i')or(k=='o')or(k=='u')):
count=count+1
if(count>0):
print("yes")
else:
print("no")
|
6a206ecaeb42c5a72740acbe203b28233bce0e0d | 3a370dfca0f648a13aa0fd02d55d711a26fe7f9a | /python/series/series.py | 4e411a4db7bc0869b8ba509724e94f178316e1de | [] | no_license | WeeDom/exercism | 9bc2614651c26fb0725d217dd7662b19f61da4f6 | 2d6a440222ca00db87eda34eab83790a347bb457 | refs/heads/master | 2023-08-07T17:38:48.350616 | 2023-07-27T11:05:49 | 2023-07-27T11:05:49 | 259,374,147 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | series.py | def slices(series, length):
integers = list(series)
# import pdb; pdb.set_trace()
if len(integers) < length or length <= 0:
raise ValueError("bad input")
orig_length = length
res = []
for i in range(0, len(integers)):
if len(integers[i:length]) == orig_length:
res.app... |
de7faccb60180e0044fa9638522abf332b2078be | 3244428a56c1e09fbc4bc290ef7a1a35fc9bcdeb | /tmp/Spider/handle.py | ee7cc1386c8e5b8957a9cf19ea2e779b75b962ce | [] | no_license | cashgithubs/Spyder_Show | 8c08da4084393a0a0e6e80df939845d8ae6b7a71 | c54736a1794d4eb1748b3e31df27abae5f881a2b | refs/heads/master | 2018-05-30T11:39:54.623674 | 2016-06-03T05:14:14 | 2016-06-03T05:14:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,521 | py | handle.py | #conding:utf-8
import sqlite3
'''
[(u'Content',), (u'DownloadFile',), (u'sqlite_sequence',)]
content
title,link,orgain,content,keywords,PageUrl
'''
def read_txt(txtPath, coding = 'utf-8'):
import codecs
f = codecs.open(txtPath,'r',coding).readlines()
f[0] = f[0].replace(u"\ufeff",u"")
dataset = []
f... |
8ad4e05b1c03464db88f38bcf7c96ccc86c1783d | e3e311a7a7a86d97799ee4ff58185e155d745106 | /contractors/events/migrations/0016_event_bandleader_base_fee.py | 1c7e09baab84c9ccc0512d4fd3fa92e183c2b5b9 | [] | no_license | jpur3846/dfe-contractors | d8938edc1e6b231b7fd132bdf9848b451bb8fdaf | 3cf34751d588cc6f0914b504a7c1c7f3e11bc385 | refs/heads/master | 2022-11-24T16:37:38.297265 | 2020-07-30T13:36:21 | 2020-07-30T13:36:21 | 276,302,265 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | 0016_event_bandleader_base_fee.py | # Generated by Django 3.0.8 on 2020-07-13 04:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0015_event_event_complete'),
]
operations = [
migrations.AddField(
model_name='event',
name='bandleader_ba... |
5ff36a54773fcc492f3eb7db9612ec9645248680 | 36ade9b9b3b703b5c201d1feb6929d55e5c825e0 | /nurse/face_train.py | fcf6a3f62da0a0bf1434bfae8b9ea23374682df0 | [] | no_license | komarlaakshay/Nursebot | 7f424593263f2d80ba685697941fbbd971945526 | ff68623d49ca657bafa57c486df69618d89f1dd9 | refs/heads/main | 2023-04-11T19:05:40.632211 | 2021-05-06T08:06:17 | 2021-05-06T08:06:17 | 364,816,241 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,302 | py | face_train.py | import cv2
import os
import pickle
from PIL import Image
import numpy as np
def train():
BASE_DIR=os.path.dirname(os.path.abspath(__file__))
image_dir=os.path.join(BASE_DIR,"images")
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
#print(dir(cv2.face))
recognizer = cv2.face.... |
12ef4d02bc8801b3678d9d3125c0366b5a5c4a6c | 47386073517c1d5bd0d6e96ded48e0bbb9cdd7a4 | /src/study_ctf/zhalan_object.py | ea114c991f4984ab6dc25a4bdbb9caae917924e0 | [] | no_license | halysl/python_module_study_code | f733eba00de75ebd1cdc9c1e9e36f3a7eee03c93 | 189fd3878b0abe68fd56e11357e88facdb4a186f | refs/heads/master | 2022-07-21T06:51:32.129654 | 2021-08-05T09:14:15 | 2021-08-05T09:14:15 | 148,780,484 | 1 | 0 | null | 2022-07-06T20:26:28 | 2018-09-14T11:39:21 | HTML | UTF-8 | Python | false | false | 1,071 | py | zhalan_object.py | class Get_Data(object):
def __init__(self):
pass
def get_string(self):
string = input("请输入栅栏加密的文字:")
return string
def get_code(self):
code = input("请输入分栏:(0代表从2到6逐个分栏):")
code = int(code)
return code
class zhalan(object):
def __init__(self):
pass... |
c21e0b8a9c988d396f7529210afbe2a434082077 | 78465e814de2bdd494be42949c28397020c4e7a9 | /python/htmlparser.py | 9293c385aa8b5c921f6e1866c161c0b7b84e430b | [] | no_license | zhcn/test2 | 49fc6b858feb5ee30a04000944d7f2a4d7843313 | 34fed78b946bd336b8d9458f298093e8bf5dad2c | refs/heads/master | 2020-09-12T22:14:20.350950 | 2013-02-03T01:10:10 | 2013-02-03T01:10:10 | null | 0 | 0 | null | null | null | null | GB18030 | Python | false | false | 300 | py | htmlparser.py | # -*- coding: cp936 -*-
from HTMLParser import HTMLParser
class MyParser(HTMLParser):
def handle_data(self,data):
print data
myparser = MyParser()
myparser.feed('<dl><dt>姓名:</dt><dd><dt>城市</dt><dd>美国</dd></dl>')
s = "id=abc"
pos = s.find('id=')
print s[pos+3:]
s = "123&"
|
d0e91482696ce7f1a384fdf99eb914e8c4264880 | 4ddcfa4e482aaadfb5bf054a05aabe97c87dffe2 | /libs/_noticias.py | ca7dcef3af054a438cf54f64cedcdbf06d3f0341 | [] | no_license | Tester86/manager | eaad530e059debec47db169eb99d07e191c6bdd9 | ae66b79b73f37ce35d5e74f637a5634e02c0b44d | refs/heads/master | 2020-07-24T22:41:03.153547 | 2019-10-01T18:42:27 | 2019-10-01T18:42:27 | 200,098,558 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 954 | py | _noticias.py | import requests
from audio import *
# globals
sources = {"elcorreo" : "https://www.elcorreo.com/", "elmundo": "https://www.elmundo.es/"}
source_key_list = []
# globals
def getNews(paper_name):
global sources
r = requests.get(sources[paper_name])
content = r.text.split()
for i in content:
if ... |
6f8df845277b57d404d1f9642f6e621d8d6970ca | dab31efd2dcfd020e15ed324faeb998e4e673b7a | /0825_Min_Cost_Climbing_Staris.py | 14049be57df31ff1dd4c5ac728f52f80327527fe | [] | no_license | kaltenkalten/DailyAlgorithm | 6966c2383c63d38e35823841ae45264e2c2cae72 | a11983bfac7c813afdf7559bb241ff516697ec36 | refs/heads/master | 2023-01-28T22:37:39.315825 | 2020-11-24T22:34:27 | 2020-11-24T22:34:27 | 289,006,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | 0825_Min_Cost_Climbing_Staris.py | class Solution:
def minCostClimbingStairs(self, cost: List[int]) -> int:
memo = [0] * len(cost)
memo[0:2] = cost[0:2]
for i in range(2,len(cost)):
memo[i] = cost[i] + min(memo[i-1], memo[i-2])
return min(memo[-1], memo[-2])
|
c07a9b988a7d05159168f7d08ca1f05f4aad85c6 | a417d50a936b345bc295fe5a2d6afc00c9356ad2 | /Lab5/Exercise2/string_utilities.py | 9397db3264b8a6e60c5f2cfe9d7392eab00fea29 | [
"MIT"
] | permissive | alex99q/python3-lab-exercises | 37ce4d3cd97ce988bb7a2d121b39462d2130aba7 | dfa96908f589d2e03ce3a21a3326fd7365d62fcb | refs/heads/master | 2020-04-28T05:56:50.652861 | 2019-06-02T18:51:14 | 2019-06-02T18:51:14 | 175,038,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 691 | py | string_utilities.py | def char_count(input_str):
vowels = {'a', 'e', 'i', 'o', 'u'}
consonants = {'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z'}
digits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}
char_count_dict = {"vowels": 0, "consonants": 0, "digits"... |
4492373d16f61ccad9c929194d022a22dc6c3646 | cf0c126a7b1693aab423ae8b33f89175e3248ec3 | /HydroModelBuilder/ModelInterface/flopyInterface/flopyInterface.py | 708a776cba3b9844aa5728fb62253ff99dfe5005 | [] | no_license | daniel-partington/HydroModelBuilder | df7b5a09c23529afb7770fa87e6f068be96fc48d | bdcd388dbf1753f4ddc4185f58425b38f3ae97ee | refs/heads/master | 2020-05-21T17:46:54.288556 | 2018-11-09T05:14:13 | 2018-11-09T05:14:13 | 63,133,420 | 1 | 1 | null | 2018-05-07T06:06:41 | 2016-07-12T06:43:25 | null | UTF-8 | Python | false | false | 50,046 | py | flopyInterface.py | import datetime
import inspect
import os
import warnings
import flopy
import flopy.utils.binaryfile as bf
import numpy as np
import pandas as pd
from flopy.utils.sfroutputfile import SfrFile
import viz.flopy_viz as fviz # Visualization extension methods
# allow import from this module to maintain backwards compatibi... |
542844865e1e03b6c617fb601adacf46d4d20712 | 89cd8b77ad5171c336cc60b2133fe6468a6cb53f | /Module01_CZ/day4_oop/04-代码/day4/73_init方法.py | f27afe195fe3f253aa1276f4b84d1e352dc003a6 | [
"MIT"
] | permissive | fenglihanxiao/Python | 75178f6b6b0c53345e1ed54226ea645216572d6c | 872baf3a3a5ee42740161152605ca2b1ddf4cd30 | refs/heads/master | 2021-05-23T18:49:20.656433 | 2020-04-29T01:06:21 | 2020-04-29T01:06:21 | 253,199,073 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 324 | py | 73_init方法.py | """
演示init方法的作用
"""
class Cat:
def __init__(self):
self.type = "波斯猫"
self.name = None
def eat(self):
print("猫吃鱼")
def climb(self,meter):
print("猫会爬树,爬了%d米" % meter)
cat1 = Cat()
print(cat1.type)
print(cat1.name)
cat1.eat()
cat1.climb(15) |
4d952a1088b7d49e46eec446ebfcd8be867a858d | 3cb966649a66c59977495563e25aa050ee8a2f85 | /test-readme.py | 4c1532f04e04b60ee6c11b90ae194d1a5388525b | [] | no_license | kelle1ds/test-repo | 86a92313825298f066b395a091e128b1e74385dd | 399dc731ec7f2c413a0c3f2f48f5e6c72b190a31 | refs/heads/main | 2023-07-26T14:54:47.645676 | 2021-09-07T12:45:59 | 2021-09-07T12:45:59 | 403,965,002 | 0 | 0 | null | 2021-09-07T12:45:59 | 2021-09-07T12:11:25 | Python | UTF-8 | Python | false | false | 40 | py | test-readme.py | print("file added to main from github")
|
7a8be118af3bc78c1d1889f331910c9f24a76deb | 14b0b90f825a2edeca77d53a848eff222116ba1c | /blogs/urls.py | 149c6444bcb3356518a83dc677c8bacd9861757c | [] | no_license | Suphacha2563/Project | 2f2d191f143d604696a9c75bfe44cd2c7d6be1cb | bfa92ddc20cc2d270811def3b38f2a3c408af334 | refs/heads/main | 2023-08-28T17:22:24.919695 | 2021-10-27T17:35:12 | 2021-10-27T17:35:12 | 407,267,251 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 335 | py | urls.py | from django.conf.urls import url
from blogs import views
urlpatterns = [
url(r'^api/bus$', views.dataBus),
url(r'^api/busStop$', views.dataBusStop),
url(r'^api/dataGraphBusstop$', views.dataGraphBusstop),
url(r'^api/rout$', views.dataRout),
url(r'^api/dataCarFindMylocal$', views.dataCarFindMylocal,... |
d7d1980db9fcbfb24cd80f6371fb4437dbcc1aa8 | 2c66c1babb836e1c3e18d0f741992485a3e25be3 | /web/tests/domains/application/_import/test_forms.py | ddd0083aabb41ca1c1af16f0c1c0c20f8873a40b | [] | no_license | PaoloC68/icms | 29a3a980fee4dfb8fc39d9ef47af113fbb140b2d | ec47aa10750072b9df355a2c82f8f5f6471e8157 | refs/heads/master | 2022-11-21T08:29:09.339666 | 2020-02-10T11:23:26 | 2020-02-10T11:23:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,008 | py | test_forms.py | import logging
from django.test import RequestFactory, TestCase
from django.urls import reverse_lazy
from web.domains.application._import.forms import NewImportApplicationForm
from web.tests.domains.importer.factory import ImporterFactory
from web.tests.domains.user.factory import UserFactory
from web.tests.domains.off... |
c24d37659dda1ab2e3cff12656f1a66454d070fd | dd43adc298ad0e93ac1dd8bcf10a81d0e4b07896 | /acquire.py | 6580e4e4b7db7c5b81a8223062dc332fdfff50cd | [] | no_license | chadallen210/zillow-clustering-project | 3f309ac9f174b6183bc0769ef105cd0536707811 | 84666afe1341300adeaa9bcbdc48af9ab73f2d8b | refs/heads/main | 2023-06-10T11:13:26.144790 | 2021-06-28T17:38:46 | 2021-06-28T17:38:46 | 379,446,402 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,025 | py | acquire.py | ##### IMPORTS #####
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
from env import host, username, password
##### DB CONNECTION #####
def get_db_url(db, username=username, host=host, password=password):
return f'mysql+pymysql://{username}:{password}@{host}/{db}'
##### ACQU... |
f8aa2d8955330dec402a1a4c234eb4e13d8cdcbd | a2cb6c8fe0e169143e6e318affd91a22e95d3c26 | /python_stu/.idea/客户端udp.py | 74591955467b2ca2df851893f517b5228bfb2233 | [] | no_license | KXY97/python_stu | b04eb66aa0c0af8f9e3bb45983612bf69b9d1068 | d0279b1889666b267a0cc182c6e83cf35fedf9b0 | refs/heads/master | 2020-05-07T22:28:53.542557 | 2019-04-12T06:34:26 | 2019-04-12T06:42:38 | 180,945,538 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 378 | py | 客户端udp.py | #!/usr/bin/python
#-*- coding:utf-8 -*-
import socket
while True:
sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
# 直接发送请求
host = ('127.0.0.1',8888)
aaa = input('>>>')
if aaa != 'exit':
sock.sendto('aaa'.encode('utf-8'),host)
msg = sock.recv(1024)
print(msg.decode('utf... |
0ad71b120818e5e324160d11cb304ac4a3304b00 | 63debc8c8373ef65ec174d7aee8d725ff613ea71 | /fabric/views.py | 2083545b491d29f4c6a64d1c7a3b4af6e80bbea1 | [
"Apache-2.0"
] | permissive | salran40/POAP | 90a53e315341b70760a81b07870d05758667e46b | 9ff2ab68b55aeffe104d127c4beb8b1372b2c8de | refs/heads/master | 2021-01-10T03:56:03.386623 | 2015-10-08T21:08:58 | 2015-10-08T21:08:58 | 43,960,887 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 33,196 | py | views.py | from rest_framework.views import APIView
from django.shortcuts import render
from rest_framework.response import Response
from rest_framework import status
from django.http import HttpResponse, Http404, JsonResponse
from usermanagement.utils import RequestValidator
from django.contrib.auth.models import User
imp... |
0c2b30d4e2185f02ce3870adcf24be1090c561ee | 5bb780007bacef62b80eebf6ef2cfe13a9516abb | /keystonemiddleware/tests/unit/auth_token/test_base_middleware.py | f30a2d0fd3d144e7285983e6ef9deebcd7258fd5 | [
"Apache-2.0",
"BSD-2-Clause"
] | permissive | openstack/keystonemiddleware | c4da1d5a95ba1cd6ed75e0b2ff1ef581b60d4c24 | d36c86ce4c8822de63a436cf109baddb313af40f | refs/heads/master | 2023-09-01T17:56:31.586767 | 2023-08-15T20:36:47 | 2023-08-15T20:36:47 | 21,174,500 | 56 | 51 | null | 2016-08-25T01:01:57 | 2014-06-24T17:38:40 | Python | UTF-8 | Python | false | false | 7,824 | py | test_base_middleware.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... |
5ff5967908e7763e6b5d6be0956799310b3f3d40 | 4a2f20f5b6758aee43249e1e1459395d1ff4f780 | /3)Coin_Collector/coin.py | 6c00d815a51f621b8b07bca1bea7ce2bfd93bf8f | [] | no_license | Koby1997/PythonGames | b1822de6889a010007ef069c1406bb272973b069 | f62df4fda343934a8c1941d3fd6995a6c51be313 | refs/heads/master | 2021-07-05T20:43:34.174046 | 2020-09-11T03:16:54 | 2020-09-11T03:16:54 | 171,047,525 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,186 | py | coin.py | from random import randint
WIDTH = 400
HEIGHT = 400
score = 0
game_over = False
fox = Actor("fox")
fox.pos = 100, 100
coin = Actor("coin")
coin.pos = 200, 200
def draw():
screen.fill("green")
fox.draw()
coin.draw()
screen.draw.text("Score: " + str(score), color = "black", topleft=(10,10))
... |
6cb2c3581eb10817786d6ff1f00359e9f77f5bfd | 1a00c0b6b2f60b6d95ddab499da79c48c8630a2c | /hello_world/test.py | f120e5a7320e95e4120f6e67808dcf0f19cdb180 | [] | no_license | vincentchen1/learnpython | 6bb215b17fc9699db204b8554243706c2436ca5c | 876555f38fe9bce0552c974caabc42d554ddc842 | refs/heads/master | 2022-11-09T16:57:00.025619 | 2020-06-21T18:28:28 | 2020-06-21T18:28:28 | 273,959,430 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31 | py | test.py | import this
import antigravity |
0c0e7e7dee47cbc0847e81c88dd33e1953b1cd44 | da683999bd9d14259679009521158fce3edfd4b4 | /tests/integration/test_tap_snowflake.py | c195403a35238297918fea9057670460130a45a2 | [
"Apache-2.0"
] | permissive | transferwise/pipelinewise-tap-snowflake | 8000faca6102d0318ce043bd6766c9c2af743240 | 15699411cc0ff87f11a3f7e637f01a2eb8cbf9da | refs/heads/master | 2023-09-05T17:51:22.735591 | 2022-05-19T11:04:42 | 2022-05-19T11:04:42 | 189,860,917 | 5 | 19 | NOASSERTION | 2023-08-31T06:51:11 | 2019-06-02T15:07:08 | Python | UTF-8 | Python | false | false | 13,157 | py | test_tap_snowflake.py | import os
import unittest
import json
import singer
import snowflake.connector
import tap_snowflake
import tap_snowflake.sync_strategies.common as common
from singer.schema import Schema
try:
import tests.utils as test_utils
except ImportError:
import utils as test_utils
LOGGER = singer.get_logger('tap_snow... |
c04192f717d98829ab44928ed9600913ffaa8d32 | 3897ca1266642023412cfb04a6c7ec7cadd91d52 | /Pilot-app/populate.py | 2d9f9d2f72cf60c36daa748d804b260efd66c18c | [] | no_license | AnhVuH/VuHongAnh_WebModule_C4E16 | 96d9febc7d7816b6f9bac37ac0983ad85dd28fc1 | d5b5c20ccf65eea2001ff6be297e9a4f9c41b61f | refs/heads/master | 2020-03-07T11:40:51.715553 | 2018-04-19T02:09:31 | 2018-04-19T02:09:31 | 127,461,470 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | populate.py | from models.service import Service
import mlab
from random import randint, choice
from faker import Faker
mlab.connect()
fake = Faker()
for i in range(100):
print('Saving service', i+1,'....')
#Create a document
new_service = Service(name = fake.name(), yob = randint(1995,2000), gender = randint(0,1), height ... |
b7ae72c5f8bba2d713da916a51d214e0143c8783 | 41c7f3842a3f0399bd85f859db421bc15a010e0f | /Lab2/3.py | 3787904e4a1279a47ecbd9e381a691ce0ee45ab4 | [] | no_license | matveyevichevg/Laboratorky | e5a065a08dfb984da818a6780b096ff9fd84d23d | f00174ab2969d6c30a0dc665170ff2f2e263fdef | refs/heads/master | 2023-08-23T23:13:36.328684 | 2021-10-19T08:02:57 | 2021-10-19T08:02:57 | 409,438,984 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,290 | py | 3.py | # В одномерном массиве целых чисел заменить максимальное значение минималь-ным.
import CheckInput
import numpy as np
def vvod():
array = CheckInput.arrayInput_int()
return array
#Замена максимального значения на минимальное
def obrabotka(array):
#Поиск индекса максимального значения
maxArgument = np.a... |