test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import math | |
import random | |
def midpoint(p0, p1): | |
(x0, y0)= p0 | |
(x1, y1)= p1 | |
return ((x0 + x1)/2, (y0 + y1)/2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
std::string initialiser_mot_mystere(std::string const& mot){ | |
std::string res; | |
for(std::size_t i=0; i != mot.size(); ++i){ | |
res.push_back('_'); | |
} | |
return res; |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nom_commune;latitude;longitude | |
Attignat;46.283333;5.166667 | |
Beaupont;46.4;5.266667 | |
Bény;46.333333;5.283333 | |
Béreyziat;46.366667;5.05 | |
Bohas-Meyriat-Rignat;46.133333;5.4 | |
Bourg-en-Bresse;46.2;5.216667 | |
Buellas;46.2;5.133333 | |
Certines;46.133333;5.266667 | |
Ceyzériat;46.166667;5.316667 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileReader; | |
import java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
public class ExampleReadFile{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GoGUI { | |
final static int SIZE= 8; | |
final static double EMPTY_RADIUS=0.1; | |
final static double STONE_RADIUS=0.45; | |
final static String PASS_STRING= "PASS"; | |
final static int PASS_X=0; | |
public static void main(String args[]){ | |
StdDraw.setXscale(-1, SIZE); | |
StdDraw.setYscale(-1, SIZE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns physics-demos.fractals | |
(:require | |
[thi.ng.geom.core :as g] | |
[thi.ng.geom.core.vector :as v :refer [vec2 vec3]] | |
[thi.ng.geom.core.matrix :as mat :refer [M32 M44]] | |
[thi.ng.geom.circle :as c] | |
[thi.ng.geom.spatialtree :as accel] | |
[thi.ng.geom.svg.core :as svg] | |
[thi.ng.geom.physics.core :as phys] | |
[thi.ng.geom.webgl.animator :refer [animate]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; cf https://github.com/aengelberg/loco/blob/master/test/loco/integer/sendmoremoney1.clj | |
(ns constrained-grouping.core | |
(:use loco.constraints | |
loco.core)) | |
(defn initialize-digits [vars] | |
(for [v vars] | |
($in v 0 9))) | |
(def letters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import turtle | |
def rotate(a, v): | |
(x, y)= v | |
return (math.cos(a)*x - math.sin(a)*y, math.sin(a)*x + math.cos(a)*y) | |
def demo0(n): | |
angle_step= 2*math.pi/n | |
p= (0,100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
import math | |
import random | |
import sys | |
# point is (x,y,z) float cooords | |
# polygon is ([points], color) is oriented for vector product to know if facing | |
# object is [polygons] is convex (cf. orientation) | |
# rotating_object is (object, (a,(u,v,w)) angle and axis of rotation (center of rotation is barycenter of object) | |
# figure is [rotating_objects] |